:root {
  --bg: #05080d;
  --bg-soft: #080d14;
  --surface: #0b121a;
  --surface-2: #101a24;
  --surface-3: #15222d;
  --text: #e7f3ec;
  --text-soft: #bac9c0;
  --muted: #76887e;
  --line: #1b302a;
  --line-bright: #285544;
  --brand: #55f2a7;
  --brand-strong: #20d982;
  --brand-soft: rgba(85, 242, 167, .1);
  --cyan: #55d6ff;
  --cyan-soft: rgba(85, 214, 255, .1);
  --accent: #ff6b9b;
  --danger: #ff6673;
  --success: #55f2a7;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --glow: 0 0 34px rgba(85, 242, 167, .12);
  --radius: 14px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(85, 242, 167, .09), transparent 28rem),
    radial-gradient(circle at 88% 24%, rgba(85, 214, 255, .07), transparent 32rem),
    linear-gradient(rgba(85, 242, 167, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 242, 167, .025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255,255,255,.018) 4px);
  mix-blend-mode: screen;
}
::selection { background: rgba(85, 242, 167, .25); color: #fff; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(85, 242, 167, .12);
  background: rgba(5, 8, 13, .82);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 1px 0 rgba(85, 214, 255, .04);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-weight: 800; }
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(85, 242, 167, .55);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(85,242,167,.14), rgba(85,214,255,.04));
  color: var(--brand);
  font-family: var(--mono);
  font-size: 17px;
  text-shadow: 0 0 15px rgba(85, 242, 167, .7);
  box-shadow: inset 0 0 20px rgba(85,242,167,.06), 0 0 18px rgba(85,242,167,.09);
}
.brand-copy { display: grid; color: #f4fff8; font-size: 18px; letter-spacing: .02em; line-height: 1.1; }
.brand-copy small { margin-top: 6px; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .13em; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.nav-links > a:not(.button), .nav-links .link {
  padding: 9px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: color .18s ease, background .18s ease;
}
.nav-links > a:not(.button):hover, .nav-links .link:hover { background: var(--brand-soft); color: var(--brand); transform: none; box-shadow: none; }

.dev-payment-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 24px;
  border-bottom: 1px solid rgba(255, 190, 85, .32);
  background: rgba(255, 181, 71, .1);
  color: #ffd99b;
  font-size: 13px;
}
.dev-payment-banner strong { color: #ffbd59; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid rgba(85, 242, 167, .7);
  border-radius: 9px;
  padding: 10px 17px;
  background: linear-gradient(135deg, var(--brand), #4ce2d0);
  color: #03100a;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(85,242,167,.1), inset 0 1px rgba(255,255,255,.3);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.button:hover, button:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 0 30px rgba(85,242,167,.2); }
.button:active, button:active { transform: translateY(0); }
.small { min-height: 34px; padding: 7px 11px; border-radius: 7px; font-size: 12px; }
.link { min-height: auto; border: 0; }

.hero {
  position: relative;
  min-height: 400px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  align-items: center;
  gap: 60px;
  padding: 48px 0 36px;
}
.hero::before { content: ""; position: absolute; width: 360px; height: 1px; left: -180px; top: 42%; background: linear-gradient(90deg, transparent, rgba(85,242,167,.35)); }
.hero-copy { position: relative; z-index: 2; }
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border: 1px solid rgba(85, 242, 167, .22);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.hero h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  color: #f2fff7;
  font-size: clamp(46px, 5.7vw, 70px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.1;
  text-shadow: 0 0 50px rgba(85,242,167,.07);
}
.hero h1::first-line { color: var(--text); }
.hero p { max-width: 620px; margin: 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; align-items: center; gap: 25px; margin-top: 27px; }
.text-link { color: var(--text-soft); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.text-link span { display: inline-block; color: var(--cyan); transition: transform .18s ease; }
.text-link:hover { color: var(--cyan); }
.text-link:hover span { transform: translate(2px, -2px); }

.hero-art { position: relative; min-height: 320px; perspective: 1200px; }
.hero-art::before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  top: 33px;
  right: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85,242,167,.13), rgba(85,214,255,.04) 42%, transparent 70%);
  filter: blur(8px);
}
.hero-art::after { content: ""; position: absolute; width: 100px; height: 100px; right: -10px; bottom: 28px; border-right: 1px solid var(--brand); border-bottom: 1px solid var(--brand); opacity: .35; }
.art-sheet {
  position: absolute;
  z-index: 3;
  width: 325px;
  min-height: 300px;
  top: 15px;
  right: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(85, 214, 255, .3);
  border-radius: 12px;
  padding: 49px 27px 24px;
  background:
    linear-gradient(rgba(85,214,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85,214,255,.025) 1px, transparent 1px),
    linear-gradient(150deg, rgba(16,28,38,.98), rgba(7,13,19,.98));
  background-size: 22px 22px, 22px 22px, auto;
  box-shadow: var(--shadow), inset 0 0 45px rgba(85,214,255,.025), 0 0 28px rgba(85,214,255,.07);
  transform: rotate(1.5deg);
}
.art-sheet::before {
  content: "●  ●  ●";
  position: absolute;
  inset: 0 0 auto;
  height: 34px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(85,214,255,.13);
  padding-left: 14px;
  background: rgba(4,9,14,.65);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
}
.art-sheet-back { z-index: 1; top: 35px; right: 43px; border-color: rgba(85,242,167,.27); background: transparent; transform: rotate(-4deg); box-shadow: 0 0 45px rgba(85,242,167,.05); }
.art-sheet-back::before { display: none; }
.art-sheet > span { color: var(--cyan); font-family: var(--mono); font-size: 9px; font-weight: 750; letter-spacing: .09em; }
.art-sheet strong { margin-top: 31px; color: #edfdf4; font-size: 23px; letter-spacing: -.025em; line-height: 1.5; }
.art-sheet strong::before { content: "> "; color: var(--brand); font-family: var(--mono); }
.art-sheet em { margin-top: auto; color: var(--brand); font-family: var(--mono); font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .08em; }
.art-lines { display: grid; gap: 9px; margin-top: 24px; }
.art-lines i { display: block; height: 2px; background: linear-gradient(90deg, rgba(85,242,167,.65), rgba(85,214,255,.12)); }
.art-lines i:nth-child(2) { width: 78%; }
.art-lines i:nth-child(3) { width: 52%; }
.art-dot { position: absolute; z-index: 4; display: block; border-radius: 50%; }
.dot-one { width: 9px; height: 9px; top: 19px; left: 10px; background: var(--brand); box-shadow: 0 0 18px var(--brand); }
.dot-two { width: 7px; height: 7px; right: -2px; bottom: 78px; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }

.card {
  display: block;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  background: linear-gradient(145deg, rgba(16,26,36,.9), rgba(8,13,20,.94));
  box-shadow: 0 18px 55px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.025);
}
.discovery { position: relative; z-index: 8; margin: 0 0 22px; padding: 14px; border-color: rgba(85,242,167,.16); backdrop-filter: blur(16px); }
.discovery::before { display: none; }
.search-form { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto; gap: 10px; align-items: end; }
label { display: grid; gap: 7px; margin: 14px 0; color: var(--text-soft); font-size: 12px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #263a3b;
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  background: rgba(4, 9, 14, .76);
  color: var(--text);
  font-weight: 500;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: #566860; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); background: #07110d; box-shadow: 0 0 0 3px rgba(85,242,167,.08), 0 0 20px rgba(85,242,167,.04); }
textarea { resize: vertical; line-height: 1.6; }
.search-form label { margin: 0; }
.search-form button { white-space: nowrap; }
.clear-filter { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 5px; color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 750; }
.filter-select { position: relative; min-width: 0; margin: 0; }
.filter-select > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #263a3b; border-radius: 8px; padding: 7px 11px; background: rgba(4,9,14,.76); color: var(--text); cursor: pointer; list-style: none; transition: border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.filter-select > summary::-webkit-details-marker { display: none; }
.filter-select > summary > span { min-width: 0; display: grid; gap: 1px; }
.filter-select > summary small { color: #61736b; font-family: var(--mono); font-size: 7px; font-weight: 750; letter-spacing: .08em; }
.filter-select > summary strong { overflow: hidden; color: var(--text-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.filter-select > summary i { color: var(--brand); font-family: var(--mono); font-size: 14px; font-style: normal; transition: transform .18s ease; }
.filter-select[open] > summary { border-color: var(--brand); background: #07110d; box-shadow: 0 0 0 3px rgba(85,242,167,.08),0 0 20px rgba(85,242,167,.04); }
.filter-select[open] > summary i { transform: rotate(180deg); }
.filter-options { position: absolute; z-index: 40; min-width: max(100%,220px); max-height: 270px; top: calc(100% + 7px); left: 0; display: grid; gap: 3px; overflow-y: auto; border: 1px solid rgba(85,242,167,.2); border-radius: 10px; padding: 7px; background: rgba(5,11,16,.98); box-shadow: 0 22px 55px rgba(0,0,0,.55),0 0 30px rgba(85,242,167,.05); }
.filter-select:last-of-type .filter-options { right: 0; left: auto; }
.filter-options label { margin: 0; cursor: pointer; }
.filter-options input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.filter-options label > span { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid transparent; border-radius: 7px; padding: 7px 9px; color: var(--muted); font-size: 10px; transition: border-color .15s ease,background .15s ease,color .15s ease; }
.filter-options label > span small { min-width: 22px; border-radius: 999px; padding: 2px 6px; background: rgba(85,214,255,.07); color: var(--cyan); font-family: var(--mono); font-size: 8px; text-align: center; }
.filter-options label:hover > span { border-color: rgba(85,242,167,.12); background: rgba(85,242,167,.045); color: var(--text-soft); }
.filter-options input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 1px; }
.filter-options input:checked + span { border-color: rgba(85,242,167,.24); background: var(--brand-soft); color: var(--brand); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 34px 0 17px; }
.section-heading .eyebrow { color: var(--brand); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.section-heading .eyebrow::before { content: "// "; color: var(--cyan); }
.section-heading h2 { margin: 7px 0 0; color: #f0fff6; font-size: 34px; letter-spacing: -.035em; line-height: 1.15; }
.section-heading p { margin: 0 0 5px; color: var(--muted); font-family: var(--mono); font-size: 10px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.grid .card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 26px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.grid .card::before { content: ""; position: absolute; width: 115px; height: 115px; top: -70px; right: -60px; border: 1px solid rgba(85,242,167,.2); transform: rotate(45deg); transition: transform .3s ease, border-color .3s ease; }
.grid .card::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--brand), var(--cyan)); transition: width .3s ease; }
.grid .card:hover { transform: translateY(-5px); border-color: rgba(85,242,167,.4); box-shadow: 0 20px 55px rgba(0,0,0,.35), var(--glow); }
.grid .card:hover::before { border-color: rgba(85,214,255,.45); transform: rotate(55deg) scale(1.08); }
.grid .card:hover::after { width: 100%; }
.grid .card h2 { position: relative; margin: 23px 0 10px; color: #eaf7ef; font-size: 21px; letter-spacing: -.025em; line-height: 1.42; }
.grid .card p { position: relative; margin: 0 0 24px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 14px; }
.grid .card time { margin-top: auto; font-family: var(--mono); font-size: 10px; }
.card-arrow { position: absolute; right: 22px; bottom: 19px; color: var(--cyan); font-size: 16px; font-weight: 800; }
.empty-state { grid-column: 1 / -1; min-height: 190px; display: grid; place-items: center; margin: 0; border: 1px dashed var(--line-bright); border-radius: var(--radius); background: rgba(11,18,26,.58); color: var(--muted); font-family: var(--mono); font-size: 12px; text-align: center; }
.empty-state::before { content: "[ 0 RESULTS ]"; display: block; margin-right: 14px; color: var(--accent); }

.muted, time { color: var(--muted); }
.article { max-width: 920px; margin: 64px auto 85px; }
.article-head { max-width: 780px; margin: 0 auto 44px; padding-bottom: 36px; border-bottom: 1px solid var(--line); text-align: center; }
.article-head h1 { margin: 18px 0 16px; color: #f0fff6; font-size: clamp(38px, 5.5vw, 60px); font-weight: 900; letter-spacing: -.05em; line-height: 1.18; }
.article-head p { font-size: 16px; }
.article-head time { font-family: var(--mono); font-size: 10px; }
.prose { max-width: 760px; margin: 0 auto; color: #b9c9c0; font-size: 16px; line-height: 1.95; }
.prose + .prose { margin-top: 24px; }
.prose h2, .prose h3, .prose h4 { margin: 2em 0 .7em; color: #ecfff4; line-height: 1.35; }
.prose h2 { font-size: 28px; }
.prose h2::before { content: "## "; color: var(--brand); font-family: var(--mono); font-size: .7em; }
.prose h3 { font-size: 22px; }
.prose h3::before { content: "### "; color: var(--cyan); font-family: var(--mono); font-size: .64em; }
.prose p { margin: 1.2em 0; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.prose blockquote { margin: 1.7em 0; border-left: 3px solid var(--brand); padding: 5px 0 5px 21px; background: linear-gradient(90deg, var(--brand-soft), transparent); color: var(--muted); }
.prose code { border: 1px solid rgba(85,214,255,.12); border-radius: 5px; padding: 2px 6px; background: var(--cyan-soft); color: var(--cyan); font-family: var(--mono); font-size: .88em; }
.prose pre { overflow: auto; border: 1px solid #24483c; border-radius: 11px; padding: 21px; background: #030806; color: #c8f7db; box-shadow: inset 0 0 35px rgba(85,242,167,.025); }
.prose pre code { padding: 0; border: 0; background: transparent; color: inherit; }
.prose a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(85,214,255,.35); text-underline-offset: 3px; }
.bilibili-video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; margin: 1.8em 0; border: 1px solid rgba(85,214,255,.22); border-radius: 13px; background: #020507; box-shadow: 0 22px 55px rgba(0,0,0,.36),0 0 28px rgba(85,214,255,.05); }
.bilibili-video::before { content: "BILIBILI.PLAYER"; position: absolute; z-index: 0; inset: 50% auto auto 50%; color: #40564e; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; transform: translate(-50%,-50%); }
.bilibili-video iframe { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; border: 0; background: #020507; }
.asset-media { margin: 1.8em 0; }
.asset-media video,.asset-media audio { display: block; width: 100%; border: 1px solid rgba(85,214,255,.22); border-radius: 13px; background: #020507; box-shadow: 0 22px 55px rgba(0,0,0,.28); }
.asset-media video { aspect-ratio: 16 / 9; object-fit: contain; }
.asset-media audio { min-height: 54px; }
.asset-media figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; text-align: center; }

.paid { position: relative; max-width: 810px; overflow: hidden; margin: 38px auto; border: 1px solid rgba(85,242,167,.3); border-radius: 14px; padding: 34px; background: linear-gradient(135deg, rgba(85,242,167,.1), rgba(7,13,19,.94) 64%); box-shadow: var(--glow); }
.paid::before { content: "ACCESS: LOCKED"; display: block; width: fit-content; margin-bottom: 17px; color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.paid::after { content: ""; position: absolute; width: 180px; height: 180px; right: -95px; bottom: -95px; border: 1px solid rgba(85,242,167,.2); transform: rotate(45deg); }
.paid .tag { position: relative; z-index: 1; }
.paid h3 { position: relative; z-index: 1; margin: 16px 0 8px; color: #effff6; font-size: 26px; }
.paid p, .paid button { position: relative; z-index: 1; }
.price { margin: 16px 0; color: var(--brand); font-family: var(--mono); font-size: 28px; font-weight: 850; text-shadow: 0 0 18px rgba(85,242,167,.25); }
.wechat-tag { border-color: rgba(85,242,167,.23); background: rgba(85,242,167,.1); color: var(--brand); }
.wechat-pay { background: linear-gradient(135deg, #55f2a7, #20d982); }
.pay-hint { max-width: 540px; color: var(--muted); font-size: 12px; }

.form-page { max-width: 500px; min-height: calc(100vh - 210px); display: grid; align-content: center; margin: 44px auto; }
.form-card { position: relative; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 14px; padding: 34px; background: linear-gradient(145deg, rgba(16,26,36,.97), rgba(6,11,17,.98)); box-shadow: var(--shadow), var(--glow); }
.form-card::before { content: "AUTH.SESSION"; display: block; margin-bottom: 24px; color: var(--brand); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; }
.form-card h1 { margin: 0 0 24px; color: #effff6; font-size: 33px; letter-spacing: -.04em; }
.form-card form > button { width: 100%; margin-top: 8px; }
.form-card > p:last-child { color: var(--muted); font-size: 13px; }
.form-card a { color: var(--cyan); font-weight: 700; }
.error { min-height: 1em; color: var(--danger); font-family: var(--mono); font-size: 11px; }
.notice { color: var(--success); font-family: var(--mono); font-size: 11px; }

.admin { padding: 46px 0 75px; }
.admin > h1, .bar h1 { margin: 0; color: #f0fff6; font-size: 35px; letter-spacing: -.04em; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.bar > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bar > a:not(.button) { color: var(--cyan); font-family: var(--mono); font-size: 11px; font-weight: 750; }
.table-scroll { width: 100%; overflow-x: auto; border-radius: 11px; scrollbar-width: thin; scrollbar-color: rgba(85,242,167,.25) transparent; }
.table { width: 100%; min-width: 680px; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; border-radius: 11px; background: rgba(8,14,21,.95); box-shadow: 0 16px 45px rgba(0,0,0,.22); }
.table th, .table td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { background: #0e1a20; color: var(--brand); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.table td { max-width: 360px; overflow-wrap: anywhere; color: var(--text-soft); font-size: 13px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: rgba(85,242,167,.045); }
.table-link { color: var(--cyan); font-weight: 750; }
.table td small { display: block; margin-top: 5px; color: var(--muted); }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.admin-list-tools { display: grid; grid-template-columns: minmax(220px,1fr) repeat(auto-fit,minmax(145px,auto)); gap: 9px; margin: 0 0 15px; }
.admin-list-tools input, .admin-list-tools select { min-height: 41px; margin: 0; }
.list-pagination { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.list-pagination > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.list-pagination select { width: auto; min-height: 34px; padding: 6px 28px 6px 9px; font-size: 10px; }
.list-pagination button { min-height: 34px; padding: 6px 9px; }
.admin-index-panel > .software-grid { margin-top: 0; }
.software-product-editor { scroll-margin-top: 92px; }
.software-product-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 15px; }
.software-product-grid > label { grid-column: span 4; min-width: 0; margin: 0; align-content: start; }
.software-product-grid .software-code-field { grid-column: span 4; }
.software-product-grid .software-name-field { grid-column: span 8; }
.software-product-grid .software-summary-field { grid-column: 1 / -1; }
.software-product-grid .software-summary-field textarea { min-height: 170px; padding: 14px 15px; line-height: 1.75; }
.software-product-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 19px; border-top: 1px solid var(--line); padding-top: 17px; }
.software-product-footer .switch-label { min-height: 40px; display: flex; align-items: center; gap: 9px; margin: 0; color: var(--text-soft); cursor: pointer; }
.software-product-actions { min-width: 0; display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.software-product-actions .error { margin: 0 auto 0 0; }
.modal-card.software-release-card { width: min(650px,100%); max-height: min(820px,calc(100vh - 40px)); overflow-y: auto; text-align: left; }
.software-release-card > h2 { margin: 8px 0 5px; }
.software-release-card > .muted { margin-bottom: 0; }
.software-release-card form { margin-top: 22px; }
.software-release-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.software-release-grid > label { min-width: 0; margin: 0; }
.software-release-asset,.software-release-notes { grid-column: 1 / -1; }
.software-release-notes textarea { min-height: 160px; padding: 14px 15px; line-height: 1.7; resize: vertical; }
.software-release-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.software-release-card .error:not(:empty) { margin: 14px 0 0; }

.two, .editor { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 15px 0; }
.secondary { border-color: #2a3d40; background: #132026; color: var(--text-soft); box-shadow: none; }
.secondary:hover { background: #1a2d31; color: var(--cyan); box-shadow: 0 0 20px rgba(85,214,255,.07); }
.danger { border-color: rgba(255,102,115,.55); background: rgba(255,102,115,.12); color: #ff9ca5; box-shadow: none; }
.danger:hover { background: rgba(255,102,115,.2); box-shadow: 0 0 22px rgba(255,102,115,.08); }
.markdown { min-height: 600px; padding: 17px; border-color: #24483c; background: #020704; color: #bff8d7; font-family: var(--mono); font-size: 13px; line-height: 1.72; }
.markdown:focus { background: #020704; }
.preview { min-height: 600px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 22px; background: var(--surface); }
.resources { margin-top: 22px; }
.asset-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.asset-row span { min-width: 0; flex: 1; }
.asset-row code { overflow: hidden; color: var(--cyan); text-overflow: ellipsis; }

.menu-form { display: grid; grid-template-columns: 1fr 2fr 120px auto; gap: 14px; align-items: end; }
.menu-form label, .taxonomy-form label { margin: 0; }
.check { display: flex; grid-auto-flow: column; align-items: center; justify-content: start; }
.check input { width: auto; min-height: auto; }
.menu-form .toolbar, .menu-form .error, .menu-form .notice { grid-column: 1 / -1; }
.taxonomy-form { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: end; }
.taxonomy-form .toolbar, .taxonomy-form .error { grid-column: 1 / -1; }
.taxonomy-lists > section { min-width: 0; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(1,4,6,.82); backdrop-filter: blur(10px); }
.hidden { display: none !important; }
.modal-card { position: relative; width: min(440px, 100%); border: 1px solid var(--line-bright); border-radius: 14px; padding: 32px; background: linear-gradient(145deg, #101b24, #060b11); box-shadow: var(--shadow), var(--glow); text-align: center; }
.modal-close { position: absolute; top: 12px; right: 13px; width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0; background: var(--surface-2); color: var(--text); box-shadow: none; font-size: 21px; }
.modal-close:hover { background: var(--surface-3); box-shadow: none; }
.modal img { width: 220px; height: 220px; object-fit: contain; }
.payment-card img { display: block; margin: 16px auto; border: 1px solid var(--line-bright); border-radius: 10px; background: #fff; }
.modal img[hidden] { display: none; }
.wechat-mark { display: inline-block; border: 1px solid rgba(85,242,167,.35); border-radius: 999px; padding: 5px 11px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: 11px; font-weight: 750; }

footer { margin-top: 85px; border-top: 1px solid var(--line); background: rgba(4,8,12,.72); }
.footer-inner { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.footer-inner > div { display: grid; gap: 4px; }
.footer-inner strong { color: var(--brand); font-family: var(--sans); font-size: 17px; }
.footer-contact { grid-template-columns: auto auto; align-items: center; gap: 3px 10px !important; border-left: 1px solid var(--line); padding-left: 28px; }
.footer-contact > span { grid-column: 1 / -1; color: #587068; letter-spacing: .12em; }
.footer-contact b { color: var(--cyan); font-size: 13px; letter-spacing: .05em; }
.footer-contact .link { min-height: auto; padding: 2px 0; color: var(--brand); font-family: var(--mono); font-size: 9px; }

.comments { width: min(820px,100%); margin: 50px auto 0; border-top: 1px solid var(--line-bright); padding-top: 32px; }
.comments-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.comments-head h2 { margin: 4px 0 0; font-size: 26px; }
.comments-head > span { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.comments-list { display: grid; gap: 9px; }
.comments-more { width: 100%; margin-top: 10px; }
.comments-loading,.comments-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 28px; color: var(--muted); text-align: center; }
.comment-item { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 16px; background: rgba(7,14,19,.68); }
.comment-item-avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(85,242,167,.22); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.comment-item-body { min-width: 0; }
.comment-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-item-meta strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.comment-item-meta time { color: #557069; font-family: var(--mono); font-size: 9px; }
.comment-item p { margin: 8px 0 0; color: #a9beb4; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form,.comment-login { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: linear-gradient(145deg,rgba(13,25,31,.85),rgba(4,9,13,.9)); }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.comment-author > div { min-width: 0; display: grid; gap: 1px; }
.comment-author small { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.comment-author strong { overflow: hidden; color: var(--brand); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.comment-form label { margin-bottom: 6px; }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.comment-actions span { color: #557069; font-family: var(--mono); font-size: 9px; }
.comment-login { text-align: center; }
.comment-login > span { color: var(--cyan); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.comment-login h3 { margin: 8px 0 5px; }
.comment-login p { margin: 0 0 15px; color: var(--muted); }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 35px; }
  .art-sheet { right: 0; width: 295px; }
  .art-sheet-back { right: 22px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-form { grid-template-columns: minmax(200px,2fr) minmax(135px,1fr) minmax(135px,1fr) auto auto; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1180px); }
  .nav { min-height: 70px; gap: 12px; padding: 10px 0; }
  .brand-mark { width: 37px; height: 37px; font-size: 14px; }
  .brand-copy { font-size: 16px; }
  .brand-copy small { display: none; }
  .nav-links { gap: 0; }
  .nav-links > a:not(.button), .nav-links .link { padding: 8px; font-size: 12px; }
  .nav-links a:nth-child(2) { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 48px 0 38px; }
  .hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .hero p { font-size: 15px; }
  .hero-art { display: none; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form .search-field, .search-form button, .search-form .clear-filter { grid-column: 1 / -1; }
  .search-form button { width: 100%; }
  .search-form .clear-filter { min-height: 28px; justify-content: center; padding: 2px; }
  .menu-form, .taxonomy-form { grid-template-columns: 1fr; }
  .menu-form .toolbar, .menu-form .error, .menu-form .notice, .taxonomy-form .toolbar, .taxonomy-form .error { grid-column: auto; }
  .section-heading { align-items: start; padding-top: 28px; }
  .section-heading p { display: none; }
  .grid { grid-template-columns: 1fr; }
  .grid .card { min-height: 220px; }
  .empty-state::before { margin: 0 0 -50px; }
  .article { margin-top: 45px; }
  .article-head { text-align: left; }
  .article-head h1 { font-size: 39px; }
  .paid { padding: 26px 22px; }
  .form-page { margin: 28px auto; }
  .form-card { padding: 27px 22px; }
  .bar { align-items: flex-start; flex-direction: column; }
  .bar > div:last-child { justify-content: flex-start; }
  .two, .editor { grid-template-columns: 1fr; }
  .table { white-space: nowrap; }
  .table th, .table td { padding: 11px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (max-width: 480px) {
  .brand-copy { font-size: 15px; }
  .nav-links .button { padding-inline: 10px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 15px; }
  .hero-actions .button { width: 100%; }
  .section-heading h2 { font-size: 29px; }
  .discovery { padding: 10px; }
  .card { border-radius: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Admin workspace */
.admin-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin: 34px 0 80px;
}
.admin-sidebar {
  position: sticky;
  top: 108px;
  max-height: calc(100vh - 124px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(85,242,167,.25) transparent;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(155deg, rgba(16,26,36,.98), rgba(5,10,15,.98));
  box-shadow: 0 18px 55px rgba(0,0,0,.25);
}
.admin-sidebar-head { display: grid; gap: 5px; padding: 21px 18px 18px; border-bottom: 1px solid var(--line); }
.admin-sidebar-kicker, .admin-kicker { color: var(--brand); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.admin-sidebar-head strong { color: #effff6; font-size: 17px; }
.admin-sidebar nav { display: grid; gap: 4px; padding: 10px; }
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: #8fa198;
  font-size: 13px;
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.admin-sidebar nav a > span { width: 22px; color: #61766b; font-family: var(--mono); font-size: 16px; text-align: center; }
.admin-sidebar nav a:hover { border-color: rgba(85,242,167,.12); background: rgba(85,242,167,.045); color: #dff8e9; }
.admin-sidebar nav a.active { border-color: rgba(85,242,167,.24); background: linear-gradient(90deg, rgba(85,242,167,.13), rgba(85,214,255,.04)); color: var(--brand); box-shadow: inset 3px 0 var(--brand); }
.admin-sidebar nav a.active > span { color: var(--brand); text-shadow: 0 0 12px rgba(85,242,167,.45); }
.admin-view-site { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 16px 19px; color: var(--cyan); font-family: var(--mono); font-size: 10px; }
.admin-workspace { min-width: 0; }
.admin-layout .admin { padding: 6px 0 0; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.admin-page-head h1 { margin: 6px 0 4px; color: #f0fff6; font-size: clamp(30px, 4vw, 41px); letter-spacing: -.045em; line-height: 1.15; }
.admin-page-head p { margin: 0; color: var(--muted); font-size: 13px; }

.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin-bottom: 20px; }
.stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 17px;
  background: linear-gradient(145deg, rgba(16,26,36,.92), rgba(7,12,18,.94));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.stat-card::after { content: ""; position: absolute; width: 52px; height: 52px; right: -28px; top: -28px; border: 1px solid rgba(85,242,167,.18); transform: rotate(45deg); }
.stat-card > span { display: block; overflow: hidden; color: #8fa198; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.stat-card strong { display: block; overflow: hidden; margin: 9px 0 7px; color: #f0fff6; font-family: var(--mono); font-size: 24px; letter-spacing: -.04em; text-overflow: ellipsis; }
.stat-card small { display: block; overflow: hidden; color: #50645a; font-family: var(--mono); font-size: 7px; letter-spacing: .1em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card.alert-card { border-color: rgba(255,107,155,.2); }
.stat-card.alert-card strong { color: var(--accent); }

.admin-panel {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(13,22,31,.96), rgba(6,11,17,.98));
  box-shadow: 0 16px 45px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.02);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-head > div { min-width: 0; }
.panel-head span { display: block; margin-bottom: 4px; color: var(--brand); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.panel-head h2, .panel-head > h2 { margin: 0; color: #eaf8f0; font-size: 18px; letter-spacing: -.025em; }
.panel-head a { color: var(--cyan); font-family: var(--mono); font-size: 9px; }
.panel-head small { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.admin-panel .table { box-shadow: none; }
.admin-empty { display: grid; min-height: 140px; place-items: center; margin: 0; border: 1px dashed var(--line-bright); border-radius: 9px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: center; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-badge.published { border-color: rgba(85,242,167,.2); background: var(--brand-soft); color: var(--brand); }
.status-badge.draft { border-color: rgba(118,136,126,.2); background: rgba(118,136,126,.08); color: #899b91; }

.menu-builder { scroll-margin-top: 100px; }
.menu-form-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px 15px; }
.menu-form-grid label { margin: 0; }
.menu-form-grid .switch-label { min-height: 44px; align-self: end; display: flex; grid-auto-flow: column; align-items: center; justify-content: flex-start; gap: 9px; border: 1px solid #263a3b; border-radius: 8px; padding: 8px 11px; background: rgba(4,9,14,.76); cursor: pointer; }
.switch-label > input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.switch { position: relative; width: 37px; height: 20px; flex: 0 0 auto; border-radius: 999px; background: #26342d; transition: background .18s ease; }
.switch::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #77877e; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.switch-label > input:checked + .switch { background: rgba(85,242,167,.2); }
.switch-label > input:checked + .switch::after { transform: translateX(17px); background: var(--brand); box-shadow: 0 0 9px rgba(85,242,167,.55); }
.menu-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 17px; }
.menu-form-actions .error, .menu-form-actions .notice { margin: 0; }
.menu-preview-panel { overflow: hidden; }
.menu-preview { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(85,242,167,.13); border-radius: 9px; padding: 14px 17px; background: rgba(3,8,11,.76); }
.menu-preview > strong { color: #f0fff6; font-size: 15px; white-space: nowrap; }
.menu-preview nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.menu-preview nav a { border: 1px solid rgba(85,242,167,.14); border-radius: 7px; padding: 7px 10px; color: var(--text-soft); font-size: 11px; }
.menu-preview nav a.is-hidden { border-style: dashed; opacity: .38; }
.menu-preview-empty { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.menu-list { display: grid; gap: 9px; }
.menu-item { display: grid; grid-template-columns: 42px minmax(160px, 1fr) auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: rgba(5,11,16,.66); transition: border-color .18s ease, background .18s ease; }
.menu-item:hover { border-color: rgba(85,242,167,.22); background: rgba(85,242,167,.025); }
.menu-order { color: var(--brand); font-family: var(--mono); font-size: 12px; text-align: center; }
.menu-item-info { min-width: 0; display: grid; grid-template-columns: minmax(100px, .7fr) minmax(130px, 1.3fr) auto; align-items: center; gap: 12px; }
.menu-item-info strong { overflow: hidden; color: #e9f9f0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.menu-item-info code { overflow: hidden; color: var(--cyan); font-family: var(--mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.menu-item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.icon-button { width: 32px; padding-inline: 0; }
button:disabled { opacity: .3; cursor: not-allowed; transform: none !important; filter: none !important; }
.resource-uploader { display: grid; grid-template-columns: 1.5fr 180px 1fr auto; gap: 10px; align-items: center; }
.resource-uploader input, .resource-uploader select { min-width: 0; }
.editor-toolbar select { width: auto; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-form-grid { grid-template-columns: 1fr 1fr; }
  .menu-item { grid-template-columns: 36px 1fr; }
  .menu-item-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; gap: 18px; margin-top: 20px; }
  .admin-sidebar { position: static; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .admin-sidebar { scrollbar-width: none; }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-sidebar-head, .admin-view-site { display: none; }
  .admin-sidebar nav { display: flex; width: max-content; min-width: 100%; gap: 4px; padding: 8px; }
  .admin-sidebar nav a { min-height: 38px; white-space: nowrap; }
  .admin-sidebar nav a.active { box-shadow: inset 0 -2px var(--brand); }
  .resource-uploader { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  body[data-admin="1"] .brand-copy { display: none; }
  body[data-admin="1"] .nav-links > a { display: none !important; }
  body[data-admin="1"] .nav-links > a[href="/admin"], body[data-admin="1"] .nav-links .link { display: inline-flex !important; }
  .admin-page-head { align-items: flex-start; flex-direction: column; }
  .admin-page-head .button { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card:last-child { grid-column: 1 / -1; }
  .admin-panel { padding: 15px; }
  .panel-head { align-items: flex-start; }
  .panel-head small { display: none; }
  .menu-form-grid { grid-template-columns: 1fr; }
  .menu-form-actions { align-items: stretch; flex-direction: column; }
  .menu-preview { align-items: flex-start; flex-direction: column; }
  .menu-preview nav { justify-content: flex-start; }
  .menu-item { grid-template-columns: 30px 1fr; align-items: start; }
  .menu-item-info { grid-template-columns: 1fr; gap: 5px; }
  .menu-item-actions { flex-wrap: wrap; }
  .resource-uploader { grid-template-columns: 1fr; }
}

/* Compact account menu */
.user-menu { position: relative; }
.user-menu > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(85,242,167,.14);
  border-radius: 9px;
  padding: 5px 9px 5px 6px;
  background: rgba(85,242,167,.045);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { border-color: rgba(85,242,167,.32); background: var(--brand-soft); color: var(--brand); }
.user-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: linear-gradient(145deg, rgba(85,242,167,.2), rgba(85,214,255,.08)); color: var(--brand); font-family: var(--mono); font-size: 9px; }
.user-menu-chevron { color: var(--muted); font-family: var(--mono); transition: transform .18s ease; }
.user-menu[open] .user-menu-chevron { transform: rotate(180deg); }
.user-menu-label { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 50;
  width: 280px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(16,27,36,.99), rgba(5,10,15,.99));
  box-shadow: 0 24px 70px rgba(0,0,0,.55), var(--glow);
}
.user-dropdown::before { content: ""; position: absolute; width: 75px; height: 75px; top: -45px; right: -36px; border: 1px solid rgba(85,242,167,.2); transform: rotate(45deg); }
.user-identity { min-width: 0; display: grid; gap: 4px; border-bottom: 1px solid var(--line); padding: 17px; }
.user-identity small { color: var(--brand); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.user-identity strong { overflow: hidden; color: #effff6; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-identity > span { color: var(--muted); font-size: 10px; }
.user-identity em { color: #61756b; font-size: 9px; font-style: normal; }
.user-dropdown nav { display: grid; gap: 3px; padding: 8px; }
.user-dropdown nav a { display: flex; min-height: 38px; align-items: center; border-radius: 7px; padding: 8px 10px; color: var(--text-soft); font-size: 12px; }
.user-dropdown nav a:hover { background: var(--brand-soft); color: var(--brand); }
.user-dropdown .link { width: calc(100% - 16px); min-height: 38px; justify-content: flex-start; margin: 0 8px 8px; padding: 8px 10px; border-top: 1px solid var(--line); border-radius: 7px; color: var(--danger); font-size: 12px; }
.user-dropdown .link:hover { background: rgba(255,102,115,.08); color: #ff9ca5; }

/* Account profile */
.account-page { min-height: calc(100vh - 210px); display: grid; align-content: center; gap: 22px; padding: 44px 0; }
.account-heading { max-width: 650px; }
.account-heading h1 { margin: 7px 0 8px; color: #effff6; font-size: clamp(32px,5vw,54px); letter-spacing: -.045em; }
.account-heading p { margin: 0; color: var(--muted); }
.account-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); gap: 16px; }
.account-grid .form-card::before { display: none; }
.account-grid .form-card { min-width: 0; padding: 28px; }
.account-grid h2 { margin: 10px 0 22px; color: #effff6; }
.account-avatar { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(85,242,167,.3); border-radius: 13px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: 12px; font-weight: 800; box-shadow: var(--glow); }
.account-profile-card label small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.5; }
.account-profile-card > button { width: 100%; margin-top: 8px; }
.account-card-kicker { color: var(--cyan); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.account-email-card { display: grid; align-content: start; gap: 13px; }
.account-email-card h2 { margin-bottom: 3px; }
.account-email-card > strong { overflow: hidden; color: var(--text-soft); font-family: var(--mono); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-email-card .status-badge { justify-self: start; }
.account-email-card > p { margin: 3px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

@media (max-width: 760px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* Menu content guide */
.menu-guide { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; margin-bottom: 18px; border: 1px solid rgba(85,214,255,.2); border-radius: 11px; padding: 15px 17px; background: linear-gradient(90deg, rgba(85,214,255,.08), rgba(85,242,167,.025)); }
.menu-guide-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(85,214,255,.3); border-radius: 9px; color: var(--cyan); font-family: var(--mono); font-weight: 800; box-shadow: 0 0 18px rgba(85,214,255,.08); }
.menu-guide div { min-width: 0; }
.menu-guide strong { display: block; margin-bottom: 3px; color: #eaf8f0; font-size: 13px; }
.menu-guide p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.menu-guide .button { white-space: nowrap; }

/* Focused Markdown editor */
.editor-form { display: grid; gap: 14px; }
.editor-settings { margin: 0; padding: 0; }
.editor-settings:focus-within { position: relative; z-index: 25; }
.editor-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; cursor: pointer; list-style: none; }
.editor-settings > summary::-webkit-details-marker { display: none; }
.editor-settings > summary div > span { display: block; margin-bottom: 4px; color: var(--brand); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.editor-settings > summary h2 { margin: 0; color: #eaf8f0; font-size: 18px; }
.editor-settings > summary small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.editor-settings > summary b { display: inline-block; margin-left: 7px; color: var(--cyan); transition: transform .18s ease; }
.editor-settings[open] > summary b { transform: rotate(180deg); }
.editor-settings-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 13px 15px; border-top: 1px solid var(--line); padding: 18px 20px 21px; }
.editor-settings-grid label { grid-column: span 4; margin: 0; }
.editor-settings-grid .editor-title-field { grid-column: span 8; }
.editor-settings-grid .editor-summary-field { grid-column: 1 / -1; }
.editor-settings-grid .editor-summary-field textarea { min-height: 85px; }
.editor-cover-field { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 7px; }
.editor-cover-field > input { grid-column: 1 / -1; }
.editor-cover-field > button { justify-self: start; }
.editor-menu-field { grid-column: 1 / -1; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; }
.editor-menu-field legend { padding: 0 7px; color: var(--text-soft); font-size: 11px; font-weight: 750; }
.post-menu-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.post-menu-options > label { min-width: 130px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: rgba(3,8,12,.55); cursor: pointer; }
.post-menu-options > label:has(input:checked) { border-color: rgba(85,242,167,.35); background: var(--brand-soft); }
.post-menu-options input { width: 17px; min-height: 17px; accent-color: var(--brand); }
.post-menu-options span { display: grid; gap: 2px; }
.post-menu-options strong { color: var(--text-soft); font-size: 11px; }
.post-menu-options small { color: var(--muted); font-size: 8px; }
.autocomplete-field { position: relative; z-index: 3; align-content: start; }
.autocomplete-field:focus-within { z-index: 12; }
.field-hint { min-height: 16px; color: #586c62; font-size: 9px; font-weight: 500; line-height: 1.35; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 245px;
  overflow-y: auto;
  border: 1px solid var(--line-bright);
  border-radius: 9px;
  padding: 6px;
  background: rgba(6,12,17,.99);
  box-shadow: 0 20px 55px rgba(0,0,0,.52), 0 0 24px rgba(85,242,167,.05);
  scrollbar-color: var(--line-bright) transparent;
}
.autocomplete-option { display: flex; min-height: 38px; align-items: center; border-radius: 7px; padding: 8px 10px; color: var(--text-soft); font-size: 12px; font-weight: 650; cursor: pointer; }
.autocomplete-option::before { content: ">"; margin-right: 9px; color: #4d665a; font-family: var(--mono); font-size: 9px; }
.autocomplete-option:hover, .autocomplete-option.active { background: var(--brand-soft); color: var(--brand); }
.autocomplete-option:hover::before, .autocomplete-option.active::before { color: var(--brand); }
.autocomplete-empty { padding: 11px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.55; }
.editor-commandbar {
  position: sticky;
  top: 88px;
  z-index: 18;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(85,242,167,.2);
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(7,13,19,.92);
  box-shadow: 0 14px 35px rgba(0,0,0,.3);
  backdrop-filter: blur(15px);
}
.editor-tools, .editor-publish { display: flex; align-items: center; gap: 9px; }
.editor-tools { min-width: 0; flex: 1 1 auto; flex-wrap: wrap; gap: 7px; }
.editor-tools > .editor-mode { flex: 0 0 100%; }
.editor-tools > button, .editor-tools > .button { min-height: 36px; padding: 8px 12px; white-space: nowrap; font-size: 12px; }
.editor-mode { color: var(--brand); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .13em; line-height: 1; }
.editor-publish { flex: 0 0 auto; }
.editor-publish select { width: 150px; min-height: 40px; }
.editor-feedback { min-height: 20px; display: flex; align-items: center; gap: 18px; padding: 0 4px; }
.editor-feedback p { margin: 0; }
.editor-workbench { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px; }
.editor-pane { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,10,15,.92); box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.editor-pane > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px 14px; background: rgba(14,25,32,.9); }
.editor-pane > header > div { display: flex; align-items: center; gap: 6px; }
.editor-pane > header strong { margin-left: 6px; color: var(--text-soft); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.editor-pane > header small { color: var(--muted); font-size: 9px; }
.source-pane header i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.source-pane header i:nth-child(2) { background: #f6c95f; }
.source-pane header i:nth-child(3) { background: var(--brand); box-shadow: 0 0 8px rgba(85,242,167,.35); }
.preview-status { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 9px rgba(85,242,167,.5); }
.editor-pane .markdown { width: 100%; min-height: 680px; display: block; border: 0; border-radius: 0; padding: 20px; background: #020705; box-shadow: none; resize: vertical; }
.editor-pane .preview { min-height: 680px; border: 0; border-radius: 0; padding: 22px; background: #091017; }
.editor-pane .preview:empty::before { content: "预览会在输入 Markdown 后自动生成"; display: grid; min-height: 630px; place-items: center; color: #50645a; font-family: var(--mono); font-size: 10px; }

@media (max-width: 900px) {
  .editor-settings-grid label, .editor-settings-grid .editor-title-field { grid-column: span 6; }
  .editor-settings-grid .editor-summary-field { grid-column: 1 / -1; }
  .editor-workbench { grid-template-columns: 1fr; }
  .editor-pane .markdown, .editor-pane .preview { min-height: 520px; }
  .editor-commandbar { align-items: stretch; flex-direction: column; }
  .editor-publish { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
}

@media (max-width: 650px) {
  .user-menu-label { display: none; }
  .user-menu > summary { padding-right: 6px; }
  .user-dropdown { position: fixed; top: 68px; right: 14px; width: min(300px,calc(100vw - 28px)); }
  .menu-guide { grid-template-columns: auto 1fr; }
  .menu-guide .button { grid-column: 1 / -1; width: 100%; }
  .editor-settings > summary small { display: none; }
  .editor-settings-grid label, .editor-settings-grid .editor-title-field, .editor-settings-grid .editor-summary-field { grid-column: 1 / -1; }
  .editor-commandbar { top: 78px; }
  .editor-tools, .editor-publish { justify-content: space-between; }
  .editor-mode { display: none; }
  .editor-tools > button, .editor-tools > .button { width: calc(50% - 4px); }
  .editor-publish select, .editor-publish button { width: 50%; }
  .editor-pane > header small { display: none; }
}

/* Resource library and paid-block builder */
.menu-target-field select[multiple] { min-height: 150px; padding: 5px; }
.menu-target-field select[multiple] option { border-radius: 6px; padding: 8px 10px; }
.menu-target-field select[multiple] option:checked { background: linear-gradient(90deg,var(--brand-soft),rgba(85,214,255,.08)); color: var(--brand); }
.menu-multi-hint { color: var(--cyan); font-family: var(--mono); font-size: 9px; font-weight: 600; }
.asset-upload-panel { margin-bottom: 18px; }
.asset-upload-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(220px,.8fr) auto; align-items: end; gap: 13px; }
.asset-upload-grid label { margin: 0; }
.asset-upload-grid button { min-height: 44px; }
.asset-library-toolbar { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 10px; margin-bottom: 14px; }
.asset-library { display: grid; gap: 8px; }
.asset-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(3,8,12,.55); transition: border-color .18s ease,background .18s ease; }
.asset-card:hover { border-color: rgba(85,242,167,.2); background: rgba(85,242,167,.025); }
.asset-file-icon { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(85,214,255,.18); border-radius: 9px; background: rgba(85,214,255,.06); color: var(--cyan); font-family: var(--mono); font-size: 8px; font-weight: 800; }
.asset-image-preview { width: 44px; height: 44px; display: block; border: 1px solid rgba(85,214,255,.18); border-radius: 9px; object-fit: cover; background: #03080c; }
.asset-card-info { min-width: 0; display: grid; gap: 3px; }
.asset-card-info strong { overflow: hidden; color: #eaf8f0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-info > span,.asset-card-info small { color: var(--muted); font-size: 9px; }
.asset-card-info code { overflow: hidden; color: #557069; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.asset-card-actions small { max-width: 145px; color: var(--muted); font-size: 9px; text-align: right; }
.asset-status.private { border-color: rgba(246,201,95,.22); background: rgba(246,201,95,.07); color: #f6c95f; }
.asset-status.public { border-color: rgba(85,214,255,.22); background: rgba(85,214,255,.07); color: var(--cyan); }
.asset-status.paid { border-color: rgba(85,242,167,.22); background: var(--brand-soft); color: var(--brand); }
.paid-block-card { width: min(620px,100%); max-height: min(780px,calc(100vh - 40px)); overflow-y: auto; text-align: left; }
.bilibili-card { width: min(610px,100%); text-align: left; }
.bilibili-card > h2 { margin: 8px 0 5px; }
.bilibili-card form { margin-top: 20px; }
.bilibili-example { display: grid; gap: 6px; margin: 13px 0 17px; border: 1px solid rgba(85,214,255,.14); border-radius: 9px; padding: 11px 12px; background: rgba(85,214,255,.035); }
.bilibili-example span { color: var(--cyan); font-family: var(--mono); font-size: 8px; font-weight: 750; letter-spacing: .09em; }
.bilibili-example code { overflow-wrap: anywhere; color: #78928a; font-family: var(--mono); font-size: 9px; }
.paid-block-card > .paid-block-close,
.media-picker-card > .media-picker-close,
.software-release-card > .software-release-close { position: absolute; top: 12px; right: 13px; width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0; background: var(--surface-2); color: var(--text); box-shadow: none; font-size: 21px; }
.media-picker-card > .software-picker-close { position:absolute;top:12px;right:13px;width:36px;min-height:36px;border:1px solid var(--line);border-radius:8px;padding:0;background:var(--surface-2);color:var(--text);box-shadow:none;font-size:21px; }
.paid-block-card > .paid-block-close:hover,
.media-picker-card > .media-picker-close:hover,
.software-release-card > .software-release-close:hover { background: var(--surface-3); box-shadow: none; }
.media-picker-card > .software-picker-close:hover { background:var(--surface-3);box-shadow:none; }
.paid-block-card > h2 { margin: 7px 0 5px; }
.paid-block-card form { margin-top: 20px; }
.paid-block-card fieldset { margin: 15px 0; border: 1px solid var(--line); border-radius: 10px; padding: 13px; }
.paid-block-card legend { padding: 0 7px; color: var(--text-soft); font-size: 11px; font-weight: 750; }
.paid-block-assets { max-height: 230px; display: grid; gap: 6px; overflow-y: auto; }
.paid-block-assets label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: rgba(3,8,12,.55); cursor: pointer; }
.paid-block-assets label:has(input:checked) { border-color: rgba(85,242,167,.32); background: var(--brand-soft); }
.paid-block-assets input { width: 17px; min-height: 17px; accent-color: var(--brand); }
.paid-block-assets span { min-width: 0; display: grid; gap: 2px; }
.paid-block-assets strong { overflow: hidden; color: var(--text-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.paid-block-assets small { overflow: hidden; color: #587068; font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.media-picker-card { width: min(760px,100%); max-height: min(800px,calc(100vh - 40px)); overflow-y: auto; text-align: left; }
.media-picker-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 20px 0; }
.media-picker-item { min-width: 0; display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: rgba(3,8,12,.55); }
.media-picker-item img { width: 74px; height: 64px; grid-row: 1 / 3; border-radius: 7px; object-fit: cover; background: #020507; }
.media-picker-item > div { min-width: 0; display: grid; align-content: center; gap: 3px; }
.media-picker-item strong { overflow: hidden; color: var(--text-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.media-picker-item small { color: var(--muted); font-size: 9px; }
.media-picker-item button { grid-column: 2; justify-self: start; }
.media-picker-card > .toolbar { justify-content: space-between; margin-bottom: 0; border-top: 1px solid var(--line); padding-top: 15px; }

@media (max-width: 900px) {
  .asset-upload-grid { grid-template-columns: 1fr 1fr; }
  .asset-upload-grid button { grid-column: 1 / -1; }
  .asset-card { grid-template-columns: 48px minmax(0,1fr) auto; }
  .asset-card-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .software-product-grid > label,.software-product-grid .software-code-field,.software-product-grid .software-name-field { grid-column: span 6; }
  .software-product-grid .software-summary-field { grid-column: 1 / -1; }
}

.software-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px; }
.software-card { border-color:rgba(85,214,255,.25);background:linear-gradient(145deg,rgba(85,214,255,.055),rgba(3,8,12,.88)); }
.software-meta { display:flex;gap:18px;margin:16px 0;color:var(--cyan);font-family:var(--mono);font-size:11px;font-weight:800; }
.software-license-card { display:grid;align-content:start;gap:8px; }
.software-license-card > span { color:var(--cyan);font-family:var(--mono);font-size:9px;letter-spacing:.12em;text-transform:uppercase; }
.software-license-card > h2,.software-license-card > p { margin:0; }
.software-license-card > small { color:var(--muted); }
.license-delivery { display:flex;flex-wrap:wrap;gap:6px;white-space:pre-wrap;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);line-height:1.65;overflow-wrap:anywhere; }
.license-delivery > strong { width:100%;color:var(--green);font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase; }
.license-delivery > a { color:var(--cyan);text-decoration:underline;text-underline-offset:3px; }
.license-device-panel { display:grid;gap:8px;margin-top:6px;border-top:1px solid var(--line);padding-top:12px; }
.license-device-item { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:rgba(3,8,12,.58); }
.license-device-item > div { min-width:0;display:grid;gap:3px; }
.license-device-item strong { overflow:hidden;color:var(--text-soft);font-size:11px;text-overflow:ellipsis;white-space:nowrap; }
.license-device-item small { color:var(--muted);font-size:9px;line-height:1.5; }

@media (max-width: 650px) {
  .asset-upload-grid,.asset-library-toolbar,.admin-list-tools { grid-template-columns: 1fr; }
  .list-pagination { align-items: flex-start; flex-direction: column; }
  .list-pagination > div { width: 100%; justify-content: flex-start; }
  .asset-upload-grid button { grid-column: auto; }
  .asset-card { grid-template-columns: 42px minmax(0,1fr); }
  .asset-status { grid-column: 2; justify-self: start; }
  .asset-card-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .paid-block-card { padding: 24px 18px; }
  .media-picker-items { grid-template-columns: 1fr; }
  .comments { margin-top: 36px; padding-top: 25px; }
  .comments-head { align-items: start; flex-direction: column; gap: 6px; }
  .comment-item { grid-template-columns: 34px minmax(0,1fr); padding: 13px; }
  .comment-item-avatar { width: 34px; height: 34px; }
  .comment-item-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .footer-contact { border-left: 0; padding-left: 0; }
  .software-product-grid > label,.software-product-grid .software-code-field,.software-product-grid .software-name-field,.software-product-grid .software-summary-field { grid-column: 1 / -1; }
  .software-product-grid .software-summary-field textarea { min-height: 145px; }
  .software-product-footer { align-items: stretch; flex-direction: column; }
  .software-product-actions { justify-content: stretch; }
  .software-product-actions .error { width: 100%; flex-basis: 100%; }
  .software-product-actions button { flex: 1; }
  .software-release-grid { grid-template-columns: 1fr; }
  .software-release-asset,.software-release-notes { grid-column: auto; }
  .software-release-actions button { flex: 1; }
  .license-device-item { grid-template-columns:1fr; }
  .license-device-item > button { justify-self:start; }
}

@media (max-height: 760px) {
  .modal-card.software-release-card { padding: 24px 28px; }
  .software-release-card form { margin-top: 14px; }
  .software-release-grid { gap: 11px; }
  .software-release-notes textarea { min-height: 110px; }
  .software-release-actions { margin-top: 12px; padding-top: 12px; }
}

/* API token management */
.token-security-note { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 13px; margin-bottom: 18px; border: 1px solid rgba(246,201,95,.24); border-radius: 11px; padding: 14px 16px; background: rgba(246,201,95,.055); }
.token-security-note > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(246,201,95,.32); border-radius: 9px; color: #f6c95f; font-family: var(--mono); font-weight: 900; }
.token-security-note strong { color: #f9e9b5; font-size: 12px; }
.token-security-note p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.token-admin-grid { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1.25fr); align-items: start; gap: 18px; margin-bottom: 18px; }
.token-form { display: grid; gap: 13px; }
.token-form label { margin: 0; }
.token-result { border-color: rgba(85,242,167,.28); background: linear-gradient(145deg,rgba(85,242,167,.055),rgba(3,8,12,.76)); }
.token-result > p { color: var(--muted); font-size: 10px; }
.token-result > code { display: block; overflow-wrap: anywhere; margin: 15px 0; border: 1px solid rgba(85,242,167,.22); border-radius: 9px; padding: 15px; background: #020607; color: var(--brand); font-size: 12px; line-height: 1.7; user-select: all; }
.token-list { display: grid; gap: 9px; }
.token-item { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(360px,1.6fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: rgba(3,8,12,.55); }
.token-identity { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 9px; }
.token-identity strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.token-identity code { grid-column: 1 / -1; color: var(--cyan); font-size: 9px; }
.token-state { border: 1px solid; border-radius: 999px; padding: 3px 7px; font-family: var(--mono); font-size: 8px; font-weight: 800; }
.token-state.active { border-color: rgba(85,242,167,.24); background: var(--brand-soft); color: var(--brand); }
.token-state.expired { border-color: rgba(246,201,95,.22); background: rgba(246,201,95,.06); color: #f6c95f; }
.token-state.revoked { border-color: rgba(255,103,118,.22); background: rgba(255,103,118,.06); color: #ff7b88; }
.token-item dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.token-item dl > div { min-width: 0; }
.token-item dt { color: #587068; font-family: var(--mono); font-size: 8px; text-transform: uppercase; }
.token-item dd { overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1000px) {
  .token-admin-grid { grid-template-columns: 1fr; }
  .token-item { grid-template-columns: minmax(180px,.8fr) minmax(0,1.2fr) auto; }
  .token-item dl { grid-template-columns: 1fr; gap: 5px; }
}

@media (max-width: 650px) {
  .token-item { grid-template-columns: 1fr; }
  .token-item dl { grid-template-columns: 1fr 1fr; }
  .token-item > button { justify-self: start; }
}
