/* HOLLOWSTAR — menus. Deep indigo panels, warm lantern gold, chunky rounded shapes. */
:root { --ink: #140c22; --bg: #07050f; --panel: rgba(22, 14, 40, 0.92); --gold: #ffe36e; --warm: #ffcf6b; --mint: #7cf29c; --sky: #7cf2ff; --pink: #ff9de2; --text: #ece6ff; --muted: #a79ccc; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
body { font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; color: var(--text); }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#ui { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); overflow-y: auto; touch-action: pan-y; }
#ui.pause, #ui.end, #ui.settings { background: rgba(7, 5, 15, 0.55); }
.panel { background: rgba(22, 14, 40, 0.97); border: 3px solid var(--ink); box-shadow: 0 0 0 2px #3d2f6e, 0 12px 40px rgba(0,0,0,0.6); border-radius: 18px; padding: 18px 22px; max-width: 520px; width: 100%; max-height: 100%; overflow-y: auto; }
.panel.wide { max-width: 860px; }
.panel.tall { height: 100%; display: flex; flex-direction: column; }
.titlepanel { background: rgba(14, 9, 30, 0.9); text-align: center; max-width: 460px; }
.logo { font-size: clamp(34px, 8vw, 64px); font-weight: 900; letter-spacing: 3px; color: #fff4c2; text-shadow: 0 0 18px rgba(255, 227, 110, 0.55), 3px 3px 0 var(--ink); line-height: 1; margin: 4px 0 6px; }
.logo span { color: var(--gold); }
.tagline { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
h2 { margin: 0 0 10px; font-size: 22px; color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.menu { display: flex; flex-direction: column; gap: 8px; margin: 8px auto; max-width: 300px; }
.btn { font: inherit; font-weight: 800; font-size: 16px; color: var(--text); background: #2a2050; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 16px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); transition: transform 0.06s, background 0.1s; min-height: 44px; }
.btn small { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
.btn:hover, .btn:focus-visible { background: #3a2d6e; outline: none; }
.btn:focus-visible { box-shadow: 0 3px 0 var(--ink), 0 0 0 3px var(--gold); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--gold); color: var(--ink); }
.btn.primary:hover, .btn.primary:focus-visible { background: #fff0a0; }
.btn.danger { background: #ff4d6d; color: #fff; }
.records { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.records b { color: var(--text); }
.hint { margin-top: 8px; font-size: 12px; color: #7d72a8; }
.row { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.chargrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
@media (max-width: 700px) { .chargrid { grid-template-columns: repeat(4, 1fr); } }
.charcard { background: #1d1638; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 2px; cursor: pointer; color: var(--text); font: inherit; display: flex; flex-direction: column; align-items: center; }
.charcard.sel { border-color: var(--gold); background: #2e2356; }
.charcard.locked { opacity: 0.55; }
.charcard .cname { font-weight: 800; font-size: 13px; }
.portrait { width: 64px; height: 64px; }
.charinfo { margin-top: 10px; background: #1a1333; border-radius: 12px; padding: 10px 14px; min-height: 120px; }
.ctitle { font-weight: 900; font-size: 18px; color: var(--gold); }
.ctitle small { color: var(--muted); font-weight: 600; font-size: 13px; }
.cdesc { font-size: 14px; margin: 4px 0 8px; }
.cstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; font-size: 13px; }
.cstats .hearts { color: #ff6b8a; letter-spacing: 1px; }
.sbar { display: inline-block; width: 90px; height: 8px; background: #0e0a1f; border-radius: 4px; vertical-align: middle; margin-left: 6px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--mint); }
.citems { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #231a44; border-radius: 10px; padding: 2px 8px 2px 2px; font-size: 12px; }
.opt.dim { border: 0; padding: 4px 8px; font-size: 13px; }
.opt.dim input { order: 0; }
.seed { font: inherit; background: #120c26; color: var(--text); border: 3px solid var(--ink); border-radius: 10px; padding: 9px 10px; width: 150px; text-transform: uppercase; }
.summary { margin: 6px 0; }
.statline { font-size: 13px; color: var(--muted); margin: 4px 0; }
.statline b { color: var(--text); }
.itemgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 6px; }
.itemcell { background: #1a1333; border-radius: 10px; padding: 6px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; }
.itemcell .icon { grid-row: span 2; }
.itemcell .iname { font-weight: 800; font-size: 12px; }
.itemcell .idesc { font-size: 11px; color: var(--muted); }
.itemcell.unseen { opacity: 0.5; }
.qmark { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: #0e0a1f; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #5a4a7a; }
.mongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.moncell { background: #1a1333; border-radius: 10px; padding: 6px; text-align: center; }
.moncell.boss { border: 2px solid #ff4d6d; }
.moncell canvas { width: 56px; height: 56px; }
.moncell .qmark { margin: 8px auto; }
.moncell.unseen { opacity: 0.55; }
.codexbody { overflow-y: auto; flex: 1; margin-top: 8px; padding-right: 4px; }
.tabs { justify-content: flex-start; margin-top: 0; }
.list { display: flex; flex-direction: column; gap: 4px; }
.li { background: #1a1333; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.achlist { overflow-y: auto; flex: 1; margin-top: 6px; }
.ach { display: flex; gap: 10px; align-items: center; opacity: 0.6; }
.ach.got { opacity: 1; }
.ach .star { font-size: 22px; color: var(--gold); }
.muted { color: var(--muted); font-size: 13px; }
.helpbody .lead { font-size: 14px; line-height: 1.5; margin: 0 0 8px; }
.helpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.helpgrid .li { line-height: 1.5; }
.itemgrid > .muted { grid-column: 1 / -1; }
.small { font-size: 11px; margin-top: 6px; }
.sub { margin: 12px 0 4px; font-weight: 800; color: var(--sky); font-size: 14px; }
.endhead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.killer { display: flex; gap: 10px; align-items: center; background: #1a1333; border-radius: 12px; padding: 8px 14px; font-size: 14px; }
.killer b { color: #ff9f9f; font-size: 16px; }
.endstats { font-size: 14px; line-height: 1.6; }
.endstats b { color: var(--gold); }
.score { font-size: 18px; }
.new { background: var(--gold); color: var(--ink); border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 900; }
.opt { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 4px; font-size: 15px; border-bottom: 1px solid #2a2050; }
.opt input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--gold); order: 2; }
.opt input[type=range] { width: 50%; accent-color: var(--gold); }
.opt select { font: inherit; background: #120c26; color: var(--text); border: 2px solid var(--ink); border-radius: 8px; padding: 4px; }
.settings .btn { margin-top: 10px; width: 100%; }
#rotate { display: none; position: fixed; inset: 0; background: var(--bg); color: var(--gold); z-index: 10; align-items: center; justify-content: center; text-align: center; font-size: 22px; font-weight: 900; }
#rotate small { color: var(--muted); font-size: 14px; font-weight: 600; }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }
@media (max-height: 500px) {
  .panel { padding: 10px 14px; border-radius: 14px; }
  h2 { font-size: 18px; margin-bottom: 6px; }
  .logo { font-size: 38px; }
  .tagline { margin-bottom: 6px; font-size: 12px; }
  .menu { gap: 5px; }
  .btn { padding: 6px 12px; min-height: 38px; font-size: 14px; }
  .chargrid { gap: 5px; }
  .portrait { width: 48px; height: 48px; }
  .charinfo { min-height: 0; padding: 6px 10px; margin-top: 6px; }
  .cdesc { margin: 2px 0 4px; font-size: 13px; }
  .row { margin-top: 8px; }
  .records { margin-top: 6px; font-size: 12px; line-height: 1.4; }
  .hint { display: none; }
  .itemgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .titlepanel { max-width: 640px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: center; }
  .titlepanel { align-content: center; }
  .titlepanel .logo { grid-column: 1; grid-row: 1; align-self: end; }
  .titlepanel .tagline { grid-column: 1; grid-row: 2; align-self: start; }
  .titlepanel .menu { grid-column: 2; grid-row: 1 / span 3; }
  .titlepanel .records { grid-column: 1; grid-row: 3; align-self: start; }
}
