:root {
  color-scheme: light;
  --ink: #291c25;
  --muted: #675561;
  --wine: #681e43;
  --deep: #3d132b;
  --paper: #fffaf7;
  --white: #fff;
  --line: #ead9e1;
  --rose: #f6e9ef;
  --gold: #90643a;
  --green: #315c49;
  --tint-green: #ecf4ef;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.52; }
button, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--wine); text-underline-offset: 0.19em; }
a, button, select { -webkit-tap-highlight-color: #efdfeb; }
:focus-visible { outline: 3px solid #a84372; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; line-height: 1.04; }
h2 { font-size: clamp(1.85rem, 3vw, 2.55rem); }
.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: 10px; left: 12px; padding: 8px 14px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.topbar { background: #fffdfb; border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--deep); font-family: var(--serif); font-size: 1.55rem; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 39px; place-items: center; border: 1px solid #bc829c; border-radius: 48% 48% 23% 23% / 45% 45% 20% 20%; background: #f9eff4; font-size: 1.2rem; }
.topbar nav { display: flex; gap: clamp(14px, 4vw, 36px); }
.topbar nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 650; }
.topbar nav a:hover { color: var(--wine); text-decoration: underline; }
.topbar-context { color: var(--muted); font-size: .875rem; }

.hero { margin-top: 24px; display: flex; min-height: clamp(285px, 31vw, 420px); align-items: center; overflow: hidden; border-radius: 24px; position: relative; isolation: isolate; background: #4e142e url('/assets/furqan.webp') right center / cover no-repeat; color: #fff7f4; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#361020 0%,#4e1129b8 37%,#52142c00 73%); }
.hero-copy { padding: 30px clamp(25px, 5vw, 74px); max-width: 680px; }
.hero h1 { margin: 11px 0 14px; font-size: clamp(3rem, 7.1vw, 6rem); }
.hero-copy > p:not(.eyebrow) { color: #fae4ed; max-width: 31ch; font-size: clamp(.95rem, 1.55vw, 1.17rem); }
.eyebrow { font-size: .79rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 700; color: var(--wine); }
.hero .eyebrow { color: #f4c8da; }
.hero-link { display: inline-flex; align-items: center; margin-top: 21px; min-height: 43px; padding: 8px 17px; border: 1px solid #ffd9e685; border-radius: 10px; background: #fff5f5; color: var(--deep); text-decoration: none; font-weight: 700; font-size: .875rem; }
.hero-link:hover { background: #ffdeec; }

.overview { margin-top: 33px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.meta, .section-head p, .metric span { color: var(--muted); font-size: .875rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metric { min-width: 0; min-height: 117px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffdfc; }
.metric dt { color: var(--muted); font-size: .875rem; font-weight: 650; }
.metric dd { margin: 5px 0; color: var(--deep); font-weight: 740; font-size: clamp(1.3rem, 2.7vw, 2rem); letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-primary { border-color: var(--deep); background: var(--deep); color: #f8e8ef; }
.metric-primary dt, .metric-primary span { color: #f0d4e3; }
.metric-primary dd { color: white; }
.live-status { min-height: 1.3rem; color: var(--green); margin-top: 5px; font-size: .85rem; }

.prize-section { margin-top: 27px; scroll-margin-top: 16px; }
.prize-title { align-items: center; }
.prize-title p { margin-top: 7px; }
.prize-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.button { min-height: 44px; border: 1px solid transparent; padding: 9px 14px; border-radius: 9px; font-size: .875rem; font-weight: 680; line-height: 1.25; background: var(--wine); color: white; }
.button:hover { background: var(--deep); }
.button:disabled { cursor: default; opacity: .55; }
.secondary { background: #fffdfc; color: var(--wine); border-color: #dec5d3; }
.secondary:hover { background: var(--rose); }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 215px),1fr)); gap: 10px; }
.scenario { text-align: left; min-height: 83px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
.scenario strong, .scenario span { display: block; }
.scenario strong { font-size: .96rem; }
.scenario span { color: var(--muted); margin-top: 3px; font-size: .865rem; }
.scenario:hover { border-color: #b97b9b; }
.scenario[aria-pressed='true'] { box-shadow: inset 0 0 0 1px #a85882; border-color: #a85882; background: #f7ecf2; color: var(--deep); }
.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0 18px; }
.toolbar label { display: grid; gap: 4px; color: var(--muted); font-size: .875rem; font-weight: 650; }
select { cursor: pointer; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 8px 35px 8px 11px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,var(--wine) 50%),linear-gradient(135deg,var(--wine) 50%,transparent 50%); background-position: calc(100% - 15px) 52%,calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.text-button { border: 0; background: transparent; color: var(--wine); min-height: 44px; text-decoration: underline; text-underline-offset: .25em; padding: 6px; }

.group { overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); background: white; border-radius: 15px; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fcf5f8; }
.group-head h3 { color: var(--deep); font-size: clamp(1.05rem, 2.1vw, 1.32rem); font-weight: 670; letter-spacing: -.015em; }
.audience { color: var(--wine); font-size: .84rem; font-weight: 670; }
.group table { width: 100%; border-collapse: collapse; }
.group thead { color: var(--muted); }
.group th, .group td { text-align: left; padding: 12px 12px; }
.group thead th { font-size: .83rem; padding-block: 8px; font-weight: 630; white-space: nowrap; }
.group tr:not(:last-child), .group thead { border-bottom: 1px solid #f0e5ec; }
.place { width: 72px; font-weight: 700; font-size: .875rem; white-space: nowrap; }
.place-mark { display: inline-grid; width: 34px; height: 34px; place-items: center; margin-left: 3px; border-radius: 50%; color: var(--wine); background: var(--rose); font-family: var(--serif); font-size: .95rem; }
.place-1 .place-mark { color: #67431c; background: #f5e7d7; }
.prize { display: flex; align-items: center; min-width: 0; gap: 11px; }
.thumb { flex: none; width: 64px; height: 64px; padding: 2px; display: grid; place-items: center; overflow: hidden; border: 1px solid #f3e9ee; border-radius: 11px; background: white; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thumb-honor { background: #f5e7d7; color: #78502b; border: 1px solid #ebd9c3; font-family: var(--serif); font-size: 1.35rem; }
.prize-title-text { display: block; font-weight: 690; line-height: 1.27; }
.prize-note { display: block; font-size: .84rem; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.price-cell { width: 133px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-cell strong { display: block; line-height: 1.25; }
.price-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.price-cell .over { color: #a02844; }
.delivery-cell { width: 146px; font-size: .875rem; }
.delivery-cell time { white-space: nowrap; }
.delivery-warn { color: #8b442b; }
.action { width: 119px; }
.action a { font-size: .875rem; white-space: nowrap; }
.action .button { white-space: nowrap; }
.pending { border: 1px dashed #dabdcd; border-radius: 14px; padding: 18px; background: white; color: var(--muted); }

.guide { margin-top: 34px; scroll-margin-top: 16px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.guide article { border-top: 2px solid #cca8bc; padding: 13px 16px 16px; background: #fffdfc; }
.guide h3 { margin-bottom: 5px; font-size: 1rem; color: var(--deep); }
.guide p { color: var(--muted); font-size: .9rem; }
.provenance { margin-block: 14px 0; }
.footer { display: flex; gap: 14px; justify-content: space-between; margin-top: 33px; padding-block: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

dialog { width: min(680px, calc(100% - 26px)); max-height: min(89dvh, 800px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--paper); box-shadow: 0 20px 80px #2a0e2966; }
dialog::backdrop { background: #24121fa1; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 1; padding: 15px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-top: 5px; }
.close { width: 44px; padding: 4px; font-size: 1.5rem; }
.option-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 13px; }
.option { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: white; padding: 12px; }
.option.is-current { border-color: #a85882; }
.option-heading { display: flex; gap: 11px; align-items: start; justify-content: space-between; }
.option-heading .prize { align-items: start; }
.option-heading h3 { font-size: 1rem; }
.option-total { font-weight: 740; color: var(--deep); white-space: nowrap; }
.option-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--muted); margin: 8px 0; font-size: .875rem; }
.products { padding: 0; list-style: none; margin: 8px 0 11px; border-top: 1px solid var(--line); }
.products li { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0e5ec; font-size: .88rem; }
.products .thumb { width: 40px; height: 42px; border-radius: 6px; }
.products li a { overflow-wrap: anywhere; }
.products li small { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: .8rem; }
.products .item-cost { text-align: right; white-space: nowrap; }
.option .button { min-width: 126px; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .hero { margin-top: 15px; }
  .group td, .group th { padding-inline: 8px; }
  .place { width: 51px; }
  .delivery-cell { width: 116px; }
  .price-cell { width: 113px; }
  .action { width: 97px; }
  .action .button { padding-inline: 9px; }
}

@media (max-width: 670px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { min-height: 56px; }
  .topbar-context { display: none; }
  .hero { min-height: 274px; border-radius: 17px; background-position: 59% center; }
  .hero::before { background: linear-gradient(90deg,#371023f5 0%,#431027e4 34%,#59193391 69%,#52142c15 100%); }
  .hero-copy { padding: 24px 18px; }
  .hero h1 { font-size: clamp(2.35rem, 10.4vw, 3.6rem); max-width: 10ch; }
  .hero-copy > p:not(.eyebrow) { max-width: 23ch; }
  .overview { margin-top: 24px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric { min-height: 96px; padding: 11px 12px; }
  .metric span { font-size: .82rem; }
  .prize-section { margin-top: 14px; }
  .prize-title { align-items: start; flex-wrap: wrap; }
  .prize-title .button { min-height: 40px; }
  .scenario-grid { grid-template-columns: 1fr; gap: 7px; }
  .scenario { min-height: 54px; padding: 8px 11px; }
  .scenario span { line-height: 1.3; }
  .toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .toolbar select { width: 100%; }
  .toolbar .text-button { justify-self: start; }
  .group-head { padding: 11px 12px; align-items: start; }
  .audience { text-align: right; line-height: 1.3; }
  .group table, .group tbody { display: block; }
  .group thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .group tr { display: grid; grid-template-columns: 33px minmax(0,1fr) auto; gap: 7px 9px; align-items: center; padding: 10px 12px; }
  .group td, .group th { padding: 0; width: auto; }
  .group tbody th { grid-area: 1 / 1; align-self: start; }
  .group .prize-cell { grid-area: 1 / 2 / 2 / 4; min-width: 0; }
  .group .price-cell { grid-area: 2 / 2; }
  .group .delivery-cell { grid-area: 3 / 2 / 4 / 4; }
  .group .delivery-cell:empty { display: none; }
  .group .action { grid-area: 2 / 3; }
  .place-mark { margin: 0; width: 31px; height: 31px; }
  .prize-title-text { font-size: .96rem; }
  .prize .thumb { width: 54px; height: 52px; }
  .guide-grid { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 360px) {
  .topbar nav { gap: 10px; }
  .topbar nav a { font-size: .8rem; }
  .group .thumb { width: 43px; height: 47px; }
  .group tr { column-gap: 6px; padding-inline: 9px; }
  .dialog-head h2 { font-size: 1.57rem; }
  .option-heading { flex-wrap: wrap; }
  .option-heading h3, .option-heading .prize-note { overflow-wrap: anywhere; }
  .products li { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
