:root {
  --berry-950: #401226;
  --berry-800: #72223f;
  --berry-650: #a23960;
  --berry-500: #d85b87;
  --berry-350: #ef91af;
  --berry-200: #f8c8d6;
  --berry-100: #fde8ee;
  --cream: #fffaf7;
  --paper: #fffefe;
  --ink: #321d26;
  --muted: #765c67;
  --green: #34745a;
  --gold: #c78327;
  --line: rgba(114, 34, 63, .13);
  --shadow-sm: 0 8px 24px rgba(99, 35, 60, .09);
  --shadow-lg: 0 28px 70px rgba(99, 35, 60, .18);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --box-art-image: none;
  --page-background-image: none;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 10% 0, rgba(255,255,255,.9), transparent 28rem),
    radial-gradient(circle at 90% 16rem, rgba(239,145,175,.17), transparent 26rem),
    var(--page-background-image), var(--cream);
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .33;
  background-image: radial-gradient(rgba(114,34,63,.12) .7px, transparent .7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, #000, transparent 55%);
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--berry-800); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2276d2; outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 1000;
  padding: .7rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: .75rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(114,34,63,.09);
  background: rgba(255,250,247,.88);
  backdrop-filter: blur(18px);
}
.brand, .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  max-width: 16rem;
  color: var(--berry-950);
  font-family: var(--font-display);
  font-size: clamp(.95rem, 2vw, 1.16rem);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand-mark, .auth-brand span {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--berry-650);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.2), var(--shadow-sm);
}
.header-actions { display: flex; align-items: center; gap: .65rem; }
.turn-pill {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 46px;
  padding: .45rem .5rem .45rem .8rem;
  border: 1px solid var(--berry-200);
  border-radius: 999px;
  color: var(--berry-950);
  background: var(--paper);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.turn-pill > span:first-child { color: var(--berry-500); }
.turn-label { color: var(--muted); font-size: .78rem; }
.turn-plus {
  display: grid;
  width: 31px;
  aspect-ratio: 1;
  margin-left: .15rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--berry-650);
  font-size: 1.25rem;
  line-height: 1;
}
.menu-toggle {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  padding: 12px;
  gap: 4px;
  place-content: center;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--berry-650);
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.site-menu {
  position: absolute;
  top: calc(100% + .55rem);
  right: clamp(1rem, 4vw, 3.5rem);
  display: grid;
  width: min(310px, calc(100vw - 2rem));
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.site-menu > a, .menu-user {
  padding: .82rem 1rem;
  border-radius: 13px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.site-menu > a:hover { background: var(--berry-100); }
.menu-user { display: flex; align-items: center; justify-content: space-between; margin-top: .35rem; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); }
.menu-user form { margin: 0; }
.menu-user button { border: 0; color: var(--berry-800); background: transparent; cursor: pointer; font-weight: 700; }

.page-shell { width: min(1180px, calc(100% - 2rem)); min-height: calc(100vh - 72px); margin: 0 auto; padding: clamp(2rem, 5vw, 5rem) 0 5rem; }
.hero { max-width: 750px; margin: 0 auto clamp(2rem, 5vw, 4rem); text-align: center; }
.eyebrow { margin: 0 0 .65rem; color: var(--berry-650); font-size: .73rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1, .page-intro h1, .payment-heading h1, .auth-card h1 {
  margin: 0;
  color: var(--berry-950);
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 8vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .95;
}
.hero h1 em { color: var(--berry-500); font-weight: 400; }
.hero > p:last-child { max-width: 37rem; margin: 1.25rem auto 0; color: var(--muted); }
.notice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  max-width: 820px;
  margin: 0 auto 2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--berry-200);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.7);
}
.notice-card > span { display: grid; width: 40px; aspect-ratio: 1; place-items: center; border-radius: 50%; color: white; background: var(--berry-500); font-size: 1.25rem; }
.notice-card p { margin: .15rem 0 0; color: var(--muted); font-size: .86rem; }
.text-link { font-size: .85rem; font-weight: 800; }

.prize-showcase { margin: 0 auto 2rem; }
.section-heading, .stage-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2, .stage-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 500; letter-spacing: -.035em; }
.section-heading a { font-size: .86rem; font-weight: 750; text-decoration: none; }
.conveyor {
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.64);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}
.conveyor::after { content: ""; display: block; height: 7px; margin: .8rem -.2rem -.45rem; border-radius: 10px; background: repeating-linear-gradient(90deg, var(--berry-200) 0 28px, var(--berry-350) 28px 32px); opacity: .65; }
.conveyor-track { display: flex; width: max-content; }
.conveyor-group { display: flex; flex: 0 0 auto; gap: .8rem; padding-right: .8rem; }
.conveyor-group .mini-prize { flex: 0 0 132px; }
.mini-prize { position: relative; width: 132px; margin: 0; padding: .65rem; border: 1px solid rgba(114,34,63,.08); border-radius: 18px; background: white; }
.mini-prize-art, .item-art, .history-art, .result-art { display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #fff, var(--berry-100)); }
.mini-prize-art { aspect-ratio: 1; border-radius: 14px; color: var(--berry-500); font-size: 2rem; }
.mini-prize-art img, .item-art img, .history-art img, .result-art img { width: 100%; height: 100%; object-fit: cover; }
.mini-prize p { overflow: hidden; margin: .55rem 0 0; color: var(--ink); font-size: .75rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rare-tag { position: absolute; top: .45rem; left: .45rem; padding: .24rem .48rem; border-radius: 999px; color: #fff; background: var(--berry-800); font-size: .62rem; font-weight: 800; letter-spacing: .04em; }
.empty-showcase { display: flex; align-items: center; gap: .8rem; padding: 2rem; color: var(--muted); }
.empty-showcase span { color: var(--berry-500); font-size: 2rem; }

.box-stage { position: relative; overflow: hidden; padding: clamp(1.2rem, 4vw, 3rem); border: 1px solid rgba(114,34,63,.12); border-radius: var(--radius-lg); background: linear-gradient(155deg, rgba(255,255,255,.95), rgba(253,232,238,.72)); box-shadow: var(--shadow-lg); }
.box-stage::before, .box-stage::after { content: "✦"; position: absolute; color: var(--berry-350); opacity: .5; font-size: 4rem; }
.box-stage::before { top: 5.5rem; left: -1rem; transform: rotate(15deg); }
.box-stage::after { right: 1rem; bottom: 1rem; transform: rotate(-12deg); }
.stage-heading, .stage-hint, .box-grid, .stage-footer { position: relative; z-index: 1; }
.stage-hint { margin: -.25rem 0 1.5rem; color: var(--muted); font-size: .9rem; }
.live-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; padding: .43rem .7rem; border-radius: 999px; color: var(--green); background: #e9f5ef; font-size: .72rem; font-weight: 800; }
.live-badge i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(52,116,90,.12); }
.box-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 3vw, 2rem); max-width: 690px; margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem); }
.lucky-box {
  position: relative;
  aspect-ratio: 1;
  padding: 11% 7% 5%;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 10px rgba(114,34,63,.18));
  transition: transform .22s ease, filter .22s ease;
}
.lucky-box:hover { z-index: 2; transform: translateY(-7px) rotate(-1deg); filter: drop-shadow(0 18px 13px rgba(114,34,63,.22)); }
.lucky-box:active { transform: translateY(-2px) scale(.96); }
.lucky-box:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .45; }
.box-lid { position: absolute; top: 9%; left: 2%; z-index: 2; width: 96%; height: 27%; border: 3px solid rgba(80,18,40,.3); border-radius: 8px 8px 5px 5px; background: linear-gradient(145deg, #f8a3bd, var(--berry-500)); box-shadow: inset 0 5px rgba(255,255,255,.28); transform-origin: left bottom; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.box-lid::before, .box-lid::after { content: ""; position: absolute; top: -14%; width: 23%; height: 120%; border: 4px solid var(--berry-800); border-bottom: 0; border-radius: 50% 50% 0 0; }
.box-lid::before { left: 29%; transform: rotate(26deg); }
.box-lid::after { right: 29%; transform: rotate(-26deg); }
.box-body { position: relative; display: grid; width: 100%; height: 82%; margin-top: 12%; place-items: center; border: 3px solid rgba(80,18,40,.3); border-radius: 8px 8px 13px 13px; background: var(--box-art-image), linear-gradient(145deg, #f38cad, var(--berry-650)); box-shadow: inset 0 8px rgba(255,255,255,.18), inset 0 -9px rgba(80,18,40,.1); }
.box-body::before, .box-body::after { content: ""; position: absolute; background: var(--berry-200); opacity: .72; }
.box-body::before { inset: 0 40%; }
.box-body::after { inset: 40% 0; }
.box-body i { position: relative; z-index: 1; display: grid; width: 37%; aspect-ratio: 1; place-items: center; border: 3px solid var(--berry-800); border-radius: 50%; color: var(--berry-800); background: var(--cream); font-style: normal; font-size: clamp(.8rem, 3vw, 1.5rem); }
.box-body b { position: absolute; right: 8%; bottom: 6%; z-index: 1; font-size: .67rem; opacity: .75; }
.lucky-box.is-opening .box-lid { transform: translate(-8%, -42%) rotate(-28deg); }
.lucky-box.is-opening .box-body { animation: box-glow .65s ease-in-out infinite alternate; }
.stage-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--berry-200); color: var(--muted); font-size: .74rem; }
.stage-footer span { color: var(--berry-800); font-weight: 800; }
.stage-footer p { margin: 0; }
@keyframes box-glow { to { box-shadow: 0 0 0 10px rgba(239,145,175,.24), 0 0 36px var(--berry-350); } }

.page-intro { max-width: 690px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.page-intro h1, .payment-heading h1, .auth-card h1 { font-size: clamp(2.3rem, 6vw, 4.8rem); }
.page-intro > p:last-child, .payment-heading > p:last-child { color: var(--muted); }
.catalogue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr)); gap: 1rem; }
.item-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.item-card.is-sold-out { filter: saturate(.2); opacity: .7; }
.item-art { position: relative; aspect-ratio: 4/3; color: var(--berry-500); font-size: 3rem; }
.item-copy { padding: 1.2rem; }
.item-copy h2 { margin: .15rem 0 .5rem; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
.item-copy > p:not(.item-category) { min-height: 3.1em; color: var(--muted); font-size: .82rem; }
.item-category { margin: 0; color: var(--berry-650); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.item-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.item-meta strong { color: var(--berry-800); font-family: var(--font-display); font-size: 1.25rem; }
.item-meta span { color: var(--green); font-size: .72rem; font-weight: 800; }
.is-sold-out .item-meta span { color: var(--muted); }

.history-list { display: grid; gap: .75rem; }
.history-card { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-sm); }
.history-art { width: 72px; aspect-ratio: 1; border-radius: 13px; color: var(--berry-500); font-size: 1.8rem; }
.history-copy time { color: var(--muted); font-size: .68rem; }
.history-copy h2 { margin: .12rem 0; font-family: var(--font-display); font-size: 1.08rem; }
.history-copy p { margin: 0; color: var(--muted); font-size: .75rem; }
.status-badge { display: inline-flex; width: fit-content; padding: .38rem .65rem; border-radius: 999px; color: var(--berry-800); background: var(--berry-100); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.status-paid, .status-completed, .status-shipped { color: var(--green); background: #e9f5ef; }
.status-review, .status-processing { color: #7a4b08; background: #fff2cf; }
.status-cancelled, .status-expired { color: #7d3131; background: #fae4e4; }
.empty-state { grid-column: 1/-1; padding: 4rem 1rem; border: 1px dashed var(--berry-200); border-radius: var(--radius-md); text-align: center; }
.empty-state > span { color: var(--berry-500); font-size: 3rem; }
.empty-state h2 { margin: .4rem 0; font-family: var(--font-display); }
.empty-state p { color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; font-size: .85rem; }

.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 1rem; }
.profile-confirmation { position:relative; display:grid; gap:1rem; margin:0 0 1.5rem; padding:1.25rem; border:1px solid var(--line); border-radius:var(--radius-md); background:rgba(255,255,255,.8); }
.profile-confirmation h2 { margin:0; font-family:var(--font-display); font-weight:500; }
.profile-confirmation dl { display:grid; gap:.6rem; margin:0; }
.profile-confirmation dl div { display:grid; grid-template-columns:7rem 1fr; gap:.75rem; }
.profile-confirmation dt { color:var(--muted); font-size:.75rem; }
.profile-confirmation dd { margin:0; font-size:.82rem; font-weight:700; }
.profile-confirmation > a { font-size:.78rem; font-weight:800; }
.package-card { display: grid; gap: 2rem; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.package-card.is-popular { border-color: var(--berry-500); background: linear-gradient(145deg, #fff, var(--berry-100)); }
.popular-label { position: absolute; top: 0; right: 1.2rem; padding: .38rem .65rem; border-radius: 0 0 9px 9px; color: white; background: var(--berry-650); font-size: .65rem; font-weight: 800; }
.package-kicker { color: var(--berry-650); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.package-offer h2 { margin: 0 0 .5rem; color: var(--berry-950); font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 500; line-height: 1.2; }
.package-unit-price { margin: 0; color: var(--muted); font-size: .875rem; }
.package-unit-price strong { color: var(--berry-800); font-weight: 650; font-variant-numeric: tabular-nums; }
.package-quantity { align-content: start; gap: .75rem; }
.package-quantity label { font-size: .875rem; font-weight: 650; }
.package-quantity small { max-width: 32ch; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.quantity-control { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem; width: min(100%, 15rem); min-height: 3.5rem; border: 1px solid var(--berry-500); border-radius: 12px; background: var(--cream); }
.quantity-control button { display: grid; padding: 0; border: 0; border-radius: 11px; color: var(--berry-800); background: transparent; cursor: pointer; place-items: center; transition: background .16s ease; }
.quantity-control button:hover:not(:disabled) { background: var(--berry-100); }
.quantity-control button:disabled { color: var(--muted); cursor: not-allowed; opacity: .5; }
.quantity-control svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.quantity-control input { width: 100%; min-width: 0; padding: .5rem; border: 0; border-radius: 4px; color: var(--berry-950); background: transparent; appearance: textfield; -moz-appearance: textfield; font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: center; caret-color: var(--berry-650); }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.quantity-control input:disabled { color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: .6; }
.quantity-control input:invalid:not(:disabled) { color: #9b2639; }
.package-card :focus-visible { outline-color: var(--berry-800); }
.package-card ::selection { color: var(--berry-950); background: var(--berry-200); }
.package-checkout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.package-total { min-width: 0; }
.package-total-label { margin: 0 0 .25rem; color: var(--muted); font-size: .8125rem; }
.package-total-label > span { white-space: nowrap; }
.package-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0; color: var(--berry-950); font-variant-numeric: tabular-nums; }
.package-price strong { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 650; line-height: 1.2; letter-spacing: -.02em; }
.package-price > span { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.package-checkout .button { width: 100%; min-height: 3.5rem; box-shadow: none; font-size: .875rem; font-weight: 650; }
.package-checkout .button:hover:not(:disabled) { background: var(--berry-800); transform: none; }
.recent-payments { margin-top: 2.5rem; }
.recent-payments > p { color: var(--muted); font-size: .85rem; }
.payment-order-list { display: grid; gap: .75rem; padding: 0; list-style: none; }
.payment-order-list a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; text-decoration: none; }
.payment-order-list strong, .payment-order-list small { display: block; overflow-wrap: anywhere; }
.payment-order-list small { margin-top: .35rem; color: var(--muted); font-size: .75rem; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .75rem 1.15rem; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-weight: 800; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; filter: grayscale(.4); opacity: .5; transform: none; }
.button-primary { color: white; background: var(--berry-650); box-shadow: 0 8px 22px rgba(162,57,96,.23); }
.button-secondary { border-color: var(--berry-200); color: var(--berry-800); background: white; }

.payment-panel, .form-panel { max-width: 840px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.84); box-shadow: var(--shadow-lg); }
.payment-heading { margin-bottom: 2rem; text-align: center; }
.payment-layout { display: grid; gap: 1.5rem; }
.qr-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: white; text-align: center; }
.qr-card img { width: min(100%, 320px); height: auto; margin: 0 auto; }
.qr-card p { margin: .5rem 0 0; color: var(--muted); }
.qr-card strong { color: var(--berry-800); font-variant-numeric: tabular-nums; }
.qr-image-area { display: grid; align-items: center; min-height: 280px; }
.qr-feedback { display: grid; gap: 1rem; justify-items: center; padding: 1.5rem .5rem; }
.qr-feedback p { max-width: 32ch; color: var(--berry-800); font-size: .9rem; line-height: 1.6; }
.payment-facts { display: grid; margin: 0; }
.payment-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.payment-facts dt { flex: 1; color: var(--muted); font-size: .8rem; }
.payment-facts dd { flex: 1.5; min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 750; text-align: right; }
.payment-facts code { padding: .3rem .55rem; border-radius: 7px; color: var(--berry-950); background: var(--berry-100); font-size: .9rem; }
.copy-button { display: block; min-height: 44px; margin: .35rem 0 0 auto; padding: .5rem .75rem; border: 1px solid var(--berry-200); border-radius: 10px; color: var(--berry-800); background: white; cursor: pointer; font-size: .75rem; font-weight: 750; }
.payment-status-note { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); font-size: .85rem; }
.payment-warning { padding: .8rem 1rem; border-radius: 12px; color: #6b4816; background: #fff5dc; font-size: .77rem; }
.payment-actions, .result-actions { display: grid; gap: .7rem; margin-top: 1.2rem; }

.stacked-form { display: grid; gap: 1rem; }
.stacked-form p, .field { display: grid; gap: .4rem; margin: 0; }
.stacked-form label { color: var(--ink); font-size: .8rem; font-weight: 750; }
.stacked-form input, .stacked-form textarea, .stacked-form select { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid rgba(114,34,63,.22); border-radius: 12px; color: var(--ink); background: white; }
.stacked-form textarea { resize: vertical; }
.stacked-form .helptext { color: var(--muted); font-size: .72rem; }
.stacked-form ul { margin: .2rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .72rem; }
.stacked-form .errorlist { color: #9b2639; font-weight: 650; }
.form-panel .page-intro { margin-bottom: 2rem; }
.auth-page { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(circle at 50% 10%, white, transparent 22rem), linear-gradient(155deg, var(--berry-100), var(--cream)); }
.auth-page .page-shell { display: grid; min-height: 100vh; padding: 2rem 0; place-items: center; }
.auth-card { width: min(100%, 470px); padding: clamp(1.5rem, 6vw, 3rem); border: 1px solid rgba(114,34,63,.11); border-radius: var(--radius-lg); background: rgba(255,255,255,.88); box-shadow: var(--shadow-lg); }
.auth-brand { max-width: none; margin-bottom: 3rem; }
.auth-card h1 { margin-bottom: 2rem; }
.auth-switch { margin: 1.5rem 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
.auth-switch a { font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 1rem; place-items: center; background: rgba(46,17,29,.74); backdrop-filter: blur(9px); }
.result-modal { position: relative; width: min(100%, 520px); max-height: calc(100vh - 2rem); overflow-y: auto; padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius-lg); background: var(--cream); box-shadow: var(--shadow-lg); text-align: center; }
.result-modal::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(circle at 50% 28%, var(--berry-100), transparent 15rem); }
.modal-close { position: absolute; top: .8rem; right: .8rem; display: grid; width: 40px; aspect-ratio: 1; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--berry-800); background: white; cursor: pointer; font-size: 1.5rem; }
.result-modal h2 { margin: .25rem 0 1rem; font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 500; line-height: 1.05; }
.result-art { width: min(76vw, 280px); aspect-ratio: 1; margin: 0 auto; border: 10px solid white; border-radius: var(--radius-md); color: var(--berry-500); box-shadow: 0 0 0 1px var(--berry-200), 0 0 45px rgba(216,91,135,.22); font-size: 5rem; }
.result-note { color: var(--muted); font-size: .82rem; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; max-width: min(390px, calc(100% - 2rem)); padding: .85rem 1rem; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 650; }

@media (min-width: 720px) {
  .package-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .package-checkout { grid-column: 1 / -1; }
  .package-checkout .button { width: auto; min-width: 15rem; }
  .page-shell { width: min(1180px, calc(100% - 4rem)); }
  .payment-layout { grid-template-columns: minmax(260px, .8fr) 1fr; align-items: center; }
  .payment-layout.is-readonly { grid-template-columns: 1fr; }
  .payment-actions, .result-actions { grid-template-columns: 1fr 1fr; }
  .profile-confirmation { grid-template-columns:.7fr 1.5fr auto; align-items:center; }
  .site-header { min-height: 82px; }
  .page-shell { min-height: calc(100vh - 82px); }
}

@media (max-width: 520px) {
  .brand > span:last-child { max-width: 7.6rem; }
  .turn-label { display: none; }
  .page-shell { width: min(100% - 1.25rem, 1180px); padding-top: 2rem; }
  .section-heading { align-items: center; }
  .box-stage { border-radius: 24px; }
  .box-grid { gap: .4rem; padding: 1rem .1rem; }
  .lucky-box { padding-left: 3%; padding-right: 3%; }
  .history-card { grid-template-columns: 58px 1fr; }
  .history-art { width: 58px; }
  .history-card .status-badge { grid-column: 2; }
  .notice-card { grid-template-columns: auto 1fr; }
  .notice-card .text-link { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-motion: no-preference) {
  .conveyor-track { animation: conveyor-loop 28s linear infinite; }
  .conveyor:has(.image-preview-trigger:focus-visible) .conveyor-track,
  .conveyor.is-paused .conveyor-track,
  .conveyor.is-inactive .conveyor-track { animation-play-state: paused; }
}
@keyframes conveyor-loop { to { transform: translateX(-50%); } }

.image-preview-trigger { text-decoration: none; cursor: zoom-in; }
.image-preview-trigger img { object-fit: contain; }
.image-preview-trigger:focus-visible { outline: 3px solid var(--berry-800); outline-offset: -3px; }
.image-preview {
  width: min(1200px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 3vw, 2rem); border: 0; border-radius: 16px;
  color: var(--ink); background: var(--paper); box-shadow: var(--shadow-lg);
}
.image-preview::backdrop { background: rgba(46,17,29,.72); }
.image-preview-header { position: relative; padding-right: 3.5rem; margin-bottom: 1rem; }
.image-preview-header h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2rem); }
.image-preview-header .modal-close { top: -.4rem; right: -.4rem; }
.image-preview-art { display: grid; place-items: center; min-height: 8rem; margin: 0; }
.image-preview-art img { display: block; max-width: 100%; max-height: calc(100dvh - 11rem); width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.image-preview-art img[hidden] { display: none; }
.image-preview-status { margin: 1rem 0; color: var(--muted); font-size: .9rem; text-align: center; }
.image-preview [data-image-retry] { display: block; margin-inline: auto; }
.image-preview [data-image-retry][hidden] { display: none; }

.language-bar { display: flex; justify-content: flex-end; width: min(1180px, calc(100% - 1.25rem)); margin-inline: auto; padding-block: .25rem; }
.language-switch { display: inline-flex; align-items: center; gap: .25rem; }
.language-switch button { min-width: 44px; min-height: 44px; padding: .5rem; border: 0; border-radius: 8px; background: transparent; color: var(--berry-800); font: inherit; font-size: .875rem; font-weight: 650; cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: var(--berry-100); font-weight: 800; }
.language-switch button:hover { background: var(--berry-100); }
.language-inline { flex: 0 0 auto; }
@media (max-width: 420px) {
  .site-header { padding-inline: .625rem; gap: .5rem; }
  .site-header .brand { flex: 1 1 0; min-width: 0; font-size: .8rem; overflow-wrap: anywhere; }
  .site-header .brand-mark { display: none; }
  .site-header .header-actions { gap: .25rem; flex: 0 0 auto; }
  .site-header .turn-pill { padding-inline: .5rem; gap: .25rem; }
}
.auth-page .page-shell { min-height: calc(100svh - 52px); }
.profile-tabs { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; max-width: 760px; margin: 0 auto 1.5rem; border-bottom: 1px solid var(--line); }
.profile-tabs a { display: flex; align-items: center; min-height: 48px; padding: .5rem .25rem; border-bottom: 3px solid transparent; font-weight: 650; text-decoration: none; }
.profile-tabs a[aria-current="page"] { border-bottom-color: var(--berry-800); color: var(--berry-800); }
.payment-list { list-style: none; margin: 0; padding: 0; }
.payment-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.payment-list li > div { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; min-width: 0; overflow-wrap: anywhere; }
.payment-list .status-tag { font-size: .875rem; font-weight: 650; color: var(--muted); }
.payment-list .empty-state { display: block; width: 100%; border: 0; }
