@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&family=IBM+Plex+Sans+KR:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f3f2ed;
  --bg-strong: #e8e7e1;
  --surface: #fffefa;
  --surface-soft: #f7f6f1;
  --surface-ink: #151b26;
  --ink: #171a1f;
  --muted: #626a74;
  --subtle: #59616b;
  --line: #deddd6;
  --line-strong: #c9c8c0;
  --brand: #1756bd;
  --brand-deep: #103b7a;
  --gold: #c8972f;
  --gold-soft: #f7edcf;
  --mint: #16a37b;
  --danger: #d93d42;
  --shadow-soft: 0 16px 42px rgba(21, 35, 56, 0.12);
  --shadow-panel: 0 24px 70px rgba(17, 24, 39, 0.18);
  --radius: 10px;
  --max: 1280px;
  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f151d;
  --bg-strong: #151f2c;
  --surface: #161f2b;
  --surface-soft: #111924;
  --surface-ink: #0c121a;
  --ink: #f6f8fb;
  --muted: #b6c0cf;
  --subtle: #a5b0c0;
  --line: #2b3748;
  --line-strong: #3c4a5d;
  --brand: #6aa2ff;
  --brand-deep: #a7c5ff;
  --gold: #ffc83d;
  --gold-soft: #3b2d0b;
  --mint: #39cf9f;
  --danger: #ff6b70;
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.32);
  --shadow-panel: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

#fortune,
#quick-picks,
#recent,
#data,
#nearby,
#faq {
  scroll-margin-top: 92px;
}

.fortune-result.hero-panel {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--surface-soft) 42%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  word-break: keep-all;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 99, 246, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(246, 180, 0, 0.08), transparent 24%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

::selection {
  background: rgba(246, 180, 0, 0.35);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface-ink);
  color: #fff;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.brand-logo {
  width: 168px;
  height: auto;
  max-height: 38px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

.theme-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 36px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  isolation: isolate;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 4px 12px rgba(246, 180, 0, 0.34);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

:root[data-theme="dark"] .theme-toggle::before {
  transform: translateX(31px);
  background: var(--brand);
  box-shadow: 0 4px 14px rgba(106, 162, 255, 0.32);
}

.theme-toggle span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  outline: none;
}

.hero {
  padding: 38px 0 28px;
}

.hero-shell,
.section-shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.86fr);
  align-items: start;
  gap: 28px;
}

.hero-fortune .hero-shell {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.hero-story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--brand) 6%, var(--surface))),
    var(--surface);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.hero-story h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(34px, 2.85vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
  word-break: keep-all;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.kinetic-word {
  position: relative;
  display: inline-block;
  color: var(--brand-deep);
  background: linear-gradient(
    180deg,
    transparent 0 56%,
    color-mix(in srgb, var(--gold) 42%, transparent) 56% 88%,
    transparent 88%
  );
  text-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 18%, transparent);
  animation: living-word 4.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  will-change: transform, filter;
}

.kinetic-word-late {
  animation-delay: 0.72s;
}

.hero-description {
  max-width: none;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}

.hero-fortune .hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: auto 0 0;
}

.hero-fortune .hero-link {
  width: 100%;
}

.hero-link,
.primary-button,
.secondary-button,
.ghost-button,
.page-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 18px;
  color: var(--ink);
  background: var(--surface);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.hero-link-primary,
.primary-button {
  border-color: var(--surface-ink);
  background: var(--surface-ink);
  color: #fff;
}

.hero-link:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.page-back:hover,
.hero-link:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.page-back:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.hero-link-primary:hover,
.primary-button:hover,
.hero-link-primary:focus-visible,
.primary-button:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.trust-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.hero-fortune .trust-panel {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.trust-panel div {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.hero-fortune .trust-panel div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.trust-panel dt {
  margin: 0 0 4px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.hero-fortune .trust-panel dt {
  margin: 0;
  font-size: 11px;
}

.trust-panel dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.hero-fortune .trust-panel dd {
  overflow: hidden;
  font-size: 13px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-visual {
  position: relative;
  margin: 28px 0 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #101822;
  box-shadow: var(--shadow-soft);
}

.studio-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.studio-visual figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(10, 16, 24, 0.74);
  color: #f9fafb;
  font-size: 13px;
  font-weight: 750;
}

.generator-panel {
  position: sticky;
  top: 96px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), var(--surface)),
    var(--surface);
  box-shadow: var(--shadow-panel);
}

.panel-topline,
.selector-header,
.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-topline {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-topline h2,
.panel-topline h3,
.selector-header h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-topline h2,
.panel-topline h3 {
  font-size: clamp(21px, 2.2vw, 27px);
}

.generator-section .section-copy {
  margin-inline: auto;
  text-align: center;
}

.generator-panel-inline {
  position: static;
  max-width: 820px;
  margin: 0 auto;
}

.ghost-button {
  min-height: 38px;
  padding-inline: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.result-ticket {
  margin: 18px 22px 0;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold-soft) 52%, transparent), transparent 58%),
    var(--surface-soft);
}

.ticket-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.ticket-head strong {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.result-balls {
  min-height: 68px;
  margin: 14px 0 12px;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
}

.result-note {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.button-row {
  padding: 18px 22px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  font-size: 15px;
}

.secondary-button {
  background: var(--surface-soft);
}

.selector-header {
  padding: 20px 22px 12px;
}

.selector-header h3 {
  font-size: 18px;
}

.selected-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.selected-count span {
  color: var(--brand);
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
  padding: 0 22px;
}

.number-button {
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.number-button:hover,
.number-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand);
  outline: none;
}

.number-button:disabled {
  opacity: 0.38;
}

.number-button.is-selected {
  color: #fff;
  border-color: var(--surface-ink);
  background: var(--surface-ink);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold) 54%, transparent);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 22px 22px;
}

.insight-grid div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.insight-label {
  display: block;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
}

.insight-grid strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.ball,
.draw-ball,
.latest-ball,
.freq-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.18);
}

.ball {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.ball-empty {
  color: transparent;
  background: color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: none;
}

.tier-1 { background: #f4b000; color: #151515; }
.tier-2 { background: #2467d8; }
.tier-3 { background: #d6494b; }
.tier-4 { background: #5d6672; }
.tier-5 { background: #12a873; }

.ball.is-hot {
  outline: 3px solid color-mix(in srgb, var(--gold) 55%, transparent);
}

.latest-strip {
  padding: 14px 0 38px;
}

.latest-card {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.1fr) minmax(180px, 0.7fr);
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-ink);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.latest-card .eyebrow {
  color: var(--gold);
}

.latest-card h2,
.latest-date,
.latest-prize {
  margin: 0;
}

.latest-card h2 {
  font-size: clamp(21px, 3vw, 32px);
  line-height: 1.18;
}

.latest-date,
.latest-prize {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.latest-balls {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.latest-ball,
.draw-ball {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.fortune-section {
  padding-top: 44px;
}

.fortune-method-section {
  padding-top: 26px;
}

.fortune-layout {
  display: grid;
  grid-template-columns: 0.68fr 1.32fr;
  gap: 22px;
  align-items: start;
}

.fortune-copy {
  position: sticky;
  top: 96px;
}

.fortune-copy h2 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
  word-break: keep-all;
}

.fortune-copy > p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  text-wrap: pretty;
  word-break: keep-all;
}

.fortune-mini-grid {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.fortune-mini-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.fortune-mini-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.fortune-mini-grid strong,
.fortune-mini-grid span {
  display: block;
}

.fortune-mini-grid strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.fortune-mini-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
}

.fortune-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.hero-fortune-tool {
  grid-column: span 2;
  align-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.fortune-form,
.fortune-result {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
}

.hero-fortune .fortune-form,
.hero-fortune .fortune-result {
  height: 100%;
}

.fortune-form {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(230px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.hero-fortune-tool .fortune-form {
  grid-template-columns: minmax(0, 1fr);
  padding: 20px;
}

.fortune-form > .field-block {
  grid-row: span 2;
}

.hero-fortune-tool .fortune-form > .field-block {
  grid-row: auto;
}

.field-block {
  display: grid;
  gap: 8px;
}

.field-block label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  word-break: keep-all;
}

.field-block input,
.field-block textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-block textarea {
  resize: vertical;
  min-height: 128px;
}

.hero-fortune-tool .field-block textarea {
  min-height: 94px;
}

.field-block input::placeholder,
.field-block textarea::placeholder {
  color: color-mix(in srgb, var(--subtle) 82%, transparent);
}

.field-block input:focus,
.field-block textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
}

.fortune-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  margin: 0;
}

.fortune-presets button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.fortune-presets button:hover,
.fortune-presets button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  outline: none;
}

.fortune-fields {
  display: grid;
  gap: 12px;
}

.hero-fortune-tool .fortune-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fortune-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
}

.hero-fortune-tool .fortune-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fortune-actions .primary-button,
.fortune-actions .secondary-button {
  min-height: 48px;
}

.quick-recommend-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.quick-action-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-action-stack .primary-button,
.quick-action-stack .secondary-button {
  min-height: 48px;
  padding: 0 12px;
  font-size: 14px;
}

.quick-clear-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 38px;
}

.data-quick-result {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 7px 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold-soft) 52%, transparent), transparent 66%),
    color-mix(in srgb, var(--surface) 92%, var(--surface-soft));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 72%, transparent);
}

.data-quick-head {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}

.data-quick-head span,
.data-quick-head strong {
  white-space: nowrap;
}

.data-quick-head span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-quick-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.data-quick-head strong {
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.data-result-balls {
  min-height: 30px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
}

.data-result-balls .ball {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.data-result-note {
  display: none;
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  word-break: keep-all;
}

.fortune-result {
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-ink) 96%, transparent), color-mix(in srgb, var(--brand-deep) 52%, var(--surface-ink))),
    var(--surface-ink);
  color: #fff;
}

.hero-fortune-tool .fortune-result {
  max-height: none;
  padding: 20px;
  overflow: auto;
}

.fortune-result .ticket-head {
  color: rgba(255, 255, 255, 0.78);
}

.fortune-result .ticket-head strong {
  color: var(--gold);
}

.fortune-balls {
  min-height: 58px;
  margin: 16px 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.hero-fortune-tool .fortune-balls {
  min-height: 48px;
  margin: 13px 0 12px;
}

.fortune-balls .ball {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.fortune-narrative {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  text-wrap: pretty;
  word-break: keep-all;
}

.fortune-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  margin-top: 14px;
}

.fortune-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
  font-weight: 850;
}

.fortune-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
  padding: 0;
}

.hero-fortune-tool .fortune-reasons {
  grid-template-columns: minmax(0, 1fr);
}

.fortune-reason-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.fortune-reason-card div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fortune-reason-card span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.fortune-reason-card strong {
  min-width: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  word-break: keep-all;
  text-wrap: balance;
}

.fortune-reason-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.64;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.fortune-reason-card small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
  word-break: keep-all;
}

.fortune-number-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.hero-fortune-tool .fortune-number-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fortune-number-map li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.fortune-number-map .ball {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.fortune-number-map p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.fortune-copy-button {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.fortune-copy-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.fortune-disclaimer {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.5;
  word-break: keep-all;
}

.section-shell {
  padding: 54px 0;
}

.section-copy {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.14;
  letter-spacing: 0;
}

.section-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.draw-list {
  display: grid;
  gap: 10px;
}

.draw-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.draw-row.is-latest {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold-soft) 46%, transparent), transparent 56%),
    var(--surface);
}

.draw-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.draw-no {
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.draw-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.draw-flag {
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.draw-balls {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  list-style: none;
}

.draw-plus {
  color: var(--subtle);
  font-size: 18px;
  font-weight: 900;
}

.draw-bonus {
  opacity: 0.74;
}

.draw-prize {
  text-align: right;
}

.draw-prize span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.draw-prize strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
}

.method-section,
.guide-section {
  border-top: 1px solid var(--line);
}

.method-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.method-grid article,
.data-panel,
.guide-panel,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.method-grid article {
  padding: 22px;
}

.method-grid article:nth-child(2),
.method-grid article:nth-child(3) {
  transform: translateY(18px);
}

.method-grid h3,
.data-panel h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.method-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.data-panel {
  padding: 22px;
}

.data-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.data-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: color-mix(in srgb, var(--gold) 70%, #4a2a00);
  font-size: 12px;
  font-weight: 950;
}

.freq-list {
  display: grid;
  gap: 10px;
}

.freq-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
}

.freq-ball {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.freq-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-strong);
}

.freq-fill {
  display: block;
  width: calc(var(--ratio) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--mint));
}

.data-panel-hot .freq-fill {
  background: linear-gradient(90deg, var(--gold), var(--brand));
}

.freq-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.guide-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.guide-panel div {
  padding: 22px;
  background: var(--surface);
}

.guide-panel strong {
  display: block;
  font-size: 18px;
  line-height: 1.28;
}

.guide-panel p {
  margin: 10px 0 0;
  color: var(--muted);
}

.guide-panel a,
.page-band a {
  color: var(--brand);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 0;
}

.faq-list summary {
  cursor: pointer;
  padding: 18px 20px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 26px auto 0;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}

.footer-name {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
}

.footer-brand p:last-child,
.footer-note,
.footer-copy {
  color: var(--muted);
}

.footer-brand p:last-child {
  max-width: 450px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.footer-note {
  margin: 24px 0 0;
  font-size: 13px;
}

.footer-copy {
  margin: 12px 0 0;
  font-size: 13px;
}

.page-band {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.page-band h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.page-band h2 {
  margin: 42px 0 12px;
  font-size: 27px;
  line-height: 1.25;
}

.page-band h3 {
  margin: 28px 0 10px;
  font-size: 21px;
}

.page-band p,
.page-band li {
  color: var(--muted);
  font-size: 17px;
}

.page-updated {
  margin: 10px 0 30px;
  color: var(--subtle);
  font-size: 14px;
  font-weight: 750;
}

.page-band ul {
  padding-left: 22px;
}

.page-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-table th,
.page-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.page-table th {
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 900;
}

.page-back {
  width: fit-content;
  margin-top: 28px;
  text-decoration: none !important;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-mixing {
  animation: mix 700ms ease-in-out infinite alternate;
}

.is-rising {
  animation: rise 420ms cubic-bezier(0.2, 0.9, 0.22, 1.1);
}

.primary-button.is-loading {
  opacity: 0.82;
}

@keyframes mix {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-6px) rotate(12deg); }
}

@keyframes rise {
  0% { transform: translateY(18px) scale(0.72); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes living-word {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }

  42% {
    transform: translateY(-4px) scale(1.025);
    filter: saturate(1.18);
  }

  68% {
    transform: translateY(1px) scale(0.998);
    filter: saturate(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .kinetic-word {
    transform: none;
    filter: none;
  }
}

@media (max-width: 1080px) {
  .hero-shell,
  .hero-fortune .hero-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-fortune-tool {
    grid-column: auto;
  }

  .generator-panel {
    position: static;
  }

  .latest-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .nav-links {
    justify-content: flex-start;
    flex: 1 1 auto;
  }

  .hero,
  .section-shell {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero-shell,
  .section-shell,
  .latest-card,
  .site-footer,
  .page-band {
    width: min(var(--max), calc(100% - 28px));
  }

  .trust-panel,
  .fortune-layout,
  .fortune-tool,
  .hero-fortune-tool,
  .fortune-form,
  .fortune-mini-grid-wide,
  .method-grid,
  .data-grid,
  .guide-panel {
    grid-template-columns: 1fr;
  }

  .method-grid article:nth-child(2),
  .method-grid article:nth-child(3) {
    transform: none;
  }

  .fortune-copy {
    position: static;
  }

  .hero-fortune-tool {
    order: -1;
  }

  .draw-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .draw-prize {
    text-align: left;
  }

  .footer-main {
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-story h1 {
    font-size: clamp(34px, 9.4vw, 38px);
    line-height: 1.1;
    max-width: 100%;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-fortune-tool .fortune-form {
    gap: 10px;
    padding: 14px;
  }

  .hero-fortune-tool .field-block textarea {
    min-height: 86px;
  }

  .hero-fortune-tool .field-help {
    font-size: 12px;
    line-height: 1.42;
  }

  .fortune-presets {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .fortune-presets::-webkit-scrollbar {
    display: none;
  }

  .fortune-presets button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }

  .quick-action-stack {
    gap: 8px;
  }

  .quick-action-stack .primary-button,
  .quick-action-stack .secondary-button {
    min-height: 44px;
  }

  .quick-clear-button {
    min-height: 36px;
  }

  .data-quick-result {
    gap: 8px;
    padding: 12px;
  }

  .data-result-note {
    min-height: 0;
  }

  .studio-visual figcaption {
    position: static;
    border-radius: 0;
  }

  .panel-topline,
  .selector-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .fortune-fields,
  .hero-fortune-tool .fortune-fields,
  .fortune-actions,
  .hero-fortune-tool .fortune-actions,
  .quick-recommend-row,
  .quick-action-stack,
  .fortune-reasons,
  .fortune-number-map,
  .hero-fortune-tool .fortune-number-map {
    grid-template-columns: 1fr;
  }

  .fortune-form > .field-block {
    grid-row: auto;
  }

  .result-ticket,
  .button-row,
  .selector-header,
  .insight-grid,
  .number-grid,
  .panel-topline {
    margin-left: 0;
    margin-right: 0;
  }

  .panel-topline,
  .selector-header,
  .button-row,
  .insight-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .result-ticket {
    margin-left: 16px;
    margin-right: 16px;
    padding: 15px;
  }

  .number-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .insight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ball {
    width: 43px;
    height: 43px;
    font-size: 16px;
  }

  .latest-ball,
  .draw-ball {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .latest-card {
    padding: 16px;
  }

  .draw-row,
  .method-grid article,
  .data-panel,
  .fortune-form,
  .fortune-result,
  .guide-panel div {
    padding: 16px;
  }

  .page-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* 2026 editorial workspace redesign */
body {
  background: var(--bg);
  font-weight: 400;
}

body::before {
  opacity: 0.42;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 3.5%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 38rem);
}

button:disabled {
  cursor: not-allowed;
}

.brand {
  min-height: 0;
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-name {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.brand-name span {
  margin-right: 5px;
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: -0.045em;
}

.brand-subtitle {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
}

.brand:hover,
.brand:focus-visible {
  color: inherit;
  outline: none;
}

.brand:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.nav {
  min-height: 68px;
}

.nav-links {
  flex-wrap: nowrap;
}

.nav-links a {
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-more {
  display: none;
}

.theme-toggle {
  width: 88px;
  height: 32px;
  border-radius: 8px;
  box-shadow: none;
}

.theme-toggle::before {
  top: 3px;
  left: 3px;
  width: 39px;
  height: 24px;
  border-radius: 5px;
  background: var(--ink);
  box-shadow: none;
}

:root[data-theme="dark"] .theme-toggle::before {
  transform: translateX(41px);
  background: var(--gold);
  box-shadow: none;
}

.theme-toggle span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.theme-toggle span:first-child,
:root[data-theme="dark"] .theme-toggle span:last-child {
  color: #fff;
}

:root[data-theme="dark"] .theme-toggle span:first-child {
  color: var(--subtle);
}

:root[data-theme="dark"] .theme-toggle span:last-child {
  color: #14171c;
}

.hero {
  padding: 30px 0 22px;
}

.hero-fortune .hero-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}

.hero-panel {
  position: relative;
  min-width: 0;
  height: 100%;
  border-radius: 14px;
}

.fortune-entry-panel,
.quick-picks-panel {
  padding: 28px;
  border: 1px solid var(--line-strong);
}

.fortune-entry-panel {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--surface) 76%, #f0eadc);
}

.quick-picks-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--ink) 9%, transparent);
}

.panel-index {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
}

.panel-index span {
  color: var(--ink);
  font-size: 11px;
}

.panel-index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.panel-index-dark {
  color: rgba(255, 255, 255, 0.48);
}

.panel-index-dark span {
  color: var(--gold);
}

.panel-index-dark::after {
  background: rgba(255, 255, 255, 0.14);
}

.fortune-entry-panel .eyebrow,
.quick-picks-panel .eyebrow,
.retailer-copy .eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fortune-entry-panel .hero-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(31px, 2.6vw, 39px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.fortune-entry-panel .hero-title em {
  color: var(--brand-deep);
  font-style: normal;
}

.fortune-entry-panel .hero-description,
.quick-picks-description {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

.fortune-entry-panel .fortune-form {
  height: auto;
  margin-top: 24px;
  padding: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fortune-entry-panel .fortune-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fortune-entry-panel .field-block {
  gap: 7px;
}

.fortune-entry-panel .field-block label {
  font-size: 13px;
  font-weight: 700;
}

.fortune-entry-panel .field-block label span {
  margin-left: 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
}

.fortune-entry-panel .field-block input,
.fortune-entry-panel .field-block textarea {
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  font-size: 14px;
}

.fortune-entry-panel .field-block input {
  min-height: 48px;
}

.fortune-entry-panel .dream-field textarea {
  min-height: 124px;
  resize: vertical;
}

.fortune-entry-panel .field-help {
  font-size: 11px;
  line-height: 1.5;
}

.fortune-entry-panel .fortune-presets {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
}

.fortune-entry-panel .fortune-presets button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
}

.fortune-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.fortune-form-actions .primary-button {
  min-height: 50px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
}

.text-button {
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  transition: color 180ms ease, border-color 180ms ease;
}

.text-button:hover,
.text-button:focus-visible {
  border-bottom-color: currentColor;
  color: var(--ink);
  outline: none;
}

.local-processing-note {
  margin: 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.55;
}

.local-processing-note span {
  margin-right: 4px;
  color: var(--mint);
  font-size: 8px;
}

.quick-picks-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 2.5vw, 38px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.055em;
}

.quick-pick-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--surface-ink);
  border-radius: 9px;
  background: var(--surface-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.quick-pick-primary span:last-child {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
}

.quick-pick-primary:hover,
.quick-pick-primary:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: var(--brand);
  outline: none;
}

.quick-pick-primary:active {
  transform: translateY(1px) scale(0.995);
}

.quick-pick-primary:disabled {
  transform: none;
  border-color: var(--line-strong);
  background: var(--bg-strong);
  color: var(--muted);
}

.quick-pick-primary:disabled span:last-child {
  color: var(--mint);
}

.quick-pick-ledger-head {
  margin-top: 24px;
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-strong);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.quick-pick-ledger-head strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.quick-pick-list {
  min-height: 172px;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  list-style: none;
}

.quick-pick-empty {
  min-height: 172px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.quick-pick-empty .empty-line {
  width: 34px;
  height: 1px;
  margin-bottom: 15px;
  background: var(--gold);
}

.quick-pick-empty strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.quick-pick-empty p {
  max-width: 230px;
  margin: 7px 0 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.55;
}

.quick-pick-item {
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--line);
}

.quick-pick-item-head,
.quick-pick-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-pick-item-head strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.quick-pick-item-head span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.quick-pick-balls {
  margin: 10px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
}

.quick-pick-balls .ball {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
}

.quick-pick-item-actions {
  justify-content: flex-start;
}

.quick-pick-item-actions button,
.quick-pick-share-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.quick-pick-item-actions button:hover,
.quick-pick-item-actions button:focus-visible,
.quick-pick-share-actions button:hover,
.quick-pick-share-actions button:focus-visible {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

.quick-pick-item-actions button:last-child {
  margin-left: auto;
  border-color: transparent;
  color: var(--subtle);
}

.quick-pick-share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.quick-pick-share-actions button {
  min-height: 42px;
  padding: 0 8px;
  font-size: 11px;
}

.quick-pick-share-actions .text-button {
  grid-column: 1 / -1;
  min-height: 32px;
  border: 0;
}

.quick-pick-share-actions button:disabled {
  opacity: 0.42;
}

.quick-pick-status {
  min-height: 34px;
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.55;
  text-wrap: pretty;
}

.fortune-result.hero-panel {
  min-height: 100%;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--surface-ink) 76%, #000);
  border-radius: 14px;
  background-color: var(--surface-ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: none;
}

.fortune-result.hero-panel .ticket-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.fortune-result.hero-panel .fortune-balls {
  margin-top: 22px;
}

.fortune-result.hero-panel .fortune-copy-button {
  min-height: 46px;
  border-radius: 8px;
}

.fortune-result.hero-panel .fortune-reasons,
.fortune-result.hero-panel .fortune-number-map {
  grid-template-columns: minmax(0, 1fr);
}

.retailer-section {
  padding-top: 34px;
}

.retailer-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.28fr) minmax(190px, 0.62fr);
  align-items: stretch;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.retailer-copy {
  padding: 12px 16px 12px 0;
}

.retailer-copy .panel-index {
  margin-bottom: 26px;
}

.retailer-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.retailer-copy > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-wrap: pretty;
}

.retailer-locator {
  min-width: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.location-radar {
  position: relative;
  width: 74px;
  height: 74px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, var(--line) 49% 51%, transparent 51%),
    linear-gradient(transparent 49%, var(--line) 49% 51%, transparent 51%);
}

.location-radar::before,
.location-radar::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.location-radar::after {
  inset: 28px;
  border-color: var(--gold);
  background: var(--gold);
}

.location-radar span {
  position: absolute;
  inset: 6px 50% 50% 6px;
  transform-origin: 100% 100%;
  border-radius: 100% 0 0 0;
  background: color-mix(in srgb, var(--gold) 30%, transparent);
  opacity: 0;
}

.retailer-locator.is-locating .location-radar span {
  opacity: 1;
  animation: location-scan 1.4s linear infinite;
}

.retailer-locator.is-ready .location-radar::after {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--mint) 15%, transparent);
}

.location-label {
  margin: 0 0 6px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.location-content h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.location-content > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-wrap: pretty;
}

.location-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.location-button,
.location-map-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
}

.location-map-link[hidden] {
  display: none;
}

.location-button {
  border: 1px solid var(--surface-ink);
  background: var(--surface-ink);
  color: #fff;
}

.location-button:hover,
.location-button:focus-visible {
  border-color: var(--brand);
  background: var(--brand);
  outline: none;
}

.location-map-link {
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}

.location-map-link:hover,
.location-map-link:focus-visible {
  color: var(--brand-deep);
  outline: 3px solid color-mix(in srgb, var(--gold) 24%, transparent);
}

.retailer-privacy {
  padding: 18px;
  border-left: 1px solid var(--line-strong);
}

.retailer-privacy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.retailer-privacy p {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.retailer-privacy a {
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@keyframes location-scan {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .hero-fortune .hero-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fortune-result.hero-panel {
    grid-column: 1 / -1;
  }

  .retailer-layout {
    grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.28fr);
  }

  .retailer-privacy {
    grid-column: 1 / -1;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 820px) {
  .nav {
    min-height: 58px;
    padding: 9px 0;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .nav-actions {
    width: auto;
    flex: 1;
    min-width: 0;
    align-items: center;
    overflow: visible;
  }

  .nav-links-main {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
  }

  .nav-links-main a:nth-child(n + 3) {
    display: none;
  }

  .nav-more {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }

  .nav-more summary {
    min-height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    list-style: none;
    white-space: nowrap;
  }

  .nav-more summary::-webkit-details-marker {
    display: none;
  }

  .nav-more summary::after {
    content: "+";
    margin-left: 6px;
    color: var(--gold);
    font-family: var(--font-mono);
  }

  .nav-more[open] summary,
  .nav-more summary:hover,
  .nav-more summary:focus-visible {
    border-color: var(--ink);
    color: var(--ink);
    outline: none;
  }

  .nav-more[open] summary::after {
    content: "−";
  }

  .nav-more nav {
    position: absolute;
    z-index: 30;
    top: calc(100% + 9px);
    right: 0;
    min-width: 164px;
    padding: 7px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .nav-more nav a {
    min-height: 40px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
  }

  .nav-more nav a:hover,
  .nav-more nav a:focus-visible {
    background: var(--surface-soft);
    color: var(--ink);
    outline: none;
  }

  .hero-fortune .hero-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fortune-result.hero-panel {
    grid-column: 1 / -1;
  }

  .retailer-layout {
    grid-template-columns: 1fr;
  }

  .retailer-copy {
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .hero-fortune .hero-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .fortune-result.hero-panel {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .nav {
    width: calc(100% - 24px);
    gap: 9px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-links-main {
    flex: 0 1 auto;
  }

  .nav-links-main a:first-child {
    display: none;
  }

  .nav-links:not(.nav-links-main) a:nth-child(n + 3) {
    display: none;
  }

  .nav-links a {
    padding: 8px 9px;
    font-size: 12px;
  }

  .theme-toggle {
    width: 76px;
  }

  .theme-toggle::before {
    width: 34px;
  }

  :root[data-theme="dark"] .theme-toggle::before {
    transform: translateX(36px);
  }

  .theme-toggle span {
    font-size: 9px;
  }

  .hero {
    padding-top: 18px;
  }

  .fortune-entry-panel,
  .quick-picks-panel,
  .fortune-result.hero-panel {
    padding: 20px;
    border-radius: 11px;
  }

  .panel-index {
    margin-bottom: 22px;
  }

  .fortune-entry-panel .hero-title,
  .quick-picks-panel h2 {
    font-size: clamp(29px, 9vw, 36px);
  }

  .fortune-entry-panel .fortune-fields,
  .fortune-form-actions,
  .location-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .fortune-form-actions .text-button {
    min-height: 32px;
  }

  .quick-pick-item-actions button {
    min-height: 44px;
  }

  .quick-pick-balls .ball {
    width: 31px;
    height: 31px;
    font-size: 11px;
  }

  .retailer-locator {
    padding: 18px;
    grid-template-columns: minmax(0, 1fr);
  }

  .location-radar {
    width: 64px;
    height: 64px;
  }
}
