/* TH Legendary Isle — redesign 2026.10: top-bar shell, new tokens, card/hero/button system.
   Loaded after styles.css / legendary-theme.css / th-features.css and overrides them. */

:root {
  color-scheme: dark;
  --tl-bg: #090607;
  --tl-bg-2: #110b0d;
  --tl-surface: #161012;
  --tl-surface-2: #1d1417;
  --tl-surface-3: #261a1e;
  --tl-line: rgba(255, 255, 255, 0.08);
  --tl-line-2: rgba(255, 255, 255, 0.15);
  --tl-red: #e3262f;
  --tl-red-2: #ff4f58;
  --tl-ember: #ff8a3d;
  --tl-gold: #f2b65a;
  --tl-green: #3ddc84;
  --tl-text: #f6eff0;
  --tl-muted: #ab9da1;
  --tl-faint: #75696d;
  --tl-radius: 18px;
  --tl-radius-sm: 12px;
  --tl-bar-h: 68px;
  --tl-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --tl-grad: linear-gradient(135deg, #e3262f 0%, #ff6a3d 100%);

  /* legacy variables, re-pointed so every old component picks up the new palette */
  --bg: var(--tl-bg);
  --surface: var(--tl-bg-2);
  --panel: var(--tl-surface);
  --panel-2: var(--tl-surface-2);
  --line: var(--tl-line);
  --line-strong: var(--tl-line-2);
  --gold: var(--tl-red);
  --gold-2: var(--tl-red-2);
  --text: var(--tl-text);
  --muted: var(--tl-muted);
  --faint: var(--tl-faint);
  --green: var(--tl-green);
  --radius: var(--tl-radius);
  --radius-sm: var(--tl-radius-sm);
  --gold-glow: rgba(227, 38, 47, 0.4);
  --top-h: var(--tl-bar-h);
}

/* ============ base ============ */
html { scroll-padding-top: calc(var(--tl-bar-h) + 16px); }
body.tl-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Chakra Petch", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  color: var(--tl-text);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(227, 38, 47, 0.16), transparent 62%),
    radial-gradient(760px 480px at -6% 40%, rgba(255, 106, 61, 0.07), transparent 60%),
    var(--tl-bg);
  background-attachment: fixed;
  display: block;
}
.tl-body a { color: inherit; }

/* ============ top bar ============ */
.tl-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.tl-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(10, 6, 8, 0.92), rgba(10, 6, 8, 0.78));
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--tl-line);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.tl-bar::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 38, 47, 0.7) 30%, rgba(255, 106, 61, 0.7) 70%, transparent);
  opacity: 0.55;
}
.tl-bar.is-stuck { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); }
.tl-bar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--tl-bar-h);
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 2.4vw, 32px);
}
.tl-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.tl-brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1px var(--tl-line-2), 0 6px 18px rgba(227, 38, 47, 0.3); }
.tl-brand-text { display: grid; line-height: 1.1; }
.tl-brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: 0.1em; color: #fff; }
.tl-brand-text small { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tl-red-2); }

.tl-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; margin-left: 10px; }
.tl-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #cdbfc3;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.tl-top-link:hover, .tl-dd.is-open > .tl-top-link { background: rgba(255, 255, 255, 0.07); color: #fff; }
.tl-top-link.is-active { color: #fff; background: rgba(227, 38, 47, 0.18); box-shadow: inset 0 0 0 1px rgba(227, 38, 47, 0.45); }
.tl-top-cta { color: #fff; background: var(--tl-grad); box-shadow: 0 8px 22px rgba(227, 38, 47, 0.32); }
.tl-top-cta:hover { background: var(--tl-grad); filter: brightness(1.1); }
.tl-top-cta svg { width: 16px; height: 16px; }
.tl-caret { width: 14px; height: 14px; transform: rotate(90deg); opacity: 0.7; transition: transform 0.18s ease; }
.tl-dd.is-open .tl-caret { transform: rotate(-90deg); }

.tl-dd { position: relative; }
.tl-dd-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 70;
  display: none;
  min-width: 250px;
  padding: 8px;
  border: 1px solid var(--tl-line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, #1d1317, #140d10);
  box-shadow: var(--tl-shadow), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.tl-dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.tl-dd-end .tl-dd-panel { left: auto; right: 0; }
.tl-dd.is-open > .tl-dd-panel { display: grid; gap: 2px; }
@media (hover: hover) {
  .tl-dd:hover > .tl-dd-panel { display: grid; gap: 2px; }
  .tl-dd:hover > .tl-top-link, .tl-dd:hover > .tl-acct { background: rgba(255, 255, 255, 0.07); color: #fff; }
}
.tl-dd-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #d6c9cd;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.tl-dd-link svg { width: 18px; height: 18px; flex: none; color: var(--tl-faint); }
.tl-dd-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.tl-dd-link:hover svg, .tl-dd-link.is-active svg { color: var(--tl-red-2); }
.tl-dd-link.is-active, .tl-dd-link.active { background: rgba(227, 38, 47, 0.16); color: #fff; }

.tl-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.tl-nav + .tl-tools { margin-left: 0; }
.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--tl-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #e8dcdf;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tl-chip svg { width: 15px; height: 15px; color: var(--tl-gold); }
.tl-chip:hover { border-color: var(--tl-line-2); background: rgba(255, 255, 255, 0.08); }
.tl-chip-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.2), 0 0 12px var(--tl-green); }
.tl-chip-relic svg { color: #ff8fc7; }

.tl-body .lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--tl-line); border-radius: 999px; background: rgba(255, 255, 255, 0.04); gap: 2px; }
.tl-body .lang-switch-btn { min-width: 34px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; color: #bbaeb2; text-decoration: none; }
.tl-body .lang-switch-btn.active { background: var(--tl-grad); color: #fff; }

.tl-acct {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px 0 5px;
  border: 1px solid var(--tl-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.tl-avatar { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: var(--tl-grad); font-weight: 700; flex: none; }
.tl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tl-acct-text { display: grid; text-align: left; line-height: 1.15; }
.tl-acct-text strong { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-acct-text small { font-size: 10.5px; color: var(--tl-red-2); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tl-dd-wallet { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 4px 8px; }
.tl-dd-wallet a { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 9px 10px; border: 1px solid var(--tl-line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.tl-dd-wallet svg { grid-row: span 2; width: 18px; height: 18px; color: var(--tl-gold); }
.tl-dd-wallet b { font-size: 14px; }
.tl-dd-wallet small { color: var(--tl-muted); font-size: 11px; }
.tl-login, .tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.tl-login svg, .tl-btn svg { width: 18px; height: 18px; }
.tl-login:hover, .tl-btn-discord:hover { background: #4752c4; }
.tl-login-steam { margin-left: 8px; background: #1b2838; color: #c7d5e0; box-shadow: inset 0 0 0 1px #66c0f4; }
.tl-login-steam:hover { background: #2a475e; }
.tl-login-block.tl-login-steam { margin-top: 0; background: #1b2838; }
.tl-btn-discord { background: #5865f2; }
.tl-burger { display: none; place-items: center; width: 42px; height: 42px; border: 1px solid var(--tl-line-2); border-radius: 12px; cursor: pointer; }
.tl-burger svg { width: 22px; height: 22px; }

/* ============ mobile drawer + dock ============ */
.tl-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(4, 2, 3, 0.72); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.tl-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  background: linear-gradient(180deg, #1a1115, #0f090b);
  border-left: 1px solid var(--tl-line-2);
  transform: translateX(105%);
  transition: transform 0.24s ease;
}
.tl-nav-toggle:checked ~ .tl-scrim { opacity: 1; pointer-events: auto; }
.tl-nav-toggle:checked ~ .tl-drawer { transform: none; }
.tl-drawer-user, .tl-login-block { display: flex; align-items: center; gap: 12px; margin: 16px; padding: 12px; border: 1px solid var(--tl-line); border-radius: 16px; background: rgba(255, 255, 255, 0.04); text-decoration: none; color: #fff; }
.tl-login-block { justify-content: center; background: #5865f2; }
.tl-drawer-user span:last-child { display: grid; line-height: 1.25; }
.tl-drawer-user small { color: var(--tl-muted); font-size: 12px; }
.tl-drawer-scroll { flex: 1; overflow-y: auto; padding: 0 16px 24px; }
.tl-drawer-group h3 { display: flex; align-items: center; gap: 8px; margin: 18px 4px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tl-red-2); }
.tl-drawer-group h3 svg { width: 14px; height: 14px; }
.tl-drawer-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: #e2d6d9; font-size: 15px; font-weight: 600; text-decoration: none; }
.tl-drawer-link svg { width: 19px; height: 19px; color: var(--tl-faint); }
.tl-drawer-link:hover, .tl-drawer-link.is-active, .tl-drawer-link.active { background: rgba(227, 38, 47, 0.16); color: #fff; }
.tl-drawer-link.is-active svg { color: var(--tl-red-2); }

.tl-dock {
  position: fixed;
  inset: auto 10px 10px 10px;
  z-index: 55;
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--tl-line-2);
  border-radius: 20px;
  background: rgba(18, 11, 14, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}
.tl-dock-link { display: grid; place-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; color: #b7a9ad; font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
.tl-dock-link svg { width: 21px; height: 21px; }
.tl-dock-link.is-active { color: #fff; background: rgba(227, 38, 47, 0.22); }

/* ============ main + footer ============ */
.tl-main.lg-content {
  display: block;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3.2vw, 44px) clamp(14px, 3vw, 40px) 64px;
}
.tl-main.lg-content.full-bleed { width: 100%; max-width: none; padding: 0; display: flex; flex-direction: column; }
.tl-foot { margin-top: 24px; border-top: 1px solid var(--tl-line); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35)); }
.tl-foot-inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; width: min(1320px, 100%); margin: 0 auto; padding: 40px clamp(14px, 3vw, 40px) 20px; }
.tl-foot-brand { display: grid; gap: 18px; align-content: start; justify-items: start; }
.tl-foot-col { display: grid; gap: 4px; align-content: start; }
.tl-foot-col h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tl-red-2); }
.tl-foot-col a { padding: 4px 0; color: #bcaeb2; font-size: 14px; text-decoration: none; }
.tl-foot-col a:hover { color: #fff; }
.tl-foot-copy { width: min(1320px, 100%); margin: 0 auto; padding: 16px clamp(14px, 3vw, 40px) 28px; border-top: 1px solid var(--tl-line); color: var(--tl-faint) !important; font-size: 12.5px; }

@media (max-width: 1500px) { .tl-tools .tl-chip-wallet { display: none; } .tl-brand-text small { display: none; } }
@media (max-width: 1180px) {
  .tl-nav { display: none; }
  .tl-tools { margin-left: auto; }
  .tl-burger { display: grid; }
}
@media (max-width: 760px) {
  .tl-brand-text small, .tl-acct-text, .tl-acct .tl-caret, .tl-chip-live span { display: none; }
  .tl-acct { padding: 0 5px; }
  .tl-chip-live { padding: 0 11px; }
  .tl-dock { display: grid; }
  body.tl-body { padding-bottom: 84px; }
  .tl-foot-inner { grid-template-columns: 1fr 1fr; }
  .tl-foot-brand { grid-column: 1 / -1; }
  .tl-tools .lang-switch { display: none; }
  .tl-tools .tl-login-steam { display: none; } /* phones: Steam login is in the drawer */
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ============ shared building blocks ============ */
.tl-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px !important; color: var(--tl-red-2) !important; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.tl-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--tl-green); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18), 0 0 14px var(--tl-green); animation: tlPulse 2s ease-in-out infinite; }
.tl-pulse.is-off { background: var(--tl-faint); box-shadow: none; animation: none; }
@keyframes tlPulse { 50% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0), 0 0 14px var(--tl-green); } }
.tl-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease; }
.tl-cta svg { width: 19px; height: 19px; }
.tl-cta:hover { transform: translateY(-1px); }
.tl-cta-primary { background: var(--tl-grad); color: #fff !important; box-shadow: 0 12px 30px rgba(227, 38, 47, 0.38); }
.tl-cta-primary:hover { filter: brightness(1.1); }
.tl-cta-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--tl-line-2); color: #fff !important; }
.tl-cta-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.tl-cta-discord { background: #5865f2; color: #fff !important; }
.tl-section { margin: clamp(40px, 6vw, 72px) 0; }
.tl-sec-head { max-width: 760px; margin-bottom: 26px; }
.tl-sec-head h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; letter-spacing: 0.01em; }

/* ============ home ============ */
.tl-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; min-height: min(640px, 78vh); padding: clamp(10px, 2vw, 24px) 0; }
.tl-hero-copy h1 { margin: 0 0 20px; font-size: clamp(38px, 5.6vw, 76px); line-height: 1.04; letter-spacing: 0.005em; text-transform: none; }
.tl-hero-copy h1 em { font-style: normal; background: var(--tl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-lead { max-width: 560px; margin: 0 0 28px; color: #c9bbbf !important; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; }
.tl-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.tl-hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; padding-top: 22px; border-top: 1px solid var(--tl-line); }
.tl-hero-stats div { display: grid; gap: 4px; }
.tl-hero-stats dt { color: var(--tl-faint); font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.tl-hero-stats dd { margin: 0; font-size: 22px; font-weight: 700; color: #fff; }
.tl-hero-stats dd.is-live { color: var(--tl-green); }
.tl-hero-art { position: relative; min-height: clamp(320px, 46vw, 560px); border-radius: 28px; overflow: hidden; background: #120b0d url("/static/legendary_banner.webp") 50% 38% / cover no-repeat; box-shadow: 0 0 0 1px var(--tl-line-2), 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 80px rgba(227, 38, 47, 0.18); transform: rotate(0.6deg); }
.tl-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(9, 6, 7, 0.78)), linear-gradient(90deg, rgba(9, 6, 7, 0.35), transparent 40%); }
.tl-hero-badge { position: absolute; z-index: 2; left: 18px; bottom: 18px; display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; padding: 12px 18px; border: 1px solid var(--tl-line-2); border-radius: 16px; background: rgba(12, 8, 10, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tl-hero-badge svg { grid-row: span 2; width: 22px; height: 22px; color: var(--tl-red-2); }
.tl-hero-badge b { font-size: 22px; line-height: 1; }
.tl-hero-badge small { color: var(--tl-muted); font-size: 11.5px; }

.tl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-tile { position: relative; display: grid; gap: 8px; padding: 26px 24px 24px; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); background: linear-gradient(160deg, var(--tl-surface-2), var(--tl-surface)); text-decoration: none; overflow: hidden; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.tl-tile::before { content: ""; position: absolute; inset: -40% auto auto -20%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(227, 38, 47, 0.22), transparent 65%); opacity: 0; transition: opacity 0.25s ease; }
.tl-tile:hover { transform: translateY(-4px); border-color: rgba(227, 38, 47, 0.5); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5); }
.tl-tile:hover::before { opacity: 1; }
.tl-tile-ico { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(227, 38, 47, 0.15); color: var(--tl-red-2); box-shadow: inset 0 0 0 1px rgba(227, 38, 47, 0.3); }
.tl-tile-ico svg { width: 22px; height: 22px; }
.tl-tile strong { position: relative; margin-top: 8px; font-size: 19px; color: #fff; }
.tl-tile p { position: relative; margin: 0; color: var(--tl-muted); font-size: 14.5px; line-height: 1.55; }
.tl-tile-go { position: absolute; top: 22px; right: 22px; color: var(--tl-faint); transition: color 0.15s ease, transform 0.15s ease; }
.tl-tile-go svg { width: 20px; height: 20px; }
.tl-tile:hover .tl-tile-go { color: #fff; transform: translateX(3px); }

.tl-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.tl-step { position: relative; display: grid; gap: 8px; align-content: start; padding: 24px 22px; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); background: var(--tl-surface); }
.tl-step::after { content: ""; position: absolute; top: 46px; left: calc(100% + 1px); width: 14px; height: 1px; background: var(--tl-line-2); }
.tl-step:last-child::after { display: none; }
.tl-step-num { color: var(--tl-faint); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; }
.tl-step-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tl-grad); color: #fff; }
.tl-step-ico svg { width: 21px; height: 21px; }
.tl-step strong { margin-top: 6px; font-size: 17px; color: #fff; }
.tl-step p { margin: 0; color: var(--tl-muted); font-size: 14px; line-height: 1.55; }

.tl-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: clamp(40px, 6vw, 72px) 0 0; }
.tl-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 20px; align-items: center; padding: 28px; border: 1px solid var(--tl-line); border-radius: 22px; background: linear-gradient(135deg, var(--tl-surface-2), var(--tl-surface)); }
.tl-card h3 { margin: 0 0 8px; font-size: 22px; }
.tl-card-ico { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 20px; background: rgba(227, 38, 47, 0.16); color: var(--tl-red-2); box-shadow: inset 0 0 0 1px rgba(227, 38, 47, 0.32); }
.tl-card-ico svg { width: 28px; height: 28px; }
.tl-card-ico img { width: 100%; height: 100%; object-fit: cover; }
.tl-card-ico-discord { background: rgba(88, 101, 242, 0.2); color: #aab3ff; box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.45); }
.tl-card-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.tl-card .discord-stats { display: flex; gap: 16px; color: var(--tl-muted); font-size: 13.5px; }
.tl-card .discord-stats strong { color: #fff; }
.tl-card-launcher { background: linear-gradient(135deg, rgba(227, 38, 47, 0.2), var(--tl-surface) 55%); }
.tl-card-discord { background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), var(--tl-surface) 55%); }

@media (max-width: 1100px) {
  .tl-hero { grid-template-columns: 1fr; min-height: 0; }
  .tl-hero-art { order: -1; min-height: 300px; transform: none; }
  .tl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-step::after { display: none; }
}
@media (max-width: 640px) {
  .tl-tiles, .tl-steps, .tl-duo { grid-template-columns: 1fr; }
  .tl-card { grid-template-columns: 1fr; }
  .tl-hero-stats { gap: 18px; }
}

/* ============ global re-skin of legacy components ============ */
.tl-main h1, .tl-main h2, .tl-main h3 { letter-spacing: 0.005em; }
.tl-main .eyebrow { color: var(--tl-red-2); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.tl-main .lead { color: #c3b5b9; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.7; }
.tl-main p { color: var(--tl-muted); }
.tl-main a { text-underline-offset: 3px; }

/* page hero used by support / rules / lore / etc. */
.tl-main .hero-v2 {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0 0 clamp(22px, 3vw, 36px);
  padding: clamp(30px, 4.4vw, 60px) clamp(22px, 4vw, 56px);
  border: 1px solid var(--tl-line-2);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(10, 6, 8, 0.97) 28%, rgba(10, 6, 8, 0.7) 62%, rgba(10, 6, 8, 0.35)),
    url("/static/legendary_banner.webp") 70% 40% / cover no-repeat;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.tl-main .hero-v2::before, .tl-main .hero-v2::after { display: none; }
.tl-main .hero-v2 h1 { margin: 0; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.08; color: #fff; }
.tl-main .hero-v2 .lead { max-width: 640px; margin: 6px 0 0; }

/* cards / panels */
.tl-main .lg-panel, .tl-main .panel-card, .tl-main .status-panel, .tl-main .table-page, .tl-main .tactical-panel, .tl-main .auth-card,
.tl-main .profile-stat-card, .tl-main .inventory-block, .tl-main .topup-history-card, .tl-main .preset-card {
  border: 1px solid var(--tl-line);
  border-radius: var(--tl-radius);
  background: linear-gradient(160deg, var(--tl-surface-2), var(--tl-surface));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}
.tl-main .panel-card-head { border-bottom-color: var(--tl-line); }
.tl-main .stat-chip, .tl-main .lg-stat {
  border: 1px solid var(--tl-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

/* buttons */
.tl-main .button, .tl-main .lg-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.tl-main .button.primary, .tl-main .lg-btn-primary { background: var(--tl-grad); border-color: transparent; color: #fff; box-shadow: 0 10px 26px rgba(227, 38, 47, 0.32); }
.tl-main .button.primary:hover, .tl-main .lg-btn-primary:hover { filter: brightness(1.1); }
.tl-main .button.secondary, .tl-main .lg-btn-ghost { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--tl-line-2); color: #fff; }
.tl-main .button.secondary:hover, .tl-main .lg-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.tl-main .button.discord, .tl-main .lg-btn-discord { background: #5865f2; border-color: transparent; color: #fff; }

/* forms */
.tl-main input[type="text"], .tl-main input[type="search"], .tl-main input[type="number"], .tl-main input[type="email"], .tl-main input[type="password"],
.tl-main input[type="url"], .tl-main input:not([type]), .tl-main select, .tl-main textarea {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--tl-line-2);
  border-radius: 12px;
  background: rgba(8, 4, 6, 0.7);
  color: var(--tl-text);
  font: inherit;
}
.tl-main input:focus, .tl-main select:focus, .tl-main textarea:focus { border-color: var(--tl-red-2); outline: 0; box-shadow: 0 0 0 3px rgba(227, 38, 47, 0.22); }
.tl-main label > span:first-child { color: #cdbfc3; }

/* tables */
.tl-main table { border-collapse: separate; border-spacing: 0; width: 100%; }
.tl-main th { padding: 12px 14px; border-bottom: 1px solid var(--tl-line-2); color: var(--tl-faint); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-align: left; text-transform: uppercase; }
.tl-main td { padding: 12px 14px; border-bottom: 1px solid var(--tl-line); color: #ddd0d3; }
.tl-main tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

/* anchor tabs (support page etc.) */
.tl-main .lg-anchor-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(20px, 3vw, 34px); }
.tl-main .lg-anchor-tabs a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid var(--tl-line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.04); color: #e6dadd; font-weight: 700; text-decoration: none; }
.tl-main .lg-anchor-tabs a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.tl-main .lg-anchor-tabs svg { width: 17px; height: 17px; color: var(--tl-red-2); }

/* ============ dashboard ============ */
.tl-main.full-bleed .tl-dash { width: min(1320px, 100%); margin: 0 auto; padding: clamp(20px, 3vw, 40px) clamp(14px, 3vw, 40px) 64px; display: block; }
.tl-dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border: 1px solid var(--tl-line-2); border-radius: 24px; background: linear-gradient(110deg, rgba(227, 38, 47, 0.22), var(--tl-surface) 55%); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.tl-dash-head .dash-user { display: flex; align-items: center; gap: 16px; padding: 0; border: 0; background: transparent; }
.tl-dash-head .dash-user .offer-icon { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--tl-grad); }
.tl-dash-head .dash-user .offer-icon img { width: 100%; height: 100%; object-fit: cover; }
.tl-dash-head .dash-user strong { display: block; font-size: 22px; color: #fff; }
.tl-dash-head .dash-user span { color: var(--tl-muted); font-size: 13.5px; }
.tl-dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tl-dash-tabs { position: sticky; top: calc(var(--tl-bar-h) + 8px); z-index: 20; margin: 16px 0 24px; padding: 8px; border: 1px solid var(--tl-line-2); border-radius: 20px; background: rgba(15, 9, 11, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tl-dash-tabs .dash-nav { display: flex; gap: 6px; padding: 0; overflow-x: auto; scrollbar-width: none; }
.tl-dash-tabs .dash-nav::-webkit-scrollbar { display: none; }
.tl-dash-tabs .dash-nav-link { width: auto !important; min-width: 0; justify-content: flex-start; display: inline-flex; align-items: center; gap: 8px; flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 14px; background: transparent; color: #c5b7bb; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: none; }
.tl-dash-tabs .dash-nav-link svg { width: 17px; height: 17px; }
.tl-dash-tabs .dash-nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.tl-dash-tabs .dash-nav-link.active { background: var(--tl-grad); color: #fff; box-shadow: 0 8px 22px rgba(227, 38, 47, 0.3); }
.tl-dash .dash-main { display: block; min-width: 0; padding: 0; }

@media (max-width: 760px) {
  .tl-dash-head { padding: 18px; }
  .tl-dash-tabs { top: calc(var(--tl-bar-h) + 4px); }
}
.tl-chip-live.is-off i { background: var(--tl-faint); box-shadow: none; }
.tl-dash-tabs .dash-nav { flex-wrap: nowrap !important; flex-direction: row !important; display: flex !important; grid-template-columns: none !important; }
@media (max-width: 760px) {
  .tl-tools { gap: 6px; }
  .tl-tools .tl-top-cta { display: none; }
  .tl-bar-inner { gap: 10px; padding: 0 12px; }
  .tl-brand-text strong { font-size: 13px; letter-spacing: 0.08em; }
}
@media (max-width: 380px) { .tl-brand-text { display: none; } }
.tl-dd.is-dismissed > .tl-dd-panel { display: none !important; }

/* ============ skin editor: studio layout (viewport left, console right) ============ */
body.tl-body:has(.skin-editor-page.skin-deck) { background: radial-gradient(900px 520px at 88% -8%, rgba(227, 38, 47, 0.16), transparent 62%), var(--tl-bg); overflow-x: visible; }
body.tl-body:has(.skin-editor-page.skin-deck) .tl-main.lg-content { padding: 0; width: 100%; max-width: none; }
.tl-main .skin-editor-page.skin-deck { width: min(1560px, 100%); height: auto; min-height: 0; margin: 0 auto; overflow: visible; background: none; padding: clamp(14px, 2.4vw, 32px) clamp(14px, 3vw, 40px) 56px; }
.tl-main .skin-deck-bar { position: static; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 18px; border: 0; background: none; backdrop-filter: none; }
.tl-main .skin-deck-brand { gap: 14px; }
.tl-main .skin-deck-brand img { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 0 0 1px var(--tl-line-2); }
.tl-main .skin-deck-brand strong { display: block; font-size: clamp(24px, 3vw, 34px); letter-spacing: 0.01em; color: #fff; }
.tl-main .skin-deck-brand span { color: var(--tl-red-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.tl-main .skin-deck-crumbs, .tl-main .skin-deck-exit { display: none; }
.tl-main .skin-deck-right { margin-left: auto; }
.tl-main .skin-deck-stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr); grid-template-rows: auto; align-items: start; gap: 20px; padding: 0; overflow: visible; }
.tl-main .skin-viewport { position: sticky; top: calc(var(--tl-bar-h) + 14px); height: calc(100vh - var(--tl-bar-h) - 150px); min-height: 460px; }
.tl-main .skin-model-wrap { flex: 1; min-height: 0; border-radius: 26px; border: 1px solid var(--tl-line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 90px rgba(227, 38, 47, 0.12); }
.tl-main .skin-deck-console { max-height: none; border-radius: 24px; border-color: var(--tl-line-2); background: linear-gradient(170deg, var(--tl-surface-2), var(--tl-surface)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.tl-main .skin-deck-tabs { padding: 8px; gap: 6px; border-bottom: 1px solid var(--tl-line); }
.tl-main .skin-deck-tab { border-radius: 12px; font-family: inherit; }
.tl-main .skin-deck-tab.active { background: var(--tl-grad); color: #fff; border-color: transparent; }
@media (max-width: 1100px) {
  .tl-main .skin-deck-stage { grid-template-columns: 1fr; }
  .tl-main .skin-viewport { position: relative; top: 0; height: 56vh; }
}

/* ============ shop: market layout (hero, category rail, product cards) ============ */
.tl-main .tm-shop { max-width: 1320px; margin: 0 auto; }
.tm-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 32px;
  margin: 0 0 22px;
  padding: clamp(24px, 3.6vw, 44px) clamp(20px, 3.6vw, 48px);
  border: 1px solid var(--tl-line-2);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(520px 260px at 92% 0%, rgba(227, 38, 47, 0.32), transparent 70%),
    linear-gradient(105deg, rgba(10, 6, 8, 0.98) 30%, rgba(10, 6, 8, 0.78)),
    url("/static/legendary_banner.webp") 80% 40% / cover no-repeat;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}
.tm-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px !important; color: var(--tl-red-2) !important; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.tm-kicker svg { width: 16px; height: 16px; }
.tm-hero h1 { margin: 0 0 8px; font-size: clamp(34px, 5vw, 60px); line-height: 1.05; color: #fff; }
.tm-hero-copy p:last-child { margin: 0; max-width: 520px; color: #c3b5b9; font-size: clamp(15px, 1.4vw, 17px); }
.tm-wallets { display: flex !important; flex-wrap: wrap; gap: 12px; }
.tm-wallet { display: flex; align-items: center; gap: 12px; min-width: 190px; padding: 12px 16px; border: 1px solid var(--tl-line-2); border-radius: 18px; background: rgba(12, 8, 10, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tm-wallet > div { display: grid; line-height: 1.2; }
.tm-wallet small { color: var(--tl-muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; }
.tm-wallet strong { font-size: 21px; color: #fff; }
.tm-wallet-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; }
.tm-wallet-ico svg { width: 22px; height: 22px; }
.tm-wallet-ico.is-rc { background: var(--tl-grad); box-shadow: 0 8px 20px rgba(227, 38, 47, 0.35); }
.tm-wallet-ico.is-relic { background: linear-gradient(135deg, #c44bd8, #7c3aed); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35); }

.tm-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.tm-rail { position: sticky; top: calc(var(--tl-bar-h) + 16px); display: grid; gap: 14px; padding: 16px; border: 1px solid var(--tl-line); border-radius: 22px; background: linear-gradient(170deg, var(--tl-surface-2), var(--tl-surface)); }
.tm-search { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 1px solid var(--tl-line-2); border-radius: 14px; background: rgba(8, 4, 6, 0.7); }
.tm-search svg { width: 18px; height: 18px; color: var(--tl-faint); flex: none; }
.tm-search input { flex: 1; min-width: 0; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: #fff; }
.tm-cats { display: grid !important; grid-auto-flow: row !important; grid-template-columns: 1fr !important; gap: 4px; padding: 0 !important; border: 0 !important; background: none !important; }
.tm-cats .tm-cat { display: flex !important; align-items: center; gap: 12px; width: 100%; padding: 12px 14px !important; border: 1px solid transparent !important; border-radius: 14px !important; background: transparent !important; color: #cbbdc1 !important; font: inherit; font-size: 15px !important; font-weight: 700; text-align: left; text-transform: none; letter-spacing: 0.01em; box-shadow: none !important; cursor: pointer; }
.tm-cats .tm-cat svg { width: 19px; height: 19px; flex: none; color: var(--tl-faint); }
.tm-cats .tm-cat span { flex: 1; }
.tm-cats .tm-cat em { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #e8dcdf; font-size: 12px; font-style: normal; }
.tm-cats .tm-cat:hover { background: rgba(255, 255, 255, 0.06) !important; color: #fff !important; }
.tm-cats .tm-cat.active { background: rgba(227, 38, 47, 0.16) !important; border-color: rgba(227, 38, 47, 0.5) !important; color: #fff !important; }
.tm-cats .tm-cat.active svg { color: var(--tl-red-2); }
.tm-cats .tm-cat.active em { background: var(--tl-grad); color: #fff; }

.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tm-card { --tm-a: #ff8a3d; --tm-b: #e3262f; position: relative; display: flex !important; flex-direction: column; overflow: hidden; border: 1px solid var(--tl-line) !important; border-radius: 24px !important; background: linear-gradient(170deg, var(--tl-surface-2), var(--tl-surface)) !important; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.tm-card:hover { transform: translateY(-5px); border-color: var(--tm-a) !important; box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--tm-a) 20%, transparent); }
.tm-c-parking { --tm-a: #4aa8ff; --tm-b: #1f4fd8; }
.tm-c-boost { --tm-a: #ffb347; --tm-b: #e3262f; }
.tm-c-carnivore { --tm-a: #ff6a5c; --tm-b: #9d1620; }
.tm-c-herbivore { --tm-a: #58dc8f; --tm-b: #17744a; }
.tm-c-omnivore { --tm-a: #f5c36b; --tm-b: #a8681a; }
.tm-card .ths-art { position: relative; display: grid; place-items: center; height: 190px !important; padding: 14px; background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--tm-a) 30%, transparent), transparent 64%), linear-gradient(180deg, color-mix(in srgb, var(--tm-b) 22%, #120c0e), #120c0e) !important; border-bottom: 1px solid var(--tl-line); }
.tm-card .ths-art::before { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--tm-b), var(--tm-a)); }
.tm-card .ths-art img { width: 92%; height: 88%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.6)); transition: transform 0.3s ease; }
.tm-card:hover .ths-art img { transform: scale(1.07); }
.tm-card .ths-art > .ths-art-svg { width: 132px; height: 132px; opacity: 1; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55)); transition: transform 0.3s ease; }
.tm-card:hover .ths-art > .ths-art-svg { transform: scale(1.08) rotate(-2deg); }
.tm-card .ths-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 0; border-radius: 999px; background: var(--tl-grad); color: #fff; font-size: 11.5px; font-weight: 700; box-shadow: 0 6px 16px rgba(227, 38, 47, 0.4); }
.tm-card .ths-badge svg { width: 13px; height: 13px; }
.tm-card .ths-soon { border-radius: 999px; }
.tm-card .ths-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 18px 18px; }
.tm-card .ths-body small { display: flex; align-items: center; gap: 8px; margin: 0; }
.tm-cat-pill { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tm-a) 20%, transparent); color: var(--tm-a); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.tm-card .ths-diet { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.07); color: #ddd0d3; }
.tm-card .ths-body > strong { font-size: 19px; line-height: 1.2; color: #fff; }
.tm-card .ths-body p { margin: 0; color: var(--tl-muted); font-size: 13.5px; line-height: 1.5; }
.tm-card .ths-stats { gap: 8px; padding: 0; border: 0; background: none; }
.tm-card .ths-stats span { flex: 1 1 auto; padding: 8px 10px; border: 1px solid var(--tl-line); border-radius: 12px; background: rgba(255, 255, 255, 0.035); }
.tm-card .ths-stats span > svg { color: var(--tm-a); }
.tm-card .ths-stats i b { color: #fff; }
.tm-card .ths-limit { position: static; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 11px; border: 1px dashed color-mix(in srgb, var(--tm-a) 55%, transparent); border-radius: 999px; background: transparent; color: #f2d9a0; font-size: 11.5px; font-weight: 700; white-space: normal; }
.tm-card .ths-limit svg { width: 12px; height: 12px; flex: none; }
.tm-card .ths-prices { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.tm-card .ths-buy { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 999px; font-family: inherit; cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease; }
.tm-card .ths-buy * { color: #fff !important; }
.tm-card .ths-buy svg { width: 19px; height: 19px; }
.tm-card .ths-buy span { display: grid; text-align: left; line-height: 1.05; }
.tm-card .ths-buy b { font-size: 16px; }
.tm-card .ths-buy small { font-size: 9.5px; letter-spacing: 0.12em; opacity: 0.85; }
.tm-card .ths-buy.is-rc { background: var(--tl-grad); box-shadow: 0 10px 24px rgba(227, 38, 47, 0.3); }
.tm-card .ths-buy.is-relic { background: linear-gradient(135deg, #c44bd8, #7c3aed); box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3); }
.tm-card .ths-buy:hover { transform: translateY(-1px); filter: brightness(1.12); }
.tm-products .lg-shop-empty { padding: 40px; text-align: center; border: 1px dashed var(--tl-line-2); border-radius: 22px; }
.ths-card.is-cat-hidden, .ths-card.is-search-hidden { display: none !important; }

@media (max-width: 1000px) {
  .tm-layout { grid-template-columns: 1fr; }
  .tm-rail { position: static; padding: 12px; }
  .tm-cats { grid-auto-flow: column !important; grid-template-columns: none !important; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .tm-cats .tm-cat { width: auto; white-space: nowrap; }
  .tm-wallet { min-width: 0; flex: 1; }
}
@media (max-width: 560px) { .tm-grid { grid-template-columns: 1fr; } }
.tl-main .tm-shop.thx-page, .tl-main .tm-shop.ths { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }

/* ============ inner pages: one card language for every legacy block ============ */
.tl-main :is(.offer-card, .category-card, .tldr-panel, .rule-block, .feature-tile, .cta-band, .quote-block, .rd-card, .rd-howto, .rd-history,
  .lw-warning, .lg-legal-body, .lg-legal-toc, .lg-parking-top, .lg-parking-list, .lg-parking-live, .thx-head, .thl-table-wrap, .lf-header, .lf-summary,
  .online-summary, .species-card, .th-pop, .thx-mock, .ths-card, .thw-card, .shop-balance-bar, .admin-form, .profile-hero, .profile-side-stack > *) {
  border: 1px solid var(--tl-line);
  border-radius: var(--tl-radius);
  background: linear-gradient(160deg, var(--tl-surface-2), var(--tl-surface));
}
.tl-main :is(.category-card, .feature-tile, .offer-card):hover { border-color: rgba(227, 38, 47, 0.45); }
.tl-main .quote-block { border-left: 3px solid var(--tl-red); }
.tl-main .cta-band { background: linear-gradient(120deg, rgba(227, 38, 47, 0.24), var(--tl-surface) 62%); border-color: rgba(227, 38, 47, 0.35); }
.tl-main .offer-icon { display: grid; place-items: center; border-radius: 14px; background: rgba(227, 38, 47, 0.15); color: var(--tl-red-2); box-shadow: inset 0 0 0 1px rgba(227, 38, 47, 0.3); }
.tl-main .section-head h2, .tl-main .lg-section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.tl-main .status-pill { border-radius: 999px; border: 1px solid var(--tl-line-2); background: rgba(255, 255, 255, 0.05); }

/* lore hero (old lg-hero) gets the same hero treatment as the home page */
.tl-main .lg-hero {
  position: relative;
  min-height: 0;
  margin: 0 0 clamp(22px, 3vw, 36px);
  padding: clamp(30px, 4.4vw, 60px) clamp(22px, 4vw, 56px);
  border: 1px solid var(--tl-line-2);
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(10, 6, 8, 0.97) 28%, rgba(10, 6, 8, 0.7) 62%, rgba(10, 6, 8, 0.3)),
    url("/static/legendary_banner.webp") 70% 40% / cover no-repeat;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.tl-main .lg-hero h1 { font-size: clamp(30px, 4.6vw, 62px); line-height: 1.06; }

/* page wrappers */
.tl-main :is(.rd-page, .lw-page, .thx-page, .lf-page, .lg-parking, .table-page) { max-width: 1240px; margin-left: auto; margin-right: auto; }
.tl-main .table-page { padding: clamp(20px, 3vw, 36px); }

/* leaderboard / tables */
.tl-main .thl-table { border-radius: 14px; overflow: hidden; }
.tl-main .thl-table-wrap { padding: 6px; }
.tl-main .lg-shop-search, .tl-main .thx-toolbar input { border-radius: 999px; }

/* badges / pills */
.tl-main .lg-badge, .tl-main .tag { border-radius: 999px; }

/* dialogs */
.tl-main dialog, .tl-body dialog { border: 1px solid var(--tl-line-2); border-radius: 22px; background: linear-gradient(170deg, #1d1317, #120b0e); color: var(--tl-text); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
.tl-body dialog::backdrop { background: rgba(4, 2, 3, 0.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

.tl-main .skin-deck-brand { display: flex; align-items: center; }

/* warp + friends (their own stylesheets) */
.tl-main :is(.lw-page, .lf-page) { width: 100%; padding: clamp(14px, 2.4vw, 30px); }
.tl-main .lw-page { border: 1px solid var(--tl-line); border-radius: 24px; background: linear-gradient(160deg, var(--tl-surface-2), var(--tl-surface)); }
.tl-main .lw-page h1, .tl-main .lf-page h1 { font-size: clamp(28px, 3.6vw, 44px); }
.tl-main .lf-page > section, .tl-main .lf-page fieldset, .tl-main .lf-page .lf-list { border-radius: var(--tl-radius); }
.tl-main .lw-layout { gap: 20px; }
.tl-main .lw-layout img { border-radius: 18px; }
.tl-main .lf-page button, .tl-main .lw-page button { border-radius: 999px; font-family: inherit; font-weight: 700; }

/* thai headline sizing, dashboard profile hero */
html[lang="th"] .tl-hero-copy h1 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.2; }
html[lang="th"] .tl-main .hero-v2 h1 { line-height: 1.2; }
.tl-main .profile-hero { display: flex; align-items: center; gap: 22px; padding: clamp(18px, 3vw, 30px); background: linear-gradient(110deg, rgba(227, 38, 47, 0.14), var(--tl-surface) 60%); }
.tl-main .profile-hero-avatar { display: grid; place-items: center; width: 92px; height: 92px; flex: none; overflow: hidden; border: 0; border-radius: 50%; background: var(--tl-grad); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06), 0 14px 34px rgba(227, 38, 47, 0.3); }
.tl-main .profile-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tl-main .profile-hero-avatar svg { width: 46px; height: 46px; }
.tl-main .profile-hero-info h2 { margin: 0 0 8px; }
.tl-main .profile-stat-card { padding: 20px; }
