/* ================= Bể Cá Thủy Sinh — MonBlock ================= */
:root {
  --bg: #0d1117; --panel: #151c26; --panel-2: #1b2431; --line: #2b3646; --txt: #e8eef6; --muted: #93a3b8; --accent: #ffcf5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--txt); font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 14px 28px; }
.screen { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h2 { font-size: 17px; margin: 18px 0 10px; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; }


/* ---------- the tank: full screen, always landscape (portrait phones get the whole view rotated by main.js fit()) ---------- */
/* Water blue behind the tank: game-light.css paints body.mb-light light grey and Safari tints its toolbar with it. */
body.in-tank, body.mb-light.in-tank { overflow: hidden; background: #0e2a3a !important; }
html:has(body.in-tank) { background: #0e2a3a !important; }
body.in-tank .wrap { max-width: none; padding: 0; }
#scPlay { animation: none; }
.tankview { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; overflow: hidden; transform-origin: 0 0; background: #0e2a3a; touch-action: none; user-select: none; -webkit-user-select: none; z-index: 30; }
#tank { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
html { --ls-bg: #0e2a3a; }
/* Turned by sdk/land.js (phone upright): the right edge is the phone's bottom — home bar + the part Safari's toolbar covers right now (--ls-tbr). */
html.ls .tankview { --sl: var(--sal); --sr: calc(var(--sar) + var(--ls-tbr, 0px)); }
.tankview { --sl: env(safe-area-inset-left); --sr: env(safe-area-inset-right); }
.tankview .glass { background: rgba(8, 28, 48, .72); border: 1.5px solid rgba(150, 215, 255, .45); box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18); }

/* Top-left: exit + profile card (avatar, level, XP, chest) + money pills. */
.hud-l { position: absolute; z-index: 5; left: calc(8px + var(--sl)); top: 8px; display: flex; align-items: flex-start; gap: 6px; }
.hud-x { width: 44px; height: 44px; flex: none; padding: 0; border: 1.5px solid rgba(150, 215, 255, .5); border-radius: 50%; background: rgba(8, 28, 48, .7); color: #fff; font-size: 22px; font-weight: 900; line-height: 1; }
.me-box { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; }
.mb-av { grid-row: 1 / 3; width: 58px; height: 58px; border-radius: 14px; border: 3px solid #ffd45a; background: linear-gradient(#9fe4ff, #3a9ad8); overflow: hidden; display: grid; place-items: center; font-size: 34px; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
.mb-av img, .mb-av svg { width: 100%; height: 100%; object-fit: cover; }
.mb-col { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 12px; background: rgba(8, 28, 48, .62); border: 1.5px solid rgba(150, 215, 255, .45); }
.mb-col > b { color: #fff; font-size: 14px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.mb-xp { display: block; width: 74px; height: 9px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; border: 1px solid rgba(0, 0, 0, .3); }
.mb-xp i { display: block; height: 100%; background: linear-gradient(#8af06a, #2ab84a); transform-origin: left; transform: scaleX(0); }
.pot { position: relative; width: 40px; height: 36px; padding: 0; border: 0; background: none; }
.pot img { width: 40px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.pot b { position: absolute; right: -6px; bottom: -4px; min-width: 20px; padding: 0 4px; border-radius: 9px; background: #ffb21a; color: #4a2a00; font-size: 11px; font-weight: 900; text-align: center; border: 1.5px solid #fff; }
.pot.some img { animation: potBob 1.4s ease-in-out infinite; }
.pot.full b { background: #e8463a; color: #fff; }
@keyframes potBob { 50% { transform: translateY(-2px) rotate(-4deg); } }
@keyframes potGlow { from { box-shadow: 0 0 0 0 rgba(255, 210, 74, .9); } to { box-shadow: 0 0 0 6px rgba(255, 210, 74, 0); } }
.mb-money { display: flex; gap: 6px; }
.money { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border-radius: 16px; background: rgba(8, 28, 48, .7); border: 1.5px solid rgba(255, 210, 100, .55); color: #fff; font-size: 13px; font-weight: 900; white-space: nowrap; }
.money.gem { border-color: rgba(190, 150, 255, .6); }

/* Top-right: water bars (reference: clean %, oxygen %, temperature). Tap = full test kit. */
.water { position: absolute; z-index: 6; right: calc(8px + var(--sr)); top: 8px; width: 238px; padding: 6px 10px; border-radius: 14px; cursor: pointer; color: #fff; }
.water .wb { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.water .wi { flex: none; width: 22px; height: 22px; font-style: normal; }
.water .wi svg { width: 22px; height: 22px; display: block; }
.wbar { position: relative; flex: 1; height: 18px; border-radius: 9px; background: rgba(0, 0, 0, .45); overflow: hidden; border: 1px solid rgba(255, 255, 255, .25); }
.wbar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); border-radius: 9px; }
.wbar em { position: relative; display: block; padding-left: 8px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 17px; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); white-space: nowrap; }
.wb.clean .wbar i { background: linear-gradient(#5ad8ff, #1a8ad8); }
.wb.oxy .wbar i { background: linear-gradient(#8af0ff, #2ab0c8); }
.wb.temp .wbar i { background: linear-gradient(#ffb06a, #e8563a); }
.wbar.bad { border-color: #ff6a5a; box-shadow: 0 0 0 1.5px #ff6a5a; }
.water .wb > b { flex: none; width: 44px; text-align: right; font-size: 13px; font-weight: 900; }
.wp-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 12px; }
.wp-more p { display: flex; justify-content: space-between; margin: 0; padding: 2px 0; }
.wp-more p.bad b { color: #ff8a7a; }
.wp-more .wtype { justify-content: center; font-weight: 900; color: #9fe4ff; }

/* Right column (reference): mission scroll · group · ranking — small round-cornered tiles under the water bars. */
.side-btns { position: absolute; z-index: 5; right: calc(8px + var(--sr)); top: 112px; display: flex; flex-direction: column; gap: 6px; }
.side-btns button { position: relative; display: flex; flex-direction: column; align-items: center; width: 62px; padding: 3px 2px 3px; border: 2px solid rgba(150, 215, 255, .55); border-radius: 14px; background: rgba(8, 28, 48, .62); color: #fff; }
.side-btns img { width: 38px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.side-btns small { font-size: 10.5px; font-weight: 800; white-space: nowrap; line-height: 1.15; text-align: center; }
.side-btns small em { display: block; font-style: normal; color: #ffd86a; font-size: 10px; }
.side-btns .quests { background: linear-gradient(rgba(255, 238, 190, .95), rgba(232, 200, 130, .95)); border-color: #b8853a; color: #5a3410; }
.side-btns .quests small em { color: #1a8a3a; }
.side-btns .quests.ready { animation: potGlow 1s ease-in-out infinite alternate; }
.qbadge { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: #e8302a; color: #fff; font-style: normal; font-size: 13px; font-weight: 900; line-height: 18px; text-align: center; border: 2px solid #fff; animation: potBob 1s ease-in-out infinite; }

/* Bottom: seven glossy tiles; ▾ folds the bar into a small handle (phones). */
.bar { position: absolute; z-index: 5; left: 50%; bottom: calc(4px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 5px; padding: 4px 6px; border-radius: 16px;
  background: linear-gradient(rgba(10, 40, 70, .35), rgba(6, 22, 40, .6)); border: 1.5px solid rgba(150, 215, 255, .35); transition: transform .2s ease, opacity .2s ease; }
html.ls .tankview .bar { bottom: 4px; }
.bar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 66px; height: 60px; padding: 2px 2px 3px; border: 2px solid #8ad0ff; border-radius: 13px;
  background: linear-gradient(#3ab0f0 0%, #1a78c8 55%, #0e4e98 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #0a3468, 0 4px 6px rgba(0, 0, 0, .3); color: #fff; }
.bar button .bi { display: block; width: 42px; height: 40px; filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, .35)); }
.bar button .bi img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bar button small { font-size: 10.5px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.bar button:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 1px 0 #0a3468; }
.bar .dot, .bar-open .dot { position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: #e8302a; border: 2px solid #fff; }
.bar .bar-fold { width: 26px; height: 26px; align-self: center; justify-content: center; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; background: rgba(8, 28, 48, .7); border-color: rgba(150, 215, 255, .6); box-shadow: none; }
.tankview.folded .bar { transform: translate(-50%, 130%); opacity: 0; pointer-events: none; }
.bar-open { position: absolute; z-index: 5; left: 50%; bottom: calc(4px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 64px; height: 24px; padding: 0; border: 1.5px solid rgba(150, 215, 255, .6); border-radius: 12px 12px 8px 8px; background: rgba(8, 28, 48, .7); color: #fff; font-size: 16px; line-height: 1; }
html.ls .tankview .bar-open { bottom: 4px; }


.statusline { position: absolute; z-index: 4; left: 50%; top: 10px; transform: translateX(-50%); max-width: 40%; padding: 5px 12px; border-radius: 16px; background: rgba(232, 70, 58, .9); color: #fff; font-weight: 800; font-size: 12.5px; text-align: center; pointer-events: none; }
.fishtag { position: absolute; z-index: 6; left: 0; top: 0; display: grid; grid-template-columns: auto auto; align-items: center; gap: 1px 6px; padding: 5px 10px; border-radius: 12px; background: rgba(10, 20, 30, .82); color: #fff; font-size: 13px; cursor: pointer; will-change: transform; }
.fishtag small { grid-column: 1 / -1; color: #ffd86a; font-weight: 800; }
.fishtag .mood { width: 14px; height: 14px; border-radius: 50%; background: #2ac86a; }
.fishtag .mood.meh { background: #ffc83a; }
.fishtag .mood.sick { background: #e8463a; }
.fishtag .mini { grid-column: 1 / -1; display: block; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.fishtag .mini i { display: block; height: 100%; background: #ff5a7a; transform-origin: left; }
.fishtag .mini.food i { background: #ffb04a; }
.toastbox { position: absolute; z-index: 90; left: 50%; top: 54px; transform: translateX(-50%); pointer-events: none; }
.toastbox .toast { position: static; transform: none; white-space: nowrap; }

/* Dock (owner 06/11/2026, reference picture): panels from the bottom bar never cover the tank — a category column on the left
   (blue header, rows with icon · name · count, chosen row yellow) + an item tray along the bottom with ‹ › arrows. */
.dock { --trayH: 150px; --sideW: 214px; animation: none; }
.tankview.sheet-on .bar, .tankview.sheet-on .bar-open, .tankview.sheet-on .side-btns, .tankview.sheet-on .statusline, .tankview.sheet-on .qpop { display: none; }
.dk-side { position: absolute; z-index: 20; left: calc(8px + var(--sl)); top: 76px; bottom: calc(var(--trayH) + 14px); width: var(--sideW); display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(236, 244, 255, .94); border: 2px solid #8ac4ff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); color: #1a2a4a; }
.dk-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; background: linear-gradient(#3a9cf0, #1a64c8); color: #fff; }
.dk-head img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.dk-head b { flex: 1; min-width: 0; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.sh-x { flex: none; width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; font-size: 14px; font-weight: 900; }
.dk-tabs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.dk-tabs button { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1.5px solid transparent; border-radius: 10px; background: rgba(255, 255, 255, .75); color: #1a2a4a; font-weight: 800; font-size: 13px; text-align: left; }
.dk-tabs button img { flex: none; width: 30px; height: 30px; object-fit: contain; }
.dk-tabs button span { flex: 1; min-width: 0; line-height: 1.15; }
.dk-tabs button em { flex: none; min-width: 26px; padding: 1px 6px; border-radius: 10px; background: #2a7ae8; color: #fff; font-style: normal; font-size: 11px; font-weight: 900; text-align: center; }
.dk-tabs button.on { background: linear-gradient(#fff3b0, #ffd860); border-color: #e8a820; }
.dk-info { flex: none; max-height: 46%; overflow-y: auto; padding: 0 8px 8px; font-size: 12px; scrollbar-width: none; }
.dk-info:empty { display: none; }
.dk-info .note { margin: 4px 0; color: #3a4a6a; font-size: 11.5px; line-height: 1.35; }
.dk-info .pri.wide { width: 100%; margin-top: 6px; padding: 7px; border: 0; border-radius: 10px; background: #00a862; color: #fff; font-weight: 900; font-size: 13px; }
.dk-info .pri.wide:disabled { opacity: .45; }

.dk-tray { position: absolute; z-index: 20; left: calc(8px + var(--sl)); right: calc(8px + var(--sr)); bottom: calc(6px + env(safe-area-inset-bottom)); height: var(--trayH); display: flex; align-items: stretch; gap: 4px; padding: 6px;
  border-radius: 16px; background: linear-gradient(rgba(24, 64, 120, .9), rgba(10, 32, 70, .94)); border: 2px solid #6ab4ff; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
html.ls .tankview .dk-tray { bottom: 6px; }
.dk-money { display: none; }
.dk-arrow { flex: none; width: 28px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 24px; font-weight: 900; }
.dk-row { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; touch-action: pan-x; }
.dk-row::-webkit-scrollbar { display: none; }
.dk-row > .note { color: #cfe4ff; align-self: center; padding: 0 10px; }
.dk-row .item { flex: none; width: 116px; height: 100%; scroll-snap-align: start; position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 5px 6px; margin: 0;
  border: 2px solid #b8dcff; border-radius: 12px; background: linear-gradient(#ffffff, #e4f0ff); color: #1a2a4a; box-shadow: none; overflow: hidden; }
.dk-row .item .pv { flex: 1 1 auto; min-height: 0; width: 100%; max-width: none; object-fit: contain; aspect-ratio: auto; border-radius: 8px; }
.dk-row .item .pv.ic { padding: 6px; }
.dk-row .item b { font-size: 12px; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dk-row .item .rar { font-size: 9.5px; }
.dk-row .item .desc { font-size: 10px; line-height: 1.2; color: #5a6a8a; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dk-row .item .it-pay { margin-top: 2px; gap: 2px; padding-top: 0; }
.dk-row .item .pp { padding: 2px 4px; border-radius: 8px; font-size: 11.5px; text-align: center; }
.dk-row .item .pp-only, .dk-row .item .pp-gap { display: none; }
.dk-row .item .cnt { position: absolute; z-index: 2; left: 4px; top: 3px; padding: 0 6px; border-radius: 8px; background: #1a64c8; color: #fff; font-style: normal; font-size: 11px; font-weight: 900; }
.dk-row .item .lk { top: 4px; left: 4px; right: 4px; font-size: 10px; }
.dk-row .item.active { border-color: #00a862; background: linear-gradient(#f0fff6, #d8f6e4); }
.dk-row .item.on { border-color: #ffb21a; background: linear-gradient(#fffbe8, #ffeeb0); }
.dk-row .item.want { border-color: #ffb21a; box-shadow: 0 0 0 2px #ffe08a inset; }
.dk-row .item.poor .pv { opacity: .55; }
.dk-row .item.fish { width: 150px; }
.dk-row .stages { margin-top: 2px; gap: 3px; }
.dk-row .stages button { padding: 1px 2px; border-radius: 7px; }
.dk-row .stages button b { font-size: 10.5px; }
.dk-row .stages button small { font-size: 10px; }

/* Decor tools: round buttons above the tray (reference: Xoá · Xoay · Di chuyển · Lên/Xuống · Thu hồi), name of the chosen piece, ✓ Xong. */
.dk-tools { position: absolute; z-index: 21; left: calc(var(--sideW) + 24px + var(--sl)); right: calc(8px + var(--sr)); bottom: calc(var(--trayH) + 12px); display: flex; align-items: flex-end; justify-content: center; gap: 8px; pointer-events: none; }
.dk-tools > * { pointer-events: auto; }
.dk-tools .dt-name { align-self: center; padding: 4px 10px; border-radius: 12px; background: rgba(8, 28, 48, .7); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.dk-tools button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0; border: 0; background: none; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.dk-tools button i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #8ad0ff; background: linear-gradient(#3a9cf0, #1a5ab8); font-style: normal; font-size: 18px; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.dk-tools button small { font-size: 10.5px; font-weight: 800; }
.dk-tools button:disabled { opacity: .45; }
.dk-tools .dt-done { align-self: center; padding: 8px 16px; border-radius: 12px; background: linear-gradient(#ffd860, #f0a020); color: #4a2a00; font-weight: 900; font-size: 14px; text-shadow: none; border: 2px solid #fff3b0; }

/* Info boxes inside the side column. */
.okline { margin: 4px 0; padding: 6px 8px; border-radius: 10px; background: #eaf8ee; color: #1f8a3e; font-weight: 800; }
.warnline { margin: 4px 0; padding: 6px 8px; border-radius: 10px; background: #fff1e8; border: 1px solid #ffc6a0; color: #8a3a10; font-size: 11.5px; }
.sicklist { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.sk { display: flex; align-items: center; gap: 6px; padding: 2px 6px 2px 2px; border-radius: 10px; background: #fff1f0; border: 1px solid #ffc0b8; font-size: 11.5px; }
.sk .mini { width: 34px; height: 26px; object-fit: contain; }
.sk b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk small { color: #b8302a; font-weight: 800; white-space: nowrap; }
.watercard { display: flex; flex-direction: column; gap: 4px; padding: 8px; margin: 4px 0; border-radius: 12px; color: #fff; }
.watercard.fresh { background: linear-gradient(135deg, #2a9a6a, #2a7ab8); }
.watercard.salt { background: linear-gradient(135deg, #1a5ab8, #2a2a8a); }
.watercard b { font-size: 14px; }
.watercard small { opacity: .9; font-size: 11px; }
.watercard .pri { padding: 6px 8px; border: 2px solid #fff; border-radius: 10px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 900; font-size: 12px; }
.watercard .bad { color: #ffe0a0; }
.eqcur { display: flex; align-items: center; gap: 6px; margin: 4px 0; padding: 4px; border-radius: 10px; background: #fff; border: 1px solid #cfe0f4; }
.eqcur .pv.sm { width: 44px; height: 44px; object-fit: contain; flex: none; }
.eqcur > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.eqcur b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eqcur small { color: #5a6a8a; font-size: 11px; }
.cond { display: block; width: 100%; height: 7px; border-radius: 5px; background: #dfe6ee; overflow: hidden; }
.cond i { display: block; height: 100%; background: #2ab84a; transform-origin: left; }
.cond.mid i { background: #ffb21a; }
.cond.bad i { background: #e8463a; }

/* Friends / ranking popovers (same small panel as the mission scroll, glass blue). */
.qpop.spop { width: 210px; background: linear-gradient(rgba(236, 244, 255, .97), rgba(214, 232, 255, .97)); border-color: #6ab4ff; color: #1a2a4a; }
.qpop.spop::before { background: linear-gradient(#3a9cf0, #1a64c8); }
.qpop.spop .qh { color: #1a4a9a; }
.plist { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.plist li { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 8px; background: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 800; }
.plist li.me { background: #fff3b0; }
.plist li > i { flex: none; width: 18px; text-align: center; font-style: normal; color: #1a64c8; font-weight: 900; }
.pav { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: #cfe4ff; display: grid; place-items: center; font-size: 16px; }
.pav > * { width: 100%; height: 100%; }
.pav.on::after { content: ''; position: absolute; right: 0; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: #2ac86a; border: 1.5px solid #fff; }
.pnm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pnm small { color: #5a6a8a; font-size: 10.5px; font-weight: 700; }
.pnote { margin: 4px 0 6px; font-size: 12px; color: #3a4a6a; }
.pseg { display: flex; gap: 4px; margin-bottom: 5px; }
.pseg button { flex: 1; padding: 3px; border: 1.5px solid #6ab4ff; border-radius: 8px; background: #fff; color: #1a4a9a; font-weight: 800; font-size: 11.5px; }
.pseg button.on { background: #1a64c8; color: #fff; }
.qpop.spop > button { background: #1a64c8; }

/* Short landscape phones (phone held sideways / rotated). */
body.short .dock { --trayH: 108px; --sideW: 158px; }
body.short .dk-side { top: 58px; border-radius: 12px; }
body.short .dk-head { padding: 4px 4px 4px 6px; }
body.short .dk-head img { width: 22px; height: 22px; }
body.short .dk-head b { font-size: 13px; }
body.short .sh-x { width: 24px; height: 24px; font-size: 12px; }
body.short .dk-tabs { padding: 4px; gap: 3px; }
body.short .dk-tabs button { padding: 2px 4px; font-size: 11.5px; gap: 4px; }
body.short .dk-tabs button img { width: 22px; height: 22px; }
body.short .dk-tabs button em { min-width: 22px; font-size: 10px; padding: 0 4px; }
body.short .dk-info { font-size: 11px; padding: 0 6px 6px; }
body.short .dk-tray { padding: 4px; border-radius: 12px; }
body.short .dk-arrow { width: 22px; font-size: 20px; }
body.short .dk-row { gap: 5px; }
body.short .dk-row .item { width: 88px; padding: 3px 3px 4px; border-radius: 10px; }
body.short .dk-row .item.fish { width: 118px; }
body.short .dk-row .item b { font-size: 10.5px; }
body.short .dk-row .item .rar, body.short .dk-row .item .desc { display: none; }
body.short .dk-row .item .pp { font-size: 10px; padding: 1px 3px; }
body.short .dk-row .item.fish .pv { max-height: 30px; }
body.short .dk-row .stages button { padding: 0 1px; }
body.short .dk-row .stages button b { font-size: 9px; }
body.short .dk-row .stages button small { font-size: 9px; }
body.short .dk-tools button i { width: 32px; height: 32px; font-size: 15px; }
body.short .dk-tools button small { font-size: 9px; }
body.short .dk-tools .dt-done { padding: 5px 10px; font-size: 12px; }
body.short .qpop.spop { width: 176px; }
.stages { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: auto; }
.stages button { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border: 1.5px solid #f0c060; border-radius: 10px; background: #fff8e4; color: #6a4200; }
.stages button b { font-size: 12px; }
.stages button small { font-size: 11px; font-weight: 800; }
.stages button:disabled { opacity: .45; }

/* Short landscape phones: smaller HUD, slim toolbar (owner 05/11/2026: the bottom bar was in the way). */
body.short .hud-l { top: 6px; }
body.short .mb-av { width: 42px; height: 42px; border-radius: 11px; border-width: 2px; }
body.short .mb-col { padding: 2px 4px 2px 8px; }
body.short .mb-col > b { font-size: 12px; }
body.short .mb-xp { width: 56px; height: 7px; }
body.short .pot, body.short .pot img { width: 32px; height: 28px; }
body.short .money { font-size: 11.5px; padding: 2px 8px 2px 5px; }
body.short .water { width: 178px; padding: 3px 7px; top: 6px; }
body.short .water .wb { margin: 2px 0; }
body.short .wbar { height: 14px; }
body.short .wbar em { line-height: 13px; font-size: 9.5px; padding-left: 6px; }
body.short .water .wb > b { width: 38px; font-size: 11.5px; }
body.short .water .wi, body.short .water .wi svg { width: 17px; height: 17px; }
body.short .side-btns { top: 82px; gap: 4px; }
body.short .side-btns button { width: 50px; border-radius: 11px; padding: 2px 1px; }
body.short .side-btns img { width: 28px; height: 24px; }
body.short .side-btns small { font-size: 9px; }
body.short .bar { gap: 4px; padding: 3px 5px; border-radius: 13px; }
body.short .bar button { width: 50px; height: 44px; border-radius: 11px; border-width: 1.5px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 2px 0 #0a3468; }
body.short .bar button .bi { width: 32px; height: 30px; }
body.short .bar button small { font-size: 8.5px; }
body.short .bar .bar-fold { width: 22px; height: 22px; font-size: 13px; }
@media (max-height: 300px) { body.short .side-btns #btnGroup { display: none; } }
@media (max-height: 340px) { body.short .side-btns #btnShareIn { display: none; } }


/* Group / ranking tiles like the reference: dark glass tile, flat vector icon, white label. */
.side-btns .sb-ic { background: linear-gradient(rgba(20, 52, 92, .82), rgba(8, 26, 52, .88)); border: 1.5px solid rgba(140, 200, 255, .55); box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .2); padding: 5px 2px 4px; }
.side-btns .sb-ic svg { width: 40px; height: 33px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
body.short .side-btns .sb-ic svg { width: 30px; height: 25px; }

/* Mission popover: small parchment beside the right column. */
.qpop { position: absolute; z-index: 7; right: calc(78px + var(--sr)); top: 112px; width: 196px; padding: 8px 10px 9px; border-radius: 6px 6px 12px 12px;
  background: linear-gradient(#fff3d0, #efd49a); border: 2px solid #b8853a; color: #4a2e10; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.qpop::before { content: ''; position: absolute; left: -5px; right: -5px; top: -6px; height: 9px; border-radius: 5px; background: linear-gradient(#c8955a, #8a5a2a); }
.qpop .qh { position: relative; display: block; text-align: center; font-size: 14px; font-weight: 900; color: #7a3e10; margin-bottom: 4px; }
.qpop .qh .qbadge { right: -4px; top: -4px; }
.qpop ul { list-style: none; margin: 0; padding: 0; }
.qpop li { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 5px; font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.qpop li > i { flex: none; width: 13px; height: 13px; margin-top: 1px; border-radius: 3px; border: 2px solid #b8853a; background: #fff; }
.qpop li.done > i { background: #2ab84a; border-color: #1a8a3a; }
.qpop li span { flex: 1; min-width: 0; }
.qpop li em { display: block; height: 5px; margin-top: 3px; border-radius: 3px; background: rgba(120, 80, 30, .25); overflow: hidden; }
.qpop li em i { display: block; height: 100%; background: #2ab84a; transform-origin: left; }
.qpop button { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 3px 6px; border: 0; border-radius: 8px; background: #00a862; color: #fff; font-weight: 900; font-size: 12px; }
.qpop button:disabled { background: rgba(120, 80, 30, .2); color: #6a4a20; }
.qpop button img { width: 22px; height: 20px; object-fit: contain; }
.qpop .qok { margin: 0; text-align: center; color: #1a8a3a; font-weight: 900; font-size: 12px; }
body.short .qpop { right: calc(62px + var(--sr)); top: 82px; width: 170px; padding: 6px 8px 7px; }
body.short .qpop li { font-size: 10.5px; margin-bottom: 3px; }


/* ---------- shop cards, dialogs, ranking page, help (restored: lost in the v2 rewrite) ---------- */
.shop-top { display: flex; justify-content: flex-end; gap: 16px; margin: 4px 0; font-size: 17px; font-weight: 800; }
.tabs { display: flex; gap: 6px; margin: 6px 0 10px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.tabs button img { width: 26px; height: 26px; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-h { grid-column: 1 / -1; margin: 8px 2px 0; font-size: 15px; }
.item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); text-align: center; }
.item .pv { width: 100%; max-width: 128px; aspect-ratio: 1; border-radius: 12px; }
.item b { font-size: 14px; }
.item .rar { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.item .desc { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
/* Price block pinned to the card bottom: two fixed rows (🪙, then 💎 / "chỉ xu" / empty) so a row of cards lines up. */
.item .it-pay { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.item .pp { display: block; padding: 5px 6px; border-radius: 10px; font-size: 13px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .pp-coin { background: #fff3d2; border: 1.5px solid #f0c060; color: #8a5600; }
.item .pp-gem { background: #f1e8ff; border: 1.5px solid #c9b2ff; color: #6a36d0; }
.item .pp-only { border: 1.5px dashed #e2cfaa; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.item .pp-st { background: #e8f8ec; border: 1.5px solid #9ad8a8; color: #1f8a3e; }
.item .pp-gap { visibility: hidden; border: 1.5px solid transparent; }
.item.poor .pp-coin, .item.poor .pp-gem { opacity: .6; }
.item .lk { position: absolute; z-index: 2; top: 6px; left: 6px; right: 6px; padding: 3px 6px; border-radius: 8px; background: rgba(40, 24, 10, .78); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.locked .pv, .item.locked > b, .item.locked .desc, .item.locked .it-pay { opacity: .55; }
.buyprev { display: flex; justify-content: center; margin: 4px 0 8px; }
.buyprev img { max-width: 100%; border-radius: 12px; }
.buyprev .tryimg { width: 100%; max-width: 360px; }

.qlist { list-style: none; padding: 0; }
.qlist li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.qlist li i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9ccd1; display: grid; place-items: center; font-style: normal; color: #fff; }
.qlist li.done i { border-color: #00a862; background: #00a862; }
.qlist small { margin-left: auto; color: var(--muted); }
.txt { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; }

/* ---------- leaderboard / help / dialogs ---------- */
.rank .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rank .no { width: 28px; color: var(--muted); font-weight: 800; text-align: center; }
.rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rank .nm small { color: var(--muted); font-weight: 600; }
.rank .sc { font-weight: 900; color: #b87400; }
.help { line-height: 1.6; }
.help ul { padding-left: 20px; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 12, .72); }
.dialog { width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.dialog h3 { margin: 0 0 8px; font-size: 20px; }
.dialog p { line-height: 1.5; }
.dialog .rw { padding-left: 18px; line-height: 1.8; font-weight: 700; }
.dlg-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dlg-btns button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-weight: 800; }
.dlg-btns button.pri { border-color: #335fff; background: #335fff; color: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(80px + var(--sab, 0px)); z-index: 90; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: #222c3a; color: #fff; font-weight: 700; }
.updatebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.updatebar button { padding: 8px 12px; border: 0; border-radius: 10px; font-weight: 800; }
#btnSound { border: 0; background: none; font-size: 20px; }

/* Dock v2 (owner 06/11/2026: "bảng bên trái tốn nhiều diện tích"): ONE slim strip on top of the item tray — icon + title,
   category chips, a short note, ✕ — so the tank above stays free. Richer info (sick fish, current gear, breeding) is the
   first card of the tray. */
.dock { --trayH: 140px; --stripH: 34px; }
.dk-side { position: absolute; z-index: 20; top: auto; left: calc(8px + var(--sl)); right: calc(8px + var(--sr)); bottom: calc(var(--trayH) + 4px + env(safe-area-inset-bottom));
  width: auto; height: var(--stripH); flex-direction: row; align-items: center; gap: 6px; padding: 0 4px 0 6px; overflow: hidden;
  border-radius: 14px 14px 0 0; border: 2px solid #6ab4ff; border-bottom: 0; background: rgba(24, 64, 120, .94); box-shadow: none; color: #fff; }
html.ls .tankview .dk-side { bottom: calc(var(--trayH) + 4px); }
.dk-head { display: contents; }
.dk-head img { flex: none; width: 24px; height: 24px; }
.dk-head b { flex: none; max-width: 30%; font-size: 14px; }
.dk-side .sh-x { order: 9; margin-left: auto; width: 26px; height: 26px; font-size: 12px; }
.dk-tabs { flex: 0 1 auto; min-width: 0; height: 100%; flex-direction: row; align-items: center; gap: 4px; padding: 0; overflow-x: auto; overflow-y: hidden; }
.dk-tabs button { flex: none; height: 26px; padding: 0 7px 0 3px; gap: 4px; border-radius: 13px; font-size: 12px; white-space: nowrap; }
.dk-tabs button img { width: 20px; height: 20px; }
.dk-tabs button em { min-width: 18px; padding: 0 5px; font-size: 10px; }
.dk-info { flex: 1 1 0; min-width: 40px; max-height: none; overflow: hidden; padding: 0; }
.dk-info .note { margin: 0; color: #cfe4ff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-info .note + .note { display: none; }
.dk-tray { left: calc(8px + var(--sl)); border-radius: 0 0 16px 16px; }
.dk-tools { left: calc(8px + var(--sl)); bottom: calc(var(--trayH) + var(--stripH) + 12px + env(safe-area-inset-bottom)); }
html.ls .tankview .dk-tools { bottom: calc(var(--trayH) + var(--stripH) + 12px); }
.dk-row .item.infocard { width: 210px; align-items: stretch; justify-content: flex-start; gap: 3px; overflow-y: auto; text-align: left; font-size: 11.5px; scrollbar-width: none; }
.dk-row .item.infocard .note { margin: 2px 0; color: #3a4a6a; font-size: 11px; line-height: 1.3; }
.dk-row .item.infocard .pri.wide { width: 100%; margin-top: 4px; padding: 6px; border: 0; border-radius: 10px; background: #00a862; color: #fff; font-weight: 900; font-size: 12px; }
.dk-row .item.infocard .pri.wide:disabled { opacity: .45; }
.dk-row .item.infocard .pv { flex: none; height: auto; }
.dk-row .item .pv { flex: 1 1 0; height: 0; min-height: 0; }
.dk-row .item.fish .pv { flex: 0 0 40px; height: 40px; }
body.short .dock { --trayH: 108px; --stripH: 30px; }
body.short .dk-side { top: auto; }
body.short .dk-tabs button { height: 23px; font-size: 11px; }
body.short .dk-tabs button img { width: 17px; height: 17px; }
body.short .dk-row .item.infocard { width: 180px; }
body.short .dk-row .item.fish .pv { flex-basis: 26px; height: 26px; }
.dk-row .stages button small, .dk-row .stages button b { white-space: nowrap; }
body.short .dk-row .item.fish { width: 134px; }
/* Fish market card (06/11/2026): picture + name / rarity · layer on top, then a 2×2 grid of one-line stage buttons, so it fits the slim tray. */
.dk-row .item.fish { width: 196px; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto 1fr; column-gap: 6px; row-gap: 1px; align-items: center; text-align: left; }
.dk-row .item.fish .pv { grid-column: 1; grid-row: 1 / 3; width: 54px; height: 40px; flex: none; }
.dk-row .item.fish > b { grid-column: 2; text-align: left; }
.dk-row .item.fish .rar { grid-column: 2; display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-row .item.fish .stages { grid-column: 1 / 3; align-self: end; margin: 2px 0 0; gap: 3px; }
.dk-row .item.fish .stages button { flex-direction: row; justify-content: space-between; gap: 2px; padding: 2px 5px; }
.dk-row .item.fish .stages button b, .dk-row .item.fish .stages button small { font-size: 10px; }
body.short .dk-row .item.fish { width: 178px; }
body.short .dk-row .item.fish .pv { height: 30px; width: 48px; }
body.short .dk-row .item.fish .rar { display: block; font-size: 9px; }
body.short .dk-row .item.fish .stages button { padding: 1px 4px; }
.dk-row .item.fish { width: 214px; }
.dk-row .item.fish .rar { text-transform: none; }
.dk-row .item.fish .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dk-row .item.fish .stages button { min-width: 0; overflow: hidden; }
body.short .dk-row .item.fish { width: 200px; }
/* Bottom bar centred in the part of the tank not under Safari's toolbar. */
html.ls .tankview .bar, html.ls .tankview .bar-open { left: calc(50% - var(--ls-tbr, 0px) / 2); }
/* 07/11/2026 (owner): lists scroll by swiping (main.js dragScroll, no arrow buttons); the buy box fits the tank height (it
   lives inside the rotated tank view, so 100dvh was the phone's long side and the buttons fell off-screen).
   */
.dk-arrow { display: none; }
.dk-row, .dk-tabs { touch-action: none; cursor: grab; }
.tankview .modal { position: absolute; padding: 10px; }
.tankview .dialog { max-height: calc(var(--VH, 100vh) - 20px); padding: 12px 14px; }
.tankview .dialog h3 { font-size: 17px; margin-bottom: 4px; }
.tankview .dialog p { margin: 4px 0; }
.tankview .dialog .buyprev { margin: 2px 0 4px; }
.tankview .dialog .buyprev img, .tankview .dialog .buyprev .tryimg { width: auto; max-width: 100%; max-height: calc(var(--VH, 400px) * 0.3); }
.tankview .dlg-btns { position: sticky; bottom: -12px; margin: 8px -14px -12px; padding: 8px 14px 10px; background: var(--panel); }
/* 07/11/2026 (owner: "hộp mua nhỏ lại, danh sách gọn lại, để ngang dưới đáy"): buy box = small picture on the left, text +
   buttons on the right; the tray is slimmer with smaller cards (no description line) and stays along the bottom — in decor
   mode too, where zooming in moves the pieces above it. */
.tankview .dialog { width: min(380px, 92%); padding: 10px 12px; font-size: 13px; }
.tankview .dialog:has(.buyprev) { display: grid; grid-template-columns: 88px 1fr; column-gap: 12px; align-items: start; }
.tankview .dialog:has(.buyprev) > * { grid-column: 2; }
.tankview .dialog:has(.buyprev) > .buyprev { grid-column: 1; grid-row: 1 / span 6; align-self: center; margin: 0; }
.tankview .dialog:has(.buyprev) > .dlg-btns { grid-column: 1 / -1; }
.tankview .dialog h3 { font-size: 15px; margin: 0 0 2px; }
.tankview .dialog p { margin: 2px 0; line-height: 1.35; }
.tankview .dialog .buyprev img, .tankview .dialog .buyprev .tryimg { max-width: 88px; max-height: 72px; border-radius: 8px; }
.tankview .dlg-btns { margin: 6px -12px -10px; padding: 6px 12px 8px; gap: 6px; }
.tankview .dlg-btns button { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.dock { --trayH: 100px; --stripH: 28px; }
.dk-tray { padding: 4px; }
.dk-row { gap: 5px; }
.dk-row .item { width: 86px; padding: 3px 3px 4px; border-radius: 10px; }
.dk-row .item b { font-size: 10.5px; }
.dk-row .item .desc { display: none; }
.dk-row .item .rar { font-size: 9px; }
.dk-row .item .pp { padding: 1px 3px; font-size: 10px; }
.dk-row .item .cnt { font-size: 10px; padding: 0 4px; }
.dk-row .item.infocard { width: 170px; font-size: 10.5px; }
.dk-tabs button { height: 22px; font-size: 11px; }
.dk-tabs button img { width: 17px; height: 17px; }
.dk-head b { font-size: 13px; }
.dk-tools button i { width: 34px; height: 34px; font-size: 15px; }
.dk-tools button small { font-size: 9.5px; }
.dk-tools .dt-done { padding: 6px 12px; font-size: 12.5px; }
body.short .dock { --trayH: 92px; --stripH: 26px; }
/* 07/11/2026 (owner: "hộp mua nhỏ hơn nữa, hài hoà"): a small card — picture, name, one line of description, rarity; the
   price lives on the buttons only. ＋ on food / medicine cards buys another pack (the shop sheet is gone). */
.tankview .dialog { width: min(300px, 86%); padding: 10px 12px 0; border-radius: 16px; }
.tankview .dialog:has(.buyprev) { grid-template-columns: 56px 1fr; column-gap: 10px; }
.tankview .dialog .buyprev img, .tankview .dialog .buyprev .tryimg { max-width: 56px; max-height: 52px; }
.tankview .dialog h3 { font-size: 14px; line-height: 1.25; }
.tankview .dialog p { font-size: 12px; color: #4a5a72; }
.tankview .dialog .brar { font-size: 11px; }
.tankview .dlg-btns { justify-content: stretch; margin: 8px -12px 0; padding: 8px 12px 10px; border-top: 1px solid #e3e8ef; }
.tankview .dlg-btns button { flex: 1; padding: 7px 8px; font-size: 12.5px; }
.dk-row .item .buymore { position: absolute; z-index: 3; right: 4px; top: 3px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #00a862; color: #fff; font-size: 14px; font-weight: 900; line-height: 1; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.tankview .dlg-btns button { white-space: nowrap; }
/* Mission scroll: each finished mission pays on its own (owner 07/11/2026). */
.qpop { width: 214px; }
.qpop li .qpay { flex: none; align-self: center; padding: 2px 6px; border: 0; border-radius: 8px; background: #2ab84a; color: #fff; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.qpop li .qrw { flex: none; align-self: center; font-size: 10px; color: #8a5a2a; white-space: nowrap; }
.qpop li .qpaid { flex: none; align-self: center; color: #1a8a3a; font-size: 13px; }
body.short .qpop { width: 196px; }
.dk-row, .dk-tabs { scroll-snap-type: none; scroll-behavior: auto; overscroll-behavior: contain; }
.qpop { width: 236px; } body.short .qpop { width: 214px; }
/* Decor sets (owner 07/11/2026): wider cards with the laid-out tank as the picture. */
.dk-row .item.combo { width: 150px; }
.dk-row .item.combo .pv.wide { object-fit: cover; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
/* Set buy box: the laid-out tank across the top, text below (not the small side picture). */
.tankview .dialog:has(.buyprev.wide) { display: block; width: min(420px, 92%); }
.tankview .dialog .buyprev.wide { margin: 0 0 6px; }
.tankview .dialog .buyprev.wide img { width: 100%; max-width: 100%; max-height: calc(var(--VH, 400px) * 0.38); object-fit: cover; }
/* Quest rows (owner 07/11/2026: "xô lệch chèn lên"): tick | name + bar, reward / claim button on its own line under the name. */
.qpop li { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 7px; row-gap: 3px; align-items: start; padding-bottom: 6px; border-bottom: 1px dashed rgba(140, 90, 40, .25); }
.qpop li:last-child { border-bottom: 0; }
.qpop li > i { grid-row: 1 / span 2; }
.qpop li > span { grid-column: 2; overflow-wrap: anywhere; }
.qpop li .qpay, .qpop li .qrw, .qpop li .qpaid { grid-column: 2; justify-self: start; align-self: start; margin: 0; }
.qpop li .qpay { padding: 3px 10px; border-radius: 999px; font-size: 11px; box-shadow: 0 1px 0 #1a7a34; }
.qpop li .qpaid { font-size: 11px; font-weight: 800; }
/* Trial decor (owner 07/11/2026): Cancel + gem buy beside the gold Buy button. */
.dk-tools .dt-cancel, .dk-tools .dt-gem { align-self: center; padding: 6px 12px; border-radius: 12px; font-weight: 900; font-size: 12.5px; border: 2px solid rgba(255, 255, 255, .7); }
.dk-tools .dt-cancel { background: rgba(8, 28, 48, .75); color: #fff; }
.dk-tools .dt-gem { background: linear-gradient(#b48aff, #7a4ae0); color: #fff; }
.dk-tools .dt-done, .dk-tools .dt-gem, .dk-tools .dt-cancel { white-space: nowrap; }
.dk-tools .dt-done, .dk-tools .dt-gem { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; }

/* Event-limited items (sdk/events.js): a ribbon over the picture, the card gets a warm outline. */
.item.ev { box-shadow: inset 0 0 0 2px #7ac8ff; }
.item .evtag { position: absolute; z-index: 2; top: 6px; left: 6px; right: 6px; padding: 2px 6px; border-radius: 999px; background: linear-gradient(90deg, #3a8ae8, #8ad8ff); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.dk-row .item .evtag { top: 4px; left: 4px; right: 4px; font-size: 9.5px; }

/* Touch-size pass (game audit 09/11/2026: 11 buttons < 32 px and 48 texts < 11 px in the dock on a phone held upright). The tank
   view is rotated, not scaled, so these CSS px are the real size under the finger. Floor for the whole dock, short screens
   included: every tap target ≥ 44 px on its short side (the ＋ badge 32 px with a 44 px hit area), every text ≥ 12 px. The strip
   + tray still leave more than half of the tank visible on a 390 px tall view. Both plain and body.short selectors are listed so
   this block wins over the earlier, smaller body.short rules. */
.dock, body.short .dock { --stripH: 50px; --trayH: 124px; }
body.short .dock { --trayH: 112px; }
.dk-side, body.short .dk-side { gap: 6px; padding: 0 3px 0 8px; }
.dk-head img, body.short .dk-head img { width: 26px; height: 26px; }
.dk-head b, body.short .dk-head b { font-size: 14px; }
.dk-side .sh-x, body.short .dk-side .sh-x, body.short .sh-x { width: 44px; height: 44px; font-size: 16px; }
.dk-tabs, body.short .dk-tabs { gap: 6px; padding: 0; }
.dk-tabs button, body.short .dk-tabs button { height: 44px; padding: 0 10px 0 5px; gap: 5px; border-radius: 22px; font-size: 13px; }
.dk-tabs button img, body.short .dk-tabs button img { width: 26px; height: 26px; }
.dk-tabs button em, body.short .dk-tabs button em { min-width: 22px; padding: 1px 6px; font-size: 12px; }
.dk-info .note, body.short .dk-info .note { font-size: 12px; }
.dk-tray, body.short .dk-tray { padding: 5px; }
.dk-row, body.short .dk-row { gap: 6px; }
.dk-row > .note { font-size: 13px; }
.dk-row .item, body.short .dk-row .item { width: 104px; padding: 4px 4px 5px; gap: 2px; }
.dk-row .item b, body.short .dk-row .item b { font-size: 12.5px; line-height: 16px; }
.dk-row .item .rar { font-size: 12px; line-height: 14px; text-transform: none; letter-spacing: 0; }
body.short .dk-row .item:not(.fish) .rar { display: none; }
.dk-row .item .pp, body.short .dk-row .item .pp { padding: 1px 4px; font-size: 12px; line-height: 16px; }
.dk-row .item .cnt, .dk-row .item .lk, .dk-row .item .evtag { font-size: 12px; }
.dk-row .item .buymore { width: 32px; height: 32px; right: 2px; top: 2px; font-size: 18px; }
.dk-row .item .buymore::after { content: ''; position: absolute; inset: -6px; }
.dk-row .item.infocard, body.short .dk-row .item.infocard { width: 210px; font-size: 12px; }
.dk-row .item.infocard .note { font-size: 12px; }
.dk-row .item.infocard .pri.wide { min-height: 44px; font-size: 13px; }
/* Fish card: picture + name / rarity on top, then the stage buttons side by side, each two lines (stage · price) and 44 px tall. */
.dk-row .item.fish, body.short .dk-row .item.fish { width: auto; min-width: 200px; grid-template-columns: 48px 1fr; grid-template-rows: auto auto 1fr; }
.dk-row .item.fish .pv, body.short .dk-row .item.fish .pv { width: 48px; height: 34px; flex: none; }
.dk-row .item.fish .rar, body.short .dk-row .item.fish .rar { font-size: 12px; }
.dk-row .item.fish .stages, body.short .dk-row .item.fish .stages { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(62px, 1fr); gap: 4px; }
.dk-row .item.fish .stages button, body.short .dk-row .item.fish .stages button { min-height: 44px; flex-direction: column; justify-content: center; gap: 0; padding: 2px 4px; }
.dk-row .item.fish .stages button b, .dk-row .item.fish .stages button small,
body.short .dk-row .stages button b, body.short .dk-row .stages button small { font-size: 12px; line-height: 16px; }
/* Decor tools above the strip. */
.dk-tools, html.ls .tankview .dk-tools { gap: 6px; }
.dk-tools .dt-name, body.short .dk-tools .dt-name { font-size: 12px; }
.dk-tools button i, body.short .dk-tools button i { width: 44px; height: 44px; font-size: 18px; }
.dk-tools button small, body.short .dk-tools button small { font-size: 12px; }
.dk-tools .dt-done, .dk-tools .dt-gem, .dk-tools .dt-cancel,
body.short .dk-tools .dt-done { min-height: 44px; padding: 0 14px; font-size: 14px; }
/* Player card stays on screen while a sheet is open: the coin chest is a button too. */
body.short .pot, body.short .pot img { width: 38px; height: 34px; }
/* Water bars on short screens: labels stay ≥ 11 px (the bar grows 1 px instead). */
body.short .wbar { height: 16px; }
body.short .wbar em { line-height: 15px; font-size: 11px; }

/* ===== 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: #2a8fa0; 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: rgba(20, 60, 90, .78); border: 2px solid rgba(255, 255, 255, .55); }
.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 #4a2a14; 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, #scModes { display: flex; flex-direction: column; gap: 8px; }
#scModes .big { margin: 0; }
#scHelp .help ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.hm-dot-s { min-width: 16px; width: 16px; height: 16px; padding: 0; top: 6px; right: 10px; }
.hm-av .me-avemo { background: #3a2d24 center 30% / cover no-repeat; }
/* 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; }
  .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); }
}

/* Quick ways into the tank under CHƠI: one glass strip (like Tìm Đồ's "Chọn bức tranh") — breeding, decorating, collection */
.hm-tools { flex: none; display: flex; gap: 4px; margin-top: 1cqh; padding: 4px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 999px; background: rgba(20, 60, 90, .78); }
.hm-tools button { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: #fff; font: 800 13px/1.1 system-ui, sans-serif; white-space: nowrap; }
.hm-tools button img { width: 32px; height: 32px; flex: none; object-fit: contain; }
.hm-tools button:active { transform: scale(.96); background: rgba(255, 255, 255, .14); }
.hm-go { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1.6cqh; }
/* Missions sheet on the home: the tank's mission list, light card style, buttons ≥ 44 px */
#scQuest { display: flex; flex-direction: column; gap: 10px; }
#scQuest .note { margin: 0; font-size: 14px; color: #606368; }
.hq .qh { display: none; }
.hq ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hq li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid #e3e5e8; border-radius: 12px; background: #f7f8f9; }
.hq li > i { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 2px solid #b8853a; background: #fff; }
.hq li.done > i { background: #00a862; border-color: #00a862; }
.hq li > span { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: #191b1d; }
.hq li em { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: #e3e5e8; overflow: hidden; }
.hq li em i { display: block; height: 100%; background: #00a862; transform-origin: left; }
.hq .qpay { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: #00a862; color: #fff; font-size: 14px; font-weight: 800; }
.hq .qrw { flex-basis: 100%; padding-left: 28px; color: #606368; font-size: 13px; }
.hq .qpaid { color: #00a862; font-size: 14px; }
.hq > button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #00a862; color: #fff; font-size: 15px; font-weight: 800; }
.hq > button:disabled { background: #e3e5e8; color: #606368; }
.hq > button img { width: 32px; height: 28px; object-fit: contain; }
.hq .qok { margin: 0; text-align: center; color: #00a862; font-size: 15px; font-weight: 800; }
.hm-av .me-avemo { background: #bfe9f5 center / 88% no-repeat; }

/* Sheet skin "ocean": small sheets take the colours of the painted home (owner 30/11/2026). */
body.mb-light { --skin-frame: #1d4e6e; --skin-head: linear-gradient(#2f78a0, #1d4e6e); --skin-head-ink: #effaff; --skin-line: #7fd3e6;
  --skin-paper: #e6f3f6; --skin-card: #ffffff; --skin-card-line: #b8dbe4; --skin-ink: #12324a; --skin-muted: #46667a; --skin-hover: #f0fafc; }
