/* Turtlestorm 1.0 – www.guri-online.com/turtlestorm (generated by final.py) */
@font-face{font-family:"Bungee";src:url(schrift/bungee-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Chakra Petch";src:url(schrift/chakra-petch-500.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Chakra Petch";src:url(schrift/chakra-petch-600.woff2) format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Chakra Petch";src:url(schrift/chakra-petch-700.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
:root {
  /* Layout: one portrait arena (390 x 844 logical px) scaled to fit the screen; menus float over the live sea */
  --abyss: #03102A;
  --panel: rgba(4, 18, 48, 0.82);
  --line: rgba(127, 230, 255, 0.42);
  --ink: #FFFFFF;
  --ink-soft: #CFE9F2;
  --label: #8FE9FF;
  --gold: #FFC83D;
  --acc: #3FF3FF;
  --acc-rgb: 63, 243, 255;
  --on-acc: #04263D;
  --display: 'Bungee', 'Impact', 'Arial Black', sans-serif;
  --ui: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--abyss); color: var(--ink); font-family: var(--ui); overflow: hidden; }
#stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #0A2A5E 0%, var(--abyss) 72%); }
#frame { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: 0 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
#game { position: absolute; left: 0; top: 0; width: 390px; height: 844px; display: block; }
.layer { position: absolute; inset: 0; }
button { font-family: var(--ui); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }

#menu { display: flex; flex-direction: column; align-items: center; padding: 26px 16px 16px; box-sizing: border-box; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; background: linear-gradient(180deg, rgba(3, 16, 42, 0.64) 0%, rgba(3, 16, 42, 0.28) 38%, rgba(3, 16, 42, 0.8) 100%); }
#menu > * { flex-shrink: 0; }
.logo { max-width: 100%; font-family: var(--display); font-size: 32px; line-height: 1; letter-spacing: 0.5px; color: var(--ink); text-shadow: 0 3px 0 #0A3F62, 0 0 22px rgba(63, 243, 255, 0.5); }
.sub { margin-top: 7px; font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--label); }
.worldSel { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.worldSel .sub { margin: 0; min-width: 0; max-width: 234px; letter-spacing: 2px; text-align: center; white-space: nowrap; overflow: hidden; }
.wMap { width: 276px; height: 32px; padding: 0 10px; box-sizing: border-box; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: center; gap: 7px; }
.wMap svg { flex: 0 0 auto; }
.wArrow { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 18px; line-height: 1; color: var(--ink); }
.wArrow:disabled { opacity: 0.28; cursor: default; }
.preview { position: relative; width: 170px; height: 140px; margin-top: 8px; display: grid; place-items: center; }
.pad { position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--acc-rgb), 0.3) 0%, rgba(var(--acc-rgb), 0.07) 66%, rgba(var(--acc-rgb), 0) 70%); box-shadow: inset 0 0 0 1.5px rgba(var(--acc-rgb), 0.55); }
.preview img { position: relative; width: 96px; height: 126px; }
.pvName { margin: 4px 0 0; font-size: 22px; font-weight: 700; line-height: 1.1; text-align: center; text-wrap: balance; }
.pill { margin-top: 7px; padding: 4px 10px; border-radius: 8px; background: var(--acc); color: var(--on-acc); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.stats { width: 100%; max-width: 330px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat b { width: 92px; flex-shrink: 0; font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--label); }
.segs { flex: 1; display: flex; gap: 4px; }
.segs i { flex: 1; height: 7px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.segs i.on { background: var(--acc); box-shadow: 0 0 6px rgba(var(--acc-rgb), 0.6); }
.arms { width: 100%; max-width: 330px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.arm { display: grid; grid-template-columns: 64px 1fr; column-gap: 10px; row-gap: 2px; padding: 7px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.arm .k { grid-row: span 2; align-self: center; font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--label); }
.arm .n { font-size: 14px; font-weight: 700; line-height: 1.15; }
.arm .d { font-size: 12px; line-height: 1.2; color: var(--ink-soft); }
.cards { width: calc(100% + 32px); margin: 10px -16px 0; padding: 6px 16px 8px; box-sizing: border-box; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(127, 230, 255, 0.35) transparent; touch-action: pan-x; }
.card { position: relative; flex: 0 0 70px; height: 86px; padding: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; scroll-snap-align: center; }
.card img { width: 40px; height: 52px; }
.card span { font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.card .lock { position: absolute; right: 5px; top: 5px; width: 16px; height: 16px; }
.card.locked img { filter: brightness(0) opacity(0.55); }
.card.locked span { color: var(--ink-soft); opacity: 0.75; }
.card[aria-checked="true"] { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc), 0 0 16px rgba(var(--acc-rgb), 0.55); }
.preview img.locked { filter: brightness(0) opacity(0.6); }
.lockLine { margin-top: 8px; max-width: 330px; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--gold); font-variant-numeric: tabular-nums; }
.primary:disabled { background: rgba(255, 255, 255, 0.12); color: var(--ink-soft); box-shadow: none; cursor: not-allowed; }
.textbtn { margin-top: 2px; min-height: 32px; padding: 0 10px; border: 0; background: transparent; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--label); text-decoration: underline; text-underline-offset: 3px; }
.endNext { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.pick { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.pickHead { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pick .tag { letter-spacing: 2px; }
.pickName { font-size: 13px; font-weight: 700; color: var(--acc); }
.cards.mini { width: calc(100% + 40px); margin: 0 -20px; padding: 4px 20px 6px; gap: 6px; }
.cards.mini .card { flex: 0 0 58px; height: 68px; border-radius: 12px; gap: 2px; }
.cards.mini .card img { width: 32px; height: 42px; }
.cards.mini .card span { font-size: 8.5px; }
.unlocked { font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--gold); }
.primary { width: 100%; max-width: 330px; height: 54px; border: 0; border-radius: 14px; background: var(--acc); color: var(--on-acc); font-family: var(--display); font-size: 20px; letter-spacing: 1px; box-shadow: 0 0 22px rgba(var(--acc-rgb), 0.45), inset 0 -4px 0 rgba(4, 38, 61, 0.25); }
#menu .primary { margin-top: 16px; }
.ver { margin: 8px 0 0; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--label); opacity: 0.75; text-align: center; }
.hint { margin: 12px 0 0; max-width: 330px; text-align: center; font-size: 11px; line-height: 1.45; color: var(--ink-soft); }
.best { margin: 6px 0 0; min-height: 16px; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--gold); font-variant-numeric: tabular-nums; }
.loading { position: absolute; left: 0; right: 0; top: 50%; text-align: center; font-size: 13px; font-weight: 600; letter-spacing: 3px; color: var(--label); }

.hudbtn { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border-radius: 50%; padding: 0; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; }
#specialBtn { position: absolute; right: 10px; bottom: 16px; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
#specialBtn .ring { position: absolute; left: 0; top: 0; width: 84px; height: 84px; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 5; }
.ring .fill { fill: none; stroke: var(--acc); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 219.9; stroke-dashoffset: 219.9; }
.spCore { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.75); background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, var(--acc) 42%, #0A3F62 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; opacity: 0.5; filter: grayscale(0.7); transition: opacity 0.2s, filter 0.2s; }
.spIcon { width: 24px; height: 24px; display: grid; place-items: center; }
.spLabel { padding: 1px 5px; border-radius: 5px; background: rgba(4, 22, 38, 0.85); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
#specialBtn.ready .spCore { opacity: 1; filter: none; box-shadow: 0 0 18px rgba(var(--acc-rgb), 0.8); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.07); } }

.overlay { display: grid; place-items: center; padding: 0 22px; box-sizing: border-box; background: rgba(2, 10, 28, 0.62); }
.sheet { width: 100%; max-width: 330px; padding: 22px 20px; box-sizing: border-box; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.sheet h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.08; text-wrap: balance; }
.sheet .tag { font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--label); }
.rows { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; text-align: left; font-variant-numeric: tabular-nums; }
.rows dt { align-self: center; font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--label); }
.rows dd { margin: 0; font-size: 18px; font-weight: 700; text-align: right; }
.rows dd.gold { color: var(--gold); }
.btns { display: flex; flex-direction: column; gap: 8px; }
.ghost { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.sheet .primary { max-width: none; padding: 0 12px; font-size: 18px; white-space: nowrap; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #specialBtn.ready .spCore { animation: none; } }
#mapScreen { background: #03102A; }
.audioRow { margin-top: 10px; display: flex; gap: 8px; }
.chip { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
#mapScroll { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: none; }
#mapScroll::-webkit-scrollbar { display: none; }
#mapSvg { display: block; width: 390px; }
.mapHead { position: absolute; left: 0; right: 0; top: 0; height: 64px; padding: 0 14px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(3, 16, 42, 0.95) 0%, rgba(3, 16, 42, 0.8) 62%, rgba(3, 16, 42, 0) 100%); pointer-events: none; }
.mapHead > * { pointer-events: auto; }
.mapBack { width: 40px; height: 40px; flex: 0 0 auto; padding: 0 0 3px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 24px; line-height: 1; }
.mapTitle { flex: 1; font-family: var(--display); font-size: 21px; letter-spacing: 0.5px; text-shadow: 0 2px 0 #0A3F62, 0 0 14px rgba(63, 243, 255, 0.45); }
.mapProg { text-align: right; font-size: 9.5px; font-weight: 600; letter-spacing: 2px; line-height: 1.2; color: var(--label); }
.mapProg b { display: block; font-size: 17px; letter-spacing: 0.5px; color: var(--gold); font-variant-numeric: tabular-nums; }
.mapInfo { --racc: var(--acc); position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; background: #061433; border-top: 2px solid var(--racc); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.5); }
.mapInfo .tag { font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--racc); white-space: nowrap; overflow: hidden; }
.mapInfo h3 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 400; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.miState { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--label); }
.miState.done { color: var(--gold); }
.miState.locked { color: var(--ink-soft); opacity: 0.8; }
.miBoss { margin: 2px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; }
.miBoss dt { align-self: center; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--label); }
.miBoss dd { margin: 0; font-size: 13px; font-weight: 700; text-align: right; white-space: nowrap; overflow: hidden; }
.miNeu { min-height: 31px; font-size: 12px; line-height: 1.3; color: var(--ink-soft); }
.mapInfo .primary { max-width: none; margin-top: 2px; padding: 0 12px; font-size: 18px; white-space: nowrap; overflow: hidden; }
#mapSvg .mn { cursor: pointer; outline: none; }
#mapSvg .mn.locked { cursor: default; }
#mapSvg .mnNum { font-family: var(--display); text-anchor: middle; fill: #05223A; }
#mapSvg .locked .mnNum { fill: #2A3038; opacity: 0.75; }
#mapSvg .selRing { fill: none; stroke: #FFFFFF; stroke-width: 3; opacity: 0; }
#mapSvg .mn.sel .selRing { opacity: 1; }
#mapSvg .focRing { fill: none; stroke: var(--acc); stroke-width: 2; stroke-dasharray: 4 4; opacity: 0; }
#mapSvg .mn:focus-visible .focRing { opacity: 1; }
#mapSvg .pulse { fill: none; stroke: #FFFFFF; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: mpulse 1.6s ease-out infinite; }
@keyframes mpulse { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
#mapSvg .mTurtle { animation: mbob 1.8s ease-in-out infinite; }
@keyframes mbob { 50% { transform: translateY(-4px); } }
#mapSvg .mReg { font-family: var(--ui); font-size: 10.5px; font-weight: 600; letter-spacing: 1.8px; fill: #FFFFFF; text-anchor: middle; }
@media (prefers-reduced-motion: reduce) { #mapSvg .pulse, #mapSvg .mTurtle { animation: none; } }

/* web version: links back to guri-online.com */
.webnav { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.webnav a { min-height: 32px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--label); text-decoration: none; }
.webnav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.webnav a:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
