/* ==========================================================================
   功夫牛牛 — 全民马王 HORSE KING

   House style (kfnn-brand): royal-purple ground, gold for every figure that
   matters, gold hairline inset on framed panels. The race page is a night
   stadium — the only place in the app that goes near-black, because the
   floodlit track has to be the brightest thing on screen.

   Silk colours come from the horse roster (--silk per element) and are never
   the only signal: every chip carries its number.
   ========================================================================== */

.hk-hall, .hr-page, .hk-sheet-wrap {
  --hk-gold: #E6B446;
  --hk-gold-hi: #FADC96;
  --hk-gold-deep: #BE8C50;
  --hk-gold-grad: linear-gradient(160deg, #FADC96, #E6B446 45%, #BE8C50);
  --hk-frame: inset 0 0 0 1px rgba(230, 180, 70, .16);
  --hk-panel: linear-gradient(180deg, rgba(58, 22, 88, .55), rgba(33, 11, 55, .92));
  --hk-jade: #3ECF8E;
  --hk-cinnabar: #F27A6A;
  --hk-text-2: #d9cbe8;
}

.hk-hall { padding: 0 16px 32px; }
.hk-loading, .hk-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 16px; color: var(--hk-text-2); text-align: center; }
.hk-empty p { margin: 0; font-size: 14px; }
.hk-dim { color: var(--hk-text-2); font-size: 13px; }
.hk-note { color: var(--hk-text-2); font-size: 13px; line-height: 1.6; margin: 8px 0 0; }
.hk-win { color: var(--hk-jade) !important; }
.hk-lose { color: var(--hk-cinnabar) !important; }
.hk-eyebrow { font-size: 12px; letter-spacing: .08em; color: var(--hk-gold); font-weight: 700; }

/* ---- tabs -------------------------------------------------------------- */
.hk-tabs {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  margin: 0 -16px 14px; padding: 8px 12px;
  background: linear-gradient(180deg, rgba(22, 0, 33, .96), rgba(22, 0, 33, .88));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(230, 180, 70, .12);
}
.hk-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 5px; border-radius: 12px;
  color: var(--hk-text-2); font-size: 12px; font-weight: 700; text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.hk-tab.is-active { color: #160021; background: var(--hk-gold-grad); box-shadow: 0 4px 14px rgba(230, 180, 70, .28); }

/* ---- hero -------------------------------------------------------------- */
.hk-hero {
  position: relative; overflow: hidden; border-radius: 22px; min-height: 250px;
  box-shadow: var(--hk-frame), 0 18px 40px rgba(0, 0, 0, .45);
  background: #0b0016;
}
.hk-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.hk-hero-shade { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(11, 0, 22, .94) 0%, rgba(11, 0, 22, .72) 48%, rgba(11, 0, 22, .1) 100%), linear-gradient(0deg, rgba(11, 0, 22, .9), transparent 55%); }
.hk-hero-body { position: relative; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.hk-hero-title { display: flex; align-items: baseline; gap: 10px; }
.hk-hero-title h2 {
  margin: 0; font-size: 30px; font-weight: 900; line-height: 1.1; letter-spacing: .02em;
  background: var(--hk-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(230, 180, 70, .35));
}
.hk-race-no { font-size: 12px; font-weight: 800; color: var(--hk-gold-hi); padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(230, 180, 70, .4); }
.hk-clock { display: flex; flex-direction: column; gap: 2px; }
.hk-clock-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--hk-text-2); font-weight: 700; }
.hk-clock-num { font-size: 36px; font-weight: 900; line-height: 1.05; color: #FFF6E6; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: 0 0 22px rgba(230, 180, 70, .35); }
.hk-clock-sub { font-size: 12px; color: var(--hk-gold-hi); font-weight: 700; }
.hk-clock.is-live .hk-clock-num { color: var(--hk-cinnabar); text-shadow: 0 0 20px rgba(242, 122, 106, .6); }
.hk-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hk-cinnabar); box-shadow: 0 0 0 0 rgba(242, 122, 106, .7); animation: hk-pulse 1.4s infinite; }
@keyframes hk-pulse { 70% { box-shadow: 0 0 0 9px rgba(242, 122, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 122, 106, 0); } }
.hk-pools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hk-pools > div { background: rgba(11, 0, 22, .6); border-radius: 12px; padding: 7px 8px; box-shadow: var(--hk-frame); min-width: 0; }
.hk-pools span { display: block; font-size: 11.5px; color: var(--hk-text-2); font-weight: 700; }
.hk-pools b { display: block; font-size: 14px; color: var(--hk-gold); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- CTAs -------------------------------------------------------------- */
.hk-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--hk-gold-grad); color: #160021; font-weight: 900; font-size: 15px; text-decoration: none;
  box-shadow: 0 8px 22px rgba(230, 180, 70, .3), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform var(--t-fast);
}
.hk-cta:active { transform: scale(.97); }
.hk-cta-wide { display: flex; margin: 14px 0; }
.hk-cta-live { background: linear-gradient(160deg, #ff9d8f, #F27A6A 50%, #c0473a); color: #fff; box-shadow: 0 8px 26px rgba(242, 122, 106, .45); animation: hk-breathe 2.2s ease-in-out infinite; }
@keyframes hk-breathe { 50% { box-shadow: 0 8px 34px rgba(242, 122, 106, .75); } }
.hk-link { display: inline-flex; align-items: center; gap: 4px; color: var(--hk-gold); font-size: 13px; font-weight: 700; text-decoration: none; }
.hk-rules-btn { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px auto 0; padding: 8px 16px; border-radius: 99px; border: 1px solid rgba(230, 180, 70, .35); background: transparent; color: var(--hk-gold); font-weight: 700; font-size: 13px; }

/* ---- cards ------------------------------------------------------------- */
.hk-card { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--hk-panel); box-shadow: var(--hk-frame); }
.hk-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.hk-card-head h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; color: #FFF6E6; }

/* silk chip + portraits */
.hk-silk {
  display: inline-grid; place-items: center; flex: none;
  background: var(--silk); color: var(--ink);
  font-weight: 900; font-variant-numeric: tabular-nums;
  border-radius: 8px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5), 0 2px 6px rgba(0, 0, 0, .35);
}
.hk-silk-sm { width: 22px; height: 22px; font-size: 12px; border-radius: 7px; }
.hk-silk-md { width: 30px; height: 30px; font-size: 15px; }
.hk-portrait {
  position: relative; display: inline-block; flex: none; overflow: hidden; border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--silk) 70%, #fff 0%), #160021 80%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--silk) 65%, transparent), 0 6px 16px rgba(0, 0, 0, .4);
}
.hk-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hk-portrait b { position: absolute; left: 4px; bottom: 3px; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; }
.hk-portrait.is-sm { width: 40px; height: 40px; border-radius: 11px; }
.hk-portrait.is-sm b { font-size: 11px; }
.hk-portrait.is-md { width: 64px; height: 64px; }
.hk-portrait.is-lg { width: 104px; height: 104px; border-radius: 20px; }

/* my horse */
.hk-myhorse { display: flex; gap: 14px; align-items: center; }
.hk-myhorse-body { min-width: 0; flex: 1; }
.hk-myhorse h3 { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-size: 19px; }
.hk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hk-stats div { text-align: center; background: rgba(11, 0, 22, .45); border-radius: 10px; padding: 5px 0; }
.hk-stats b { display: block; font-size: 17px; color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hk-stats span { font-size: 11.5px; color: var(--hk-text-2); }
.hk-myhorse .hk-note { margin-top: 6px; font-size: 12px; }

.hk-pick-cta { text-align: center; }
.hk-pick-cta h3 { margin: 10px 0 4px; font-size: 18px; }
.hk-pick-cta p { color: var(--hk-text-2); font-size: 13.5px; line-height: 1.7; margin: 0 0 12px; }
.hk-pick-art { display: flex; justify-content: center; }
.hk-pick-art .hk-portrait { margin-left: -8px; }

/* breeding */
.hk-meter { height: 6px; border-radius: 99px; background: rgba(11, 0, 22, .6); overflow: hidden; margin-bottom: 12px; }
.hk-meter i { display: block; height: 100%; background: var(--hk-gold-grad); border-radius: inherit; transition: width .6s var(--ease-out); }
.hk-tasks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hk-task {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 2px 8px; border-radius: 14px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #4a1a6b, #2c0b42); color: #FFF6E6;
  box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .3), 0 6px 14px rgba(0, 0, 0, .3);
  transition: transform var(--t-fast);
}
.hk-task:active { transform: scale(.94); }
.hk-task-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--hk-gold-grad); color: #160021; box-shadow: 0 0 14px rgba(230, 180, 70, .45); }
.hk-task-name { font-size: 12.5px; font-weight: 700; }
.hk-task-pts { font-size: 13px; color: var(--hk-gold-hi); font-variant-numeric: tabular-nums; }
.hk-task small { font-size: 10.5px; color: var(--hk-text-2); }
.hk-task.is-done { background: rgba(11, 0, 22, .5); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .35); cursor: default; }
.hk-task.is-done .hk-task-ic { background: rgba(62, 207, 142, .2); color: var(--hk-jade); box-shadow: none; }
.hk-task.is-done .hk-task-pts { color: var(--hk-jade); }
.hk-task.is-wait .hk-task-ic { background: rgba(230, 180, 70, .18); color: var(--hk-gold); box-shadow: none; }
.hk-task:disabled:not(.is-done) { opacity: .6; }
.hk-task.is-pop .hk-task-ic { animation: hk-pop .5s var(--ease-spring); }
@keyframes hk-pop { 40% { transform: scale(1.3); } }
.hk-streak { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--hk-text-2); }
.hk-streak b { margin-left: auto; color: var(--hk-gold); font-size: 12.5px; }
.hk-streak-dots { display: flex; gap: 4px; }
.hk-streak-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(11, 0, 22, .6); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .3); }
.hk-streak-dots i.on { background: var(--hk-gold-grad); box-shadow: 0 0 8px rgba(230, 180, 70, .6); }

/* podium mini */
.hk-podium-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hk-podium-mini > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; text-align: center; }
.hk-podium-mini .p1 .hk-portrait { box-shadow: 0 0 0 2px var(--hk-gold), 0 0 18px rgba(230, 180, 70, .5); }
.hk-last-mine { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--hk-text-2); }

/* ---- stable ------------------------------------------------------------- */
.hk-stable-head h3 { margin: 0 0 2px; font-size: 18px; }
.hk-stable-head p { margin: 0 0 10px; }
.hk-stable { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hk-horse {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--silk) 18%, transparent), transparent 55%), var(--hk-panel);
  box-shadow: var(--hk-frame);
}
.hk-horse.is-mine { box-shadow: inset 0 0 0 1.5px var(--hk-gold), 0 0 22px rgba(230, 180, 70, .22); }
.hk-horse-body { flex: 1; min-width: 0; }
.hk-horse h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 16px; }
.hk-horse-meta { display: flex; gap: 12px; font-size: 12px; color: var(--hk-text-2); }
.hk-horse-meta span { display: inline-flex; align-items: center; gap: 3px; }
.hk-form { display: flex; gap: 3px; margin-top: 5px; }
.hk-form i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; font-style: normal; font-weight: 800; background: rgba(11, 0, 22, .55); color: var(--hk-text-2); }
.hk-form i.w { background: var(--hk-gold-grad); color: #160021; }
.hk-form i.p { background: rgba(230, 180, 70, .25); color: var(--hk-gold-hi); }
.hk-form em { font-size: 11.5px; color: var(--hk-text-2); font-style: normal; }
.hk-mypts { display: inline-block; margin-top: 5px; font-size: 12px; color: var(--hk-gold); font-weight: 700; }
.hk-pick { flex: none; padding: 8px 12px; border-radius: 12px; border: 0; background: var(--hk-gold-grad); color: #160021; font-weight: 800; font-size: 13px; }
.hk-pick:disabled { background: rgba(11, 0, 22, .55); color: var(--hk-text-2); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .2); }
.hk-badge { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 99px; background: rgba(62, 207, 142, .16); color: var(--hk-jade); font-size: 12px; font-weight: 800; }

/* ---- bet ---------------------------------------------------------------- */
.hk-bet-head { display: flex; flex-direction: column; gap: 10px; }
.hk-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 16px; background: rgba(11, 0, 22, .6); box-shadow: var(--hk-frame); }
.hk-seg button { border: 0; border-radius: 12px; padding: 8px 0; background: transparent; color: var(--hk-text-2); font-weight: 900; font-size: 16px; display: flex; flex-direction: column; align-items: center; }
.hk-seg button small { font-size: 11px; font-weight: 600; }
.hk-seg button.is-on { background: var(--hk-gold-grad); color: #160021; box-shadow: 0 6px 16px rgba(230, 180, 70, .3); }
.hk-bet-clock { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--hk-text-2); }
.hk-bet-clock b { font-size: 20px; color: #FFF6E6; font-variant-numeric: tabular-nums; }
.hk-bet-clock .hk-dim { margin-left: auto; }
.hk-odds-note { display: flex; gap: 5px; align-items: flex-start; font-size: 12px; }
.hk-board { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.hk-row {
  display: grid; grid-template-columns: auto 1fr 76px 64px; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 14px; border: 0; text-align: left; cursor: pointer;
  background: var(--hk-panel); box-shadow: var(--hk-frame); color: #FFF6E6;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.hk-row:active { transform: scale(.98); box-shadow: inset 0 0 0 1px var(--hk-gold); }
.hk-row:disabled { opacity: .7; cursor: default; }
.hk-row-name { display: flex; flex-direction: column; min-width: 0; font-weight: 800; font-size: 14.5px; }
.hk-row-name > .hk-silk { display: none; }
.hk-row-name small { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--hk-text-2); }
.hk-row-pool { position: relative; height: 22px; border-radius: 7px; background: rgba(11, 0, 22, .55); overflow: hidden; }
.hk-row-pool i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(230, 180, 70, .15), rgba(230, 180, 70, .4)); }
.hk-row-pool em { position: relative; display: block; font-style: normal; font-size: 11px; line-height: 22px; text-align: center; color: var(--hk-text-2); font-variant-numeric: tabular-nums; }
.hk-row-odds { text-align: right; font-size: 17px; font-weight: 900; color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hk-row-odds small { display: block; font-size: 10.5px; font-weight: 700; color: var(--hk-jade); }
.hk-slip { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(230, 180, 70, .08); font-size: 13px; color: #FFF6E6; text-decoration: none; }
.hk-slip:first-of-type { border-top: 0; }
.hk-slip > span:not(.hk-silk) { flex: 1; min-width: 0; }
.hk-slip b { color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hk-slip small { color: var(--hk-text-2); font-size: 11.5px; }
.hk-slip em { color: var(--hk-text-2); font-style: normal; font-size: 12px; }

/* ---- results / my / verify --------------------------------------------- */
.hk-result.is-void { opacity: .75; }
.hk-result-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--hk-text-2); }
.hk-result-foot .hk-link:first-of-type { margin-left: auto; }
.hk-my-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hk-my-sum div { text-align: center; }
.hk-my-sum span { display: block; font-size: 12px; color: var(--hk-text-2); }
.hk-my-sum b { font-size: 16px; color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hk-dl { display: grid; gap: 4px; margin: 12px 0; font-size: 12.5px; }
.hk-dl dt { color: var(--hk-text-2); margin-top: 6px; }
.hk-dl dd { margin: 0; word-break: break-all; }
.hk-dl code { font-size: 11.5px; color: var(--hk-gold-hi); }
.hk-dl a { color: var(--hk-gold); }
.hk-vres { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(11, 0, 22, .5); font-size: 13px; font-weight: 700; }
.hk-vres.is-ok { color: var(--hk-jade); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .4); }
.hk-vres.is-bad { color: var(--hk-cinnabar); box-shadow: inset 0 0 0 1px rgba(242, 122, 106, .4); }
.hk-vtable { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hk-vtable th { text-align: left; color: var(--hk-text-2); font-weight: 700; padding: 4px; }
.hk-vtable td { padding: 5px 4px; border-top: 1px solid rgba(230, 180, 70, .08); }
.hk-vtable td:first-child { display: flex; align-items: center; gap: 6px; }

/* ---- bottom sheet ------------------------------------------------------- */
.hk-sheet-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; background: rgba(5, 0, 12, 0); transition: background .25s; }
.hk-sheet-wrap.show { background: rgba(5, 0, 12, .66); }
.hk-sheet {
  width: 100%; max-height: 88vh; overflow: auto; padding: 8px 16px calc(18px + var(--safe-bottom, 0px));
  border-radius: 24px 24px 0 0; background: linear-gradient(180deg, #2c0b42, #160021);
  box-shadow: 0 -1px 0 rgba(230, 180, 70, .3), 0 -20px 50px rgba(0, 0, 0, .5);
  transform: translateY(100%); transition: transform .3s var(--ease-out); color: #FFF6E6;
}
.hk-sheet-wrap.show .hk-sheet { transform: none; }
.hk-sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: rgba(255, 246, 230, .25); margin: 4px auto 12px; }
.hk-sheet-head { display: flex; gap: 12px; align-items: center; }
.hk-sheet-head h3 { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 20px; }
.hk-amount { display: flex; align-items: baseline; gap: 6px; margin: 16px 0 10px; padding: 10px 14px; border-radius: 14px; background: rgba(11, 0, 22, .6); box-shadow: var(--hk-frame); }
.hk-amount span { color: var(--hk-gold); font-weight: 800; }
.hk-amount input { flex: 1; min-width: 0; border: 0; background: transparent; color: #FFF6E6; font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; outline: none; }
.hk-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.hk-chips button { padding: 8px 0; border-radius: 10px; border: 0; background: rgba(230, 180, 70, .14); color: var(--hk-gold-hi); font-weight: 800; }
.hk-quote { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hk-quote div { padding: 8px 10px; border-radius: 12px; background: rgba(11, 0, 22, .45); }
.hk-quote span { display: block; font-size: 12px; color: var(--hk-text-2); }
.hk-quote b { font-size: 15px; color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hk-sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.hk-rules ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.7; color: var(--hk-text-2); }
.hk-rules ol b { display: block; color: var(--hk-gold); font-size: 14px; }
.hk-rules .hk-sheet-actions { grid-template-columns: 1fr; }

/* =========================================================================
   The race page
   ========================================================================= */
.hr-page {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, #2a0a3f, #07000f 70%);
  color: #FFF6E6; padding-top: var(--content-top, var(--safe-top, 0px));
}
.hr-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.hr-back, .hr-snd { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 246, 230, .08); color: #FFF6E6; }
.hr-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hr-title b { font-size: 16px; background: var(--hk-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hr-title span { font-size: 12px; color: var(--hk-text-2); }
.hr-live { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: #c0392b; font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.hr-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: hk-blink 1s steps(2) infinite; }
@keyframes hk-blink { 50% { opacity: .2; } }

.hr-stage { position: relative; flex: none; aspect-ratio: 0.9; max-height: 62vh; width: calc(100% - 16px); min-height: 0; margin: 0 8px; border-radius: 18px; overflow: hidden; box-shadow: var(--hk-frame), 0 12px 40px rgba(0, 0, 0, .6); background: #07000f; }
.hr-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hr-call {
  position: absolute; left: 50%; top: 40px; transform: translateX(-50%);
  max-width: 92%; padding: 6px 16px; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 18px; font-weight: 900; color: #160021; background: var(--hk-gold-grad);
  box-shadow: 0 6px 24px rgba(230, 180, 70, .5); opacity: 0; pointer-events: none;
}
.hr-call.pop { animation: hr-call 2.4s var(--ease-out) forwards; }
@keyframes hr-call { 0% { opacity: 0; transform: translate(-50%, -10px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 20% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

.hr-wait { position: relative; margin: 8px 8px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 16px; background: rgba(11, 0, 22, .82); backdrop-filter: blur(6px); box-shadow: var(--hk-frame); text-align: center; }
.hr-wait-extra { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin-top: 6px; }
.hr-wait-me { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.hr-wait-cta { padding: 8px 14px; font-size: 14px; }
.hr-wait[hidden] { display: none; }
.hr-wait-ring { display: none; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--hk-gold); box-shadow: inset 0 0 0 2px rgba(230, 180, 70, .5); animation: hk-spin 6s linear infinite; }
@keyframes hk-spin { to { transform: rotate(360deg); } }
.hr-wait > span { font-size: 14px; color: var(--hk-text-2); font-weight: 700; }
.hr-wait b { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; color: #FFF6E6; text-shadow: 0 0 26px rgba(230, 180, 70, .45); }
.hr-wait small { font-size: 11.5px; color: var(--hk-text-2); font-family: ui-monospace, monospace; }

.hr-board { flex: 1 1 auto; overflow: auto; padding: 10px 12px calc(12px + var(--safe-bottom, 0px)); }
.hr-board-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--hk-text-2); font-weight: 700; margin-bottom: 6px; }
.hr-left { color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hr-ranks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.hr-ranks::-webkit-scrollbar { display: none; }
.hr-ranks li { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 10px; background: rgba(255, 246, 230, .05); }
.hr-ranks li em { font-style: normal; font-size: 10.5px; color: var(--hk-text-2); font-weight: 800; }
.hr-ranks li.is-lead { background: rgba(230, 180, 70, .2); box-shadow: inset 0 0 0 1px var(--hk-gold); }
.hr-ranks li.is-mine { box-shadow: inset 0 0 0 1.5px var(--hk-gold-hi); }
.hr-mine { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 96px; overflow: auto; }
.hr-slip { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 8px; border-radius: 10px; background: rgba(255, 246, 230, .05); }
.hr-slip > span:not(.hk-silk) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-slip b { color: var(--hk-text-2); font-variant-numeric: tabular-nums; }
.hr-slip.is-good { background: rgba(62, 207, 142, .12); }
.hr-slip.is-good b { color: var(--hk-jade); }

/* finish */
.hr-final { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(circle at 50% 35%, rgba(230, 180, 70, .2), rgba(7, 0, 15, .94) 62%); animation: hk-fade .6s ease-out; overflow: hidden; }
.hr-final[hidden] { display: none; }
@keyframes hk-fade { from { opacity: 0; } }
.hr-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 0 12px; }
.hr-step { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 30%; animation: hr-rise .8s var(--ease-spring) both; }
.hr-step.s1 { animation-delay: .5s; }
.hr-step.s2 { animation-delay: .25s; }
.hr-step b { font-size: 14px; text-align: center; }
.hr-step.s1 b { color: var(--hk-gold-hi); font-size: 16px; }
.hr-medal { width: 26px; height: 26px; font-size: 14px; }
.hr-block { width: 100%; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: #160021; border-radius: 10px 10px 0 0; background: var(--hk-gold-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.hr-step.s1 .hr-block { height: 70px; }
.hr-step.s2 .hr-block { height: 48px; background: linear-gradient(160deg, #f4f4f6, #b0bec5 50%, #7d8a91); }
.hr-step.s3 .hr-block { height: 34px; background: linear-gradient(160deg, #f0b98a, #c47a45 50%, #8a4f26); }
.hr-step.s1 .hk-portrait { box-shadow: 0 0 0 3px var(--hk-gold), 0 0 34px rgba(230, 180, 70, .7); }
@keyframes hr-rise { from { opacity: 0; transform: translateY(60px); } }
.hr-final-foot { padding: 12px; background: linear-gradient(180deg, rgba(22, 0, 33, .92), #160021 40%); }
.hr-res { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 246, 230, .06); font-size: 13px; color: var(--hk-text-2); }
.hr-res b { margin-left: auto; font-size: 20px; color: #FFF6E6; font-variant-numeric: tabular-nums; }
.hr-why { flex-basis: 100%; font-size: 12px; color: var(--hk-text-2); }
.hr-res.is-win b { color: var(--hk-jade); }
.hr-res.is-lose b { color: var(--hk-cinnabar); }
.hr-final-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; margin-top: 8px; }
.hr-final-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-size: 13px; padding: 10px 4px; }
.hr-confetti { position: absolute; inset: 0; pointer-events: none; }
.hr-confetti i { position: absolute; top: -12px; left: calc(var(--x) * 1%); width: 7px; height: 12px; border-radius: 2px; background: var(--hk-gold-grad); animation: hr-fall calc(2.2s + (var(--i) * .07s)) cubic-bezier(.3, .6, .5, 1) calc(var(--i) * .05s) both; }
.hr-confetti i:nth-child(3n) { background: #F27A6A; }
.hr-confetti i:nth-child(4n) { background: #fff; width: 5px; }
@keyframes hr-fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  .hk-cta-live, .hk-live-dot, .hr-wait-ring, .hr-confetti i { animation: none; }
}
@media (min-width: 560px) {
  .hk-stable { grid-template-columns: 1fr 1fr; }
}

/* ---- cosmetics / VIP / seasons ------------------------------------------ */
button.hk-link { background: none; border: 0; padding: 0; cursor: pointer; }
.hk-item {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--r-glow), #160021 78%);
  box-shadow: inset 0 0 0 1.5px var(--r-line), 0 4px 12px rgba(0, 0, 0, .35);
  color: var(--r-line);
}
.hk-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hk-item i { font-style: normal; display: grid; }
.hk-item.is-sm { width: 40px; height: 40px; border-radius: 11px; }
.r-common { --r-line: #b9a6ce; --r-glow: rgba(185, 166, 206, .35); }
.r-rare { --r-line: #3ECF8E; --r-glow: rgba(62, 207, 142, .38); }   /* jade, not the reference site's cyan */
.r-epic { --r-line: #A032D2; --r-glow: rgba(160, 50, 210, .45); }   /* the house violet */
.r-legendary { --r-line: #FADC96; --r-glow: rgba(250, 220, 150, .55); }
.hk-vip { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, rgba(230, 180, 70, .22), transparent 60%), var(--hk-panel); }
.hk-vip-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--hk-gold-grad); color: #160021; font-weight: 900; font-size: 12px; line-height: 1; box-shadow: 0 6px 18px rgba(230, 180, 70, .4); }
.hk-vip-badge b { font-size: 26px; }
.hk-vip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hk-vip-body .hk-meter { margin: 0; }
.hk-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hk-tier { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: rgba(11, 0, 22, .45); text-align: center; }
.hk-tier span { font-size: 12px; color: var(--hk-text-2); font-weight: 700; }
.hk-tier b { font-size: 12px; color: var(--hk-gold-hi); }
.hk-tier.is-done { box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .45); }
.hk-tier.is-done b { color: var(--hk-jade); }
.hk-wardrobe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hk-ward { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 0; background: rgba(11, 0, 22, .45); color: #FFF6E6; cursor: pointer; }
.hk-ward b { font-size: 12.5px; }
.hk-ward small { font-size: 11px; color: var(--hk-text-2); }
.hk-ward.is-on { background: rgba(230, 180, 70, .16); box-shadow: inset 0 0 0 1.5px var(--hk-gold); }
.hk-crown { color: var(--hk-gold); filter: drop-shadow(0 0 6px rgba(230, 180, 70, .8)); }
.hk-plate { display: inline-block; margin: -4px 0 8px; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #160021; background: var(--hk-gold-grad); }
.hk-seg-sm { margin-bottom: 12px; }
.hk-seg-sm button { font-size: 14px; padding: 7px 0; }
.hk-season-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.hk-season-head span { display: flex; gap: 12px; }
.hk-board-list { margin: 0; padding: 0; list-style: none; }
.hk-board-list li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid rgba(230, 180, 70, .08); font-size: 13.5px; }
.hk-board-list li:first-child { border-top: 0; }
.hk-board-list em { width: 24px; text-align: center; font-style: normal; font-weight: 900; color: var(--hk-text-2); }
.hk-board-list li.top1 em { color: var(--hk-gold); }
.hk-board-list li.top2 em { color: #d7dde0; }
.hk-board-list li.top3 em { color: #d9905a; }
.hk-board-list span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-board-list b { color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hr-confetti.is-gold i { background: var(--hk-gold-grad) !important; width: 9px; height: 9px; border-radius: 50%; }

/* ---- UI audit round 1 ---------------------------------------------------- */
.hk-row-odds.is-under { color: var(--hk-text-2); }
.hk-row-odds .hk-under { color: var(--hk-cinnabar); }
.hk-row-odds { font-size: clamp(14px, 4.2vw, 17px); }
.hk-first { display: flex; gap: 5px; align-items: center; color: var(--hk-gold-hi); }
.hk-worn { font-style: normal; font-size: 10.5px; font-weight: 800; color: #160021; background: var(--hk-gold-grad); padding: 1px 6px; border-radius: 6px; }
.hk-form-l { font-size: 11px; color: var(--hk-text-2); margin-right: 3px; align-self: center; }
.hk-board-list li.is-me { background: rgba(230, 180, 70, .12); border-radius: 10px; }
.hk-link { min-height: 36px; padding: 6px 4px; }
.hk-dl code, .hr-wait small { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.hk-slip em b { font-weight: 800; }

/* ---- UI audit round 2 (polish) ------------------------------------------- */
.hk-medal { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 900; color: #160021; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 3px rgba(0, 0, 0, .4); vertical-align: -3px; }
.hk-medal.m1 { background: linear-gradient(160deg, #FADC96, #E6B446 50%, #BE8C50); }
.hk-medal.m2 { background: linear-gradient(160deg, #f4f4f6, #b0bec5 50%, #7d8a91); }
.hk-medal.m3 { background: linear-gradient(160deg, #f0b98a, #c47a45 50%, #8a4f26); }
.hk-hero-title { flex-wrap: wrap; row-gap: 4px; }
.hk-hero-title h2 { font-size: clamp(22px, 7.4vw, 30px); }
.hk-stats span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; padding: 0 2px; }
.hk-switch { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.hk-switch-arrow { color: var(--hk-gold, #E6B446); }

/* =========================================================================
   v2 — the live broadcast page (#/horse/live)
   ========================================================================= */
.hl-page {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, #2a0a3f, #07000f 70%);
  color: #FFF6E6; padding-top: var(--content-top, var(--safe-top, 0px));
  --hk-gold: #E6B446; --hk-gold-hi: #FADC96; --hk-gold-grad: linear-gradient(160deg, #FADC96, #E6B446 45%, #BE8C50);
  --hk-frame: inset 0 0 0 1px rgba(230, 180, 70, .16); --hk-text-2: #d9cbe8; --hk-jade: #3ECF8E; --hk-cinnabar: #F27A6A;
}
.hl-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.hl-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.hl-brand small { font-size: 10.5px; letter-spacing: .18em; color: var(--hk-gold); font-weight: 800; }
.hl-brand b { font-size: 18px; font-weight: 900; background: var(--hk-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-chip { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(255, 246, 230, .08); white-space: nowrap; }
.hl-chip:empty { display: none; }

/* ONE SCREEN, NO SCROLL. The stage takes a fixed share (taller than it is
   wide on a phone, capped at half the height), the board and ticker are one
   line each, 助力 sits on the picture, and the chat gets everything left —
   so the whole live page fits a phone without scrolling at 360x640 too. */
.hl-stage { position: relative; flex: none; margin: 0 8px; height: min(calc((100vw - 16px) / 0.94), 50dvh); border-radius: 16px; overflow: hidden; background: #07000f; box-shadow: var(--hk-frame), 0 10px 30px rgba(0, 0, 0, .55); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.hl-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Left-anchored and capped at 68% of the stage: at true scale the horses are
   small and the near lanes run along the BOTTOM of the frame, so a full-width
   lower third buried the last three runners completely. */
.hl-lower { position: absolute; left: 8px; right: auto; max-width: 68%; bottom: 8px; padding: 8px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(22, 0, 33, .92), rgba(22, 0, 33, .6)); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .35); display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.hl-lower[hidden] { display: none; }
.hl-lower b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--hk-gold-hi); }
.hl-lower.pop { animation: hl-slide .45s cubic-bezier(.22, .61, .36, 1); }
@keyframes hl-slide { from { transform: translateX(-30px); opacity: 0; } }
.hl-tapfx { position: absolute; inset: 0; pointer-events: none; }
.hl-burst { position: absolute; transform: translate(-50%, -50%); font-style: normal; font-weight: 900; font-size: 18px; color: #FADC96; -webkit-text-stroke: 1.2px #160021; paint-order: stroke fill; text-shadow: 0 0 12px rgba(230, 180, 70, .95), 0 2px 4px #000; animation: hl-burst .7s ease-out forwards; }
@keyframes hl-burst { from { opacity: 1; transform: translate(-50%, -50%) scale(.7); } to { opacity: 0; transform: translate(-50%, -140%) scale(1.3); } }

.hl-paddock { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; padding: 10px; background: radial-gradient(circle at 50% 30%, rgba(66, 22, 88, .9), rgba(7, 0, 15, .96)); }
.hl-paddock[hidden] { display: none; }
.hl-pad-card h3 { margin: 0; font-size: 16px; }
.hl-pad-head { display: flex; justify-content: space-between; align-items: baseline; }
.hl-count { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; color: #FFF6E6; text-shadow: 0 0 18px rgba(230, 180, 70, .45); }
.hl-fc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; font-size: 12px; }
.hl-fc span { padding: 3px 8px; border-radius: 99px; background: rgba(255, 246, 230, .08); }
.hl-moods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; }
.hl-moods li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hl-moods li > span:not(.hk-silk) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-moods em { font-style: normal; font-weight: 800; font-size: 11.5px; }
.hl-moods em.m0 { color: var(--hk-cinnabar); }
.hl-moods em.m1 { color: #f0a58f; }
.hl-moods em.m2 { color: var(--hk-text-2); }
.hl-moods em.m3 { color: #9fe0bf; }
.hl-moods em.m4 { color: var(--hk-jade); }
.hl-moods small { color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hl-pad-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.hk-cta-ghost { background: rgba(255, 246, 230, .08); color: var(--hk-gold-hi); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .45); }

.hl-board { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px 0; min-width: 0; }
.hl-mini { position: relative; flex: none; width: 60px; height: 34px; border-radius: 9px; background: rgba(255, 246, 230, .04); box-shadow: var(--hk-frame); }
.hl-mini canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hl-lb { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.hl-lb::-webkit-scrollbar { display: none; }
.hl-lb li { flex: none; display: flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 8px 3px 5px; border-radius: 99px; background: rgba(255, 246, 230, .05); white-space: nowrap; }
.hl-lb li em { font-style: normal; width: 14px; text-align: center; font-weight: 900; color: var(--hk-text-2); }
.hl-lb li:first-child em { color: var(--hk-gold); }
.hl-lb li > span:not(.hk-silk) { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-board.is-idle { display: none; }
.hl-lb li small { font-variant-numeric: tabular-nums; color: var(--hk-text-2); }
.hl-lb li.is-mine { box-shadow: inset 0 0 0 1.5px var(--hk-gold-hi); }

.hl-ticker { flex: none; display: flex; align-items: center; gap: 8px; margin: 6px 8px 0; padding: 5px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(230, 180, 70, .22), rgba(230, 180, 70, .05)); box-shadow: var(--hk-frame); }
.hl-mc { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; color: #160021; background: var(--hk-gold-grad); padding: 2px 7px; border-radius: 99px; }
.hl-ticker b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-ticker b.pop { animation: hl-say .4s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes hl-say { from { transform: translateY(8px); opacity: 0; } }

/* 助力 on the picture: a pill and a thumb-sized button, only while a window is open. */
.hl-boost { position: absolute; top: 10px; right: 10px; display: none; align-items: center; gap: 8px; pointer-events: none; z-index: 3; }
.hl-boost.is-open { display: flex; }
.hl-boost-pill { display: flex; flex-direction: column; align-items: flex-end; padding: 4px 9px; border-radius: 10px; background: rgba(11, 0, 22, .93); box-shadow: inset 0 0 0 1px var(--hk-gold-hi); line-height: 1.3; }
.hl-boost-pill span { font-size: 12px; font-weight: 800; color: var(--hk-gold-hi); white-space: nowrap; }
.hl-boost-pill b { font-size: 11px; font-weight: 700; color: #d9cbe8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl-boost-pill b:empty { display: none; }
.hl-tapbtn { display: none; pointer-events: auto; position: relative; width: 56px; height: 56px; margin: 5px; border: 0; border-radius: 50%; color: #2a1206; font: inherit; font-weight: 900; font-size: 15px; background: var(--hk-gold-grad); box-shadow: 0 0 0 2px rgba(11, 0, 22, .7), 0 4px 18px rgba(230, 180, 70, .45); -webkit-tap-highlight-color: transparent; }
.hl-boost.can-tap .hl-tapbtn { display: grid; place-items: center; }
/* The fill ring: this window's taps against the per-window cap. */
.hl-tapbtn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(#FADC96 var(--p, 0%), rgba(255, 246, 230, .16) 0); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); }
.hl-tapbtn span { position: relative; }
.hl-tapbtn:active { transform: scale(.93); }
@media (prefers-reduced-motion: no-preference) { .hl-boost.can-tap .hl-tapbtn { animation: hl-tap-pulse 1s ease-in-out infinite; } }
@keyframes hl-tap-pulse { 50% { box-shadow: 0 0 0 2px rgba(11, 0, 22, .7), 0 0 0 12px rgba(230, 180, 70, .16), 0 4px 22px rgba(230, 180, 70, .6); } }

.hl-chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 6px 8px calc(6px + var(--safe-bottom, 0px)); border-radius: 12px; background: rgba(255, 246, 230, .03); box-shadow: var(--hk-frame); }
.hl-chat-log { flex: 1; min-height: 40px; overflow: auto; padding: 6px 10px; font-size: 13px; line-height: 1.5; }
.hl-chat-log p { margin: 0 0 2px; }
.hl-chat-log b { color: var(--hk-gold); margin-right: 6px; }
.hl-chat-form { display: flex; gap: 6px; padding: 6px; border-top: 1px solid rgba(230, 180, 70, .12); }
.hl-chat-form input { flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 8px 10px; background: rgba(11, 0, 22, .6); color: #FFF6E6; font-size: 14px; outline: none; }
.hl-chat-form button { border: 0; border-radius: 10px; padding: 0 12px; background: var(--hk-gold-grad); color: #160021; }

/* =========================================================================
   v2 — 赞助 shop (#/horse/sponsor)
   ========================================================================= */
.hs-head { margin: 10px 0; }
.hs-picker { display: flex; gap: 6px; overflow-x: auto; padding: 6px 6px 10px; scrollbar-width: none; }
.hs-picker::-webkit-scrollbar { display: none; }
.hs-picker button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; font-weight: 900; color: #160021; background: var(--silk); box-shadow: inset 0 0 0 2px rgba(255, 246, 230, .22); opacity: .6; transition: transform .15s, opacity .15s; }
.hs-picker button.is-on { opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 2px var(--hk-gold-hi), 0 0 14px rgba(230, 180, 70, .5); }
.hs-hero { display: flex; gap: 12px; align-items: center; }
.hs-hero h3 { margin: 2px 0 4px; display: flex; align-items: center; gap: 6px; font-size: 18px; }
.hs-cosmetic { display: flex; align-items: center; gap: 4px; color: var(--hk-gold-hi); }
.hs-worn { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-chip { display: inline-flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; background: rgba(255, 246, 230, .06); font-size: 13px; font-weight: 700; }
.hs-chip img { width: 24px; height: 24px; object-fit: contain; }
.hs-chip small { font-size: 11px; font-weight: 400; color: var(--hk-text-2); }
.hs-tier { margin: 14px 0 0; }
.hs-tier h4 { margin: 0 0 6px; font-size: 14px; color: var(--hk-gold); font-variant-numeric: tabular-nums; }
.hs-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hs-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 0; border-radius: 14px; background: rgba(255, 246, 230, .05); box-shadow: var(--hk-frame); color: inherit; text-align: center; font: inherit; }
.hs-item:active { transform: scale(.97); }
.hs-art { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(230, 180, 70, .28), rgba(230, 180, 70, 0) 70%); }
.hs-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hs-art img + i { display: none; }
.hs-art i { color: var(--hk-gold-hi); font-style: normal; }
.hs-item b { font-size: 13px; line-height: 1.25; }
.hs-item small { font-size: 11px; color: var(--hk-text-2); }
.hs-item em { font-style: normal; font-size: 10.5px; color: var(--hk-cinnabar); }
.hs-item em.up { color: var(--hk-jade); }        /* you CAN outbid: that is a win */
.hs-item em.free { color: var(--hk-text-2); }   /* an empty slot is not */
.hs-preview { display: block; width: 100%; height: auto; border-radius: 12px; margin: 8px 0; }
.hs-presets, .hs-emoji { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.hs-presets button { border: 0; border-radius: 99px; padding: 6px 12px; background: rgba(255, 246, 230, .08); color: inherit; font: inherit; font-size: 13px; }
.hs-presets button.is-on { background: var(--hk-gold-grad); color: #160021; font-weight: 800; }
.hs-emoji button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 246, 230, .06); font-size: 19px; }
.hs-text { width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; padding: 10px 12px; background: rgba(11, 0, 22, .6); color: #FFF6E6; font-size: 16px; outline: none; box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .35); }
.hs-cloths { display: flex; gap: 8px; margin: 8px 0; }
.hs-cloths button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 246, 230, .25); }
.hs-cloths button.is-on { box-shadow: 0 0 0 2px var(--hk-gold-hi), 0 0 12px rgba(230, 180, 70, .5); }
.hk-board-list li.is-me { box-shadow: inset 0 0 0 1.5px var(--hk-gold-hi); border-radius: 8px; }

/* v2 live — result card over the stage */
.hl-result { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; background: radial-gradient(circle at 50% 35%, rgba(66, 22, 88, .72), rgba(7, 0, 15, .9)); }
.hl-result[hidden] { display: none; }
.hl-result.pop .hl-res-card { animation: hl-res-in .5s cubic-bezier(.34, 1.4, .64, 1); }
@keyframes hl-res-in { from { transform: scale(.85); opacity: 0; } }
.hl-res-card { position: relative; width: 100%; max-height: 100%; overflow: auto; padding: 12px; border-radius: 16px; background: rgba(22, 0, 33, .92); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .45), 0 0 30px rgba(230, 180, 70, .25); text-align: center; }
.hl-res-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 246, 230, .08); color: #FFF6E6; display: grid; place-items: center; }
.hl-podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 6px; margin: 10px 0 6px; }
.hl-podium > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px 12px 4px 4px; background: rgba(255, 246, 230, .06); font-size: 13px; }
.hl-podium .p1 { order: 2; padding-top: 14px; background: linear-gradient(180deg, rgba(230, 180, 70, .35), rgba(230, 180, 70, .08)); box-shadow: inset 0 0 0 1px rgba(250, 220, 150, .6); }
.hl-podium .p2 { order: 1; }
.hl-podium .p3 { order: 3; }
.hl-podium .p1 b { font-size: 16px; color: var(--hk-gold-hi); }
.hl-res-mine { margin: 4px 0 8px; font-weight: 800; color: var(--hk-gold-hi); }
.hl-res-rest { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px 8px; font-size: 12px; text-align: left; }
.hl-res-rest li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.hl-res-rest em { font-style: normal; color: var(--hk-text-2); width: 16px; }
.hl-res-rest span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* v2 showcase (stable sheet + sponsor hero) */
.hs-stage { position: relative; aspect-ratio: 1.7; margin: 8px 0; border-radius: 14px; overflow: hidden; background: #160021; box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .25); }
.hs-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hk-show-btn { border: 0; border-radius: 99px; padding: 10px 12px; min-height: 40px; background: rgba(230, 180, 70, .16); color: var(--hk-gold-hi); font: inherit; font-size: 11.5px; display: inline-flex; align-items: center; gap: 3px; }

.hk-vchecks { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.hk-vchecks li { display: flex; align-items: center; gap: 6px; }
.hk-vchecks li.is-ok { color: var(--hk-jade, #3ECF8E); }
.hk-vchecks li.is-bad { color: var(--hk-cinnabar, #F27A6A); }

.hl-startcount { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; padding: 10px 22px; border-radius: 16px; background: rgba(22, 0, 33, .95); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .5), 0 0 30px rgba(230, 180, 70, .35); pointer-events: none; }
.hl-startcount[hidden] { display: none; }
.hl-startcount small { font-size: 13px; font-weight: 800; color: var(--hk-gold); letter-spacing: .1em; }
.hl-startcount b { font-size: 44px; font-weight: 900; line-height: 1; color: #FFF6E6; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(230, 180, 70, .6); }

/* v2 live — audit fixes */
.hl-tapcue { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: linear-gradient(90deg, #F27A6A, #E6B446); color: #160021; font-weight: 900; font-size: 15px; box-shadow: 0 0 20px rgba(242, 122, 106, .6); animation: hl-cue 0.9s ease-in-out infinite; pointer-events: none; }
.hl-tapcue[hidden] { display: none; }
.hl-tapcue b { font-variant-numeric: tabular-nums; background: rgba(22, 0, 33, .85); color: #FADC96; padding: 1px 8px; border-radius: 99px; }
@keyframes hl-cue { 50% { transform: translateX(-50%) scale(1.07); } }
.hl-charge { height: 10px; }
.hr-live.is-over { background: rgba(255, 246, 230, .14); color: #FFF6E6; animation: none; }
.hl-count-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.hl-count-wrap small { font-size: 11px; color: var(--hk-text-2); }
.hl-moods li.is-mine { border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--hk-gold-hi); background: rgba(230, 180, 70, .12); padding: 0 4px; }
.hl-odds-note { margin: 6px 0 0; font-size: 11.5px; }
/* The three calls to action are the POINT of the pre-race panel, and the
   panel is only as tall as the stage — at 360x640 its content is 364 px in a
   320 px box, so the buttons were sliced through the middle of their own
   labels. Pin them to the bottom and let the horse list scroll behind. */
.hl-howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px;
  position: sticky; bottom: -10px; padding: 10px 0; z-index: 2;
  background: linear-gradient(180deg, rgba(7, 0, 15, 0), rgba(7, 0, 15, 1) 16%); }
.hl-howto span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; background: rgba(255, 246, 230, .06); color: var(--hk-gold-hi); text-align: center; }
.hl-howto b { font-size: 12.5px; color: #FFF6E6; }
.hl-howto small { font-size: 10.5px; color: var(--hk-text-2); }
.hl-chat-log:empty::before { content: attr(data-empty); color: var(--hk-text-2); font-size: 12.5px; }
.hl-top .hl-chip { overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 34vw; }

.hs-item em { color: var(--hk-text-2); }
.hs-count { display: block; margin-top: 4px; font-size: 11.5px; color: var(--hk-text-2); text-align: right; }
.hs-count.is-over { color: var(--hk-cinnabar); font-weight: 800; }
.hs-sheet .hk-quote { grid-template-columns: 1fr 1fr; }
.hk-pick.is-ghost { background: transparent; color: var(--hk-gold-hi); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .55); }

.hl-howto a, .hl-howto span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; background: rgba(255, 246, 230, .06); color: var(--hk-gold-hi); text-align: center; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .3); }
.hl-howto a.is-cta { background: var(--hk-gold-grad); color: #160021; }
.hl-howto a.is-cta b, .hl-howto a.is-cta small { color: #160021; }
.hl-pad-head { align-items: flex-start; }
.hl-count-wrap { gap: 0; }

/* Number plates in the operator's design language: black ink outline, gold rim
   (Design/全民马王 sheets — the caparison and browband plates). */
.hk-silk {
  box-shadow: inset 0 0 0 1.5px rgba(230, 180, 70, .95), inset 0 0 0 3px rgba(11, 0, 22, .9), 0 2px 6px rgba(0, 0, 0, .45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}

/* =========================================================================
   培育 (#/horse/care) — the stable room: your horse, full screen
   ========================================================================= */
.hc-page {
  position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, #3a1030, #12030f 70%);
  color: #FFF6E6; padding-top: var(--content-top, var(--safe-top, 0px));
  --hk-gold: #E6B446; --hk-gold-hi: #FADC96; --hk-gold-grad: linear-gradient(160deg, #FADC96, #E6B446 45%, #BE8C50);
  --hk-frame: inset 0 0 0 1px rgba(230, 180, 70, .18); --hk-text-2: #e4cdb9; --hk-jade: #3ECF8E; --hk-cinnabar: #F27A6A;
}
.hc-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.hc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.hc-title small { font-size: 10.5px; letter-spacing: .18em; color: var(--hk-gold); font-weight: 800; }
.hc-title b { font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.hc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(255, 246, 230, .08); color: var(--hk-gold-hi); text-decoration: none; }

/* The stall. Six flat layers of CSS, no images: a timber back wall under a
   hanging lantern, a night window, a straw floor in perspective, the two posts
   and rail of the stall front, and a water trough. The horse (canvas) stands
   between the floor and the rail, so the stall reads as a box you look into
   rather than a horse pasted on a gradient. */
.hc-stage { position: relative; flex: 1 1 auto; min-height: 180px; margin: 0 8px; border-radius: 18px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: #140410;
  box-shadow: var(--hk-frame), 0 10px 30px rgba(0, 0, 0, .5); }
.hc-scene { position: absolute; inset: 0; z-index: 0; }
.hc-scene i { position: absolute; display: block; }
.hc-wall { inset: 0 0 32% 0;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 1px, rgba(0, 0, 0, 0) 1px 34px),
    repeating-linear-gradient(90deg, #4a2a23 0 34px, #43251f 34px 68px),
    linear-gradient(180deg, #2c1512, #4a2a23); }
.hc-wall::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 90% at 50% 8%, rgba(255, 210, 140, .30), rgba(20, 4, 16, .0) 62%), linear-gradient(180deg, rgba(20, 4, 16, .1), rgba(20, 4, 16, .55)); }
.hc-beam { left: 0; right: 0; top: 0; height: 9%; background: linear-gradient(180deg, #23100f, #3a1d17); box-shadow: 0 3px 10px rgba(0, 0, 0, .55); }
/* A hung lantern, not a floating ball: cord, silk body, gold cap and a pool of
   light on the straw under it. */
.hc-lamp { left: 50%; top: 7%; width: 30px; height: 40px; margin-left: -15px; border-radius: 50% 50% 46% 46% / 42% 42% 54% 54%;
  background: radial-gradient(circle at 38% 34%, #FFE9B0, #E8734F 46%, #B02F2F 78%);
  box-shadow: 0 0 44px 16px rgba(230, 140, 70, .30), inset -4px -3px 8px rgba(120, 20, 20, .5);
  animation: hc-flicker 4.5s ease-in-out infinite; }
.hc-lamp::before { content: ''; position: absolute; left: 50%; top: -9%; width: 2px; height: 999px; margin-left: -1px; transform: translateY(-100%);
  background: linear-gradient(180deg, rgba(230, 180, 70, .1), rgba(230, 180, 70, .55)); }
.hc-lamp::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 8px; margin-left: -5px; border-radius: 2px;
  background: linear-gradient(180deg, #E6B446, #BE8C50); }
@keyframes hc-flicker { 0%, 100% { opacity: .95; } 35% { opacity: .78; } 60% { opacity: 1; } }
/* Tack on the wall — the room has been lived in. */
.hc-wall::before { content: ''; position: absolute; left: 11%; top: 26%; width: 42px; height: 46px;
  border: 3px solid rgba(92, 53, 39, .9); border-radius: 50% 50% 46% 46%; border-top-color: rgba(120, 72, 40, .95);
  box-shadow: 30px 6px 0 -18px rgba(92, 53, 39, .85), 30px 22px 0 -18px rgba(92, 53, 39, .85); opacity: .85; }
.hc-window { right: 8%; top: 22%; width: 22%; height: 26%; border-radius: 6px;
  background: linear-gradient(180deg, #2a2a58, #171238);
  box-shadow: inset 0 0 0 3px #3a1d17, 0 0 24px rgba(120, 130, 220, .18); }
.hc-window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 47%, #3a1d17 47% 53%, transparent 53%), linear-gradient(180deg, transparent 47%, #3a1d17 47% 53%, transparent 53%); }
.hc-floor { left: -10%; right: -10%; bottom: 0; height: 34%;
  background: linear-gradient(180deg, #3a2417, #211008);
  box-shadow: 0 -8px 26px rgba(0, 0, 0, .55) inset; }
.hc-floor::after { content: ''; position: absolute; left: 22%; right: 22%; top: -6%; height: 70%; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 200, 120, .20), rgba(255, 200, 120, 0) 70%); }
.hc-straw { left: -10%; right: -10%; bottom: 0; height: 30%;
  background:
    repeating-linear-gradient(74deg, rgba(214, 168, 86, .30) 0 2px, rgba(214, 168, 86, 0) 2px 11px),
    repeating-linear-gradient(-68deg, rgba(180, 134, 64, .24) 0 2px, rgba(180, 134, 64, 0) 2px 14px);
  mask-image: linear-gradient(180deg, transparent, #000 45%); }
.hc-post { top: -2%; bottom: 0; width: 16px; background: linear-gradient(90deg, #23100f, #4a2a23 40%, #2c1512);
  box-shadow: 0 0 18px rgba(0, 0, 0, .6); }
.hc-post-l { left: 0; } .hc-post-r { right: 0; }
.hc-rail { left: 0; right: 0; bottom: 14%; height: 12px; background: linear-gradient(180deg, #5c3527, #2c1512);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5); z-index: 4; }
.hc-trough { left: 6%; bottom: 6%; width: 22%; height: 8%; border-radius: 4px 4px 7px 7px;
  background: linear-gradient(180deg, #5c3527, #33180f); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .5); z-index: 4; }
.hc-stage::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(78% 62% at 50% 52%, rgba(0, 0, 0, 0) 45%, rgba(8, 0, 8, .55)); }

/* 亲密度 — a ring in the corner. Cosmetic on purpose; the panel says so. */
.hc-bond { position: absolute; right: 10px; top: 10px; z-index: 6; width: 46px; height: 46px; pointer-events: none; }
.hc-bond > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hc-bond circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.hc-bond .bg { stroke: rgba(255, 246, 230, .14); }
.hc-bond .fg { stroke: var(--silk, #E6B446); transition: stroke-dashoffset .45s cubic-bezier(.22, .61, .36, 1); }
.hc-bond span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--hk-gold-hi); }
.hc-bond span b { font-size: 12px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.hc-bond.is-full { animation: hc-bondfull 1.2s ease-out; }
@keyframes hc-bondfull { 40% { transform: scale(1.18); } }

/* The horse is on its way in. The plate and its field are a few hundred KB, so
   a phone waits — and an empty stall reads as broken rather than busy. The ring
   counts real files, so it never sits at a number while something is loading. */
.hc-load { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  pointer-events: none; transition: opacity .4s ease;
  /* The stall behind is busy and every horse is a different colour, so the
     ring gets its own ground rather than competing with the art. */
  background: radial-gradient(60% 55% at 50% 48%, rgba(11, 0, 22, .78), rgba(11, 0, 22, .34) 70%, transparent); }
.hc-load[hidden] { display: none; }
.hc-load.is-done { opacity: 0; }
.hc-load > svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.hc-load circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.hc-load .bg { stroke: rgba(255, 246, 230, .14); }
.hc-load .fg { stroke: var(--hk-gold-hi, #FADC96); stroke-dasharray: 125.66; stroke-dashoffset: 125.66;
  transition: stroke-dashoffset .3s cubic-bezier(.22, .61, .36, 1); }
.hc-load b { position: absolute; top: 50%; transform: translateY(-58%); font-size: 13px; font-weight: 900;
  color: #FADC96; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); font-variant-numeric: tabular-nums; }
.hc-load small { font-size: 11.5px; color: #E8DCF2; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
@media (prefers-reduced-motion: reduce) { .hc-load .fg { transition: none; } }

/* What it says back. */
.hc-bubble { position: absolute; z-index: 6; max-width: 62%; transform: translate(-50%, -100%); padding: 7px 11px; border-radius: 13px 13px 13px 3px;
  background: rgba(18, 3, 15, .86); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .38), 0 6px 18px rgba(0, 0, 0, .5);
  font-size: 12.5px; line-height: 1.35; color: #FFF6E6; pointer-events: none; }
.hc-bubble[hidden] { display: none; }
.hc-bubble.pop { animation: hc-bub .32s cubic-bezier(.22, .61, .36, 1); }
@keyframes hc-bub { from { opacity: 0; transform: translate(-50%, -90%) scale(.88); } }

/* The hands: which one you are using when you touch the horse. */
.hc-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 8px 0; }
.hc-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 0; border-radius: 12px;
  background: rgba(255, 246, 230, .06); box-shadow: var(--hk-frame); color: var(--hk-text-2); font: inherit; font-size: 11px; font-weight: 700; }
.hc-tool.is-on { background: var(--hk-gold-grad); color: #160021; box-shadow: 0 3px 12px rgba(230, 180, 70, .3); }
.hc-tool:active { transform: scale(.96); }
.hc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 3; }
.hc-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.hc-fallback[hidden] { display: none; }
.hc-badges { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.hc-badge { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 99px; background: rgba(18, 3, 15, .72); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .45); }
.hc-badge.m0 { color: var(--hk-cinnabar); } .hc-badge.m1 { color: #f0a58f; }
.hc-badge.m3 { color: #9fe0bf; } .hc-badge.m4 { color: var(--hk-jade); }
.hc-hint { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; font-size: 12px; color: var(--hk-text-2); z-index: 2; pointer-events: none; }
.hc-hint.pop { animation: hc-pop .5s ease-out; }
@keyframes hc-pop { from { transform: scale(.85); opacity: .4; } }
.hc-float { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hc-pop { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font-size: 26px; font-weight: 900; color: var(--hk-gold-hi); text-shadow: 0 0 14px rgba(230, 180, 70, .8), 0 2px 3px #000; animation: hc-rise 1.4s cubic-bezier(.22, .61, .36, 1) forwards; }
.hc-pop.is-bonus { font-size: 18px; color: var(--hk-jade); }
@keyframes hc-rise { from { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 25% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); } to { opacity: 0; transform: translate(-50%, -70px) scale(1); } }

/* The page is fixed to the viewport, so the panel is what scrolls — with a full
   培育记录 under the tasks there is more here than fits a phone. */
.hc-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 10px 8px calc(10px + var(--safe-bottom, 0px)); }
.hc-cap { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--hk-text-2); }
.hc-cap-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(11, 0, 22, .6); overflow: hidden; box-shadow: var(--hk-frame); }
.hc-cap-bar i { display: block; height: 100%; background: var(--hk-gold-grad); transition: width .5s cubic-bezier(.22, .61, .36, 1); }
.hc-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hc-act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border: 0; border-radius: 14px; background: rgba(255, 246, 230, .06); box-shadow: var(--hk-frame); color: #FFF6E6; font: inherit; text-align: center; }
.hc-act i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--hk-gold-grad); color: #160021; box-shadow: 0 3px 10px rgba(230, 180, 70, .3); }
.hc-act b { font-size: 13px; }
.hc-act small { font-size: 12px; font-weight: 800; color: var(--hk-gold); }
.hc-act em { font-style: normal; font-size: 10.5px; color: var(--hk-text-2); }
.hc-act:active { transform: scale(.97); }
.hc-act.is-done { opacity: .55; }
.hc-act.is-done i { background: rgba(62, 207, 142, .22); color: var(--hk-jade); box-shadow: none; }
.hc-act.is-locked i { background: rgba(255, 246, 230, .1); color: var(--hk-text-2); box-shadow: none; }
.hc-streak { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--hk-text-2); }
.hc-dots { flex: 1; display: flex; gap: 5px; }
.hc-dots i { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 246, 230, .12); }
.hc-dots i.on { background: var(--hk-gold-grad); }
.hc-streak b { color: var(--hk-gold-hi); }
.hc-panel .hk-note { margin: 8px 0 0; font-size: 11.5px; }

.hk-care-cta { margin-top: 6px; padding: 7px 12px; font-size: 13px; }

/* Action notes are one short line; other locales are much longer than zh, and
   the panel must not squeeze the horse out of the stage. */
.hc-act em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
@media (max-width: 400px) { .hc-act em { display: none; } }
.hc-fallback { z-index: 0; }

/* The idle clips are about square; a tall stage left a third of it empty above
   the horse. Give the stage the clip's proportions and let the room breathe. */
.hc-stage { flex: 0 1 auto; aspect-ratio: 1.02; max-height: 56vh; }
.hc-page { justify-content: flex-start; }
.hc-panel { margin-top: 0; }   /* sits right under the stage; no gap in the middle */

.hc-log { margin-top: 10px; }
.hc-log h4 { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; font-size: 12.5px; color: var(--hk-gold); font-weight: 800; }
.hc-log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.hc-log li { display: flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 9px; background: rgba(255, 246, 230, .05); font-size: 12.5px; }
.hc-log li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-log li small { color: var(--hk-text-2); font-size: 11px; }
.hc-log li b { color: var(--hk-gold-hi); font-variant-numeric: tabular-nums; }

/* 今日培育 is a door, not a control panel: tapping anywhere opens the room. */
.hk-breed.is-door { display: block; text-decoration: none; color: inherit; }
.hk-breed.is-door:active { transform: scale(.995); }
.hk-breed .hk-card-head .hk-dim { display: inline-flex; align-items: center; gap: 2px; }
.hk-breed-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; }
.hk-breed-state { font-size: 13px; color: #FFF6E6; }
.hk-breed-streak { font-size: 12px; font-weight: 800; color: var(--hk-gold); white-space: nowrap; }
.hk-breed .hk-streak-dots { display: flex; gap: 5px; margin-top: 8px; }
.hk-breed .hk-streak-dots i { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 246, 230, .12); }
.hk-breed .hk-streak-dots i.on { background: var(--hk-gold-grad); }

/* Turn the horse: side / front / rear, from the operator's 三视图. Also a
   sideways drag across the stall. */
.hc-views { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 6; display: flex; gap: 4px;
  padding: 3px; border-radius: 99px; background: rgba(18, 3, 15, .72); box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .3); }
.hc-views[hidden] { display: none; }
.hc-view { border: 0; border-radius: 99px; padding: 5px 12px; background: transparent; color: var(--hk-text-2); font: inherit; font-size: 11.5px; font-weight: 700; }
.hc-view.is-on { background: var(--hk-gold-grad); color: #160021; }
.hc-view:active { transform: scale(.96); }
.hc-hint { bottom: 8px; }

/* ---------------------------------------------------------------- 直播 UI
   The commentary line and the chat are what a viewer looks at between
   furlongs, and they were a grey bar and a plain list. This is the broadcast
   lower-third treatment: a gold-rimmed panel with 解说牛牛 on a chip, and a
   chat that reads as a conversation rather than a log file. */
.hl-ticker {
  position: relative; margin: 8px 8px 0; padding: 8px 12px 8px 10px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(64, 20, 92, .96), rgba(32, 8, 48, .96));
  box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .38), 0 6px 18px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.hl-ticker::before {                       /* the gold edge light */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--hk-gold-grad);
}
.hl-ticker::after {                        /* a slow sheen across the panel */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 246, 230, .07) 50%, transparent 60%);
  transform: translateX(-60%); animation: hl-sheen 5.5s ease-in-out infinite;
}
@keyframes hl-sheen { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(160%); } }
.hl-mc {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 9px; border-radius: 99px; background: var(--hk-gold-grad); color: #160021;
  font-size: 11px; font-weight: 900; letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(230, 180, 70, .35);
}
.hl-ticker b { font-size: 14.5px; font-weight: 800; line-height: 1.3; color: #FFF6E6; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.hl-ticker b.pop { animation: hl-sayin .42s cubic-bezier(.22, 1.3, .5, 1); }
@keyframes hl-sayin { from { opacity: 0; transform: translateY(6px) scale(.97); } }

.hl-chat { border-radius: 14px; background: linear-gradient(180deg, rgba(44, 11, 66, .72), rgba(22, 0, 33, .72));
  box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .18), 0 6px 18px rgba(0, 0, 0, .35); }
.hl-chat-log { padding: 8px 10px; scrollbar-width: thin; }
.hl-chat-log p {
  margin: 0 0 5px; padding: 5px 10px; border-radius: 12px 12px 12px 4px;
  background: rgba(255, 246, 230, .07); box-shadow: inset 0 0 0 1px rgba(255, 246, 230, .05);
  animation: hl-chatin .28s ease-out;
}
.hl-chat-log p.is-me { background: linear-gradient(120deg, rgba(230, 180, 70, .26), rgba(230, 180, 70, .12));
  border-radius: 12px 12px 4px 12px; box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .3); }
.hl-chat-log p.is-sys { background: transparent; box-shadow: none; color: var(--hk-text-2); font-size: 12px; text-align: center; }
@keyframes hl-chatin { from { opacity: 0; transform: translateY(5px); } }
.hl-chat-log b { color: var(--hk-gold-hi); font-weight: 800; }
.hl-chat-log:empty::before { content: attr(data-empty); display: block; padding: 14px 4px; text-align: center; font-size: 12.5px; color: var(--hk-text-2); }
.hl-chat-form { padding: 7px; gap: 7px; border-top: 1px solid rgba(230, 180, 70, .14); }
.hl-chat-form input { border-radius: 99px; padding: 9px 14px; background: rgba(11, 0, 22, .72);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 230, .09); transition: box-shadow .18s; }
.hl-chat-form input:focus { box-shadow: inset 0 0 0 1px rgba(230, 180, 70, .6); }
.hl-chat-form button { border-radius: 99px; width: 40px; display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(230, 180, 70, .3); }
.hl-chat-form button:active { transform: scale(.94); }

/* ---------------------------------------------------- audit fixes, 1.84.0 */
/* The commentary line truncated mid-sentence in every non-Chinese locale —
   at 390 px the lozenge has 344 px and the English call needs 512. Let it
   wrap to two lines instead of eating the sentence. */
/* Let the line WRAP and the pill GROW. Clamping to two lines while leaving
   overflow visible was the worst of both: the browser drew the ellipsis at the
   end of line two AND painted line three over the track. English needs three
   lines in this box and Malay needs four; the pill can afford them. */
.hr-call, .hl-ticker b { white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; max-width: 100%; }
.hr-call { line-height: 1.3; }

/* The type ran about two steps small: muted text below 14px fails contrast on
   this palette, which the brand skill calls out by name. */
.hc-act em { font-size: 12px; }
.hc-tool { font-size: 12px; }
.hc-view { font-size: 12.5px; padding: 8px 14px; }      /* was a 32.7px pill */
.hk-note { font-size: 12.5px; }
.hs-item em { font-size: 12px; }

/* Tap targets. Every one of these was under the 44px floor. */
.hk-rules-btn { min-height: 44px; }
.hs-picker button { min-width: 44px; min-height: 44px; }
.hs-cloths button { min-width: 40px; min-height: 40px; }
.hs-emoji button { min-width: 44px; min-height: 44px; }
.hl-chat-form input { min-height: 44px; }
.hl-chat-form button { min-height: 44px; min-width: 44px; }

/* The task subtitles were hidden on exactly the phone width everyone uses, so
   nobody ever read them. They fit at two lines. */
@media (max-width: 400px) { .hc-act em { display: -webkit-box; } }

.hc-view { min-height: 40px; white-space: nowrap; }   /* at 360 px each label wrapped to one character per line */
.hr-back, .hc-top .hr-back { min-width: 40px; min-height: 40px; }

/* The odds column had no header anywhere, so a row of gold em-dashes meant
   nothing. Same grid as the row beneath it. */
.hk-colhead { display: grid; grid-template-columns: auto 1fr 76px 64px; gap: 10px; padding: 2px 10px 4px; }
.hk-colhead span { font-size: 11.5px; font-weight: 700; color: var(--hk-text-2); letter-spacing: .04em; }
.hk-colhead span:first-child { grid-column: 1 / span 2; }
.hk-colhead span:nth-child(2) { text-align: left; }
.hk-colhead span:last-child { text-align: right; }

/* An empty results board said nothing at all. */
.hr-empty { margin: 10px 8px; padding: 14px 12px; border-radius: 12px; text-align: center;
  background: rgba(255, 246, 230, .05); box-shadow: var(--hk-frame);
  font-size: 13px; line-height: 1.6; color: var(--hk-text-2); }

/* Between races the live panel was a countdown alone in a large black box. */
.hl-pad-acts { display: flex; gap: 8px; margin-top: 12px; }
.hl-pad-acts .btn { flex: 1; min-height: 44px; display: grid; place-items: center; text-decoration: none; }
.hl-pad-tip { margin-top: 10px; font-size: 12.5px; color: var(--hk-text-2); }

/* ---- 马匹战绩: every horse's permanent record (2026-10-15) ---- */
.hk-form { display: inline-flex; gap: 3px; vertical-align: -2px; }
.hk-form i { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--hk-text-2); background: rgba(255, 255, 255, .08); }
.hk-form i.r1 { color: #160021; background: linear-gradient(160deg, #FADC96, #E6B446 50%, #BE8C50); }
.hk-form i.r2 { color: #160021; background: linear-gradient(160deg, #f4f4f6, #b0bec5 50%, #7d8a91); }
.hk-form i.r3 { color: #160021; background: linear-gradient(160deg, #f0b98a, #c47a45 50%, #8a4f26); }
.hk-form em { font-style: normal; color: var(--hk-text-2); }
.hk-recs { display: grid; gap: 10px; }
.hk-rec { display: block; width: 100%; text-align: left; color: inherit; font: inherit; border: 0; cursor: pointer; }
.hk-rec.is-detail { cursor: default; }
.hk-rec-head { display: flex; align-items: center; gap: 10px; }
.hk-rec-head b { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--hk-gold-hi); }
.hk-rec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 8px; }
.hk-rec-stats span { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.hk-rec-stats small { font-size: 11px; color: var(--hk-text-2); }
.hk-rec-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hk-rec-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--hk-text-2); }
.hk-rec-back { margin: 4px 0 8px; display: inline-flex; align-items: center; gap: 4px; }
.hk-rec-cols, .hk-rec-list li { display: grid; grid-template-columns: 1fr 44px 64px 56px 48px; gap: 6px; align-items: center; }
.hk-rec-cols { padding: 10px 10px 4px; font-size: 11px; color: var(--hk-text-2); }
.hk-rec-list { list-style: none; margin: 0; padding: 0 10px; }
.hk-rec-list li { padding: 8px 0; border-top: 1px solid rgba(230, 180, 70, .08); font-size: 13px; font-variant-numeric: tabular-nums; }
.hk-rec-list li > span:first-child small { display: block; font-size: 10.5px; color: var(--hk-text-2); }
.hk-rec-list li.hk-note { display: block; }
.hk-rec-more { display: block; width: calc(100% - 20px); margin: 10px auto; }
.hk-row-odds small.hk-recodds { color: var(--hk-gold-hi); font-weight: 600; }
