/* Arena Trials (/trials/) — Read it! card look: deep indigo, gold badges, move colours. */
.tr { --strike: #e8433a; --guard: #2f74f0; --special: #7b55f0; --gold: #ffcd50; --panel: rgba(20, 6, 64, .72); }
.badge-gold { display: inline-block; font-weight: 900; letter-spacing: .1em; font-size: 13px; color: #1a0a4e; background: linear-gradient(#ffe28a, #ffc23d); padding: 8px 16px; border-radius: 999px; box-shadow: 0 4px 0 #b8760a; }

.tr-hero { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 90px) 0 clamp(24px, 4vw, 40px);
  background: radial-gradient(60% 80% at 75% 40%, rgba(122, 76, 240, .55), transparent 70%); }
.tr-hero .wrap { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .tr-hero .wrap { grid-template-columns: 1.2fr .8fr; } }
.tr-hero h1 { font-size: clamp(48px, 9vw, 104px); line-height: .95; margin-top: 18px; text-shadow: 0 6px 0 #1a0a4e, 0 14px 30px rgba(10, 4, 40, .6); }
.tr-hero h1 span { color: var(--gold); }
.tr-hero__art { position: relative; height: clamp(200px, 30vw, 340px); }
.tr-hero__art img { position: absolute; width: auto; height: 100%; filter: drop-shadow(0 18px 24px rgba(8, 2, 40, .55)); }
.tr-hero__a { left: 0; bottom: 0; z-index: 2; }
.tr-hero__b { right: 0; bottom: 6%; height: 80% !important; opacity: .95; }
@media (max-width: 899px) { .tr-hero__art { display: none; } }

.tr-status { margin-top: 22px; display: inline-grid; gap: 4px; background: var(--panel); border: 2px solid rgba(160, 130, 255, .5); border-radius: 20px; padding: 14px 20px; }
.tr-status__label { font-weight: 900; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.tr-status__big { font-size: clamp(26px, 4vw, 36px); font-weight: 900; }
.tr-status__sub { font-size: 14px; color: var(--muted); }

.tr-block { padding: clamp(24px, 4vw, 44px) 0; }
.tr-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.tr-head h2 { font-size: clamp(28px, 4vw, 40px); }
.tr-kicker, .tr-label { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.tr-msg { margin-top: 10px; font-weight: 700; color: #d9cfff; min-height: 1.4em; }
.tr-msg.is-bad { color: #ffb3a8; }
.tr-score { font-weight: 900; color: var(--gold); }

.tr-account { background: var(--panel); border: 2px solid rgba(160, 130, 255, .45); border-radius: 22px; padding: 20px 22px; }
.tr-account__out, .tr-account__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tr-account h2 { font-size: 22px; margin-bottom: 4px; }
.tr-addr { font-weight: 800; word-break: break-all; }
.tr-x label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.tr-x div { display: flex; align-items: center; gap: 6px; }
.tr-x input { width: 160px; background: rgba(255, 255, 255, .08); border: 1.5px solid var(--line); border-radius: 10px; color: #fff; padding: 8px 10px; font: inherit; }

.tr-days { display: grid; gap: 18px; }
@media (min-width: 900px) { .tr-days { grid-template-columns: repeat(3, 1fr); } }
.tr-day { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.tr-day__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tr-day__head h3 { font-size: 20px; }
.tr-day__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tr-tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; border: 2px solid rgba(160, 130, 255, .4);
  background: linear-gradient(180deg, rgba(122, 76, 240, .35), rgba(20, 6, 64, .8)); color: #fff; font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.tr-tile:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); }
.tr-tile:disabled { cursor: default; opacity: .5; min-height: 150px; place-content: center; }
.tr-tile img { width: 72px; height: 72px; filter: drop-shadow(0 6px 8px rgba(8, 2, 40, .5)); }
.tr-tile__n { position: absolute; left: 10px; top: 8px; font-weight: 900; font-size: 13px; color: var(--muted); }
.tr-tile__lock { font-size: 28px; }
.tr-tile__tier { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #2f74f0; }
.tr-tile__tier.tier-0, .tr-tile__tier.tier-1 { background: #23a45a; }
.tr-tile__tier.tier-2, .tr-tile__tier.tier-3 { background: #2f74f0; }
.tr-tile__tier.tier-4 { background: #c27a12; }
.tr-tile__tier.tier-5 { background: #d0452f; }
.tr-tile__tier.tier-6 { background: #8a2be2; }
.tr-tile__st { font-size: 12.5px; color: #d9cfff; text-align: center; }
.tr-tile.is-solved { border-color: rgba(255, 205, 80, .8); }
.tr-tile.is-done { opacity: .8; }

.tr-arena { background: linear-gradient(180deg, rgba(26, 10, 78, .6), rgba(26, 10, 78, 0)); }
.tr-grid { display: grid; gap: 18px; }
@media (min-width: 980px) { .tr-grid { grid-template-columns: 1fr 1.15fr; } }
.tr-card { background: var(--panel); border: 2px solid rgba(160, 130, 255, .45); border-radius: 22px; padding: 18px; }
.tr-card h3 { font-size: 20px; }
.tr-card--plan > h3 { margin: 18px 0 10px; }
.tr-fh { display: flex; gap: 14px; align-items: center; }
.tr-fh img { width: 96px; height: 96px; flex: none; filter: drop-shadow(0 8px 10px rgba(8, 2, 40, .5)); }
.tr-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tr-stats div { background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 4px 8px; }
.tr-stats dt { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tr-stats dd { margin: 0; font-weight: 900; }
.tr-style { margin-top: 16px; display: grid; gap: 8px; }
.tr-bar { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; }
.tr-bar__track { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tr-bar__fill { display: block; height: 100%; border-radius: 999px; }
.mvbg--strike { background: var(--strike); } .mvbg--guard { background: var(--guard); } .mvbg--special { background: var(--special); }
.tr-facts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.tr-facts li { display: grid; gap: 2px; background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 10px 12px; }

.mv { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 900; border-radius: 999px; padding: 5px 12px 5px 9px; white-space: nowrap; }
.mv i { font-style: normal; }
.mv--sm { font-size: 13px; padding: 3px 10px 3px 7px; }
.mv--strike { background: linear-gradient(#ff6a55, #c9302c); }
.mv--guard { background: linear-gradient(#5b9bff, #2563eb); }
.mv--special { background: linear-gradient(#a98cff, #6d4ae8); }

.tr-plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tr-round { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 8px 10px; }
.tr-round.is-final { background: rgba(255, 205, 80, .1); }
.tr-round__n { font-weight: 900; font-size: 13px; color: var(--muted); }
.tr-round.is-final .tr-round__n { color: var(--gold); }
.tr-round__moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tr-round__sp { grid-column: 2; font-size: 12px; color: var(--muted); }
.tr-round__sp.is-warn { color: #ffb3a8; font-weight: 800; }
.mvbtn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 42px; border-radius: 12px; border: 2px solid transparent;
  background: rgba(255, 255, 255, .08); color: #d9cfff; font: inherit; font-weight: 900; cursor: pointer; }
.mvbtn i { font-style: normal; }
.mvbtn:hover { color: #fff; }
.mvbtn[aria-checked="true"] { color: #fff; border-color: rgba(255, 255, 255, .7); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.mvbtn--strike[aria-checked="true"] { background: linear-gradient(#ff6a55, #c9302c); }
.mvbtn--guard[aria-checked="true"] { background: linear-gradient(#5b9bff, #2563eb); }
.mvbtn--special[aria-checked="true"] { background: linear-gradient(#a98cff, #6d4ae8); }
@media (max-width: 420px) { .mvbtn span { display: none; } .mvbtn i { font-size: 18px; } .tr-round { grid-template-columns: 54px 1fr; } }
.tr-skill { display: grid; gap: 6px; margin-top: 16px; font-weight: 800; }
.tr-skill select { background: #241066; color: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; }
.tr-skilltext { font-size: 14px; margin-top: 6px; }
.tr-go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.tr-left { font-weight: 800; color: #d9cfff; }

.tr-result { margin-top: 20px; background: var(--panel); border: 2px solid rgba(255, 205, 80, .55); border-radius: 22px; padding: 18px; }
.tr-hps { display: grid; gap: 10px; margin: 12px 0 14px; }
@media (min-width: 760px) { .tr-hps { grid-template-columns: 1fr 1fr; } }
.tr-hp { display: grid; grid-template-columns: 1fr; gap: 4px; }
.tr-hp__name { font-weight: 800; }
.tr-hp__track { height: 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tr-hp__fill { display: block; height: 100%; background: linear-gradient(90deg, #3ddc84, #ffcd50); transition: width .45s ease; }
.tr-hp b { font-size: 13px; color: var(--muted); }
.tr-rounds { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tr-r { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px 10px; align-items: center; background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 8px 10px; animation: tr-in .35s ease both; }
.tr-r__n { font-weight: 900; color: var(--muted); }
.tr-r__mv { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tr-r__vs { font-size: 12px; color: var(--muted); }
.tr-r__dmg { display: flex; gap: 10px; font-variant-numeric: tabular-nums; }
.tr-r__dmg .hit { color: #7dffb0; } .tr-r__dmg .got { color: #ffb3a8; }
.tr-r__tags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-r__tags em { font-style: normal; font-size: 11.5px; font-weight: 900; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: rgba(255, 140, 120, .2); color: #ffc9bf; }
.tr-r__tags em.good { background: rgba(125, 255, 176, .15); color: #b5ffd2; }
.tr-r__tags:empty { display: none; }
@keyframes tr-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tr-end { margin-top: 14px; border-radius: 16px; padding: 14px 16px; }
.tr-end.is-win { background: rgba(255, 205, 80, .14); }
.tr-end.is-loss { background: rgba(255, 255, 255, .06); }
.tr-end__big { font-size: clamp(24px, 4vw, 34px); font-weight: 900; color: var(--gold); }

.tr-board-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); }
.tr-board { width: 100%; border-collapse: collapse; }
.tr-board td.who { word-break: break-all; }
@media (max-width: 480px) { .tr-board th, .tr-board td { padding: 8px 8px; } .tr-board td.who small { display: none; } }
.tr-board th, .tr-board td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.tr-board th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .04); }
.tr-board td.rank, .tr-board td.pts { font-weight: 900; font-variant-numeric: tabular-nums; }
.tr-board tr.is-top td.rank { color: var(--gold); }
.tr-board tr.is-me { background: rgba(255, 205, 80, .12); }
.tr-board a { color: #fff; font-weight: 800; }
.tr-note { margin-top: 10px; font-size: 14px; }
.tr-how ol { padding-left: 1.2em; display: grid; gap: 10px; color: var(--muted); line-height: 1.55; }
.tr-how ol b { color: #fff; }
.tr-how > p { margin-top: 16px; }
.tr-how a { color: #fff; }
@media (prefers-reduced-motion: reduce) { .tr-r { animation: none; } .tr-hp__fill { transition: none; } .tr-tile { transition: none; } }
.tr [hidden] { display: none !important; }
#arena, #result, #play, #board { scroll-margin-top: 84px; }
.tr-grid > *, .tr-day, .tr-days > * { min-width: 0; }
.tr-facts li span, .tr-facts li small { overflow-wrap: anywhere; }
@media (max-width: 480px) { .tr-bar { grid-template-columns: 96px 1fr 40px; } .tr-card { padding: 14px; } }
