/* Fablepaws Home (main menu, handoff 2026-10-17): scroll-free portrait screen, real UI over the art.
   Background is TEMPORARY (bg-menu.webp, the old royal arena): no clean forest-village art exists yet. */
.home2 { position: relative; flex: 1; min-height: 0; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; }
.h2-bg { position: absolute; inset: 0; z-index: -2; background: #1d2a14 center 35% / cover no-repeat; }
.h2-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 20, 28, .55), transparent 18%, transparent 55%, rgba(14, 26, 12, .55) 80%, rgba(8, 14, 8, .85)); }

/* top: profile · currencies · settings */
.h2-top { flex: none; display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px max(10px, env(safe-area-inset-left)); }
.h2-profile { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(70, 42, 20, .92), rgba(36, 21, 10, .92)); border: 1px solid #c58b2c; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.h2-avatar { position: relative; flex: none; }
.h2-avatar .pt-wrap.tiny { width: 40px; height: 40px; }
.h2-avatar .lvl { position: absolute; left: -4px; bottom: -4px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold1), var(--gold4)); color: #3a1a06; font: 700 11px/1 var(--display); border: 1px solid #fff1b8; }
.h2-who { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h2-who b { font: 15px/1.1 'Lilita One', var(--display); color: #fff3d6; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2-who .xp { display: block; width: 92px; height: 7px; margin: 0; }
.h2-top .hdr-res { margin-left: 0; }
.h2-top .pill { height: 34px; background: linear-gradient(180deg, rgba(70, 42, 20, .92), rgba(36, 21, 10, .92)); border-color: #c58b2c; }
.h2-top .icon-btn.big { background: linear-gradient(180deg, #6b4423, #3d2412); border: 2px solid #c58b2c; color: var(--gold1); }

/* logo in the upper third (the artist logo already carries the tagline) */
.h2-logo { flex: none; align-self: center; width: min(80%, 400px); margin-top: 1.5dvh; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }

/* the hero on the path: fills what is left between the logo and the Play button */
.h2-hero { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-end; margin-top: -2%; pointer-events: none; }
.h2-hero .glow { position: absolute; left: 50%; bottom: 4%; width: 90%; height: 70%; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 209, 102, .35), transparent 65%); }
.h2-hero .hero-art.full { position: relative; height: 100%; width: auto; max-width: 88%; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }

/* side navigation: separate wooden buttons, left Pets/Collection/Quests, right Shop/Events */
.h2-side { position: absolute; z-index: 2; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 92px); display: flex; flex-direction: column; gap: 8px; }
.h2-side.left { left: max(10px, env(safe-area-inset-left)); }
.h2-side.right { right: max(10px, env(safe-area-inset-right)); }
.hn { position: relative; width: 72px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px;
  background: radial-gradient(circle at 50% 30%, #8a5a2e, #4a2b14 70%); border: 2px solid #e0a83a;
  box-shadow: inset 0 0 0 2px rgba(58, 26, 6, .8), inset 0 3px 6px rgba(255, 220, 160, .25), 0 4px 10px rgba(0, 0, 0, .55); }
.hn img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.hn img.round { border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 38%, #f6c35c, #c4572a 55%, #3b140a); border: 1px solid #ffd666; }
.hn > .i { font-size: 34px; color: var(--gold1); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.hn span { font: 12px/1 'Lilita One', var(--display); color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; letter-spacing: .02em; }
.hn:active { transform: scale(.95); }
.hn.soon { filter: saturate(.45) brightness(.78); cursor: default; }
.hn em { position: absolute; top: -7px; right: -6px; font: 700 9px/1 system-ui, sans-serif; font-style: normal; padding: 3px 5px; border-radius: 7px; background: #3a3a3a; color: #e8e8e8; border: 1px solid #777; }

/* Play Adventure: the big gold action at the bottom centre */
.h2-play { flex: none; position: relative; z-index: 3; display: flex; justify-content: center; padding: 6px 12px max(12px, env(safe-area-inset-bottom)); }
.play-btn.ui-btn { width: min(70%, 300px); height: 80px; gap: 12px; color: #3a1a06; }
.play-btn .i { font-size: 40px; stroke-width: 1.8; }
.play-btn > span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.play-btn b { font: 34px/1 'Lilita One', var(--display); letter-spacing: .01em; text-shadow: 0 1px 0 rgba(255, 241, 184, .7); }
.play-btn small { font: 17px/1.05 'Lilita One', var(--display); letter-spacing: .02em; }

@media (max-height: 700px) {
  .h2-logo { width: min(70%, 340px); margin-top: 0; }
  .hn { width: 62px; height: 62px; border-radius: 15px; } .hn img { width: 34px; height: 34px; } .hn > .i { font-size: 28px; } .hn span { font-size: 11px; }
  .h2-side { gap: 6px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 80px); }
  .play-btn.ui-btn { height: 68px; } .play-btn b { font-size: 28px; } .play-btn small { font-size: 15px; } .play-btn .i { font-size: 32px; }
}
@media (max-width: 370px) { .h2-who .xp { width: 70px; } .h2-top .pill { padding-right: 8px; } }


/* art slots (assets/art/): delivered pictures in place of the current icons */
.play-btn img.compass { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
@media (max-height: 700px) {
  .play-btn img.compass { width: 38px; height: 38px; }
  /* short screens: the compact logo (no ribbon) saves height when it has been delivered */
  .h2-logo.has-compact { aspect-ratio: 2048 / 900; }
  .h2-logo.has-compact::before { background: var(--compact) center / contain no-repeat; -webkit-mask: none; mask: none; }
}
.bnav .bn-art { width: 28px; height: 28px; object-fit: contain; }
.bnav .bn.on .bn-art { filter: drop-shadow(0 0 6px rgba(255, 209, 102, .7)); }
.trophies .art.trophy { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; }
.scen .team .art.foe { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* ---------------------------------------------------------------- Home v2 (mockup 2026-10-19)
   The pet on its podium in the middle, square teal buttons at the sides, the big Play button, the bottom menu. */
.home2.v2 .h2-shade { background: linear-gradient(180deg, rgba(8, 20, 28, .5), transparent 16%, transparent 70%, rgba(6, 20, 22, .55)); }
.h2-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.home2.v2 .h2-side { top: 2dvh; bottom: auto; gap: 10px; }
.home2.v2 .hn { width: 76px; height: 78px; border-radius: 16px; gap: 0; justify-content: flex-end; padding-bottom: 6px;
  background: linear-gradient(180deg, rgba(22, 70, 74, .95), rgba(9, 36, 40, .97)); border: 2px solid #d8a840;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .5); }
.home2.v2 .hn img { width: 52px; height: 52px; margin-bottom: 1px; }
.home2.v2 .hn > .i { font-size: 38px; margin-bottom: 6px; }
.home2.v2 .hn span { font-size: 13px; }
.home2.v2 .hn.soon { filter: none; }
.home2.v2 .hn.soon img, .home2.v2 .hn.soon > .i { filter: saturate(.7) brightness(.85) drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }

.home2.v2 .h2-hero { flex: 1; margin-top: 0; padding-top: 4dvh; align-items: flex-end; }
.home2.v2 .h2-hero .hero-art.full { height: 64%; max-width: 70%; margin-bottom: 11%; z-index: 1; }
.h2-podium { position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: min(88%, 400px); height: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.home2.v2 .h2-play { position: relative; z-index: 3; margin-top: -9%; padding: 0 12px 10px; }
.home2.v2 .play-btn.ui-btn { width: min(78%, 330px); height: 76px; gap: 14px; justify-content: center; }
.home2.v2 .play-btn b { font: 40px/1 'Lilita One', var(--display); }
.home2.v2 .play-btn img.swords { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.home2.v2 .play-btn > .i { font-size: 44px; }

/* the player's avatar (raccoon-portrait slot) in the profile pill */
.h2-face { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2a6a70, #0b2629); border: 2px solid #d8a840; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.h2-face img { width: 112%; height: 112%; object-fit: cover; object-position: 50% 20%; }

/* bottom menu, as on the mockup: teal bar, round icon wells, the current page framed in gold (all screens) */
.bnav { gap: 4px; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, #123c40, #071c1f); border-top: 2px solid #d8a840; }
.bn { min-height: 62px; gap: 2px; border-radius: 14px; color: #d9efe9; font: 12px/1 'Lilita One', var(--display); letter-spacing: .01em; }
.bnav .bn-art { width: 36px; height: 36px; padding: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #1d5257, #0a2a2e); box-shadow: inset 0 0 0 1px rgba(216, 168, 64, .45); }
.bn .i { font-size: 24px; }
.bn.on { color: #fff3d6; background: linear-gradient(180deg, #1f5a5e, #0c2f33); border: 2px solid #d8a840; box-shadow: 0 0 10px rgba(255, 209, 102, .35); }

@media (max-height: 700px) {
  .home2.v2 .h2-side { top: 1dvh; gap: 6px; }
  .home2.v2 .hn { width: 64px; height: 66px; border-radius: 14px; } .home2.v2 .hn img { width: 42px; height: 42px; } .home2.v2 .hn span { font-size: 11px; }
  .home2.v2 .play-btn.ui-btn { height: 62px; } .home2.v2 .play-btn b { font-size: 32px; } .home2.v2 .play-btn img.swords { width: 46px; height: 46px; }
  .bn { min-height: 54px; } .bnav .bn-art { width: 30px; height: 30px; }
}

/* ---------------------------------------------------------------- wallet (economy 2026-10-19): three currencies in the top bar */
.cur-ic { width: 22px; height: 22px; object-fit: contain; flex: none; }
.pill .cur-ic { width: 22px; height: 22px; }
.pill .cur-svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.hdr-res { gap: 4px; }
.h2-top .pill, .hdr .pill { height: 30px; gap: 3px; padding: 0 8px 0 3px; }
.h2-top .pill b, .hdr .pill b { font: 13px/1 'Lilita One', var(--display); color: #fff3d6; min-width: 0; }
.h2-top .h2-profile { padding-right: 8px; }
@media (max-width: 380px) {
  .h2-top { gap: 4px; }
  .h2-top .h2-who b { font-size: 13px; }
  .h2-top .h2-who .xp { display: none; }
  .h2-top .pill, .hdr .pill { padding: 0 6px 0 2px; }
  .h2-top .pill .cur-ic, .hdr .pill .cur-ic { width: 19px; height: 19px; }
  .h2-top .icon-btn.big { width: 36px; height: 36px; }
}
/* result screen: what the level paid */
.tr2-reward { align-self: center; display: flex; gap: 8px; margin-top: 2px; }
.tr2-reward span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 3px 5px; border-radius: 14px; font: 18px/1 'Lilita One', var(--display); color: #fff3d6;
  background: rgba(20, 12, 4, .78); border: 1px solid #c58b2c; box-shadow: 0 3px 8px rgba(0, 0, 0, .45); animation: rewardIn .4s 1.3s both ease-out; }
.tr2-reward .cur-ic { width: 26px; height: 26px; }
@keyframes rewardIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .tr2-reward span { animation: none; } }
/* shop on the economy settings: price buttons carry the currency icon; "short" = not enough in the wallet */
.product .price { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: 14px/1 'Lilita One', var(--display); }
.product .price .cur-ic { width: 18px; height: 18px; }
.product .price.short { filter: saturate(.4) brightness(.8); }
.product .price.real { flex-direction: column; gap: 1px; font-size: 13px; } .product .price.real small { font: 700 9px/1 system-ui, sans-serif; opacity: .8; }
.product .gives { display: flex; justify-content: center; gap: 6px; color: #fff3d6; } .product .gives span { display: inline-flex; align-items: center; gap: 3px; } .product .gives .cur-ic { width: 16px; height: 16px; }
.pr-art .pr-cur { width: 52px; height: 52px; }

/* ---------------------------------------------------------------- economy admin (web/screens-admin.js) */
.admin .content { display: flex; flex-direction: column; gap: 10px; }
.ad-note { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.35; color: #f6dfb0; background: rgba(0, 0, 0, .55); border: 1px solid var(--gold5); }
.ad-note .i { vertical-align: -2px; }
.ad-wallet { display: grid; gap: 6px; }
.ad-cur { display: grid; grid-template-columns: 24px 1fr 110px; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); }
.ad-num, .ad-txt, .ad-sel { height: 34px; min-width: 0; padding: 0 8px; border-radius: 8px; font: 600 14px system-ui, sans-serif; color: #fff3d6; background: #120d07; border: 1px solid #6b5220; }
.ad-num { width: 100%; text-align: right; }
.ad-num:focus, .ad-txt:focus, .ad-sel:focus { outline: 2px solid var(--gold1); outline-offset: 0; }
.ad-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ad-btns .ui-btn { flex: 1 1 140px; height: 40px; font-size: 13px; }
.ad-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.ad-row label { flex: none; font-size: 12px; color: var(--t3); }
.ad-row .ad-txt { flex: 1; } .ad-row .ad-txt.wide { font-weight: 700; }
.ad-row .ad-num { flex: 0 0 90px; } .ad-row .ad-sel { flex: 1; }
/* level rewards: one row per level, coins 1-3 stars then crystals 1-3 stars */
.ad-lv { display: grid; grid-template-columns: 38px repeat(6, minmax(0, 1fr)); gap: 3px; align-items: center; margin: 3px 0; }
.ad-lv > span { font: 700 11px/1 system-ui, sans-serif; color: var(--t2); white-space: nowrap; overflow: hidden; }
.ad-lv.head > span { display: flex; align-items: center; justify-content: center; gap: 1px; font-size: 10px; color: var(--t3); }
.ad-lv.head .cur-ic { width: 14px; height: 14px; }
.ad-lv .ad-num { height: 30px; padding: 0 4px; font-size: 13px; text-align: center; }
.ad-lv.boss > span { color: var(--gold1); }
.ad-prods { display: grid; gap: 8px; }
.ad-prod { padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--s3); }
.ad-del { width: 32px; height: 32px; flex: none; }
.ad-json { width: 100%; min-height: 90px; padding: 8px; border-radius: 8px; font: 12px/1.35 ui-monospace, Consolas, monospace; color: #e8ffe0; background: #0b0a06; border: 1px solid #6b5220; resize: vertical; }
/* result screen: the chest this battle earned (economy 2026-10-19) */
.tr2-chest { align-self: center; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 16px; background: rgba(20, 12, 4, .8); border: 1px solid #c58b2c; box-shadow: 0 3px 10px rgba(0, 0, 0, .5); animation: rewardIn .4s 1.3s both ease-out; }
.tr2-chest img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.tr2-chest:not(.open) img { animation: chestWiggle 1.6s 2s ease-in-out infinite; }
.tr2-chest b { font: 15px/1.1 'Lilita One', var(--display); color: #fff3d6; }
.tr2-open { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 14px; border-radius: 12px; font: 16px/1 'Lilita One', var(--display); color: #3a1a06; background: linear-gradient(180deg, var(--gold1), var(--gold4)); border: 2px solid #5c3208; }
.tr2-chest .tr2-reward { margin: 0; } .tr2-chest .tr2-reward span { animation-delay: 0s; padding: 2px 10px 2px 4px; font-size: 16px; } .tr2-chest .tr2-reward .cur-ic { width: 22px; height: 22px; }
@keyframes chestWiggle { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -8deg; } 82% { rotate: 7deg; } 88% { rotate: -4deg; } }
@media (prefers-reduced-motion: reduce) { .tr2-chest, .tr2-chest img { animation: none !important; } }
.product.chest .price { gap: 4px; }
.tr2-chest.open { animation: none; }

/* ---------------------------------------------------------------- account (2026-10-20): the profile opens the account dialog */
button.h2-profile { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.h2-profile:active { transform: scale(.98); }
.hdr .who[data-account] { cursor: pointer; }
.acc-body { display: flex; flex-direction: column; gap: 10px; }
.acc-note { margin: 0; font-size: 13px; line-height: 1.4; color: var(--t2); } .acc-note b { color: var(--gold1); } .acc-note .i { vertical-align: -2px; color: #6fd39a; }
.acc-tabs { display: flex; } .acc-tabs .seg { flex: 1; height: 38px; }
.acc-form { display: flex; flex-direction: column; gap: 8px; }
.acc-form .set-title { margin: 4px 0 0; }
.acc-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--t3); }
.acc-field input { height: 42px; padding: 0 12px; border-radius: 10px; font: 600 16px system-ui, sans-serif; color: #fff3d6; background: #120d07; border: 1px solid #6b5220; }
.acc-field input:focus { outline: 2px solid var(--gold1); outline-offset: 0; }
.acc-err { margin: 0; min-height: 1.2em; font-size: 13px; color: #ff8a80; }
.acc-go { height: 48px; }
.acc-hint { font-size: 11px; line-height: 1.35; color: var(--t3); }

/* login screen when the game is closed to guests (account-ui.js → screens.gate) */
.gate { position: relative; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); isolation: isolate; }
.gate-bg { position: absolute; inset: 0; z-index: -2; background: #1d2a14 center 30% / cover no-repeat; }
.gate::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 20, .35), rgba(8, 14, 20, .2) 30%, rgba(8, 10, 6, .85) 70%); }
.gate-logo { flex: none; width: min(78%, 360px); margin-top: 2dvh; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.gate-panel { width: min(400px, 100%); margin-top: auto; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(34, 26, 16, .95), rgba(13, 10, 6, .96)); border: 1px solid var(--gold4); box-shadow: 0 10px 30px rgba(0, 0, 0, .7); }
@media (max-height: 700px) { .gate-logo { width: min(62%, 280px); margin-top: 0; } }
