: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; }
#splash.locked .sp-badger { opacity: .16; filter: grayscale(1) brightness(.7); }
.sp-power { display: none; position: absolute; left: 0; right: 0; bottom: 22vh; text-align: center; font-family: 'Tilt Neon', sans-serif; font-size: 22px; letter-spacing: .2em; color: #2fe0ff; text-shadow: 0 0 10px #2fe0ff; animation: pulse 1.6s ease-in-out infinite; }
#splash.locked .sp-power { display: block; } #splash.locked .sp-skip { display: none; }
@keyframes pulse { 50% { opacity: .35; } }
.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: 0; }
.menu-bg .slide { position: absolute; inset: -5%; background: center/cover no-repeat; opacity: 0; transition: opacity 1.6s ease; animation: kenburns 16s ease-in-out infinite alternate; }
.menu-bg .slide.on { opacity: 1; }
.menu-place { position: absolute; right: 18px; bottom: 70px; z-index: 4; color: #fff; text-align: right; text-shadow: 0 2px 8px rgba(0,0,0,.7); transition: opacity .6s; }
.menu-place b { display: block; font: 600 clamp(20px, 2vw, 30px) 'Fredoka', sans-serif; } .menu-place small { font-weight: 800; opacity: .9; }
.menu-place .dots { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; } .menu-place .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45); } .menu-place .dots i.on { background: #ffd34d; }
.menu-news { position: absolute; right: 18px; top: 18px; z-index: 3; border: 0; border-radius: 999px; padding: 9px 16px 9px 9px; background: linear-gradient(90deg, #2a1440, #4b1d5e); color: #fff; font-weight: 800; box-shadow: 0 6px 18px rgba(0,0,0,.35); cursor: pointer; animation: fadeUp .6s ease-out 1s both; }
.menu-news span { background: #ff8a1c; border-radius: 999px; padding: 3px 9px; margin-right: 8px; }
.menu-news:hover { transform: translateY(-2px); }
.menu-steam { position: absolute; right: 18px; top: 66px; z-index: 3; background: rgba(23, 26, 33, .88); color: #fff; border-radius: 14px; padding: 9px 16px; text-align: right; box-shadow: 0 6px 18px rgba(0,0,0,.35); animation: fadeUp .6s ease-out 1.15s both; }
.menu-steam b { display: block; font: 600 16px 'Fredoka', sans-serif; } .menu-steam small { color: #66c0f4; font-weight: 800; }
.menu-steam.link { cursor: pointer; }
@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 { --lw: clamp(280px, 31vw, 470px); position: absolute; left: 5vw; top: 3vh; color: #fff; width: var(--lw); text-align: left; }
.ml-img { position: relative; width: var(--lw); aspect-ratio: 995 / 562; animation: logoDrop .9s cubic-bezier(.2, 1.5, .4, 1) .15s both, logoFloat 4.5s ease-in-out 1.2s infinite; filter: drop-shadow(0 14px 18px rgba(0, 20, 50, .45)); }
.ml-img img { width: 100%; display: block; }
.ml-shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%) no-repeat; background-size: 250% 100%; -webkit-mask: url(assets/brand/logo.webp) center/contain no-repeat; mask: url(assets/brand/logo.webp) center/contain no-repeat; animation: shine 6s ease-in-out 1.4s infinite; mix-blend-mode: overlay; }
@keyframes logoDrop { from { opacity: 0; transform: translateY(-60px) scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes logoFloat { 50% { transform: translateY(-6px) rotate(-.8deg); } }
@keyframes shine { 0% { background-position: 120% 0; } 30%, 100% { background-position: -120% 0; } }
.ml3 { white-space: nowrap; font-weight: 800; margin-top: 6px; font-size: clamp(12px, 1.1vw, 15px); opacity: .95; text-shadow: 0 2px 6px rgba(0,0,0,.6); background: rgba(10, 30, 60, .45); display: inline-block; padding: 5px 14px; border-radius: 999px; animation: fadeUp .6s ease-out .8s both; }
.menu-col, .menu-panel { position: absolute; z-index: 3; left: 5vw; top: calc(3vh + var(--lw, clamp(280px, 31vw, 470px)) * .565 + 52px); display: flex; flex-direction: column; gap: 9px; width: min(380px, 88vw); max-height: calc(100vh - (3vh + var(--lw, 470px) * .565 + 52px) - 16px); overflow-y: auto; overflow-x: visible; padding: 2px 10px 12px 2px; scrollbar-width: none; }
.menu-col::-webkit-scrollbar { display: none; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mbtn.sm { padding: 9px 14px; } .mbtn.sm b { font-size: 18px; } .mbtn.sm small { font-size: 11.5px; display: block; line-height: 1.25; } .mbtn.pk { grid-column: span 2; background: linear-gradient(90deg, #fff4dd, #ffe2c2); }
#menu { --lw: clamp(280px, 31vw, 470px); }
.menu-col .mbtn { animation: fadeUp .5s ease-out .4s backwards; } .menu-col .mbtn:nth-child(2) { animation-delay: .5s; } .menu-col .mbtn:nth-child(3) { animation-delay: .6s; } .menu-col .mbtn:nth-child(4) { animation-delay: .7s; } .menu-col .mbtn:nth-child(5) { animation-delay: .8s; }
.mbtn { text-align: left; border: 0; border-radius: 18px; padding: 11px 18px; cursor: pointer; 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; z-index: 1; left: calc(5vw + 400px); right: 330px; bottom: 6px; height: 120px; pointer-events: none; overflow: hidden; }
.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: 100%; } to { left: -140px; } }
@keyframes bob { to { transform: translateY(-5px); } }
.menu-foot { position: absolute; z-index: 4; 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, .menu-logo { --lw: min(80vw, 340px); } .menu-logo { left: 5vw; top: 2vh; } .menu-col, .menu-panel { left: 5vw; } .menu-chars { display: none; } .menu-news, .menu-steam, .menu-place { display: none; } }
@media (max-height: 820px) and (min-width: 761px) { #menu, .menu-logo { --lw: clamp(240px, 24vw, 380px); } .mbtn b { font-size: 19px; } .mbtn { padding: 8px 16px; } }

/* ---------- 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); } }

/* ---------- v0.6: level select, promotion, rival, research, guests ---------- */
.ltabs { display: flex; gap: 6px; padding: 10px 12px 0; background: var(--paper); flex-wrap: wrap; }
.ltab { border: 0; border-radius: 12px 12px 0 0; padding: 8px 14px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 15px; background: #e9e1cf; color: var(--ink2); cursor: pointer; }
.ltab.on { background: #ffd34d; color: var(--ink); box-shadow: 0 -2px 0 #e0a800 inset; }
.ltab.locked { opacity: .6; }
.mp-card > img.dim { filter: grayscale(.85) brightness(.75); }
.mp-body h2 small { font-size: 13px; color: var(--ink2); font-family: 'Nunito', sans-serif; font-weight: 800; margin-left: 6px; }
.lockmsg { background: #fff0d6; border-radius: 10px; padding: 8px 12px; font-weight: 800; color: #9a5a00; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.rivalhead { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .rivalhead img { width: 54px; height: 54px; border-radius: 12px; background: #e6dcff; }
.rivalhead h3 { margin: 0; }
.win.promo { text-align: left; }
.promo-top { display: flex; gap: 18px; align-items: center; }
.promo-mayor { width: 150px; height: 150px; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: mayorIn .7s cubic-bezier(.2,1.4,.4,1) both; flex: none; }
@keyframes mayorIn { from { transform: translateX(-40px) rotate(-8deg) scale(.7); opacity: 0; } }
.promo .trophy { font-size: 46px; animation: bob .6s ease-in-out infinite alternate; display: inline-block; }
.wstats { display: grid; gap: 6px; margin: 12px 0; } .wstat { display: flex; justify-content: space-between; background: #e8f8ef; border-radius: 10px; padding: 7px 12px; font-weight: 700; }
.offer { display: flex; gap: 12px; background: #fff6dc; border: 2px dashed #e0a800; border-radius: 14px; padding: 10px; align-items: center; margin: 10px 0; }
.offer img { width: 150px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; } .offer h3 { margin: 0 0 4px; }
.confetti-rain { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti-rain i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall 4.5s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.reslist { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.rescard { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.rescard.done { background: #e8f8ef; } .rescard.act { background: #fff6dc; }
.rescard .ri { font-size: 28px; width: 36px; text-align: center; } .rescard .rd { flex: 1; display: flex; flex-direction: column; } .rescard .rd span { font-size: 13px; color: var(--ink2); }
.resact { background: #fff6dc; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-weight: 700; }
.ths { display: flex; flex-wrap: wrap; gap: 6px; } .th { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 20px; } .th small { font-size: 12px; font-weight: 800; margin-left: 4px; color: var(--ink2); }
.goal small.fix { margin-left: 8px; color: var(--ink2); font-weight: 700; font-size: 12px; }
@media (max-width: 640px) { .promo-top { flex-direction: column; text-align: center; } .offer { flex-direction: column; } }
.roster { display: grid; gap: 6px; max-height: 34vh; overflow: auto; }
.rrow { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 4px 8px; }
.rrow b { min-width: 120px; } .rrow span { flex: 1; font-size: 13px; color: var(--ink2); } .rrow .btn { padding: 4px 10px; font-size: 13px; }
#hudtip { position: fixed; z-index: 95; width: 320px; background: var(--paper); border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.28); font-size: 14px; pointer-events: none; animation: fadeUp .15s ease-out; }
#hudtip h4 { margin: 0 0 4px; font-family: 'Fredoka', sans-serif; font-size: 16px; }
#hudtip p { margin: 4px 0; } #hudtip .sub { color: var(--ink2); font-size: 13px; } #hudtip .warn { color: var(--bad); font-weight: 800; } #hudtip .ok { color: #1d7a4a; font-weight: 800; }
#hudtip .bar { height: 7px; margin: 3px 0 6px; }
#top [data-tip] { cursor: help; }
.board { background: #12223a; color: #ffd34d; border-radius: 14px; padding: 12px 14px; font-family: 'Courier New', monospace; }
.board h2 { color: #fff; font-family: 'Fredoka', sans-serif; margin: 0 0 4px; } .board .sub { color: #9fb3d1; font-family: 'Nunito', sans-serif; }
.board.small { padding: 8px 12px; }
.brow { display: grid; grid-template-columns: 90px 1fr 90px 110px; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,.12); font-size: 14px; }
.brow.past { opacity: .5; } .brow .cx { color: #ff6b6b; } .brow .ok { color: #8ff0c4; } .brow .due { color: #fff; animation: pulse 1s infinite; } .brow .bs { text-align: right; }
.slots { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 52vh; overflow-y: auto; }
.slot { display: grid; grid-template-columns: 70px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 2px solid #e3d9c4; text-align: left; font: inherit; cursor: pointer; color: #2a3a4a; }
div.slot { cursor: default; } button.slot:hover { border-color: #ffb627; transform: translateY(-1px); }
.slot b { font-family: 'Fredoka', sans-serif; } .slot small { color: #8a8a8a; font-size: 12px; }
.slot.empty { opacity: .6; border-style: dashed; background: #faf6ee; }
.sbtns { display: flex; gap: 6px; } .sbtns .btn { padding: 6px 12px; }
.mp-card.career { width: min(980px, 96vw); }
.career .cgrid { display: grid; grid-template-columns: 320px 1fr; gap: 0; }
.career .cgrid img { width: 100%; height: 190px; object-fit: cover; display: block; } .career .cgrid img.dim { filter: grayscale(.8) brightness(.7); }
.mlist { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #f4ecdc; max-height: 70vh; overflow-y: auto; }
.mrow { display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 2px solid transparent; background: #fff; text-align: left; font: inherit; cursor: pointer; color: #2a3a4a; }
.mrow:hover { border-color: #ffd27a; } .mrow.on { border-color: #ffb627; background: #fff7e3; }
.mrow.locked { opacity: .5; } .mn { width: 26px; height: 26px; border-radius: 50%; background: #2f6fb0; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.mt { display: flex; flex-direction: column; } .mt small { color: #8a7a60; font-size: 12px; } .mm { text-align: center; font-size: 18px; }
@media (max-width: 700px) { .career .cgrid { grid-template-columns: 1fr; } .mlist { max-height: 30vh; } .slot { grid-template-columns: 1fr; } }
.menu-panel { z-index: 5; max-height: calc(100vh - (3vh + var(--lw, clamp(280px, 31vw, 470px)) * .565 + 52px) - 14px); overflow-y: auto; border-radius: 22px; }
#menu-panel:not(.hidden) ~ .menu-chars, #menu-panel:not(.hidden) + .menu-chars { opacity: .25; pointer-events: none; }
.menu-panel:has(.career) { width: min(980px, 92vw); }
.career .cgrid img { height: 140px; }
.career .mlist { max-height: calc(100vh - (3vh + var(--lw, clamp(280px, 31vw, 470px)) * .565 + 52px) - 30px); }
.menu-panel:has(.slots) { width: min(640px, 92vw); }
.mhdr { font-family: 'Fredoka', sans-serif; font-weight: 600; margin: 8px 4px 2px; color: #8a5a00; font-size: 14px; }
.pack { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 2px solid #e3d9c4; margin: 8px 0; }
.pack.on { border-color: #8ff0c4; background: #f2fff8; } .pack p { margin: 4px 0 0; font-size: 13px; color: #55606b; }
.pk-ic { font-size: 34px; text-align: center; } .pk-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #eee; margin-left: 6px; } .pk-tag.ok { background: #c8f7df; } .pk-tag.soon { background: #ffe6a8; }
.pk-key { flex: 1; min-width: 180px; padding: 9px 12px; border-radius: 10px; border: 2px solid #d9cdb4; font: 700 15px 'Courier New', monospace; text-transform: uppercase; }
.ratings { display: grid; grid-template-columns: 90px 1fr 40px; gap: 4px 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.ratings i { display: block; height: 8px; border-radius: 4px; background: #eee; overflow: hidden; } .ratings i s { display: block; height: 100%; }
.hillbtns { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; } .hillbtns .btn { padding: 4px 9px; font-size: 12px; } .hillbtns .btn.on { background: #ffb627; color: #fff; }
.menu-panel { position: absolute; } .mp-x { position: sticky; top: 8px; float: right; margin: 8px 8px -44px 0; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(20,30,50,.75); color: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.mp-x:hover { background: #e2543f; }
.pack { grid-template-columns: 40px 1fr; padding: 8px 10px; margin: 6px 0; } .pack p { font-size: 12.5px; } .pk-ic { font-size: 28px; }
#soundpop { position: fixed; z-index: 60; width: 210px; background: var(--paper, #fffaf0); border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
#soundpop label { display: flex; gap: 8px; align-items: center; cursor: pointer; } #soundpop input { width: 18px; height: 18px; } #soundpop .btn { margin-top: 4px; }
.pieces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 6px 0; }
.piece { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 4px; border-radius: 10px; border: 2px solid #e3d9c4; background: #fff; font-size: 20px; cursor: pointer; transition: transform .08s; }
.piece small { font-size: 10px; font-weight: 800; color: #4a5560; line-height: 1.1; text-align: center; }
.piece:hover { border-color: #ffb627; transform: translateY(-1px); background: #fff7e3; } .piece.no { opacity: .38; filter: grayscale(.7); }
.credits .cr-tag { text-align: center; margin: -4px 0 10px; color: #6a7480; } .credits h2 { text-align: center; }
.cr-note { background: #fff; border-radius: 14px; padding: 12px 16px; border-left: 5px solid #ffb627; margin: 8px 0 14px; } .cr-note h3 { margin: 0 0 6px; font-family: 'Fredoka', sans-serif; } .cr-note p { margin: 6px 0; line-height: 1.45; font-size: 14px; } .cr-sign { font-style: italic; text-align: right; color: #6a5a40; }
.credits h3 { font-family: 'Fredoka', sans-serif; margin: 12px 0 6px; }
.cr-grid { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 4px 12px; font-size: 13.5px; } .cr-grid span { color: #6a7480; text-align: right; } .cr-grid b { font-weight: 700; }
.cr-legal { font-size: 11.5px; color: #8a8f96; margin-top: 14px; line-height: 1.4; }
#cine { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
#cine .cb { position: absolute; left: 0; right: 0; height: 11vh; background: #000; transition: transform .6s; } #cine .cb.top { top: 0; } #cine .cb.bot { bottom: 0; }
#cine.ride .cb { height: 6vh; }
#cine .ct { position: absolute; left: 0; right: 0; bottom: 14vh; text-align: center; color: #fff; text-shadow: 0 3px 14px rgba(0,0,0,.8); transition: opacity 1.2s; }
#cine .ct b { display: block; font: 600 clamp(26px, 4vw, 52px) 'Fredoka', sans-serif; letter-spacing: .5px; } #cine .ct small { font-size: clamp(14px, 1.6vw, 20px); font-weight: 700; }
#cine .ct.fade { opacity: 0; } #cine .cx { pointer-events: auto; position: absolute; right: 18px; top: calc(11vh + 12px); border: 0; border-radius: 999px; padding: 8px 16px; background: rgba(255,255,255,.85); font-weight: 800; cursor: pointer; }
#cine.ride .cx { top: calc(6vh + 12px); }
#cine .rideui { position: absolute; left: 18px; bottom: calc(6vh + 14px); color: #fff; font: 700 28px 'Fredoka', sans-serif; text-shadow: 0 2px 8px #000; }
body.cine-on #top, body.cine-on #tools, body.cine-on #minimap, body.cine-on #info, body.cine-on #eventbar, body.cine-on #toasts, body.cine-on #flyout, body.cine-on #bubbles, body.cine-on #labels, body.cine-on #tooltip { display: none !important; }
#cine.walk .cb { height: 0; } #cine.walk .cx { top: 14px; }
#cine.walk .ct { bottom: auto; top: 18px; } #cine.walk .ct b { font-size: clamp(20px, 2.6vw, 34px); }
#cine.walk::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255,255,255,.7); box-shadow: 0 0 4px #000; }
#cine .walkpad { position: absolute; left: 18px; bottom: 18px; display: grid; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 54px); gap: 6px; pointer-events: auto; }
#cine .walkpad button { border: 0; border-radius: 14px; background: rgba(255,255,255,.75); font-size: 22px; touch-action: none; }
#cine .walkpad [data-k=w] { grid-column: 2; grid-row: 1; } #cine .walkpad [data-k=a] { grid-column: 1; grid-row: 2; } #cine .walkpad [data-k=s] { grid-column: 2; grid-row: 2; } #cine .walkpad [data-k=d] { grid-column: 3; grid-row: 2; }
@media (hover: hover) and (pointer: fine) { #cine .walkpad { display: none; } }
body.cine-walk #dialog, body.cine-walk #advisor { display: none !important; }
body.trailer #top, body.trailer #tools, body.trailer #minimap, body.trailer #info, body.trailer #eventbar, body.trailer #toasts, body.trailer #flyout, body.trailer #tooltip, body.trailer #dialog, body.trailer #advisor, body.trailer #labels, body.trailer #modal, body.trailer #hint, body.trailer #bubbles { display: none !important; }
body.trailerui #modal, body.trailerui #hint, body.trailerui #toasts { display: none !important; }
body.cine-on #hint { display: none !important; }
.pk-h { font: 600 16px 'Fredoka', sans-serif; margin: 12px 0 6px; color: var(--ink2); }
body.trailer.showbub #bubbles { display: block !important; }

body.cine-on .cashpop { display: none; }

.bcard .seas { margin:6px 0 2px; padding:5px 10px; border-radius:10px; font-size:12.5px; font-weight:800; display:inline-block; }
.bcard .seas.halloween { background:#2a1606; color:#ffb35c; border:1px solid #ff8a1c; }
.bcard .seas.christmas { background:#0e2a17; color:#ffe9a8; border:1px solid #d6372b; }

.menu-acct { position:absolute; top:132px; right:18px; z-index:3; display:flex; align-items:center; gap:8px; padding:7px 14px 7px 10px; border-radius:99px; background:rgba(10,14,34,.72); color:#fff; font-weight:800; font-size:14px; text-decoration:none; backdrop-filter:blur(6px); border:1px solid rgba(255,255,255,.18); }
.menu-acct:hover { background:rgba(20,26,60,.9); }
.menu-acct img { width:26px; height:26px; border-radius:50%; }
.menu-acct i { font-style:normal; font-size:12px; }

#live-pill { position:fixed; top:64px; left:50%; transform:translateX(-50%); z-index:60; display:flex; align-items:center; gap:10px; padding:8px 10px 8px 16px; border-radius:99px; background:rgba(12,14,30,.92); color:#fff; font-weight:700; font-size:14px; box-shadow:0 8px 24px rgba(0,0,0,.35); }
#live-pill[hidden] { display:none; }
#live-pill.on { background:#c41e3f; }
#live-pill.warn { background:#3a2a06; }
#live-pill .dot { width:10px; height:10px; border-radius:50%; background:#fff; animation:livepulse 1.2s ease-in-out infinite; }
#live-pill button, #live-pill a { font:inherit; font-size:13px; font-weight:800; border:0; border-radius:99px; padding:6px 12px; background:rgba(255,255,255,.18); color:#fff; cursor:pointer; text-decoration:none; }
#live-pill a { background:#9146ff; }
@keyframes livepulse { 50% { opacity:.25; } }

a.brand { color:inherit; text-decoration:none; cursor:pointer; } a.brand:hover b { text-decoration:underline; text-underline-offset:3px; }
