:root {
  --bg: #0b1410; --panel: #12201a; --panel2: #182b22; --line: #2a4436;
  --text: #eef5f0; --muted: #8fa89a; --accent: #ffd23f; --accent2: #3ee08f; --nitro: #ffb13b;
  --danger: #ff5a5f; --blue: #58a6ff; --purple: #c86bff;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #hud .sheet, #hud .card-e, #hud .tip, #hud .pickbar { pointer-events: auto; }
.box { background: rgba(8, 14, 11, .88); border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 6px 20px #0008; }
.trips { position: absolute; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); padding: 5px 11px 7px; min-width: 104px; }
.trips b { display: block; font-size: 24px; font-weight: 900; font-style: italic; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.trips small { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-size: 10px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.trips small i { font-style: italic; color: var(--accent2); letter-spacing: 0; font-size: 12px; }
.clock { position: absolute; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); padding: 4px 10px 6px; text-align: center; white-space: nowrap; }
.clock > b { display: block; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.spd { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.spd button { font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 6px; background: #ffffff12; color: var(--muted); }
.spd button.on { background: var(--accent); color: #1d1600; }
.menu-b { position: absolute; top: calc(12px + var(--sat)); right: calc(12px + var(--sar)); width: 40px; height: 40px; border-radius: 10px; border: 1px solid #ffffff2a;
  background: rgba(8, 14, 11, .88); font-weight: 900; display: grid; place-items: center; font-size: 18px; }
.meter { position: absolute; top: calc(64px + var(--sat)); left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); max-width: 420px; margin: 0 auto; padding: 4px 10px 6px; }
.meter .t { display: flex; justify-content: space-between; font-size: 9.5px; font-weight: 900; letter-spacing: .14em; color: var(--muted); }
.meter .t b { color: var(--accent2); } .meter .t b.warn { color: var(--nitro); } .meter .t b.bad { color: var(--danger); }
.meter .bar { height: 8px; border-radius: 5px; background: #ffffff14; margin-top: 3px; overflow: hidden; }
.meter .bar div { height: 100%; width: 100%; border-radius: 5px; background: linear-gradient(90deg, #ff5a5f, #ffd23f 45%, #3ee08f); background-size: 400px 100%; transition: width .4s; }
.meter .sub { display: flex; gap: 10px; margin-top: 4px; font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; }
.meter .sub em { font-style: normal; color: var(--text); }
.meter .stars { margin-left: auto; color: #ffffff30; letter-spacing: .06em; }
.meter .stars em { font-style: normal; color: var(--accent); }
.feed { position: absolute; top: calc(118px + var(--sat)); left: calc(10px + var(--sal)); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 70vw; }
.feed div { background: rgba(8, 14, 11, .9); border: 1px solid #ffffff1c; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; animation: fin .2s ease-out; }
.feed .good { color: var(--accent2); } .feed .bad { color: #ff8a8d; } .feed .warn { color: var(--nitro); } .feed .new { color: var(--accent); }
@keyframes fin { from { opacity: 0; transform: translateY(-4px); } }
.tip { position: absolute; left: 50%; transform: translateX(-50%); top: calc(118px + var(--sat)); background: rgba(8, 14, 11, .95);
  border: 1px solid #ffffff22; border-left: 4px solid var(--accent); padding: 8px 10px 8px 12px; border-radius: 10px; font-size: 13px;
  width: max-content; max-width: min(92vw, 440px); line-height: 1.35; animation: fin .25s ease-out; display: flex; gap: 10px; align-items: center; }
.tip b { color: var(--accent); }
.pickbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(118px + var(--sat)); background: var(--purple); color: #160022; font-weight: 900;
  padding: 8px 10px 8px 14px; border-radius: 12px; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 24px #0009; white-space: nowrap; }
.pickbar .chip { background: #160022; color: #fff; }

/* tool dock */
.dock { position: absolute; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(10px + var(--sab)); display: flex; gap: 6px; justify-content: center; }
.tool { flex: 1; max-width: 66px; min-width: 0; height: 60px; border-radius: 14px; background: rgba(8, 14, 11, .92); border: 1px solid #ffffff22; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; position: relative; box-shadow: 0 6px 16px #0008; color: var(--text); }
.tool svg { width: 25px; height: 25px; }
.tool span { font-size: 8.5px; font-weight: 900; letter-spacing: .05em; color: var(--muted); }
.tool.on { background: var(--accent); border-color: var(--accent); color: #1d1600; }
.tool.on span { color: #1d1600; }
.tool .n { position: absolute; top: -7px; right: -5px; min-width: 22px; height: 20px; border-radius: 10px; background: #0b1410; border: 2px solid var(--accent2);
  font-size: 11px; font-weight: 900; font-style: italic; display: grid; place-items: center; padding: 0 4px; color: var(--accent2); }
.tool .n.z { border-color: #ffffff33; color: var(--muted); }
.subtools { position: absolute; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); bottom: calc(80px + var(--sab)); display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; pointer-events: none; }
.subtools > * { pointer-events: auto; }
.chip { background: rgba(8, 14, 11, .92); border: 1px solid #ffffff2a; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 800; white-space: nowrap; color: var(--text); }
.chip.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip .c { font-style: normal; color: var(--accent2); margin-left: 4px; }
.chip.dis { opacity: .45; }

/* event cards */
.cards { position: absolute; left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); bottom: calc(118px + var(--sab)); display: flex; flex-direction: column-reverse; gap: 6px; align-items: center; pointer-events: none; }
.card-e { width: 100%; max-width: 440px; background: rgba(8, 14, 11, .95); border: 1px solid #ffffff26; border-left: 5px solid var(--danger); border-radius: 14px; padding: 8px 10px 9px; box-shadow: 0 10px 30px #000b; animation: fin .25s ease-out; }
.card-e.y { border-left-color: var(--nitro); } .card-e.b { border-left-color: var(--blue); } .card-e.p { border-left-color: var(--purple); } .card-e.g { border-left-color: var(--accent2); }
.card-e .tp { display: flex; align-items: center; gap: 8px; }
.card-e .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; flex: none; background: #ffffff12; }
.card-e .tt { flex: 1; min-width: 0; }
.card-e .tt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-e .tt small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-e .loc { font-size: 15px; width: 30px; height: 30px; border-radius: 9px; background: #ffffff12; display: grid; place-items: center; }
.card-e .facts { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.card-e .facts span { font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 7px; background: #ffffff10; }
.card-e .facts span b { color: var(--accent); }
.card-e .row { display: flex; gap: 6px; margin-top: 7px; }
.card-e.min .facts, .card-e.min .row { display: none; }
.card-e.min { padding: 5px 8px; }
.card-e.min .ic, .card-e.min .loc { width: 26px; height: 26px; font-size: 14px; }
.card-e .tt { cursor: pointer; }
.btn { flex: 1; text-align: center; border-radius: 12px; padding: 9px 6px; font-size: 12.5px; font-weight: 900; font-style: italic; text-transform: uppercase;
  background: rgba(24, 43, 34, .98); border: 1px solid #ffffff26; color: var(--text); }
.btn small { display: block; font-size: 9px; font-style: normal; opacity: .8; letter-spacing: .03em; margin-top: 1px; text-transform: none; font-weight: 800; }
.btn.go { background: var(--accent); color: #1d1600; border-color: var(--accent); }
.btn.g { background: var(--accent2); color: #00210f; border-color: var(--accent2); }
.btn.r { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.dis, .btn:disabled { opacity: .45; }
.btn.ghost { background: transparent; }
.banner { position: absolute; top: 24%; left: 50%; transform: translateX(-50%) rotate(-3deg); font-size: 32px; font-weight: 900; font-style: italic; letter-spacing: .04em;
  padding: 5px 18px; border-radius: 12px; white-space: nowrap; box-shadow: 0 10px 30px #0008; pointer-events: none; animation: pop .4s ease-out; }
@keyframes pop { from { transform: translateX(-50%) rotate(-3deg) scale(.5); opacity: 0; } }

/* bottom sheet: junction and lane editors */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 58%; overflow-y: auto; background: linear-gradient(#12201af7, #0b1410fb); border-top: 1px solid #ffffff22;
  border-radius: 18px 18px 0 0; padding: 8px 12px calc(12px + var(--sab)); box-shadow: 0 -10px 30px #000a; touch-action: pan-y; }
.sheet .grab { width: 42px; height: 4px; border-radius: 2px; background: #ffffff33; margin: 0 auto 8px; }
.sheet .hd { display: flex; align-items: center; gap: 8px; }
.sheet .hd .tt { flex: 1; min-width: 0; }
.sheet .hd .tt b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .hd .tt small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.sheet .x { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ffffff2a; background: #ffffff0a; font-size: 16px; flex: none; }
.grade { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 900; font-style: italic; background: var(--accent); color: #1d1600; flex: none; line-height: 1; }
.grade small { font-size: 7px; display: block; letter-spacing: .1em; }
.grade.A, .grade.B { background: var(--accent2); color: #00210f; } .grade.E, .grade.F { background: var(--danger); color: #fff; } .grade.D { background: var(--nitro); }
.tabs { display: flex; gap: 4px; margin: 9px 0 7px; background: #ffffff0d; padding: 3px; border-radius: 10px; }
.tabs button { flex: 1; text-align: center; font-size: 10.5px; font-weight: 900; letter-spacing: .05em; padding: 6px 0; border-radius: 8px; color: var(--muted); }
.tabs button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px #ffffff22; }
.lbl { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--muted); margin: 8px 0 5px; display: flex; justify-content: space-between; gap: 8px; }
.lbl b { color: var(--accent); letter-spacing: .04em; }
.modes { display: flex; gap: 5px; flex-wrap: wrap; }
.modes button { font-size: 11.5px; font-weight: 800; padding: 6px 9px; border-radius: 8px; background: #ffffff0f; border: 1px solid #ffffff1a; color: var(--text); }
.modes button.on { background: #3ee08f22; border-color: var(--accent2); color: var(--accent2); }
.modes button.dis { opacity: .45; }
.modes button i { font-style: normal; color: var(--accent); margin-left: 3px; }
.timeline { position: relative; height: 34px; border-radius: 9px; background: #ffffff0a; border: 1px solid #ffffff14; overflow: hidden; }
.timeline .ph { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 6px; font-size: 10px; font-weight: 900; border-right: 1px solid #0b1410; white-space: nowrap; overflow: hidden; }
.timeline .amb { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, #ffd23f 0 3px, #ff5a5f 3px 6px); opacity: .8; }
.timeline .cur { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff; box-shadow: 0 0 8px #fff; border-radius: 2px; }
.phases { display: flex; flex-direction: column; gap: 6px; }
.phase { background: #ffffff0a; border: 1px solid #ffffff14; border-radius: 10px; padding: 6px 7px; }
.phase.live { border-color: var(--accent2); }
.phase .ph-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; }
.phase .ph-h .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.phase .ph-h .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step { display: inline-flex; align-items: center; gap: 2px; background: #ffffff10; border-radius: 8px; }
.step button { width: 28px; height: 26px; font-weight: 900; font-size: 15px; }
.step b { min-width: 34px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.ph-moves { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mv { display: flex; align-items: center; gap: 2px; background: #00000030; border-radius: 8px; padding: 2px 4px; }
.mv .sd { font-size: 9px; font-weight: 900; color: var(--muted); width: 12px; text-align: center; }
.mv button { width: 25px; height: 24px; border-radius: 6px; font-size: 13px; font-weight: 900; color: #ffffff55; background: #ffffff08; }
.mv button.P { background: var(--accent2); color: #00210f; }
.mv button.p { background: #3ee08f33; color: var(--accent2); box-shadow: inset 0 0 0 1px var(--accent2); }
.appr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ap { background: #ffffff0a; border: 1px solid #ffffff16; border-radius: 10px; padding: 6px 4px; text-align: center; }
.ap .nm { font-size: 9.5px; font-weight: 900; letter-spacing: .06em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap .ln { display: flex; gap: 3px; justify-content: center; margin: 5px 0 4px; flex-wrap: wrap; }
.ap .ln button { min-width: 24px; height: 28px; padding: 0 3px; border-radius: 6px; background: #3a3f46; font-size: 12px; font-weight: 900; color: #fff; border: 1px solid #ffffff22; }
.ap .ln button.cus { background: var(--accent); color: #1d1600; }
.ap .ln button.bus { background: #c0392b; }
.ap .q { font-size: 10px; font-weight: 800; }
.ap .q b { font-size: 13px; font-style: italic; }
.ap.none { opacity: .35; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.st { background: #ffffff0a; border-radius: 10px; padding: 6px 7px; }
.st small { display: block; font-size: 8.5px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.st b { font-size: 15px; font-style: italic; font-variant-numeric: tabular-nums; }
.st b.g { color: var(--accent2); } .st b.y { color: var(--accent); } .st b.r { color: #ff8a8d; }
.row { display: flex; gap: 6px; margin-top: 9px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opt { display: flex; justify-content: space-between; align-items: center; background: #ffffff0a; border-radius: 10px; padding: 7px 9px; font-size: 12px; font-weight: 800; gap: 6px; text-align: left; color: var(--text); }
.tog { width: 34px; height: 20px; border-radius: 10px; background: #ffffff22; position: relative; flex: none; }
.tog:after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.tog.on { background: var(--accent2); } .tog.on:after { left: 16px; }
.lanes-d { display: flex; gap: 4px; justify-content: center; align-items: stretch; background: #3a3f46; border-radius: 10px; padding: 18px 10px 8px; position: relative; flex-wrap: nowrap; }
.lanes-d .l { width: 44px; border-radius: 6px; background: #ffffff0c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 0; border: 1px dashed #ffffff33; font-size: 9px; font-weight: 900; color: #ffffffcc; }
.lanes-d .l .a { font-size: 17px; line-height: 1; }
.lanes-d .l.bus { background: #c0392b66; }
.lanes-d .l.cus { border: 2px solid var(--accent); }
.lanes-d .med { width: 6px; background: repeating-linear-gradient(#ffcf3f 0 6px, transparent 6px 10px); border-radius: 3px; }
.lanes-d .dirn { position: absolute; top: 3px; font-size: 9px; font-weight: 900; color: #ffffff99; }
.note { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 6px; }
.note b { color: var(--text); }

/* desktop: tools down the left, the editor as a side panel */
body.desk .dock { flex-direction: column; left: 10px; right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
body.desk .tool { width: 62px; max-width: none; flex: none; }
body.desk .subtools { left: 84px; right: auto; bottom: auto; top: 50%; transform: translateY(-50%); flex-direction: column; align-items: flex-start; }
body.desk .sheet { left: auto; right: 10px; top: calc(10px + var(--sat)); bottom: 10px; width: 360px; max-height: none; border-radius: 16px; border: 1px solid #ffffff22; }
body.desk .sheet .grab { display: none; }
body.desk .cards { left: auto; right: 10px; bottom: 10px; width: 380px; align-items: stretch; }
body.desk.sheet-open .cards { right: 380px; }
body.desk.sheet-open .menu-b { right: 380px; }
body.desk .keys { display: flex; }
body.desk .meter { left: 150px; right: auto; width: 320px; margin: 0; top: calc(10px + var(--sat)); }
body.desk .clock { left: auto; right: 64px; transform: none; }
body.desk.sheet-open .clock { right: 432px; }
body.desk .feed { top: 76px; left: 84px; }
body.desk .tip, body.desk .pickbar { top: 76px; }
.keys { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: none; gap: 10px; font-size: 11px; color: var(--muted); font-weight: 700;
  background: rgba(8, 14, 11, .85); border: 1px solid #ffffff1c; border-radius: 10px; padding: 6px 10px; white-space: nowrap; }
.keys b { color: var(--text); background: #ffffff14; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
body.desk.sheet-open .keys { display: none; }

/* phone landscape: short screen, tools down the side */
@media (orientation: landscape) and (max-height: 500px) {
  body:not(.desk) .dock { flex-direction: column; left: calc(8px + var(--sal)); right: auto; top: 54px; bottom: 8px; justify-content: center; }
  body:not(.desk) .tool { height: 46px; width: 56px; max-width: none; flex: none; }
  body:not(.desk) .tool svg { width: 20px; height: 20px; }
  body:not(.desk) .subtools { left: 74px; right: auto; bottom: 8px; justify-content: flex-start; }
  body:not(.desk) .meter { left: auto; right: 60px; width: 260px; top: calc(8px + var(--sat)); margin: 0; }
  body:not(.desk) .meter .sub { display: none; }
  body:not(.desk) .clock { left: 40%; }
  body:not(.desk) .sheet { left: auto; top: 6px; bottom: 6px; width: 340px; max-height: none; border-radius: 14px; right: 6px; }
  body:not(.desk) .cards { left: auto; right: 10px; width: 330px; bottom: 8px; }
  body:not(.desk) .feed { left: 74px; top: 62px; }
}

/* ------------------------------------------------------------ screens */
.screen { position: fixed; inset: 0; overflow-y: auto; background: radial-gradient(ellipse at 50% 0%, #1d3a2c 0%, var(--bg) 70%); touch-action: pan-y; }
.wrap { max-width: 460px; margin: 0 auto; padding: calc(22px + var(--sat)) 14px calc(24px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo { text-align: center; margin-bottom: 4px; }
.logo .t1 { font-size: 54px; line-height: .9; color: var(--accent); text-shadow: 0 4px 0 #8a6a00, 0 10px 30px #000a; }
.logo .t2 { font-size: 30px; line-height: 1; color: #fff; letter-spacing: .12em; text-shadow: 0 3px 0 #0008; }
.logo .sub { font-size: 10px; font-weight: 900; letter-spacing: .3em; color: var(--muted); margin-top: 6px; }
.card { width: 100%; background: rgba(18, 32, 26, .94); border: 1px solid #ffffff1f; border-radius: 16px; padding: 10px 12px; }
.cities { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; touch-action: pan-x; }
.city { flex: none; width: 124px; border-radius: 12px; background: #ffffff0a; border: 2px solid #ffffff16; padding: 6px; position: relative; text-align: left; scroll-snap-align: start; color: var(--text); }
.city.sel { border-color: var(--accent); }
.city canvas { width: 100%; height: 84px; border-radius: 8px; display: block; background: #4c7f3f; }
.city b { display: block; font-size: 12px; margin-top: 5px; }
.city small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.city .stars { position: absolute; top: 9px; right: 10px; font-size: 11px; color: var(--accent); text-shadow: 0 1px 3px #000; }
.city.lock canvas { filter: grayscale(1) brightness(.5); }
.city.lock b::after { content: " 🔒"; }
.seg { display: flex; gap: 4px; background: #ffffff0d; padding: 3px; border-radius: 10px; }
.seg button { flex: 1; text-align: center; font-size: 13px; padding: 8px 0; border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--accent); color: #1d1600; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.35; }
.evs { display: flex; gap: 5px; flex-wrap: wrap; }
.evs button { font-size: 12px; font-weight: 800; padding: 6px 9px; border-radius: 9px; background: #ffffff0f; border: 1px solid #ffffff1a; color: var(--muted); }
.evs button.on { background: #3ee08f22; border-color: var(--accent2); color: var(--accent2); }
.evs.locked button { pointer-events: none; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.set { background: #ffffff0d; border-radius: 10px; padding: 8px 10px; font-size: 12px; font-weight: 800; display: flex; justify-content: space-between; color: var(--text); }
.set b { color: var(--accent); }
.how ul { padding-left: 16px; font-size: 12.5px; line-height: 1.45; color: #d8e4dc; display: flex; flex-direction: column; gap: 5px; }
.how summary { cursor: pointer; margin: 0; }
.how b { color: var(--accent); }
.go { width: 100%; background: var(--accent); color: #1d1600; border-radius: 16px; padding: 13px; text-align: center; font-size: 19px; box-shadow: 0 7px 0 #8a6a00, 0 14px 30px #0008; margin-top: 4px; }
.go:active { transform: translateY(3px); box-shadow: 0 4px 0 #8a6a00; }
#btn-continue { background: var(--accent2); box-shadow: 0 7px 0 #137a46, 0 14px 30px #0008; }
.foot { font-size: 11px; color: var(--muted); text-align: center; }
.ggs-foot { text-align: center; font-size: 11px; margin-top: 8px; }
.ggs-foot a { color: var(--muted); text-underline-offset: 2px; }

/* overlays */
.overlay { position: fixed; inset: 0; background: #0b1410c4; backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.panel { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid #ffffff22; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ptitle { font-size: 28px; text-align: center; color: var(--accent); }
.pmap { font-size: 12px; color: var(--muted); text-align: center; }
.panel .btn { padding: 11px; font-size: 14px; }
.panel .go { font-size: 17px; padding: 11px; }
.weekp { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.weekp .wk { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: var(--muted); text-align: center; }
.weekp h2 { font-size: 34px; }
.weekp h2 em { color: var(--accent); }
.wstats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.kits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.kit { background: var(--panel); border: 2px solid #ffffff22; border-radius: 16px; padding: 10px 8px; text-align: center; color: var(--text); }
.kit:hover, .kit:focus { border-color: var(--accent); }
.kit .art { height: 70px; border-radius: 10px; background: #3a3f46; margin-bottom: 7px; overflow: hidden; display: grid; place-items: center; font-size: 34px; }
.kit b { display: block; font-size: 13px; }
.kit small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 3px; line-height: 1.3; }
@media (max-width: 400px) { .kits { grid-template-columns: 1fr; } .kit { display: flex; gap: 10px; align-items: center; text-align: left; } .kit .art { width: 64px; height: 56px; flex: none; margin: 0; } }
.notice { width: 100%; max-width: 460px; background: #f3efe4; color: #20262b; border-radius: 16px; padding: 12px 14px 13px; box-shadow: 0 14px 40px #000c; border-top: 8px solid #ff9b2f; }
.notice .from { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 900; letter-spacing: .12em; color: #7a6a4a; }
.notice .from i { font-style: normal; width: 26px; height: 26px; border-radius: 7px; background: #ff9b2f; display: grid; place-items: center; color: #fff; font-size: 15px; }
.notice h3 { font-size: 19px; font-weight: 900; font-style: italic; text-transform: uppercase; margin: 6px 0 2px; color: #1a1f24; }
.notice .when { font-size: 12px; font-weight: 800; color: #a2561a; }
.notice p { font-size: 12.5px; line-height: 1.4; margin-top: 6px; color: #3a4148; }
.notice .o { display: flex; gap: 9px; align-items: center; border: 2px solid #20262b1c; border-radius: 12px; padding: 7px 9px; background: #fff; width: 100%; text-align: left; margin-top: 6px; color: #20262b; }
.notice .o:hover { border-color: #1fb46d; }
.notice .o b { display: block; font-size: 13px; }
.notice .o small { display: block; font-size: 11px; color: #5a636b; font-weight: 600; }
.notice .o em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 900; white-space: nowrap; color: #1a8f55; }
.notice .o em.c { color: #c2433a; }
.notice .sign { font-size: 11px; color: #7a6a4a; font-weight: 700; margin-top: 9px; }
.notice .peek { margin-top: 8px; font-size: 11px; font-weight: 800; color: #2f74c4; }
.res { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid #ffffff22; border-radius: 18px; padding: 18px 16px; text-align: center; }
.res .ttl { font-size: 30px; color: var(--accent); }
.res .sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.bigstars { display: flex; justify-content: center; gap: 4px; margin: 12px 0 8px; font-size: 30px; color: #ffffff22; }
.bigstars .on { color: var(--accent); text-shadow: 0 0 14px #ffd23f88; }
.rstats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; text-align: left; }
.rstats div { background: #ffffff0a; border-radius: 10px; padding: 7px 9px; font-size: 11px; font-weight: 800; color: var(--muted); }
.rstats div b { display: block; font-size: 17px; color: var(--text); font-style: italic; }
.res .acts { display: flex; gap: 8px; margin-top: 14px; }
.res .acts .go { margin: 0; font-size: 16px; padding: 11px; }
.res .acts .btn { font-size: 14px; }
.sbx .evs button { color: var(--text); }

/* City mode */
.spd .cm { display: none; } body.citymode .spd .cm { display: inline-block; }
body.citymode .tool .n { display: none; }
.card-e .fol { font-size: 14px; width: 30px; height: 30px; border-radius: 9px; background: #ffffff12; display: grid; place-items: center; }
.card-e .fol.on { background: var(--accent); color: #0b1410; }
.dstars { display: flex; gap: 10px; justify-content: center; margin: 4px 0 10px; }
.dstars div { text-align: center; font-size: 30px; color: #ffffff30; line-height: 1; }
.dstars div.on { color: var(--accent); text-shadow: 0 0 12px #ffd23f88; }
.dstars small { display: block; font-size: 11px; color: var(--muted); font-weight: 800; margin-top: 3px; }
#day .note { font-size: 12px; color: var(--muted); font-weight: 700; margin: 6px 0 12px; text-align: center; }
#day h2 span { color: var(--accent); }
.followbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(118px + var(--sat)); background: rgba(8,14,11,.92); border: 1px solid #ffffff26; border-radius: 12px; padding: 6px 10px; font-size: 12px; font-weight: 800; display: flex; gap: 8px; align-items: center; pointer-events: auto; }

/* cloud save line on the menu */
.cloud { margin-top: 8px; }
.cloud .set { width: 100%; display: flex; justify-content: space-between; text-decoration: none; }
.cloud .cnote { font-size: 11px; color: var(--muted); font-weight: 700; margin: 5px 2px 0; }
.cloud .cnote a { color: var(--accent); }
