.unlimited-shell .game-shell-icon { background: #c72732; color: #fff; font-weight: 900; }
.unlimited-shell .unlimited-stage { padding: 0; background: #18191e; color: #f2f0eb; }
.comic-game { --red: #e63241; --dim: #a6a7b0; position: relative; min-height: 570px; padding: 24px 28px 20px; background: linear-gradient(145deg, #202024, #151518); font-size: 14px; }
.game-masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.comic-game .game-wordmark { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: 'Inter Tight', Arial, sans-serif; font-size: clamp(25px, 4vw, 34px); line-height: 1; letter-spacing: -.05em; }
.comic-game .game-wordmark span { padding: 5px 7px; background: var(--red); font-size: 10px; letter-spacing: .1em; transform: skew(-6deg); }
.utility-buttons { display: flex; gap: 6px; }
.comic-game button, .comic-dialog button { cursor: pointer; }
.icon-control { display: grid; place-items: center; width: 33px; height: 33px; color: #e8e6e4; border: 1px solid #46444d; background: #24242b; border-radius: 8px; padding: 0; }
.icon-control[aria-pressed=true] { background: #50303a; border-color: #d04755; }
.comic-game svg, .comic-dialog svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.case-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 0 16px; margin-bottom: 18px; border-bottom: 1px solid #343438; }
.run-counters { display: flex; gap: 16px; font-size: 11px; color: #aaa8b3; }
.run-counters b { color: #f6f1e8; font-size: 16px; }
.challenge-banner { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid #6b5144; background: #362b22; color: #f3ca84; font-size: 11px; }
.challenge-banner button { border: 0; color: #f3ca84; background: transparent; text-decoration: underline; font-size: 11px; }
.eyebrow-red { color: #ff8790; font-size: 10px; font-weight: 700; letter-spacing: .14em; margin-bottom: 7px; }
.comic-game h2 { color: #f8f3ed; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.04em; }
.attempt-meter { display: flex; align-items: center; gap: 7px; }
.attempt-meter b { font-size: 21px; line-height: 1; color: #fff; }
.attempt-meter span { font-size: 12px; color: #aaa8b3; }
.search-row { display: flex; gap: 9px; }
.combobox-wrap { flex: 1; min-width: 0; position: relative; }
.search-icon { position: absolute; left: 13px; top: 15px; color: #a6a1ae; pointer-events: none; }
#character-search { width: 100%; height: 48px; background: #f5f2ed; color: #29212b; border: 2px solid transparent; border-radius: 9px; padding: 0 12px 0 40px; font-size: 14px; letter-spacing: 0; }
#character-search::placeholder { color: #746d76; font-size: 12px; }
#character-search:focus { outline: none; border-color: #ee6c75; box-shadow: 0 0 0 2px #ee6c7530; }
.red-button, .dark-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 8px; border: 1px solid transparent; font: 700 12px/1.4 Inter, sans-serif; }
.red-button { background: #db2c3b; color: #fff; box-shadow: 0 3px 0 #871d29; }
.red-button:hover:not(:disabled) { background: #ef3d4b; }
.red-button:disabled { background: #4b373e; color: #a3949d; box-shadow: none; cursor: default; }
.dark-button { background: #2a2931; color: #f0e8e6; border-color: #48434c; }
.dark-button:hover { background: #39333d; }
#suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; padding: 5px; margin: 0; max-height: 246px; overflow-y: auto; overscroll-behavior: contain; background: #f5f2ed; color: #2b2630; border-radius: 9px; box-shadow: 0 12px 30px #0008; }
#suggestions li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 6px; cursor: pointer; }
#suggestions li[aria-selected=true], #suggestions li:hover { background: #e6dcd7; }
#suggestions img { width: 34px; height: 40px; object-fit: cover; border-radius: 4px; background: #d8d0cf; }
#suggestions span { font-size: 12px; font-weight: 600; }
#suggestions small { display: block; font-size: 10px; font-weight: 400; color: #6a606a; }
.feedback-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 42px; padding-block: 8px; }
#message { color: #b5aeb7; font-size: 11px; }
#message.is-error { color: #ffa5ac; }
.text-control { background: transparent; border: 0; color: #e1d7df; padding: 5px 0; font: 600 11px Inter, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.text-control:disabled { opacity: .45; cursor: default; text-decoration: none; }
.text-control span { display: block; font-size: 9px; margin-top: 4px; font-weight: 400; }
#hint-button { flex-shrink: 0; text-align: right; }
.intel-note { border: 1px dashed #8a724c; background: #e5bb5912; padding: 8px 12px; color: #f3d79c; font-size: 12px; margin-bottom: 10px; }
.board { height: 300px; overflow: auto; overscroll-behavior: contain; border: 1px solid #3c3942; border-radius: 10px; background: #111218b0; scrollbar-width: thin; scrollbar-color: #66505d #1b1920; }
.empty-case { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 14px; text-align: center; color: #aaa1ac; font-size: 12px; }
.mystery-card { display: grid; place-items: center; width: 47px; height: 60px; background: #2a222c; border: 1px solid #79505e; border-radius: 8px; transform: rotate(-7deg); color: #e75d6c; font: 800 32px 'Inter Tight',sans-serif; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 13px; color: #a79eaa; font-size: 9px; }
.legend span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: #777; border-radius: 2px; }
.legend .key-match::before { background: #398568; }
.legend .key-partial::before { background: #c5943f; }
.legend .key-miss::before { background: #ad4f5b; }
.board table, #review-board table { width: 100%; min-width: 710px; table-layout: fixed; border-collapse: separate; border-spacing: 5px; font-size: 10px; line-height: 1.35; }
.board th, #review-board th { position: sticky; top: 0; background: #1b1921; color: #c2bac7; z-index: 1; padding: 7px 2px; font-weight: 500; text-align: center; font-size: 9px; }
.board th:first-child { width: 126px; }
.board td, #review-board td { padding: 7px 5px; border-radius: 5px; vertical-align: middle; text-align: center; color: #eee7eb; overflow-wrap: anywhere; }
td.match, .help-demo .match { background: #265c49; box-shadow: inset 0 -2px #16392c; }
td.partial, .help-demo .partial { background: #765421; box-shadow: inset 0 -2px #4f3718; }
td.miss { background: #4f2935; box-shadow: inset 0 -2px #341d26; }
td.higher, td.lower, .help-demo .higher { background: #3a3b5e; box-shadow: inset 0 -2px #272740; }
.clue-value { display: block; max-height: 42px; overflow-y: auto; scrollbar-width: thin; }
.clue-status { display: block; font-size: 8px; opacity: .8; margin-top: 4px; }
.character-cell { background: #26242d; text-align: left !important; }
.character-cell img { width: 32px; height: 36px; border-radius: 4px; object-fit: cover; float: left; margin-right: 6px; }
.character-cell span { display: block; font-size: 9px; padding-top: 3px; }
.board td:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 3px 0 7px #0004; }
.board th:first-child { left: 0; z-index: 3; }
.board td { font-size: 11px; }
.board .character-cell span { font-size: 10px; }
.result-view.is-fresh .result-card { animation: result-in .45s ease-out both; }
@keyframes result-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.guess-row.is-new td { animation: clue-in .4s both; animation-delay: calc(var(--cell,0) * 60ms); }
@keyframes clue-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.play-bottom { display: flex; justify-content: flex-end; gap: 15px; align-items: center; margin: 10px 0 8px; }
.play-bottom button { flex-shrink: 0; color: #a79ca9; font-size: 10px; }
.result-view { padding: 24px 0 6px; min-height: 410px; }
.result-card { display: grid; grid-template-columns: 180px minmax(0,1fr); align-items: center; gap: 28px; max-width: 670px; margin: 0 auto 25px; }
.result-portrait-wrap { position: relative; }
#result-portrait { display: block; width: 180px; height: 210px; object-fit: cover; border: 4px solid #e9e0d6; border-radius: 4px; box-shadow: 6px 6px #0006; }
#result-stamp { position: absolute; bottom: 12px; left: -8px; transform: rotate(-10deg); padding: 5px 10px; border: 2px solid #8bedbc; background: #153b2ded; color: #8bedbc; font: 800 15px 'Inter Tight',sans-serif; letter-spacing: .04em; }
.result-view.is-loss #result-stamp { background: #562332ed; color: #ffb1bd; border-color: #ffb1bd; }
#result-name { font-size: clamp(24px,4vw,36px); line-height: 1.1; margin: 8px 0; }
#result-title { color: #cbbdc8; font-size: 12px; }
.result-score { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.result-score b { color: #fff2da; font: 800 50px/1 'Inter Tight', sans-serif; }
.result-score span { font-size: 9px; color: #b2a3af; letter-spacing: .08em; }
.result-debut { color: #a99aa9; font-size: 10px; margin-top: 12px; }
.result-journey { display: flex; gap: 5px; }
.result-journey span { width: 13px; height: 13px; border: 1px solid #655363; border-radius: 3px; background: #342633; }
.result-journey .used { background: #ac4f5c; border-color: #cd7581; }
.result-journey .solved { background: #71bd99; border-color: #99e0ba; }
.result-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
#review-button { display: block; margin: 0 auto; }
#review-board { max-height: 230px; overflow: auto; margin-top: 10px; border: 1px solid #51404e; border-radius: 8px; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 12; }
.confetti i { position: absolute; left: var(--x); top: -20px; width: 7px; height: 12px; background: var(--color); animation: celebrate 1.8s var(--delay) cubic-bezier(.1,.4,.6,1) both; }
@keyframes celebrate { to { transform: translate(var(--drift), 700px) rotate(500deg); opacity: 0; } }
.comic-dialog { color: #eee8e8; border: 1px solid #67505e; background: #201d27; border-radius: 16px; padding: 27px; width: min(440px,calc(100% - 30px)); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 20px 90px #0008; }
.comic-dialog::backdrop { background: #080810ba; backdrop-filter: blur(3px); }
.comic-dialog h2 { font-size: 28px; color: #f3e8e5; margin: 8px 20px 18px 0; }
.comic-dialog p, .comic-dialog li { font-size: 13px; line-height: 1.65; }
.comic-dialog p { color: #b9adba; margin: 12px 0 18px; }
.dialog-close { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #5b4b5b; background: #302733; color: #f4e7ee; border-radius: 8px; }
.help-demo { display: flex; gap: 7px; margin: 15px 0; }
.help-demo span { padding: 12px 8px; border-radius: 5px; font-size: 11px; }
.comic-dialog ol { padding-left: 19px; }
.comic-dialog li { margin-bottom: 8px; }
.comic-dialog .red-button { width: 100%; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions button { flex: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; text-align: center; margin: 20px 0; }
.stat-grid b { display: block; color: #fff2da; font: 700 32px 'Inter Tight',sans-serif; }
.stat-grid span { font-size: 10px; color: #b5a9b8; }
.prototype-note { padding: 12px 0 24px; color: #687166; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media(max-width:760px) {
  .comic-game { padding: 20px 14px 16px; min-height: 570px; }
  .edition { font-size: 7px; }
  .game-masthead { gap: 7px; }
  .utility-buttons { gap: 4px; }
  .icon-control { width: 29px; height: 29px; }
  .comic-game .game-wordmark { font-size: 25px; gap: 5px; }
  .comic-game .game-wordmark span { font-size: 8px; }
  .run-counters { gap: 8px; font-size: 9px; }
  .run-counters b { font-size: 14px; }
  .board { height: 310px; }
  .result-card { grid-template-columns: 108px minmax(0,1fr); gap: 16px; }
  #result-portrait { width: 108px; height: 154px; }
  #result-stamp { font-size: 10px; left: -5px; padding: 4px 6px; }
  #result-name { font-size: 24px; }
  .result-score b { font-size: 40px; }
  .result-view { padding-top: 30px; }
  .result-actions button { font-size: 10px; padding: 10px 7px; }
  .comic-footer { letter-spacing: 0; font-size: 7px; }
}
@media(max-width:360px) {
  .comic-game .game-wordmark { font-size: 22px; }
  .comic-game .game-wordmark span { font-size: 7px; }
  .edition { letter-spacing: .05em; }
  .run-counters span:last-child { display: none; }
  .red-button { padding-inline: 11px; }
  .mission-row h2 { font-size: 20px; }
}
@media(prefers-reduced-motion:reduce) {
  .guess-row.is-new td, .confetti i, .result-view.is-fresh .result-card { animation: none; }
}

.search-feedback { display: flex; align-items: center; gap: 8px; min-width: 0; }
#selected-portrait { flex: 0 0 auto; object-fit: cover; border-radius: 4px; border: 1px solid #8f6c7d; }
.clue-detail { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: center; }
.clue-detail:hover { filter: brightness(1.25); }
.clue-detail:focus-visible { outline-offset: 1px; }
.clue-value { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; max-height: none; }
#clue-items { padding-left: 20px; font-size: 14px; color: #e6dbe5; line-height: 1.9; margin-bottom: 22px; }


.comic-game .game-wordmark { margin: 0; }
.comic-game .game-wordmark span { transform: none; border-radius: 2px; }
.empty-case p { font-size: 14px; color: #c5c0c8; margin: 0; }
#message:empty { display: none; }
#hint-button { font-size: 12px; }

/* Comic-book opening, with the same shell and controls as the game. */
.comic-game { isolation: isolate; }
.is-lobby { background: #161619; }
.is-lobby .game-masthead { position: absolute; top: 18px; right: 20px; left: 20px; z-index: 3; justify-content: flex-end; }
.is-lobby .game-masthead .game-wordmark { display: none; }
.start-view { position: relative; min-height: 526px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; }
.lobby-art { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.lobby-art img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.24); transform: scale(1.12); }
.lobby-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#151518a8,#15151880),radial-gradient(ellipse,#16161900,#161619b0); }
.lobby-content { position: relative; text-align: center; width: min(540px,100%); padding: 50px 16px 60px; }
.lobby-kicker { color: #cac1c1; font-size: 10px; font-weight: 700; letter-spacing: .3em; margin-bottom: 18px; }
.comic-game .lobby-title { display: inline-flex; flex-direction: column; align-items: center; color: white; font: 900 clamp(34px,6vw,65px)/1 'Inter Tight',Arial,sans-serif; letter-spacing: -.045em; margin: 0; padding: 12px 17px 10px; background: #e51e30; transform: rotate(-2deg); box-shadow: 6px 6px 0 #08080b; }
.lobby-title span { color: #fff; font: 800 12px/1.4 Inter,sans-serif; letter-spacing: .37em; margin: 8px 0 0; }
.lobby-tagline { font-size: 15px; color: #e0dadb; margin: 26px 0 24px; }
.start-button { min-width: 200px; min-height: 52px; border-radius: 12px; font-size: 18px; box-shadow: 0 4px 0 #85101d; }
#start-help { display: block; margin: 17px auto 0; color: #bdb4b7; }
.lobby-clues { position: absolute; bottom: 24px; display: flex; gap: 7px; transform: rotate(-3deg); }
.lobby-clues i { display: block; width: 21px; height: 21px; background: #345d4b; border: 1px solid #77a88d; animation: tile-pop .4s both; animation-delay: calc(var(--i) * 80ms); }
.lobby-clues i:nth-child(2n) { background: #7d5a25; border-color: #b9955a; }
.lobby-clues i:nth-child(3n) { background: #71313d; border-color: #ab5764; }
.lobby-clues i:nth-child(2) { --i:1; }.lobby-clues i:nth-child(3) { --i:2; }.lobby-clues i:nth-child(4) { --i:3; }.lobby-clues i:nth-child(5) { --i:4; }.lobby-clues i:nth-child(6) { --i:5; }
.start-view .lobby-title { animation: cover-in .5s cubic-bezier(.16,1,.3,1) both; }
.case-enter { animation: panel-in .28s ease-out both; }
#suggestions:not([hidden]) { animation: panel-in .14s ease-out; }
.red-button,.dark-button,.icon-control { transition: transform .14s,background .14s,box-shadow .14s; }
.red-button:active:not(:disabled),.dark-button:active,.icon-control:active { transform: translateY(2px); }
@keyframes cover-in { from { opacity:0; transform:rotate(-6deg) scale(.85); } to { opacity:1; transform:rotate(-2deg) scale(1); } }
@keyframes panel-in { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@keyframes tile-pop { from { opacity:0; transform:translateY(10px) rotate(12deg); } to { opacity:1; transform:none; } }
@media(max-width:760px) {
 .start-view { min-height: 534px; }
 .lobby-content { padding-inline: 4px; }
 .comic-game .lobby-title { font-size:clamp(29px,7.8vw,52px); padding:12px 10px; }
 .lobby-title span { font-size:10px; letter-spacing:.25em; }
 .is-lobby .game-masthead { top:16px; right:14px; }
}
@media(prefers-reduced-motion:reduce) {
 .start-view .lobby-title,.lobby-clues i,.case-enter,#suggestions:not([hidden]) { animation:none; }
 .red-button,.dark-button,.icon-control { transition:none; }
}

.lobby-art { display: grid; grid-template-columns: 1.3fr 1fr; gap: 9px; transform: rotate(-12deg) scale(1.25); opacity: .65; }
.lobby-art span { border: 2px solid #383036; background: radial-gradient(#ffffff13 1px,transparent 1.5px) 0 0/7px 7px,linear-gradient(135deg,#47232b,#1b1a20); }
.lobby-art span:first-child { grid-row: span 2; background: repeating-conic-gradient(from 10deg at 100% 60%,#48252d 0deg 7deg,#231d25 8deg 20deg); }
.lobby-art span:last-child { background: radial-gradient(ellipse at bottom,#552c34,#222027 75%); }

/* Keep the opening search in the spotlight; reveal the board after a real guess. */
.comic-game::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(#d553621f 1px,transparent 1.5px) 100% 0/8px 8px,conic-gradient(from 230deg at 105% 85%,transparent 0deg,#712a351d 10deg,transparent 20deg,#712a351d 35deg,transparent 50deg); mask-image: linear-gradient(120deg,transparent 25%,#000 100%); border-radius: inherit; }
.comic-game::after { content: ''; position: absolute; top: 110px; right: 24px; width: 150px; height: 290px; z-index: -1; border: 2px solid #78404a22; transform: skewY(-18deg); background: linear-gradient(150deg,#862d3810,transparent); pointer-events: none; }
.red-button,.dark-button { border-radius: 12px; }
.icon-control { border-radius: 11px; }
.start-view { border-radius: 12px; }
.play-view { position: relative; min-height: 410px; }
.search-panel { position: relative; z-index: 4; }
.first-guess-intro { display: none; }
.is-opening { padding-top: 90px; }
.is-opening .first-guess-intro { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-bottom: 25px; }
.first-guess-intro p { color: #d7cdd2; font-size: 16px; font-weight: 600; }
.is-opening .board,.is-opening .play-bottom { display: none; }
.is-opening #hint-button { visibility: hidden; }
.is-opening .feedback-line { justify-content: center; }
.is-opening .search-feedback { min-height: 32px; }
.is-opening #suggestions { max-height: 215px; }
@media(max-width:760px) {
 .is-opening { padding-top: 80px; }
 .comic-game::after { right: 12px; width: 90px; }
}

.comic-game { min-height: 610px; }

/* Visible inked panels, with quiet surfaces behind text and clues. */
.comic-game { background: #1b1a21; }
.comic-game::before { background: linear-gradient(90deg,#17171d99 5%,#17171d30 75%),url('assets/comic-backdrop.svg') center/cover; mask-image: none; opacity: .9; }
.comic-game::after { display: none; }
.game-masthead,.case-bar { position: relative; z-index: 1; }
.board { background: #14141deb; }
#suggestions { overscroll-behavior: contain; scroll-padding: 5px; scrollbar-width: thin; scrollbar-color: #9b8a8e #eee7e5; }
#suggestions.opens-up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
#suggestions li { scroll-snap-align: start; }

/* A compact result and a real local record, without invented historical points. */
.result-view { max-width: 720px; margin: auto; padding: 14px 0 6px; }
.result-card { grid-template-columns: 112px minmax(0,1fr); gap: 22px; max-width: none; margin: 0 0 18px; padding: 18px; border: 1px solid #66505b; border-radius: 16px; background: linear-gradient(120deg,#321f2bec,#191922f5); box-shadow: 0 8px 22px #0003; }
#result-portrait { width:112px; height:140px; border:2px solid #b8949d; border-radius:10px; box-shadow:none; }
#result-stamp { bottom:8px; left:-5px; border-radius:5px; font-size:11px; padding:4px 8px; transform:rotate(-6deg); }
#result-name { font-size:clamp(20px,3vw,29px); margin:6px 0; }
#result-badge { font-size:10px; letter-spacing:.09em; margin-bottom:5px; color:#ffadb5; }
#result-title { font-size:11px; }
.result-score { margin:9px 0 8px; }
.result-score b { font:800 46px/1 Inter,Arial,sans-serif; letter-spacing:-.06em; }
.result-score span { letter-spacing:0; font-size:10px; }
.result-debut { margin-top:8px; line-height:1.4; }
.result-journey span { width:10px; height:10px; }
.trend-card { margin-bottom:16px; border:1px solid #48414e; border-radius:14px; background:#181820f2; padding:14px 16px 10px; }
.trend-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.trend-heading h3 { font:700 13px Inter,Arial,sans-serif; color:#f3e8ee; }
.trend-summary { display:flex; gap:13px; color:#aca3b0; font-size:10px; }
.trend-summary b { color:#f4e6ec; font-size:15px; }
#trend-chart svg { display:block; width:100%; height:142px; overflow:visible; }
.trend-grid { stroke:#3a3440; stroke-width:.7; }
.trend-axis { fill:#a99daf; font:9px Inter,Arial,sans-serif; }
.trend-line { stroke:#70bca1; stroke-width:2; }
.trend-line.is-assisted { stroke:#c6a368; stroke-dasharray:4 3; }
.trend-hit { fill:transparent; }
.trend-ring { fill:transparent; stroke:transparent; stroke-width:1.5; }
.trend-dot { fill:#7cc5a6; stroke:#7cc5a6; stroke-width:2; }
.assisted .trend-dot { fill:#181820; stroke:#e4bd79; }
.trend-cross { stroke:#f08091; stroke-width:2.3; fill:none; stroke-linecap:round; }
.trend-point { cursor:pointer; outline:none; }
.trend-point.current .trend-ring { stroke:#f2e5ec; }
.trend-point[aria-pressed=true] .trend-ring,.trend-point:focus .trend-ring { stroke:#fff; fill:#ffffff0e; }
#trend-detail { min-height:30px; font-size:10px; line-height:1.5; color:#ddd0dc; margin:2px 0 5px; overflow-wrap:anywhere; }
.trend-legend { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:9px; color:#a69aaa; }
.trend-legend span:not(:last-child)::before { content:'●'; color:#7cc5a6; margin-right:4px; }
.trend-legend .trend-assisted::before { content:'○' !important; color:#e4bd79 !important; }
.trend-legend .trend-failed::before { content:'×' !important; color:#f08091 !important; }
.trend-legend span:last-child { margin-left:auto; }
.trend-empty { min-height:105px; display:grid; place-items:center; text-align:center; color:#b3a6b8; font-size:12px; }
@media(max-width:760px) {
 .result-view { padding-top:4px; }
 .result-card { grid-template-columns:82px minmax(0,1fr); gap:13px; padding:13px; margin-bottom:12px; }
 #result-portrait { width:82px; height:112px; }
 #result-stamp { font-size:9px; padding:3px 5px; }
 #result-name { font-size:20px; }
 #result-title { display:none; }
 #result-badge { font-size:8px; }
 .result-score b { font-size:36px; }
 .result-debut { font-size:9px; }
 .trend-card { padding:12px 10px 9px; margin-bottom:12px; }
 #trend-chart svg { height:130px; }
 .trend-legend span:last-child { flex-basis:100%; margin-left:0; }
}

#trend-chart svg { fill:none; stroke:none; stroke-width:0; }
.trend-axis { font-size:11px; }
.has-result .case-bar { display:none; }

/* Decorative character art stays outside the accessible game content. */
.comic-cast { position:absolute; inset:0; z-index:-1; pointer-events:none; overflow:hidden; border-radius:inherit; }
.comic-cast img { position:absolute; width:100%; height:100%; object-fit:contain; object-position:center; filter:drop-shadow(0 0 14px #dc3b4930); }
.cast-left { mask-image:linear-gradient(90deg,#000 0%,#000 28%,transparent 43%); opacity:.76; animation:cast-float-left 12s ease-in-out infinite; }
.cast-right { mask-image:linear-gradient(90deg,transparent 58%,#000 73%,#000 100%); opacity:.7; animation:cast-float-right 15s ease-in-out infinite; }
.comic-cast::after { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 10% 40%,#c5324230,transparent 30%),radial-gradient(ellipse at 92% 65%,#bc36482b,transparent 28%); animation:cast-glow 9s ease-in-out infinite alternate; }
.is-lobby .lobby-art { opacity:.3; }
@keyframes cast-float-left { 0%,100% { transform:translate3d(-3px,4px,0) rotate(-.4deg); } 50% { transform:translate3d(3px,-6px,0) rotate(.4deg); } }
@keyframes cast-float-right { 0%,100% { transform:translate3d(3px,-4px,0); } 50% { transform:translate3d(-3px,6px,0); } }
@keyframes cast-glow { from { opacity:.35; } to { opacity:.85; } }
@media(max-width:760px) {
 .comic-cast img { width:170%; max-width:none; height:430px; top:80px; }
 .cast-left { left:-12%; }
 .cast-right { right:-15%; }
 .comic-cast::after { background:linear-gradient(0deg,#18182090,transparent 65%); }
}
@media(prefers-reduced-motion:reduce) {
 .cast-left,.cast-right,.comic-cast::after { animation:none; }
}

.first-mark { width:80px; height:74px; transform:rotate(-6deg); }
.comic-game .first-mark svg { display:block; width:100%; height:100%; fill:none; stroke:none; }
.first-mark .mark-rays { stroke:#f2c8cb; stroke-width:3; stroke-linecap:round; }
.first-mark .mark-shadow { fill:#08090e; }
.first-mark .mark-bubble { fill:#e52c40; stroke:#ff9ca7; stroke-width:1.5; }
.first-mark text { fill:#fff5ee; font:900 40px Inter,Arial,sans-serif; }
.first-guess-intro p { font-size:15px; letter-spacing:.01em; color:#f5e4e8; }
.result-easter { grid-column:1/-1; position:relative; margin:0; padding:12px 14px; background:#7c293633; border:1px solid #a9556466; border-radius:4px 13px 13px 13px; }
.result-easter::before { content:''; position:absolute; left:24px; top:-6px; width:9px; height:9px; background:#35212a; border-top:1px solid #a9556466; border-left:1px solid #a9556466; transform:rotate(45deg); }
.result-easter blockquote { margin:0 0 5px; color:#ffe9df; font:700 16px/1.4 'Inter Tight',Inter,Arial,sans-serif; }
.result-easter figcaption { font-size:9px; color:#c4a5b0; line-height:1.4; }
.has-easter #result-title { display:none; }
.result-view.is-fresh .result-easter { animation:panel-in .3s .15s both; }
@media(max-width:760px) {
 .result-easter { padding:10px 11px; }
 .result-easter blockquote { font-size:14px; }
 .result-card { row-gap:12px; }
}
@media(prefers-reduced-motion:reduce) { .result-view.is-fresh .result-easter { animation:none; } }

.unlimited-shell:is(.is-expanded,:fullscreen) .comic-game { min-height:100%; }

/* Two independent character editions, available from lobby and active games. */
.roster-modes{display:flex;justify-content:center;gap:4px;position:relative;z-index:3;margin:8px auto 12px;padding:4px;width:max-content;border:1px solid #514049;border-radius:12px;background:#211e25}
.roster-modes a{padding:8px 24px;border-radius:8px;color:#d8d0d5;font:700 14px/1.2 Arial,sans-serif;text-decoration:none}
.roster-modes a[aria-current]{background:#e5273d;color:#fff;box-shadow:0 2px 0 #8e1425}
.roster-modes a:hover{color:#fff}.roster-modes a:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* Make the selected character readable before committing a guess. */
.feedback-line{min-height:98px}
.search-feedback{gap:14px;max-width:100%}
#selected-portrait{width:64px;height:72px;border-radius:8px;border:2px solid #c56878;object-position:center top;box-shadow:0 3px 12px #0005}
.search-feedback:has(#selected-portrait:not([hidden])){padding:8px 16px 8px 8px;background:#201b25e8;border:1px solid #78515f;border-radius:12px}
.search-feedback:has(#selected-portrait:not([hidden])) #message{font-size:16px;line-height:1.4;color:#f4edf1;font-weight:600;overflow-wrap:anywhere}
@media(max-width:600px){.feedback-line{min-height:82px}#selected-portrait{width:48px;height:56px}.search-feedback{gap:10px}.search-feedback:has(#selected-portrait:not([hidden])){padding:6px 12px 6px 6px}.search-feedback:has(#selected-portrait:not([hidden])) #message{font-size:14px}}

/* Consistent result dots; selection uses the result color rather than a white ring. */
.trend-point{--point-color:#7cc5a6}
.trend-point.assisted{--point-color:#e4bd79}
.trend-point.failed{--point-color:#ef8594}
.trend-point .trend-dot{fill:var(--point-color);stroke:#211d28;stroke-width:1.5}
.trend-point.assisted .trend-dot{fill:#211d28;stroke:var(--point-color);stroke-width:2}
.trend-point .trend-ring{fill:none;stroke:none;stroke-width:1}
.trend-point.current .trend-ring,.trend-point[aria-pressed=true] .trend-ring{stroke:var(--point-color);fill:var(--point-color);fill-opacity:.12;stroke-opacity:.55}
.trend-point:focus-visible .trend-ring{stroke:var(--point-color);stroke-width:2;stroke-opacity:1;fill-opacity:.18}
.trend-legend .trend-failed::before{content:'●' !important;color:#ef8594 !important}
