:root {
  --ink: #251936;
  --paper: #f8fafc;
  --cyan: #67e8f9;
  --gold: #f7c948;
  --pink: #fb7185;
  --green: #86efac;
  --line: rgba(248, 250, 252, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; touch-action: manipulation; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 12%, rgba(251, 113, 133, 0.18), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(103, 232, 249, 0.18), transparent 24%),
    linear-gradient(145deg, #120d1f, #251936 58%, #123044);
}

#app { width: 100%; min-height: 100vh; display: flex; justify-content: center; padding: 16px; }
.back-link {
  position: fixed; top: 15px; left: 15px; z-index: 20; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--paper); background: rgba(18,13,31,0.72);
  text-decoration: none; font-weight: 900; font-size: 0.78rem; backdrop-filter: blur(12px);
}

.app-shell { width: min(540px, 100%); min-height: calc(100vh - 32px); display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-top: 40px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--gold); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; }
h1 { font-size: 2.05rem; line-height: 1; font-weight: 900; letter-spacing: 0; }
h1 span { color: var(--cyan); }
.wallet { min-width: 118px; padding: 10px 12px; border: 1px solid rgba(103,232,249,0.32); border-radius: 8px; background: rgba(255,255,255,0.08); text-align: right; }
.wallet span, .scorebar span { display: block; color: rgba(255,255,255,0.68); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; }

.scorebar, .board-wrap, .mini-guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045));
  box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.scorebar { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 8px; padding: 12px; align-items: stretch; }
.scorebar div { padding: 10px; border-radius: 8px; background: rgba(255,255,255,0.08); text-align: center; }
.scorebar b { display: block; margin-top: 4px; font-size: 1.22rem; }
button {
  border: 0; border-radius: 8px; min-height: 50px; padding: 10px 12px;
  color: var(--ink); background: var(--gold); font-family: inherit; font-size: 0.86rem; font-weight: 900;
  box-shadow: 0 8px 0 rgba(0,0,0,0.24);
}

.board-wrap { padding: 12px; }
.status {
  min-height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(18,13,31,0.72);
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.pad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pad {
  min-height: 128px;
  color: #06121f;
  font-size: 1rem;
  transform: translateY(0);
  transition: filter .12s ease, transform .12s ease, box-shadow .12s ease;
}
.pad.active, .pad:active {
  filter: brightness(1.42) saturate(1.2);
  transform: translateY(4px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.28), 0 0 26px rgba(255,255,255,0.35);
}
.pad:disabled { opacity: .72; }
.fish { background: var(--cyan); }
.milk { background: #f8fafc; }
.coin { background: var(--gold); }
.star { background: var(--pink); color: #fff; }
.mini-guide { padding: 14px 16px; }
.mini-guide h2 { font-size: 1.05rem; margin-bottom: 6px; }
.mini-guide p { color: rgba(255,255,255,0.76); font-size: 0.88rem; line-height: 1.55; }

@media (max-width: 560px) {
  #app { padding: 12px; }
  .app-shell { min-height: calc(100vh - 24px); gap: 10px; padding-bottom: 96px; }
  h1 { font-size: 1.56rem; }
  .scorebar { grid-template-columns: 1fr 1fr; }
  .scorebar button { grid-column: 1 / -1; }
  .pad { min-height: 105px; }
}
