:root {
  --bg1: #0b1d39;
  --bg2: #0f4b73;
  --bg3: #f7a656;
  --cream: #fff4dd;
  --gold: #f2c66d;
  --gold-2: #ff9d70;
  --teal-1: #4be7d2;
  --teal-2: #1293ab;
  --red-1: #ec5a4e;
  --red-2: #af2826;
  --ink: #0c1630;
  --line: rgba(255, 225, 157, 0.26);
  --glass: rgba(6, 17, 36, 0.58);
  --glass-2: rgba(7, 21, 43, 0.8);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Inter, Arial, sans-serif;
  color: var(--cream);
  background: linear-gradient(180deg, var(--bg1), var(--bg2) 55%, var(--bg3));
}
.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 234, 136, 0.16), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(73, 255, 230, 0.13), transparent 16%),
    radial-gradient(circle at 55% 85%, rgba(255, 190, 111, 0.18), transparent 18%);
}
.app-shell, .admin-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}
body.public-game-view {
  overflow: hidden;
}
body.public-game-view .app-shell {
  max-width: none;
  width: 100vw;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-block {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
}
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 800;
  color: #dcfff8;
}
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.02; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
.subtitle { margin-top: 10px; line-height: 1.45; opacity: 0.93; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
.hero-badge.gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #5d2e00; }
.hero-badge.teal { background: linear-gradient(180deg, var(--teal-1), var(--teal-2)); color: #ecfffd; }
.hero-badge.motion {
  background: linear-gradient(180deg, #f8b4ff, #8757ff);
  color: #fff5ff;
  box-shadow: 0 0 18px rgba(206, 116, 255, 0.35);
}
.layout-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: 18px;
  margin-top: 18px;
}
.phone-panel, .control-panel, .admin-panel { padding: 18px; }
body.public-game-view .hero-block,
body.public-game-view .control-panel,
body.public-game-view .footer-note {
  display: none !important;
}
body.public-game-view .layout-grid {
  grid-template-columns: 1fr;
  margin-top: 0;
  width: 100vw;
  height: 100vh;
}
body.public-game-view .phone-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}
.phone-shell {
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(180deg, #14284b, #08111e);
  border: 2px solid rgba(255, 225, 157, 0.18);
}
body.public-game-view .phone-shell {
  width: 100vw;
  height: 100vh;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.screen-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px 10px;
  font-size: 12px;
  font-weight: 800;
}
body.public-game-view .screen-header {
  display: none !important;
}
.screen-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 9/16;
  background: #000;
}
body.public-game-view .screen-frame {
  width: min(100vw, calc(100vh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
  max-height: 100vh;
  margin: 0 auto;
  border-radius: 0;
}
.screen-frame img,
.screen-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#screenImage { position: relative; z-index: 1; }
.screen-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  background: transparent;
}
.screen-video.active { opacity: 1; }
.screen-frame.has-live-video { box-shadow: inset 0 0 0 2px rgba(95, 248, 234, 0.18); }
.screen-frame.is-motion::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 24%, transparent 76%, rgba(255,255,255,0.04));
  z-index: 3;
  pointer-events: none;
}
.screen-frame.is-spinning {
  box-shadow: inset 0 0 0 2px rgba(255, 220, 132, 0.35), 0 0 30px rgba(246, 180, 96, 0.35);
  animation: slotShake 0.4s ease-in-out 0s 10;
}
.screen-frame.is-reveal { box-shadow: inset 0 0 0 2px rgba(95, 248, 234, 0.32), 0 0 36px rgba(95, 248, 234, 0.26); }
.screen-tap {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 7;
  border: 0;
  cursor: pointer;
}
.screen-overlay-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(4, 12, 24, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  z-index: 8;
}
body.public-game-view .screen-overlay-bar {
  display: none !important;
}
.spin-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,236,160,0.45), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(255,104,104,0.3), transparent 45%),
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.34) 45%, transparent 60%);
  opacity: 0;
}
.spin-flash.play { animation: flashSweep 1.1s ease-in-out 0s 3; }
.combo-badge {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  z-index: 6;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(6, 20, 42, 0.82);
  border: 1px solid rgba(255, 222, 140, 0.28);
  text-align: center;
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
}
.combo-title { font-size: 12px; font-weight: 900; letter-spacing: 0.05em; color: #ffe7a6; }
.combo-symbols { margin-top: 4px; font-size: 20px; }
.combo-reward { margin-top: 4px; font-size: 12px; font-weight: 800; color: #9ffdf2; }
.screen-form-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(4, 17, 36, 0.16), rgba(6, 14, 28, 0.72)),
    url('/static/assets/form_v2.png') center/cover no-repeat;
}
.form-screen-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 16px 14px;
  border-radius: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.form-screen-top {
  color: #fff3d7;
  text-align: center;
  margin-bottom: 4px;
}
.form-brand {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffd989;
  text-transform: uppercase;
}
.form-screen-top h3 {
  margin: 6px 0 6px;
  font-size: 26px;
  line-height: 1.06;
  color: #fff5df;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.form-screen-top p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 244, 221, 0.88);
}
.form-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.trust-card {
  padding: 10px 8px;
  border-radius: 16px;
  text-align: center;
  background: rgba(9, 28, 55, 0.72);
  border: 1px solid rgba(255, 216, 127, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.trust-card strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #ffd989;
  letter-spacing: 0.05em;
}
.trust-card span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.25;
  color: rgba(255,244,221,0.86);
}
.form-fields-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.field-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: 20px;
  background: rgba(255, 247, 234, 0.98);
  border: 2px solid rgba(170, 120, 40, 0.44);
  box-shadow: 0 8px 18px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.95);
}
.field-text-label {
  font-size: 12px;
  font-weight: 900;
  color: #846a49;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.real-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: #6d4b1b;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 8px 0 0;
}
.real-input::placeholder {
  color: #b69d7e;
  font-weight: 500;
}
.field-row:focus-within {
  border-color: rgba(95, 248, 234, 0.58);
  box-shadow: 0 0 0 3px rgba(95, 248, 234, 0.18), 0 8px 18px rgba(0,0,0,0.16);
}
.terms-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  padding: 4px 2px 0;
  color: #fff2d8;
  cursor: pointer;
}
.terms-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.terms-check-visual {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(240, 197, 108, 0.95);
  background: rgba(8, 18, 34, 0.82);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
  position: relative;
  margin-top: 2px;
}
.terms-row input:checked + .terms-check-visual::after {
  content: '✓';
  position: absolute;
  inset: -1px 0 0;
  text-align: center;
  color: #fff1b8;
  font-size: 18px;
  font-weight: 900;
}
.terms-copy {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 244, 221, 0.94);
}
.terms-copy b {
  color: #7edcff;
}
.terms-copy a {
  color: #7edcff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.terms-copy a:hover,
.terms-copy a:focus-visible {
  color: #b8efff;
}
.screen-submit-btn {
  margin-top: 2px;
  height: 62px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #0e5f89, #083f64);
  color: #ffe8a0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 22px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.25);
  border: 2px solid rgba(246, 196, 97, 0.6);
  cursor: pointer;
}
.screen-submit-btn span {
  display: inline-block;
  transform: translateY(1px);
}
.form-foot-note {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 233, 178, 0.92);
}
.screen-form-status {
  min-height: 34px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.54);
  color: #fff3d7;
  font-size: 11px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-icon-buttons {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}
.slot-icon-hit {
  position: absolute;
  border: 0;
  border-radius: 16px;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  transform: none;
  z-index: 9;
  touch-action: none;
}
.slot-icon-hit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 229, 153, 0.12), 0 0 0 0 rgba(95, 248, 234, 0.0);
  transition: box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  opacity: 0;
}
.slot-icon-hit::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.slot-icon-hit:hover::before,
.slot-icon-hit:focus-visible::before {
  background: radial-gradient(circle at 50% 50%, rgba(255, 217, 118, 0.16), rgba(95, 248, 234, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 226, 146, 0.4), 0 0 0 2px rgba(95, 248, 234, 0.2);
  opacity: 1;
}
.slot-icon-hit:focus-visible { outline: none; }
body.hotspot-calibration .slot-icon-hit::before {
  opacity: 1;
  background: rgba(96, 248, 234, 0.16);
  box-shadow: inset 0 0 0 2px rgba(255, 230, 148, 0.95), 0 0 0 2px rgba(95, 248, 234, 0.35);
}
body.hotspot-calibration .slot-icon-hit[data-selected="true"]::before {
  background: rgba(255, 213, 110, 0.18);
  box-shadow: inset 0 0 0 3px rgba(255, 213, 110, 0.98), 0 0 0 3px rgba(95, 248, 234, 0.45);
}
body.hotspot-calibration .slot-icon-hit[data-kind]::after {
  content: attr(data-kind) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4, 17, 36, 0.92);
  border: 1px solid rgba(255, 227, 146, 0.75);
  color: #fff2cc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 1 !important;
  visibility: visible !important;
}
.hotspot-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 10;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(4, 17, 36, 0.88);
  border: 1px solid rgba(95, 248, 234, 0.22);
  color: #fff3d7;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
}
body.hotspot-calibration .hotspot-hud.hidden { display: block !important; }
body.public-game-view:not(.hotspot-calibration) .slot-icon-hit::before {
  opacity: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-card { padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); text-align: center; }
.stat-card.stat-wide { grid-column: span 4; }
.stat-card span { display: block; font-size: 12px; opacity: 0.85; }
.stat-card strong { display: block; font-size: 24px; margin-top: 6px; }
.progress-block {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}
.progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.progress-track { height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, #ffe88f, #ff9fb8, #5af8ea); transition: width 0.35s ease; }
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.btn {
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #602f00; }
.btn-teal { background: linear-gradient(180deg, var(--teal-1), var(--teal-2)); color: #effffb; }
.btn-red { background: radial-gradient(circle at 50% 35%, var(--red-1), var(--red-2)); color: #fff5df; }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--cream); border: 1px solid var(--line); }
.btn-spin.pulse { animation: pulseSpin 1.2s ease-in-out infinite; box-shadow: 0 0 0 rgba(255, 95, 95, 0.2); }
.journal-block { margin-top: 16px; }
.log-box {
  margin-top: 10px;
  min-height: 60px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  line-height: 1.45;
}
.hidden { display: none !important; }
.footer-note { text-align: center; font-size: 12px; opacity: 0.82; padding-top: 16px; }
.legal-page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.legal-card {
  padding: 24px;
  border-radius: 26px;
  background: rgba(8, 18, 34, 0.76);
  border: 1px solid rgba(255, 224, 153, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #9fefff;
  font-weight: 800;
  text-decoration: none;
}
.legal-back-link:hover,
.legal-back-link:focus-visible {
  color: #d8fbff;
}
.legal-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 232, 143, 0.88);
}
.legal-card h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 46px);
}
.legal-intro {
  margin: 0 0 24px;
  color: rgba(238, 248, 255, 0.88);
  line-height: 1.65;
}
.legal-section + .legal-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.legal-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #ffe7a7;
}
.legal-section p,
.legal-section li {
  color: rgba(242, 247, 251, 0.9);
  line-height: 1.7;
}
.legal-section ul {
  margin: 0;
  padding-left: 20px;
}
.legal-highlight {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(14, 95, 137, 0.18);
  border: 1px solid rgba(126, 220, 255, 0.22);
  color: #fdf2d4;
  line-height: 1.6;
}
.admin-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.admin-actions input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 225, 157, 0.25);
  background: #fff5e5;
  color: #4b2810;
  font-size: 15px;
}
.admin-table-wrap { margin-top: 16px; overflow: auto; border-radius: 18px; background: var(--glass-2); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; text-align: left; }
.admin-table thead th { position: sticky; top: 0; background: rgba(10, 24, 46, 0.95); }

.pirate-page {
  min-height: 100vh;
}
.pirate-page-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}
.page-hero-actions {
  display: flex;
  justify-content: flex-end;
}
.page-back-btn,
.page-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.page-back-btn,
.page-cta-btn {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #512400;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.page-cta-btn.secondary {
  background: linear-gradient(180deg, var(--teal-1), var(--teal-2));
  color: #effffb;
}
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 18px;
}
.page-main {
  padding: 20px;
}
.page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-card {
  padding: 18px;
}
.side-card-cta {
  display: grid;
  gap: 12px;
}
.page-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.page-section-head.compact { margin-top: 18px; }
.page-mini-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
.page-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.hero-stat-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-stat-card span,
.hero-stat-card small {
  display: block;
}
.hero-stat-card span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,244,221,0.76);
}
.hero-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: #fff4dd;
}
.hero-stat-card small {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,244,221,0.68);
}
.hero-stat-card.gold { background: linear-gradient(180deg, rgba(242,198,109,0.18), rgba(255,157,112,0.12)); }
.hero-stat-card.teal { background: linear-gradient(180deg, rgba(75,231,210,0.2), rgba(18,147,171,0.12)); }
.hero-stat-card.coral { background: linear-gradient(180deg, rgba(236,90,78,0.18), rgba(175,40,38,0.12)); }
.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.podium-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.podium-card.rank-1 {
  background: linear-gradient(180deg, rgba(242,198,109,0.24), rgba(255,157,112,0.12));
}
.podium-card.rank-2 {
  background: linear-gradient(180deg, rgba(75,231,210,0.18), rgba(18,147,171,0.12));
}
.podium-card.rank-3 {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
}
.podium-card.is-player { box-shadow: 0 0 0 2px rgba(95,248,234,0.2) inset; }
.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: #2b1401;
  background: linear-gradient(180deg, #ffe7a6, #f2c66d);
}
.podium-card h3 { margin-top: 14px; font-size: 22px; color: #fff5df; }
.podium-card p { margin: 6px 0 0; color: rgba(255,244,221,0.78); font-size: 13px; }
.podium-metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,244,221,0.72);
}
.podium-metric strong { color: #fff5df; font-size: 18px; }
.podium-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #9ffdf2;
}
.ranking-list,
.vault-page-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.vault-page-grid {
  grid-template-columns: repeat(2, 1fr);
}
.ranking-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1.4fr) 120px 120px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.ranking-row.is-player {
  background: linear-gradient(180deg, rgba(75,231,210,0.18), rgba(18,147,171,0.12));
  border-color: rgba(95,248,234,0.24);
}
.ranking-rank {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 16px;
  font-weight: 900;
  color: #2b1401;
  background: linear-gradient(180deg, #ffe7a6, #f2c66d);
}
.ranking-main strong,
.ranking-main span,
.ranking-line,
.ranking-metric span,
.ranking-metric strong {
  display: block;
}
.ranking-main strong { font-size: 15px; color: #fff4dd; }
.ranking-main span,
.ranking-line,
.ranking-metric span { font-size: 12px; color: rgba(255,244,221,0.72); }
.ranking-line { color: #9ffdf2; }
.ranking-metric strong { margin-top: 4px; font-size: 16px; color: #fff5df; }
.player-focus-card,
.inner-panel {
  display: grid;
  gap: 12px;
}
.focus-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.focus-line span { color: rgba(255,244,221,0.72); font-size: 12px; }
.focus-line strong { color: #fff5df; font-size: 16px; }
.focus-note {
  padding: 14px;
  border-radius: 16px;
  background: rgba(75,231,210,0.1);
  border: 1px solid rgba(95,248,234,0.16);
  color: #dffff9;
  font-size: 12px;
  line-height: 1.5;
}
.intel-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 12px;
}
.intel-list li {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.intel-list strong,
.intel-list span {
  display: block;
}
.intel-list strong { color: #ffe7a6; font-size: 13px; }
.intel-list span { margin-top: 6px; font-size: 12px; color: rgba(255,244,221,0.72); line-height: 1.45; }
.vault-page-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.vault-page-card.wide { grid-column: span 2; }
.vault-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #ffe7a6;
}
.vault-card-title strong { color: #fff5df; font-size: 18px; }
.vault-page-card p {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,244,221,0.74);
}
.vault-progress-section {
  margin-top: 18px;
  padding: 18px;
}
.vault-progress-track.large {
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
}
.vault-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffe88f, #f2c66d, #5af8ea);
  transition: width 0.35s ease;
}
.vault-progress-copy {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,244,221,0.76);
}
.theme-leaderboard .page-hero,
.theme-vault .page-hero {
  background-image: linear-gradient(180deg, rgba(7, 20, 43, 0.6), rgba(8, 18, 34, 0.5));
}

@keyframes pulseSpin {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 95, 95, 0.15); }
  50% { transform: scale(1.04); box-shadow: 0 0 28px rgba(255, 95, 95, 0.4); }
}
@keyframes slotShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2px, 0, 0); }
  50% { transform: translate3d(2px, 0, 0); }
  75% { transform: translate3d(-1px, 0, 0); }
}
@keyframes flashSweep {
  0% { opacity: 0; transform: translateX(-24%) scale(1); }
  20% { opacity: 0.9; }
  55% { opacity: 0.5; }
  100% { opacity: 0; transform: translateX(24%) scale(1.04); }
}
@media (max-width: 1020px) {
  .layout-grid,
  .page-grid { grid-template-columns: 1fr; }
  .phone-panel { max-width: 430px; margin: 0 auto; }
  .page-sidebar { order: 2; }
}
@media (max-width: 760px) {
  .hero-block,
  .page-hero { flex-direction: column; }
  .stats-grid,
  .page-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card.stat-wide,
  .vault-page-card.wide { grid-column: span 2; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-actions { grid-template-columns: 1fr; }
  .form-screen-shell { padding: 16px 12px 12px; }
  .form-screen-top h3 { font-size: 22px; }
  .field-row { grid-template-columns: 72px 1fr; padding-left: 12px; }
  .field-text-label { font-size: 11px; }
  .real-input { font-size: 14px; height: 40px; }
  .screen-submit-btn { height: 58px; font-size: 16px; }
  .podium-grid,
  .vault-page-grid { grid-template-columns: 1fr; }
  .ranking-row { grid-template-columns: 56px 1fr; }
  .ranking-line,
  .ranking-metric { grid-column: 2; }
}

.combo-badge,
.form-screen-top,
.form-trust-row,
.form-foot-note,
.footer-note {
  display: none !important;
}

.reward-day-grid,
.quest-grid,
.shop-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.reward-day-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.reward-day-card,
.quest-card,
.shop-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.reward-day-card.active,
.quest-card.complete,
.shop-card:hover {
  border-color: rgba(255, 214, 122, 0.4);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
}
.reward-day-card.claimed,
.quest-card.claimed {
  opacity: 0.82;
}
.reward-day-top,
.quest-card-head,
.shop-card-head,
.shop-meta-row,
.focus-line,
.vault-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reward-day-card h3,
.quest-card h3,
.shop-card h3 {
  margin-top: 10px;
  font-size: 18px;
}
.reward-day-card p,
.quest-card p,
.shop-card p {
  margin: 8px 0 0;
  line-height: 1.5;
  opacity: 0.92;
}
.action-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  line-height: 1.4;
}
.action-banner.good {
  background: rgba(86, 220, 180, 0.18);
  border: 1px solid rgba(86, 220, 180, 0.34);
  color: #d9fff5;
}
.action-banner.warn {
  background: rgba(255, 180, 113, 0.18);
  border: 1px solid rgba(255, 180, 113, 0.34);
  color: #fff2d7;
}
.action-banner.hidden {
  display: none !important;
}
.quest-progress-track,
.vault-progress-track.large {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}
.quest-progress-track {
  height: 12px;
  margin-top: 10px;
}
.quest-progress-fill,
.vault-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffe88f, #ff9fb8, #5af8ea);
}
.quest-progress-copy {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
}
.quest-reward-pill,
.shop-cost-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 219, 124, 0.16);
  border: 1px solid rgba(255, 219, 124, 0.3);
  color: #fff1c6;
  font-size: 12px;
  font-weight: 900;
}
.shop-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  font-size: 26px;
}
.page-cta-btn.disabled,
.quest-claim-btn.disabled {
  opacity: 0.48;
  pointer-events: none;
}
.player-focus-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.focus-line {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
}
.focus-note {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  line-height: 1.5;
}
.vault-page-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}
.vault-page-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.vault-page-card.wide {
  grid-column: span 2;
}
.intel-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}
.intel-list li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
}
.ranking-list,
.podium-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.podium-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.podium-card,
.ranking-row {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.ranking-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 180px) 130px 130px;
  align-items: center;
  gap: 12px;
}
.ranking-rank,
.podium-rank {
  font-size: 24px;
  font-weight: 900;
  color: #ffd989;
}
.ranking-main {
  display: grid;
  gap: 4px;
}
.ranking-line,
.podium-line {
  opacity: 0.88;
  line-height: 1.4;
}
.podium-metric,
.ranking-metric {
  display: grid;
  gap: 4px;
}
.podium-card.is-player,
.ranking-row.is-player {
  border-color: rgba(95,248,234,0.44);
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}
.theme-daily .page-mini-badge,
.theme-shop .page-mini-badge,
.theme-quests .page-mini-badge {
  background: rgba(95,248,234,0.12);
}
@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
  .vault-page-card.wide {
    grid-column: span 1;
  }
  .ranking-row {
    grid-template-columns: 64px 1fr;
  }
  .ranking-line,
  .ranking-metric {
    grid-column: 2;
  }
}
@media (max-width: 640px) {
  .pirate-page-shell {
    padding: 16px 12px 30px;
  }
  .page-hero,
  .page-main,
  .side-card {
    padding: 18px;
  }
  .reward-day-grid,
  .quest-grid,
  .shop-grid,
  .podium-grid,
  .vault-page-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== V27 deluxe pirate page redesign ===== */
.pirate-shell-deluxe {
  max-width: 1380px;
  padding-top: 36px;
  padding-bottom: 56px;
}
.pirate-page.theme-leaderboard,
.pirate-page.theme-vault,
.pirate-page.theme-daily,
.pirate-page.theme-quests,
.pirate-page.theme-shop {
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 219, 129, 0.14), transparent 18%),
    radial-gradient(circle at 82% 12%, rgba(92, 244, 232, 0.14), transparent 20%),
    linear-gradient(180deg, #071226 0%, #0d2342 34%, #13385d 62%, #0e263d 100%);
}
.pirate-page.theme-leaderboard::before,
.pirate-page.theme-vault::before,
.pirate-page.theme-daily::before,
.pirate-page.theme-quests::before,
.pirate-page.theme-shop::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.22), transparent 18%, transparent 82%, rgba(0,0,0,0.22)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 120px);
  opacity: 0.65;
}
.deluxe-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
  border-radius: 34px;
  border: 1px solid rgba(255, 217, 132, 0.24);
  background:
    linear-gradient(135deg, rgba(8, 23, 46, 0.96), rgba(17, 50, 83, 0.88) 58%, rgba(10, 30, 54, 0.96)),
    radial-gradient(circle at 18% 20%, rgba(255, 214, 122, 0.12), transparent 18%),
    radial-gradient(circle at 82% 28%, rgba(95, 248, 234, 0.10), transparent 18%);
  box-shadow: 0 30px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.06);
}
.deluxe-hero::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  border: 1px solid rgba(255, 220, 146, 0.08);
  pointer-events: none;
}
.deluxe-hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  right: -70px;
  top: -120px;
  background: radial-gradient(circle, rgba(255, 214, 122, 0.18), transparent 68%);
  pointer-events: none;
}
.page-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.deluxe-actions {
  position: relative;
  z-index: 1;
  min-width: 300px;
  align-items: flex-end;
  gap: 14px;
}
.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff4dd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.treasure-frame {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 233, 176, 0.12), rgba(255, 160, 113, 0.08)),
    rgba(6, 17, 35, 0.74);
  border: 1px solid rgba(255, 213, 132, 0.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 30px rgba(0,0,0,0.18);
}
.hero-emblem-icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #3a1a00;
  background: linear-gradient(180deg, #ffeab1, #f4bf61 65%, #b5772d);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), 0 10px 20px rgba(0,0,0,0.22);
}
.hero-emblem-meta strong,
.hero-emblem-meta span {
  display: block;
}
.hero-emblem-meta strong {
  color: #fff0c8;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-emblem-meta span {
  margin-top: 6px;
  color: rgba(255,244,221,0.82);
  line-height: 1.45;
  font-size: 12px;
}
.deluxe-grid {
  gap: 22px;
  margin-top: 22px;
}
.deluxe-panel,
.deluxe-side-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 215, 139, 0.20);
  background:
    linear-gradient(180deg, rgba(8, 22, 42, 0.92), rgba(15, 39, 67, 0.86));
  box-shadow: 0 24px 60px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}
.deluxe-panel::before,
.deluxe-side-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 235, 186, 0.06);
  pointer-events: none;
}
.page-scroll-frame {
  position: relative;
  padding: 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 248, 228, 0.06), rgba(255,255,255,0.02)),
    rgba(7, 18, 34, 0.48);
}
.page-scroll-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 213, 122, 0.05), transparent 20%),
    radial-gradient(circle at 84% 18%, rgba(95, 248, 234, 0.05), transparent 22%);
  pointer-events: none;
}
.treasure-divider {
  height: 14px;
  margin: 18px 0 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 222, 152, 0.85) 18%, rgba(255, 160, 112, 0.95) 50%, rgba(95, 248, 234, 0.7) 82%, transparent),
    rgba(255,255,255,0.06);
  box-shadow: 0 0 20px rgba(255, 202, 114, 0.18);
}
.panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 219, 129, 0.12);
  border: 1px solid rgba(255, 219, 129, 0.22);
  color: #ffe7a6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.page-mini-badge {
  background: linear-gradient(180deg, rgba(255, 214, 121, 0.18), rgba(255, 154, 112, 0.12));
  border-color: rgba(255, 214, 121, 0.22);
  color: #fff0cb;
}
.page-back-btn,
.page-cta-btn {
  border: 1px solid rgba(255, 221, 148, 0.34);
}
.page-back-btn:hover,
.page-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(0,0,0,0.24);
}
.page-hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: 0.02em;
  text-shadow: 0 8px 26px rgba(0,0,0,0.28);
}
.page-hero .subtitle {
  max-width: 660px;
  color: rgba(255,244,221,0.90);
}
.deluxe-side-card h3,
.page-scroll-frame h2 {
  color: #fff2d0;
}
.reward-day-card,
.quest-card,
.shop-card,
.vault-page-card,
.podium-card,
.ranking-row,
.hero-stat-card,
.focus-line,
.focus-note,
.intel-list li {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(8, 20, 36, 0.66);
  border: 1px solid rgba(255, 222, 148, 0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.hero-stat-card {
  position: relative;
  overflow: hidden;
}
.hero-stat-card::after,
.reward-day-card::after,
.quest-card::after,
.shop-card::after,
.vault-page-card::after,
.podium-card::after,
.ranking-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 32%, transparent 68%, rgba(95,248,234,0.04));
  pointer-events: none;
}
.hero-stat-card strong,
.focus-line strong,
.podium-metric strong,
.ranking-metric strong,
.vault-card-title strong {
  color: #fff7e2;
}
.reward-day-card.active,
.quest-card.complete,
.shop-card:hover,
.podium-card.rank-1,
.ranking-row.is-player {
  border-color: rgba(255, 221, 148, 0.30);
  box-shadow: 0 18px 34px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.shop-card:hover {
  transform: translateY(-2px);
}
.quest-card.claimed,
.reward-day-card.claimed {
  border-color: rgba(95, 248, 234, 0.24);
}
.quest-reward-pill,
.shop-cost-pill {
  background: linear-gradient(180deg, rgba(255, 214, 122, 0.22), rgba(255, 162, 112, 0.14));
  border-color: rgba(255, 214, 122, 0.28);
}
.shop-icon {
  background: linear-gradient(180deg, rgba(255, 233, 176, 0.18), rgba(95, 248, 234, 0.10));
  border: 1px solid rgba(255,255,255,0.10);
}
.treasure-inner-panel {
  background: linear-gradient(180deg, rgba(255, 214, 121, 0.08), rgba(255,255,255,0.02)), rgba(8, 20, 36, 0.62);
  border: 1px solid rgba(255, 214, 121, 0.12);
}
.theme-leaderboard .page-hero,
.theme-vault .page-hero,
.theme-daily .page-hero,
.theme-quests .page-hero,
.theme-shop .page-hero {
  background-size: cover;
}
.theme-leaderboard .page-hero {
  background-image:
    linear-gradient(135deg, rgba(7, 21, 42, 0.95), rgba(14, 43, 73, 0.90)),
    radial-gradient(circle at 20% 15%, rgba(255, 214, 122, 0.18), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(95, 248, 234, 0.10), transparent 22%);
}
.theme-vault .page-hero {
  background-image:
    linear-gradient(135deg, rgba(7, 19, 35, 0.95), rgba(18, 45, 68, 0.90)),
    radial-gradient(circle at 24% 18%, rgba(255, 214, 122, 0.15), transparent 18%),
    radial-gradient(circle at 76% 20%, rgba(86, 149, 255, 0.10), transparent 22%);
}
.theme-daily .page-hero {
  background-image:
    linear-gradient(135deg, rgba(10, 26, 44, 0.95), rgba(17, 49, 84, 0.90)),
    radial-gradient(circle at 22% 16%, rgba(255, 214, 122, 0.17), transparent 18%),
    radial-gradient(circle at 80% 22%, rgba(89, 246, 227, 0.09), transparent 22%);
}
.theme-quests .page-hero {
  background-image:
    linear-gradient(135deg, rgba(8, 22, 40, 0.95), rgba(17, 42, 68, 0.90)),
    radial-gradient(circle at 24% 18%, rgba(255, 167, 115, 0.14), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(95, 248, 234, 0.09), transparent 22%);
}
.theme-shop .page-hero {
  background-image:
    linear-gradient(135deg, rgba(11, 25, 41, 0.95), rgba(23, 51, 79, 0.90)),
    radial-gradient(circle at 24% 18%, rgba(255, 214, 122, 0.16), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(95, 248, 234, 0.08), transparent 22%);
}
@media (max-width: 1100px) {
  .deluxe-hero {
    flex-direction: column;
  }
  .deluxe-actions {
    width: 100%;
    min-width: 0;
  }
  .hero-emblem-card {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .pirate-shell-deluxe {
    padding-top: 18px;
    padding-bottom: 34px;
  }
  .deluxe-hero,
  .page-scroll-frame,
  .deluxe-side-card {
    padding: 18px;
  }
  .hero-chip-row {
    gap: 8px;
  }
  .hero-chip {
    width: 100%;
    justify-content: flex-start;
  }
  .hero-emblem-card {
    grid-template-columns: 60px 1fr;
  }
  .hero-emblem-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 28px;
  }
}

/* ===== V28 scenic pirate backgrounds + richer themed surfaces ===== */
.theme-leaderboard .deluxe-hero::after,
.theme-vault .deluxe-hero::after,
.theme-daily .deluxe-hero::after,
.theme-quests .deluxe-hero::after,
.theme-shop .deluxe-hero::after {
  width: 430px;
  height: 430px;
  right: -90px;
  top: -60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  opacity: 0.22;
  mix-blend-mode: screen;
  filter: saturate(1.1) contrast(1.05);
}
.theme-leaderboard .deluxe-hero::after {
  background-image:
    linear-gradient(180deg, rgba(255,214,122,0.18), rgba(95,248,234,0.05)),
    url('/static/assets/slot_v2.png');
}
.theme-vault .deluxe-hero::after {
  background-image:
    linear-gradient(180deg, rgba(255,214,122,0.18), rgba(95,248,234,0.05)),
    url('/static/assets/chest_v2.png');
}
.theme-daily .deluxe-hero::after {
  background-image:
    linear-gradient(180deg, rgba(255,214,122,0.18), rgba(95,248,234,0.05)),
    url('/static/assets/splash_v2.png');
}
.theme-quests .deluxe-hero::after {
  background-image:
    linear-gradient(180deg, rgba(255,214,122,0.18), rgba(95,248,234,0.05)),
    url('/static/assets/home_v2.png');
}
.theme-shop .deluxe-hero::after {
  background-image:
    linear-gradient(180deg, rgba(255,214,122,0.18), rgba(95,248,234,0.05)),
    url('/static/assets/slot_v2.png');
}

.theme-leaderboard .page-scroll-frame,
.theme-vault .page-scroll-frame,
.theme-daily .page-scroll-frame,
.theme-quests .page-scroll-frame,
.theme-shop .page-scroll-frame {
  background:
    linear-gradient(180deg, rgba(255, 247, 224, 0.07), rgba(255,255,255,0.02)),
    radial-gradient(circle at 0% 0%, rgba(255, 214, 122, 0.06), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(95, 248, 234, 0.05), transparent 26%),
    rgba(7, 18, 34, 0.54);
}
.theme-leaderboard .page-scroll-frame::after,
.theme-vault .page-scroll-frame::after,
.theme-daily .page-scroll-frame::after,
.theme-quests .page-scroll-frame::after,
.theme-shop .page-scroll-frame::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 214, 122, 0.06);
  pointer-events: none;
}

.theme-leaderboard .deluxe-panel,
.theme-vault .deluxe-panel,
.theme-daily .deluxe-panel,
.theme-quests .deluxe-panel,
.theme-shop .deluxe-panel,
.theme-leaderboard .deluxe-side-card,
.theme-vault .deluxe-side-card,
.theme-daily .deluxe-side-card,
.theme-quests .deluxe-side-card,
.theme-shop .deluxe-side-card {
  background:
    linear-gradient(180deg, rgba(10, 24, 44, 0.94), rgba(17, 42, 70, 0.88)),
    linear-gradient(90deg, rgba(255,255,255,0.02), transparent 18%, transparent 82%, rgba(255,255,255,0.02));
}

.theme-leaderboard .podium-card.rank-1 {
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.24), rgba(255, 154, 112, 0.10)),
    rgba(10, 24, 44, 0.72);
}
.theme-vault .vault-page-card.wide,
.theme-daily .reward-day-card.active,
.theme-quests .quest-card.complete,
.theme-shop .shop-card:hover {
  background:
    linear-gradient(180deg, rgba(255, 216, 128, 0.16), rgba(95, 248, 234, 0.06)),
    rgba(9, 22, 40, 0.74);
}
.theme-shop .shop-card {
  position: relative;
  overflow: hidden;
}
.theme-shop .shop-card::before,
.theme-daily .reward-day-card::before,
.theme-quests .quest-card::before,
.theme-vault .vault-page-card::before,
.theme-leaderboard .podium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.05) 46%, transparent 60%);
  pointer-events: none;
}
.theme-daily .reward-day-card,
.theme-quests .quest-card,
.theme-shop .shop-card,
.theme-vault .vault-page-card,
.theme-leaderboard .podium-card,
.theme-leaderboard .ranking-row {
  border-color: rgba(255, 215, 139, 0.14);
}
.theme-daily .hero-chip,
.theme-quests .hero-chip,
.theme-shop .hero-chip,
.theme-vault .hero-chip,
.theme-leaderboard .hero-chip {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}
.theme-leaderboard .treasure-divider,
.theme-vault .treasure-divider,
.theme-daily .treasure-divider,
.theme-quests .treasure-divider,
.theme-shop .treasure-divider {
  height: 12px;
}
