/* Câu Cá Ao Làng — 3D prototype. Values follow .ai/output/design-system/tokens.css */
:root {
  --ds-fs-xs: 12px; --ds-fs-sm: 13px; --ds-text: #191b1d; --ds-text-muted: #606368; --ds-surface: #fff; --ds-surface-2: #f7f8f9; --ds-line: #e3e5e8;
  --ds-primary: #335fff; --ds-play: #00a862; --ds-play-dark: #008f53; --ds-danger: #e5374f; --ds-warn: #ffb020;
  --ds-glass: rgba(20, 60, 90, .78); --ds-glass-line: rgba(255, 255, 255, .55); --ds-glass-soft: rgba(5, 38, 70, .22);
  --ds-r-common: #7d8590; --ds-r-rare: #335fff; --ds-r-epic: #8a5cff; --ds-r-legend: #f09a1c;
  --ds-font: "Builder Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ds-s1: 4px; --ds-s2: 8px; --ds-s3: 12px; --ds-s4: 16px;
  --ds-r-lg: 12px; --ds-r-3xl: 18px; --ds-r-pill: 999px; --ds-tap: 44px;
  --ds-sh-pop: 0 10px 30px rgba(0, 0, 0, .18); --ds-sh-art: 0 3px 6px rgba(0, 0, 0, .4);
  --ds-z-bar: 45; --ds-z-modal: 80; --ds-z-toast: 90; --ds-t-fast: .12s; --ds-press: scale(.96);
  --ds-safe-l: var(--sal, env(safe-area-inset-left)); --ds-safe-t: var(--sat, env(safe-area-inset-top));
  --ds-safe-r: var(--sar, env(safe-area-inset-right)); --ds-safe-b: var(--sab, env(safe-area-inset-bottom));
  --ds-r-md: 10px; --ds-fs-lg: 17px; --ds-stroke-dark: #1d3a5a; --ds-line-strong: #c9ccd1; --ds-coin: #b87400; --ds-gem: #0a8fd0; --ds-bg: #f2f4f5; --ds-r-sm: 8px; --ds-r-2xl: 16px; --ds-primary-soft: #eef2ff; --ds-primary-dark: #2449d8;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f5c89a; font-family: var(--ds-font); color: var(--ds-text);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mb-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }

/* In-play HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: var(--ds-z-bar); }
#hud > * { pointer-events: auto; }
.rb { position: absolute; width: var(--ds-tap); height: var(--ds-tap); border-radius: 50%; border: 2px solid var(--ds-glass-line);
  background: var(--ds-glass); color: #fff; display: grid; place-items: center; padding: 0; box-shadow: var(--ds-sh-art); }
.rb svg { width: 24px; height: 24px; }
.rb:active, .act:active, .btn:active { transform: var(--ds-press); }
#btnBack { top: calc(10px + var(--ds-safe-t)); left: calc(10px + var(--ds-safe-l)); }
.tr { position: absolute; top: calc(10px + var(--ds-safe-t)); right: calc(10px + var(--ds-safe-r)); display: flex; gap: 8px; }
.tr .rb { position: static; }
#btnMotion.off { opacity: .75; filter: grayscale(1); }
/* Centred just under the top button row: the row is too full on phones to hold it */
.spot { position: absolute; top: calc(74px + var(--ds-safe-t)); left: 0; right: 0; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; overflow: hidden; text-overflow: ellipsis; padding: 6px 14px;
  background: var(--ds-glass-soft); color: #fff; font-size: 15px; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); white-space: nowrap; border-radius: 10px; }
.swing { position: absolute; top: calc(62px + var(--ds-safe-t)); right: calc(10px + var(--ds-safe-r)); width: 96px; height: 8px; border-radius: 4px;
  background: var(--ds-glass-soft); overflow: hidden; }
.swing i { display: block; height: 100%; width: 100%; background: var(--ds-play); transform-origin: left; transform: scaleX(0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Floating stick: rests faded in the lower-left, jumps under the thumb while walking */
.joy { position: absolute; left: calc(24px + var(--ds-safe-l)); bottom: calc(24px + var(--ds-safe-b)); width: 104px; height: 104px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); opacity: 1; pointer-events: none !important; box-shadow: var(--ds-sh-art); }
.joy .arr { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; opacity: .85; }
.joy b { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; padding: 4px 12px; border-radius: var(--ds-r-pill);
  background: var(--ds-glass); color: #fff; font-size: var(--ds-fs-sm); font-weight: 700; }
.joy.on b { display: none; }
.joy.hint i { animation: joyHint 1.6s ease-in-out infinite; }
@keyframes joyHint { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(0, -22px); } 75% { transform: translate(22px, 0); } }
.joy i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #bfe6ff); box-shadow: 0 2px 6px rgba(0, 40, 90, .5); }
.joy.on { opacity: 1; }
.act { position: absolute; right: calc(14px + var(--ds-safe-r)); bottom: calc(14px + var(--ds-safe-b)); width: 104px; height: 104px; border-radius: 50%;
  border: 3px solid #fff; background: var(--ds-play); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: .5px; box-shadow: var(--ds-sh-art); touch-action: none; padding: 0; }
.act .ic { width: 36px; height: 36px; }
.act .ring { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); transform: rotate(-90deg); pointer-events: none; }
.act .ring circle { fill: none; stroke: var(--ds-warn); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; }
.act.hot { background: var(--ds-danger); animation: pulse .35s ease-in-out infinite alternate; }
.act.reel { background: var(--ds-primary); }
.act.dim { background: var(--ds-r-common); }
@keyframes pulse { to { transform: scale(1.08); } }
.meter { position: absolute; right: calc(52px + var(--ds-safe-r)); bottom: calc(150px + var(--ds-safe-b)); width: 26px; height: min(190px, 42vh); border-radius: 13px;
  border: 2px solid #fff; background: linear-gradient(to top, var(--ds-warn) 0 28%, transparent 28% 82%, var(--ds-danger) 82%); box-shadow: var(--ds-sh-art); }
.meter .g { position: absolute; left: 0; right: 0; bottom: 28%; height: 54%; background: var(--ds-play); }
.meter i { position: absolute; left: -8px; right: -8px; height: 6px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px #1d3a5a; bottom: 0; transition: none; }
.meter span { position: absolute; top: 50%; right: 34px; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; color: #fff; font-size: 12px; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6); white-space: nowrap; }
.tip { position: absolute; left: 50%; bottom: calc(178px + var(--ds-safe-b)); transform: translateX(-50%); max-width: 78%; text-align: center; color: #fff; font-size: 15px;
  font-weight: 700; pointer-events: none; paint-order: stroke fill; -webkit-text-stroke: 3px var(--ds-stroke-dark); }
.toast { position: fixed; top: calc(140px + var(--ds-safe-t)); left: 50%; transform: translateX(-50%); z-index: var(--ds-z-toast); background: var(--ds-glass);
  color: #fff; padding: 10px 18px; border-radius: var(--ds-r-pill); font-weight: 700; font-size: 15px; max-width: calc(100% - 32px); width: max-content; text-align: center; box-shadow: var(--ds-sh-pop); pointer-events: none; }

/* Dialogs: small floating box (sheet) */
.sheet { position: fixed; inset: 0; z-index: var(--ds-z-modal); display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
/* Never taller than the screen (landscape phones): scroll inside instead of clipping the buttons */
.card { position: relative; width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: var(--ds-surface); border-radius: var(--ds-r-3xl); padding: 20px; box-shadow: var(--ds-sh-pop); text-align: center; }
.card h2 { margin: 0 0 8px; font-size: var(--ds-fs-lg); font-weight: 800; }
.card .x { position: absolute; top: 8px; right: 8px; width: var(--ds-tap); height: var(--ds-tap); border-radius: 50%; border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); display: grid; place-items: center; padding: 0; }
.card .x svg { width: 20px; height: 20px; }
.card .sub { margin: -4px 0 12px; color: var(--ds-text-muted); font-size: 13px; }
.card ul { text-align: left; padding-left: 20px; margin: 0 0 16px; font-size: 15px; line-height: 1.45; }
.card li { margin-bottom: 6px; }
.btn { display: block; width: 100%; min-height: var(--ds-tap); border-radius: var(--ds-r-md); border: 1px solid var(--ds-line); font-weight: 700; font-size: 15px; margin-top: 8px; }
.btn.main { background: var(--ds-play); border-color: var(--ds-play-dark); color: #fff; }
.btn.pri { background: var(--ds-primary); border-color: var(--ds-primary-dark); color: var(--ds-surface); }
.btn.sec { background: var(--ds-surface); color: var(--ds-text); }
.btns { display: flex; gap: 8px; } .btns .btn { flex: 1; }
.spotrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; margin-bottom: 8px; border-radius: var(--ds-r-lg);
  border: 1px solid var(--ds-line); background: var(--ds-surface); text-align: left; font-size: 15px; font-weight: 700; color: var(--ds-text); }
.spotrow small { display: block; font-weight: 400; color: var(--ds-text-muted); font-size: 13px; }
.spotrow.on { border-color: var(--ds-primary); box-shadow: inset 0 0 0 1px var(--ds-primary); }
.spotrow .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ds-warn); color: var(--ds-text); font-size: 14px; }
.spotrow.on .num { background: var(--ds-primary); color: #fff; }
/* Pond map: top-down sketch above a 2-column spot list (side by side when the phone is held sideways) */
.mapcard h2, .mapcard .sub { padding: 0 48px; }
.mapcard .sub { margin: 2px 0 8px; color: var(--ds-text-muted); font-size: 13px; }
#spotMap svg { display: block; width: 100%; max-width: 240px; aspect-ratio: 1; margin: 0 auto 8px; } /* aspect from the place's box (inline) */
#spotList { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
#spotList .spotrow { padding: 6px 8px; gap: 8px; font-size: 14px; }
#spotList .spotrow small { font-size: 12px; line-height: 1.3; }
.pm-land { fill: #9fcf6a; } .pm-water { fill: #4fa9d6; stroke: #2f7aa6; stroke-width: .8; }
.pm-lotus { fill: #3f8f3a; opacity: .75; } .pm-tree { fill: #2f6e2a; } .pm-house { fill: #b5643a; stroke: #4a2a14; stroke-width: .5; }
.pm-pier { stroke: #8a5a2b; stroke-width: 1.6; stroke-linecap: round; }
.pm-spot { cursor: pointer; } .pm-spot circle { fill: var(--ds-warn); stroke: #4a2a14; stroke-width: .6; }
.pm-spot.on circle { fill: var(--ds-primary); } .pm-spot text { font-size: 5.6px; font-weight: 800; text-anchor: middle; fill: var(--ds-text); }
.pm-spot circle.hit { fill: transparent; stroke: none; }
.pm-spot.on text { fill: #fff; } .pm-me { fill: var(--ds-danger); stroke: #fff; stroke-width: .6; }
@media (orientation: landscape) and (max-height: 560px) {
  .mapwrap { display: flex; gap: 10px; align-items: flex-start; }
  #spotMap { flex: 0 0 200px; } #spotMap svg { max-width: none; }
  #spotList { flex: 1; grid-template-columns: 1fr; max-height: calc(100vh - 130px); overflow: auto; }
}
.rar { display: inline-block; padding: 2px 10px; border-radius: var(--ds-r-pill); color: #fff; font-size: 12px; font-weight: 700; background: var(--ds-r-common); }
.kg { font-size: 30px; font-weight: 800; margin: 4px 0; }
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; } .stars svg { width: 28px; height: 28px; } .stars .off { opacity: .25; filter: grayscale(1); }
.rec { color: var(--ds-danger); font-weight: 800; margin-bottom: 8px; }

/* Method picker rows */
.mrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--ds-r-lg);
  border: 1px solid var(--ds-line); background: var(--ds-surface); text-align: left; color: var(--ds-text); font-size: 15px; }
.mrow.on { border-color: var(--ds-primary); box-shadow: inset 0 0 0 1px var(--ds-primary); }
/* Header text keeps clear of the close button */
#methodSheet .card h2, #methodSheet .card .sub { padding: 0 48px; }
.soon { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 8px 12px; border-radius: var(--ds-r-lg); background: var(--ds-surface-2);
  color: var(--ds-text-muted); font-size: 13px; line-height: 1.35; text-align: left; }
.soon svg { flex: none; width: 24px; height: 24px; }
.soon b { color: var(--ds-text); }
.mrow .mic { flex: none; width: 48px; height: 48px; border-radius: var(--ds-r-lg); background: var(--ds-surface-2); display: grid; place-items: center; }
.mrow .mic svg { width: 34px; height: 34px; }
.mrow .mtx { flex: 1; min-width: 0; }
.mrow .mtx b { display: block; font-size: 15px; font-weight: 800; }
.mrow small { display: block; color: var(--ds-text-muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.mrow small.fish { color: var(--ds-text); margin-top: 6px; }
.mrow .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ds-text-muted); }
.mrow .bar { display: block; height: 6px; border-radius: var(--ds-r-pill); background: var(--ds-line); margin-top: 3px; overflow: hidden; }
.mrow .bar b { display: block; height: 100%; background: var(--ds-play); }
.spotrow .fit { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: var(--ds-r-pill); background: var(--ds-play); color: var(--ds-surface); font-size: 12px; font-style: normal; font-weight: 700; }

/* Coins + level chip (opens the bag) */
.wal { position: absolute; top: calc(62px + var(--ds-safe-t)); left: calc(10px + var(--ds-safe-l)); display: flex; align-items: center; gap: 6px; min-height: var(--ds-tap); padding: 4px 12px 4px 6px;
  border-radius: var(--ds-r-pill); border: 2px solid var(--ds-glass-line); background: var(--ds-glass); color: var(--ds-surface); text-align: left; }
.wal > svg { width: 30px; height: 30px; }
.wal > span { display: flex; flex-direction: column; line-height: 1.1; }
.wal b { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 800; }
.wal em { font-style: normal; }
.wal small { white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ds-warn); }
.co { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.dot { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ds-danger); border: 2px solid var(--ds-surface); }
.card .gain { margin: 8px 0 0; font-size: 13px; color: var(--ds-text-muted); }
.mrow.lock { opacity: .6; }
.need { display: inline-block; padding: 1px 8px; border-radius: var(--ds-r-pill); background: var(--ds-surface-2); border: 1px solid var(--ds-line); color: var(--ds-text-muted); font-size: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
/* Bag sheet */
.card.bag { text-align: left; }
.card.bag h2 { text-align: center; margin: 6px 48px 14px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; }
.tabs button { min-height: var(--ds-tap); border-radius: var(--ds-r-md); border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); font-weight: 700; font-size: 13px; white-space: nowrap; padding: 0 4px; }
.tabs button.on { background: var(--ds-primary); border-color: var(--ds-primary); color: var(--ds-surface); }
.bag h3 { margin: 12px 0 2px; font-size: 15px; }
.bag .sub { text-align: center; margin: 6px 0; }
.bag .list { display: flex; flex-direction: column; gap: 6px; }
.bag .row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: var(--ds-r-lg); border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); text-align: left; }
.bag button.row { display: grid; grid-template-columns: 1fr auto; }
.bag button.row small { grid-column: 1; }
.bag button.row .pr { grid-row: 1 / 3; grid-column: 2; }
.bag .row.on { border-color: var(--ds-primary); box-shadow: inset 0 0 0 1px var(--ds-primary); }
.bag .row.off { opacity: .55; }
.bag .row .tx { flex: 1; min-width: 0; }
.bag .row b { font-size: 15px; font-weight: 800; }
.bag .row b em { font-style: normal; color: var(--ds-text-muted); font-size: 13px; }
.bag .row small { display: block; color: var(--ds-text-muted); font-size: 13px; line-height: 1.35; }
.bag .pr { font-weight: 800; white-space: nowrap; color: var(--ds-coin); }
.bag .pr.up::after { content: ' x1,5'; font-size: 12px; color: var(--ds-play-dark); }
.bag .bt { display: flex; flex-direction: column; gap: 4px; flex: none; }
.bag .bt .btn { margin: 0; min-height: var(--ds-tap); padding: 0 10px; font-size: 13px; white-space: nowrap; width: auto; }
.bag .use { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ds-play-dark); white-space: nowrap; }
.bag .st svg { width: 18px; height: 18px; } .bag .st svg.off { opacity: .2; }
.bag .hot { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--ds-r-lg); background: var(--ds-surface-2); border: 1px solid var(--ds-warn); font-size: 14px; }
.bag .empty { text-align: center; color: var(--ds-text-muted); margin: 20px 0; }
.btn.dim { opacity: .5; }
.daily { padding: 12px; border-radius: var(--ds-r-lg); border: 1px solid var(--ds-line); margin-bottom: 10px; }
.daily > b { display: block; font-size: 15px; }
.daily .bar { display: block; height: 8px; border-radius: var(--ds-r-pill); background: var(--ds-line); margin: 8px 0 4px; overflow: hidden; }
.daily .bar b { display: block; height: 100%; background: var(--ds-play); }
.daily small { color: var(--ds-text-muted); font-size: 13px; }
.bagcoin { position: absolute; top: 18px; left: 16px; display: flex; align-items: center; gap: 4px; font-weight: 800; color: var(--ds-coin); }
.bag small .st svg { width: 14px; height: 14px; vertical-align: -2px; }
.wal .gm { font-style: normal; color: var(--ds-surface); }
.tabs.t3 { grid-template-columns: repeat(3, 1fr); } .tabs.t2 { grid-template-columns: repeat(2, 1fr); }
.bag .btns { margin-top: 12px; }
/* Full screens: shop + ranking */
.scr { position: fixed; inset: 0; z-index: var(--ds-z-modal); overflow-y: auto; background: var(--ds-surface-2); padding: calc(10px + var(--ds-safe-t)) calc(12px + var(--ds-safe-r)) calc(16px + var(--ds-safe-b)) calc(12px + var(--ds-safe-l)); }
.scr > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.scr header { position: relative; display: flex; align-items: center; gap: 10px; min-height: var(--ds-tap); margin-bottom: 12px; }
.scr header .rb { position: static; background: var(--ds-surface); border: 1px solid var(--ds-line); color: var(--ds-text); box-shadow: none; }
.scr header h2 { flex: 1; margin: 0; font-size: var(--ds-fs-lg); font-weight: 800; }
.scr .money { display: flex; gap: 8px; }
.scr .money > span { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: var(--ds-r-pill); background: var(--ds-surface); border: 1px solid var(--ds-line); font-weight: 800; font-size: 14px; }
.scr .money > span:first-child { color: var(--ds-coin); }
.scr .sub { margin: -4px 0 10px; color: var(--ds-text-muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 8px; border-radius: var(--ds-r-2xl); border: 2px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); text-align: center; }
.item.on { border-color: var(--ds-primary); box-shadow: inset 0 0 0 1px var(--ds-primary); }
.item.locked { opacity: .6; } .item.locked .pv { filter: grayscale(.6); }
.item .tag { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border-radius: var(--ds-r-pill); background: var(--ds-text); color: var(--ds-surface); font-size: 12px; font-style: normal; font-weight: 700; }
.item .evtag { margin-top: 2px; padding: 2px 8px; border-radius: var(--ds-r-pill); background: var(--ds-cream, #fff8e0); color: var(--ds-cream-ink, #a8661a); font-size: var(--ds-fs-xs); font-style: normal; font-weight: 800; text-align: center; }
.item .cnt { position: absolute; top: 6px; right: 8px; font-size: 12px; font-style: normal; font-weight: 800; color: var(--ds-text-muted); }
.item .pv { width: 72px; height: 72px; margin-top: 8px; }
.item .pv svg, .pvbig svg { width: 100%; height: 100%; }
.item .nm { font-size: 14px; font-weight: 800; line-height: 1.25; }
.item .rr { font-size: 12px; font-weight: 700; }
.item .pay { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 800; }
.item .pay span { min-height: 24px; border-radius: var(--ds-r-sm); background: var(--ds-bg); display: flex; align-items: center; justify-content: center; gap: 3px; }
.item .pay .p1 { color: var(--ds-coin); } .item .pay .p1.ok { color: var(--ds-play-dark); } .item .pay .dim { opacity: .5; }
.item .pay .p2 { color: var(--ds-gem); } .item .pay .note { color: var(--ds-text-muted); font-size: 12px; font-weight: 600; } .item .pay .gap { visibility: hidden; }
.card.buy .pvbig { width: 120px; height: 120px; margin: 4px auto 8px; }
.card.buy .rar { display: inline-block; }
.card.buy .btns .btn { padding: 0 6px; }
.rrow { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; margin-bottom: 6px; border-radius: var(--ds-r-lg); background: var(--ds-surface); border: 1px solid var(--ds-line); }
.rrow.me { background: var(--ds-primary-soft); border-color: var(--ds-primary); }
.rrow .no { width: 28px; text-align: center; font-size: 15px; }
.rrow .av { width: 36px; height: 36px; display: grid; place-items: center; font-size: 24px; } .rrow .av img, .rrow .av svg { width: 36px; height: 36px; }
.rrow .nm { flex: 1; min-width: 0; } .rrow .nm b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rrow .nm small { color: var(--ds-text-muted); font-size: 12px; }
.rrow .sc { font-weight: 800; white-space: nowrap; }
#rankList .empty { text-align: center; color: var(--ds-text-muted); margin: 24px 0; }
.bagcoin .gm2 { font-style: normal; margin-left: 8px; color: var(--ds-gem); }

/* Step 3: night / rain veil over the 3D scene, under the HUD (the rain itself is drawn in 3D: js/rain.js) */
#veil { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: #142a5a; opacity: 0; mix-blend-mode: multiply; transition: opacity 2s; }
.clock { position: absolute; top: calc(112px + var(--ds-safe-t)); left: 0; right: 0; width: fit-content; margin: 0 auto; padding: 2px 10px; border-radius: var(--ds-r-pill);
  background: var(--ds-glass); color: #fff; font-size: var(--ds-fs-xs); font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); pointer-events: none !important; }
/* Places to fish: one scrolling row of chips (locked ones show the level) */
.maptabs { position: relative; display: flex; gap: var(--ds-s2); overflow-x: auto; margin: 0 -4px 8px; padding: 0 4px 2px; scrollbar-width: none; }
.maptabs::-webkit-scrollbar { display: none; }
.maptabs button { flex: none; min-height: var(--ds-tap); padding: 0 12px; border-radius: var(--ds-r-md); border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); font-weight: 700; font-size: var(--ds-fs-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.maptabs button.on { background: var(--ds-primary); border-color: var(--ds-primary); color: var(--ds-surface); }
.maptabs button[aria-disabled] { opacity: .45; }
.maptabs small { font-size: var(--ds-fs-xs); font-weight: 600; display: flex; align-items: center; gap: 2px; }
.maptabs small svg { width: 12px; height: 12px; }
.tabs.t5 { grid-template-columns: repeat(5, 1fr); gap: 4px; } .tabs.t5 button { font-size: var(--ds-fs-xs); padding: 0 2px; }
.bag .row .btn.sm { width: auto; margin: 0; padding: 0 16px; flex: none; }
.bag .row .done { color: var(--ds-play-dark); font-weight: 700; font-size: var(--ds-fs-sm); }

/* Step 4: shared pond chip + sheet */
.pondchip { position: absolute; top: calc(184px + var(--ds-safe-t)); left: calc(10px + var(--ds-safe-l)); display: flex; align-items: center; gap: 6px; min-height: var(--ds-tap); padding: 0 14px;
  border-radius: var(--ds-r-pill); border: 1px solid var(--ds-glass-line); background: var(--ds-glass); color: #fff; font-size: var(--ds-fs-sm); font-weight: 700; }
.pondchip .live { width: 10px; height: 10px; border-radius: 50%; background: var(--ds-play); box-shadow: 0 0 0 3px rgba(0, 168, 98, .3); }
.says { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.says button { min-height: var(--ds-tap); border-radius: var(--ds-r-md); border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-text); font-weight: 700; font-size: var(--ds-fs-sm); }
#pondSheet .row .av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ds-bg); flex: none; }
#pondSheet .row .av svg, #pondSheet .row .av img { width: 100%; height: 100%; }
#pondSheet .row .sw { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--ds-surface); box-shadow: 0 0 0 1px var(--ds-line); }

/* Step 5: contest bar (replaces the clock while the contest runs) + result card */
body.ct .clock { display: none; }
.contest { position: absolute; top: calc(112px + var(--ds-safe-t)); left: 0; right: 0; width: fit-content; max-width: calc(100% - 20px); margin: 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 14px; border-radius: var(--ds-r-pill); background: var(--ds-glass-soft); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); font-size: var(--ds-fs-sm); white-space: nowrap; }
.contest .ct-t { font-size: var(--ds-fs-md); min-width: 42px; font-variant-numeric: tabular-nums; }
.contest b { font-size: var(--ds-fs-md); }
.contest span.ct-op { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.contest .ct-x { width: var(--ds-tap); height: var(--ds-tap); border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; }
.contest .ct-x svg { width: 18px; height: 18px; }
#contestEnd .score { font-size: 36px; font-weight: 900; color: var(--ds-text); margin: 2px 0; }
#contestEnd .rw { margin: 4px 0 12px; padding: 0; list-style: none; text-align: center; color: var(--ds-text-muted); font-size: var(--ds-fs-sm); line-height: 1.7; }
#contestEnd .rw b { color: var(--ds-text); }
/* The toast sits under the contest bar while a match runs */
body.ct .toast { top: calc(176px + var(--ds-safe-t)); }

/* ===== Trang chủ tranh vẽ (design system 17/11/2026 — bố cục chuẩn: ‹ trên trái, loa + sách trên phải, logo + CHƠI, 4 ô đáy) ===== */
#scHome { position: fixed; inset: 0; z-index: 5; overflow: hidden; padding: 0; max-width: none; background: #e9c48e; animation: none; container-type: size; }
#scHome .hm-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
body:has(#scHome:not(.hidden)) .mb-nav { display: none !important; }
#scHome button { -webkit-appearance: none; appearance: none; font-family: inherit; }
.hm-back, .hm-gear { position: absolute; top: max(10px, env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); }
.hm-back { left: max(10px, env(safe-area-inset-left)); background: #fff; border: 3px solid #e3e5e8; color: #191b1d; font: 700 28px/1 system-ui; padding-bottom: 4px; }
.hm-gear { right: max(10px, env(safe-area-inset-right)); border-radius: 12px; background: linear-gradient(#5ab4ff, #2a6fd8); border: 3px solid #e8f7ff; color: #fff; }
.hm-gear svg { width: 26px; height: 26px; display: block; }
.hm-mute { display: none; position: absolute; left: 7px; right: 7px; top: 50%; height: 3px; background: #ff4d4d; border-radius: 2px; transform: rotate(-45deg); }
.hm-gear.off .hm-mute { display: block; }
.hm-book { top: calc(max(10px, env(safe-area-inset-top)) + 54px); border-radius: 50%; }
.hm-top { position: absolute; left: calc(max(10px, env(safe-area-inset-left)) + 52px); top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.hm-av { position: relative; flex: none; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 3px solid #d8a13a; background: #fff3d6; display: grid; place-items: center; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); cursor: pointer; }
.hm-av .me-avemo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; line-height: 1; border-radius: 50%; overflow: hidden; color: var(--px, #e5484d); font-weight: 900; }
.hm-lv { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 8px; background: #7a4a1c; border: 2px solid #d8a13a; color: #fff; font: 900 12px/1.2 system-ui, sans-serif; white-space: nowrap; }
.hm-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hm-xp, .hm-pts { display: none; }
.hm-bar { display: flex; align-items: center; gap: 4px; min-width: 84px; height: 32px; padding: 0 10px 0 4px; border-radius: 16px; background: var(--ds-glass); border: 2px solid var(--ds-glass-line); }
.hm-bar img { width: 24px; height: auto; flex: none; }
.hm-bar b { flex: 1; color: #fff !important; font: 900 14px/1 system-ui, sans-serif; text-align: center; }
.hm-stack { position: absolute; left: 0; right: 0; top: calc(max(10px, env(safe-area-inset-top)) + 64px); bottom: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqh; padding: 0 5cqw; }
.hm-logo { flex: 0 1 auto; min-height: 0; max-height: 16cqh; max-width: 84cqw; width: auto; height: auto; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .3)); pointer-events: none; }
.hm-hero { flex: 0 1 auto; min-height: 0; max-height: 28cqh; max-width: 72cqw; width: auto; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); pointer-events: none; }
.hm-play { flex: none; width: min(70cqw, 330px); padding: 1.2cqh 3cqw 1.4cqh; border-radius: 999px; text-align: center; color: #fff; background: linear-gradient(#8aea5a, #2fae2a 60%, #238a22); border: 4px solid #fff5cf; box-shadow: 0 5px 0 #1b6b1a, 0 9px 12px rgba(0, 0, 0, .35); }
.hm-play b { display: block; font: 900 clamp(26px, 5.2cqh, 44px)/1.05 "Arial Rounded MT Bold", system-ui, sans-serif; -webkit-text-stroke: .12em #1d6a1d; paint-order: stroke fill; letter-spacing: 2px; }
.hm-play small { display: block; font: 900 clamp(12px, 1.8cqh, 15px)/1.2 system-ui, sans-serif; -webkit-text-stroke: .2em #1d6a1d; paint-order: stroke fill; }
.hm-play:active, .hm-ic:active { transform: scale(.96); }
.hm-row { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 2cqw; }
.hm-ic { position: relative; width: min(21cqw, 96px); padding: 0; background: none; border: 0; box-shadow: none; color: #fff; }
.hm-ic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.hm-ic span { display: block; margin-top: -2px; text-align: center; font: 900 clamp(12px, 1.7cqh, 14px)/1.1 system-ui, sans-serif; -webkit-text-stroke: .22em var(--ds-stroke-dark); paint-order: stroke fill; white-space: nowrap; }
.hm-dot { position: absolute; top: 2px; right: 2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e5374f; border: 2px solid #fff; color: #fff; font: 900 12px/18px system-ui; font-style: normal; }
.hm-dot.hidden { display: none; }
#scHome .hm-seo { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
#scBook a.bk-link { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--skin-card-line, #e3e5e8); border-radius: 12px; background: var(--skin-card, #f7f8f9); color: var(--skin-ink, #191b1d); font-size: 15px; font-weight: 700; text-decoration: none; }
#scBook .bk-list { display: flex; flex-direction: column; gap: 8px; }
.hm-dot-s { min-width: 16px; width: 16px; height: 16px; padding: 0; top: 6px; right: 10px; }
.hm-av .me-avemo .dropsvg { width: 78%; height: 78%; display: block; }
/* Khung ngang thấp (điện thoại cầm ngang 844×390): logo + hình chính to hơn, gọn giữa thanh trên và 4 ô (như Người Que) */
@container (orientation: landscape) {
  .hm-stack { top: calc(max(10px, env(safe-area-inset-top)) + 58px); bottom: calc(max(10px, env(safe-area-inset-bottom)) + min(11cqw, 22cqh) + 22px); gap: 1.2cqh; }
  #scHome .hm-logo { max-height: 19cqh; max-width: 46cqw; }
  .hm-hero { max-height: 25cqh; max-width: 40cqw; }
  .hm-play { width: min(46cqw, 340px); padding: 0.8cqh 3cqw 1cqh; }
  .hm-play small { white-space: nowrap; font-size: clamp(12px, 3.2cqh, 15px); }
  .hm-play b { font-size: clamp(24px, 7cqh, 40px); }
  .hm-row { bottom: max(10px, env(safe-area-inset-bottom)); gap: 1.6cqw; }
  .hm-ic { width: min(11cqw, 22cqh, 96px); }
  .hm-ic span { font-size: clamp(12px, 3.2cqh, 14px); }
}

/* Bảng chọn cách chơi (hộp nổi): thẻ trắng, vạch màu bên trái theo loại (ao chung = online xanh dương, thi câu xếp hạng = cam như leo hạng, câu một mình = xanh lá nút Chơi) */
#scModes { display: flex; flex-direction: column; gap: var(--ds-s2, 8px); }
.mode { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px 10px 20px; overflow: hidden;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); background: var(--ds-surface); color: var(--ds-text); text-align: left; }
.mode::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--bar, var(--ds-line-strong)); }
.mode svg { flex: none; width: 32px; height: 32px; }
.mode b { display: block; font-size: 16px; font-weight: 800; }
.mode small { display: block; margin-top: 2px; color: var(--ds-text-muted); font-size: var(--ds-fs-sm); line-height: 1.35; }
.mode:active { transform: var(--ds-press); }
.m-pond { --bar: var(--ds-m-online, #335fff); }
.m-thi { --bar: var(--ds-m-ladder, #ff7a1a); }
.m-solo { --bar: var(--ds-play); }
#scHelp .help ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
#scHome .hm-av .me-avemo img { width: 74%; height: 74%; object-fit: contain; }
/* Cầm ngang thấp (design system "Phần chung bổ sung" 3): hình chính bên trái, cột logo → CHƠI bên phải */
@container (orientation: landscape) and (max-height: 560px) {
  #scHome .hm-stack { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; align-content: center; justify-items: center; align-items: center; column-gap: 4cqw; row-gap: 3cqh; }
  #scHome .hm-hero { grid-column: 1; grid-row: 1 / 3; max-height: 58cqh; max-width: 40cqw; }
  #scHome .hm-logo { grid-column: 2; grid-row: 1; max-height: 30cqh; max-width: 42cqw; align-self: end; }
  #scHome .hm-play { grid-column: 2; grid-row: 2; align-self: start; }
}

/* Fish art (28/11/2026): side picture of the species in the bag rows and on the catch card */
.bag .row .fpic { width: 64px; height: 40px; object-fit: contain; flex: none; }
.bag .row .fpic.unk { filter: brightness(0); opacity: .3; }
.card .cpic { display: block; width: min(260px, 72%); height: 92px; object-fit: contain; margin: 0 auto var(--ds-s2); }
@media (max-height: 500px) { .card .cpic { height: 56px; margin-bottom: var(--ds-s1); } }

/* Sheet skin "wood": small sheets take the colours of the painted home (owner 30/11/2026). */
body.mb-light { --skin-frame: #6b3d17; --skin-head: linear-gradient(#93592a, #6b3d17); --skin-head-ink: #fff3d6; --skin-line: #d8a13a;
  --skin-paper: #f4e6c6; --skin-card: #fffaf0; --skin-card-line: #d6b886; --skin-ink: #3a1d0c; --skin-muted: #765536; --skin-hover: #fff3dc; }
