/* Home page + Arcade page only (body.polish). Builds on /styles.css: same palette, backdrop art and fonts.
   - one spacing scale (8 / 16 / 24 / 40), content up to 960px wide
   - one accent for actions: only the Arcade card Play buttons are copper; every other link/button is a quiet outline or text link
   - big game cards: animated preview fills the card, name over a soft gradient, top score as a small pill
   Text is 16px or larger everywhere. FTA, tank and the game pages never load this file. */
.polish {
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem;
  --edge: rgba(243, 238, 228, 0.6);          /* quiet outline */
  --edge-hover: rgba(243, 238, 228, 0.85);
  --panel: rgba(11, 26, 22, 0.78);
  --lift: 0 14px 34px rgba(0, 0, 0, 0.5);
  --radius: 0.875rem;
}

/* ---- layout: wide, centered, generous side padding ---- */
.polish .hub { max-width: 60rem; padding: var(--s3) var(--s3) var(--s3); }
@media (min-width: 48rem) { .polish .hub { padding: var(--s4) var(--s4) var(--s3); } }
.polish .section { margin-top: var(--s4); }
.polish .games-sec { margin-top: var(--s3); }
.polish .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); margin: 0 0 var(--s3); }
.polish .sec-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; letter-spacing: 0.04em; color: var(--ink); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.polish .sec-line { margin: 0.25rem 0 0; font-size: 1rem; line-height: 1.4; color: var(--ink-muted); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.polish .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-size: 1rem; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.polish .text-link:hover { text-decoration-thickness: 2px; }
.polish a:focus-visible, .polish button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---- hub hero: compact identity (h1 = Pesapane), banner ---- */
.polish .hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.polish .brand { display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.polish .brand .avatar { margin: 0; }
.polish .brand .avatar img { width: 3.5rem; height: 3.5rem; }
.polish .brand__text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.15; }
.polish .brand__name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.12em; color: var(--ink); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.polish .brand__handle { font-size: 1rem; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.04em; }
/* the one copper accent: Arcade card Play buttons */
.polish .game-card__play {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 var(--s3);
  border-radius: 0.75rem; border: 0; background: var(--accent); color: #0B1A16; font: 600 1.0625rem/1 var(--font-body);
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; box-shadow: 0 2px 0 #7a4f26, 0 8px 22px rgba(200, 136, 74, 0.28);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; -webkit-tap-highlight-color: transparent;
}
.polish .gcard:hover .game-card__play { background: var(--accent-soft); box-shadow: 0 2px 0 #7a4f26, 0 10px 28px rgba(200, 136, 74, 0.4); }

/* ---- game cards: 1 column on phones, 3-up on desktop ---- */
.polish .gcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 48rem) { .polish .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.polish .gcards > li { margin: 0; display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.polish .gcard {
  position: relative; display: flex; flex-direction: column; flex: 1 1 auto; overflow: hidden; border-radius: var(--radius);
  background: rgba(18, 40, 33, 0.95); border: 1px solid var(--edge); color: var(--ink); text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.polish .gcard:hover { transform: translateY(-4px); box-shadow: var(--lift); border-color: var(--edge-hover); }
.polish .gcard:active { transform: translateY(-1px) scale(0.99); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.polish .gcard:focus-visible { outline-offset: 4px; }
.polish .media { position: relative; display: block; overflow: hidden; background: #05100d; aspect-ratio: 1 / 1; }
@media (min-width: 48rem) { .polish .media { aspect-ratio: 4 / 5; } }
.polish .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
.polish .gcard__over { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 3.5rem var(--s2) var(--s2); background: linear-gradient(to top, rgba(5, 14, 11, 0.94) 0%, rgba(5, 14, 11, 0.7) 45%, rgba(5, 14, 11, 0) 100%); pointer-events: none; }
.polish .gcard__name { font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.1; letter-spacing: 0.03em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.polish .gcard__tag { display: inline-block; padding: 0.1rem 0.6rem; border: 1px solid var(--edge); border-radius: 999px; background: rgba(11, 26, 22, 0.85); color: var(--ink); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1.4; }
.polish .gcard__body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); flex: 1 1 auto; }
.polish .gcard__desc { font-size: 1rem; line-height: 1.4; color: var(--ink); }
.polish .game-card__play { align-self: stretch; margin-top: auto; }

/* top score: a small pill on the picture (real score; "No scores yet" when empty; hidden if it can't load) */
.polish .score { position: absolute; top: var(--s1); left: var(--s1); z-index: 1; display: inline-flex; align-items: baseline; gap: 0.4rem; max-width: calc(100% - var(--s2)); padding: 0.2rem 0.75rem; border-radius: 999px; background: rgba(11, 26, 22, 0.9); border: 1px solid var(--edge); color: var(--ink); font-size: 1rem; line-height: 1.4; }
.polish .score[hidden] { display: none; }
.polish .score b { font-weight: 600; color: #fff; white-space: nowrap; }
.polish .score small { font-size: 1rem; font-weight: 400; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.polish .score--empty b { font-weight: 500; color: var(--ink-muted); }

/* ---- quiet buttons and links (outline / text, readable) ---- */
.polish .links { display: grid; grid-template-columns: 1fr; gap: var(--s2); }
@media (min-width: 48rem) { .polish .links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.polish .link-btn { min-height: 4rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--edge); color: var(--ink); transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.polish .link-btn:hover { background: rgba(243, 238, 228, 0.1); border-color: var(--edge-hover); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); transform: translateY(-2px); }
.polish .link-btn:active { transform: translateY(0); }
.polish .link-btn__label { font-size: 1.125rem; font-weight: 600; }
.polish .link-btn__secondary { font-size: 1rem; letter-spacing: 0.02em; text-transform: none; color: var(--ink-muted); opacity: 1; }
.polish .link-btn.has-icon { justify-content: flex-start; padding: var(--s1) var(--s2); gap: var(--s2); flex-wrap: nowrap; }
.polish .link-btn.has-icon .link-btn__icon { box-shadow: 0 0 0 1px var(--edge); }
/* tank link: same grid + row as the other link buttons */
.polish .more-extra { display: grid; grid-template-columns: 1fr; gap: var(--s2); margin-top: var(--s2); }
@media (min-width: 48rem) { .polish .more-extra { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.polish .more-extra .ascent-link { margin: 0; }
/* Latest attacks: big card right after the games. Outline, not copper. */
.polish .attacks-card { margin: 0; min-height: 13rem; padding: var(--s3); border: 1px solid var(--edge); background-image: linear-gradient(90deg, rgba(11, 26, 22, 0.96) 0%, rgba(11, 26, 22, 0.78) 50%, rgba(11, 26, 22, 0.15) 100%), url("assets/attacks-bg.webp"); }
@media (min-width: 48rem) { .polish .attacks-card { min-height: 16rem; padding: var(--s4); } }
.polish .attacks-card:hover { border-color: var(--edge-hover); box-shadow: var(--lift); transform: translateY(-2px); }
.polish .attacks-card:focus-visible { outline-color: #fff; }
.polish .attacks-card__text { gap: var(--s1); }
.polish .attacks-card__eyebrow { font-size: 1rem; letter-spacing: 0.12em; color: var(--ink); }
.polish .attacks-card__title { font-size: clamp(2.5rem, 9vw, 3.5rem); }
.polish .attacks-card__cta { min-height: 3.5rem; margin-top: var(--s1); gap: var(--s2); padding: 0 var(--s3) 0 var(--s2); font-size: 1.1875rem; border-color: var(--edge-hover); background: rgba(11, 26, 22, 0.7); }
.polish .attacks-card:hover .attacks-card__cta { background: rgba(243, 238, 228, 0.14); }
.polish .attacks-card__play { width: 2.5rem; height: 1.75rem; border-radius: 0.45rem; }
.polish .attacks-card__play::after { left: 0.95rem; top: 0.45rem; border-left-width: 0.8rem; border-top-width: 0.43rem; border-bottom-width: 0.43rem; }

.polish .duo { display: grid; grid-template-columns: 1fr; column-gap: var(--s4); }
@media (min-width: 48rem) { .polish .duo { grid-template-columns: 1fr 1fr; align-items: start; } }
.polish .friend, .polish .socials { text-align: left; }
.polish .friend-card { background: var(--panel); border: 1px solid var(--edge); padding: var(--s1); gap: var(--s2); transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.polish .friend-card:hover { border-color: var(--edge-hover); transform: translateY(-2px); box-shadow: var(--lift); }
.polish .friend-title { font-size: 1.25rem; color: var(--ink); }
.polish .friend-text { font-size: 1rem; line-height: 1.4; color: var(--ink-muted); }
.polish .friend-cta { margin-top: var(--s1); padding: 0 var(--s2); min-height: 2.75rem; display: inline-flex; align-items: center; background: transparent; border: 1px solid var(--edge); color: var(--ink); font-size: 1rem; font-weight: 600; }
.polish .social-list { justify-content: flex-start; gap: var(--s1); }
.polish .social-chip { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s2); font-size: 1rem; color: var(--ink); background: var(--panel); border: 1px solid var(--edge); }
.polish .social-chip:hover { border-color: var(--edge-hover); background: rgba(243, 238, 228, 0.1); }
/* Dragon Ball pixel banner: the hub's main event. Full column width on phones; on desktop an exact 4x of the 192x72 art (770px incl. frame), copper frame + glow. */
.polish .pixel-banner { width: 100%; max-width: 770px; height: auto; aspect-ratio: 192 / 72; margin: 0 auto; background-size: 100% 100%; border: 1px solid rgba(200, 136, 74, 0.8); border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 28px rgba(200, 136, 74, 0.32), 0 16px 40px rgba(0, 0, 0, 0.65); }
.polish .pixel-banner canvas { width: 100%; height: 100%; margin-left: 0; }
.polish .pixel-banner:hover { border-color: rgba(228, 170, 108, 1); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 36px rgba(200, 136, 74, 0.5), 0 16px 40px rgba(0, 0, 0, 0.65); }
/* hub: the Arcade row leads the links (copper outline, taller, full width on wider screens) */
.polish .link-btn[data-link-id="arcade"] { min-height: 4rem; border-color: rgba(200, 136, 74, 0.8); box-shadow: 0 0 18px rgba(200, 136, 74, 0.22); }
.polish .link-btn[data-link-id="arcade"] .link-btn__label { font-size: 1.1875rem; }
.polish .link-btn[data-link-id="arcade"]:hover { border-color: rgba(228, 170, 108, 1); box-shadow: 0 0 26px rgba(200, 136, 74, 0.4), 0 8px 22px rgba(0, 0, 0, 0.35); }
@media (min-width: 48rem) {
  .polish .link-btn[data-link-id="arcade"] { grid-column: 1 / -1; }
  /* one two-column grid for all five rows so OpenSea and Planted tank pair up (no orphan cells) */
  .polish .more-sec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .polish .more-sec .sec-head { grid-column: 1 / -1; margin-bottom: var(--s1); }
  .polish .more-sec .links, .polish .more-sec .more-extra { display: contents; }
}
/* fta83: slimmer link rows (40px icon, 18px label, ~58px rows; Arcade 64px) */
.polish .more-sec .links, .polish .more-sec .more-extra { gap: var(--s1); }
.polish .more-sec .more-extra { margin-top: var(--s1); }
.polish .more-sec .link-btn { min-height: 3.5rem; }
.polish .more-sec .link-btn.has-icon { padding: var(--s1) var(--s2); gap: var(--s2); }
.polish .more-sec .link-btn__marks, .polish .more-sec .link-btn.has-icon .link-btn__icon { width: 2.5rem; height: 2.5rem; }
.polish .more-sec .link-btn.has-icon .link-btn__text { gap: 0; }
.polish .more-sec .link-btn__label { font-size: 1.125rem; line-height: 1.15; }
.polish .more-sec .link-btn__secondary { font-size: 1rem; line-height: 1.2; }
.polish .more-sec .link-btn[data-link-id="arcade"] { min-height: 4rem; }
.polish .more-sec .link-btn[data-link-id="arcade"] .link-btn__label { font-size: 1.1875rem; }
@media (max-width: 47.99rem) {
  .polish .more-sec { margin-top: var(--s3); }
  .polish .more-sec .sec-head { margin-bottom: var(--s2); }
}
/* fta84: separate "Download" store button beside the Clash of Clans row (same ~58px row) */
.polish .more-sec .link-row { display: flex; align-items: stretch; gap: 0.25rem; min-width: 0; }
.polish .more-sec .link-row .link-btn { flex: 1 1 0; width: auto; min-width: 0; }
.polish .more-sec .link-row .link-btn.has-icon { padding-left: 0.625rem; padding-right: 0.625rem; gap: 0.625rem; }
.polish .more-sec .link-row .link-btn__label, .polish .more-sec .link-row .link-btn__secondary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.polish .dl-btn { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1875rem; min-width: 2.75rem; min-height: 3.5rem; padding: 0 0.375rem; border-radius: var(--radius); border: 1px solid rgba(232, 225, 212, 0.35); background: rgba(18, 40, 33, 0.88); color: var(--ink); font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background 0.18s ease, border-color 0.18s ease; }
.polish .dl-btn:hover { background: rgba(30, 62, 52, 0.95); border-color: rgba(232, 225, 212, 0.6); }
.polish .dl-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.polish .dl-btn__icon { display: block; width: 1rem; height: 1rem; }
.polish .dl-btn__label { display: block; white-space: nowrap; }
.polish .footer { padding-top: var(--s3); }
.polish .footer p { font-size: 1rem; opacity: 1; color: var(--ink-muted); }

/* ---- Arcade page ---- */
.polish .arcade-back { min-height: 2.75rem; margin-bottom: var(--s1); color: var(--ink); font-size: 1rem; font-weight: 500; text-decoration-thickness: 1px; }
.polish .arcade-head { margin-bottom: var(--s2); }
.polish .arcade-head .name { font-size: clamp(2.25rem, 8vw, 3.25rem); letter-spacing: 0.1em; }
.polish .arcade-head .handle { margin-top: var(--s1); font-size: 1.125rem; font-weight: 400; color: var(--ink); letter-spacing: 0.01em; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85); }
.polish .pwa-arcade-meta { margin: 0 0 var(--s3); gap: var(--s1) var(--s2); }
.polish .pwa-streak { font-size: 1rem; min-height: 2.75rem; padding: 0 var(--s2); border-radius: 999px; background: var(--panel); border: 1px solid var(--edge); color: var(--ink); }
.polish .pwa-streak--off { color: var(--ink-muted); }
.polish .pwa-btn, .polish .pwa-pop__b, .polish .game-card__install, .polish .pwa-btn--arcade {
  min-height: 2.75rem; padding: 0 var(--s2); border: 1px solid var(--edge); border-radius: 0.625rem; background: var(--panel);
  color: var(--ink); font: 600 1rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.polish .pwa-btn:hover, .polish .pwa-pop__b:hover, .polish .game-card__install:hover, .polish .pwa-btn--arcade:hover { background: rgba(243, 238, 228, 0.1); border-color: var(--edge-hover); color: #fff; }
.polish .game-card__install { align-self: flex-start; margin: 0; }
.polish .pwa-nudge, .polish .pwa-pop__t, .polish .pwa-guide__t { font-size: 1rem; color: var(--ink); }
.polish .pwa-pop, .polish .pwa-guide__row { border: 1px solid var(--edge); border-radius: var(--radius); }
.polish .pwa-guide__arrow { border-top-color: var(--ink); }

/* Restored home sizing is scoped below; other pages retain current sizing. */
/* ---- hub focus: banner leads, game cards are smaller and a little quieter at rest (Arcade page keeps its own big cards) ---- */
.polish .hub:not(.arcade) .brand { margin-bottom: var(--s3); }
.polish .hub:not(.arcade) .games-sec { margin-top: var(--s4); }
.polish .hub:not(.arcade) .gcards { gap: var(--s2); }
@media (min-width: 48rem) { .polish .hub:not(.arcade) .gcards { gap: var(--s3); } }
.polish .hub:not(.arcade) .media { aspect-ratio: 16 / 9; }
@media (min-width: 48rem) { .polish .hub:not(.arcade) .media { aspect-ratio: 16 / 10; } }
.polish .hub:not(.arcade) .media img { object-position: center 35%; opacity: 0.82; filter: saturate(0.8); transition: opacity 0.2s ease, filter 0.2s ease; }
.polish .hub:not(.arcade) .gcards > li:nth-child(1) .media img { object-position: center 24%; }
.polish .hub:not(.arcade) .gcards > li:nth-child(2) .media img { object-position: center 62%; }
.polish .hub:not(.arcade) .gcards > li:nth-child(3) .media img { object-position: center 4%; }
.polish .hub:not(.arcade) .gcard:hover .media img, .polish .hub:not(.arcade) .gcard:focus-visible .media img { opacity: 1; filter: none; }
.polish .hub:not(.arcade) .gcard__name { font-size: 1.5rem; }
.polish .hub:not(.arcade) .gcard__over { padding-top: 2.5rem; }
.polish .hub:not(.arcade) .gcard__body { padding: var(--s1) var(--s2) var(--s2); }

@media (prefers-reduced-motion: reduce) {
  .polish .gcard, .polish .hub:not(.arcade) .media img, .polish .link-btn, .polish .friend-card, .polish .attacks-card { transition: none; }
  .polish .gcard:hover, .polish .gcard:active, .polish .link-btn:hover, .polish .friend-card:hover, .polish .attacks-card:hover { transform: none; }
}

/* Restored home only: consistent frames without the old phone overhang. */
.polish .home-restored { --home-frame: 386px; --home-height: 146px; }
.polish .home-restored .pixel-banner,
.polish .home-restored .story-banner { width: 100%; max-width: var(--home-frame); height: var(--home-height); aspect-ratio: auto; }
.polish .home-restored .pixel-banner canvas { width: 100%; height: 100%; }
.polish .home-restored .more-sec { width: 100%; max-width: var(--home-frame); margin-inline: auto; }
.polish .home-restored .more-sec .link-btn { min-height: 4rem; }
@media (min-width: 640px) { .polish .home-restored { --home-frame: 578px; --home-height: 218px; } }
@media (min-width: 900px) { .polish .home-restored { --home-frame: 770px; --home-height: 290px; } }

.polish .home-restored .scenes > li { width: 100%; }
