@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Google Sans Flex'; src: url('/fonts/GoogleSansFlex-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --bg: #0e0f13;
  --panel: #14151a;
  --raised: #1a1b21;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f5f7;
  --soft: #b5b7c0;
  --muted: #80838f;
  --faint: #5c5f6b;
  --accent: #ff5a36;
  --good: #3fd17a;
  --bad: #f2474f;
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); color-scheme: dark; }

body {
  font-family: 'Google Sans Flex', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
code { font-family: inherit; font-weight: 700; color: var(--text); background: var(--raised); padding: 1px 7px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
main.wrap { flex: 1; padding-bottom: 80px; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(14, 15, 19, 0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; }
.brand .logo { width: 30px; height: 28px; flex: none; fill: var(--text); }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; }
nav { display: flex; gap: 4px; margin-right: auto; }
nav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; transition: color 0.15s, background 0.15s; }
nav a:hover { color: var(--text); }
nav a.on { color: var(--text); background: var(--raised); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: #140a06; font-weight: 800; font-size: 15px; transition: transform 0.15s, opacity 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 16px; border-radius: 11px; font-size: 14px; }
.btn-ghost { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.lede { color: var(--soft); font-size: 18px; max-width: 620px; margin-top: 18px; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 88px 0 56px; }
.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 72px; }
.stat { padding: 22px 22px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat:last-child { border-right: 0; }
.stat span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }

section { margin-bottom: 64px; }
.head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.head a { color: var(--muted); font-weight: 600; font-size: 14px; }
.head a:hover { color: var(--text); }

.mgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.mcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.15s, transform 0.15s; min-width: 0; }
.mcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.mcard .av { margin-bottom: 14px; }
.mcard strong { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard small { color: var(--muted); font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrank { position: absolute; top: 12px; left: 14px; font-size: 13px; font-weight: 800; color: var(--faint); }
.mmeta { display: flex; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.mmeta b { color: var(--text); font-weight: 800; }

.av { border-radius: 50%; object-fit: cover; background: var(--raised); flex: none; }
.av-empty { display: grid; place-items: center; font-weight: 800; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 16px; padding: 12px 20px 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; transition: border-color 0.15s; }
.row:hover { border-color: var(--line-strong); }
.pos { width: 32px; text-align: center; font-weight: 900; font-size: 18px; color: var(--faint); flex: none; }
.pos.p1 { color: #ffd36b; }
.pos.p2 { color: #e4e7ee; }
.pos.p3 { color: #f0a878; }
.pos.badge-pos { width: 64px; display: flex; align-items: center; justify-content: flex-start; margin-left: -6px; margin-right: 6px; }
.pos.badge-pos img { width: 44px; height: 44px; display: block; }
.pos.pos-top10 { width: 64px; display: flex; align-items: center; justify-content: flex-start; gap: 4px; color: var(--soft); }
.pos.pos-top10 img { width: 30px; height: 30px; display: block; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: 13px; }
.val { font-weight: 800; font-size: 17px; white-space: nowrap; }

.feed { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.feed:hover { border-color: var(--line-strong); }
.feed span { display: flex; flex-direction: column; color: var(--soft); font-size: 15px; }
.feed strong { color: var(--text); font-weight: 700; }
.feed b { color: var(--text); font-weight: 700; }
.feed small { color: var(--faint); font-size: 13px; }

.page-head { padding: 72px 0 40px; margin-bottom: 0; }
.page-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 120px 0; }
.tabs { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); }
.tabs a.on { color: #140a06; background: var(--accent); border-color: var(--accent); }
.board-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; }
.tabs.sort a.on { color: var(--text); background: var(--raised); border-color: var(--line-strong); }

.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ach { display: flex; gap: 16px; align-items: center; padding: 16px 18px 16px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ach strong { font-weight: 800; font-size: 17px; }
.ach p { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; color: var(--t, var(--soft)); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.tag.holo { color: #141519; background: linear-gradient(90deg, #a9c9ff, #ffbbec, #ffc3a0, #a9c9ff) 0 0 / 200% 100%; box-shadow: none; animation: holo 4s linear infinite; }
@keyframes holo { to { background-position: -200% 0; } }
.tag-plain { letter-spacing: 0.02em; text-transform: none; font-weight: 600; color: var(--muted); }

.card-img { display: block; width: 100%; height: auto; border-radius: 3.334% / 8.334%; margin-bottom: 32px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.count { font-size: 14px; color: var(--muted); font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges img.dim { opacity: 0.45; }
.rep { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rep:last-child { border-bottom: 0; }
.rep span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rep small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.rep time { color: var(--faint); font-size: 13px; white-space: nowrap; }
.delta { font-weight: 900; color: var(--good); width: 26px; flex: none; }
.rep.neg .delta { color: var(--bad); }

.empty { color: var(--faint); padding: 24px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; grid-column: 1 / -1; }

.foot { display: flex; justify-content: space-between; padding: 28px 24px 40px; color: var(--faint); font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .mgrid { grid-template-columns: repeat(3, 1fr); }
  .agrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .top-inner { gap: 12px; }
  nav a { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  nav { min-width: 0; overflow-x: auto; scrollbar-width: none; margin-right: 0; }
  .brand { flex: none; }
  .brand span:last-child { display: none; }
  .hero { flex-direction: column-reverse; align-items: flex-start; padding: 48px 0 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(3) { border-right: 1px solid var(--line); }
  .stat:nth-last-child(-n + 2) { border-bottom: 0; }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
  .split, .agrid { grid-template-columns: 1fr; }
  .page-head { padding: 48px 0 28px; }
}

.hero { padding-bottom: 40px; }
.hero h1 { max-width: 820px; }
.hero-card { margin-bottom: 56px; }
.hero-link { display: block; border-radius: 3.334% / 8.334%; }
html.kb .hero-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.note { color: var(--muted); font-size: 14px; margin-top: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.feature img { margin: -6px 0 14px -6px; }
.feature h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 15px; }

.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.feed p { color: var(--soft); }

.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.scard { display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.15s; min-width: 0; }
.scard:hover { border-color: var(--line-strong); }
.sicon { border-radius: 14px; object-fit: cover; background: var(--raised); flex: none; }
.server-head { display: flex; align-items: center; gap: 20px; }
.server-head .sicon { border-radius: 18px; }
.server-head h1 { font-size: clamp(32px, 5vw, 56px); }

.cta { text-align: center; padding: 56px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; }
.cta p { color: var(--soft); max-width: 560px; margin-top: 12px; }

.prose { max-width: 720px; color: var(--soft); font-size: 17px; }
.prose h2 { color: var(--text); margin: 36px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.asset-grid { display: flex; flex-direction: column; gap: 16px; }
.asset { margin: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: 32px; padding: 20px 28px 20px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.asset-img { display: flex; align-items: center; justify-content: center; }
.asset-img img, .asset-img svg { display: block; width: 100%; height: auto; }
.asset.tall .asset-img img, .asset.tall .asset-img svg { max-width: 400px; }
.asset-colors { gap: 8px; }
.asset-colors .swatch span { width: 28px; height: 28px; }
.asset-img.logo { padding: 24px 0; }
.asset-img.logo img { width: 160px; }
.asset figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.asset strong { font-size: 19px; font-weight: 800; }
.asset p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 6px 0 0; }
.asset-meta { display: block; color: var(--faint); font-size: 13px; font-weight: 600; margin-top: 10px; }
.asset-note { margin: -6px 0 8px; }
.asset-sub { display: flex; align-items: baseline; gap: 8px; font-size: 16px; margin: 28px 0 12px; }
.asset-sub small { color: var(--faint); font-size: 13px; font-weight: 600; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; transition: border-color 0.15s, transform 0.15s; }
.badge-tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.badge-tile strong { font-size: 14px; font-weight: 700; color: var(--soft); }
@media (max-width: 760px) {
  .asset { grid-template-columns: 1fr; gap: 18px; padding: 14px 14px 18px; }
  .asset figcaption { padding: 0 4px; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .badge-tile img { width: 72px; height: 72px; }
}
.foot-links a:hover { color: var(--text); }
.kv small { color: var(--muted); font-weight: 600; }

@media (max-width: 980px) {
  .features, .sgrid, .feed-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .features, .sgrid, .feed-grid { grid-template-columns: 1fr; }
  .hero-card { margin-bottom: 36px; }
  .cta { padding: 40px 18px; }
}

.brand .logo { overflow: visible; }
.brand .logo path { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.brand:hover .f-top { transform: translate(16px, -34px); }
.brand:hover .f-bot { transform: translate(-16px, 34px); }

.intro { display: none; }
.intro-on .intro { display: block; position: fixed; inset: 0; z-index: 100; cursor: pointer; animation: intro-gone 0s linear 2.05s forwards; }
.intro-done .intro { display: none; }
.intro-half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--bg); animation: 0.85s cubic-bezier(0.76, 0, 0.24, 1) 1.15s forwards; }
.intro-a { top: 0; animation-name: intro-up; }
.intro-b { bottom: 0; animation-name: intro-down; }
.intro-f { --size: min(176px, 42vw); position: absolute; left: 50%; width: var(--size); height: var(--size); margin-left: calc(var(--size) / -2); fill: var(--text); overflow: visible; }
.intro-a .intro-f { top: calc(100% - var(--size) * 0.4287); }
.intro-b .intro-f { top: calc(var(--size) * -0.4287); }
.intro-a path { animation: intro-in-a 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
.intro-b path { animation: intro-in-b 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
.intro-cut { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: intro-cut 0.4s cubic-bezier(0.65, 0, 0.35, 1) 0.72s forwards, intro-fade 0.25s linear 1.2s forwards; }
@keyframes intro-in-a { from { transform: translate(150px, -330px); opacity: 0; } }
@keyframes intro-in-b { from { transform: translate(-150px, 330px); opacity: 0; } }
@keyframes intro-cut { to { transform: scaleX(1); } }
@keyframes intro-fade { to { opacity: 0; } }
@keyframes intro-up { to { transform: translateY(-100%); } }
@keyframes intro-down { to { transform: translateY(100%); } }
@keyframes intro-gone { to { visibility: hidden; pointer-events: none; } }

.js { --d0: 0.05s; }
.js.intro-on { --d0: 1.3s; }
.js .top { animation: fade-down 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d0) both; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.js .w > span { display: inline-block; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--d0) + var(--i) * 70ms); }
.js .hero .lede { animation: fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d0) + 0.32s) both; }
.js .hero .actions { animation: fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d0) + 0.42s) both; }
.js .tilt { animation: card-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d0) + 0.5s) both; }
@keyframes rise { from { transform: translateY(110%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-100%); } }
@keyframes card-in { from { opacity: 0; transform: perspective(1400px) translateY(48px) rotateX(14deg); } }

.hero { position: relative; }
.hero-text { position: relative; z-index: 1; }
.hero h1 { max-width: 700px; }
.hero-f { position: absolute; right: -24px; top: 50%; width: 520px; height: 520px; margin-top: -250px; fill: #16171d; overflow: visible; pointer-events: none; }
.hero-f .f-top { transform: translate(calc(var(--sy, 0) * 0.22px), calc(var(--sy, 0) * -0.48px)); }
.hero-f .f-bot { transform: translate(calc(var(--sy, 0) * -0.22px), calc(var(--sy, 0) * 0.48px)); }
.js .hero-f .f-top { animation: intro-in-a 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d0) + 0.15s) backwards; }
.js .hero-f .f-bot { animation: intro-in-b 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d0) + 0.15s) backwards; }

.tilt { perspective: 1400px; margin-bottom: 56px; }
.tilt .hero-card { margin-bottom: 0; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s; will-change: transform; }
.tilt.live .hero-card { transition: transform 0.1s linear, box-shadow 0.5s; box-shadow: 0 30px 60px -30px #000; }

.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0s, 0s; }
.js .rv.in { opacity: 1; transform: none; }

.feature { position: relative; overflow: hidden; transition: border-color 0.2s, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feature::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feature:hover { border-color: var(--line-strong); translate: 0 -3px; }
.feature:hover::before { transform: scaleX(1); }
.feature img { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feature:hover img { transform: rotate(-8deg) scale(1.06); }
.row, .scard, .feed { transition: border-color 0.2s, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.row:hover, .scard:hover, .feed:hover { translate: 4px 0; }

.duel { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center; padding: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; }
.duel h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; }
.duel-copy p { color: var(--soft); margin-top: 10px; max-width: 420px; }
.duel-score { display: flex; align-items: flex-start; gap: 18px; margin-top: 30px; }
.duel-score span { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.duel-score b { font-size: 48px; line-height: 1; font-weight: 900; color: var(--text); display: inline-block; }
.duel-score b.pop { animation: score-pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.duel-score i { font-style: normal; font-size: 36px; line-height: 1; font-weight: 800; color: var(--faint); }
.duel-arena { display: flex; align-items: center; justify-content: center; gap: 22px; }
.hand { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.hand-icon { width: 116px; height: 116px; display: grid; place-items: center; border-radius: 26px; background: var(--raised); border: 1px solid var(--line-strong); color: var(--text); transition: border-color 0.25s, color 0.25s, opacity 0.25s, transform 0.25s; }
.hand-icon .q { font-size: 40px; font-weight: 900; color: var(--faint); }
.hand-icon svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.hand.shake .hand-icon { animation: shake 0.3s ease-in-out 3; }
.hand.won .hand-icon { border-color: var(--accent); color: var(--accent); transform: scale(1.04); }
.hand.lost .hand-icon { opacity: 0.4; }
.duel-vs { font-size: 13px; font-weight: 900; letter-spacing: 0.12em; color: var(--faint); }
.duel-msg { text-align: center; color: var(--soft); margin: 24px 0 18px; min-height: 24px; }
.duel-picks { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pick { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 14px; border-radius: 14px; background: var(--raised); color: var(--text); font: inherit; font-weight: 800; font-size: 15px; border: 1px solid var(--line-strong); cursor: pointer; transition: border-color 0.15s, translate 0.15s, opacity 0.15s; }
.pick svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pick:hover { border-color: var(--accent); translate: 0 -2px; }
.pick:active { translate: 0 1px; }
.duel.busy .pick { opacity: 0.5; pointer-events: none; }
.duel-end { display: none; justify-content: center; }
.duel-again { border: 0; font-family: inherit; cursor: pointer; }
.duel.over .duel-picks { display: none; }
.duel.over .duel-end { display: flex; }
@keyframes shake { 50% { transform: translateY(-16px) rotate(-6deg); } }
@keyframes score-pop { 40% { transform: scale(1.35); color: var(--accent); } }

.cta { position: relative; }
.cta-f { width: 52px; height: 48px; fill: var(--accent); margin-bottom: 22px; overflow: visible; }
.cta-f path { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s; }
.js .cta:not(.in) .f-top { transform: translate(110px, -240px); }
.js .cta:not(.in) .f-bot { transform: translate(-110px, 240px); }
.cta:hover .cta-f path { transition-delay: 0s; transition-duration: 0.35s; }
.cta:hover .cta-f .f-top { transform: translate(24px, -52px); }
.cta:hover .cta-f .f-bot { transform: translate(-24px, 52px); }

@media (max-width: 980px) {
  .hero-f { width: 400px; height: 400px; margin-top: -200px; right: -24px; }
  .duel { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero-f { width: 280px; height: 280px; top: 16px; margin-top: 0; right: -16px; }
  .tilt { margin-bottom: 36px; }
  .duel { padding: 26px 18px; gap: 8px; }
  .duel-score { margin-top: 20px; }
  .hand-icon { width: 92px; height: 92px; border-radius: 22px; }
  .hand-icon svg { width: 44px; height: 44px; }
  .pick { height: 44px; padding: 0 14px 0 12px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .tag.holo, .cp-preset.aether, .swatch span.aether, .cp-preview.aether { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .top, .js .w > span, .js .hero .lede, .js .hero .actions, .js .tilt, .js .hero-f path, .hand.shake .hand-icon { animation: none; }
  .js .cta:not(.in) .f-top, .js .cta:not(.in) .f-bot { transform: none; }
}

.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-i { gap: 8px; }
.btn .i { flex: none; fill: currentColor; }
.i-plus { width: 12px; height: 14px; }
.i-discord { width: 19px; height: 15px; }
.add-btn { padding: 0 16px 0 14px; }
.login { padding: 0 16px 0 13px; }
.login:hover { background: #24252d; }
.me { display: flex; align-items: center; gap: 10px; flex: none; height: 38px; border: 0; font-family: inherit; cursor: pointer; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; color: var(--soft); transition: color 0.15s, box-shadow 0.15s; }
.me:hover, .me.on, .pmenu.open .me { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

.dash-head { display: flex; align-items: center; gap: 20px; padding: 56px 0 28px; margin-bottom: 0; flex-wrap: wrap; }
.dash-head .av, .dash-head .sicon { border-radius: 22px; flex: none; }
.dash-head .av { border-radius: 50%; }
.dash-who { flex: 1; min-width: 0; }
.dash-who h1 { font-size: clamp(32px, 5vw, 52px); overflow-wrap: anywhere; }
.dash-who p { color: var(--muted); font-weight: 600; margin-top: 4px; }
.dash-who a { color: var(--soft); }
.dash-who a:hover { color: var(--text); }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-actions form { display: contents; }
.dash-actions button { border: 0; font-family: inherit; cursor: pointer; }

.flash { padding: 13px 18px; border-radius: 14px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--soft); font-weight: 600; font-size: 15px; margin-bottom: 16px; transition: opacity 0.6s, margin 0.6s, padding 0.6s, max-height 0.6s; max-height: 120px; overflow: hidden; }
.flash.ok { color: var(--text); box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--line-strong); }
.flash.err { color: #ffd2c7; box-shadow: inset 3px 0 0 #ff3b3b, inset 0 0 0 1px var(--line-strong); }
.flash.fade { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.dash .card-img { margin-bottom: 24px; }
.dash-side { display: flex; flex-direction: column; gap: 0; position: sticky; top: 92px; }
.dash-side .panel { margin-bottom: 16px; }
.muted-line { color: var(--faint); font-size: 15px; }

.form h2 { margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; position: relative; }
.label { font-weight: 700; font-size: 15px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.label small { color: var(--muted); font-weight: 500; font-size: 13px; }
textarea, select, input[type="text"] { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color 0.15s; }
textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
textarea:focus, select:focus, input[type="text"]:focus { border-color: var(--accent); }
select { appearance: none; padding-right: 40px; cursor: pointer; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 8%27%3E%3Cpath d=%27M1 1.5l5 5 5-5%27 fill=%27none%27 stroke=%27%2380838f%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px; }
select option { background: var(--panel); }
input[name="prefix"] { max-width: 120px; font-weight: 800; letter-spacing: 0.05em; }
.counter { position: absolute; right: 12px; bottom: 10px; color: var(--faint); font-size: 12px; font-weight: 700; pointer-events: none; }
.counter b { color: var(--muted); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; display: block; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px transparent; transition: box-shadow 0.15s, transform 0.15s; }
.swatch span:hover { transform: scale(1.08); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--text); }
html.kb .swatch input:focus-visible + span { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-strong); cursor: pointer; text-align: center; transition: border-color 0.15s, opacity 0.15s, translate 0.15s; height: 100%; }
.tile b { font-size: 13px; font-weight: 700; color: var(--soft); line-height: 1.25; }
.tile span:hover { translate: 0 -2px; }
.tile input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tile input:checked + span b { color: var(--text); }
.tile input:disabled + span { opacity: 0.4; cursor: not-allowed; translate: none; }
html.kb .tile input:focus-visible + span { border-color: var(--accent); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer; margin-bottom: 10px; }
.switch-row span { display: flex; flex-direction: column; gap: 2px; }
.switch-row strong { font-weight: 700; }
.switch-row small { color: var(--muted); font-size: 14px; }
.switch-row small a { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.switch { appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong); position: relative; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s; }
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::after { transform: translateX(18px); background: #140a06; }
html.kb .switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.form-foot { display: flex; justify-content: flex-end; padding-top: 8px; }
.form-foot .btn, .save-bar .btn { border: 0; font-family: inherit; cursor: pointer; min-width: 150px; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.settings .wide { grid-column: 1 / -1; }
.switch-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.switch-grid .switch-row { margin-bottom: 0; }
.log-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; align-items: start; }
.log-head .muted-line { margin-bottom: 0; }
.log-head .field { margin: 6px 0 0; }
.settings .panel { margin-bottom: 0; }
.settings .field:last-child { margin-bottom: 6px; }
.save-bar { position: fixed; z-index: 40; left: 50%; bottom: 20px; width: min(720px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 16px; background: #08090c; box-shadow: 0 0 0 1px var(--line-strong), 0 18px 40px -12px rgba(0, 0, 0, 0.8); transform: translate(-50%, calc(100% + 40px)); opacity: 0; visibility: hidden; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, visibility 0s linear 0.35s, background 0.2s, box-shadow 0.2s; }
.dirty .save-bar { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, visibility 0s, background 0.2s, box-shadow 0.2s; }
.save-msg { color: var(--soft); font-weight: 600; font-size: 15px; }
.save-msg b { color: var(--text); font-weight: 800; }
.save-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.save-bar .btn-sm { min-width: 0; }
.save-bar .btn[type="submit"] { min-width: 132px; }
.btn-text { background: none; color: var(--soft); box-shadow: none; }
.btn-text:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; transform: none; }
.save-bar.warn { background: #3a1214; box-shadow: 0 0 0 1px var(--bad), 0 18px 40px -12px rgba(0, 0, 0, 0.8); }
.save-bar.warn .save-msg, .save-bar.warn .save-msg b { color: #ffe1e2; }
.save-bar.shake { animation: bar-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes bar-shake {
  10%, 90% { transform: translate(calc(-50% - 2px), 0); }
  20%, 80% { transform: translate(calc(-50% + 4px), 0); }
  30%, 50%, 70% { transform: translate(calc(-50% - 7px), 0); }
  40%, 60% { transform: translate(calc(-50% + 7px), 0); }
}
main.wrap { padding-bottom: 120px; }
@media (max-width: 560px) {
  .save-bar { flex-direction: column; align-items: stretch; padding: 14px; gap: 10px; }
  .save-msg { text-align: center; }
  .save-acts { justify-content: stretch; }
  .save-acts .btn { flex: 1; }
}

.slist { display: flex; flex-direction: column; gap: 4px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow strong { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .sicon { border-radius: 12px; }
.srow .btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.dash-side .empty { padding: 16px; font-size: 14px; }

@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .settings { grid-template-columns: 1fr; }
  .switch-grid, .log-head { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .me { padding: 4px 10px 4px 4px; gap: 8px; }
  .dash-btn { padding: 0 12px; }
  .me-label { display: none; }
  .add-btn { width: 38px; padding: 0; }
  .add-btn span { display: none; }
  .dash-head { padding: 36px 0 20px; gap: 16px; }
  .dash-head .av, .dash-head .sicon { width: 56px !important; height: 56px !important; }
  .dash-actions { width: 100%; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .switch-row { gap: 14px; }
}

@media (max-width: 420px) {
  .login { width: 38px; padding: 0; }
  .login span { display: none; }
}

.stabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.stabs::-webkit-scrollbar { display: none; }
.stabs a { flex: none; padding: 9px 16px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 15px; transition: color 0.15s, background 0.15s; }
.stabs a:hover { color: var(--text); }
.stabs a.on { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong); }

.btn-xs { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.btn-danger { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
form.inline { display: inline-flex; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: block; padding: 7px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.chip span:hover { color: var(--text); }
.chip input:checked + span { color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
html.kb .chip input:focus-visible + span { border-color: var(--accent); }

.after-form { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-head h2 { margin-bottom: 0; }
.mlist { display: flex; flex-direction: column; margin-bottom: 8px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mrow small { color: var(--muted); font-size: 13px; }
.mrow .lvl { flex: none; min-width: 64px; font-weight: 800; color: var(--soft); font-size: 14px; }
.mrow .av { flex: none; }
.mrow .acts { display: flex; gap: 6px; flex: none; }
.mrow.conf { align-items: flex-start; }
.mrow.conf .lvl { min-width: 40px; padding-top: 2px; }
.mrow.conf .acts { padding-top: 0; }
.mrow.conf .body { color: var(--soft); font-size: 15px; line-height: 1.45; }
.mrow.gone .body { color: var(--faint); text-decoration: line-through; }
.delta.neg { color: var(--bad); }
.add-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.add-row .field { margin-bottom: 0; }
.add-row .grow { flex: 1; min-width: 0; }
.add-row .btn { border: 0; font-family: inherit; cursor: pointer; flex: none; height: 46px; }
.lvl-field { width: 96px; flex: none; }
input[type="number"] { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color 0.15s; }
input[type="number"]:focus { border-color: var(--accent); }

.mod-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.mod-side > .panel:last-child { flex: 1; }
.mod-grid .panel { margin-bottom: 0; }
.mod-side { display: flex; flex-direction: column; gap: 16px; }
.gw-layout { align-items: start; }
.gw-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.7fr); gap: 12px; }
.gw-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
.gw-grid.five .field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-grid .field { margin-bottom: 20px; }
.gw-sub { display: flex; align-items: baseline; gap: 10px; font-size: 17px; margin: 10px 0 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.gw-sub small { color: var(--muted); font-weight: 500; font-size: 13px; }
.gw-note { margin: -8px 0 18px; }
.gw-boosts { display: flex; flex-direction: column; gap: 8px; }
.gw-boost { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.gw-boost.gw-three { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 96px; }
.gw-item small { line-height: 1.4; }
.gw-hint { margin-top: -4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.gw-result { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; font-size: 14px; font-weight: 600; color: var(--soft); }
.gw-result::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; transform: translateY(-1px); }
.gw-result.none::before { background: var(--faint); }
.gw-result.off::before { background: var(--bad); }
.gw-result.off, .gw-result.none { color: var(--muted); }
.gw-result strong { color: var(--text); font-weight: 700; }
.gw-form .form-foot .btn { min-width: 180px; }
.mod-side .add-row { margin-bottom: 12px; }

@media (max-width: 980px) {
  .mod-grid { grid-template-columns: 1fr; }
  .gw-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .gw-grid, .gw-grid.five { grid-template-columns: 1fr 1fr; }
  .gw-grid:not(.five) .field:first-child { grid-column: 1 / -1; }
  .gw-boost.gw-three { grid-template-columns: minmax(0, 1fr) 96px; }
  .gw-boost.gw-three > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .stabs { margin-left: -4px; margin-right: -4px; }
  .stabs a { padding: 8px 12px; font-size: 14px; }
  .mrow.conf { flex-wrap: wrap; }
  .mrow.conf .acts { width: 100%; padding-left: 52px; }
  .add-row { flex-wrap: wrap; }
  .add-row .grow { flex-basis: 100%; order: -1; }
  .panel-head { flex-wrap: wrap; }
}
.mrow .names { color: var(--muted); font-size: 15px; }
.mrow .names strong { color: var(--text); font-weight: 700; }

.i { fill: currentColor; flex: none; }
.dash-btn.on { background: #24252d; }
.me .av { width: 30px; height: 30px; }
.me .i-chev { width: 10px; height: 10px; color: var(--muted); transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pmenu.open .me .i-chev { transform: rotate(180deg); }
.pmenu { position: relative; flex: none; }
.pmenu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 210px; padding: 6px; border-radius: 16px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 48px -16px rgba(0, 0, 0, 0.7); display: none; }
.pmenu.open .pmenu-list { display: block; animation: pop 0.16s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pmenu-head { padding: 10px 12px 8px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.pmenu-head strong { font-weight: 800; }
.pmenu-list a, .pmenu-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--soft); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; outline: none; }
.pmenu-list .i { width: 16px; height: 16px; color: var(--muted); }
.pmenu-list a:hover, .pmenu-list button:hover, .pmenu-list a:focus-visible, .pmenu-list button:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.pmenu-list a:hover .i, .pmenu-list a:focus-visible .i { color: var(--text); }
.pmenu-list .out:hover, .pmenu-list .out:focus-visible, .pmenu-list .out:hover .i, .pmenu-list .out:focus-visible .i { color: var(--accent); }
.pmenu-list .sep { display: block; height: 1px; margin: 6px 6px; background: var(--line); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.sel { position: relative; }
.sel-native { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; outline: none; transition: border-color 0.15s; }
.sel-btn:hover { border-color: rgba(255, 255, 255, 0.2); }
html.kb .sel-btn:focus-visible, .sel.open .sel-btn { border-color: var(--accent); }
.sel.invalid .sel-btn { border-color: var(--accent); }
.sel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-label.ph { color: var(--muted); }
.sel-btn .i-chev { width: 12px; height: 12px; color: var(--muted); transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sel.open .sel-btn .i-chev { transform: rotate(180deg); }
.sel-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: 288px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 14px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 48px -16px rgba(0, 0, 0, 0.7); display: none; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sel.up .sel-list { top: auto; bottom: calc(100% + 6px); }
.sel.open .sel-list { display: block; animation: pop 0.16s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sel.up.open .sel-list { animation-name: pop-up; }
@keyframes pop-up { from { opacity: 0; transform: translateY(4px); } }
.sel-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: var(--soft); font-size: 15px; font-weight: 600; cursor: pointer; }
.sel-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-opt small { margin-left: auto; padding-left: 12px; color: var(--faint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.sel-opt .i-check { width: 12px; height: 12px; color: var(--accent); visibility: hidden; }
.sel-opt[aria-selected="true"] { color: var(--text); }
.sel-opt[aria-selected="true"] .i-check { visibility: visible; }
.sel-opt.active { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.sel-opt[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

.mgrid-servers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.my-server { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.15s; }
.my-server:hover { border-color: var(--line-strong); }
.my-server .sicon { border-radius: 14px; flex: none; }
.my-server .who strong { font-size: 16px; }
.my-server .btn { flex: none; }
.sub-head { margin-top: 48px; }

@media (max-width: 980px) {
  .mgrid-servers { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .mgrid-servers { grid-template-columns: 1fr; }
  .sub-head { margin-top: 36px; }
}

.val.good, .repn.good { color: var(--good); }
.val.bad, .repn.bad { color: var(--bad); }

html:not(.kb) :focus, html:not(.kb) :focus-visible { outline: none !important; }
html.kb :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.live-card { margin-bottom: 24px; }
.live-card .card-img { margin-bottom: 0; }
svg.card-img { height: auto; overflow: visible; cursor: default; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
svg.card-img * { -webkit-user-select: none; user-select: none; cursor: inherit; }
.hero-link svg.card-img { cursor: pointer; }

.cpick { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-strong); }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: color 0.15s, background 0.15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cp-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-preset { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px transparent; transition: transform 0.15s, box-shadow 0.15s; }
.cp-preset:hover { transform: scale(1.1); }
.cp-preset.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.cp-preset.aether, .swatch span.aether, .cp-preview.aether { background-size: 200% 100%; animation: holo 4s linear infinite; }
.cp-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; }
.cp-sv { position: relative; height: 170px; border-radius: 12px; cursor: crosshair; touch-action: none; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--hue, #f00)); }
.cp-knob { position: absolute; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, 0.5); pointer-events: none; }
.cp-side { display: flex; flex-direction: column; gap: 12px; }
.cp-hue { position: relative; height: 16px; border-radius: 999px; cursor: pointer; touch-action: none; background: linear-gradient(to right, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.cp-hue .cp-knob { top: 50%; width: 20px; height: 20px; }
.cp-stops { display: none; gap: 6px; }
.cpick.grad .cp-stops { display: flex; }
.cp-stop { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 0; border-radius: 10px; background: var(--raised); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: color 0.15s, box-shadow 0.15s; }
.cp-stop span { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.cp-stop.on { color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.cp-row { display: flex; gap: 10px; align-items: center; }
.cp-hex { flex: 1; display: flex; align-items: center; gap: 2px; padding: 0 12px; height: 40px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 700; min-width: 0; }
.cp-hex input[type="text"] { border: 0; background: none; padding: 0; font-weight: 700; font-size: 15px; text-transform: lowercase; height: 100%; }
.cp-hex:focus-within { border-color: var(--accent); }
.cp-angle { display: none; align-items: center; gap: 8px; flex: none; }
.cpick.grad .cp-angle { display: flex; }
.cp-dial { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: grab; touch-action: none; }
.cp-hand { position: absolute; left: 50%; top: 50%; width: 15px; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--text); transform-origin: 0 50%; }
.cp-hand::after { content: ""; position: absolute; right: -3px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.cp-deg { width: 38px; font-size: 14px; font-weight: 700; color: var(--soft); }
.cp-preview { flex: 1; min-height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
@media (max-width: 640px) {
  .cp-body { grid-template-columns: 1fr; }
  .cp-sv { height: 150px; }
}

.solo { max-width: 760px; }
.danger { max-width: 760px; border-color: rgba(242, 71, 79, 0.35); background: linear-gradient(var(--panel), var(--panel)) padding-box; }
.danger h2 { color: #ff9a9f; }
.danger p { color: var(--soft); margin-bottom: 18px; max-width: 560px; }
.btn-bad { background: var(--bad); color: #1c0405; border: 0; font-family: inherit; cursor: pointer; }
.btn-bad:disabled { background: #4a1d20; color: #a4686b; opacity: 1; }

dialog.erase { margin: auto; width: min(480px, calc(100% - 32px)); padding: 0; border: 1px solid rgba(242, 71, 79, 0.35); border-radius: 22px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px -20px #000; }
dialog.erase::backdrop { background: rgba(4, 4, 6, 0.72); }
dialog.erase[open] { animation: dialog-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.erase-step { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.erase-step[hidden] { display: none; }
.erase-step h2 { font-size: 24px; }
.erase-step p { color: var(--soft); }
.erase-count { font-size: 13px; font-weight: 700; color: #ff9a9f; }
.erase-list { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; color: var(--soft); }
.erase-list li::marker { color: var(--bad); }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-strong); cursor: pointer; font-weight: 600; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--bad); border-color: var(--bad); }
.check input:checked::after { content: ""; width: 6px; height: 10px; border: solid #1c0405; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.erase-input[type="text"] { font-weight: 800; letter-spacing: 0.12em; text-align: center; font-size: 18px; }
.erase-input[type="text"]:focus { border-color: var(--bad); }
.erase-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.erase-acts .btn { border: 0; font-family: inherit; cursor: pointer; }

.narrow .lede, .narrow .muted-line { max-width: 520px; }
.narrow .muted-line { margin-top: 14px; }
.narrow .actions { justify-content: center; }
.narrow .actions form .btn { border: 0; font-family: inherit; cursor: pointer; }
.mrow img { flex: none; }
.mlist > .muted-line:only-child { margin: 10px 0 4px; }
