/* Direction: Zipline — warm off-white paper, ink-black dots, a red-to-amber ribbon */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #ebe8e3;
  --border: #d8d4ce;
  --border-strong: #b6aea9;
  --ink: #17130f;
  --muted: #676461;
  --accent: #e4572e;
  --accent-hover: #c24a27;
  --accent-ink: #200c06;
  --accent-text: #b23a16;
  --accent-strong: #a43f21;
  --accent-soft: #f3ded4;
  --accent-border: #eead98;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dbe6da;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #eee1d3;
  --warning-strong: #994607;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #efdad6;
  --danger-strong: #b91c1c;
  --chart-1: #e4572e;
  --chart-2: #a48b01;
  --chart-3: #098a52;
  --chart-4: #2295ae;
  --chart-5: #595fd9;
  --chart-6: #d55fbc;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-card: 22px;
  --radius-btn: 999px;
  --x-path-a: #ee3a2c;
  --x-path-b: #f6a00c;
  --x-ring: #e0342b;
  --font-sans: "Inter", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #110703;
  --surface: #29201c;
  --surface-2: #1d1310;
  --border: #322a26;
  --border-strong: #58514f;
  --ink: #f6f4ef;
  --muted: #9a9591;
  --accent: #e4572e;
  --accent-hover: #e8704d;
  --accent-ink: #200c06;
  --accent-text: #e6643f;
  --accent-strong: #e6643f;
  --accent-soft: #3f190c;
  --accent-border: #702b16;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #122210;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #351804;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #360c09;
  --danger-strong: #d16969;
  --chart-1: #e4572e;
  --chart-2: #c1a61d;
  --chart-3: #05995b;
  --chart-4: #1db3d1;
  --chart-5: #676feb;
  --chart-6: #e870ce;
}

.zip-dot { transition: transform 0.15s ease; }
.zip-dot[data-start="true"] {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--x-ring);
  animation: zip-pulse 1.4s ease-in-out infinite;
}
@keyframes zip-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
#zip.is-won #zip-svg { animation: zip-win 0.7s ease-out 1; }
@keyframes zip-win {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}
canvas.zip-confetti {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: transparent; pointer-events: none; overflow: visible;
}
canvas.zip-confetti-fallback { z-index: 99999; }
dialog.modal { margin: auto; text-align: center; }
dialog.modal .btn { justify-content: center; text-align: center; }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* result pop-up: a calm card, one short entrance, no heavy effects */
dialog.zip-modal {
  width: min(calc(100vw - 2rem), 25rem);
  max-width: none;
  padding: 2rem 1.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
  overflow: hidden auto;
  outline: none;
}
dialog.zip-modal:focus, dialog.zip-modal:focus-visible { outline: none; }
dialog.zip-modal[open] { animation: zip-modal-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
dialog.zip-modal[open]::backdrop { animation: zip-fade-in 0.2s ease-out both; }
@keyframes zip-modal-in {
  from { transform: translateY(14px) scale(0.97); }
  to { transform: none; }
}
@keyframes zip-fade-in { from { opacity: 0.4; } to { opacity: 1; } }
#zip-result-body { min-height: 20.5rem; display: flex; flex-direction: column; justify-content: center; }
.zip-pop-icon { box-shadow: 0 0 0 6px var(--accent-soft); }
.zip-loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.zip-spinner {
  width: 2rem; height: 2rem; border-radius: 999px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: zip-spin 0.7s linear infinite;
}
@keyframes zip-spin { to { transform: rotate(360deg); } }
html.reduced-motion dialog.zip-modal[open],
html.reduced-motion dialog.zip-modal[open]::backdrop,
html.reduced-motion .zip-spinner { animation: none; }
html.reduced-motion .zip-dot[data-start="true"],
html.reduced-motion #zip.is-won #zip-svg { animation: none; }
