/* SportCenter prototype — Night ride theme */
:root {
  --night: #0A1120;
  --surface: #121B2E;
  --surface-2: #18233A;
  --line: #22304A;
  --line-2: #2F3F5E;
  --snow: #EEF3F8;
  --muted: #93A1B8;
  --dim: #66748C;
  --lime: #C6FF3D;
  --lime-ink: #10180A;
  --signal: #FF5A36;
  --green: #35D07F;
  --blue: #3D8BFF;
  --warn: #FFC23D;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --r: 6px;
  --cut: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--snow);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
}
a { color: var(--lime); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; font-style: italic; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------- Header ---------- */
.demo-strip { background: var(--lime); color: var(--lime-ink); font-size: 13px; font-weight: 500; text-align: center; padding: 5px 12px; }
.demo-strip button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: inherit; font-weight: 600; padding: 0 4px; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(10, 17, 32, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 10px 20px; }
.logo { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 28px; letter-spacing: 0.02em; color: var(--snow); text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; }
.logo b { color: var(--lime); font-weight: 800; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: var(--r); font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--snow); background: var(--surface); }
.nav a.on { color: var(--snow); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--lime); }
.nav .count { background: var(--signal); color: #fff; font-size: 12px; border-radius: 10px; padding: 0 6px; line-height: 18px; }
.nav-sep { width: 1px; background: var(--line); margin: 6px 4px; flex: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.lang button { background: none; border: 0; padding: 6px 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.lang button.on { background: var(--snow); color: var(--night); }

@media (max-width: 860px) {
  .topbar-in { flex-wrap: wrap; gap: 10px; padding: 8px 14px; }
  .nav { order: 3; flex-basis: 100%; }
  .logo { font-size: 24px; flex: 1; }
}

/* ---------- Layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 24px 20px 80px; }
@media (max-width: 600px) { main { padding: 16px 14px 80px; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.panel h3 { margin-bottom: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--lime); color: var(--lime-ink); border: 0; padding: 11px 22px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 18px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; clip-path: var(--cut); text-decoration: none; white-space: nowrap; transition: filter 0.12s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 7px 16px; font-size: 15px; }
.btn.full { width: 100%; }
.btn.signal { background: var(--signal); color: #fff; }
.btn.ghost { background: transparent; color: var(--snow); clip-path: none; border: 1px solid var(--line-2); border-radius: var(--r); font-family: var(--body); font-style: normal; text-transform: none; font-weight: 600; font-size: 15px; letter-spacing: 0; padding: 9px 16px; }
.btn.ghost.sm { padding: 6px 12px; font-size: 14px; }
.btn.ghost:hover { border-color: var(--snow); filter: none; }
.btn.danger { background: transparent; border: 1px solid #7A3A33; color: #FF8B73; clip-path: none; border-radius: var(--r); font-family: var(--body); font-style: normal; text-transform: none; font-size: 14px; letter-spacing: 0; padding: 6px 12px; }
.icon-btn { background: transparent; border: 1px solid var(--line-2); color: var(--snow); width: 38px; height: 38px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; }
.icon-btn:hover { border-color: var(--snow); }
.icon-btn.on { color: var(--signal); border-color: var(--signal); }

label.f { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
label.f > span { display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; background: var(--night); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; color: var(--snow); font-size: 15px;
}
input:focus, select:focus, textarea:focus { border-color: var(--lime); outline: none; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input[type=range] { width: 100%; accent-color: var(--lime); }
.err { color: #FF8B73; font-size: 13px; margin-top: 6px; min-height: 0; }
.hint { color: var(--dim); font-size: 13px; margin-top: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; user-select: none; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 11px; background: var(--line-2); position: relative; cursor: pointer; transition: background 0.15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--snow); transition: transform 0.15s; }
.switch input:checked { background: var(--lime); }
.switch input:checked::after { transform: translateX(18px); background: var(--lime-ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 6px 12px; border-radius: var(--r); cursor: pointer; font-size: 14px; font-weight: 500; }
.chip:hover { color: var(--snow); border-color: var(--snow); }
.chip.on { background: var(--snow); color: var(--night); border-color: var(--snow); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.deal { background: var(--signal); color: #fff; }
.tag.ok { background: rgba(53, 208, 127, 0.14); color: var(--green); }
.tag.warn { background: rgba(255, 194, 61, 0.14); color: var(--warn); }
.tag.bad { background: rgba(255, 90, 54, 0.14); color: #FF8B73; }
.tag.lime { background: var(--lime); color: var(--lime-ink); }

/* Difficulty symbols */
.level { display: inline-flex; align-items: center; gap: 5px; }
.mk { display: inline-block; width: 11px; height: 11px; flex: none; }
.mk-green { background: var(--green); border-radius: 50%; }
.mk-blue { background: var(--blue); }
.mk-black { background: #000; border: 1.5px solid var(--snow); transform: rotate(45deg) scale(0.82); }

/* ---------- Explore: hero sport picker ---------- */
.hero { padding: 12px 0 8px; }
.hero-q { color: var(--muted); font-size: 17px; margin-bottom: 4px; }
.sport-row { display: flex; flex-wrap: wrap; gap: 0 28px; }
.sport-word { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(40px, 7.4vw, 104px); line-height: 0.98; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px var(--line-2); transition: color 0.18s, -webkit-text-stroke-color 0.18s; letter-spacing: -0.005em; }
.sport-word:hover { -webkit-text-stroke-color: var(--snow); }
.sport-word.on { color: var(--lime); -webkit-text-stroke-color: var(--lime); }
.sport-word .n { font-size: 0.3em; vertical-align: super; -webkit-text-stroke: 0; color: var(--muted); margin-left: 4px; font-style: normal; font-weight: 600; }
.sport-word.on .n { color: var(--snow); }
@media (prefers-reduced-motion: no-preference) {
  .sport-word { animation: rise 0.5s cubic-bezier(.2, .8, .2, 1) both; }
  .sport-word:nth-child(2) { animation-delay: 0.06s; }
  .sport-word:nth-child(3) { animation-delay: 0.12s; }
  .sport-word:nth-child(4) { animation-delay: 0.18s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) skewX(-6deg); } to { opacity: 1; transform: none; } }

.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0 0; }
.filters .f { min-width: 170px; }
.filters .grp { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg button { background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--snow); color: var(--night); }

.explore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; }
.explore .map-wrap { position: sticky; top: 76px; height: calc(100vh - 100px); min-height: 420px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 0; flex-wrap: wrap; }
.view-toggle { display: none; }
.filter-btn { display: none; }
@media (max-width: 700px) {
  .filter-btn { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: flex; }
  .filters .f { min-width: 0; width: 100%; }
  .sport-word { font-size: 44px; }
}
@media (max-width: 960px) {
  .explore { grid-template-columns: 1fr; }
  .explore .map-wrap { position: relative; top: 0; height: 64vh; }
  .explore[data-view=list] .map-wrap { display: none; }
  .explore[data-view=map] .list { display: none; }
  .view-toggle { display: inline-flex; }
}

/* ---------- Centre card ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; position: relative; cursor: pointer; transition: border-color 0.12s; }
.ccard:hover, .ccard.hl { border-color: var(--line-2); background: var(--surface-2); }
.ccard.has-deal { border-left: 3px solid var(--signal); }
.ccard-name { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 25px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.ccard-name a { color: inherit; text-decoration: none; }
.ccard-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ccard-stats { grid-column: 1 / -1; display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; color: var(--muted); }
.ccard-stats b { color: var(--snow); font-family: var(--display); font-style: italic; font-size: 22px; font-weight: 700; margin-right: 3px; }
.ccard-stats b.lime { color: var(--lime); }
.ccard-side { text-align: right; display: flex; flex-direction: column; align-items: end; gap: 6px; }
.price { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1; }
.price s { color: var(--dim); font-size: 17px; margin-left: 4px; }
.price small { font-family: var(--body); font-style: normal; font-weight: 400; font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.ccard-foot { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .ccard { grid-template-columns: 1fr; } .ccard-side { align-items: start; text-align: left; flex-direction: row; align-items: center; } }

/* ---------- Map ---------- */
.map { width: 100%; height: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0d1626; }
.night-tiles { filter: invert(1) hue-rotate(195deg) brightness(0.82) contrast(0.92) saturate(0.45); }
.leaflet-container { background: #0d1626 !important; font-family: var(--body) !important; }
.pin { background: var(--lime); color: var(--lime-ink); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 15px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.5); transform: translate(-50%, -100%); position: absolute; left: 0; top: 0; }
.pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--lime); }
.pin.deal { background: var(--signal); color: #fff; }
.pin.deal::after { border-top-color: var(--signal); }
.pin.hl { outline: 2px solid var(--snow); z-index: 1000; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2) !important; color: var(--snow) !important; border-radius: 8px !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: 14px; }
.leaflet-control-attribution { background: rgba(10,17,32,0.8) !important; color: var(--dim) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.svgmap text { font-family: var(--display); font-style: italic; }

/* ---------- Centre page ---------- */
.back { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; margin-bottom: 12px; }
.back:hover { color: var(--snow); }
.c-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .c-hero { grid-template-columns: 1fr; } }
.c-title { font-size: clamp(42px, 7vw, 84px); text-transform: uppercase; line-height: 0.95; }
.c-sub { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 60ch; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 24px; }
.board > div { padding: 16px; border-right: 1px solid var(--line); background: var(--surface); }
.board > div:last-child { border-right: 0; }
.board .big { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 46px; line-height: 1; color: var(--snow); }
.board .big.lime { color: var(--lime); }
.board .big small { font-size: 22px; color: var(--dim); font-weight: 700; }
.board .cap { color: var(--muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 700px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board > div:nth-child(2) { border-right: 0; } .board > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .board .big { font-size: 38px; } }
.sport-tabs { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.trailbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 10px 0 8px; }
.trailbar span { display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.forecast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fday { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.fday.deal { border-color: var(--signal); }
.fday .t { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 32px; line-height: 1.1; }
.fday i { font-size: 22px; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.amen { display: flex; flex-wrap: wrap; gap: 8px; }
.amen span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; font-size: 14px; color: var(--muted); }
.buybox { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.buybox.deal { border-color: var(--signal); }
.deal-band { background: var(--signal); color: #fff; margin: -20px -20px 16px; padding: 10px 20px; border-radius: 9px 9px 0 0; font-weight: 600; font-size: 14px; }

/* ---------- Checkout ---------- */
.steps { display: flex; gap: 6px; margin: 6px 0 22px; flex-wrap: wrap; }
.steps span { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--dim); font-weight: 500; }
.steps span b { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.steps span.on { color: var(--snow); }
.steps span.on b { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.steps span.done b { background: var(--surface-2); color: var(--lime); border-color: var(--lime); }
.steps .bar { width: 22px; height: 1px; background: var(--line-2); align-self: center; }
.co { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .co { grid-template-columns: 1fr; } }
.qty { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.qty:last-child { border-bottom: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); }
.stepper button { background: none; border: 0; width: 38px; height: 38px; cursor: pointer; font-size: 18px; color: var(--snow); }
.stepper button:hover { color: var(--lime); }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; }
.daypick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.daypick button { background: var(--night); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; cursor: pointer; text-align: left; color: var(--snow); }
.daypick button.on { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.daypick .d { font-weight: 600; }
.daypick .p { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 24px; }
.summary .ln { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 4px 0; }
.summary .ln.tot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 18px; font-weight: 600; }
.summary .ln.save { color: var(--signal); }
.card-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }

/* ---------- Tickets ---------- */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 150px; background: var(--snow); color: var(--night); border-radius: 12px; overflow: hidden; position: relative; }
.ticket-main { padding: 20px 22px; }
.ticket-main h3 { font-size: 30px; text-transform: uppercase; }
.ticket-code { background: #fff; padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-left: 2px dashed #C8D2E0; }
.ticket-code .code-svg { width: 118px; height: 118px; }
.ticket-code small { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; font-size: 15px; }
.ticket .kv { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.ticket .kv div span { display: block; color: #5C6B84; font-size: 12px; }
.ticket .kv div b { font-size: 16px; }
.ticket .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--lime); }
.ticket.past { opacity: 0.6; }
@media (max-width: 560px) { .ticket { grid-template-columns: 1fr; } .ticket-code { border-left: 0; border-top: 2px dashed #C8D2E0; } }

/* ---------- Tables, tabs, stats ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--snow); border-bottom-color: var(--lime); }
.tabs .count { background: var(--signal); color: #fff; font-size: 12px; border-radius: 10px; padding: 0 6px; line-height: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat .v { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 36px; line-height: 1.05; }
.stat .k { color: var(--muted); font-size: 14px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl input, .tbl select { padding: 6px 8px; font-size: 14px; }
.tbl input[type=number] { width: 80px; }
.wx-cell { display: flex; gap: 6px; align-items: center; }
.wx-cell input { width: 66px !important; }
.wx-cell select { width: 104px; }
.wx-cell.trig input, .wx-cell.trig select { border-color: var(--signal); }
.log { display: flex; flex-direction: column; }
.log-item { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.log-item:last-child { border-bottom: 0; }
@media (max-width: 600px) { .log-item { grid-template-columns: 1fr; gap: 4px; } }
.promo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.promo-card.pending { border-color: var(--warn); }
.pct { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 40px; color: var(--signal); line-height: 1; }

/* ---------- Deals ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.deal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.deal-top { background: var(--signal); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.deal-top .pct { color: #fff; font-size: 44px; }
.deal-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 10px; }
.empty i { font-size: 34px; color: var(--dim); }
.empty h3 { margin: 10px 0 6px; }
.empty p { color: var(--muted); margin-bottom: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--snow); color: var(--night); padding: 12px 18px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: all 0.2s; z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.lime { background: var(--lime); color: var(--lime-ink); }
#modal { display: none; }
#modal.open { display: block; position: fixed; inset: 0; z-index: 150; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 8, 16, 0.72); }
.modal-card { position: relative; max-width: 440px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 26px; max-height: 84vh; overflow: auto; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; }
@media (max-width: 500px) { .modal-card { margin: 4vh 12px 0; } }
.foot { max-width: 1320px; margin: 0 auto; padding: 24px 20px 40px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kbd { font-family: ui-monospace, monospace; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 18px; flex: none; }
.bars { display: flex; align-items: end; gap: 6px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; background: var(--line-2); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.bars div.lime { background: var(--lime); }
.bars-x { display: flex; gap: 6px; font-size: 12px; color: var(--dim); margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
