/* Reef Rescue 2.0.0 — chunky candy UI over the water. Fredoka for titles and numbers, Nunito for words. */
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('../fonts/fredoka-600.2.0.0.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('../fonts/fredoka-700.2.0.0.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('../fonts/nunito-600.2.0.0.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('../fonts/nunito-800.2.0.0.woff2') format('woff2'); }

:root {
  --ink: #0B2A55; --ink2: #06183A; --navy: #0B3A66; --white: #FFFFFF;
  --gold1: #FFE680; --gold2: #F2A81A; --gold-ol: #5E3A00;
  --blue1: #5FB8FF; --blue2: #1E6FD0; --blue-ol: #06224D;
  --teal1: #4FF0DC; --teal2: #0AA89A; --teal-ol: #024A47;
  --green1: #9CF07A; --green2: #2FA83A; --green-ol: #0B4A14;
  --red1: #FF9B8A; --red2: #E0303A; --red-ol: #5E0A12;
  --panel: #FFFFFF; --panel-ol: #0B2A55;
  --sa-t: env(safe-area-inset-top, 0px); --sa-b: env(safe-area-inset-bottom, 0px); --sa-l: env(safe-area-inset-left, 0px); --sa-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0B3A66; color: var(--white); font-family: 'Nunito', system-ui, sans-serif; font-weight: 600;
  -webkit-user-select: none; user-select: none; touch-action: manipulation; overscroll-behavior: none; }
#safe-probe { position: fixed; visibility: hidden; pointer-events: none; padding: var(--sa-t) var(--sa-r) var(--sa-b) var(--sa-l); }
#bg, #game { position: fixed; inset: 0; display: block; }
#game { touch-action: none; z-index: 2; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: #FFE680; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; z-index: 5; padding: calc(var(--sa-t) + 14px) calc(var(--sa-r) + 16px) calc(var(--sa-b) + 86px) calc(var(--sa-l) + 16px); display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.screen.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.big-title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 34px; line-height: 1.05; margin: 0; color: #FFFFFF; letter-spacing: 0.3px;
  text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 6px 0 rgba(0,0,0,0.25); }
.page-head, .hub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.head-btns { display: flex; gap: 10px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.small-note { font-size: 13px; color: #3A5A80; margin-top: 6px; }
.lead { font-size: 15px; line-height: 1.4; }

/* ---------- candy panels and chips ---------- */
.panel { background: var(--panel); color: var(--ink); border: 3px solid var(--panel-ol); border-radius: 18px; padding: 12px 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.9), 0 4px 0 var(--panel-ol), 0 8px 16px rgba(0,20,60,0.25); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'Fredoka', sans-serif; font-weight: 700; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 10px;
  background: linear-gradient(#FFFFFF, #E4F2FF); color: var(--ink); box-shadow: inset 0 2px 0 rgba(255,255,255,0.9), 0 3px 0 var(--ink); white-space: nowrap; }
.chip svg { width: 18px; height: 18px; }
.chip.gold { background: linear-gradient(var(--gold1), var(--gold2)); border-color: var(--gold-ol); color: #4A2A00; box-shadow: inset 0 2px 0 rgba(255,255,255,0.7), 0 4px 0 var(--gold-ol); }
.chip.blue { background: linear-gradient(var(--blue1), var(--blue2)); border-color: var(--blue-ol); color: #FFFFFF; box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 3px 0 var(--blue-ol); }
.chip.white { background: linear-gradient(#FFFFFF, #E8F4FF); }
.rank-chip { font-size: 13px; padding: 3px 10px; margin-top: 8px; border-radius: 10px; }
.star-chip { font-size: 20px; padding: 6px 12px; }
.star-chip svg { width: 20px; height: 20px; }
.bar { height: 14px; border: 2.5px solid var(--ink); border-radius: 9px; background: #D6E6F5; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(#7CF08A, #2FB04A); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5); transition: width 0.5s; }
.bar.red i { background: linear-gradient(#FF9B8A, #E0303A); }

/* ---------- buttons ---------- */
.btn { border: 3px solid var(--blue-ol); border-radius: 16px; background: linear-gradient(var(--blue1), var(--blue2)); color: #FFFFFF; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px;
  padding: 10px 16px; box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 4px 0 var(--blue-ol); text-shadow: 0 2px 0 rgba(0,0,0,0.25); transition: transform 0.06s; min-height: 48px; }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 1px 0 var(--blue-ol); }
.btn:focus-visible { outline: 3px solid #FFE680; outline-offset: 2px; }
.btn.gold, .btn.cta { background: linear-gradient(var(--gold1), var(--gold2)); border-color: var(--gold-ol); color: #4A2A00; text-shadow: 0 1px 0 rgba(255,255,255,0.5); box-shadow: inset 0 2px 0 rgba(255,255,255,0.7), 0 5px 0 var(--gold-ol); }
.btn.green { background: linear-gradient(var(--green1), var(--green2)); border-color: var(--green-ol); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 4px 0 var(--green-ol); }
.btn.teal { background: linear-gradient(var(--teal1), var(--teal2)); border-color: var(--teal-ol); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 4px 0 var(--teal-ol); }
.btn.red { background: linear-gradient(var(--red1), var(--red2)); border-color: var(--red-ol); box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 4px 0 var(--red-ol); }
.btn.white { background: linear-gradient(#FFFFFF, #DDEBFA); border-color: var(--ink); color: var(--ink); text-shadow: none; box-shadow: inset 0 2px 0 #FFFFFF, 0 4px 0 var(--ink); }
.btn.ghost { background: rgba(6,26,60,0.55); border-color: rgba(255,255,255,0.6); box-shadow: none; }
.btn.small { font-size: 15px; padding: 6px 12px; min-height: 40px; border-radius: 12px; }
.btn.icon { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 14px; }
.btn.icon svg { width: 24px; height: 24px; }
.btn.round { width: 52px; height: 52px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#FFFFFF, #DDEBFA); border-color: var(--ink); color: var(--ink); box-shadow: inset 0 2px 0 #FFFFFF, 0 4px 0 var(--ink); }
.btn.round svg { width: 26px; height: 26px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.cta { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 18px; text-align: left; border-radius: 20px; }
.btn.cta b { display: block; font-size: 30px; line-height: 1; }
.btn.cta small { display: block; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14px; margin-top: 4px; color: #5E3A00; }
.play-dot { width: 46px; height: 46px; border-radius: 50%; background: #4A2A00; position: relative; flex: none; box-shadow: inset 0 3px 0 rgba(255,255,255,0.2); }
.play-dot::after { content: ''; position: absolute; left: 18px; top: 13px; border-left: 15px solid #FFE680; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.btn.mode { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; min-height: 62px; }
.btn.mode b { font-size: 17px; line-height: 1.1; }
.btn.mode small { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 12px; opacity: 0.95; margin-top: 2px; }

/* ---------- title ---------- */
#s-title { padding-bottom: calc(var(--sa-b) + 20px); justify-content: center; align-items: center; cursor: pointer; }
.title-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.logo { display: flex; flex-direction: column; align-items: center; font-family: 'Fredoka', sans-serif; font-weight: 700; line-height: 0.9; animation: floatUp 1.4s cubic-bezier(.2,.9,.3,1.2) both; }
.logo span { display: block; color: #FFFFFF; -webkit-text-stroke: 0; text-shadow: 0 5px 0 #0B2A55, 4px 0 0 #0B2A55, -4px 0 0 #0B2A55, 0 -4px 0 #0B2A55, 3px 3px 0 #0B2A55, -3px 3px 0 #0B2A55, 3px -3px 0 #0B2A55, -3px -3px 0 #0B2A55, 0 10px 0 rgba(0,0,0,0.25); }
.logo .l1 { font-size: clamp(64px, 18vw, 120px); background: linear-gradient(#FFFFFF 40%, #BFF4FF); -webkit-background-clip: text; background-clip: text; }
.logo .l2 { font-size: clamp(64px, 18vw, 120px); color: #FFE36A; margin-top: -4px; }
.title-nell { width: min(62vw, 300px); height: auto; animation: swimIn 1.6s 0.4s cubic-bezier(.2,.8,.3,1) both, bob 3s 2s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(0,20,60,0.25)); }
.tap-hint { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 22px; margin-top: 10px; padding: 8px 18px; border-radius: 16px; background: rgba(6,26,60,0.5); animation: pulse 1.6s 1.8s ease-in-out infinite both; }
.corner { position: fixed; top: calc(var(--sa-t) + 12px); right: calc(var(--sa-r) + 12px); display: flex; gap: 8px; z-index: 6; }
.thrift-mark { position: fixed; bottom: calc(var(--sa-b) + 14px); left: 0; right: 0; text-align: center; font-weight: 800; font-size: 13px; color: rgba(255,255,255,0.85); text-decoration: none; }
@keyframes floatUp { from { transform: translateY(60vh) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes swimIn { from { transform: translateX(-80vw) rotate(-12deg); } to { transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.96); } }

/* ---------- hub ---------- */
.rescued-panel b { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 17px; }
.reef-scene { position: relative; flex: 1 1 auto; min-height: 160px; border-radius: 22px; overflow: hidden; border: 3px solid rgba(255,255,255,0.35); }
.reef-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.regrow-chip { position: absolute; left: 10px; bottom: 10px; font-weight: 800; font-size: 13px; color: var(--ink); background: #FFFFFF; border: 2.5px solid var(--ink); border-radius: 10px; padding: 3px 9px; }
.regrow-chip:empty { display: none; }
.hub-actions { flex: none; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(4, 1fr); background: linear-gradient(#0D3F7A, #072656); border-top: 3px solid #041838;
  padding: 6px calc(var(--sa-r) + 6px) calc(var(--sa-b) + 6px) calc(var(--sa-l) + 6px); }
.tabbar button { background: none; border: 0; color: rgba(255,255,255,0.7); display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 13px; padding: 6px 0; min-height: 52px; }
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.on { color: #FFE36A; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 3px solid var(--ink); border-radius: 12px; padding: 6px 12px; background: rgba(255,255,255,0.85); color: var(--ink); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 var(--ink); min-height: 40px; }
.tab.on { background: linear-gradient(var(--gold1), var(--gold2)); border-color: var(--gold-ol); color: #4A2A00; box-shadow: 0 3px 0 var(--gold-ol); }

/* ---------- map ---------- */
.map-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.zone-card { border-radius: 20px; border: 3px solid var(--ink); padding: 12px; box-shadow: 0 5px 0 var(--ink); position: relative; overflow: hidden; }
.zone-card h2 { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 22px; margin: 0; text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.zone-card .zsub { font-weight: 800; font-size: 13px; opacity: 0.95; }
.lv-grid { max-width: 520px; margin-left: auto; margin-right: auto;  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.lv { aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ink); background: linear-gradient(#FFFFFF, #D6E8FA); color: var(--ink); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 2px 0 #FFFFFF, 0 3px 0 var(--ink); padding: 0; position: relative; }
.lv small { font-size: 10px; letter-spacing: -1px; color: #F2A81A; text-shadow: 0 1px 0 #5E3A00; line-height: 1; }
.lv.boss { background: linear-gradient(#FFB8E2, #E0458F); color: #FFFFFF; text-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.lv.next { animation: pulse 1.4s ease-in-out infinite; background: linear-gradient(var(--gold1), var(--gold2)); }
.lv.locked { opacity: 0.45; pointer-events: none; }
.gate { margin-top: 8px; font-weight: 800; font-size: 13px; background: rgba(0,0,0,0.3); border-radius: 10px; padding: 6px 10px; }
.storm { background: linear-gradient(#5A6A7A, #2A3440); color: #E0E8F0; }
.storm .buoy { font-size: 34px; float: right; }

/* ---------- log ---------- */
.log-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }
.log-zone h3 { font-family: 'Fredoka', sans-serif; font-weight: 700; margin: 4px 0 8px; font-size: 18px; }
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.log-card { background: #FFFFFF; color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; padding: 6px; text-align: center; box-shadow: 0 3px 0 var(--ink); font-weight: 800; font-size: 12px; position: relative; }
.log-card img { width: 100%; aspect-ratio: 1; display: block; }
.log-card.unknown img { filter: brightness(0) opacity(0.25); }
.log-card .gold { position: absolute; top: 4px; right: 6px; font-size: 14px; }
.trophy-list, .stat-list { display: grid; gap: 8px; padding-bottom: 20px; }
.trophy { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,0.12); border: 2.5px solid rgba(255,255,255,0.35); border-radius: 14px; padding: 8px 10px; }
.trophy.got { background: #FFFFFF; color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.trophy .tm { font-size: 26px; width: 34px; text-align: center; }
.trophy b { display: block; font-family: 'Fredoka', sans-serif; font-size: 16px; }
.trophy small { font-size: 13px; }
.stat { display: flex; justify-content: space-between; background: rgba(255,255,255,0.12); border-radius: 12px; padding: 8px 12px; }
.stat b { font-family: 'Fredoka', sans-serif; }

/* ---------- leaderboard ---------- */
.board-list { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; }
.brow { display: grid; grid-template-columns: 44px 30px 1fr auto; align-items: center; gap: 8px; background: rgba(255,255,255,0.12); border-radius: 12px; padding: 8px 10px; font-weight: 800; }
.brow.me { background: linear-gradient(var(--gold1), var(--gold2)); color: #4A2A00; border: 2.5px solid var(--gold-ol); }
.brow .rk { font-family: 'Fredoka', sans-serif; font-size: 18px; text-align: center; }
.brow .sc { font-family: 'Fredoka', sans-serif; font-size: 18px; text-align: right; }
.brow .sc small { display: block; font-size: 11px; font-family: 'Nunito', sans-serif; opacity: 0.85; }
.board-msg { text-align: center; padding: 26px 12px; font-weight: 800; font-size: 16px; background: rgba(6,26,60,0.45); border-radius: 16px; }
.board-me { font-weight: 800; }

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; top: 0; z-index: 6; pointer-events: none; padding: calc(var(--sa-t) + 8px) calc(var(--sa-r) + 10px) 0 calc(var(--sa-l) + 10px); }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; gap: 8px; align-items: stretch; max-width: 620px; margin: 0 auto; }
.hud-panel { flex: 1; background: linear-gradient(#1E6FD0, #0B3A8A); border: 3px solid #041838; border-radius: 16px; padding: 4px 10px 6px; box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), 0 4px 0 #041838; min-width: 0; }
.hud-label { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-score { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.1; text-shadow: 0 2px 0 #041838; }
.hud-bar { position: relative; height: 12px; background: #0A2350; border: 2px solid #041838; border-radius: 8px; margin-top: 3px; }
.hud-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: linear-gradient(#FFF3A0, #F2A81A); transition: width 0.4s; }
.hud-bar em { position: absolute; top: 50%; transform: translate(-50%, -52%); font-style: normal; font-size: 17px; color: #4A6A90; text-shadow: 0 0 2px #041838, 0 1px 0 #041838; }
.hud-bar em.on { color: #FFE36A; }
.shots-chip { flex-direction: column; justify-content: center; gap: 0; padding: 2px 10px; min-width: 62px; border-radius: 16px; }
.shots-chip b { font-size: 26px; line-height: 1; }
.shots-chip small { font-size: 10px; letter-spacing: 1px; }
.hud-row2 { display: flex; justify-content: space-between; gap: 8px; margin: 10px auto 0; max-width: 620px; }
.goal-chip { font-size: 15px; padding: 3px 10px 3px 6px; }
.goal-chip img { width: 30px; height: 30px; }
.goal-chip.ping { animation: ping 0.35s; }
@keyframes ping { 50% { transform: scale(1.18); } }
.tide-chip { font-size: 15px; }
.tide-chip.warn { background: linear-gradient(#FF9B8A, #E0303A); border-color: #5E0A12; box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 3px 0 #5E0A12; animation: pulse 0.6s infinite; }
.boss-bar { max-width: 620px; margin: 8px auto 0; display: flex; align-items: center; gap: 8px; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 14px; background: rgba(6,20,50,0.6); border-radius: 12px; padding: 4px 10px; }
.boss-bar .bar { flex: 1; margin: 0; height: 12px; }
.hud-side { position: fixed; right: calc(var(--sa-r) + 10px); bottom: calc(var(--sa-b) + 14px); display: flex; flex-direction: column; gap: 12px; }
.hud.left-handed .hud-side { right: auto; left: calc(var(--sa-l) + 10px); }
.hud-side.wide { }

/* ---------- cards ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(2,12,36,0.62); display: flex; align-items: center; justify-content: center; padding: calc(var(--sa-t) + 12px) 14px calc(var(--sa-b) + 12px); }
.card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: linear-gradient(#FFFFFF, #E8F4FF); color: var(--ink); border: 4px solid var(--ink); border-radius: 24px; padding: 18px 18px 16px;
  box-shadow: inset 0 3px 0 #FFFFFF, 0 6px 0 var(--ink), 0 16px 40px rgba(0,0,0,0.4); animation: cardIn 0.28s cubic-bezier(.2,.9,.3,1.3); text-align: center; }
@keyframes cardIn { from { transform: scale(0.85) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.card h2 { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 28px; margin: 2px 0 4px; color: var(--ink); }
.card .sub { font-weight: 800; color: #3A5A80; margin: 0 0 10px; font-size: 15px; }
.card p { margin: 8px 0; line-height: 1.4; }
.card .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.card .btns.row { flex-direction: row; }
.card .btns.row > * { flex: 1; }
.card .lines { text-align: left; background: #DDEBFA; border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 12px; margin-top: 10px; }
.card .lines div { display: flex; justify-content: space-between; padding: 3px 0; font-weight: 800; }
.card .lines b { font-family: 'Fredoka', sans-serif; }
.card img.card-art { width: 150px; height: auto; display: block; margin: 0 auto 6px; }
.card .boss-art { width: 220px; }
.stars-big { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.stars-big svg { width: 58px; height: 58px; }
.stars-big svg.off path { fill: #C8D8EA; stroke: #8AA0BC; }
.stars-big svg.on { animation: starPop 0.4s both; }
.stars-big svg:nth-child(2).on { animation-delay: 0.25s; }
.stars-big svg:nth-child(3).on { animation-delay: 0.5s; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25); } to { transform: none; } }
.score-big { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 40px; line-height: 1; }
.notice { font-size: 13px; color: #3A5A80; margin-top: 8px; }
.field { width: 100%; font: 700 20px 'Fredoka', sans-serif; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; color: var(--ink); background: #FFFFFF; text-align: center; -webkit-user-select: text; user-select: text; }
.badges { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 10px; }
.badges button { font-size: 22px; padding: 4px 0; border: 2.5px solid transparent; border-radius: 10px; background: #EEF5FC; }
.badges button.on { border-color: var(--ink); background: #FFE680; }
.err { color: #C0182A; font-weight: 800; font-size: 14px; min-height: 18px; margin-top: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 2px solid #CFE0F2; text-align: left; font-weight: 800; }
.set-row:last-child { border-bottom: 0; }
.set-row input[type=range] { width: 46%; accent-color: #1E6FD0; }
.switch { width: 54px; height: 32px; border-radius: 16px; border: 3px solid var(--ink); background: #C8D8EA; position: relative; flex: none; padding: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; border: 2px solid var(--ink); transition: left 0.15s; }
.switch.on { background: #4CD94C; }
.switch.on::after { left: 24px; }
.set-head { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px; text-align: left; margin: 14px 0 2px; }
.built { font-size: 12px; color: #5A7A9A; margin-top: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.cal span { font-size: 11px; font-weight: 800; color: #5A7A9A; }
.cal i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: #EEF5FC; font-weight: 800; font-size: 13px; }
.cal i.done { background: #4CD94C; color: #FFFFFF; }
.cal i.today { outline: 3px solid #F2A81A; }
.ios-steps div { display: flex; align-items: center; gap: 10px; text-align: left; margin: 8px 0; font-weight: 800; }
.ios-steps svg { width: 40px; height: 40px; flex: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--sa-t) + 130px); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #FFFFFF; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 var(--ink); animation: toastIn 0.3s both; max-width: 90vw; text-align: center; }
.toast.gold { background: linear-gradient(var(--gold1), var(--gold2)); border-color: var(--gold-ol); color: #4A2A00; box-shadow: 0 4px 0 var(--gold-ol); }
@keyframes toastIn { from { transform: translateY(-14px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-banner { position: fixed; left: 10px; right: 10px; bottom: calc(var(--sa-b) + 76px); z-index: 25; background: #FFE680; color: #4A2A00; border: 3px solid var(--gold-ol); border-radius: 14px; padding: 10px; font-weight: 800; text-align: center; }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
@media (min-width: 900px) { .big-title { font-size: 40px; } .screen { padding-top: calc(var(--sa-t) + 22px); } }
@media (max-height: 700px) { .rescued-panel .small-note { display: none; } .btn.cta b { font-size: 24px; } }
.card a { color: #1E5FC0; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.card a:hover { color: #0B3A8A; }
