:root {
  --ink: #1f3550; --ink2: #4a6078; --paper: #fffaf0; --panel: rgba(255, 250, 240, 0.94); --line: #e6dcc6;
  --sea: #2fa6d6; --sea2: #1d7fb0; --sun: #f6c23e; --coral: #f2705e; --mint: #4fc29a; --bad: #e0503f; --good: #33a46b;
  --shadow: 0 6px 20px rgba(20, 50, 80, 0.18), 0 1px 3px rgba(20, 50, 80, 0.15);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #9fd8ff; font-family: 'Nunito', system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* top bar */
#top { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; z-index: 10; pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { background: var(--sea); color: #fff; padding: 7px 12px; border-radius: 14px; font-family: 'Fredoka', sans-serif; font-size: 15px; box-shadow: var(--shadow); white-space: nowrap; }
.stat { background: var(--panel); border-radius: 12px; padding: 6px 9px; display: flex; align-items: center; gap: 5px; box-shadow: var(--shadow); font-size: 14px; white-space: nowrap; }
.stat b { font-family: 'Fredoka', sans-serif; font-weight: 600; }
.stat small { color: var(--ink2); font-weight: 700; }
.stat.money b { color: #1d7a4a; font-size: 16px; }
.stat.money.neg b { color: var(--bad); }
.stat.stars b { color: #e3a414; letter-spacing: 1px; font-size: 16px; }
.meters { gap: 10px; }
.meter { display: flex; align-items: center; gap: 4px; }
.meter i { font-style: normal; }
.meter > div { width: 46px; height: 8px; background: #e8e0cc; border-radius: 5px; overflow: hidden; }
.meter s { display: block; height: 100%; background: var(--mint); border-radius: 5px; transition: width .4s; }
.utils { gap: 8px; }
.util { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 800; }
.util.warn { color: #d07a00; } .util.bad { color: var(--bad); animation: pulse 1s infinite; }
.mats b { min-width: 14px; }
.speed { display: flex; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.speed button { border: 0; background: transparent; padding: 6px 10px; font-size: 14px; color: var(--ink); }
.speed button.on { background: var(--sea); color: #fff; }
.iconbtn { border: 0; background: var(--panel); border-radius: 12px; padding: 6px 11px; font-size: 16px; box-shadow: var(--shadow); color: var(--ink); }
@keyframes pulse { 50% { opacity: .45; } }

/* tools */
#tools { position: fixed; left: 10px; top: 70px; display: flex; flex-direction: column; gap: 4px; z-index: 10; background: var(--panel); padding: 6px; border-radius: 16px; box-shadow: var(--shadow); max-height: calc(100vh - 90px); overflow-y: auto; }
#tools button, #cats button { width: 62px; border: 0; background: transparent; border-radius: 11px; padding: 6px 2px 4px; font-size: 21px; display: flex; flex-direction: column; align-items: center; color: var(--ink); line-height: 1.1; }
#tools button span, #cats button span { font-size: 10px; font-weight: 800; margin-top: 2px; }
#tools button:hover, #cats button:hover { background: #f1e9d6; }
#tools button.on, #cats button.on { background: var(--sea); color: #fff; }
#cats { display: flex; flex-direction: column; gap: 4px; }
.sep { height: 1px; background: var(--line); margin: 3px 4px; }

#flyout { position: fixed; left: 86px; top: 70px; width: 310px; max-height: calc(100vh - 90px); overflow-y: auto; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); z-index: 11; padding: 10px; }
#flyout h3 { margin: 2px 4px 8px; font-family: 'Fredoka', sans-serif; font-size: 18px; }
.bcard { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border-radius: 12px; border: 2px solid transparent; background: #fff; margin-bottom: 6px; cursor: pointer; }
.bcard:hover { border-color: #bfe3f2; }
.bcard.on { border-color: var(--sea); background: #eaf7fd; }
.bcard.locked { opacity: .5; cursor: not-allowed; }
.bcard .n { font-weight: 800; }
.bcard .c { font-family: 'Fredoka', sans-serif; color: #1d7a4a; font-weight: 600; text-align: right; }
.bcard .d { grid-column: 1 / 3; font-size: 12px; color: var(--ink2); }
.bcard .tags { grid-column: 1 / 3; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; font-weight: 800; color: var(--ink2); }
.bcard .tags span { background: #f3ecdb; border-radius: 6px; padding: 1px 6px; }

/* info panel */
#info { position: fixed; right: 10px; top: 70px; width: 300px; max-height: calc(100vh - 260px); overflow-y: auto; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); z-index: 10; padding: 12px 14px; font-size: 14px; }
#info h3 { margin: 0 0 4px; font-family: 'Fredoka', sans-serif; font-size: 19px; }
#info .sub { color: var(--ink2); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
#info .row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--line); }
#info .row b { font-family: 'Fredoka', sans-serif; font-weight: 600; }
#info .x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 18px; color: var(--ink2); }
#info .btnrow { display: flex; gap: 6px; margin-top: 10px; }
.btn { border: 0; border-radius: 10px; padding: 7px 12px; font-weight: 800; background: var(--sea); color: #fff; }
.btn.alt { background: #efe6d2; color: var(--ink); }
.btn.bad { background: var(--bad); }
.bar { height: 8px; background: #e8e0cc; border-radius: 5px; overflow: hidden; margin: 2px 0 6px; }
.bar s { display: block; height: 100%; background: var(--sea); }

#tooltip { position: fixed; pointer-events: none; z-index: 30; background: rgba(31, 53, 80, .92); color: #fff; padding: 5px 9px; border-radius: 9px; font-size: 13px; font-weight: 700; white-space: nowrap; transform: translate(14px, 14px); }
#tooltip .bad { color: #ffb0a6; } #tooltip .ok { color: #a8f0c8; }

#toasts { position: fixed; left: 86px; bottom: 12px; display: flex; flex-direction: column-reverse; gap: 6px; z-index: 12; max-width: min(460px, calc(100vw - 280px)); pointer-events: none; }
.toast { background: var(--panel); border-left: 5px solid var(--sea); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); animation: tin .3s ease-out; pointer-events: auto; cursor: default; }
.toast.bad { border-color: var(--bad); } .toast.good { border-color: var(--good); } .toast.great { border-color: var(--sun); background: #fff7dd; }
.toast.clickable { cursor: pointer; }
@keyframes tin { from { transform: translateX(-20px); opacity: 0; } }

#minimap { position: fixed; right: 10px; bottom: 10px; width: 170px; height: 170px; border-radius: 16px; box-shadow: var(--shadow); border: 4px solid var(--panel); z-index: 10; background: #1d5f8a; cursor: pointer; image-rendering: pixelated; }
#hint { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(31, 53, 80, .88); color: #fff; padding: 7px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; z-index: 11; pointer-events: none; }
#eventbar { position: fixed; left: 50%; top: 62px; transform: translateX(-50%); background: var(--sun); color: var(--ink); padding: 6px 16px; border-radius: 12px; font-weight: 800; z-index: 9; box-shadow: var(--shadow); font-size: 14px; }

#bubbles, #labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; background: #fff; border-radius: 12px; padding: 1px 4px; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.bubble::after { content: ''; position: absolute; left: 10px; bottom: -5px; border: 5px solid transparent; border-top-color: #fff; border-bottom: 0; }
.blabel { position: absolute; left: 0; top: 0; font-size: 18px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }

/* modal */
#modal { position: fixed; inset: 0; background: rgba(20, 45, 70, .45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
#modal .card { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; }
#modal h2 { font-family: 'Fredoka', sans-serif; margin: 0 0 6px; font-size: 26px; }
#modal .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
#modal .tile { background: #fff; border-radius: 12px; padding: 8px 12px; }
#modal .tile small { color: var(--ink2); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
#modal .tile b { display: block; font-family: 'Fredoka', sans-serif; font-size: 22px; }
.quote { background: #fff; border-radius: 12px; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
.quote .who { font-size: 12px; color: var(--ink2); font-weight: 800; }
.quote .st { color: #e3a414; }
.goal { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.goal .bar { flex: 1; margin: 0; height: 10px; }
.goal.done .bar s { background: var(--good); }

/* title */
#title { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(159,216,255,0), rgba(20,70,110,.35)); padding: 16px; }
.title-card { background: var(--paper); border-radius: 28px; padding: 30px 34px; width: min(520px, 100%); box-shadow: 0 20px 60px rgba(10,40,70,.35); text-align: center; }
.studio { font-weight: 800; letter-spacing: .14em; font-size: 11px; text-transform: uppercase; color: var(--ink2); }
.title-card h1 { font-family: 'Fredoka', sans-serif; font-size: 58px; line-height: .95; margin: 10px 0 8px; color: var(--sea2); }
.title-card h1 span { color: var(--coral); }
.tag { font-weight: 800; margin: 0 0 12px; }
.map { font-size: 14px; color: var(--ink2); }
.btns { display: flex; gap: 10px; justify-content: center; margin: 18px 0 10px; flex-wrap: wrap; }
.big { border: 0; border-radius: 14px; padding: 12px 22px; font-size: 18px; font-weight: 800; background: var(--sea); color: #fff; box-shadow: 0 4px 0 var(--sea2); }
.big:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sea2); }
#btn-continue { background: var(--mint); box-shadow: 0 4px 0 #2f9a74; }
.small { font-size: 12px; color: var(--ink2); }

@media (max-width: 1700px) { .brand { display: none; } }
@media (max-width: 1520px) { .stat { font-size: 13px; padding: 5px 8px; } .meter > div { width: 34px; } }
@media (max-width: 1420px) { .mats { display: none; } }
@media (max-width: 1250px) { .meters { display: none; } }
@media (max-width: 760px) {
  #top { gap: 4px; } .brand, .meters, .mats, #utils { display: none; } .stat { padding: 5px 7px; font-size: 12px; }
  #tools { top: auto; bottom: 8px; left: 8px; right: 8px; flex-direction: row; overflow-x: auto; max-height: none; }
  #cats { flex-direction: row; } .sep { width: 1px; height: auto; margin: 4px 2px; }
  #tools button, #cats button { width: 54px; flex: 0 0 auto; }
  #flyout { left: 8px; right: 8px; width: auto; top: auto; bottom: 86px; max-height: 50vh; }
  #info { left: 8px; right: 8px; width: auto; top: auto; bottom: 86px; max-height: 45vh; }
  #minimap { display: none; } #toasts { left: 8px; bottom: 90px; max-width: calc(100vw - 16px); }
}

.blabel.full { font-size: 10px; font-weight: 800; background: var(--coral); color: #fff; border-radius: 6px; padding: 1px 4px; font-family: 'Nunito', sans-serif; }

/* ---------- dialogue (Theme Hospital-style) ---------- */
#dialog { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; width: min(780px, calc(100vw - 24px)); }
#dialog .dlg-card { position: relative; display: flex; gap: 16px; background: var(--paper); border-radius: 22px; box-shadow: 0 18px 50px rgba(10, 40, 70, .35); padding: 16px 18px 16px 16px; border: 4px solid var(--who, var(--sea)); animation: dlgIn .35s cubic-bezier(.2, 1.4, .4, 1); cursor: pointer; }
@keyframes dlgIn { from { transform: translateY(40px) scale(.96); opacity: 0; } }
.dlg-portrait { width: 132px; height: 132px; border-radius: 18px; object-fit: cover; flex: 0 0 auto; background: #cfe9f7; box-shadow: inset 0 0 0 3px rgba(255,255,255,.6); }
.dlg-body { flex: 1; display: flex; flex-direction: column; min-height: 132px; }
.dlg-name { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 20px; color: var(--who, var(--ink)); }
.dlg-role { font-size: 12px; font-weight: 800; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.dlg-text { font-size: 17px; line-height: 1.45; font-weight: 600; flex: 1; min-height: 50px; }
.dlg-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.dlg-btns .btn { font-size: 15px; padding: 8px 16px; }
.dlg-skip { position: absolute; top: -14px; right: 16px; border: 0; background: var(--ink); color: #fff; border-radius: 10px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
@media (max-width: 760px) { .dlg-portrait { width: 80px; height: 80px; } .dlg-text { font-size: 15px; } #dialog { bottom: 90px; } }

#advisor { position: fixed; right: 10px; bottom: 192px; z-index: 30; display: flex; gap: 10px; align-items: center; width: min(360px, calc(100vw - 24px)); background: var(--paper); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); border-left: 5px solid var(--who, var(--sun)); cursor: pointer; }
#advisor.in { animation: advIn .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes advIn { from { transform: translateX(60px); opacity: 0; } }
#advisor img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; }
#advisor b { display: block; font-family: 'Fredoka', sans-serif; color: var(--who); font-size: 14px; }
#advisor span { font-size: 13px; font-weight: 700; line-height: 1.35; }
@media (max-width: 760px) { #advisor { bottom: 90px; right: 8px; } }

/* avatars from the character atlas */
.av { display: inline-block; background-repeat: no-repeat; vertical-align: bottom; }
.gavs { display: flex; gap: 2px; margin: -4px 0 4px; }
.gavs .av { width: 34px !important; }
.quote.av { display: flex; gap: 10px; align-items: center; }
.quote.av > .av { flex: 0 0 auto; }

/* price control */
.price { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price span { flex: 1; }
.price b { font-family: 'Fredoka', sans-serif; min-width: 52px; text-align: center; font-size: 16px; }
.pbtn { border: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--sea); color: #fff; font-weight: 800; font-size: 16px; }
.price small { font-weight: 800; color: var(--ink2); width: 70px; text-align: right; }

/* floating juice */
.cashpop { position: fixed; z-index: 8; pointer-events: none; font-family: 'Fredoka', sans-serif; font-weight: 700; color: #1d8a4a; font-size: 15px; text-shadow: 0 1px 0 #fff, 0 0 6px #fff; transform: translate(-50%, 0); animation: cashUp 1.5s ease-out forwards; }
@keyframes cashUp { to { transform: translate(-50%, -46px); opacity: 0; } }
.puff { position: fixed; z-index: 8; pointer-events: none; font-size: 30px; transform: translate(-50%, -50%); animation: puffA .9s ease-out forwards; }
@keyframes puffA { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1.6); opacity: 0; } }

/* staff + finance */
.staffrow { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 8px 12px; margin: 8px 0; }
.staffrow .sd { flex: 1; display: flex; flex-direction: column; } .staffrow .sd span { font-size: 13px; color: var(--ink2); } .staffrow .sd small { font-weight: 800; color: #1d7a4a; }
.staffrow .sc { display: flex; align-items: center; gap: 8px; } .staffrow .sc b { font-family: 'Fredoka', sans-serif; font-size: 22px; min-width: 24px; text-align: center; }
.bankhead { display: flex; gap: 14px; align-items: center; } .bankhead img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; }
.chart { display: flex; gap: 10px; align-items: flex-end; height: 110px; padding: 8px; background: #fff; border-radius: 12px; margin-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; } .chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 82px; }
.chart i { display: block; width: 12px; border-radius: 4px 4px 0 0; } .chart i.in { background: #34b36b; } .chart i.out { background: var(--bad); } .chart small { font-size: 10px; font-weight: 800; color: var(--ink2); }
.btn[disabled] { opacity: .5; cursor: default; }

/* gazette */
.gazette { background: #f6f0e1; border-radius: 10px; padding: 14px 16px; font-family: Georgia, 'Times New Roman', serif; color: #2a2620; }
.masthead { text-align: center; font-family: 'Fredoka', sans-serif; font-size: 30px; letter-spacing: .06em; border-bottom: 3px double #2a2620; padding-bottom: 6px; }
.masthead small { display: block; font-family: Georgia, serif; font-size: 12px; letter-spacing: 0; font-style: italic; }
.gazette h1 { font-size: 26px; line-height: 1.1; margin: 10px 0; text-align: center; }
.gcols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; font-size: 14px; }
.gcols h3 { font-family: 'Fredoka', sans-serif; margin: 4px 0; }
.award { background: #fff; border-radius: 10px; padding: 6px 10px; margin: 6px 0; font-family: 'Nunito', sans-serif; }
.award b { display: block; } .award span { font-size: 12px; color: var(--ink2); font-weight: 700; } .award.bad b { color: var(--bad); } .award.good b { color: #1d7a4a; }
@media (max-width: 600px) { .gcols { grid-template-columns: 1fr; } }
.win { text-align: center; } .trophy { font-size: 72px; animation: dlgIn .6s cubic-bezier(.2, 1.4, .4, 1); } .medal { font-size: 14px; background: #fff3c4; border-radius: 8px; padding: 2px 8px; margin-left: 6px; }

@media (max-height: 900px) {
  #tools { gap: 1px; padding: 4px; top: 62px; }
  #tools button, #cats button { padding: 3px 2px 2px; font-size: 18px; width: 56px; }
  #tools button span, #cats button span { font-size: 9px; }
  .sep { margin: 2px 4px; }
}
@media (max-height: 760px) { #tools button span, #cats button span { display: none; } #tools button, #cats button { width: 44px; } #flyout { left: 66px; } }

/* ---------- boot / studio splash ---------- */
#boot { position: fixed; inset: 0; z-index: 90; background: #05060c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#boot img { width: min(380px, 70vw); opacity: .25; filter: saturate(.6); }
#boot-btn { border: 2px solid #4ff3ff; background: transparent; color: #bffbff; font-family: 'Tilt Neon', 'Fredoka', sans-serif; font-size: 22px; padding: 12px 28px; border-radius: 14px; box-shadow: 0 0 14px #2fe0ff88, inset 0 0 10px #2fe0ff55; text-shadow: 0 0 8px #4ff3ff; animation: bootPulse 1.6s ease-in-out infinite; }
#boot small { color: #5b6a80; font-weight: 700; }
@keyframes bootPulse { 50% { box-shadow: 0 0 26px #2fe0ffcc, inset 0 0 16px #2fe0ff88; } }
#splash { position: fixed; inset: 0; z-index: 89; background: radial-gradient(ellipse at center, #0b0f22 0%, #030409 70%); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .7s; }
#splash.out { opacity: 0; }
.sp-inner { text-align: center; }
.sp-badger { width: min(380px, 60vw); opacity: 0; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
#splash.play .sp-badger { animation: flickerOn 1.5s steps(1) .15s forwards, glow 2.4s ease-in-out 1.7s infinite; }
.sp-name { font-family: 'Monoton', 'Tilt Neon', sans-serif; font-size: clamp(30px, 6vw, 70px); color: #e9fdff; letter-spacing: .05em; margin-top: 6px; opacity: 0; text-shadow: 0 0 6px #fff, 0 0 18px #2fe0ff, 0 0 40px #2fe0ff, 0 0 80px #2fe0ff; }
.sp-name span:last-child { color: #ffe6f6; text-shadow: 0 0 6px #fff, 0 0 18px #ff3fb4, 0 0 40px #ff3fb4, 0 0 80px #ff3fb4; }
#splash.play .sp-name { animation: flickerOn 1.2s steps(1) 1.1s forwards; }
.sp-studio { font-family: 'Tilt Neon', sans-serif; font-size: clamp(16px, 2.4vw, 26px); color: #c9f9ff; letter-spacing: .4em; opacity: 0; text-shadow: 0 0 10px #2fe0ff; margin-top: 4px; }
#splash.play .sp-studio { animation: fadeUp .8s ease-out 2.2s forwards; }
.sp-presents { font-family: 'Nunito', sans-serif; font-style: italic; color: #8091b0; margin-top: 26px; opacity: 0; font-size: 16px; }
#splash.play .sp-presents { animation: fadeUp .8s ease-out 3.1s forwards; }
.sp-skip { position: absolute; bottom: 18px; right: 22px; color: #3a4660; font-weight: 700; }
@keyframes flickerOn { 0% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: .1; } 20% { opacity: .9; } 26% { opacity: 0; } 40% { opacity: 1; } 46% { opacity: .3; } 55%, 100% { opacity: 1; } }
@keyframes glow { 50% { filter: brightness(1.25) saturate(1.2); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- main menu ---------- */
#menu { position: fixed; inset: 0; z-index: 80; overflow: hidden; background: #2fa6d6; }
.menu-bg { position: absolute; inset: -4%; background: url(assets/brand/menu-bg.webp) center/cover; animation: kenburns 40s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-3%, 2%); } }
.menu-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 30, 60, .72) 0%, rgba(10, 30, 60, .35) 38%, rgba(10, 30, 60, 0) 60%), linear-gradient(0deg, rgba(10,30,60,.45), rgba(10,30,60,0) 30%); }
.menu-logo { position: absolute; left: 6vw; top: 8vh; color: #fff; }
.ml1, .ml2 { font-family: 'Fredoka', sans-serif; font-weight: 700; line-height: .9; font-size: clamp(54px, 8vw, 110px); text-shadow: 0 6px 0 #1d6f9a, 0 10px 30px rgba(0,0,0,.35); }
.ml2 { color: #ffd34d; text-shadow: 0 6px 0 #c9542f, 0 10px 30px rgba(0,0,0,.35); }
.ml3 { font-weight: 800; margin-top: 14px; font-size: clamp(13px, 1.3vw, 17px); opacity: .95; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.menu-col, .menu-panel { position: absolute; left: 6vw; top: calc(8vh + clamp(150px, 20vw, 270px)); display: flex; flex-direction: column; gap: 10px; width: min(360px, 88vw); }
.mbtn { text-align: left; border: 0; border-radius: 18px; padding: 12px 18px; background: rgba(255, 250, 240, .95); color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.18), 0 10px 24px rgba(0,0,0,.2); transition: transform .12s; }
.mbtn b { display: block; font-family: 'Fredoka', sans-serif; font-size: 22px; font-weight: 600; }
.mbtn small { color: var(--ink2); font-weight: 700; }
.mbtn:hover { transform: translateX(6px); background: #fff; }
#m-campaign { background: #ffd34d; } #m-continue { background: #8ff0c4; }
.menu-panel { width: min(560px, 88vw); }
.mp-card { background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.mp-card > img { width: 100%; height: 170px; object-fit: cover; display: block; }
.mp-body { padding: 16px 20px 18px; } .mp-body h2 { font-family: 'Fredoka', sans-serif; margin: 0 0 6px; } .mp-body ul { margin: 6px 0 10px; padding-left: 20px; font-weight: 700; }
.mcheck { display: flex; gap: 8px; align-items: center; font-weight: 800; margin: 10px 0; }
.mcheck input { width: 18px; height: 18px; }
.big2 { font-size: 18px; padding: 10px 26px; }
.credits .cr-badger { width: 220px; display: block; margin: 0 auto 6px; background: #05060c; border-radius: 14px; padding: 10px; }
.menu-chars { position: absolute; left: 0; right: 0; bottom: 6px; height: 130px; pointer-events: none; }
.mchar { position: absolute; bottom: 0; animation: stroll 26s linear infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.mchar .av { animation: bob .5s ease-in-out infinite alternate; }
@keyframes stroll { from { left: 104vw; } to { left: -12vw; } }
@keyframes bob { to { transform: translateY(-5px); } }
.menu-foot { position: absolute; right: 18px; bottom: 14px; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.menu-foot img { width: 44px; border-radius: 10px; background: #05060c; }
@media (max-width: 760px) { .menu-logo { left: 5vw; top: 4vh; } .menu-col, .menu-panel { left: 5vw; } .menu-chars { height: 90px; } }

/* ---------- setup checklist ---------- */
#setup { position: fixed; right: 10px; top: 70px; z-index: 11; width: 300px; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; border: 3px solid var(--sun); }
.su-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .su-head img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.su-head b { font-family: 'Fredoka', sans-serif; font-size: 16px; display: block; } .su-head small { color: var(--ink2); font-weight: 700; font-size: 12px; }
#setup ol { list-style: none; padding: 0; margin: 6px 0 10px; }
#setup li { display: flex; gap: 8px; padding: 5px 4px; border-radius: 10px; font-size: 14px; }
#setup li.done b { color: var(--ink2); text-decoration: line-through; } #setup li.cur { background: #fff6d5; }
#setup li small { display: block; color: var(--ink2); font-weight: 700; font-size: 12px; margin-top: 2px; }
#setup .open { width: 100%; font-size: 16px; padding: 10px; background: #b9c3cf; box-shadow: 0 4px 0 #8995a3; }
#setup .open.ready { background: var(--mint); box-shadow: 0 4px 0 #2f9a74; animation: bootPulse2 1.2s ease-in-out infinite; }
@keyframes bootPulse2 { 50% { transform: scale(1.03); } }
.pulse { position: relative; animation: pulseGlow 1s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 194, 62, .9); } 50% { box-shadow: 0 0 0 6px rgba(246, 194, 62, .35); background: #fff1c2; } }
#rotbtn { position: fixed; left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 12; border: 0; border-radius: 12px; padding: 8px 16px; font-weight: 800; font-size: 15px; background: var(--sea); color: #fff; box-shadow: var(--shadow); }
#rotbtn small { opacity: .7; margin-left: 4px; }
@media (max-width: 760px) { #setup { top: auto; bottom: 90px; left: 8px; right: 8px; width: auto; max-height: 40vh; overflow-y: auto; } }

#dialog.speaking .dlg-portrait { animation: talk .35s ease-in-out infinite alternate; }
@keyframes talk { from { transform: translateY(0) scale(1); } to { transform: translateY(-2px) scale(1.015); } }
