/* The server's banner style: painted green and navy, cream lettering, cut corners. */

:root {
  --navy: #12233a;
  --navy-2: #0d1a2c;
  --panel: #182d47;
  --teal: #1f5c63;
  --green: #2f8c66;
  --green-light: #4fae7b;
  --cream: #f5e9d8;
  --muted: #b5c2bb;
  --line: rgba(245, 233, 216, .18);
  --cut: 16px;
  --display: "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  --body: "Vazirmatn", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--navy); color: var(--cream); font: 400 17px/1.8 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.25; margin: 0; }
h2 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 20px; }
h3 { font-size: 24px; margin-bottom: 8px; }
code { font: 600 15px Consolas, monospace; background: var(--navy-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--green-light); outline-offset: 2px; }

/* Each language shows only under its own document language. */
html[lang="ar"] .en, html[lang="en"] .ar { display: none; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--cream); color: var(--navy); padding: 8px 14px; z-index: 30; }
.skip:focus { top: 8px; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 4vw, 40px); background: rgba(13, 26, 44, .94); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px var(--display); white-space: nowrap; }
.nav nav { display: flex; gap: 20px; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav nav a { background: linear-gradient(var(--green-light), var(--green-light)) no-repeat center bottom / 0 2px; transition: background-size .2s, color .15s; padding-bottom: 3px; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--cream); background-size: 100% 2px; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.lang { background: none; border: 1px solid var(--line); color: var(--cream); font: 500 15px var(--body); padding: 6px 12px; cursor: pointer; }
.lang:hover { border-color: var(--cream); }

.btn:active { translate: 0 1px; }
.btn { display: inline-block; background: var(--cream); color: var(--navy); font-weight: 700; font-size: 19px; text-decoration: none; padding: 13px 30px; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); transition: background .15s; }
.btn:hover { background: #fff; }
.btn.ghost { background: rgba(13, 26, 44, .7); color: var(--cream); }
.btn.ghost:hover { background: var(--navy-2); }
.btn.small { font-size: 16px; padding: 7px 18px; --cut: 8px; }

.hero { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: grid; place-items: center; text-align: center; padding: 56px 16px 64px; }
.hero-bg { position: absolute; inset: -3%; background: linear-gradient(rgba(13, 26, 44, .3), rgba(13, 26, 44, .46) 62%, var(--navy)), url("/assets/painting.webp") center / cover; animation: drift 34s ease-in-out infinite alternate; }
#dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; }
.hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-logo { margin: 0 auto 14px; width: 132px; border-radius: 50%; }
h1 { font-size: clamp(46px, 10vw, 100px); font-weight: 900; letter-spacing: -1px; text-shadow: 0 3px 22px rgba(0, 0, 0, .7); }
.tagline, .lede, .facts { text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.tagline { font: 800 clamp(22px, 4vw, 32px)/1.4 var(--display); margin: 6px 0 8px; }
.lede { font-size: clamp(18px, 2.4vw, 21px); margin: 0 auto 26px; max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px clamp(20px, 5vw, 48px); margin-top: 34px; font-size: 16px; }
.facts li { display: flex; align-items: baseline; gap: 8px; }
.facts b { font: 900 30px var(--display); }

.section { padding: clamp(56px, 8vw, 92px) 0; }
/* Torn paper edges between sections, the same idea as the server's video transitions. */
.hero::after, .band::before, .band::after { content: ""; position: absolute; inset-inline: 0; height: 26px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221200%22%20height%3D%2226%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22%2312233a%22%20d%3D%22M0%2026V11l42-7%2037%209%2058-11%2041%2012%2066-9%2029%208%2071-12%2044%2013%2062-10%2035%207%2079-9%2038%2011%2061-12%2047%2010%2083-8%2031%209%2069-11%2045%2012%2058-9%2033%207%2054-10%2018%204v16z%22%2F%3E%3C%2Fsvg%3E") center bottom / 1200px 26px repeat-x; pointer-events: none; }
.hero::after, .band::after { bottom: -1px; }
.band::before { top: -1px; transform: scaleY(-1); }
.band { position: relative; background: linear-gradient(rgba(13, 34, 44, .68), rgba(13, 30, 44, .76)), url("/assets/painting.webp") center / cover fixed; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(800px, 100% - 32px); }
.eyebrow { color: #6fd29c; font-weight: 700; margin: 0 0 4px; }
.body { max-width: 720px; margin: 0 0 18px; }
.note { margin: 20px 0 6px; }
.fine { color: var(--muted); font-size: 15px; margin: 20px 0 0; }

/* Things arrive once as they scroll in, and then stay still. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 55ms); }
.reveal.in { opacity: 1; transform: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.tile { background: var(--panel); border-top: 3px solid var(--green); padding: 24px; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.tile p { margin: 0; color: var(--muted); }
.grid .tile { transition: background .18s, translate .18s; }
.grid .tile:hover { background: #1e3756; translate: 0 -3px; }

.guide { margin-top: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.points { display: grid; gap: 7px; color: var(--muted); font-size: 16px; }
.points li { padding-inline-start: 16px; position: relative; }
.points li::before { content: ""; position: absolute; inset-inline-start: 0; top: .72em; width: 7px; height: 7px; background: var(--green-light); }

.explorer { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; margin-top: 12px; }
.rank-detail { background: var(--panel); padding: 24px 18px; text-align: center; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); position: sticky; top: 76px; }
.rank-big { width: 170px; height: 170px; object-fit: contain; margin: 0 auto 4px; }
.rank-detail h3 { font-size: 30px; margin-bottom: 4px; }
.rank-meta { margin: 0; color: var(--muted); font-size: 15.5px; }
.subranks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 16px; }
.subranks button { background: none; border: 0; color: var(--muted); padding: 3px 0; cursor: pointer; font: 700 12px var(--body); }
.subranks img { width: 100%; max-width: 44px; height: auto; margin: 0 auto; }
.subranks button[aria-pressed="true"] { background: rgba(245, 233, 216, .13); color: var(--cream); }
.subranks button:hover { color: var(--cream); }
.rank-bars { display: grid; gap: 3px; }
.bar { display: grid; grid-template-columns: 36px 84px 1fr 52px; align-items: center; gap: 8px; background: none; border: 0; color: var(--cream); padding: 5px 8px; font: 500 15px var(--body); text-align: start; cursor: pointer; transition: background .15s; }
.bar:hover { background: rgba(245, 233, 216, .07); }
.bar[aria-pressed="true"] { background: rgba(245, 233, 216, .13); font-weight: 800; }
.bar img { width: 34px; height: 34px; object-fit: contain; }
.bar-track { height: 13px; background: rgba(245, 233, 216, .08); }
.bar-fill { display: block; height: 100%; width: var(--w, 0%); background: var(--c); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.bar-value { text-align: end; font-size: 14px; color: var(--muted); }
.eternus { margin-top: 18px; background: var(--panel); padding: 20px 24px; }
.eternus h3 { color: #7fd6cf; }
.eternus p { margin: 0 0 12px; color: var(--muted); }
.eternus ul { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; font-size: 15px; }
.eternus b { display: block; font-size: 18px; color: var(--cream); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 60px); align-items: start; }
.split + .wrap { margin-top: 44px; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(step); font: 800 21px/38px var(--display); text-align: center; background: var(--green); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.steps li > span { grid-column: 2; }
.card-shot { margin: 0; }
.card-shot img, .shot { border-radius: 10px; }
.card-shot figcaption { color: var(--muted); font-size: 15px; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-weight: 500; }
.chips li { background: var(--green); padding: 2px 14px; }


.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button { background: var(--panel); color: var(--cream); border: 0; font: 500 16px var(--body); padding: 7px 16px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--cream); color: var(--navy); font-weight: 700; }
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.heroes li { background: var(--panel); text-align: center; font-size: 15px; font-weight: 500; line-height: 1.3; padding-bottom: 8px; }
.heroes li { overflow: hidden; }
.heroes img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; margin-bottom: 6px; background: var(--teal); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.heroes li:hover img { transform: scale(1.09); }

.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rooms h3 { font-family: var(--display); font-size: 21px; }
.rooms .sub { margin-top: 16px; }
.rooms li { color: var(--muted); }

.rules { counter-reset: rule; display: grid; gap: 10px; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 42px 1fr; gap: 12px; background: var(--panel); padding: 12px 16px; }
.rules li::before { content: counter(rule); font: 800 24px/1.3 var(--display); color: var(--green-light); text-align: center; }
.rules li > span { grid-column: 2; }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { font-weight: 700; font-size: 19px; cursor: pointer; }
details p { margin: 10px 0 2px; color: var(--muted); }

.join { text-align: center; padding: 72px 16px; background: linear-gradient(rgba(13, 26, 44, .25), rgba(13, 26, 44, .45)), url("/assets/painting.webp") center 20% / cover; }

.follow { margin: 22px 0 8px; text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 8px; background: rgba(13, 26, 44, .78); color: var(--cream); text-decoration: none; font-weight: 700; padding: 8px 16px; transition: background .15s; }
.social:hover { background: var(--green); }
.socials.small .social { background: none; color: var(--muted); padding: 0; font-weight: 500; font-size: 15px; }
.socials.small .social:hover { color: var(--cream); }
.socials.small { gap: 18px; }
footer { align-items: center; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding: 22px clamp(16px, 4vw, 40px); background: var(--navy-2); color: var(--muted); font-size: 15px; }
footer p { margin: 0; }

/* Home page: copy beside a floating fan of hero cards. */
.hero { text-align: start; }
.hero-split { width: min(1160px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: center; }
.hero-copy { position: relative; }
.hero .lede { margin-inline: 0; }
.hero .cta { justify-content: flex-start; }
.fan { position: relative; height: 430px; direction: ltr; animation: rise .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
.fan-card { position: absolute; top: 30px; left: 50%; width: min(216px, 42%); margin-left: -18%; display: block; background: var(--navy-2); border: 3px solid var(--cream); text-decoration: none; box-shadow: 0 16px 34px rgba(0, 0, 0, .5); transition: scale .22s cubic-bezier(.2, .7, .2, 1); }
.fan-card:hover { scale: 1.05; z-index: 3; }
.fan-card img { width: 100%; }
.fan-card span { display: block; text-align: center; font-weight: 900; font-size: 17px; padding: 3px 0 6px; }
.fan-0 { --r: -11deg; --x: -62%; animation: float 7s ease-in-out infinite; }
.fan-1 { --r: 0deg; --x: 0%; top: 8px; z-index: 2; animation: float 7s -2.3s ease-in-out infinite; }
.fan-2 { --r: 11deg; --x: 62%; animation: float 7s -4.6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(var(--x), 0) rotate(var(--r)); } 50% { transform: translate(var(--x), -11px) rotate(calc(var(--r) * 1.12)); } }

.tag { display: inline-block; background: var(--cream); color: var(--navy); font-weight: 800; font-size: 14px; padding: 2px 12px; transform: rotate(-2deg); }
.wobble { animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(1.6deg); } }

/* A note drawn on by hand beside the main button. */
.chalk { display: flex; align-items: flex-start; gap: 2px; margin-top: 6px; color: var(--cream); font-weight: 700; }
.chalk svg { flex: none; }
html[dir="ltr"] .chalk svg { transform: scaleX(-1); }
.chalk span { margin-top: 44px; animation: rise .5s 1.5s both; }
.chalk-line { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s .7s ease-out forwards; }
.chalk-line.late { animation: draw .3s 1.65s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.door { position: relative; display: block; overflow: hidden; background: var(--panel); text-decoration: none; padding: 24px; min-height: 170px; border-top: 3px solid var(--green); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); transition: background .18s, translate .18s; }
.door:hover { background: #1e3756; translate: 0 -4px; }
.door p { margin: 0; color: var(--muted); font-size: 16px; }
.door-num { position: absolute; inset-inline-end: 14px; bottom: -8px; font: 900 76px/1 var(--display); color: rgba(245, 233, 216, .08); }
.door-go { position: absolute; inset-inline-start: 24px; bottom: 12px; font-weight: 800; color: #6fd29c; transition: translate .18s; }
html[dir="ltr"] .door-go { transform: scaleX(-1); }
.door:hover .door-go { translate: 0 0; color: var(--cream); }

.page-head { padding: clamp(38px, 6vw, 62px) 0 26px; background: linear-gradient(rgba(13, 26, 44, .5), var(--navy)), url("/assets/painting.webp") center 18% / cover; }
.page-title { font-size: clamp(38px, 7vw, 66px); font-weight: 900; animation: rise .6s both; }
.lede-left { max-width: 640px; margin: 6px 0 0; }
.section.tight { padding-top: 28px; }

.hero-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
#hero-search { background: var(--navy-2); border: 1px solid var(--line); color: var(--cream); font: 500 16px var(--body); padding: 8px 14px; flex: 1 1 240px; max-width: 320px; }
.hero-tools .filters { margin: 0; }
.hero-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
.hero-cards li[hidden] { display: none; }
.hero-card { display: block; position: relative; overflow: hidden; background: var(--panel); text-decoration: none; transition: translate .2s cubic-bezier(.2, .7, .2, 1); }
.hero-card:hover { translate: 0 -5px; }
.hero-card img { width: 100%; aspect-ratio: 280 / 380; object-fit: cover; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.hero-card:hover img { transform: scale(1.06); }
.hero-card-text { position: absolute; inset-inline: 0; bottom: 0; display: grid; text-align: center; padding: 26px 6px 7px; background: linear-gradient(transparent, rgba(13, 26, 44, .95) 58%); line-height: 1.3; }
.hero-card-text b { font-weight: 800; font-size: 16px; }
.hero-card-text small { color: var(--muted); font-size: 14px; }

.hero-head { padding: clamp(24px, 4vw, 40px) 0 24px; background: linear-gradient(rgba(13, 26, 44, .55), var(--navy)), url("/assets/painting.webp") center 18% / cover; }
.hero-head-inner { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 30px); align-items: flex-end; }
.hero-portrait { width: clamp(118px, 18vw, 180px); border: 3px solid var(--cream); box-shadow: 0 14px 30px rgba(0, 0, 0, .45); animation: rise .6s both; }
.back { color: #6fd29c; font-weight: 700; font-size: 15px; }
.hero-ar { font-weight: 800; font-size: 24px; margin: 0 0 8px; }
.guide-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(22px, 4vw, 42px); align-items: start; }
.guide-main h2 { font-size: 30px; margin: 30px 0 12px; }
.guide-main > h2:first-of-type { margin-top: 0; }
.en-note { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.abilities { display: grid; gap: 10px; }
.ability { display: grid; grid-template-columns: 72px 1fr; gap: 14px; background: var(--panel); padding: 14px; }
.ability img { width: 72px; height: 72px; object-fit: contain; }
.ability-num { display: grid; place-items: center; width: 72px; height: 72px; font-size: 28px; background: var(--navy-2); }
.ability h3 { font-size: 19px; margin-bottom: 4px; text-align: start; }
.ability p { margin: 0; color: var(--muted); font-size: 16px; }
.slot { display: inline-grid; place-items: center; width: 26px; height: 26px; background: var(--green); font-weight: 800; font-size: 15px; }
.tips { display: grid; gap: 8px; }
.tips li { background: var(--panel); padding: 10px 14px; font-size: 16px; }
.phases { display: grid; gap: 16px; }
.phase h3 { font-size: 18px; margin-bottom: 8px; color: #6fd29c; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.items li { text-align: center; line-height: 1.25; }
.item-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 4px; color: var(--navy); font-weight: 800; transition: scale .15s; }
.items li:hover .item-icon { scale: 1.1; }
.item-icon img { width: 44px; height: 44px; }
.items small { font-size: 12.5px; color: var(--muted); }
.guide-side { display: grid; gap: 12px; position: sticky; top: 76px; }
.side-box { background: var(--panel); padding: 14px; }
.side-box h3 { font-size: 16px; }
.order { display: flex; align-items: center; gap: 8px; }
.order .arrow { color: var(--muted); }
.match { --edge: var(--cream); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.match.hard { --edge: #d9604c; }
.match.easy { --edge: #4fae7b; }
.match.pair { --edge: #e6b422; }
.match a { display: flex; flex-direction: column; height: 100%; background: var(--navy-2); border: 1px solid var(--line); border-top: 3px solid var(--edge); text-align: center; text-decoration: none; overflow: hidden; transition: border-color .15s, translate .15s; }
.match a:hover { border-color: var(--edge); translate: 0 -2px; }
.match img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; background: var(--teal); transition: transform .2s; }
.match a:hover img { transform: scale(1.06); }
.match span { display: grid; place-items: center; flex: 1; min-height: 38px; padding: 4px 3px; font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.side-box h3 { margin-bottom: 10px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; font-weight: 700; }

/* My Stats */
.login-box { max-width: 520px; margin: clamp(24px, 6vw, 60px) auto; background: var(--panel); padding: 34px 24px; text-align: center; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); animation: rise .5s both; }
.login-box img { margin: 0 auto 10px; border-radius: 50%; }
.login-box .page-title { font-size: 34px; }
.login-box p { color: var(--muted); margin: 8px 0 18px; }
.logout { margin-top: 12px; }
.logout button, .me-actions button { background: none; border: 1px solid var(--line); color: var(--muted); font: 500 14px var(--body); padding: 5px 12px; cursor: pointer; }
.logout button:hover, .me-actions button:hover { color: var(--cream); border-color: var(--cream); }
.me-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.me img { border-radius: 50%; }
.me-actions { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.stats-top { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; animation: rise .5s both; margin-bottom: 30px; align-items: start; }
.rank-panel { background: var(--panel); border-top: 3px solid var(--c); padding: 22px 14px; text-align: center; }
.rank-panel h2 { color: var(--c); font-size: 28px; margin: 4px 0; }
.trend-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.trend-wrap small { color: var(--muted); font-size: 14px; }
.mode-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mode-tabs button, .more { background: var(--panel); border: 0; color: var(--cream); font: 500 15px var(--body); padding: 7px 15px; cursor: pointer; transition: background .15s; }
.mode-tabs button:hover, .more:hover { background: #1e3756; }
.mode-tabs button[aria-pressed="true"] { background: var(--cream); color: var(--navy); font-weight: 800; }
.more { display: block; width: 100%; margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--panel); padding: 11px 13px; min-width: 0; }
.stat small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.stat b { display: block; font-size: 22px; font-weight: 800; text-align: start; white-space: nowrap; }
.quiet .stats-top, .quiet .matches li, .quiet .cmp-track span, .quiet .trend polyline { animation-duration: 0s; animation-delay: 0s; }
.good { color: #6fd29c; }
.bad { color: #e8806d; }
.trend { display: block; width: 100%; height: 86px; margin-top: 6px; }
.trend polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .2s ease-out forwards; }
.bests { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 30px; }
.best { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; background: var(--panel); padding: 10px; }
.best img, .best .no-face { width: 62px; height: 62px; object-fit: cover; object-position: top; background: var(--teal); }
.best span { display: grid; line-height: 1.3; }
.best small { color: var(--muted); font-size: 13.5px; }
.best small[dir="ltr"] { text-align: start; }
.best b { font-size: 24px; font-weight: 800; text-align: start; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 30px; }
.panel { background: var(--panel); padding: 18px; }
.panel h2 { font-size: 24px; margin-bottom: 6px; }
.panel-note { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.cmp { margin-bottom: 12px; }
.cmp-head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.cmp-track { height: 9px; background: rgba(245, 233, 216, .1); margin: 3px 0; }
.cmp-track span { display: block; height: 100%; background: var(--green-light); animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: inline-start; }
html[dir="rtl"] .cmp-track span { transform-origin: right; }
html[dir="ltr"] .cmp-track span { transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.cmp small { color: var(--muted); font-size: 13px; }
.activity { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; align-items: end; height: 92px; margin: 12px 0 16px; }
.activity span { background: rgba(245, 233, 216, .1); }
.activity .on { background: var(--green-light); }
.form-title { font-size: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 4px; }
.form-row span { width: 18px; height: 18px; background: var(--muted); }
.form-row .won { background: var(--green-light); }
.form-row .lost { background: #d9604c; }
.form-row small { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-bottom: 30px; }
.hero-table { width: 100%; min-width: 480px; border-collapse: separate; border-spacing: 0 4px; font-size: 15.5px; }
.hero-table th { color: var(--muted); font-weight: 500; font-size: 14px; text-align: center; padding: 2px 8px; }
.hero-table th:first-child { text-align: start; }
.hero-table th button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 3px 6px; }
.hero-table th button:hover { color: var(--cream); }
.hero-table th button[aria-pressed="true"] { color: var(--cream); font-weight: 800; border-bottom: 2px solid var(--green-light); }
.hero-table td { background: var(--panel); padding: 6px 8px; text-align: center; }
.tbl-hero { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tbl-hero img, .tbl-hero .no-face { width: 42px; height: 42px; object-fit: cover; object-position: top; background: var(--teal); flex: none; }
a.tbl-hero:hover b { color: #6fd29c; }
.matches { display: grid; gap: 5px; }
.matches li { display: grid; grid-template-columns: 50px minmax(120px, 1.4fr) 56px 1fr .7fr .7fr .7fr .6fr; align-items: center; gap: 12px; background: var(--panel); padding-block: 6px; padding-inline: 0 14px; border-inline-start: 4px solid var(--muted); animation: rise .35s both; }
.matches .won { border-inline-start-color: var(--green-light); }
.matches .lost { border-inline-start-color: #d9604c; }
.matches img, .matches .no-face { width: 50px; height: 50px; object-fit: cover; object-position: top; background: var(--teal); display: block; margin-inline-start: 6px; }
.m-hero { display: grid; justify-items: start; line-height: 1.3; min-width: 0; }
.m-hero small { color: var(--muted); font-size: 13.5px; }
.won .m-result { color: #6fd29c; font-weight: 800; }
.lost .m-result { color: #e8806d; font-weight: 800; }
.m-cell { display: grid; justify-items: center; line-height: 1.3; min-width: 0; }
.m-cell small { color: var(--muted); font-size: 12.5px; }
.m-cell b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.matches .m-none { display: block; color: var(--muted); border: 0; padding: 14px; }

@media (max-width: 860px) {
  .split, .explorer, .guide, .guide-page, .hero-split { grid-template-columns: minmax(0, 1fr); }
  .guide-side { position: static; }
  .stats-top { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 20px; }
  .matches li { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 8px; }
  .m-extra { display: none; }
  .m-delta { display: none; }
  .fan { height: 330px; }
  .fan-card { width: min(170px, 42%); margin-left: -21%; }
  .nav { flex-wrap: wrap; }
  .nav nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 16px; font-size: 15px; white-space: nowrap; }
  .rank-detail { position: static; }
  .band { background-attachment: scroll; }
}
@media (max-width: 420px) {
  .brand { font-size: 16px; gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: 8px; }
  .lang { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
