/* Ear training (/ear-training/): a focused practice app on a glass panel.
   One clear next action at a time; the circle (arena.js) is the centre of the play view. */

.train-ear-first { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; border-inline-start: 2px solid var(--accent); padding-inline-start: 14px; }

.train-wrap { padding-block: 8px clamp(40px, 6vw, 80px); position: relative; z-index: 1; }
.train {
  --gold: #FFD27F;
  position: relative; display: grid; gap: clamp(18px, 2.4vw, 28px);
  padding: clamp(16px, 2.6vw, 34px); border-radius: var(--radius);
  background: rgba(15, 17, 24, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 80px -40px rgba(0, 0, 0, .8);
}
.train [hidden] { display: none !important; }
.train-h { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }

/* ------------------------------------------------------------ the top bar */
.train-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(18px, 3vw, 40px); padding-block-end: clamp(14px, 2vw, 22px); border-bottom: 1px solid var(--line); }
.th-rank { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; }
.th-seal { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(131, 148, 255, .32), rgba(131, 148, 255, .06) 70%); color: var(--accent-ink); }
.th-mark { width: 30px; height: 30px; }
.th-rank-text { display: grid; gap: 4px; min-width: 0; flex: 1; max-width: 340px; }
.th-rank-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.th-rank-name b { font-size: 1.25rem; font-weight: 500; }
:lang(ar) .th-rank-name b { font-family: var(--serif); font-size: 1.5rem; }
.th-rank-name span, .th-small { color: var(--ink-2); font-size: .8125rem; }
.th-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.th-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--turq)); transition: width .8s var(--ease); }
[dir="rtl"] .th-bar span { background: linear-gradient(-90deg, var(--accent), var(--turq)); }
.th-stat { display: flex; align-items: center; gap: 10px; }
.th-stat p { display: grid; line-height: 1.15; }
.th-stat b { font-size: 1.375rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.th-stat span { font-size: .75rem; color: var(--ink-2); }
.th-ico svg { width: 30px; height: 30px; color: var(--gold); }
.th-ring { width: 34px; height: 34px; transform: rotate(-90deg); }
.th-ring circle { fill: none; stroke-width: 3.5; }
.th-ring-track { stroke: rgba(255, 255, 255, .12); }
.th-ring-fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 94.25; transition: stroke-dasharray .8s var(--ease), stroke .4s; }
.th-stat.is-met .th-ring-fill { stroke: var(--turq); }
.th-left { margin-inline-start: auto; font-size: .8125rem; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.th-left.is-out { color: var(--gold); background: rgba(255, 210, 127, .1); }

/* ------------------------------------------------------------ the hub */
.train-hub { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 1000px) { .train-hub { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; } }
.tv-main { display: grid; gap: 18px; align-content: start; }

.train-daily {
  display: grid; gap: 10px; justify-items: start; padding: clamp(18px, 2.4vw, 28px); border-radius: 20px;
  background: linear-gradient(135deg, rgba(131, 148, 255, .2), rgba(63, 207, 196, .06) 70%);
  box-shadow: inset 0 0 0 1px rgba(131, 148, 255, .32);
}
.train-daily .label { color: var(--accent-ink); }
.td-title { font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.15; }
:lang(ar) .td-title { font-weight: 400; letter-spacing: 0; }
.td-meta { color: var(--ink-2); }
.td-note { font-size: .8125rem; color: var(--ink-2); }
.train-daily.is-done { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.train-daily .btn-row { margin-block: 4px; }

.train-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.tg-card {
  width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 10px 14px;
  padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025);
  color: var(--ink); text-align: start; cursor: pointer; font: inherit;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
.tg-card:hover { border-color: rgba(131, 148, 255, .7); background: rgba(131, 148, 255, .08); transform: translateY(-2px); }
.tg-card:active { transform: scale(.985); }
.tg-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.tg-icon svg { width: 20px; height: 20px; }
.tg-text { display: grid; gap: 4px; }
.tg-text b { font-weight: 500; font-size: 1.0625rem; line-height: 1.25; }
.tg-text span { font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
.tg-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tg-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
:lang(ar) .tg-tag { letter-spacing: 0; text-transform: none; font-size: .75rem; }
.tg-tag svg { width: 10px; height: 10px; }
.tg-lock { color: var(--gold); border-color: rgba(255, 210, 127, .35); }

.train-settings { display: grid; gap: 18px; align-content: start; padding: clamp(16px, 2vw, 24px); border-radius: 20px; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px var(--line); }
.ts-field { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.ts-field legend { padding: 0; margin-block-end: 10px; }
.train-settings .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.train-settings .chip { min-height: 44px; }
.t-level { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 14px; }
.t-lock-ico svg { width: 10px; height: 10px; color: var(--gold); }
.chip[aria-pressed="true"] .t-lock-ico svg { color: inherit; }
.ts-help { font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }
.ts-help .text-link { color: var(--gold); text-underline-offset: 3px; }
.train-settings .tune { max-width: none; }
.train-settings .toggle { font-size: .875rem; }

/* ------------------------------------------------------------ play */
.train-play { display: grid; gap: 18px; }
.tp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.tp-title { flex: 1 1 240px; min-width: 0; display: grid; gap: 4px; }
.tp-h { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); font-weight: 300; letter-spacing: -.02em; line-height: 1.2; }
:lang(ar) .tp-h { font-weight: 400; letter-spacing: 0; }
.tp-h:focus { outline: none; }
.tp-h:focus-visible { outline: 2px solid var(--accent); }
.tp-round { font-size: .875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-combo { font-size: .875rem; font-weight: 500; color: var(--turq-ink); min-width: 4em; }

.tp-stage { display: grid; gap: clamp(18px, 3vw, 40px); align-items: center; }
@media (min-width: 900px) { .tp-stage { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); } }
.tp-arena {
  position: relative; width: 100%; max-width: 680px; aspect-ratio: 1; margin-inline: auto;
  border-radius: 24px; overflow: hidden; background: #07080D;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 100px -50px rgba(131, 148, 255, .45);
}
.tp-arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.tp-labels { position: absolute; inset: 0; pointer-events: none; }
.tl { position: absolute; transform: translate(-50%, -50%); font-size: clamp(.6875rem, .6rem + .35vw, .875rem); color: rgba(242, 243, 247, .72); white-space: nowrap; text-shadow: 0 0 8px #07080D, 0 0 2px #07080D; }
.tl.is-tonic { color: var(--ink); font-weight: 500; }
.tl.is-mark { color: var(--turq-ink); font-weight: 500; }
.tl.is-wrong { color: #FFB4A2; }
.tp-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; pointer-events: none; padding: 30%; }
.tp-center-k { font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
:lang(ar) .tp-center-k { letter-spacing: 0; font-size: .8125rem; }
.tp-center b { font-size: clamp(1.1rem, .8rem + 1.8vw, 2.1rem); font-weight: 300; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tp-center-s { font-size: .8125rem; color: var(--turq-ink); }

.tp-panel { display: grid; gap: 16px; align-content: center; min-width: 0; }
.tp-prompt { font-size: clamp(1.2rem, 1rem + .9vw, 1.6rem); line-height: 1.3; min-height: 1.3em; }
.tp-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tp-choices:empty { display: none; }
.tp-choices.is-five { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.tc-choice {
  min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .035); color: var(--ink); text-align: start;
  font: 500 1rem/1.25 var(--sans); cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .2s var(--ease), opacity .3s;
}
.tc-choice span { display: grid; gap: 2px; min-width: 0; }
.tc-choice small { font-size: .75rem; font-weight: 400; color: var(--ink-2); }
.tc-choice kbd { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); font: 500 .75rem var(--sans); color: var(--ink-2); }
.tc-choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.tc-choice:active:not(:disabled) { transform: scale(.97); }
.tc-choice:disabled { cursor: default; opacity: .5; }
.tc-choice.is-right { opacity: 1; border-color: var(--turq); background: rgba(63, 207, 196, .14); }
.tc-choice.is-right kbd { border-color: var(--turq); color: var(--turq-ink); }
.tc-choice.is-wrong { opacity: 1; border-color: var(--red); background: rgba(255, 106, 72, .12); }
@media (hover: none) { .tc-choice kbd, .tp-keys { display: none; } }
.tp-meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tp-meter span { display: block; height: 100%; width: 0; background: var(--turq); border-radius: inherit; transition: width .12s linear; }
.tp-feedback { min-height: 1.6em; color: var(--ink-2); }
.tp-feedback[data-kind="right"] { color: var(--turq-ink); }
.tp-feedback[data-kind="wrong"] { color: #FFB4A2; }
.tp-keys { font-size: .75rem; color: var(--ink-2); opacity: .8; }

.tp-intro { max-width: 680px; }
.tp-intro:empty { display: none; }
.tp-card { display: grid; gap: 14px; justify-items: start; padding: clamp(20px, 3vw, 34px); border-radius: 20px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.tp-card p { max-width: 40em; color: var(--ink-2); }
.tp-card > p:first-of-type { color: var(--ink); }
.tp-card-h { font-size: var(--t1); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.tp-card-sub { font-size: .9375rem; }
.tp-card.is-lock { background: linear-gradient(135deg, rgba(255, 210, 127, .1), rgba(131, 148, 255, .08)); box-shadow: inset 0 0 0 1px rgba(255, 210, 127, .3); }
.tp-card-note { font-size: .875rem; color: var(--gold); }
.tp-card-note .text-link { color: inherit; }
.tp-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tp-meta li { font-size: .8125rem; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--ink); }
.tp-mic { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border-inline-start: 3px solid var(--accent); }
.tp-mic p { font-size: .9375rem; color: var(--ink); }
.tp-mic p + p { color: var(--ink-2); font-size: .875rem; }

/* ------------------------------------------------------------ the end of a session */
.train-done { display: grid; }
.td-body { display: grid; gap: 18px; justify-items: start; max-width: 680px; }
.td-h { font-size: var(--t2); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
:lang(ar) .td-h { font-weight: 400; letter-spacing: 0; }
.td-h:focus { outline: none; }
.td-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.td-big { font-size: var(--t3); font-weight: 300; letter-spacing: -.04em; line-height: 1; }
:lang(ar) .td-big { letter-spacing: 0; }
.td-xp { font-size: var(--t1); color: var(--turq-ink); }
.td-xp span { font-size: .875rem; color: var(--ink-2); }
.td-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.td-lines li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.td-lines li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.td-rank { display: grid; gap: 8px; width: min(100%, 360px); }
.td-rank p { font-weight: 500; }
.td-rank span { font-weight: 400; color: var(--ink-2); font-size: .8125rem; margin-inline-start: 6px; }

/* ------------------------------------------------------------ toast */
.train-toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; font-size: .9375rem;
  background: rgba(15, 17, 24, .94); box-shadow: inset 0 0 0 1px rgba(131, 148, 255, .45), 0 20px 50px -20px rgba(0, 0, 0, .9);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.train-toast:empty { display: none; }
.train-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ progress */
.train-progress, .train-xr { position: relative; z-index: 1; }
.tpr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.tpr-card { display: grid; gap: 14px; align-content: start; padding: clamp(18px, 2.4vw, 28px); }
.tpr-stats { grid-column: 1 / -1; }
.tpr-h { font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em; }
.tpr-note { font-size: .875rem; color: var(--ink-2); }
.tpr-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.tpr-badge { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); opacity: .6; }
.tpr-badge b { font-size: .875rem; font-weight: 500; line-height: 1.3; }
.tpr-badge span:last-child { font-size: .75rem; line-height: 1.4; color: var(--ink-2); }
.tpr-seal { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--line); margin-block-end: 4px; }
.tpr-badge.is-earned { opacity: 1; background: rgba(131, 148, 255, .1); box-shadow: inset 0 0 0 1px rgba(131, 148, 255, .4); }
.tpr-badge.is-earned .tpr-seal { border: 0; background: radial-gradient(circle at 40% 35%, #fff 0 12%, var(--turq) 13% 42%, var(--accent) 43% 100%); box-shadow: 0 0 18px rgba(131, 148, 255, .6); }
.tpr-bests { margin: 0; display: grid; gap: 10px; }
.tpr-bests > div { display: grid; gap: 4px; padding-block-end: 10px; border-bottom: 1px solid var(--line); }
.tpr-bests dt { font-weight: 500; font-size: .9375rem; }
.tpr-bests dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; color: var(--ink-2); }
.tpr-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tpr-card .chip { min-height: 44px; }
.tpr-data { margin-block-start: 8px; }
.tpr-import { cursor: pointer; position: relative; }
.tpr-import:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

[data-t-stats] { position: relative; display: grid; gap: 22px; }
.tps-block { display: grid; gap: 10px; }
.tps-block h4 { margin: 0; font-size: .9375rem; font-weight: 500; }
.train-chart { width: 100%; height: auto; aspect-ratio: 560 / 180; max-width: 760px; overflow: visible; }
.tc-base { stroke: var(--line); stroke-width: 1; }
.tc-hit { fill: transparent; }
.tc-bar { fill: rgba(131, 148, 255, .5); }
.tc-bar.is-met { fill: var(--accent); }
.tc-bar.is-today { stroke: var(--ink); stroke-width: 1.5; }
.tc-empty { fill: rgba(255, 255, 255, .14); }
.tc-goal { stroke: var(--turq); stroke-width: 1; stroke-dasharray: 4 4; }
.tc-goal-text { fill: var(--turq-ink); font: 500 11px var(--sans); }
.tc-day { fill: var(--ink-2); font: 400 11px var(--sans); }
.tc-day.is-today { fill: var(--ink); font-weight: 500; }
g:hover > .tc-bar { fill: var(--accent-ink); }
.tps-bars, .tps-weak { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tps-bars li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(60px, 1.4fr) auto; align-items: center; gap: 12px; font-size: .875rem; }
.tps-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tps-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tps-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--turq)); border-radius: inherit; }
[dir="rtl"] .tps-track span { background: linear-gradient(-90deg, var(--accent), var(--turq)); }
.tps-val { font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: baseline; justify-content: end; min-width: 6.5em; }
.tps-val small { color: var(--ink-2); font-size: .75rem; }
.tps-weak li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: rgba(255, 106, 72, .08); box-shadow: inset 0 0 0 1px rgba(255, 106, 72, .25); }
.tps-weak span { color: var(--ink-2); font-size: .875rem; }
.tps-preview { display: grid; gap: 22px; filter: blur(7px) saturate(.8); opacity: .55; pointer-events: none; user-select: none; }
.tps-lock { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.tps-lock .tp-card { background: rgba(15, 17, 24, .92); max-width: 460px; box-shadow: inset 0 0 0 1px rgba(255, 210, 127, .3), 0 30px 60px -30px rgba(0, 0, 0, .9); }

/* ------------------------------------------------------------ XR teaser */
.txr { display: grid; gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(22px, 4vw, 56px); overflow: hidden; background: radial-gradient(120% 140% at 15% 50%, rgba(131, 148, 255, .18), rgba(13, 15, 22, .74) 60%) !important; }
@media (min-width: 860px) { .txr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.txr-art .orbit { justify-self: center; margin-inline: auto; color: var(--accent-ink); }
.txr-copy { display: grid; gap: 14px; justify-items: start; }
.txr-copy .label { color: var(--accent-ink); }
.txr-h { font-size: var(--t3); font-weight: 300; letter-spacing: -.045em; line-height: 1; text-transform: uppercase; }
:lang(ar) .txr-h { text-transform: none; letter-spacing: 0; font-weight: 400; line-height: 1.2; }
.txr-copy p:not(.label) { color: var(--ink-2); max-width: 34em; }
.txr-small { font-size: .8125rem; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 560px) {
  .train { padding: 14px; border-radius: 18px; }
  .train-hud { gap: 12px 18px; }
  .th-rank { flex-basis: 100%; }
  .th-left { margin-inline-start: 0; }
  .tp-arena { border-radius: 18px; }
  .tc-choice { min-height: 52px; padding: 8px 12px; font-size: .9375rem; }
  .tps-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .tps-track { grid-column: 1 / -1; grid-row: 2; }
}


/* ------------------------------------------------------------ round 2: demos, display, zoom, timer */
.train-reel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; max-width: 46rem; padding: 14px 18px; border-radius: 18px; background: rgba(15, 17, 24, .6); box-shadow: inset 0 0 0 1px rgba(131, 148, 255, .28); text-shadow: none; }
.train-reel > span { flex: 1 1 260px; font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }
.train-reel b { color: var(--ink); font-weight: 500; }

.train-games > li { display: grid; gap: 2px; align-content: start; }
.tg-demo { justify-self: start; min-height: 44px; font-size: .8125rem; color: var(--ink-2); }
.tg-demo:hover { color: var(--ink); }

.train-display { border-top: 1px solid var(--line); padding-top: 14px; }
.train-display summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 500; font-size: .9375rem; list-style: none; }
.train-display summary::-webkit-details-marker { display: none; }
.train-display summary::after { content: ""; width: 8px; height: 8px; margin-inline-start: auto; border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .3s var(--ease); }
.train-display[open] summary::after { transform: rotate(-135deg); }
.train-display .dispset { padding-top: 8px; }

.tp-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); line-height: 1.5; font-size: 1rem; }
.tp-caption:empty { display: none; }
.tp-demo-tag { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
:lang(ar) .tp-demo-tag { letter-spacing: 0; text-transform: none; font-size: .8125rem; }
.is-demo .tc-choice { pointer-events: none; }
.tc-choice.is-demo-pick { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.tp-arena { background: var(--arena-bg, #07080D); touch-action: pan-x pan-y; }
.tl { color: color-mix(in srgb, var(--arena-ink, #F2F3F7) 78%, transparent); text-shadow: 0 0 8px var(--arena-bg, #07080D), 0 0 2px var(--arena-bg, #07080D); }
.tl.is-tonic { color: var(--arena-ink, #F2F3F7); }
.tp-arena.is-light .tp-center, .tp-arena.is-light .tp-center-k { color: var(--arena-ink); }
.tp-arena.is-light .tp-center-s, .tp-arena.is-light .tl.is-mark { color: var(--arena-note); }
.tp-center { transform: translateY(-14%); }
.tp-zoom { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(15, 17, 24, .7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tp-zoom button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); font: 400 1.25rem/1 var(--sans); cursor: pointer; }
.tp-zoom button:hover { background: rgba(255, 255, 255, .08); }
.tp-zoom output { min-width: 3.2em; text-align: center; font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-timer { position: absolute; inset-inline: 18px; inset-block-end: 12px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tp-timer span { display: block; height: 100%; width: 100%; background: var(--arena-note, var(--accent)); }
@media (max-width: 560px) { .tp-zoom button { width: 40px; height: 40px; } }

@media (prefers-reduced-motion: reduce) {
  .train *, .train-toast { transition: none !important; }
  .tg-card:hover { transform: none; }
}
