body.page-stable {
  --bg: #121212;
  --surface: #1a1a1a;
  --nav: #161616;
  --ink: #f4efe4;
  --body: #f4efe4;
  --muted: #b3ab9a;
  --line: #3a3428;
  --primary: #d4af37;
  --primary-dark: #f0d78c;
  --fill: #005a36;
  --fill-hover: #08784a;
  --on-accent: #f3fff8;
  --chip: #242018;
  --hover: #241f16;
  --disabled: #6d675c;
  --hero-muted: #d4af37;
  --ty-gold: #d4af37;
  --ty-green: #005a36;
  --ty-silver: #d5dbe3;
  --ty-bronze: #c4844a;
  color-scheme: dark;
  background: #121212;
  color: #f4efe4;
}

body.page-stable .appbar,
body.page-stable .tabbar {
  background: #161616;
  color: #f4efe4;
  border-color: #3a3428;
}

.page-stable .page-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-stable .page-scroll > main {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 1120px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.4rem 0.7rem calc(var(--tabbar-h) + 0.3rem);
  margin: 0 auto;
}

.ty-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
  line-height: 1.35;
  font-size: 0.92rem;
}

.ty-num {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.ty-status {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name cash"
    "id amt"
    "pts worth"
    "next net";
  column-gap: 0.55rem;
  row-gap: 0.62rem;
  align-items: center;
  line-height: 1.3;
  padding: 0.46rem 0.55rem 0.48rem;
  border: 1px solid #3a3428;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgb(212 175 55 / 0.08), transparent 70%),
    #181818;
}

.ty-brand-name,
.ty-brand input {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ty-brand-name { grid-area: name; cursor: pointer; justify-self: start; }

.ty-brand input {
  width: 11rem;
  border-bottom: 1px solid var(--ty-gold);
  border-radius: 0;
  outline: none;
}

.ty-brand-no {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.ty-brand-no:nth-of-type(1) { grid-area: id; }
.ty-brand-no:nth-of-type(2) { grid-area: pts; }

.ty-back,
.ty-mini {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ty-next {
  grid-area: next;
  justify-self: start;
  min-width: 0;
  color: #f3e2b0;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
}

.ty-money {
  margin: 0;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  line-height: 1.3;
}

.ty-cash { grid-area: cash; }
.ty-cash-amt { grid-area: amt; }
.ty-worth { grid-area: worth; }
.ty-worth-amt { grid-area: net; }

.ty-cash,
.ty-worth,
.ty-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.ty-cash-amt,
.ty-worth-amt {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ty-gold);
}

.ty-back {
  color: var(--ty-gold);
  text-decoration: none;
}

.ty-mini,
.ty-tabs button,
.ty-filters button,
.ty-card button,
.ty-lot button,
.ty-row button,
.ty-result button,
.ty-pop button,
.ty-full button,
.ty-sheet button,
.ty-ad button,
.ty-rank button,
.ty-ticker button,
.ty-switch button,
.ty-dots button {
  appearance: none;
  border: 1px solid #4a4336;
  background: #242424;
  color: inherit;
  font: inherit;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
}

.ty-mini {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.ty-mini:disabled,
.ty-card button:disabled,
.ty-lot button:disabled,
.ty-sheet button:disabled,
.ty-ad button:disabled {
  opacity: 0.45;
  cursor: default;
}

.ty-footbar .ty-foot {
  appearance: none;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.28rem 0.2rem 0.22rem;
  cursor: pointer;
}
.ty-footbar .ty-foot.on {
  color: var(--ty-gold);
}
.ty-foot.is-off,
.ty-login.is-off {
  display: none !important;
}
.ty-login {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 0.8rem 0.8rem calc(var(--tabbar-h) + 0.7rem);
}
.ty-login-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 0.66);
  cursor: pointer;
}
.ty-login-card {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  max-height: calc(100dvh - var(--tabbar-h) - 1.6rem);
  overflow: auto;
  padding: 0.85rem 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid #c6a15a;
  background: #121212;
  box-shadow:
    inset 0 0 0 1px rgb(212 175 55 / 0.22),
    0 18px 40px rgb(0 0 0 / 0.45);
}
.ty-login-x {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.5);
  color: #ffe9a6;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.ty-login-prompt {
  appearance: none;
  border: 1px solid #c6a15a;
  border-radius: 12px;
  background: rgb(212 175 55 / 0.14);
  color: #ffe9a6;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.ty-status .ty-login-prompt {
  grid-column: 2;
  grid-row: 1 / span 4;
  justify-self: end;
  align-self: center;
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
}
.ty-cap .ty-login-prompt,
.ty-week .ty-login-prompt {
  display: inline-flex;
  margin: 0.35rem 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.86rem;
}
.ty-gate {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ty-gate-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #c6a15a;
  box-shadow:
    inset 0 0 0 1px rgb(212 175 55 / 0.28),
    0 10px 22px rgb(0 0 0 / 0.28);
}
.ty-gate-hero img {
  display: block;
  width: 100%;
  height: 8.6rem;
  object-fit: cover;
  object-position: center 46%;
}
.ty-gate-hero strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.4rem 1rem 0.95rem;
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: #ffe9a6;
  text-shadow: 0 1px 0 rgb(20 12 0 / 0.45);
  background: linear-gradient(180deg, transparent, rgb(7 31 24 / 0.9) 58%, #071f18);
}
.ty-gate-form {
  display: grid;
  gap: 0.7rem;
}
.ty-gate-form button,
.ty-gate-form input {
  font: inherit;
}
.ty-gate-or {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
.ty-gate-form label {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.ty-gate-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #4a4336;
  background: #1a1a1a;
  color: var(--ink);
}
.ty-gate-form input:focus {
  outline: none;
  border-color: var(--ty-gold);
}
#login-google,
.ty-gate-actions button {
  appearance: none;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}
#login-google {
  border: 1px solid #e4c56a;
  color: #ffe9a6;
  background:
    radial-gradient(circle at 8% 120%, rgb(240 205 110 / 0.28), transparent 44%),
    linear-gradient(168deg, #1a7a5c 0%, #0e4632 52%, #081c16 100%);
  box-shadow: inset 0 1px 0 rgb(255 228 160 / 0.28);
}
.ty-gate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
#login-submit {
  border: 0;
  background: var(--ty-green);
  color: #f3fff8;
}
#login-register {
  border: 1px solid #4a4336;
  background: transparent;
  color: var(--ink);
}
.ty-gate-err {
  margin: 0;
  color: #e7b3a0;
  font-size: 0.82rem;
}
.ty-gate-err[hidden] {
  display: none;
}
.ty-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.ty-tabs button {
  padding: 0.38rem 0.2rem;
  background: transparent;
  color: var(--muted);
}

.ty-tabs button[aria-selected="true"] {
  color: #f3fff8;
  background: var(--ty-green);
  border-color: transparent;
}

.ty-hint {
  flex: 0 0 auto;
  margin: 0;
  min-height: 1.15em;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ty-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
}

.ty-carousel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ty-carousel::-webkit-scrollbar { display: none; }

.ty-card {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 0.75rem 0.65rem;
  border-radius: 14px;
  border: 1px solid #5c6370;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 7px, rgb(255 255 255 / 0.03) 7px, rgb(255 255 255 / 0.03) 8px),
    linear-gradient(180deg, #2c2f34, #171717);
  color: #e8eaee;
}

.ty-card .tier {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.ty-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.ty-card .meta {
  display: grid;
  gap: 0.12rem;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.78rem;
}

.ty-card .ty-actions {
  margin-top: auto;
  display: grid;
  gap: 0.35rem;
}

.ty-card button,
.ty-lot .ty-buy,
.ty-pop .is-go,
.ty-full .is-go,
.ty-sheet .is-go,
.ty-ad .is-go {
  padding: 0.48rem 0.6rem;
}

.ty-card .is-go,
.ty-lot .ty-buy,
.ty-pop .is-go,
.ty-full .is-go,
.ty-sheet .is-go,
.ty-ad .is-go {
  background: var(--ty-green);
  border-color: transparent;
  color: #f3fff8;
}

.ty-live {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: #8dffc6;
  font-size: 0.75rem;
  font-weight: 800;
}

.ty-live i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #1faa6a;
  box-shadow: 0 0 8px #1faa6a;
  animation: ty-blink 1.2s ease-in-out infinite;
}

.ty-card.sr {
  background: linear-gradient(165deg, #4b525c, #141414 58%, #2a2e34);
  border-color: var(--ty-silver);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
  color: #f7f8fb;
}

.ty-card.ar {
  background: linear-gradient(165deg, #3a2e24, #14110e 60%, #2a2118);
  border-color: var(--ty-bronze);
  color: #f6e7d4;
}

.ty-card.ssr {
  background:
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgb(212 175 55 / 0.07) 2px, rgb(212 175 55 / 0.07) 3px),
    linear-gradient(160deg, #241e10, #070707 52%, #1a150c);
  border: 1px solid var(--ty-gold);
  color: #f8e7b0;
  box-shadow: 0 0 0 1px #6e5820, 0 0 22px rgb(212 175 55 / 0.28);
}

.ty-card.ssr::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 36%, rgb(255 236 170 / 0.28) 50%, transparent 64%);
  background-size: 220% 100%;
  animation: ty-holo 3.4s linear infinite;
  pointer-events: none;
}

.ty-card.ssr .tier { color: #ffe08a; }

.ty-card button { position: relative; z-index: 1; }

.ty-dots {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.ty-dots button {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border-radius: 50%;
  background: #3a3428;
}

.ty-dots button.on {
  background: var(--ty-gold);
}

.ty-clock {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: #10281d;
  color: #b7ffd8;
  font-weight: 800;
  font-size: 0.82rem;
}

.ty-clock.is-lock {
  background: #2a2418;
  color: var(--ty-gold);
}

.ty-filters {
  flex: 0 0 auto;
  display: flex;
  gap: 0.3rem;
}

.ty-filters button {
  flex: 1 1 0;
  padding: 0.28rem 0.2rem;
  font-size: 0.75rem;
  background: transparent;
  color: var(--muted);
}

.ty-filters button.on {
  color: #f4efe4;
  border-color: var(--ty-gold);
  background: rgb(212 175 55 / 0.12);
}

.ty-market {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.22rem;
}

.ty-lot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem;
  align-items: center;
  padding: 0.16rem 0.28rem;
  border-radius: 10px;
  border: 1px solid #3a3428;
  background: #1b1b1b;
}

.ty-lot.ssr { border-color: var(--ty-gold); box-shadow: inset 3px 0 0 var(--ty-gold); }
.ty-lot.sr { border-color: #8d93a0; box-shadow: inset 3px 0 0 var(--ty-silver); }
.ty-lot.ar { box-shadow: inset 3px 0 0 var(--ty-bronze); }
.ty-lot.r { box-shadow: inset 3px 0 0 #6d7480; }
.ty-lot.n { box-shadow: inset 3px 0 0 #4d6b58; }

.ty-lot-main {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
  padding: 0.15rem 0.25rem;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  font-weight: 600;
}

.ty-lot-line,
.ty-lot-sub {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}

.ty-lot-line { align-items: center; }

.ty-coat {
  position: relative;
  display: inline-block;
  width: 1.72rem;
  height: 1.5rem;
  flex: 0 0 auto;
}

.ty-lot-line .ty-coat::before,
.ty-coat-body,
.ty-coat-ink {
  position: absolute;
  inset: 0;
  display: block;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}

.ty-lot-line .ty-coat::before {
  content: "";
  inset: -1px;
  background: #fff;
  -webkit-mask-image: url("/coat/horse-body.svg?v=flag1");
  mask-image: url("/coat/horse-body.svg?v=flag1");
}

.ty-coat-body {
  background: var(--coat, #8d7358);
  -webkit-mask-image: url("/coat/horse-body.svg?v=flag1");
  mask-image: url("/coat/horse-body.svg?v=flag1");
}

.ty-coat-ink {
  background: var(--ink, #243038);
  -webkit-mask-image: url("/coat/horse-dark.svg?v=flag1");
  mask-image: url("/coat/horse-dark.svg?v=flag1");
}

.ty-coat.is-lg {
  width: 5.05rem;
  height: 4.4rem;
}

.ty-zone-mid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ty-lot-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ty-lot-line .ty-num { margin-left: auto; color: var(--ty-gold); font-size: 0.82rem; }

.ty-lot-sub {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: normal;
}

.ty-tier {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ty-out {
  color: var(--ty-gold);
  font-size: 0.62rem;
  font-weight: 700;
}

.ty-cap {
  margin: 0.15rem 0 0.45rem;
}

.ty-lot .ty-buy {
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 0.38rem 0.45rem;
}

.ty-switch {
  flex: 0 0 auto;
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.ty-switch::-webkit-scrollbar { display: none; }

.ty-switch button {
  flex: 0 0 auto;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  background: transparent;
  color: var(--muted);
}

.ty-switch button.on {
  color: #1a1408;
  background: var(--ty-gold);
  border-color: transparent;
}

.ty-dossier {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 0.15rem 0.05rem 0.2rem;
}

.ty-dossier h3 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  line-height: 1.1;
}

.ty-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.ty-rating {
  margin-left: auto;
  font-size: 1.05rem;
  color: var(--ty-gold);
}

.ty-medals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ty-medal {
  border: 1px solid #6a5a32;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  color: #f0d78c;
  background: linear-gradient(180deg, #3a301c, #221c12);
}

.ty-price-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ty-price-row .ty-num { font-size: 1.2rem; color: var(--ty-gold); }

.ty-info {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  padding: 0;
}

.ty-ledger {
  display: grid;
  gap: 0.18rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #101010;
  border: 1px solid #3a3428;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
}

.ty-ledger p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.ty-ledger .sum {
  border-top: 1px solid #3a3428;
  padding-top: 0.2rem;
  color: var(--ty-gold);
}

.ty-moves p {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  align-items: baseline;
}

.ty-moves p.ty-quiet {
  display: block;
  grid-column: 1 / -1;
}

.ty-moves em {
  font-style: normal;
  color: var(--ty-muted, #8b97a8);
}

.ty-moves em.is-up { color: #3dff8a; }
.ty-moves em.is-down { color: #ff8d8d; }

.ty-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.ty-chip {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
  font-size: 0.82rem;
}

.ty-chip.p1 { background: var(--ty-gold); color: #1a1408; }
.ty-chip.p2 { background: var(--ty-silver); color: #1c1c1c; }
.ty-chip.p3 { background: var(--ty-bronze); color: #1c120c; }
.ty-chip.p4 { background: var(--ty-green); color: #f3fff8; }
.ty-chip.out { background: #3a3a3a; color: #bdbdbd; }

.ty-quiet { margin: 0; color: var(--muted); font-size: 0.78rem; }

.ty-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
}

.ty-copy {
  width: 100%;
  resize: none;
  border-radius: 8px;
  border: 1px solid var(--ty-gold);
  background: #101010;
  color: inherit;
  font: inherit;
  padding: 0.35rem 0.45rem;
}

.ty-owners,
.ty-forbes,
.ty-entry,
.ty-board-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.ty-entry-slot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 1px solid #4a4336;
  border-radius: 10px;
  background: #17140f;
}

.ty-entry-slot strong,
.ty-entry-slot span { display: block; }

.ty-entry-slot.is-lock { opacity: 0.72; }

.ty-entry-actions {
  display: flex;
  gap: 0.3rem;
}

.ty-entry-actions button,
.ty-dock button {
  appearance: none;
  border: 1px solid #4a4336;
  background: #242424;
  color: inherit;
  font: inherit;
  font-weight: 700;
  border-radius: 9px;
  padding: 0.45rem 0.7rem;
}

.ty-dock {
  position: fixed;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: var(--tabbar-h);
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem 0.45rem;
  background: linear-gradient(transparent, #121212 28%);
}

.ty-dock button:first-child { flex: 1 1 auto; }

.ty-dock .is-go {
  background: var(--ty-green);
  color: #f3fff8;
  border-color: transparent;
}

.ty-dock button:last-child { flex: 0 0 4.6rem; }

.ty-ticker {
  flex: 0 0 auto;
  display: grid;
  gap: 0.25rem;
}

.ty-ticker button,
.ty-rank {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.38rem 0.5rem;
  background: #17140f;
  border-color: #4a3d22;
}

.ty-owner-block { display: grid; gap: 0.4rem; }
.ty-owner-block h2 {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.ty-rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.ty-friend-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}
.ty-friend-add input,
.ty-friend-add button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #4a3d22;
  background: #17140f;
  color: inherit;
  padding: 0.45rem 0.6rem;
}
.ty-friend-board {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: stretch;
}
.ty-friend-chip {
  flex-grow: var(--term-flex, 1);
  flex-shrink: 0;
  flex-basis: auto;
  min-width: max-content;
  max-width: 100%;
  margin: 0;
  appearance: none;
  font: inherit;
  font-weight: 700;
  text-align: center;
  color: inherit;
  background: #17140f;
  border: 1px solid #6a5230;
  border-radius: 10px;
  padding: 0.42rem 0.7rem;
  white-space: nowrap;
  cursor: pointer;
}
.ty-rank {
  align-items: center;
  background: transparent;
}

.ty-rank.is-champ {
  border-color: var(--ty-gold);
  background: linear-gradient(90deg, rgb(212 175 55 / 0.16), transparent 62%);
  box-shadow: inset 0 0 0 1px rgb(212 175 55 / 0.35);
}

.ty-rank b { font-weight: 700; }

.ty-crown {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.02rem 0.3rem;
  border-radius: 999px;
  background: var(--ty-gold);
  color: #1a1408;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.ty-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  border: 0;
  z-index: 4;
}

.ty-pop {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(92%, 22rem);
  max-height: 70%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.8rem 0.7rem;
  border-radius: 16px;
  background: #1c1c1c;
  border: 1px solid var(--ty-gold);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
}

.ty-pop h3,
.ty-pop p { margin: 0; }

.ty-pop input[name="stableName"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border: 1px solid #4a4336;
  border-radius: 10px;
  background: #17140f;
  color: inherit;
  font: inherit;
}

.ty-pop .ty-actions { display: grid; gap: 0.35rem; }

.ty-sheet {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 22rem);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem 0.75rem;
  background: #1c1c1c;
  border-left: 1px solid var(--ty-gold);
  box-shadow: -12px 0 30px rgb(0 0 0 / 0.35);
}

.ty-sheet h3 { margin: 0; font-size: 1.15rem; }
.ty-sheet p { margin: 0; }
.ty-pop .warn,
.ty-sheet .warn { color: #ffb4b4; }
.ty-sheet .ty-actions { margin-top: auto; display: grid; gap: 0.35rem; }

.ty-ad {
  flex: 0 0 auto;
  display: grid;
  gap: 0.28rem;
  padding: 0.4rem 0.5rem;
  border-radius: 12px;
  border: 1px solid #1f6b45;
  background: #10281d;
}

.ty-ad button.is-wide { width: 100%; padding: 0.45rem 0.5rem; }

.ty-ad-track {
  height: 0.28rem;
  border-radius: 99px;
  background: #243028;
  overflow: hidden;
}

.ty-ad-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ty-gold);
}

.ty-shell.ty-flash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background:
    radial-gradient(circle at 20% 80%, rgb(212 175 55 / 0.55), transparent 18%),
    radial-gradient(circle at 70% 30%, rgb(240 215 140 / 0.4), transparent 16%);
  animation: ty-coins 0.7s ease-out forwards;
}

.ty-count {
  margin: 0;
  color: var(--ty-gold);
  font-size: 0.78rem;
}

.ty-banner {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
}

.ty-wait {
  display: grid;
  gap: 0.45rem;
  align-content: center;
  min-height: 12rem;
  text-align: center;
}

.ty-wait strong {
  color: var(--ty-gold);
  font-size: 1.35rem;
}

.ty-wait-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ty-rows {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  overflow: auto;
  padding-bottom: 3.2rem;
}

.ty-row {
  position: relative;
  display: grid;
  grid-template-columns: 32% 36% 32%;
  min-height: 8.8rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #6a5238;
  background-color: #24180f;
  background-position: center 42%;
  background-size: cover;
  box-shadow: inset 0 22px 36px rgb(255 214 140 / 0.14);
}

.ty-row.ssr,
.ty-row.sr,
.ty-row.ar,
.ty-row.r,
.ty-row.n { border-width: 2px; }

.ty-row.ssr { border-color: var(--ty-gold); }
.ty-row.sr { border-color: var(--ty-silver); }
.ty-row.ar { border-color: var(--ty-bronze); }
.ty-row.r { border-color: #9aa3b2; }
.ty-row.n { border-color: #7dcea0; }

.ty-row::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1.1rem;
  background: linear-gradient(180deg, transparent, rgb(48 92 28 / 0.45));
  pointer-events: none;
}

.ty-zone {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ty-zone-left,
.ty-zone-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.45rem 0.35rem 0.7rem;
}

.ty-zone-left {
  background: linear-gradient(90deg, rgb(18 12 6 / 0.82), rgb(18 12 6 / 0.08));
}

.ty-zone-right {
  align-items: stretch;
  justify-content: center;
  gap: 0.28rem;
  padding-right: 0.45rem;
  background: linear-gradient(270deg, rgb(18 12 6 / 0.82), rgb(18 12 6 / 0.05));
}

.ty-zone-left strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.ty-quiet {
  color: #d5cbbd;
  font-size: 0.66rem;
  line-height: 1.25;
}

.ty-badge {
  align-self: flex-start;
  padding: 0.04rem 0.38rem;
  border-radius: 999px;
  background: #3a3328;
  color: #f4efe4;
  font-size: 0.62rem;
  font-weight: 700;
}

.ty-rent-note { margin: 0.2rem 0 0; }

.ty-pct {
  display: inline-block;
  margin: 0 0.35rem 0.15rem 0;
  padding: 0.04rem 0.38rem;
  border-radius: 999px;
  background: #14663a;
  color: #f4fff8;
  font-size: 0.72rem;
  font-weight: 800;
}

.ty-row.is-rent:not(.ssr):not(.sr):not(.ar):not(.r):not(.n) { box-shadow: inset 0 0 0 2px rgb(57 163 106 / 0.8); }

.ty-row button:disabled { opacity: 0.72; }

.ty-badge.is-green { background: #14663a; }
.ty-badge.is-blue { background: #1d4e89; }
.ty-badge.is-gold { background: #8a6a1f; color: #fff8e4; }

.ty-row button {
  width: 100%;
  padding: 0.38rem 0.2rem;
  font-size: 0.66rem;
  line-height: 1.2;
}

.ty-row .ty-login-prompt {
  border-color: #c6a15a;
  background: rgb(212 175 55 / 0.16);
  color: #ffe9a6;
  letter-spacing: 0.06em;
}

.ty-row .is-green { background: #0c6b3c; color: #f4fff8; border-color: #39a36a; }
.ty-row .is-blue { background: #1d4e89; color: #f4f8ff; border-color: #5b90d0; }
.ty-row .is-go { background: #8a6a1f; color: #fff8e4; border-color: #e2c36a; }
.ty-row .is-quiet { background: #3a3a3a; color: #c8c2b4; border-color: #5a5a5a; }

.ty-row .is-hkd {
  color: #1a1408;
  border-color: #ffe7a3;
  background: linear-gradient(110deg, #8a6410 0%, #ffe08a 42%, #fff6cf 50%, #ffe08a 58%, #8a6410 100%);
  background-size: 220% 100%;
  animation: ty-shine 2.2s linear infinite;
}

.ty-full {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem 1rem 1.2rem;
  overflow: auto;
  color: #f6f1e6;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(255 214 120 / 0.18), transparent 42%),
    #14110c;
}

.ty-full h2,
.ty-full p { margin: 0; }

.ty-full-close { align-self: flex-end; padding: 0.35rem 0.7rem; }

.ty-full .ty-actions { margin-top: auto; }

.ty-full .ty-actions button { width: 100%; }

.ty-journal {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  overflow: auto;
  padding-bottom: 0.4rem;
}

.ty-week {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.8rem 0.7rem;
  border-radius: 16px;
  border: 1px solid #6a5230;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(255 214 120 / 0.22), transparent 58%),
    #1a140c;
}

.ty-week-prize {
  font-size: 1.55rem;
  line-height: 1.15;
}

.ty-week-prize.is-up,
.ty-prize-num.is-up { color: #f0d78c; }

.ty-week-prize.is-down,
.ty-week-prize.is-wait,
.ty-prize-num.is-flat,
.ty-place.is-dim { color: #8d887f; }

.ty-week-amm,
.ty-week-record { margin: 0; font-size: 0.78rem; }

.ty-amm-up { color: #3dff8a; }

.ty-amm-down { color: #ff4d4d; }

.ty-result {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem 0.7rem 0.6rem;
  border-radius: 16px;
  border: 1px solid #3a3328;
  background: #14110c;
}

.ty-result.is-temp5 { border-color: #1d8a52; background: #102218; }
.ty-result.is-temp4 { border-color: #3d74b8; background: #101824; }
.ty-result.is-real {
  border-color: #c6a15a;
  background: linear-gradient(180deg, #2a2214, #120e0a);
}
.ty-result.is-loss { border-color: #3a3a3a; background: #161616; }

.ty-result-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  color: #c8bfb0;
  font-size: 0.68rem;
}

.ty-result-horse {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ty-result-horse .ty-coat {
  width: 58px;
  height: 50px;
}

.ty-result-horse strong { font-size: 1.05rem; }

.ty-place {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #f0d78c;
}

.ty-result p { margin: 0; }

.ty-lock-note { color: #8d887f; font-size: 0.75rem; }

.ty-place.is-stamp,
.ty-prize-num.is-stamp {
  display: inline-block;
  animation: ty-stamp 0.48s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

.ty-prize-num.is-stamp { animation-delay: 0.12s; }

.ty-result .ty-actions { display: grid; gap: 0.35rem; }

.ty-result .is-cash {
  color: #1a1408;
  border-color: #ffe7a3;
  background: linear-gradient(110deg, #8a6410 0%, #ffe08a 45%, #fff6cf 50%, #ffe08a 55%, #8a6410 100%);
  background-size: 220% 100%;
  animation: ty-shine 2.2s linear infinite;
}

.ty-result .is-cut { background: #7a1f1f; color: #fff5f5; border-color: #c45050; }

.ty-result .is-hold,
.ty-replay {
  background: transparent;
  color: #c8bfb0;
  border-color: #4a4336;
  text-align: center;
  text-decoration: none;
  padding: 0.38rem 0.4rem;
  font-weight: 700;
  border-radius: 9px;
  border-style: solid;
  border-width: 1px;
}

@keyframes ty-stamp {
  0% { transform: scale(1.7) rotate(-12deg); opacity: 0; }
  70% { transform: scale(0.96) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-3deg); opacity: 1; }
}

@keyframes ty-shine {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.ty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  min-height: 0;
}

.ty-slot {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  min-height: 7.2rem;
  padding: 0.45rem;
  border: 1px dashed #3a3428;
  border-radius: 12px;
  background: #181818;
  font-size: 0.75rem;
}

.ty-slot strong {
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ty-slot button {
  margin-top: 0.2rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.72rem;
}

.ty-slot.is-temp5 { border-color: #3d8f62; }
.ty-slot.is-temp4 { border-color: #6f8cff; }
.ty-slot.is-real { border-style: solid; }
.ty-slot.is-lock { opacity: 0.8; }

.ty-slot-tag {
  color: var(--muted);
  font-size: 0.68rem;
}

.ty-slot.is-temp5 .ty-slot-tag { color: #7dcea0; }
.ty-slot.is-temp4 .ty-slot-tag { color: #9eb6ff; }

.ty-rent-list {
  display: grid;
  gap: 0.35rem;
  max-height: 16rem;
  overflow: auto;
}

@keyframes ty-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (min-width: 860px) {
  .ty-card { flex: 1 1 220px; min-width: 220px; }
  .ty-market { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .ty-sheet {
    top: auto;
    left: 0;
    width: 100%;
    max-height: 48%;
    border-left: 0;
    border-top: 1px solid var(--ty-gold);
  }
  .ty-cash-amt,
  .ty-worth-amt { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ty-card.ssr::after,
  .ty-live i,
  .ty-marquee span,
  .ty-shell.ty-flash::before,
  .ty-toast { animation: none; }
}

@keyframes ty-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.ty-share {
  display: grid;
  gap: 0.85rem;
  padding: 1.05rem 0.95rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgb(228 197 106 / 0.22);
  background: #101010;
}
.ty-share .ty-kicker { margin: 0; letter-spacing: 0.08em; }
.ty-share p { margin: 0; }
.ty-mile {
  position: relative;
  padding-top: 0.2rem;
  margin-bottom: 0.45rem;
}
.ty-mile ol {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ty-mile li {
  display: grid;
  justify-items: center;
  gap: 0.02rem;
  text-align: center;
}
.ty-mile-rail,
.ty-mile-fill {
  position: absolute;
  left: 16.67%;
  right: 16.67%;
  top: 1.15rem;
  height: 3px;
  border-radius: 999px;
}
.ty-mile-rail { background: #2a2a2a; }
.ty-mile-fill {
  right: auto;
  width: calc((100% - 33.34%) * var(--mile, 0));
  background: #e4c56a;
  box-shadow: 0 0 10px rgb(228 197 106 / 0.45);
}
.ty-mile-mark {
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  margin-bottom: 0.28rem;
  border-radius: 50%;
  background: #171717;
  border: 2px solid #3a3a3a;
  color: #5c5c5c;
}
.ty-mile li.is-on .ty-mile-mark {
  background: #1c160e;
  border-color: #e4c56a;
  color: #f0d78c;
  box-shadow: 0 0 0 4px rgb(228 197 106 / 0.1), 0 0 16px rgb(228 197 106 / 0.42);
}
.ty-mile strong {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  color: #cfc8ba;
}
.ty-mile li.is-on strong { color: #f0d78c; }
.ty-mile small {
  color: #8a8478;
  font-size: 0.68rem;
  line-height: 1.2;
}
.ty-share-hook {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgb(228 197 106 / 0.55);
  background: rgb(228 197 106 / 0.05);
}
.ty-share-bag { flex: 0 0 auto; display: block; }
.ty-share-hook p { min-width: 0; }
.ty-share-hook strong {
  display: block;
  color: #e4c56a;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
}
.ty-share-hook span {
  display: block;
  margin-top: 0.22rem;
  color: #f4f1ea;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
}
.ty-share-hook b { color: #f0d78c; font-weight: 800; }
.ty-share-status {
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
  color: #e6e0d4;
}
.ty-share .ty-actions { display: grid; gap: 0.5rem; margin-top: 0.15rem; }
.ty-share-go,
.ty-share-copy,
.ty-share-bind {
  width: 100%;
  appearance: none;
  font: inherit;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
}
.ty-share-go,
.ty-share-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.ty-share-go svg,
.ty-share-copy svg { display: block; flex: 0 0 auto; }
.ty-share-go {
  padding: 0.78rem 0.8rem;
  border: 0;
  color: #1c160e;
  background: #e4c56a;
  box-shadow: inset 0 1px 0 rgb(255 248 230 / 0.55);
}
.ty-share-copy {
  padding: 0.64rem 0.8rem;
  color: #e4c56a;
  background: transparent;
  border: 1px solid rgb(228 197 106 / 0.45);
}
.ty-share-rule {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}
.ty-share-bind {
  padding: 0.2rem;
  border: 0;
  background: transparent;
  color: #f0d78c;
  text-decoration: underline;
}
.ty-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h, 4.2rem) + 0.7rem);
  z-index: 60;
  max-width: min(22rem, calc(100% - 1.6rem));
  margin: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d4af37;
  background: #1c1810;
  color: #f0d78c;
  font-size: 0.82rem;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
  animation: ty-toast 2s ease forwards;
}
.ty-toast[data-long] { animation-duration: 6s; }

@keyframes ty-toast {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes ty-holo {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

@keyframes ty-coins {
  from { opacity: 0; transform: translateY(8px); }
  30% { opacity: 1; }
  to { opacity: 0; transform: translateY(-18px); }
}
