body:has(.quest-story-screen), html:has(.quest-story-screen) { background: #000 !important; height: auto !important; min-height: 100%; overflow: auto !important; }
body:has(.quest-story-screen) .app-shell { width: 100%; max-width: 480px; min-height: 100dvh; max-height: none !important; height: auto !important; margin: 0 auto; padding: 0 0 calc(80px + env(safe-area-inset-bottom)) !important; background: #000 !important; overflow: visible !important; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body:has(.quest-story-screen) .app-shell * { letter-spacing: 0 !important; text-shadow: none !important; }
body:has(.quest-story-screen) .topbar,
body:has(.quest-story-screen) .scene-card > .card-head,
body:has(.quest-story-screen) .chronicle-card { display: none !important; }
body:has(.quest-story-screen) .screen,
body:has(.quest-story-screen) .grid,
body:has(.quest-story-screen) .scene-card,
body:has(.quest-story-screen) #sceneContent { display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; background: transparent !important; border: 0 !important; box-shadow: none !important; white-space: normal !important; }
body:has(.quest-story-screen) .panel-screen.quest-story-screen { display: flex !important; flex-direction: column; width: 100%; min-height: 0 !important; height: auto !important; max-height: none !important; padding: max(12px,env(safe-area-inset-top)) 16px 20px !important; gap: 12px !important; overflow: visible !important; background: #000 !important; color: #f2eee3 !important; border: 0 !important; }
.panel-screen.quest-story-screen > * { flex: none; min-width: 0; margin: 0 !important; }
.panel-screen.quest-story-screen > *::before,
.panel-screen.quest-story-screen > *::after { content: none !important; }
.quest-story-screen .quest-story-hud { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 12px; border-bottom: 1px solid #625632; }
.quest-player { display: flex; align-items: center; min-width: 0; gap: 10px; }
.quest-player-portrait { width: 40px; height: 40px; object-fit: cover; image-rendering: pixelated; border: 1px solid #625632; }
.quest-player-copy { display: grid; gap: 3px; min-width: 0; }
.quest-player-copy strong { color: #f2eee3; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quest-player-copy > span { color: #b8b3a5; font-size: 11px; line-height: 1.3; }
.quest-wallet { display: flex; gap: 14px; flex: none; color: #e3c782; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quest-wallet > span { display: inline-flex; gap: 5px; align-items: center; }
.quest-story-screen .quest-scene-art { display: block; width: calc(100% + 32px); max-width: none; margin: -4px -16px 0 !important; height: auto; aspect-ratio: 16 / 6; object-fit: cover; object-position: center; image-rendering: pixelated; }
.quest-story-screen .scene-title-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 0 !important; border: 0 !important; min-height: 0; }
.quest-story-screen .summary-title { min-width: 0; color: #e3c782 !important; font-size: 13px !important; font-weight: 600; line-height: 1.4 !important; text-transform: none; overflow-wrap: anywhere; }
.quest-story-screen .scene-code-chip { flex: none; padding: 3px 5px !important; background: #10100f !important; border: 1px solid #3c3524 !important; color: #b8b3a5 !important; font-size: 11px !important; line-height: 1.3; font-variant-numeric: tabular-nums; }
.quest-story-screen .scene-headline { padding: 0 !important; color: #e3c782 !important; font-family: Quest Pixel,sans-serif; font-size: 28px !important; font-weight: 400 !important; line-height: 1.12 !important; text-transform: none; border: 0 !important; overflow-wrap: anywhere; }
.quest-story-screen .scene-subline { color: #b8b3a5 !important; font-size: 13px !important; line-height: 1.5; }
.quest-story-screen .scene-story-stack { display: flex !important; flex-direction: column; height: auto !important; min-height: 0 !important; max-height: none !important; gap: 14px; padding: 0 !important; overflow: visible !important; background: transparent !important; border: 0 !important; }
.quest-story-screen .scene-copy.scene-copy-quote,
.quest-story-screen .scene-chapter-summary-quote { display: block; max-height: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; border: 0 !important; color: #e2dfd6 !important; font: 400 15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; white-space: normal !important; overflow: visible !important; }
.quest-story-screen .scene-copy-quote::before,
.quest-story-screen .scene-copy-quote::after { content: none !important; }
.quest-story-screen .scene-chapter-summary { padding: 12px !important; border: 1px solid #3c3524 !important; background: #10100f !important; }
.quest-story-screen .scene-chapter-summary-title { color: #e3c782; font-size: 13px !important; margin-bottom: 8px; }
.quest-story-screen .scene-turn-call { display: grid; gap: 8px; margin: 0 !important; }
.quest-story-screen .scene-gm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 0 !important; padding: 0 !important; color: #b8b3a5 !important; font: 400 12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; }
.quest-story-screen .scene-gm-target { display: inline-flex; align-items: center; gap: 4px; color: #e3c782; font-size: 12px !important; }
.quest-story-screen .scene-gm-avatar { width: 20px !important; height: 20px !important; flex-basis: 20px; }
.quest-story-screen .story-turn-timer { display: grid !important; grid-template-columns: minmax(0,1fr) 80px; align-items: center; gap: 10px; padding: 10px 12px !important; background: #10100f !important; border: 1px solid #625632 !important; border-radius: 0 !important; box-shadow: none !important; }
.quest-story-screen .story-turn-timer-head { display: flex !important; align-items: center; justify-content: space-between; grid-column: 1 / -1; gap: 12px; padding: 0 !important; }
.quest-story-screen .story-turn-status { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: #f2eee3 !important; font-size: 13px !important; font-weight: 500; line-height: 1.35 !important; text-transform: none; }
.quest-story-screen .story-turn-label { color: #e3c782 !important; font-size: 14px !important; font-weight: 600; line-height: 1.35 !important; font-variant-numeric: tabular-nums; }
.quest-story-screen .story-turn-timer-bar { grid-column: 1 / -1; height: 4px !important; padding: 0 !important; background: #302d24 !important; border: 0 !important; border-radius: 0 !important; overflow: hidden; }
.quest-story-screen .story-turn-timer-fill { height: 100%; background: #d3b65f !important; border: 0 !important; border-radius: 0 !important; transition: width 250ms linear; }
.quest-story-screen .story-roll-button { grid-column: 1 / -1; position: static !important; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100% !important; min-height: 48px !important; height: auto !important; margin: 2px 0 0; padding: 10px !important; background: #d3b65f !important; border: 1px solid #e0c676 !important; border-radius: 0 !important; color: #211807 !important; box-shadow: none !important; transform: none !important; }
.quest-story-screen .story-roll-cube { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid #625632; border-radius: 0 !important; background: transparent; font-size: 12px; color: #211807; }
.quest-story-screen .story-roll-label { color: #211807 !important; font-size: 14px !important; }
.quest-story-screen .scene-options-block { display: block !important; padding: 0 !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; border: 0 !important; background: transparent !important; }
.quest-story-screen .scene-options { display: grid !important; grid-template-columns: minmax(0,1fr) !important; grid-auto-rows: max-content; gap: 10px !important; max-height: none !important; min-height: 0 !important; padding: 0 !important; overflow: visible !important; }
.quest-story-screen .scene-option-button { display: grid !important; grid-template-columns: 30px minmax(0,1fr) auto !important; grid-template-areas: "icon title check" "icon copy copy"; align-items: center; column-gap: 10px !important; row-gap: 5px !important; width: 100%; height: auto !important; min-height: 80px !important; padding: 13px 12px !important; background: #0c0c0c !important; border: 1px solid #625632 !important; border-radius: 0 !important; box-shadow: inset 0 2px #242116 !important; text-align: left !important; color: #f2eee3 !important; font-family: inherit !important; text-transform: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color 150ms ease-out,border-color 150ms ease-out; }
.quest-story-screen .scene-option-title { grid-area: title; display: block !important; min-width: 0; margin: 0 !important; padding: 0 !important; text-align: left !important; }
.quest-story-screen .scene-option-title-main { display: block !important; color: #f2eee3 !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.35 !important; overflow-wrap: anywhere; }
.quest-story-screen .scene-option-copy { grid-area: copy; min-width: 0; margin: 0 !important; padding: 0 !important; color: #b8b3a5 !important; font-size: 12px !important; font-weight: 400; line-height: 1.5 !important; text-align: left !important; overflow-wrap: anywhere; }
.quest-story-screen .scene-option-check { grid-area: check; align-self: start; display: inline-flex !important; gap: 3px; margin: 1px 0 0 !important; padding: 3px 5px; color: #e3c782 !important; background: #17150e; border: 1px solid #3c3524; font-size: 11px !important; line-height: 1.3 !important; white-space: nowrap; }
.quest-story-screen .scene-option-check-dice { font-size: 11px !important; }
.quest-action-icon { grid-area: icon; align-self: center; width: 30px; height: 30px; color: #e3c782; }
.quest-action-icon svg { display: block; width: 100%; height: 100%; }
.quest-story-screen .scene-option-button.active:hover { background: #19170f !important; border-color: #b69e5d !important; }
.quest-story-screen .scene-option-button.selected { background: #292314 !important; border-color: #e0c676 !important; box-shadow: inset 0 2px #6e5c2a !important; }
.quest-story-screen .scene-option-button.locked { opacity: .55; cursor: default; }
.quest-story-screen :focus-visible { outline: 2px solid #e3c782 !important; outline-offset: 3px; }
.quest-story-screen ::selection { background: #d3b65f; color: #211807; }
.quest-story-screen .scene-dialogue-list { max-height: none !important; overflow: visible !important; gap: 12px; }
.quest-story-screen .scene-dialogue-text { font: 400 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; }
body:has(.quest-story-screen) .bottom-nav { position: fixed !important; inset: auto auto 0 50% !important; transform: translateX(-50%) !important; display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; width: min(100%,480px) !important; height: calc(72px + env(safe-area-inset-bottom)); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important; gap: 6px !important; background: #080808 !important; border-top: 1px solid #3d3523 !important; z-index: 1600; }
body:has(.quest-story-screen) .bottom-nav .nav-button { display: flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important; min-height: 54px !important; padding: 8px 5px !important; border: 1px solid #625632 !important; border-radius: 0 !important; background: #0c0c0c !important; color: #e8dcc0 !important; box-shadow: inset 0 3px #242116 !important; }
body:has(.quest-story-screen) .bottom-nav .nav-button.active { background: #d3b65f !important; color: #211807 !important; border-color: #e0c676 !important; }
body:has(.quest-story-screen) .bottom-nav .nav-label { font: 600 13px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; white-space: nowrap; }
body:has(.quest-story-screen) .bottom-nav .nav-icon { width: 22px !important; height: 22px !important; }
body:has(.quest-story-screen) .utility-card { display: none !important; }
body:has(.quest-story-screen) .utility-drawer-open .utility-card { display: grid !important; grid-template-rows: auto minmax(0,1fr); position: fixed !important; top: max(12px,env(safe-area-inset-top)) !important; bottom: calc(84px + env(safe-area-inset-bottom)) !important; left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px),456px) !important; max-height: none !important; z-index: 1700 !important; overflow: hidden !important; padding: 16px; background: #080808 !important; border: 1px solid #625632 !important; }
body:has(.quest-story-screen) .utility-drawer-open .utility-card > .card-head { display: flex !important; align-items: center; justify-content: space-between; }
body:has(.quest-story-screen) #utilityContent { min-height: 0; overflow: auto; }
body:has(.quest-story-screen) .utility-close-button { display: inline-flex !important; align-items: center; min-height: 44px !important; font-size: 13px !important; }
@media (max-width: 340px) {
  .quest-story-screen .scene-option-button { grid-template-areas: "icon title title" "icon check check" "icon copy copy"; }
  .quest-story-screen .scene-option-check { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .quest-story-screen *, body:has(.quest-story-screen) .bottom-nav * { transition: none !important; animation: none !important; }
}
