:root {
  --bg0: #0d0e11; --bg1: #14161a; --bg2: #1b1e23; --bg3: #23262c; --bg4: #2a2e35;
  --line: #2a2e35; --text: #eef0f3; --text2: #b4bac3; --text3: #7d8590;
  --accent: #44d62c; --accent-dark: #090e08; --danger: #ff6164; --amber: #f9a92e; --blue: #4c8dff;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg0); color: var(--text); min-height: 100vh;
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(13,14,17,.85); backdrop-filter: blur(12px);
       border-bottom: 1px solid var(--line); }
.top .in { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand img { width: 30px; height: 30px; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--text2); font-size: 14px; }
.top .who { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
       padding: 11px 18px; border-radius: 12px; font-weight: 650; cursor: pointer; transition: background .15s, opacity .15s;
       white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-dark); }
.btn-primary:not(:disabled):hover { background: #57e23f; }
.btn-ghost { background: var(--bg2); border-color: var(--line); }
.btn-ghost:not(:disabled):hover { background: var(--bg3); }
.btn-danger { background: rgba(255,97,100,.12); color: var(--danger); border-color: rgba(255,97,100,.3); }
.btn-danger:not(:disabled):hover { background: rgba(255,97,100,.2); }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
            background: var(--bg2); cursor: pointer; color: var(--text2); }
.icon-btn:hover { background: var(--bg3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.link { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; }
.link:hover { text-decoration: underline; }
.link:disabled { color: var(--text3); cursor: default; text-decoration: none; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 600; }
.input { width: 100%; background: var(--bg0); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(68,214,44,.15); }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0;
           background: none; color: var(--text3); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw .eye:hover { color: var(--text); background: var(--bg2); }
.pw .eye svg { width: 18px; height: 18px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; letter-spacing: .03em; }

.msg { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }
.msg.err { background: rgba(255,97,100,.1); border: 1px solid rgba(255,97,100,.3); color: #ffb2b3; }
.msg.ok { background: rgba(68,214,44,.1); border: 1px solid rgba(68,214,44,.3); color: #a8f29b; }

.auth { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg1); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-card .sub { color: var(--text2); margin: 0 0 22px; }
.auth-card .foot { text-align: center; color: var(--text2); font-size: 14px; margin-top: 18px; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 16px; font-size: 14px; }
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--bg3); }
.steps i.on { background: var(--accent); }

.code { display: flex; gap: 8px; justify-content: space-between; margin: 6px 0 16px; }
.code input { width: 100%; max-width: 54px; height: 60px; text-align: center; font-size: 26px; font-weight: 700;
              background: var(--bg0); border: 1px solid var(--line); border-radius: 12px; outline: none; }
.code input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(68,214,44,.15); }
.resend { text-align: center; font-size: 14px; color: var(--text2); }

.checks { list-style: none; padding: 0; margin: -4px 0 16px; font-size: 13px; color: var(--text3); }
.checks li { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.checks li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bg4); }
.checks li.ok { color: var(--text2); }
.checks li.ok::before { background: var(--accent); }

.linkcode { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: .12em; background: var(--bg0);
            border: 1px dashed var(--line); border-radius: 14px; padding: 14px; margin: 4px 0 14px; }
.center { text-align: center; }
.actions.stack { flex-direction: column; margin-top: 16px; }
.done-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
           background: rgba(68,214,44,.14); color: var(--accent); }
.done-ic svg { width: 28px; height: 28px; }

.stars { display: flex; align-items: center; gap: 4px; margin: 0 0 16px; }
.stars button { width: 38px; height: 38px; border: 0; background: none; padding: 2px; cursor: pointer; color: var(--bg4);
                transition: transform .1s, color .1s; }
.stars button svg { width: 100%; height: 100%; }
.stars button.on { color: #ffc83d; }
.stars button:hover { transform: scale(1.1); }
.stars-label { margin-left: 10px; color: var(--text2); font-size: 14px; }
.cooldown { display: flex; align-items: center; gap: 12px; background: var(--bg2); border-radius: 12px; padding: 14px 16px; color: var(--text2); }
.cooldown strong { color: var(--text); }
.cooldown .ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(68,214,44,.14); color: var(--accent); }
.cooldown .ic svg { width: 18px; height: 18px; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.count { display: block; text-align: right; font-size: 12px; color: var(--text3); margin-top: 4px; }

.dash { max-width: 1040px; margin: 0 auto; padding: 36px 24px 80px; }
.dash h1 { font-size: 30px; margin: 0 0 4px; }
.dash .lead { color: var(--text2); margin: 0 0 26px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--bg1); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.card h2 .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(68,214,44,.12); color: var(--accent); }
.card h2 .ic svg { width: 17px; height: 17px; }
.card .desc { color: var(--text2); font-size: 14px; margin: 0 0 16px; }
.keybox { display: flex; align-items: center; gap: 10px; background: var(--bg0); border: 1px solid var(--line); border-radius: 12px;
          padding: 10px 10px 10px 16px; margin-bottom: 16px; }
.keybox .k { flex: 1; font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
        background: var(--bg2); border: 1px solid var(--line); }
.pill i { width: 8px; height: 8px; border-radius: 50%; }
.pill.active i { background: var(--accent); } .pill.unused i { background: var(--blue); }
.pill.expired i { background: var(--amber); } .pill.revoked i, .pill.missing i { background: var(--danger); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.facts div { background: var(--bg2); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-size: 12px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.facts span { font-size: 15px; }
.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.note { font-size: 13px; color: var(--text3); margin: 10px 0 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.kv span:first-child { color: var(--text3); }
.kv span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--text2); font-weight: 600; font-size: 14px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; color: var(--text3); }
details.more[open] summary::before { content: "▾ "; }
details.more .body { margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #22262e; border: 1px solid #343a45;
         padding: 11px 18px; border-radius: 12px; z-index: 50; box-shadow: 0 10px 30px #0008; font-size: 14px; }
.toast.bad { border-color: rgba(255,97,100,.4); color: #ffb2b3; }

.loading { min-height: calc(100vh - 64px); display: grid; place-items: center; color: var(--text3); }
.muted { color: var(--text3); font-size: 14px; }

.dash-head { margin-bottom: 22px; }

.hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px;
        background: linear-gradient(180deg, #181b20, #121419); box-shadow: 0 20px 46px -26px rgba(0,0,0,.85);
        padding: 26px; margin-bottom: 18px; }
.hero-glow { position: absolute; left: -10%; right: 35%; top: -55%; height: 320px; pointer-events: none;
             background: radial-gradient(60% 60% at 22% 10%, rgba(68,214,44,.22), transparent 70%); }
.hero > *:not(.hero-glow) { position: relative; z-index: 1; }

.hero-license { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 22px; align-items: stretch; }
.hero-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
            background: rgba(68,214,44,.12); color: var(--accent); border: 1px solid rgba(68,214,44,.30);
            padding: 5px 12px 5px 10px; border-radius: 99px; }
.hero-tag .ic { width: 18px; height: 18px; display: grid; place-items: center; }
.hero-tag .ic svg { width: 15px; height: 15px; }
.hero .pill { padding: 5px 13px; }
.keybox-hero { background: #0b0c0f; border-color: rgba(68,214,44,.28); padding: 15px 12px 15px 18px; }
.keybox-hero .k { font-size: 22px; letter-spacing: .06em; }
.hero-license .desc { margin: 0 0 16px; }
.hero-license .facts { margin-top: 2px; }

.hero-dl { display: flex; flex-direction: column; align-items: center; text-align: center;
           background: radial-gradient(85% 70% at 50% 18%, rgba(68,214,44,.12), transparent 72%), rgba(68,214,44,.035);
           border: 1px solid rgba(68,214,44,.28); border-radius: 16px; padding: 20px 18px;
           box-shadow: 0 0 36px -6px rgba(68,214,44,.30), inset 0 0 22px rgba(68,214,44,.04); }
.hero-dl-ic { width: 46px; height: 46px; margin: 2px 0 10px; border-radius: 13px; display: grid; place-items: center;
              background: rgba(68,214,44,.12); color: var(--accent); }
.hero-dl-ic svg { width: 23px; height: 23px; }
.hero-dl h3 { margin: 0 0 3px; font-size: 16px; }
.hero-dl > p { margin: 0 0 14px; color: var(--text2); font-size: 13px; }
.hero-dl .btn-block { margin-top: auto; }
.hero-dl .note { margin-top: 12px; }

.hero-start-in { max-width: 700px; }
.hero-h { font-size: 24px; margin: 14px 0 4px; }
.hero-p { color: var(--text2); margin: 0 0 20px; }
.start-steps { display: grid; gap: 14px; }
.start-step { display: flex; gap: 16px; background: rgba(255,255,255,.02); border: 1px solid var(--line);
              border-radius: 14px; padding: 18px 20px; }
.start-step .sn { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
                  font-weight: 800; background: rgba(68,214,44,.14); color: var(--accent); }
.start-step .sb { flex: 1; min-width: 0; }
.start-step h3 { margin: 2px 0 5px; font-size: 16px; }
.start-step .sb > p { color: var(--text2); font-size: 14px; margin: 0 0 13px; }
.dl-go .ic { width: 18px; height: 18px; display: grid; place-items: center; }
.dl-go .ic svg { width: 17px; height: 17px; }

.pc-state { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--line);
            border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.pc-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); color: var(--text2); }
.pc-ic svg { width: 20px; height: 20px; }
.pc-state > div:not(.pc-ic) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.pc-state strong { font-size: 15px; }
.pc-state .muted { font-size: 13px; }

.card-discord h2 .ic { background: rgba(88,101,242,.16); color: #8b9bff; }
.card-discord .btn-primary { background: #5865f2; color: #fff; }
.card-discord .btn-primary:not(:disabled):hover { background: #6b77f5; }

.card-news .news-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.news-ver { font-weight: 700; font-size: 15px; }
.news-notes { list-style: none; margin: 0 0 4px; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 9px;
              max-height: 176px; overflow-y: auto; overscroll-behavior: contain; }
.news-notes li { position: relative; padding-left: 18px; color: var(--text2); font-size: 14px; line-height: 1.45; }
.news-notes li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px;
                         border-radius: 50%; background: var(--accent); }
.news-notes::-webkit-scrollbar { width: 8px; }
.news-notes::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 8px; }
.news-notes::-webkit-scrollbar-thumb:hover { background: #343a45; }
.news-notes::-webkit-scrollbar-track { background: transparent; }

.pill.active i { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(68,214,44,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(68,214,44,0); }
  100% { box-shadow: 0 0 0 0 rgba(68,214,44,0); }
}
.keybox.copied { animation: copyflash .6s ease; }
@keyframes copyflash {
  0%   { box-shadow: 0 0 0 0 rgba(68,214,44,0); }
  25%  { box-shadow: 0 0 0 3px rgba(68,214,44,.35); border-color: var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(68,214,44,0); }
}
@media (prefers-reduced-motion: reduce) {
  .pill.active i, .keybox.copied { animation: none; }
}

@media (max-width: 760px) {
  .hero-license { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 20px; }
  .keybox-hero .k { font-size: 15px; }
  .start-step { padding: 16px; gap: 12px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .keybox { padding-left: 12px; gap: 6px; }
  .keybox .k { font-size: 13px; letter-spacing: 0; }
  .keybox .icon-btn { width: 34px; height: 34px; }
  .card { padding: 18px; }
  .card h2 { flex-wrap: wrap; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top .in { padding: 0 16px; }
  .dash { padding: 28px 16px 64px; }
  .top .who { display: none; }
  .inline-form { flex-direction: column; }
}
@media (max-width: 400px) {
  .auth-card { padding: 22px; }
  .code { gap: 5px; }
  .code input { height: 52px; font-size: 22px; }
}

.dash { max-width: 1120px; }
.shell { display: flex; gap: 28px; align-items: flex-start; }
.siderail { position: sticky; top: 84px; flex: 0 0 224px; display: flex; flex-direction: column; gap: 20px; }
.rail-group { display: flex; flex-direction: column; gap: 3px; }
.rail-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text3); padding: 0 10px 4px; }
.rail-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 8px 11px; border-radius: 11px;
             border: 1px solid transparent; background: none; color: var(--text2); font-weight: 600; font-size: 14.5px; cursor: pointer;
             transition: background .13s, color .13s, border-color .13s; }
.rail-item:hover { background: var(--bg2); color: var(--text); }
.rail-item .ri { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--bg2);
                 color: var(--text3); transition: background .13s, color .13s; }
.rail-item .ri svg { width: 16px; height: 16px; }
.rail-item.active { background: rgba(68,214,44,.10); border-color: rgba(68,214,44,.22); color: var(--text); }
.rail-item.active .ri { background: rgba(68,214,44,.16); color: var(--accent); }
.rail-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 11px 12px; background: var(--bg1);
             border: 1px solid var(--line); border-radius: 12px; }
.rail-foot-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--bg3); color: var(--text2); }
.rail-foot-ic svg { width: 17px; height: 17px; }
.rail-foot-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rail-foot-tx strong { font-size: 13px; }
.rail-foot-tx .muted { font-size: 12px; }
.rail-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: var(--accent); }

.panels { flex: 1; min-width: 0; }
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-h { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0; }
.panel-h .ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(68,214,44,.12); color: var(--accent); }
.panel-h .ic svg { width: 16px; height: 16px; }
.panel-sub { color: var(--text2); margin: -8px 0 0; font-size: 14px; }
.panel-empty .desc { margin: 0; }

.changelog { display: flex; flex-direction: column; max-height: 64vh; overflow-y: auto; border: 1px solid var(--line);
             border-radius: var(--radius); background: var(--bg1); }
.rel { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.rel:last-child { border-bottom: 0; }
.rel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rel-ver { font-weight: 700; font-size: 15px; }
.rel-tag { font-size: 12px; font-weight: 700; color: var(--accent); background: rgba(68,214,44,.12);
           border: 1px solid rgba(68,214,44,.28); padding: 2px 9px; border-radius: 99px; }
.rel-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rel-notes li { position: relative; padding-left: 18px; color: var(--text2); font-size: 14px; line-height: 1.45; }
.rel-notes li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.changelog::-webkit-scrollbar { width: 9px; }
.changelog::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 9px; }
.changelog::-webkit-scrollbar-thumb:hover { background: #343a45; }
.changelog::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 820px) {
  .shell { flex-direction: column; gap: 18px; }
  .siderail { position: static; flex: none; flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .rail-group { flex-direction: row; gap: 8px; }
  .rail-label { display: none; }
  .rail-item { white-space: nowrap; padding: 8px 13px; }
  .rail-foot { display: none; }
  .changelog { max-height: none; }
}

.hero-license .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rel-date { margin-left: auto; color: var(--text3); font-size: 13px; white-space: nowrap; }

.dl-locked { background: var(--bg3); color: var(--text3); border-color: var(--line); cursor: not-allowed; }
.dl-locked:hover { background: var(--bg3); }
.dl-locked .ic { width: 18px; height: 18px; display: grid; place-items: center; }
.dl-locked .ic svg { width: 17px; height: 17px; }
