.play-wrap { padding: 36px 0 70px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 28px; align-items: start; justify-content: center; }
.game-card { background: linear-gradient(180deg, #fff6f1, #fdebe2); border: 1px solid var(--line); border-radius: 32px; padding: 20px 20px 18px; box-shadow: var(--shadow); position: relative; user-select: none; -webkit-user-select: none; }
.g-top { display: flex; align-items: center; justify-content: space-between; }
.g-stat { text-align: center; line-height: 1.1; }
.g-stat small { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); }
.g-stat b { font-family: var(--head); font-size: 1.7rem; color: var(--ink); }
.g-stat .of { font-size: .95rem; color: var(--muted); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 800 1rem var(--body); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none; }
.round-btn:hover { background: var(--coral-soft); }
.rule-chips { display: flex; gap: 8px; margin: 14px 0 8px; justify-content: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 12px; padding: 6px 10px; font: 800 .76rem var(--body); color: var(--ink); cursor: pointer; }
.chip .ri { width: 18px; height: 18px; display: inline-flex; } .ri svg { width: 100%; height: 100%; }
.rule-row .ri { width: 30px; height: 30px; flex: none; display: inline-flex; }
.c-coral { background: #fde4da; } .c-mint { background: #dcf5ea; } .c-lilac { background: #ebe5fb; }
.g-msg { text-align: center; font-weight: 800; color: var(--ink); margin: 6px 0 10px; min-height: 1.6em; font-size: .95rem; }
.tray { display: flex; justify-content: center; gap: 6px; margin: 0 auto 10px; background: #fff; border-radius: 999px; padding: 4px 12px; width: max-content; max-width: 100%; box-shadow: var(--shadow-sm); }
.tray .tf { width: 24px; height: 24px; opacity: .25; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .3s; }
.tray .tf.on { opacity: 1; filter: none; transform: scale(1.1); }
.board-wrap { background: #fff; border-radius: 24px; padding: 10px; box-shadow: 0 10px 26px -14px rgba(120,60,40,.4); }
.board { display: grid; gap: 6px; aspect-ratio: 1; touch-action: manipulation; }
.cell { position: relative; border: 0; border-radius: 12px; cursor: pointer; padding: 0; display: grid; place-items: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), inset 0 2px 0 rgba(255,255,255,.35); transition: transform .12s, filter .2s; }
.cell:hover { filter: brightness(1.05); }
.cell:active { transform: scale(.94); }
.cell .x { width: 46%; height: 46%; }
.cell.auto .x { opacity: .45; }
.cell .fishy { width: 74%; height: 74%; background: #fff; border-radius: 50%; display: grid; place-items: center; animation: pop .45s cubic-bezier(.2,1.6,.4,1); box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.cell .fishy svg { width: 78%; height: 78%; }
.cell.shake { animation: shake .4s; }
.cell.glow { box-shadow: 0 0 0 3px #fff3b0, 0 0 18px 4px rgba(255, 210, 60, .9); z-index: 2; animation: glow 1s infinite alternate; }
.board.dim .cell:not(.glow) { filter: saturate(.5) brightness(.75); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes glow { to { box-shadow: 0 0 0 3px #fff3b0, 0 0 26px 8px rgba(255, 210, 60, .95); } }
.float-label { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font: 800 .8rem var(--head); color: #2d8a63; background: #fff; padding: 1px 8px; border-radius: 999px; animation: rise 1s forwards; pointer-events: none; white-space: nowrap; z-index: 3; }
@keyframes rise { to { transform: translate(-50%, -24px); opacity: 0; } }
.g-bottom { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font: 800 .9rem var(--body); color: var(--ink); cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm); }
.pill-btn:hover { background: var(--coral-soft); }
.hint-bar { margin-top: 14px; background: #fff; border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; box-shadow: var(--shadow); border: 2px solid #ffe08a; }
.hint-text { font-weight: 700; font-size: .92rem; color: var(--ink); }
.hint-text b { display: block; color: #c98a00; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.hint-actions { display: flex; gap: 8px; align-items: center; }

/* side */
.side { display: grid; gap: 20px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 20px; box-shadow: var(--shadow-sm); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); padding: 4px; border-radius: 999px; margin-bottom: 16px; }
.tab { border: 0; background: none; padding: 9px; border-radius: 999px; font: 800 .92rem var(--body); color: var(--ink-2); cursor: pointer; }
.tab.active { background: #fff; color: var(--coral); box-shadow: var(--shadow-sm); }
.chapter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: center; }
.chapter-head small { display: block; font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chapter-head b { font-family: var(--head); font-size: 1.2rem; }
.ch-progress { height: 6px; background: var(--bg-2); border-radius: 99px; margin: 12px 0 16px; overflow: hidden; }
.ch-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coral-2), var(--coral)); border-radius: 99px; transition: width .4s; }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lvl { aspect-ratio: 1; border-radius: 50%; border: 0; font: 800 1rem var(--head); cursor: pointer; background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line), var(--shadow-sm); position: relative; }
.lvl.done { background: linear-gradient(180deg, #b9ecd2, #7fd3aa); color: #1f6b4a; box-shadow: var(--shadow-sm); }
.lvl.current { background: linear-gradient(180deg, #ffd27a, #f6a73b); color: #5a3300; box-shadow: 0 0 0 4px #ffe8b8, var(--shadow-sm); }
.lvl.playing { outline: 3px solid var(--coral); outline-offset: 2px; }
.lvl.locked { background: var(--bg); color: #d2b8ae; cursor: not-allowed; box-shadow: none; }
.lvl .st { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: .55rem; letter-spacing: -1px; color: #f0b400; white-space: nowrap; }
.daily-box { text-align: center; background: linear-gradient(180deg, #fff3ea, #fde3d8); border-radius: 20px; padding: 22px; }
.daily-ico { width: 64px; height: 64px; margin: 0 auto; background: #fff; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; box-shadow: var(--shadow-sm); }
.streak { display: inline-flex; gap: 6px; align-items: center; background: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 800; color: var(--ink); }
.tank { position: relative; height: 170px; margin: 14px 0; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #c9ecff, #7cc6ef); box-shadow: inset 0 0 0 4px rgba(255,255,255,.7); }
.tank .sand { position: absolute; left: -10%; right: -10%; bottom: -30px; height: 60px; background: #f4dca8; border-radius: 50%; }
.tank .swim { position: absolute; width: 36px; height: 36px; animation: swim linear infinite; }
.tank .bubble { position: absolute; bottom: 10px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8); animation: bubble 5s linear infinite; }
.tank .empty { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.2); text-align: center; padding: 20px; }
@keyframes swim { 0% { transform: translateX(-50px) scaleX(1); } 49% { transform: translateX(calc(var(--w) + 10px)) scaleX(1); } 50% { transform: translateX(calc(var(--w) + 10px)) scaleX(-1); } 99% { transform: translateX(-50px) scaleX(-1); } 100% { transform: translateX(-50px) scaleX(1); } }
@keyframes bubble { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-160px); opacity: 0; } }
.fish-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fish-item { background: var(--bg); border-radius: 14px; padding: 8px 4px; text-align: center; font-size: .72rem; font-weight: 800; color: var(--ink-2); }
.fish-item svg { width: 30px; height: 30px; margin: 0 auto 2px; display: block; }
.fish-item.locked svg { filter: grayscale(1); opacity: .3; }
.toggle { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .9rem; color: var(--ink-2); margin-top: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--coral); }
.muted { color: var(--muted); }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(70, 40, 40, .45); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal-card { position: relative; background: linear-gradient(180deg, #fffaf6, #fdeee6); border-radius: 28px; padding: 28px; width: min(420px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 30px 60px -20px rgba(80,30,20,.5); animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.modal-x { position: absolute; top: 16px; right: 16px; }
.rule-row { display: flex; gap: 12px; align-items: center; border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; font-size: .9rem; color: var(--ink-2); }
.rule-row span { font-size: 1.3rem; } .rule-row b { color: var(--ink); }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.ctrl-grid div { background: #fff; border-radius: 12px; padding: 10px; font-size: .88rem; text-align: center; color: var(--ink-2); }
.win-card { text-align: center; overflow: hidden; }
.mini-board { display: grid; gap: 3px; width: 150px; margin: 0 auto 14px; background: #fff; padding: 6px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.mini-board div { aspect-ratio: 1; border-radius: 4px; display: grid; place-items: center; }
.mini-board svg { width: 80%; height: 80%; background: #fff; border-radius: 50%; }
.stars { font-size: 2rem; letter-spacing: 4px; margin: 6px 0 12px; }
.stars .off { filter: grayscale(1); opacity: .3; }
.win-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; text-align: left; }
.win-row small { color: var(--muted); font-weight: 700; }
.win-row b { font-family: var(--head); font-size: 1.15rem; }
.win-row svg { width: 22px; height: 22px; }
.win-next { background: #fff3c9; border-radius: 14px; padding: 10px 14px; font-size: .9rem; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(540deg); opacity: .2; } }

@media (max-width: 960px) {
  .play-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}
@media (max-width: 420px) {
  .game-card { padding: 14px 12px; border-radius: 24px; }
  .board { gap: 4px; }
  .cell { border-radius: 9px; }
  .chip { font-size: .7rem; padding: 5px 8px; }
}
