:root {
  --red: #E3211B;
  --red-deep: #B8120E;
  --yellow: #FFD83D;
  --gold: #F5A300;
  --ink: #3A0A08;
  --blush: #FFEDE8;
  --white: #fff;
  --muted: #8A5A55;
  --num: "DIN Alternate", "DIN Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", sans-serif;
  --han: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--red); }
body { margin: 0; font: 15px/1.6 var(--han); color: var(--ink); background: var(--blush); max-width: 480px; margin-inline: auto; min-height: 100vh; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--red); color: var(--white); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 6px; align-items: center; font-weight: 900; font-size: 18px; text-decoration: none; }
.mode { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.18); }
.mode.live { background: var(--yellow); color: var(--ink); font-weight: 700; }

.hero { background: linear-gradient(var(--red) 0 62%, var(--blush) 62%); padding: 8px 16px 20px; }
h1 { margin: 6px 0 8px; color: var(--white); font-weight: 900; font-size: 46px; line-height: 1.05; letter-spacing: .02em; text-shadow: 0 3px 0 var(--red-deep); }
.lede { margin: 0 0 18px; color: #FFE3DE; font-size: 14px; max-width: 30em; }

/* the coupon: notched edges cut with radial gradients */
.coupon { position: relative; background:
    radial-gradient(circle at 0 147px, transparent 12px, var(--white) 12.5px) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 147px, transparent 12px, var(--white) 12.5px) right / 51% 100% no-repeat;
  border-radius: 16px; padding: 14px 18px 18px; box-shadow: 0 10px 0 -4px var(--red-deep); }
.coupon-top { display: flex; gap: 8px; white-space: nowrap; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
.subsidy { background: var(--ink); color: var(--yellow); font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.pot { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; color: var(--red); }
.pot b { font: 700 54px/1 var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pot span { font-weight: 800; font-size: 16px; }
.usd { color: var(--muted); font-size: 13px; height: 22px; border-bottom: 2px dashed #F3C9C2; padding-bottom: 26px; margin-bottom: 18px; }

.track { position: relative; height: 22px; background: #FDE0DA; border-radius: 99px; margin: 12px 4px 10px; }
.fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #F2433C 10px 20px); transition: width .6s cubic-bezier(.3,1.4,.5,1); }
.knife { position: absolute; top: 50%; left: 0; width: 44px; height: 44px; margin: -24px 0 0 -22px; transition: left .6s cubic-bezier(.3,1.4,.5,1); }
.knife img { width: 100%; height: 100%; transform-origin: 20% 80%; }
.knife.chop img { animation: chop .45s ease-out; }
@keyframes chop { 30% { transform: rotate(-38deg) translateY(-6px); } 60% { transform: rotate(8deg); } }
.pop { position: absolute; top: -30px; left: 0; transform: translateX(-50%); font: 700 18px var(--num); color: var(--red); opacity: 0; pointer-events: none; white-space: nowrap; }
.pop.show { animation: pop 1.1s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -18px); } }

.stage { text-align: center; min-height: 70px; }
.stage .big { margin: 6px 0 0; font-weight: 900; font-size: 22px; }
.stage .big em { font: normal 700 1.2em var(--num); color: var(--red); }
.stage .small { margin: 0; color: var(--muted); font-size: 12.5px; }

.coupon[data-stage="coin"] .fill { background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, var(--yellow) 10px 20px); }
.coupon[data-stage="diamond"] .fill { background: repeating-linear-gradient(-45deg, #5AA9FF 0 10px, #9FD0FF 10px 20px); }
.coupon[data-stage="countdown"], .coupon[data-stage="drawing"] { box-shadow: 0 0 0 4px var(--yellow), 0 10px 0 -4px var(--red-deep); }
.coupon[data-stage="countdown"] .fill, .coupon[data-stage="drawing"] .fill { background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--gold) 10px 20px); }
.almost { display: block; font: 700 64px/1 var(--num); color: var(--red); letter-spacing: -.02em; margin: 2px 0; }
.almost small { font: 900 20px var(--han); color: var(--ink); vertical-align: middle; margin-right: 4px; }
.timer { display: inline-block; font: 700 26px var(--num); background: var(--ink); color: var(--yellow); padding: 0 12px; border-radius: 6px; font-variant-numeric: tabular-nums; }

.cta { display: grid; gap: 8px; margin-top: 12px; }
.kan { display: block; text-align: center; text-decoration: none; font-weight: 900; font-size: 22px; padding: 14px; border-radius: 99px; color: var(--ink);
  background: linear-gradient(var(--yellow), #FFC300); box-shadow: 0 5px 0 #D69A00; }
.kan:active { transform: translateY(3px); box-shadow: 0 2px 0 #D69A00; }
.kan[aria-disabled="true"] { background: #EEE3E1; color: var(--muted); box-shadow: none; pointer-events: none; font-size: 17px; }
.ca { font: 12px var(--num); color: var(--muted); background: none; border: 1px dashed #E7B9B1; border-radius: 8px; padding: 8px; cursor: pointer; word-break: break-all; }
.fine { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

.split { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.split li { background: var(--white); border-radius: 10px; padding: 10px 8px; text-align: center; }
.split b { display: block; font: 700 26px var(--num); color: var(--red); line-height: 1.1; }
.split span { display: block; font-weight: 800; font-size: 13px; }
.split em { display: block; font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

.panel { background: var(--white); margin: 12px 0 0; padding: 16px; }
h2 { margin: 0 0 10px; font-size: 18px; font-weight: 900; }
.empty { color: var(--muted); font-size: 13px; list-style: none; }
.feed, .top { list-style: none; margin: 0; padding: 0; }
.feed li, .top li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #F6E4E0; font-size: 14px; }
.feed li.empty, .top li.empty { display: block; border: 0; }
.feed li.new { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: #FFF3BF; } }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: var(--white); font-size: 15px; }
.av { flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.av.sell { background: #8A5A55; }
.who { min-width: 0; }
.who b { font-weight: 700; }
.who small { display: block; color: var(--muted); font-size: 11.5px; font-family: var(--num); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { font: 700 16px var(--num); color: var(--red); white-space: nowrap; }
.amt.ticket { color: var(--gold); }
.amt.plain { color: var(--muted); font-size: 13px; font-family: var(--han); font-weight: 400; }
.feed li.sys { grid-template-columns: 1fr; background: #FFF6D6; padding: 8px 10px; border-radius: 8px; border: 0; margin: 4px 0; font-weight: 700; }

.order { border: 2px solid #F6E4E0; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.order header { display: flex; justify-content: space-between; align-items: baseline; }
.order header b { font-size: 16px; }
.order header span { font: 700 18px var(--num); color: var(--red); }
.order .pays { list-style: none; padding: 0; margin: 8px 0; }
.order .pays li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; }
.order .pays li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 11px; padding: 0 5px; border-radius: 4px; background: var(--red); color: var(--white); margin-right: 4px; }
.tag.n { background: var(--gold); }
.tag.c { background: #F6E4E0; color: var(--ink); }
.order .seed { font-size: 11.5px; color: var(--muted); word-break: break-all; font-family: var(--num); }
.more { color: var(--muted); font-size: 12px; }

.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 10px; font-size: 14px; color: #5B2C27; }
.steps li::marker { font: 700 16px var(--num); color: var(--red); }
.steps b { display: block; color: var(--ink); font-size: 15px; }
.verify summary { cursor: pointer; font-weight: 700; color: var(--red); }
.verify p { font-size: 13px; color: #5B2C27; }

.foot { padding: 18px 16px 40px; font-size: 12px; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.status.bad { color: var(--red); font-weight: 700; }

@media (min-width: 481px) { body { box-shadow: 0 0 0 1px var(--red-deep); } }
@media (max-width: 360px) { h1 { font-size: 38px; } .pot b { font-size: 44px; } .almost { font-size: 52px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
