/*
 * launchkit — Light and dark creation workspace tokens
 * Source of truth: docs/03_UI_DESIGN_SYSTEM.md.
 * These are design tokens, not a finished UI or proof that a feature exists.
 * Font stack uses installed system fonts; this file loads no external assets.
 * Breakpoints must use literal media queries or build-time constants:
 * mobile 0–767px; tablet 768–1023px; desktop 1024–1599px; wide >=1600px.
 */

:root {
  color-scheme: dark;

  /* Core surfaces and text */
  --color-bg: #0a0a0a;
  --color-surface: #151515;
  --color-surface-subtle: #1c1c1b;
  --color-surface-hover: #292928;
  --color-surface-inset: #101010;
  --color-text: #f7f3ea;
  --color-text-secondary: #c2beb4;
  --color-text-muted: #a6a49e;
  --color-text-inverse: #0a0a0a;
  --color-placeholder: #a6a49e;

  /* Main action: lime */
  --color-accent: #d9ff55;
  --color-accent-hover: #e7ff8c;
  --color-accent-pressed: #c3e641;
  --color-accent-soft: #292f18;
  --color-accent-text: #d9ff55;
  --color-link: #d9ff55;
  --color-link-hover: #e7ff8c;
  --color-selection-bg: #d9ff55;
  --color-selection-text: #0a0a0a;

  /* Decorative borders may be subtle. Input/control boundaries use control. */
  --color-border: #333332;
  --color-border-subtle: #282827;
  --color-border-control: #74746c;
  --color-border-hover: #909084;
  --color-border-active: #d9ff55;
  --color-focus: #d9ff55;
  --color-focus-halo: #0a0a0a;

  /* Status colors: always pair with a label and icon. */
  --color-success: #a0eab6;
  --color-success-bg: #14281d;
  --color-success-border: #3d6b4e;
  --color-warning: #ffda8c;
  --color-warning-bg: #292111;
  --color-warning-border: #755a24;
  --color-danger: #ffbab1;
  --color-danger-hover: #ffd5d0;
  --color-danger-bg: #311b1b;
  --color-danger-border: #804646;
  --color-info: #b0d8ff;
  --color-info-bg: #172637;
  --color-info-border: #446787;
  --color-disabled-bg: #252524;
  --color-disabled-text: #a6a49e;
  --color-disabled-border: #444441;

  /* Canvas colors are independent of the site theme. */
  --color-canvas: #f0f3ef;
  --color-canvas-dark: #222925;
  --color-checker-light: #ffffff;
  --color-checker-dark: #e5ebe7;
  --color-markup-red: #d92f3e;
  --color-markup-blue: #2563eb;
  --color-markup-yellow: #f5c542;
  --color-markup-outline: #18251f;
  --color-overlay: rgb(0 0 0 / 60%);
  --color-skeleton: #232323;
  --color-skeleton-highlight: #303030;

  /* Typography */
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  --font-editorial: Georgia, "Times New Roman", serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-body: 0.9375rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2.25rem;
  --font-size-hero: clamp(2rem, 4vw, 3.5rem);
  --line-height-tight: 1.15;
  --line-height-heading: 1.3;
  --line-height-body: 1.55;
  --line-height-label: 1.4;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --letter-spacing-heading: -0.025em;
  --letter-spacing-label: 0;

  /* Spacing */
  --space-0: 0;
  --space-0-5: 0.125rem;
  --space-1: 0.25rem;
  --space-1-5: 0.375rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Geometry */
  --radius-xs: 0.25rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;
  --border-width: 1px;
  --focus-width: 2px;
  --focus-offset: 3px;
  --control-height: 3rem;
  --control-height-compact: 2.5rem;
  --touch-target-min: 2.75rem;
  --icon-sm: 1rem;
  --icon-md: 1.25rem;
  --icon-lg: 1.5rem;
  --checker-size: 0.75rem;

  /* Layout: center canvas takes all remaining width. */
  --public-content-max: 78rem;
  --public-reading-max: 46rem;
  --public-gutter: clamp(1rem, 3vw, 2rem);
  --app-header-height: 4rem;
  --app-nav-width: 13.5rem;
  --app-nav-rail-width: 4.5rem;
  --app-form-width: 20rem;
  --app-form-width-wide: 21.25rem;
  --app-inspector-width: 17rem;
  --app-panel-gap: 1rem;
  --app-preview-min-height: 28rem;
  --modal-width-sm: 28rem;
  --modal-width-md: 40rem;
  --drawer-width: min(26rem, calc(100vw - 1rem));
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-top: env(safe-area-inset-top, 0px);

  /* Elevation */
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 18%);
  --shadow-sm: 0 3px 12px rgb(0 0 0 / 25%);
  --shadow-md: 0 16px 42px rgb(0 0 0 / 34%);
  --shadow-lg: 0 24px 70px rgb(0 0 0 / 48%);
  --shadow-focus: 0 0 0 2px var(--color-focus-halo),
    0 0 0 4px var(--color-focus);

  /* Motion: no animation is needed for core usability. */
  --motion-fast: 100ms;
  --motion-normal: 160ms;
  --motion-slow: 220ms;
  --motion-loading: 1200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0, 0, 0, 1);
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);

  /* Stacking: portals must use this order consistently. */
  --z-base: 0;
  --z-sticky: 20;
  --z-popover: 30;
  --z-drawer: 40;
  --z-modal: 50;
  --z-toast: 60;
}

:root[data-theme="light"] {
  color-scheme: light;
  --color-bg: #fafaf7;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f2eb;
  --color-surface-hover: #e8ebdf;
  --color-surface-inset: #f7f8f2;
  --color-text: #151713;
  --color-text-secondary: #53594d;
  --color-text-muted: #62695c;
  --color-placeholder: #697060;
  --color-accent-hover: #c8ee43;
  --color-accent-pressed: #b2d832;
  --color-accent-soft: #edf5d2;
  --color-accent-text: #496500;
  --color-link: #496500;
  --color-link-hover: #304800;
  --color-border: #dfe3d6;
  --color-border-subtle: #e8ebdf;
  --color-border-control: #7f8874;
  --color-border-hover: #59644b;
  --color-border-active: #557500;
  --color-focus: #527100;
  --color-focus-halo: #fafaf7;
  --color-success: #246338;
  --color-success-bg: #e9f6ec;
  --color-success-border: #7daa88;
  --color-warning: #755000;
  --color-warning-bg: #fff6df;
  --color-warning-border: #b99a4b;
  --color-danger: #a12d25;
  --color-danger-hover: #7e211b;
  --color-danger-bg: #fff0ed;
  --color-danger-border: #c48c84;
  --color-info: #225a8e;
  --color-info-bg: #edf5ff;
  --color-info-border: #7d9dbc;
  --color-disabled-bg: #edf0e6;
  --color-disabled-text: #6b7163;
  --color-disabled-border: #d1d6c8;
  --color-skeleton: #e6eadf;
  --color-skeleton-highlight: #f4f6ef;
  --shadow-xs: 0 1px 2px rgb(20 30 10 / 5%);
  --shadow-sm: 0 3px 12px rgb(20 30 10 / 7%);
  --shadow-md: 0 16px 42px rgb(20 30 10 / 10%);
  --shadow-lg: 0 24px 70px rgb(20 30 10 / 15%);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-normal: 0ms;
    --motion-slow: 0ms;
    --motion-loading: 0ms;
  }
}

/* Use outline + text labels in forced-color mode; do not rely on shadows. */
@media (forced-colors: active) {
  :root, :root[data-theme="light"] {
    --color-bg: Canvas;
    --color-surface: Canvas;
    --color-surface-subtle: Canvas;
    --color-text: CanvasText;
    --color-text-secondary: CanvasText;
    --color-text-muted: CanvasText;
    --color-border-control: ButtonText;
    --color-focus: Highlight;
    --color-link: LinkText;
    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-focus: none;
  }
}

/* Pirate Token project — original visual system. Do not use Fortnite/Epic logos or copied UI. */
:root{
  color-scheme:dark;
  --ink-950:#080d19;--ink-900:#0d1525;--ink-850:#111d31;--ink-800:#17263a;--ink-700:#24364d;
  --sand-50:#fff8e9;--sand-100:#f7edda;--sand-200:#e9d7b6;--sand-400:#c7a875;
  --gold-300:#ffe08a;--gold-400:#f7c65c;--gold-500:#d99b32;--gold-600:#a96a1d;
  --aqua-300:#77e1d3;--aqua-400:#35c4b4;--coral-400:#ff8268;--violet-400:#9e8cff;
  --success:#75d6a2;--danger:#ff827c;--muted:#9aabc0;--line:rgba(226,205,164,.16);
  --surface:rgba(19,31,49,.88);--surface-2:rgba(26,42,63,.92);
  --shadow-lg:0 24px 70px rgba(0,0,0,.38);--shadow-gold:0 0 34px rgba(247,198,92,.18);
  --radius-sm:10px;--radius-md:16px;--radius-lg:24px;--radius-xl:32px;
  --content:1160px;--header-h:76px;
  --font-ui:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-display:Georgia,"Times New Roman",serif;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--ink-950);color:var(--sand-100);font:16px/1.6 var(--font-ui);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}button,input,select{font:inherit}button{cursor:pointer}img{display:block;max-width:100%}::selection{background:rgba(247,198,92,.32);color:white}

.site-shell{min-height:100vh;background:radial-gradient(ellipse at 80% 0%,rgba(31,78,91,.24),transparent 34%),var(--ink-950)}
.container{width:min(var(--content),calc(100% - 40px));margin-inline:auto}
.site-header{height:var(--header-h);position:sticky;top:0;z-index:50;background:rgba(8,13,25,.88);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.header-inner{height:100%;display:flex;align-items:center;justify-content:space-between;gap:28px}
.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.02em}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,var(--gold-300),var(--gold-600));color:#1c1720;box-shadow:var(--shadow-gold);font-size:22px}.brand-name{font-size:16px}.brand-name small{display:block;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.main-nav{display:flex;align-items:center;gap:6px}.main-nav a{padding:9px 13px;border-radius:10px;color:#b8c5d5;font-size:13px;font-weight:750;transition:.2s}.main-nav a:hover,.main-nav a[aria-current=page]{color:var(--gold-300);background:rgba(247,198,92,.1)}
.header-cta,.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:1px solid transparent;border-radius:12px;padding:12px 18px;font-weight:850;font-size:14px;transition:transform .18s,filter .18s,border-color .18s}.header-cta,.btn-primary{color:#251a0b;background:linear-gradient(135deg,var(--gold-300),var(--gold-500));box-shadow:0 8px 26px rgba(217,155,50,.2)}.btn:hover,.header-cta:hover{transform:translateY(-2px);filter:brightness(1.06)}.btn-secondary{background:rgba(255,255,255,.04);border-color:var(--line);color:var(--sand-100)}.btn-quiet{background:transparent;border-color:rgba(255,255,255,.12);color:var(--muted)}
.eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--gold-300);font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase}.eyebrow:before{content:"";width:22px;height:1px;background:var(--gold-400)}
.page-title{font:clamp(36px,5vw,62px)/1.04 var(--font-display);letter-spacing:-.035em;margin:14px 0 16px;color:var(--sand-50)}.page-title em{font-style:normal;color:var(--gold-300)}.lead{max-width:680px;color:#b9c7d8;font-size:17px;line-height:1.75}.section{padding:72px 0}.section-head{max-width:720px;margin-bottom:28px}.section-head h2{font:clamp(26px,3.4vw,40px)/1.15 var(--font-display);margin:10px 0;color:var(--sand-50)}.section-head p{color:var(--muted);margin:0}
.panel{background:linear-gradient(155deg,rgba(27,44,66,.96),rgba(14,24,40,.96));border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}.panel-pad{padding:clamp(20px,3vw,32px)}.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.info-card{padding:22px;border-radius:var(--radius-md);background:rgba(255,255,255,.035);border:1px solid var(--line)}.info-card h3{margin:10px 0 6px;font-size:17px;color:var(--sand-50)}.info-card p{margin:0;color:var(--muted);font-size:14px}.icon-tile{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:rgba(247,198,92,.12);color:var(--gold-300);font-size:21px}
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stat{padding:17px;border:1px solid var(--line);border-radius:14px;background:rgba(5,10,20,.35)}.stat strong{display:block;font-size:clamp(21px,3vw,30px);color:var(--gold-300);font-variant-numeric:tabular-nums}.stat span{color:var(--muted);font-size:12px;font-weight:750;text-transform:uppercase;letter-spacing:.08em}
.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--line);border-radius:99px;color:#c6d2df;background:rgba(255,255,255,.04);font-size:11px;font-weight:800}.pill-gold{color:var(--gold-300);border-color:rgba(247,198,92,.25);background:rgba(247,198,92,.08)}
.notice{padding:15px 17px;border-left:3px solid var(--aqua-400);background:rgba(53,196,180,.08);border-radius:0 12px 12px 0;color:#c6e7e2;font-size:13px}.notice.warning{border-color:var(--gold-400);background:rgba(247,198,92,.08);color:#f2dfb7}
.site-footer{padding:36px 0 48px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.footer-inner{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}.footer-links{display:flex;gap:18px;flex-wrap:wrap}
.breadcrumbs{padding:22px 0;color:#8293a9;font-size:12px}.breadcrumbs a:hover{color:var(--gold-300)}.breadcrumbs span{padding:0 8px;color:#53647a}
@media(max-width:820px){.main-nav{display:none}.card-grid{grid-template-columns:1fr 1fr}.header-cta{padding:10px 12px;font-size:12px}}
@media(max-width:560px){.container{width:min(100% - 28px,var(--content))}.card-grid{grid-template-columns:1fr}.stat-grid{grid-template-columns:1fr 1fr}.section{padding:52px 0}.page-title{font-size:40px}.lead{font-size:15px}.header-inner{gap:10px}}

/* Shared hero */
.hero{position:relative;isolation:isolate;overflow:hidden;min-height:500px;display:flex;align-items:center;background:#0b1728 url('../assets/pirate-island-hero.png') center/cover no-repeat;border-bottom:1px solid var(--line)}
.hero:before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(7,14,27,.98) 0%,rgba(7,14,27,.86) 35%,rgba(7,14,27,.25) 76%,rgba(7,14,27,.08) 100%),linear-gradient(0deg,rgba(8,13,25,.85),transparent 42%)}
.hero-content{padding:76px 0;max-width:610px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.hero-kpis{display:flex;gap:22px;flex-wrap:wrap;margin-top:32px}.hero-kpis b{display:block;color:var(--gold-300);font-size:20px}.hero-kpis span{font-size:11px;color:#aebdce;text-transform:uppercase;letter-spacing:.08em}
/* /chest-simulator/ */
.simulator-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:20px;align-items:start}.sim-stage{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 42%,rgba(247,198,92,.15),transparent 48%),linear-gradient(145deg,#172b43,#0c1729)}.sim-stage:after{content:"";position:absolute;inset:auto 10% 0;height:1px;background:linear-gradient(90deg,transparent,rgba(247,198,92,.4),transparent)}.chest-art{font-size:clamp(90px,14vw,150px);line-height:1;filter:drop-shadow(0 18px 24px rgba(0,0,0,.45));transform-origin:center}.chest-art.is-opening{animation:chest-pop .55s ease}.sim-result{min-height:28px;color:var(--gold-300);font-weight:850;margin:16px 0}.sim-controls{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;width:min(100%,440px)}.sim-controls .btn{width:100%}.sim-side{display:grid;gap:14px}.sim-side .panel{padding:22px}.sim-side h3{margin:0 0 12px}.sim-log{max-height:230px;overflow:auto;color:var(--muted);font-size:12px}.sim-log li{padding:8px 0;border-bottom:1px solid var(--line)}
/* /odds/ */
.odds-hero{padding:58px 0 34px;background:radial-gradient(ellipse at 82% 0%,rgba(247,198,92,.13),transparent 35%)}.odds-feature{display:grid;grid-template-columns:1fr 1fr;gap:22px}.odds-number{font:clamp(42px,7vw,76px)/1 var(--font-display);color:var(--gold-300);letter-spacing:-.04em}.odds-table{width:100%;border-collapse:collapse;font-size:14px}.odds-table th{text-align:left;color:#8fa2b9;font-size:11px;text-transform:uppercase;letter-spacing:.1em}.odds-table th,.odds-table td{padding:14px 12px;border-bottom:1px solid var(--line)}.odds-table td:last-child{text-align:right;color:var(--gold-300);font-weight:850;font-variant-numeric:tabular-nums}.calculator{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field label{display:block;margin-bottom:7px;color:#aebdce;font-size:12px;font-weight:800}.field input,.field select{width:100%;padding:13px 14px;border-radius:11px;border:1px solid var(--line);background:#0b1627;color:var(--sand-50);outline:none}.field input:focus,.field select:focus{border-color:var(--gold-400);box-shadow:0 0 0 3px rgba(247,198,92,.1)}.probability-result{padding:22px;border-radius:16px;background:rgba(247,198,92,.08);border:1px solid rgba(247,198,92,.2)}.probability-result strong{display:block;font-size:34px;color:var(--gold-300)}
/* /chest-locations/ */
.map-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.55fr);gap:18px}.island-map{position:relative;min-height:490px;overflow:hidden;border-radius:20px;border:1px solid var(--line);background:radial-gradient(ellipse at 45% 50%,#477a70 0%,#285b58 38%,#173b46 66%,#10283a 100%)}.island-map:before{content:"";position:absolute;inset:8%;border-radius:46% 54% 43% 57% / 47% 43% 57% 53%;background:linear-gradient(135deg,#8c9b70,#536f55 52%,#314f49);box-shadow:0 0 0 16px rgba(8,19,30,.16),0 0 0 30px rgba(8,19,30,.1);transform:rotate(-12deg)}.map-gridlines{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:44px 44px;opacity:.4}.map-pin{position:absolute;z-index:2;display:grid;place-items:center;width:38px;height:38px;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);background:var(--gold-400);color:#20180d;border:3px solid #fff1c9;box-shadow:0 7px 20px rgba(0,0,0,.4)}.map-pin span{transform:rotate(45deg);font-weight:950}.map-legend{position:absolute;left:18px;bottom:18px;z-index:3;padding:10px 13px;border-radius:10px;background:rgba(8,13,25,.85);font-size:11px;color:#d6e0e8}.location-list{display:grid;gap:10px}.location-item{padding:15px;border-radius:13px;background:rgba(255,255,255,.035);border:1px solid var(--line)}.location-item b{display:block;color:var(--sand-50)}.location-item small{color:var(--muted)}
/* /how-to-get/ */
.steps{counter-reset:step;display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.step-card{position:relative;padding:22px 22px 22px 72px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035)}.step-card:before{counter-increment:step;content:counter(step,decimal-leading-zero);position:absolute;left:20px;top:20px;color:var(--gold-300);font:24px var(--font-display)}.step-card h3{margin:0 0 6px}.step-card p{margin:0;color:var(--muted);font-size:14px}
/* /how-rare/ */
.rare-meter{height:14px;border-radius:99px;background:#25354a;overflow:hidden}.rare-meter span{display:block;height:100%;width:var(--meter,8%);border-radius:99px;background:linear-gradient(90deg,var(--aqua-400),var(--gold-300))}.rare-chart{display:grid;gap:16px}.rare-row{display:grid;grid-template-columns:150px 1fr 100px;align-items:center;gap:14px;font-size:13px}.rare-row b{color:var(--sand-50)}.rare-row strong{text-align:right;color:var(--gold-300);font-variant-numeric:tabular-nums}
.faq{border-top:1px solid var(--line)}.faq details{padding:17px 0;border-bottom:1px solid var(--line)}.faq summary{cursor:pointer;font-weight:850;color:var(--sand-50)}.faq details p{margin:12px 0 0;color:var(--muted);font-size:14px}
@keyframes chest-pop{0%{transform:translateY(8px) scale(.96)}45%{transform:translateY(-12px) scale(1.06)}100%{transform:translateY(0) scale(1)}}
@media(max-width:820px){.hero{min-height:460px}.simulator-layout,.map-layout,.odds-feature{grid-template-columns:1fr}.map-layout{gap:14px}.island-map{min-height:380px}}
@media(max-width:560px){.hero{min-height:530px;background-position:62% center}.hero:before{background:linear-gradient(90deg,rgba(7,14,27,.94),rgba(7,14,27,.62)),linear-gradient(0deg,rgba(8,13,25,.8),transparent)}.hero-content{padding:60px 0}.sim-stage{min-height:350px}.sim-controls{grid-template-columns:1fr 1fr}.calculator{grid-template-columns:1fr}.steps{grid-template-columns:1fr}.rare-row{grid-template-columns:100px 1fr 82px;gap:8px}.odds-table{font-size:12px}.odds-table th,.odds-table td{padding:11px 7px}}

:root, :root[data-theme="dark"] {
  --color-accent: var(--gold-400);
  --color-accent-hover: var(--gold-300);
  --color-accent-soft: #2b271f;
  --color-accent-text: var(--gold-300);
  --color-link: var(--aqua-300);
  --color-border-active: var(--gold-500);
  --color-focus: var(--gold-300);
  --color-bg: var(--ink-950);
  --color-surface: var(--ink-850);
  --color-surface-subtle: var(--ink-800);
  --color-surface-inset: var(--ink-900);
  --color-surface-hover: #263c49;
  --color-border: var(--line);
  --color-border-control: #697b90;
  --color-text: var(--sand-50);
  --color-text-secondary: #c0cdd9;
  --color-text-muted: var(--muted);
  --masthead: var(--ink-950);
  --masthead-text: var(--sand-100);
  --display: var(--font-display);
}
:root[data-theme="light"] {
  --color-accent: var(--gold-400);
  --color-accent-hover: var(--gold-300);
  --color-accent-soft: #f6e6bd;
  --color-accent-text: #765016;
  --color-link: #185950;
  --color-border-active: #8b642b;
  --color-focus: #185950;
  --color-bg: #f5eddb;
  --color-surface: #fffaef;
  --color-surface-subtle: #f6edd7;
  --color-surface-inset: #fbf3e2;
  --color-surface-hover: #ece1c8;
  --color-border: #ded0af;
  --color-border-control: #918365;
  --color-text: #162936;
  --color-text-secondary: #394b4c;
  --color-text-muted: #525b52;
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 1rem/1.6 var(--font-sans);
}
.site-shell { background: radial-gradient(ellipse at 80% 0%, #33657130, transparent 35%), var(--color-bg); }
* { box-sizing: border-box; }
a { color: var(--color-link); text-underline-offset: .22em; }
.reading a, .sources a, .guide-links a { text-decoration: underline; }
button, input, select, summary { font: inherit; }
button, .button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(72rem, 100% - 2 * var(--public-gutter)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; transform: translateY(-200%); z-index: 100; }
.skip:focus { transform: none; }
header { background: var(--masthead); color: var(--masthead-text); }
footer { background: var(--color-surface); }
.header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; height: 100%; }
.desktop-nav { grid-column: 2; display: flex; justify-content: flex-end; min-width: 0; }
.desktop-nav a { text-align: center; }
.mobile-menu { display: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--masthead-text); text-decoration: none; font-weight: 800; width: fit-content; min-height: 44px; }
.brand-logo { flex: 0 0 auto; inline-size: 2.5rem; block-size: 2.5rem; object-fit: contain; }
.brand-name { white-space: nowrap; }
.brand-name b { color: var(--color-accent); font-weight: inherit; }
.icon { display: grid; place-items: center; border-radius: .7rem; background: var(--color-accent); color: #192000; width: 2.15rem; height: 2.15rem; font-size: 1.18rem; }
nav { display: flex; gap: .25rem; align-items: center; }
nav a { display: grid; place-items: center; padding-inline: .8rem; min-height: 44px; color: var(--masthead-text); text-decoration: none; white-space: nowrap; font-size: .9rem; font-weight: 650; border-radius: .55rem; }
nav a[aria-current], nav a:hover { color: var(--gold-300); background: #f7c65c20; }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding-inline: .8rem; border-radius: .55rem; color: var(--masthead-text); white-space: nowrap; font-size: .9rem; font-weight: 650; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu[open] > summary, .more-menu > summary:hover, .more-menu:has(a[aria-current]) > summary { color: var(--gold-300); background: #f7c65c20; }
.more-menu-panel { position: absolute; z-index: 60; top: calc(100% + .65rem); right: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; width: min(24rem, calc(100vw - 2rem)); padding: .65rem; border: 1px solid #687d84; border-radius: .75rem; background: var(--ink-900); box-shadow: var(--shadow-lg); }
.more-menu-panel a { justify-items: start; padding-inline: .75rem; }
[data-theme-picker] { position: relative; grid-column: 3; justify-self: end; }
[data-theme-picker] > summary, .mobile-menu > summary { list-style: none; display: grid; place-items: center; min-width: 44px; height: 44px; padding-inline: .55rem; border: 1px solid var(--color-border-control); border-radius: .7rem; }
[data-theme-picker] > summary { font-size: 1.4rem; }
.theme-options { position: absolute; z-index: 5; right: 0; top: calc(100% + .5rem); display: flex; gap: .35rem; padding: .4rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: .65rem; }
.theme-options button[aria-pressed=true] { background: var(--color-accent-soft); }
main { min-height: 76vh; padding-block: clamp(2rem, 6vw, 5.3rem) 4rem; }
.split { display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; gap: clamp(1.4rem, 5vw, 5rem); }
.hero { display: block; min-width: 0; min-height: auto; background: none; border: 0; }
.hero::before { display: none; }
.hero.short { max-width: 52rem; margin-bottom: 2rem; }
.eyebrow { color: var(--color-accent-text); }
h1, h2, h3, p { margin: 0; }
h1 { margin-block: .55rem 1rem; font: 700 clamp(2.5rem, 5.8vw, 5rem)/1.04 var(--display); letter-spacing: -.035em; }
h1 small { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .75rem; margin-top: 1.1rem; color: var(--color-text-muted); font: 600 .85rem/1.4 var(--font-mono); letter-spacing: 0; text-transform: none; }
h1 small b { color: var(--color-accent-text); font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: -.065em; }
.short h1 { font-size: clamp(2.55rem, 5vw, 4.5rem); }
h2 { font: 700 clamp(1.35rem, 2.3vw, 1.9rem)/1.2 var(--display); letter-spacing: -.025em; }
h3 { line-height: 1.25; }
p { color: var(--color-text-secondary); }
.hero p { max-width: 37rem; font-size: 1.08rem; }
.sources, .footer { color: var(--color-text-muted); font-size: .85rem; }
.sources { display: flex; align-items: center; gap: .35rem 1rem; flex-wrap: wrap; margin-top: .75rem; }
.sources a { display: inline-flex; align-items: center; min-height: 44px; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--color-surface-subtle), var(--color-surface)); box-shadow: var(--shadow-md); }
.panel h2 { margin-bottom: 1rem; }
form { display: grid; gap: .85rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
label { display: grid; gap: .35rem; min-width: 0; font-weight: 650; font-size: .88rem; }
input, select { width: 100%; min-height: 44px; min-width: 0; padding: .5rem .65rem; color: var(--color-text); background: var(--color-surface-inset); border: 1px solid var(--color-border-control); border-radius: .55rem; font-size: 1rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 44px; padding: .55rem .85rem; border: 1px solid var(--color-border-control); background: var(--color-surface); color: var(--color-text); border-radius: .6rem; text-decoration: none; font-weight: 650; }
button:hover, .button:hover { background: var(--color-surface-hover); }
.primary { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); border-color: transparent; color: #251a0b; font-weight: 850; border-radius: .7rem; box-shadow: var(--shadow-gold); }
.primary:hover { background: var(--color-accent-hover); color: #172000; }
.presets button { font: 600 .8rem var(--font-mono); }
.result { display: grid; gap: .18rem; padding: 1rem; background: var(--color-accent-soft); border-radius: var(--radius-md); }
.result strong { font: 800 clamp(1.75rem, 4vw, 2.85rem)/1.2 var(--font-mono); letter-spacing: -.075em; color: var(--color-accent-text); overflow-wrap: anywhere; }
.result span { font-weight: 700; font-size: .9rem; }
.result small { color: var(--color-text-secondary); }
.explore, .reading { margin-top: clamp(2rem, 5vw, 4rem); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.card { display: flex; flex-direction: column; gap: .42rem; padding: 1rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-lg); color: var(--color-text); text-decoration: none; }
a.card:hover { border-color: var(--color-border-active); background: var(--color-surface-inset); }
.card .icon { margin-bottom: .35rem; background: var(--color-accent-soft); color: var(--color-accent-text); }
.link-card { position: relative; }
.card-item { width: 1.75rem; height: 1.75rem; object-fit: contain; }
.link-card a { font-weight: 800; width: fit-content; }
.link-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.link-card:is(:hover, :focus-within) { border-color: var(--color-border-active); background: var(--color-surface-inset); }
.card strong span { color: var(--color-accent-text); }
.card > span:last-child, .card p { color: var(--color-text-secondary); font-size: .92rem; }
.reading { max-width: 48rem; }
.reading h2 { margin-bottom: .65rem; }
.reading > a { display: inline-block; margin-top: .65rem; }
.page-home .split, .simulator-hero {
  margin-bottom: 1.4rem;
  padding: clamp(1.15rem, 4vw, 2.9rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #080d19f5, #080d19a6 64%, #080d1940), url("/assets/pirate-island-hero.webp") center 52% / cover no-repeat;
  color: var(--sand-50);
}
.simulator-hero h1 { font-size: clamp(2.45rem, 7vw, 5.25rem); }
.simulator-hero :is(p, small, .sources a, .sources span),
.page-home .split .hero :is(p, small, .sources a, .sources span) { color: var(--sand-100); }
.simulator-hero :is(h1 b, .eyebrow), .page-home .split .hero :is(h1 b, .eyebrow) { color: var(--gold-300); }
.page-home .split .panel { color: var(--color-text); }
.simulator-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: clamp(1rem, 3vw, 2rem); }
.sim-controls { display: grid; grid-template-columns: 1fr; gap: .75rem; min-width: 0; width: 100%; }
.sim-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin: 0; }
.sim-stats div { padding: .65rem .72rem; border: 1px solid var(--color-border); border-radius: .6rem; background: var(--color-surface-subtle); min-width: 0; }
.sim-stats dt { color: var(--color-text-secondary); font-weight: 700; font-size: .78rem; }
.sim-stats dd { margin: .18rem 0 0; color: var(--color-accent-text); font: 800 clamp(1.02rem, 2vw, 1.5rem)/1.25 var(--font-mono); letter-spacing: -.06em; overflow-wrap: anywhere; }
.sim-controls .opens { display: grid; grid-template-columns: 1fr 1fr; }
.sim-controls .opens button { padding-inline: .45rem; }
.sim-reset { justify-self: start; }
.guide { max-width: 58rem; }
.guide .hero { background: transparent; color: var(--color-text); }
.guide ol { padding-inline-start: 1.25rem; color: var(--color-text-secondary); }
.guide li + li { margin-top: .65rem; }
.guide-section, .odds-panel, .run-history, .location-panel { margin-top: 1.4rem; }
.chest-atlas { margin: 0; }
.chest-atlas-note { margin-bottom: .75rem; color: var(--color-text-secondary); }
.chest-atlas-note a { text-decoration: underline; }
.chest-atlas-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .35rem; }
.chest-atlas-image { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.guide .steps { list-style: none; padding: 0; }
.guide .steps li { margin: 0; background: var(--color-surface); border-color: var(--color-border); }
.step-card p, .sim-log, .faq details p { color: var(--color-text-secondary); }
.step-card::before, .rare-row strong, .odds-table td:last-child { color: var(--color-accent-text); }
.rare-row b, .faq summary { color: var(--color-text); }
.rare-row meter { width: 100%; height: 1.3rem; accent-color: var(--aqua-400); }
.rare-row meter::-webkit-meter-bar { background: var(--color-surface-inset); border: 1px solid var(--color-border-control); border-radius: 2rem; }
.rare-row meter::-webkit-meter-optimum-value { background: linear-gradient(90deg, var(--aqua-400), var(--gold-300)); border-radius: 2rem; }
.faq h2 { margin-top: 1.25rem; }
.faq summary { min-height: 44px; padding-block: .55rem; }
.reward-fields { grid-template-columns: minmax(0, 1.15fr) minmax(0, .8fr) minmax(0, 1fr); }
.map-intro { display: grid; align-content: start; }
.map-intro .notice { color: var(--color-text-secondary); }
.island-map { min-height: clamp(16rem, 34vw, 25rem); }
.chest-route { padding-inline-start: 1.3rem; color: var(--color-text-secondary); }
.chest-route li + li { margin-top: .45rem; }
.route-calculator-links a { text-decoration: none; }
.page-home #calculator { scroll-margin-top: calc(var(--header-h) + 1rem); }
.guide-links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: .9rem; }
.table-note { margin-top: .7rem; font-size: .86rem; }
.chest-stage {
  --light: #77e1d3;
  --rgb: 119 225 211;
  overflow: hidden;
  border: 1px solid #547876;
  border-radius: var(--radius-md);
  background: #101c2b;
  color: #fff;
  text-align: center;
}
.chest-scene {
  position: relative;
  display: grid;
  place-items: end center;
  height: clamp(14rem, 32vw, 16.5rem);
  padding-bottom: 1.25rem;
  perspective: 560px;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 72%, #325b62 0%, #162c40 45%, #0d1525 77%);
}
.chest-scene::before {
  content: "";
  position: absolute;
  inset: 48% -32% -45%;
  transform: rotateX(58deg);
  background:
    radial-gradient(ellipse, #a389ff60 0%, transparent 59%),
    repeating-linear-gradient(90deg, transparent 0 32px, #ba9cff30 33px 34px),
    repeating-linear-gradient(0deg, transparent 0 24px, #ba9cff30 25px 26px);
  mask-image: radial-gradient(ellipse, black 5%, transparent 69%);
}
.chest-scene::after {
  content: "";
  position: absolute;
  bottom: 1.65rem;
  width: 11rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #0c0825cc;
  filter: blur(5px);
  z-index: -1;
}
.chest-art {
  position: relative;
  width: clamp(9.5rem, 32vw, 12.5rem);
  aspect-ratio: 1;
  transform: rotate(-6deg) rotateY(-15deg);
  filter: drop-shadow(0 .7rem 1rem #080d19a8);
}
.chest-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chest-open { opacity: 0; }
.chest-stage[data-state="opening"] .chest-closed { animation: chest-image-swap 680ms steps(1, end) both; }
.chest-stage[data-state="opening"] .chest-open { animation: chest-image-reveal 680ms steps(1, end) both; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-closed { opacity: 0; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-open { opacity: 1; }
.chest-halo, .chest-burst, .chest-ring { position: absolute; opacity: 0; pointer-events: none; }
.chest-halo {
  bottom: 2rem;
  width: min(90%, 17rem);
  height: 8rem;
  background: radial-gradient(ellipse, rgb(var(--rgb) / 55%), transparent 67%);
}
.chest-burst {
  bottom: 4rem;
  width: min(92%, 16rem);
  height: 11rem;
  transform-origin: center 85%;
  background:
    radial-gradient(ellipse at 50% 70%, #fff2c0, rgb(var(--rgb) / 80%) 13%, transparent 57%),
    conic-gradient(from -47deg at 50% 85%, transparent, rgb(var(--rgb) / 65%) 5deg, transparent 13deg 29deg, rgb(var(--rgb) / 55%) 37deg, transparent 47deg 63deg, rgb(var(--rgb) / 55%) 76deg, transparent 86deg);
  mask-image: radial-gradient(ellipse at 50% 70%, black 4%, transparent 69%);
}
.chest-ring { bottom: 1.6rem; width: 8rem; height: 1.8rem; border-radius: 50%; border: 2px solid var(--light); box-shadow: 0 0 1rem var(--light); }
.chest-sparks { position: absolute; left: 50%; bottom: 5.5rem; z-index: 1; }
.chest-sparks i {
  position: absolute;
  width: .42rem;
  height: .42rem;
  border-radius: 1px;
  background: var(--light);
  box-shadow: 0 0 .55rem var(--light);
  opacity: 0;
  --x: 120px;
  --y: -64px;
}
.chest-sparks i:nth-child(3n) { width: .25rem; height: .7rem; }
.chest-sparks i:nth-child(1) { --x: -116px; --y: -53px; }
.chest-sparks i:nth-child(2) { --x: -98px; --y: -90px; }
.chest-sparks i:nth-child(3) { --x: -64px; --y: -109px; }
.chest-sparks i:nth-child(4) { --x: -32px; --y: -130px; }
.chest-sparks i:nth-child(5) { --x: -12px; --y: -106px; }
.chest-sparks i:nth-child(6) { --x: 30px; --y: -125px; }
.chest-sparks i:nth-child(7) { --x: 55px; --y: -103px; }
.chest-sparks i:nth-child(8) { --x: 92px; --y: -88px; }
.chest-sparks i:nth-child(9) { --x: 110px; --y: -40px; }
.chest-sparks i:nth-child(10) { --x: -76px; --y: -45px; }
.chest-sparks i:nth-child(11) { --x: 76px; --y: -38px; }
.chest-reward {
  position: absolute;
  bottom: 8.4rem;
  z-index: 2;
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 .95rem var(--light));
}
.chest-stage #last-batch {
  display: grid;
  place-items: center;
  min-height: 3.1rem;
  padding: .38rem .7rem;
  border-top: 1px solid #ffffff25;
  background: #0f0d23;
  color: #f8f6ff;
  font-size: .88rem;
  font-weight: 700;
}
.chest-stage[data-state="opening"] .chest-art { animation: chest-charge 680ms both; }
.chest-stage[data-state="opening"] .chest-halo { animation: chest-charge-light 680ms both; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-art { animation: chest-recoil 580ms both; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-burst { animation: chest-glow 830ms ease-out; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-ring { animation: chest-shockwave 690ms ease-out; }
.chest-stage:is([data-state="opened"], [data-state="token"]) .chest-sparks i { animation: chest-spark 810ms ease-out; }
.chest-stage[data-state="token"] { --light: #ffd658; --rgb: 255 214 88; border-color: #eab641; }
.chest-stage[data-reward="ruby-gem"] { --light: #ff819e; --rgb: 255 129 158; border-color: var(--light); }
.chest-stage[data-reward="sapphire-gem"] { --light: #83c9ff; --rgb: 131 201 255; border-color: var(--light); }
.chest-stage[data-reward$="-gem"] #last-batch { color: var(--light); }
.chest-stage[data-reward="pirate-coins"] [data-item="pirate-coins"],
.chest-stage[data-reward="ruby-gem"] [data-item="ruby-gem"],
.chest-stage[data-reward="sapphire-gem"] [data-item="sapphire-gem"],
.chest-stage[data-reward="pirate-token-medallion"] [data-item="pirate-token-medallion"] {
  opacity: 1;
  animation: chest-reward-rise 520ms cubic-bezier(.18, .82, .26, 1) both;
}
.chest-stage[data-state="token"] [data-item="pirate-token-medallion"] { animation-duration: 850ms; }
.chest-stage[data-state="token"] .chest-halo { opacity: .75; }
.chest-stage[data-state="token"] #last-batch { color: #ffe37e; }
.opens button[aria-disabled="true"] { cursor: wait; opacity: .72; }

@keyframes chest-charge {
  0% { transform: rotate(-6deg) rotateY(-15deg); }
  35% { transform: translateY(2px) scale(1.04, .97) rotate(-3deg) rotateY(-8deg); }
  55%, 77% { transform: translateX(-3px) rotate(-9deg) rotateY(-12deg) scale(1.05); }
  66%, 89% { transform: translateX(4px) rotate(1deg) rotateY(-10deg) scale(1.07); }
  100% { transform: translateY(3px) scale(1.09, .97) rotate(-4deg) rotateY(-10deg); }
}
@keyframes chest-charge-light {
  from { opacity: 0; transform: scale(.55); }
  to { opacity: 1; transform: scale(1.15); }
}
@keyframes chest-recoil {
  0% { transform: translateY(3px) scale(1.09, .97) rotate(-4deg) rotateY(-10deg); }
  28% { transform: translateY(-16px) scale(1.08) rotate(-10deg) rotateY(-10deg); }
  65% { transform: translateY(2px) scale(1.02, .96) rotate(-4deg) rotateY(-15deg); }
  100% { transform: rotate(-6deg) rotateY(-15deg); }
}
@keyframes chest-glow {
  0% { opacity: 0; transform: scale(.45); }
  23% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes chest-shockwave {
  0% { opacity: .85; transform: scale(.65); }
  100% { opacity: 0; transform: scale(2.6); }
}
@keyframes chest-spark {
  0% { opacity: 0; transform: scale(.4); }
  25% { opacity: 1; }
  67% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(150deg) scale(.35); }
}
@keyframes chest-image-swap {
  0% { opacity: 1; }
  82%, 100% { opacity: 0; }
}
@keyframes chest-image-reveal {
  0% { opacity: 0; }
  82%, 100% { opacity: 1; }
}
@keyframes chest-reward-rise {
  0%, 18% { opacity: 0; transform: translateY(3rem) scale(.38) rotateY(-70deg); }
  66% { opacity: 1; transform: translateY(-.5rem) scale(1.12) rotateY(12deg); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chest-stage * { animation: none !important; }
}
.table-wrap { overflow-x: auto; }
.home-odds-guide section + section { margin-top: 2.25rem; }
.home-odds-guide :is(h3, p + p, .table-wrap, .table-wrap + p) { margin-top: .85rem; }
.home-odds-guide h3 + p { margin-top: .35rem; }
table { width: 100%; min-width: 34rem; border-collapse: collapse; text-align: left; }
th, td { padding: .75rem .65rem; border-bottom: 1px solid var(--color-border); }
thead { background: var(--color-surface-subtle); }
td:last-child { font-family: var(--font-mono); white-space: nowrap; }
.map-intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.map-intro h2 { margin-bottom: .4rem; }
.filter { max-width: 16rem; margin-top: 1.2rem; }
.snapshot { margin-top: .65rem; font-size: .85rem; }
.adsterra-placement { position: relative; left: 50%; transform: translateX(-50%); width: 300px; max-width: calc(100vw - 20px); min-height: 280px; margin-block: 2rem; text-align: center; }
.adsterra-native { max-width: 100%; overflow-x: auto; margin-block: 2.25rem; }
.adsterra-placement iframe, .adsterra-native iframe { display: block; max-width: 100%; border: 0; }
.adsterra-native iframe { width: 100%; }
.adsterra-label { margin: 0 0 .45rem; color: var(--color-text-muted); font: 600 .68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tag { color: var(--color-accent-text); font: 650 .76rem var(--font-mono); }
footer { border-block: 1px solid var(--color-border) 0; }
.footer { display: flex; flex-wrap: wrap; gap: .45rem 1rem; min-height: 4rem; align-items: center; justify-content: space-between; }
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .page-home .split, .simulator-hero { background-image: linear-gradient(90deg, #080d19f5, #080d19a6 64%, #080d1940), url("/assets/pirate-island-hero-mobile.webp"); }
  .header { position: relative; grid-template-columns: minmax(0, 1fr) auto auto; min-height: var(--header-h); gap: .5rem; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu nav { position: absolute; z-index: 2; inset: calc(100% + .35rem) 0 auto auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(26rem, 100%); max-height: calc(100dvh - var(--header-h) - 1rem); overflow-y: auto; padding: .4rem; background: var(--ink-900); border: 1px solid #687d84; border-radius: .75rem; box-shadow: var(--shadow-lg); }
  .mobile-menu nav a { justify-items: start; }
  [data-theme-picker] { grid-column: 3; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .page-simulator main { padding-top: 1rem; }
  .simulator-hero { margin-bottom: .75rem; padding: 1rem; }
  .simulator-hero h1 { margin-block: .4rem .6rem; font-size: clamp(1.95rem, 6.4vw, 2.6rem); }
  .simulator-hero h1 small { margin-top: .55rem; }
  .simulator-hero p { font-size: .94rem; line-height: 1.5; }
  .simulator-panel { padding: .75rem; }
  .simulator-panel h2 { margin-bottom: .65rem; }
  .simulator-layout { grid-template-columns: 1fr; }
  .chest-scene { height: clamp(10.75rem, 48vw, 14rem); padding-bottom: .85rem; }
  .chest-art { width: clamp(7.25rem, 36vw, 10rem); }
  .chest-reward { bottom: clamp(5.5rem, 25vw, 7.5rem); width: 3.65rem; height: 3.65rem; }
  .chest-stage #last-batch { min-height: 2.8rem; }
  .sim-controls .opens { gap: .55rem; }
  .sim-controls .opens button { min-height: 48px; touch-action: manipulation; }
  .sim-reset { min-height: 44px; }
  .reward-fields { grid-template-columns: 1fr; }
  .page-home .split, .simulator-hero { background-position: 55% center; }
}
@media (max-width: 580px) {
  .cards { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .header.shell { width: calc(100% - 1rem); gap: .375rem; }
  .header .brand { gap: .4rem; }
  .header .brand-name { font-size: .88rem; }
  .header .brand-logo { inline-size: 2.1rem; block-size: 2.1rem; }
}
@media (max-width: 319px) {
  .adsterra-placement { display: none; }
}
