@font-face { font-family: 'Anton'; src: url('../fonts/anton.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('../fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('../fonts/barlow-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
:root { --sun: #ffb347; --sea: #2ec4c6; --ink: #13202a; --cream: #fff6e6; --leaf: #7fd36b;
  --cond: 'Barlow C', 'Arial Narrow', system-ui, sans-serif; --display: 'Anton', Impact, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: #fff; font-family: var(--cond); user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
#stage, #scene, #fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.where { position: absolute; left: max(16px, env(safe-area-inset-left)); top: max(14px, env(safe-area-inset-top)); background: rgba(19,32,42,.62); backdrop-filter: blur(6px); border-radius: 14px; padding: 8px 14px; }
.where b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .03em; }
.where small { font-weight: 800; letter-spacing: .2em; font-size: 11px; color: var(--sun); text-transform: uppercase; }
.hbtns { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top)); display: flex; gap: 8px; pointer-events: auto; }
.hbtns button { border: 0; border-radius: 12px; padding: 10px 14px; background: rgba(19,32,42,.65); backdrop-filter: blur(6px); font-weight: 800; letter-spacing: .05em; font-size: 15px; }
.hbtns b { color: var(--sun); margin-left: 4px; }
#hint { position: absolute; left: 50%; bottom: max(84px, calc(env(safe-area-inset-bottom) + 84px)); transform: translateX(-50%); margin: 0; font-family: var(--display); font-size: clamp(20px, 2.6vw, 30px); letter-spacing: .04em; text-shadow: 0 2px 10px rgba(0,0,0,.7); white-space: nowrap; }

#reel { position: absolute; inset: 0; }
.tbar { position: absolute; left: max(22px, env(safe-area-inset-left)); top: 22%; height: 46%; width: 28px; border-radius: 14px; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.7); overflow: hidden; }
#hud.tim-left .tbar { left: auto; right: max(22px, env(safe-area-inset-right)); }
.tbar .zone { position: absolute; left: 0; right: 0; bottom: 22%; height: 60%; background: rgba(127,211,107,.28); }
#t-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; transition: height .05s linear; }
#t-fill.ok { background: var(--leaf); } #t-fill.hot { background: #ff4d4d; box-shadow: 0 0 18px #ff4d4d; } #t-fill.cold { background: #8fb7ff; }
.tbar span, .dbar span { position: absolute; font-weight: 800; font-size: 11px; letter-spacing: .2em; }
.tbar span { bottom: -22px; left: 50%; transform: translateX(-50%); }
.dbar { position: absolute; left: 50%; bottom: max(130px, calc(env(safe-area-inset-bottom) + 130px)); transform: translateX(-50%); width: min(420px, 60vw); height: 14px; border-radius: 7px; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.7); }
#d-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sea), var(--sun)); border-radius: 6px; }
.dbar span { top: -20px; left: 0; }

#bubble { position: fixed; left: max(14px, env(safe-area-inset-left)); bottom: max(84px, calc(env(safe-area-inset-bottom) + 84px)); z-index: 6; display: flex; align-items: center; gap: 10px; max-width: min(420px, 62vw);
  background: rgba(255,246,230,.95); color: #2a1d12; border-radius: 18px; padding: 6px 16px 6px 6px; box-shadow: 0 10px 28px rgba(0,0,0,.4); pointer-events: none; }
#bubble img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; }
#bubble p { margin: 0; font-weight: 800; font-size: clamp(15px, 1.7vw, 19px); line-height: 1.25; }
#bubble.pop { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: translateY(12px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

#np { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 7; display: flex; align-items: center; gap: 10px;
  background: rgba(19,32,42,.72); backdrop-filter: blur(8px); border-radius: 16px; padding: 7px 8px; max-width: min(380px, 70vw); }
#np button { border: 0; width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.12); font-size: 15px; flex: none; }
#np div { min-width: 0; } #np b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#np small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--sun); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.screen { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(10,16,22,.55); backdrop-filter: blur(3px); }
#title { background: none; backdrop-filter: none; align-items: center; justify-content: flex-end; }
.tbg { position: absolute; inset: 0; background: url('../art/title.jpg') 30% center / cover no-repeat; }
.tbg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,16,22,0) 40%, rgba(10,16,22,.72) 85%); }
.tcard { position: relative; width: min(440px, 44vw); margin-right: max(28px, env(safe-area-inset-right)); }
.kick { margin: 0 0 6px; font-weight: 800; letter-spacing: .24em; font-size: 12px; text-transform: uppercase; color: var(--sun); }
#title h1 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 5vw, 66px); line-height: .95; letter-spacing: .01em; text-shadow: 0 4px 18px rgba(0,0,0,.6); }
#title h1 em { display: block; font-style: normal; font-size: .52em; color: var(--sun); letter-spacing: .06em; margin-top: 6px; }
.lede { margin: 0 0 16px; font-size: 18px; font-weight: 600; line-height: 1.35; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.go { border: 0; border-radius: 16px; padding: 15px 30px; font-weight: 800; letter-spacing: .14em; font-size: 18px; color: #2a1606; background: linear-gradient(135deg, #ffd56b, #ff9a3c); box-shadow: 0 8px 0 #b05a12, 0 14px 30px rgba(0,0,0,.35); }
.go:active { transform: translateY(4px); box-shadow: 0 4px 0 #b05a12; }
.ghost { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); border-radius: 14px; padding: 11px 20px; font-weight: 800; letter-spacing: .1em; margin-top: 14px; }
.how { list-style: none; margin: 16px 0 10px; padding: 12px 14px; background: rgba(10,16,22,.55); border-radius: 14px; }
.how li { font-weight: 600; font-size: 15px; margin: 3px 0; } .how b { color: var(--sun); }
.home { color: #e7dccb; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-decoration: none; }
#title footer { position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); font-size: 12px; font-weight: 600; letter-spacing: .14em; opacity: .8; text-shadow: 0 1px 6px #000; }

.panel { background: var(--cream); color: #2a1d12; border-radius: 26px; padding: 22px 26px; text-align: center; width: min(460px, 92vw); max-height: 88vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.panel.wide { width: min(640px, 94vw); }
.panel h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 40px); margin: 4px 0 8px; letter-spacing: .02em; }
.panel .sub { margin: 0 0 10px; font-weight: 600; }
.tag { margin: 0; font-family: var(--display); color: #e2683c; letter-spacing: .18em; font-size: 20px; min-height: 24px; }
#catch-fish { width: 100%; max-width: 420px; height: auto; aspect-ratio: 2 / 1; }
.meta { font-size: 20px; font-weight: 800; margin: 0 0 16px; }
.rare, #jlist i { font-style: normal; font-weight: 800; letter-spacing: .14em; font-size: .8em; text-transform: uppercase; }
.r-common { color: #4f7a3c; } .r-uncommon { color: #2a7fb8; } .r-legendary { color: #b06cff; text-shadow: 0 0 10px rgba(176,108,255,.4); }
#jlist { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
#jlist li { display: flex; align-items: center; gap: 8px; background: rgba(42,29,18,.06); border-radius: 14px; padding: 6px 10px 6px 4px; }
#jlist canvas { width: 96px; height: 48px; flex: none; }
#jlist b { display: block; font-size: 15px; } #jlist small { display: block; font-size: 12px; font-weight: 600; opacity: .75; }
#tlist { display: grid; gap: 10px; }
.spot { border: 2px solid rgba(42,29,18,.15); background: #fff; border-radius: 16px; padding: 12px 14px; text-align: left; color: #2a1d12; }
.spot b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .02em; }
.spot small { font-weight: 600; font-size: 13px; opacity: .8; }
.spot.here { border-color: #ff9a3c; } .spot.locked { opacity: .5; cursor: default; }

#walk { position: fixed; inset: 0; z-index: 20; background: #13202a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#walk p { font-family: var(--display); font-size: clamp(24px, 3.4vw, 40px); letter-spacing: .04em; margin: 0; }
.steps { display: flex; gap: 18px; } .steps i { width: 16px; height: 26px; border-radius: 8px 8px 6px 6px; background: var(--sun); opacity: .2; animation: step 1.2s infinite; }
.steps i:nth-child(2) { animation-delay: .3s; } .steps i:nth-child(3) { animation-delay: .6s; } .steps i:nth-child(4) { animation-delay: .9s; }
@keyframes step { 30% { opacity: 1; transform: translateY(-4px); } 60% { opacity: .2; } }
#boot { position: fixed; inset: 0; z-index: 30; background: #13202a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity .5s; }
#boot.done { opacity: 0; pointer-events: none; }
.bt-logo { font-family: var(--display); font-size: clamp(34px, 6vw, 60px); color: var(--sun); }
.bt-msg { font-weight: 600; letter-spacing: .16em; opacity: .8; }

@media (max-width: 760px), (max-height: 520px) {
  .tcard { width: min(420px, 56vw); } .how { display: none; } .lede { font-size: 15px; }
  #jlist { grid-template-columns: 1fr; } #bubble { bottom: max(70px, calc(env(safe-area-inset-bottom) + 70px)); }
}
@media (orientation: portrait) and (max-width: 760px) {
  #title { justify-content: center; align-items: flex-end; } .tcard { width: 92vw; margin: 0 auto 40px; }
  .tbg { background-position: 25% center; } .tbg::after { background: linear-gradient(0deg, rgba(10,16,22,.85) 30%, rgba(10,16,22,0) 70%); }
}
