/* Reddy Anna design 1: fold (paper fold). Flat colours only. */
:root {
  --maroon: #6A0129; --deep: #4A001C; --ink: #2B0A16; --muted: #6B5D58; --line: #E2D6D1; --ivory: #FBF7F2;
  --gold: #C9A94F; --fold: #E7D6B2; --foldsh: #D3BF93;
  --soft: #FBF7F2; --head: #FFFFFF; --accent: #6A0129; --accent-ink: #2B0A16; --red: #B3261E; --today: #F6EAC4;
  --amber-dk: #C9A94F; --on-amber: #2B0A16;
  --fb: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; --fm: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; --fw: "Outfit", system-ui, sans-serif;
  --cut: 44px;
}
html { background: var(--ivory); }
body { font-family: var(--fb); color: var(--ink); background: var(--ivory); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: var(--maroon); }
.wordmark { font-family: var(--fw); font-weight: 800; letter-spacing: -.01em; }

/* ---------- header with paper facets ---------- */
.hd { position: relative; background: var(--maroon); color: #fff; overflow: hidden; padding-bottom: calc(var(--cut) + 16px); isolation: isolate; }
.facets { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hd-in { width: min(1100px, 100% - 32px); margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 14px; font: 500 .8rem var(--fm); color: #F1DDE4; }
.tag { background: #fff; color: var(--ink); border: 3px solid var(--gold); border-radius: 18px; padding: 14px; display: grid; gap: 14px; box-shadow: 6px 6px 0 var(--deep); }
.tag-id { display: flex; align-items: center; gap: 12px; }
.tag-id img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.tag h1 { font-size: 1.7rem; line-height: 1; color: var(--maroon); }
.tag-sub { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.hero { border-top: 2px dashed var(--line); padding-top: 12px; }
.hero-k { font-size: .85rem; color: var(--muted); }
.hero-k b { color: var(--ink); font-weight: 700; }
.hero-r { font: 800 clamp(1.7rem, 9vw, 2.6rem)/1.15 var(--fm); color: var(--maroon); letter-spacing: -.02em; margin: 2px 0 4px; white-space: nowrap; }
.hero-l { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-l a, .c-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: .92rem; text-decoration: none; background: var(--ivory); border: 1px solid var(--line); color: var(--maroon); }
.hero-l a:hover, .c-links a:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.slogan { margin: 18px 2px 14px; font-size: 1.05rem; font-weight: 500; color: #FBEFF3; max-width: 34em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; font: 700 1rem var(--fb); text-decoration: none; border: 0; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--deep); }
.btn-maroon { background: var(--maroon); color: #fff; box-shadow: 4px 4px 0 var(--foldsh); }
.btn-gold:hover, .btn-maroon:hover { transform: translate(1px, 1px); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; box-shadow: none; background: var(--gold); color: var(--ink); }
.hd .ios-note { margin-top: 12px; }

/* ---------- the white sheet with a folded corner ---------- */
.sheet { position: relative; width: min(1100px, 100%); margin: calc(var(--cut) * -1) auto 0; background: #fff; border-radius: 22px 0 0 0; padding: 22px 16px 28px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
@media (min-width: 1132px) { .sheet { border-radius: 22px 0 22px 22px; margin-bottom: 0; } }
.fold-t, .fold-s { position: absolute; top: 0; right: 0; width: var(--cut); height: var(--cut); pointer-events: none; }
.fold-t { background: var(--fold); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.fold-s { background: var(--foldsh); clip-path: polygon(0 100%, 100% 100%, 100% calc(100% + 0px)); }
.fold-s { display: none; }
.sheet-page { margin-top: -28px; padding-top: 6px; --cut: 36px; }
.hd-slim { padding-bottom: 56px; }
.hd-slim .hd-in { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.brand img { border-radius: 50%; width: 40px; height: 40px; }
.brand .wordmark { font-size: 1.25rem; }

.blk { padding: 18px 0 8px; }
.blk + .blk { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 22px; }
.blk-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-h { font: 800 1.35rem/1.2 var(--fb); color: var(--maroon); letter-spacing: -.01em; }
.sec-h::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--gold); margin-right: 10px; vertical-align: .06em; clip-path: polygon(0 0, 100% 100%, 0 100%); transform: scale(1.4); }
.blk-n { font: 500 .85rem var(--fm); color: var(--muted); }
.blk-n b { color: var(--ink); }

.next { background: var(--ivory); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.next .sec-h { font-size: 1rem; margin-bottom: 8px; }
.next ul { list-style: none; display: grid; gap: 6px; }
.next a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.next a b { font-weight: 600; }
.next a span { font: 700 .88rem var(--fm); color: var(--maroon); }
@media (min-width: 760px) { .next ul { grid-template-columns: repeat(4, 1fr); } }

.filter { display: flex; gap: 8px; margin-bottom: 14px; }
.filter button { min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font: 600 .95rem var(--fb); color: var(--muted); cursor: pointer; }
.filter button.on { background: var(--maroon); border-color: var(--maroon); color: #fff; }

/* ---------- result cards, each with its own tiny folded corner ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px 0 14px 14px; padding: 14px 16px 12px; overflow: hidden; border-left: 5px solid var(--line); }
.card::before, .card::after { content: ""; position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; }
.card::before { background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.card::after { background: var(--fold); clip-path: polygon(0 0, 100% 100%, 0 100%); box-shadow: -2px 2px 0 var(--foldsh); transition: transform .2s; transform-origin: 100% 0; }
.card:hover::after { transform: scale(1.25); }
.card[data-state="closed"] { border-left-color: var(--maroon); }
.card[data-state="open"] { border-left-color: var(--gold); }
.card[hidden] { display: none !important; }
.c-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-right: 20px; }
.card h3 { font: 700 1.1rem/1.25 var(--fb); }
.pill { flex: none; font: 600 .72rem var(--fb); padding: 3px 9px; border-radius: 999px; background: var(--ivory); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
[data-state="closed"] .pill { background: var(--maroon); border-color: var(--maroon); color: #fff; }
[data-state="open"] .pill { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.c-time { font: 500 .82rem var(--fm); color: var(--muted); margin-top: 2px; }
.c-res { font: 800 1.7rem/1.2 var(--fm); letter-spacing: -.02em; color: var(--maroon); margin: 8px 0 8px; white-space: nowrap; }
[data-state="waiting"] .c-res, [data-state="holiday"] .c-res { color: #8a7c76; }
.c-links { display: flex; gap: 8px; flex-wrap: wrap; }
.c-links a { flex: 1 1 auto; justify-content: center; padding: 0 10px; }

/* ---------- starline / jackpot ---------- */
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .slots { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .slots { grid-template-columns: repeat(5, 1fr); } }
.slot { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px 0 12px 12px; padding: 10px 12px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.slot::before, .slot::after { content: ""; position: absolute; top: -1px; right: -1px; width: 14px; height: 14px; }
.slot::before { background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.slot::after { background: var(--fold); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.s-t { font: 500 .78rem var(--fm); color: var(--muted); }
.s-r { font: 800 1.15rem var(--fm); color: #9a8d87; white-space: nowrap; }
.slot.has { border-color: var(--maroon); }
.slot.has .s-r { color: var(--maroon); }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; font-weight: 700; color: var(--maroon); text-decoration: none; border-bottom: 2px solid var(--gold); }

/* ---------- app ---------- */
.app-in { display: grid; gap: 20px; }
@media (min-width: 800px) { .app-in { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--ivory); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.steps .n { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--maroon); color: #fff; display: grid; place-items: center; font: 800 1rem var(--fm); }
.steps p { color: var(--muted); font-size: .95rem; }
.app-side { background: var(--ivory); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.qr { width: 160px; height: 160px; background: #fff; padding: 10px; border: 3px solid var(--gold); border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-c { font-size: .85rem; color: var(--muted); }
@media (max-width: 799px) { .qr, .qr-c { display: none; } .app-side { padding: 14px; } .app-side .btn { width: 100%; } }

.faq { display: grid; gap: 8px; }
.faq details { background: var(--ivory); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; padding: 12px 16px; min-height: 48px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 1.3rem var(--fm); color: var(--maroon); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 16px 14px; color: var(--muted); }

/* ---------- footer ---------- */
.ft { background: var(--deep); color: #EBD7DE; padding: 24px 0 28px; margin-top: 0; }
.ft-in { width: min(1100px, 100% - 32px); margin-inline: auto; display: grid; gap: 12px; }
.ft-n { display: flex; align-items: center; gap: 10px; font: 800 1.1rem var(--fw); color: #fff; }
.ft-n img { border-radius: 50%; }
.ft nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ft nav a { color: #F3E3E9; min-height: 44px; display: inline-flex; align-items: center; }
.ft a:hover { color: var(--gold); }

/* ---------- shared chart pages ---------- */
.chart-page .page { padding: 18px 0 20px; width: 100%; }
.sheet-page .wrap { width: 100%; }
.page h1 { font-family: var(--fb); font-weight: 800; color: var(--maroon); letter-spacing: -.02em; padding-right: 30px; }
.page .crumbs a { color: var(--maroon); }
.today-strip { background: var(--ivory); border-radius: 12px 0 12px 12px; }
.today-strip b { color: var(--maroon); }
.today-strip .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; }
.tabs a[aria-selected="true"] { color: var(--maroon); border-bottom-color: var(--gold); }
.chip { min-height: 44px; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--maroon); color: var(--maroon); }
.page .sec h2 { font-family: var(--fb); font-weight: 800; color: var(--maroon); }
.tbl-wrap { border-radius: 12px 0 12px 12px; }
table.chart thead th { background: var(--ivory); }
table.chart tbody th { background: var(--ivory); }
table.chart td.today { box-shadow: inset 0 0 0 2px var(--gold); }
@media (max-width: 640px) { .sheet { padding-inline: 16px; } .sheet-page { padding-inline: 16px; } }
@media (max-width: 380px) { .hero-r { font-size: 1.6rem; } .c-res { font-size: 1.5rem; } .tag { padding: 12px; } }
