
:root { color-scheme: dark; --burgundy:#800020; --crimson:#E60000; --gold:#FFD700; --ink:#0A0508; --ivory:#f6efe6; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: Outfit, 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Naskh Arabic', sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(128,0,32,.55), transparent 60%),
    #050306;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
::selection { background: #800020; color: #FFD700; }
[hidden] { display: none !important; }
#frame {
  width: min(480px, 100%);
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 260px at 0% -8%, rgba(128,0,32,.62), transparent 58%),
    radial-gradient(360px 220px at 110% 0%, rgba(230,0,0,.2), transparent 46%),
    #0A0508;
  opacity: 0;
}
body.booted #frame { opacity: 1; transition: opacity .4s ease; }
@media (min-width: 520px) {
  #frame { box-shadow: 0 0 0 1px rgba(255,215,0,.16), 0 30px 90px rgba(0,0,0,.55); }
}
#shell {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
}
.mast { padding: 0 16px 6px; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: rgba(10,5,8,.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,215,0,.12);
}
.brand-lock { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crest { width: 34px; height: 34px; flex: none; }
.brand-lock strong { display: block; font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.brand-lock em { display: block; font-style: normal; font-size: 10px; letter-spacing: .08em; color: rgba(255,215,0,.85); }
.top-actions { display: flex; align-items: center; align-self: center; gap: 8px; height: 34px; }
.age-pill, #gift-chip, #lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-width: 44px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255,215,0,.45);
  background: rgba(255,215,0,.08);
  color: var(--gold);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .06em;
  vertical-align: middle;
}
#gift-chip { background: linear-gradient(180deg,#E60000,#800020); color: white; border-color: transparent; animation: pulse 1.8s ease infinite; }
#lang-btn { gap: 6px; padding: 0 12px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.32fr) minmax(0,.86fr);
  gap: 8px;
  align-items: stretch;
  padding-top: 12px;
}
.t1 {
  display: block;
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-weight: 600;
  font-size: clamp(1.78rem, 8.2vw, 2.4rem);
  line-height: .92;
  letter-spacing: -.03em;
}
.t2 {
  display: block;
  margin-top: 6px;
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-weight: 600;
  font-size: clamp(1.16rem, 5.1vw, 1.46rem);
  line-height: 1.12;
  color: var(--gold);
}
.place { margin: 8px 0 0; font-size: 11px; letter-spacing: .04em; color: rgba(246,239,230,.72); }
.edu-card {
  text-align: start;
  border: 1px solid rgba(255,215,0,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(128,0,32,.18));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 10px 10px 8px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,215,0,.25), 0 10px 30px rgba(0,0,0,.28);
}
.edu-card strong { display: block; font-size: .78rem; letter-spacing: .04em; margin-top: 6px; }
.edu-card em { display: block; font-style: normal; font-size: 10px; color: rgba(255,215,0,.8); margin-top: 2px; }
.live { display: flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: .16em; color: #ffb4b4; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--crimson);
  box-shadow: 0 0 0 0 rgba(230,0,0,.7);
  animation: pulse 1.6s infinite;
}
.insight { display: block; margin-top: 6px; font-size: 11px; line-height: 1.35; color: rgba(246,239,230,.92); min-height: 2.7em; }
.edu-track { display: block; height: 2px; margin-top: 8px; background: rgba(255,215,0,.15); border-radius: 2px; overflow: hidden; }
#edu-progress { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#800020,#FFD700); animation: load 6s linear; }
.tap { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .08em; color: var(--gold); }
#coupon-bar {
  margin-top: 10px;
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(230,0,0,.35), rgba(128,0,32,.45));
  border: 1px solid rgba(255,215,0,.4);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .03em;
}
.cat-head, .filters, #list, .colophon { padding-left: 16px; padding-right: 16px; }
.cat-head h2 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: 1.85rem; line-height: 1; margin: 14px 0 6px; font-weight: 600;
}
.cat-head p { margin: 0; color: rgba(246,239,230,.78); font-size: 13px; line-height: 1.45; }
.cat-count { margin-top: 6px !important; color: var(--gold) !important; font-size: 11px !important; letter-spacing: .12em; text-transform: uppercase; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar, .snap-row::-webkit-scrollbar, #legalbar::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border-radius: 999px;
  border: 1px solid rgba(255,215,0,.28);
  background: rgba(255,255,255,.04);
  padding: 7px 12px;
  font-size: 12px;
  color: rgba(246,239,230,.8);
}
.chip.on { background: linear-gradient(180deg,#E60000,#800020); color: white; border-color: transparent; }
.snap-row {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  width: 100%; max-width: 100%; min-width: 0;
  padding: 10px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; touch-action: pan-x;
}
.wine-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0,1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid rgba(255,215,0,.2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,215,0,.18);
  overflow: hidden;
}
.wine-card.featured { flex: 0 0 86%; width: 86%; min-width: 0; scroll-snap-align: start; grid-template-columns: 100px minmax(0,1fr); }
.wine-copy h3, .note, .cuvee, .grapes, .t1, .t2 { overflow-wrap: break-word; }
.wine-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255,215,0,.16) 50%, transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
}
.wine-card:active::after { animation: sheen .7s ease; }
.bottle-photo {
  width: 100px; height: 168px; object-fit: cover; object-position: center;
  display: block; background: #f3efe8;
  border-radius: 14px;
}
.wine-card.no-photo { grid-template-columns: minmax(0,1fr); }
.bottle-col { display: flex; align-items: flex-start; justify-content: center; padding-top: 2px; }
.featured .grapes, .featured .closes, .featured .origin, .featured .seals, .featured .offer { display: none; }
.featured .note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured .wine-copy h3 { font-size: 1.2rem; }
.aoc { margin: 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.wine-copy h3 { margin: 2px 0; font-family: 'Cormorant Garamond', 'Noto Serif SC', serif; font-size: 1.28rem; line-height: 1.05; font-weight: 600; }
.cuvee, .note, .win, .origin, .grapes, .offer, .closes { margin: 3px 0; font-size: 12px; line-height: 1.4; color: rgba(246,239,230,.84); }
.note { color: rgba(246,239,230,.94); }
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.scores div {
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(128,0,32,.35);
  border: 1px solid rgba(255,215,0,.18);
}
.scores em { display: block; font-style: normal; font-size: 9px; letter-spacing: .06em; color: rgba(246,239,230,.7); }
.scores strong { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; color: white; line-height: 1; }
.scores .perfect strong { color: var(--gold); }
.win span, .origin { letter-spacing: .02em; }
.seals { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.seal {
  border: 1px solid rgba(255,215,0,.32);
  color: rgba(255,215,0,.92);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: .02em;
}
.offer { color: #ffd0d0; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price-row strong { display: block; font-size: 1.05rem; color: var(--gold); font-weight: 600; }
.price-row small { color: rgba(246,239,230,.6); font-size: 10px; }
.actions { display: flex; gap: 6px; align-items: center; }
.estate { font-size: 11px; color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(255,215,0,.4); padding-bottom: 1px; }
.reserve-btn, .gold-btn {
  border: 0; border-radius: 999px; min-height: 36px; padding: 0 12px;
  background: linear-gradient(180deg,#ff2a2a,#800020);
  color: white; font-size: 12px; letter-spacing: .04em;
  box-shadow: 0 8px 18px rgba(230,0,0,.28);
}
.gold-btn {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(110deg,#8a6a12 0%,#FFD700 34%,#fff6c2 50%,#FFD700 66%,#8a6a12 100%);
  background-size: 220% 100%;
  animation: sweep 2.8s linear infinite;
  color: #1a0a0c;
  font-weight: 650;
  font-size: 16px;
}
.gold-btn small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .04em; }
.ghost-btn {
  width: 100%; margin-top: 8px; background: transparent; border: 0; color: rgba(246,239,230,.7);
  min-height: 40px; text-decoration: underline; text-underline-offset: 3px;
}
#list { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.empty { padding: 28px 8px; text-align: center; color: rgba(246,239,230,.7); }
.colophon { padding-top: 18px; padding-bottom: 8px; }
.colophon p { margin: 0 0 6px; font-size: 11px; line-height: 1.45; color: rgba(246,239,230,.55); }
#legalbar {
  position: absolute; left: 0; right: 0;
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex; gap: 14px; overflow-x: auto;
  padding: 6px 14px;
  background: rgba(10,5,8,.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,215,0,.14);
  scrollbar-width: none;
}
#legalbar button {
  flex: none; background: none; border: 0; color: rgba(255,215,0,.88);
  font-size: 11px; letter-spacing: .03em; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px;
}
#tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 32;
  display: grid; grid-template-columns: repeat(4,1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(12,6,8,.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,215,0,.16);
}
#tabbar button {
  background: transparent; border: 0; color: rgba(246,239,230,.62);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 48px; border-radius: 14px; font-size: 10px; letter-spacing: .04em;
}
#tabbar button[aria-selected="true"] {
  color: var(--gold);
  background: linear-gradient(180deg, rgba(255,215,0,.14), rgba(128,0,32,.28));
}
#tabbar button .bar { width: 16px; height: 2px; border-radius: 2px; background: transparent; }
#tabbar button[aria-selected="true"] .bar { background: var(--gold); }
#tabbar svg { width: 18px; height: 18px; }
.press { transition: transform .16s cubic-bezier(.22,1,.36,1), filter .16s; }
.press:active { transform: scale(.97); filter: brightness(1.08); }
.overlay {
  position: absolute; inset: 0; z-index: 70;
  display: flex; justify-content: center; align-items: flex-end;
  background: rgba(5,2,4,.64);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.overlay.on { opacity: 1; pointer-events: auto; }
#vip { align-items: center; z-index: 80; padding: 18px; }
#age {
  position: absolute; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(8,3,6,.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
#age.hide { display: none; }
.age-card, .vip-card {
  width: 100%;
  border-radius: 28px;
  padding: 22px 18px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(128,0,32,.22));
  border: 1px solid rgba(255,215,0,.38);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,215,0,.3);
  position: relative;
}
.vip-card { animation: borderGlow 2.8s ease-in-out infinite; overflow: hidden; }
.age-card h2, .vip-card h2, #sheet-body h2 {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: 1.8rem; line-height: 1.05; margin: 8px 0;
}
.vip-hold { margin: 10px 0 0; text-align: center; color: #FFD700; font-size: 13px; letter-spacing: .08em; }
.vip-ask { margin-top: 12px; }
.vip-ask p { margin: 0 0 8px; text-align: center; }
.vip-ask-row { display: flex; gap: 8px; }
.vip-ask-row button { flex: 1; width: auto; margin: 0; }
#vip-claim:disabled { opacity: .45; }
.age-card p, .vip-note { font-size: 13px; line-height: 1.5; color: rgba(246,239,230,.86); }
.vip-copy {
  font-size: 14px; line-height: 1.55; margin: 8px 0 14px;
  padding: 10px 12px; border-radius: 16px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,215,0,.2);
}
.kicker { letter-spacing: .18em; font-size: 10px; color: var(--gold); margin: 0; }
.icon-x {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,215,0,.35);
  background: rgba(10,5,8,.45); color: var(--gold);
  display: grid; place-items: center;
}
#sheet-panel {
  width: 100%; max-height: 88%;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(28,10,16,.96), rgba(10,5,8,.98));
  border: 1px solid rgba(255,215,0,.28);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  transform: translateY(105%);
  transition: transform .42s cubic-bezier(.22,1,.36,1);
  position: relative;
}
#sheet.on #sheet-panel { transform: translateY(0); }
.handle { width: 100%; padding: 10px 0 4px; display: flex; justify-content: center; touch-action: none; }
.handle span { width: 42px; height: 4px; border-radius: 4px; background: rgba(255,215,0,.5); }
#sheet-body { overflow: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px calc(18px + env(safe-area-inset-bottom)); }
#sheet-body p, #sheet-body li { font-size: 14px; line-height: 1.6; color: rgba(246,239,230,.88); }
.chapter { padding: 10px 0; border-top: 1px solid rgba(255,215,0,.14); }
.chapter.now h3 { color: var(--gold); }
.chapter h3 { margin: 0 0 4px; font-size: 16px; }
.fine { font-size: 11px !important; color: rgba(246,239,230,.5) !important; }
label { display: block; font-size: 12px; color: rgba(255,215,0,.85); margin: 10px 0 4px; }
input {
  width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid rgba(255,215,0,.28);
  background: rgba(255,255,255,.04); padding: 0 12px; font-size: 16px; outline: none;
  caret-color: #FFD700;
}
input:focus { border-color: #FFD700; }
.qty { display: flex; gap: 8px; }
.qty button {
  flex: 1; min-height: 40px; border-radius: 12px;
  border: 1px solid rgba(255,215,0,.3); background: transparent; color: var(--ivory);
}
.qty button.on { background: #800020; border-color: #FFD700; color: #FFD700; }
.sum { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0; font-size: 13px; }
.sum b { color: var(--gold); }
#toast {
  position: absolute; left: 16px; right: 16px;
  bottom: calc(112px + env(safe-area-inset-bottom));
  z-index: 85; padding: 12px 14px; border-radius: 14px;
  background: rgba(20,8,12,.94); border: 1px solid rgba(255,215,0,.4);
  color: var(--gold); font-size: 13px;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: .3s ease;
}
#toast.on { opacity: 1; transform: none; }
#lang-menu {
  position: absolute; top: calc(48px + env(safe-area-inset-top));
  inset-inline-end: 12px; width: min(320px, calc(100% - 24px));
  max-height: min(68vh, 520px); overflow: auto;
  z-index: 40; display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: 18px;
  background: rgba(16,8,12,.96);
  border: 1px solid rgba(255,215,0,.3);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
#lang-menu button {
  min-height: 40px; border-radius: 10px; border: 1px solid rgba(255,215,0,.15);
  background: rgba(255,255,255,.03); font-size: 14px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; text-align: start;
}
#lang-menu button.on { border-color: #FFD700; color: #FFD700; }
#lang-find {
  width: 100%; min-height: 40px; border-radius: 10px; margin-bottom: 4px;
}
.spark {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFD700;
  animation: float 3.4s ease-in-out infinite; pointer-events: none;
}
.rise { animation: rise .42s cubic-bezier(.22,1,.36,1); }
.noscript { color: #FFD700; text-align: center; padding: 48px 20px; font-family: Outfit, sans-serif; }
html[dir="rtl"] body { font-family: 'Noto Naskh Arabic', Outfit, sans-serif; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(230,0,0,0); } }
@keyframes load { from { width: 0; } to { width: 100%; } }
@keyframes sheen { to { transform: translateX(130%); } }
@keyframes sweep { to { background-position: -220% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: none;} }
@keyframes float { 50% { transform: translateY(-14px); opacity: .35; } }
@keyframes borderGlow {
  50% { box-shadow: 0 0 0 1px rgba(255,215,0,.85), 0 20px 70px rgba(230,0,0,.38); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
:focus-visible { outline: 2px solid #FFD700; outline-offset: 2px; }
