:root {
  --bg: #050503;
  --panel: rgba(12, 11, 8, 0.84);
  --panel-strong: rgba(18, 15, 9, 0.94);
  --line: rgba(224, 164, 49, 0.38);
  --line-soft: rgba(224, 164, 49, 0.2);
  --gold: #f3c65c;
  --gold-strong: #ffcf58;
  --text: #f4eee0;
  --muted: #aaa18f;
  --danger: #ff765d;
  --ok: #9fd36d;
  --shadow: 0 0 35px rgba(233, 168, 49, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 17%, rgba(246, 183, 53, 0.2), transparent 22rem),
    radial-gradient(circle at 15% 80%, rgba(184, 132, 34, 0.16), transparent 20rem),
    #050503;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 12px 16px 16px;
}

.sidebar,
.content-frame,
.admin-frame {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(9, 9, 7, 0.95), rgba(8, 8, 6, 0.78));
  box-shadow: var(--shadow);
}

.sidebar {
  position: relative;
  height: calc(100vh - 28px);
  padding: 18px 16px;
  border-radius: 18px;
  overflow: hidden;
}

.space-bg {
  position: relative;
}

.space-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 7% 12%, rgba(255, 217, 126, 0.72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 9% 74%, rgba(255, 255, 255, 0.2) 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 14% 67%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.4px),
    radial-gradient(circle at 18% 23%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 22% 31%, rgba(255, 202, 91, 0.5) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 27% 82%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.4px),
    radial-gradient(circle at 32% 63%, rgba(255, 210, 120, 0.22) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 35% 18%, rgba(245, 188, 70, 0.42) 0 1px, transparent 1.6px),
    radial-gradient(circle at 43% 56%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 46% 28%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 51% 9%, rgba(255, 213, 115, 0.56) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 58% 74%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.5px),
    radial-gradient(circle at 63% 38%, rgba(239, 176, 55, 0.62) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 66% 92%, rgba(255, 255, 255, 0.2) 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 71% 21%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 76% 88%, rgba(255, 210, 110, 0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle at 79% 33%, rgba(255, 231, 160, 0.22) 0 0.8px, transparent 1.3px),
    radial-gradient(circle at 84% 47%, rgba(255, 255, 255, 0.26) 0 1px, transparent 1.4px),
    radial-gradient(circle at 91% 15%, rgba(255, 194, 74, 0.62) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 94% 38%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 96% 70%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.5px);
  opacity: 0.58;
  animation: star-drift 48s linear infinite, star-pulse 7s ease-in-out infinite;
}

.space-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 11% 43%, rgba(255, 255, 255, 0.16) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 19% 8%, rgba(255, 205, 95, 0.28) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 24% 54%, rgba(255, 255, 255, 0.14) 0 0.7px, transparent 1.1px),
    radial-gradient(circle at 31% 92%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 39% 39%, rgba(255, 201, 82, 0.22) 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 48% 68%, rgba(255, 255, 255, 0.14) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 55% 24%, rgba(255, 255, 255, 0.13) 0 0.7px, transparent 1.1px),
    radial-gradient(circle at 61% 83%, rgba(255, 214, 118, 0.17) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 69% 6%, rgba(255, 221, 138, 0.2) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 81% 63%, rgba(255, 255, 255, 0.16) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 88% 28%, rgba(255, 255, 255, 0.15) 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 93% 94%, rgba(255, 206, 96, 0.22) 0 0.9px, transparent 1.4px);
  opacity: 0.78;
  animation: star-drift-alt 64s linear infinite, star-pulse 11s ease-in-out infinite reverse;
}

.space-bg > :not(.station-status):not(.eclipse-art) {
  position: relative;
  z-index: 1;
}

.brand {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 197, 84, 0.55));
}

.brand-title {
  margin: 0;
  font-size: 25px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.brand-title span {
  color: var(--gold);
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 15px;
}

.nav-list {
  position: relative;
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(243, 198, 92, 0.55) rgba(9, 9, 7, 0.58);
  scrollbar-width: thin;
}

.nav-link {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #cfc5b0;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  border-color: rgba(255, 204, 91, 0.72);
  background: linear-gradient(90deg, rgba(230, 170, 46, 0.22), rgba(230, 170, 46, 0.04));
  color: var(--text);
  transform: translateX(2px);
}

.nav-link svg,
.gold {
  color: var(--gold);
}

.nav-category {
  display: grid;
  gap: 4px;
}

.nav-sublist {
  display: grid;
  gap: 2px;
  margin: -2px 0 4px 36px;
  padding-left: 10px;
  border-left: 1px solid rgba(224, 164, 49, 0.26);
}

.nav-sublink {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 6px 9px 6px 12px;
  border-radius: 5px;
  color: #a99f8d;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-sublink::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 11px;
  height: 1px;
  background: rgba(224, 164, 49, 0.32);
}

.nav-sublink:hover,
.nav-sublink.active {
  background: rgba(255, 204, 91, 0.08);
  color: var(--text);
}

.nav-sublink.active {
  color: var(--gold-strong);
  background: linear-gradient(90deg, rgba(255, 204, 91, 0.18), rgba(255, 204, 91, 0.04));
  box-shadow: inset 2px 0 0 var(--gold-strong);
}

.nav-sublink.active::before {
  background: var(--gold-strong);
  box-shadow: 0 0 8px rgba(255, 204, 91, 0.72);
}

.station-status {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 11, 8, 0.88);
}

.status-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gold-strong);
  box-shadow: 0 0 16px rgba(255, 203, 82, 0.8);
}

.status-dot.muted-dot {
  background: #786b52;
  box-shadow: none;
}

.content-frame {
  position: relative;
  height: calc(100vh - 28px);
  min-height: 0;
  border-radius: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(243, 198, 92, 0.58) rgba(9, 9, 7, 0.72);
  scrollbar-width: thin;
}

.content-frame::-webkit-scrollbar,
.nav-list::-webkit-scrollbar {
  width: 10px;
}

.content-frame::-webkit-scrollbar-track,
.nav-list::-webkit-scrollbar-track {
  background: rgba(9, 9, 7, 0.72);
  border-left: 1px solid rgba(224, 164, 49, 0.12);
}

.content-frame::-webkit-scrollbar-thumb,
.nav-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(9, 9, 7, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 214, 111, 0.78), rgba(138, 96, 24, 0.78));
  box-shadow: 0 0 10px rgba(255, 204, 91, 0.22);
}

.content-frame::-webkit-scrollbar-thumb:hover,
.nav-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 225, 141, 0.92), rgba(177, 126, 32, 0.86));
}

.eclipse-art {
  position: absolute;
  top: 40px;
  right: -90px;
  width: min(35vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 204, 91, 0.22);
  background:
    radial-gradient(circle at 43% 48%, transparent 0 57%, rgba(255, 204, 91, 0.42) 58%, transparent 60%),
    radial-gradient(circle at 38% 42%, rgba(255, 202, 92, 0.08), transparent 54%);
  box-shadow:
    0 0 52px rgba(255, 199, 90, 0.12),
    inset 0 0 32px rgba(255, 204, 91, 0.08);
  opacity: 0.42;
  filter: blur(0.2px);
  z-index: 0;
}

.eclipse-art::after {
  content: "";
  position: absolute;
  inset: 39% -46%;
  border: 1px solid rgba(232, 176, 65, 0.36);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-13deg);
}

.eclipse-art::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle at 46% 42%, rgba(255, 206, 98, 0.12), transparent 58%);
  filter: blur(18px);
}

.topbar {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(260px, 560px) auto;
  justify-content: end;
  gap: 14px;
  padding: 16px 34px 0;
}

.content-frame > .topbar {
  z-index: 1000;
}

.search-box,
.icon-button,
.field,
.select,
.textarea {
  border: 1px solid var(--line);
  background: rgba(5, 5, 4, 0.74);
  color: var(--text);
  border-radius: 8px;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  height: 45px;
  padding: 0 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.hero-search .search-box {
  grid-template-columns: 24px 1fr 22px;
}

.search-box:focus-within {
  border-color: rgba(255, 204, 91, 0.82);
  background: rgba(8, 8, 6, 0.9);
  box-shadow: 0 0 22px rgba(255, 204, 91, 0.12);
}

.search-wrap {
  position: relative;
  z-index: 90;
  width: 100%;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5000;
  display: grid;
  gap: 6px;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070705;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 204, 91, 0.12), var(--shadow);
  animation: panel-in 140ms ease-out;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 6px;
  color: #e8deca;
}

.search-result > span {
  min-width: 0;
}

.search-result:hover {
  background: rgba(255, 204, 91, 0.1);
}

.search-result small,
.search-result span span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.search-result span span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-empty {
  min-height: 40px;
  padding: 11px 12px;
  border-radius: 6px;
  background: rgba(255, 204, 91, 0.05);
  color: #d7cbb6;
}

.search-box input,
.field,
.textarea,
.select {
  width: 100%;
  outline: none;
}

.search-box input {
  border: 0;
  background: transparent;
  color: var(--text);
}

.kbd {
  color: #bfb39e;
  font-size: 13px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  max-width: 240px;
  height: 45px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 4, 0.74);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-chip:hover {
  border-color: rgba(255, 204, 91, 0.82);
  background: rgba(14, 12, 8, 0.92);
  box-shadow: 0 0 22px rgba(255, 204, 91, 0.12);
  transform: translateY(-1px);
}

.profile-chip img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 204, 91, 0.45));
}

.profile-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 64px));
  margin: 28px auto 0;
  text-align: center;
  animation: rise-in 360ms ease-out both;
}

.home-main h1 {
  margin: 0;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1.08;
}

.home-main p {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 18px;
}

.hero-search {
  max-width: 760px;
  margin: 0 auto 26px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  text-align: left;
}

.category-card,
.info-card,
.article-panel,
.admin-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(21, 18, 11, 0.88), rgba(7, 7, 5, 0.72));
  border-radius: 8px;
}

.category-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 20px 18px;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  border-color: rgba(255, 205, 92, 0.8);
  background: linear-gradient(145deg, rgba(28, 23, 13, 0.95), rgba(9, 8, 6, 0.82));
  box-shadow: 0 0 28px rgba(255, 204, 91, 0.12);
  transform: translateY(-3px);
}

.category-card h2 {
  margin: 0 0 8px;
  color: var(--gold-strong);
  font-size: 18px;
  line-height: 1.14;
}

.category-card p {
  margin: 0;
  color: #d5cbb8;
  font-size: 15px;
  line-height: 1.35;
}

.category-card svg {
  color: var(--gold);
  filter: drop-shadow(0 0 10px rgba(255, 207, 88, 0.45));
}

.category-card > svg:last-child {
  justify-self: end;
  width: 20px;
}

.article-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  padding: 22px 34px 14px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 14px;
  color: #c1b69f;
  font-size: 13px;
}

.breadcrumbs a:hover,
.toc a:hover,
.side-panel a:hover {
  color: var(--gold-strong);
}

.article-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article h1 {
  margin: 0 0 6px;
  font-size: clamp(35px, 3vw, 54px);
}

.edit-page-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 204, 91, 0.72);
  border-radius: 7px;
  background: rgba(8, 8, 6, 0.88);
  color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 204, 91, 0.12);
}

.edit-page-button:hover {
  border-color: var(--gold-strong);
  background: rgba(255, 204, 91, 0.12);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold);
  background: rgba(218, 157, 43, 0.08);
  font-size: 13px;
}

.article-body {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 30px;
}

.toc {
  align-self: start;
  padding: 18px 22px;
}

.toc h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.toc ol,
.side-panel ol {
  margin: 0;
  padding-left: 22px;
  color: #d6ccb8;
  line-height: 1.9;
}

.toc a,
.side-panel a {
  color: inherit;
}

.article-section {
  scroll-margin-top: 90px;
}

.article-section h2 {
  scroll-margin-top: 90px;
  margin: 0 0 10px;
  font-size: 24px;
}

.article-section p {
  color: #d8cebb;
  line-height: 1.55;
}

.wiki-markup {
  display: grid;
  gap: 14px;
}

.wiki-markup a {
  color: var(--gold);
}

.wiki-markup a:hover {
  color: var(--gold-strong);
}

.wiki-heading {
  margin: 8px 0 2px;
  scroll-margin-top: 90px;
}

.wiki-heading[id] {
  scroll-margin-top: 90px;
}

.wiki-paragraph {
  margin: 0;
  color: #d8cebb;
  line-height: 1.58;
}

.wiki-alert {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(255, 204, 91, 0.45);
  border-radius: 8px;
  background: rgba(255, 204, 91, 0.08);
  color: #eadfcb;
}

.wiki-alert svg {
  color: var(--gold);
}

.wiki-alert p {
  margin: 0;
}

.wiki-hr {
  width: 100%;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 204, 91, 0.48), transparent);
}

.wiki-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: #d8cebb;
  line-height: 1.5;
}

.wiki-list-depth-2 {
  margin-left: 20px;
}

.wiki-list-depth-3 {
  margin-left: 40px;
}

.wiki-collapsible {
  border: 1px solid rgba(255, 204, 91, 0.28);
  border-radius: 8px;
  background: rgba(18, 22, 31, 0.64);
  overflow: hidden;
}

.wiki-collapsible summary {
  cursor: pointer;
  padding: 13px 16px;
  color: #dfe6f5;
  font-weight: 700;
}

.wiki-collapsible > div {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.wiki-threat {
  border: 1px solid var(--threat-color);
  border-radius: 6px;
  background: rgba(12, 17, 26, 0.72);
  box-shadow: 0 0 18px color-mix(in srgb, var(--threat-color) 24%, transparent);
  overflow: hidden;
}

.wiki-threat-title {
  padding: 11px 14px;
  background: var(--threat-color);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.wiki-threat-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
}

.wiki-threat-body p {
  margin: 0;
  color: #d9deea;
  font-style: italic;
  line-height: 1.6;
}

.wiki-threat-body span {
  color: #9aa7ff;
  white-space: nowrap;
}

.wiki-threat-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  color: #d9deea;
  cursor: default;
  font-style: italic;
  line-height: 1.6;
}

.wiki-threat-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #9aa7ff;
  cursor: pointer;
  font-style: normal;
  white-space: nowrap;
}

.wiki-threat-toggle:hover {
  color: #c4cbff;
  text-decoration: underline;
}

.wiki-threat-content {
  display: grid;
  gap: 14px;
  padding: 0 20px 22px;
}

.wiki-threat-content .wiki-heading {
  margin-top: 4px;
}

.notice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.info-card {
  min-height: 92px;
  padding: 16px 18px;
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--gold-strong);
}

.info-card.danger h3 {
  color: var(--danger);
}

.info-card p {
  margin: 0;
  color: #cfc5b0;
  font-size: 14px;
}

.side-column {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-top: 46px;
}

.side-panel {
  padding: 18px 20px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  color: #d7cdbb;
  font-size: 14px;
}

.status-table th,
.status-table td {
  border: 1px solid rgba(224, 164, 49, 0.16);
  padding: 9px;
  text-align: left;
}

.login-wrap,
.admin-wrap {
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  margin: 9vh auto;
  padding: 26px;
}

.login-card h1,
.admin-card h1,
.admin-card h2 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field,
.select {
  min-height: 43px;
  padding: 10px 12px;
}

.textarea {
  min-height: 260px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.textarea.compact {
  min-height: 118px;
}

.field-hint {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 204, 91, 0.7);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 201, 84, 0.22), rgba(193, 126, 19, 0.16));
  color: var(--text);
  cursor: pointer;
}

.button.secondary {
  border-color: var(--line-soft);
  background: rgba(12, 11, 8, 0.74);
}

.button.danger {
  border-color: rgba(255, 118, 93, 0.55);
  color: #ffd9d1;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.admin-frame {
  border-radius: 14px;
  padding: 18px;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-card {
  padding: 20px;
}

.account-page {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  width: min(980px, calc(100% - 68px));
  margin: 28px auto;
  animation: rise-in 320ms ease-out both;
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.account-hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(32px, 4vw, 52px);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.account-link-card {
  display: block;
  transition: transform 180ms ease, border-color 180ms ease;
}

.account-link-card:hover {
  border-color: rgba(255, 204, 91, 0.78);
  transform: translateY(-3px);
}

.account-section {
  padding: 20px;
}

.account-section h2 {
  margin-top: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(9, 8, 6, 0.72);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.data-row:hover {
  border-color: rgba(255, 204, 91, 0.55);
  background: rgba(18, 15, 9, 0.84);
  transform: translateY(-1px);
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #d8cebb;
}

.nav-icon,
.category-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 204, 91, 0.38);
  border-radius: 6px;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(255, 207, 88, 0.16);
}

.category-icon {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  font-size: 20px;
}

.shop-card {
  grid-template-columns: 48px minmax(0, 1fr);
}

.shop-card form {
  margin-top: 14px;
}

.field-validation-error,
.validation-summary-errors {
  color: var(--danger);
}

form.category-card {
  color: inherit;
}

@media (max-width: 1160px) {
  .site-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .site-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .content-frame {
    height: auto;
    min-height: calc(100vh - 28px);
    overflow: hidden;
  }

  .station-status {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 18px;
  }

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

  .article-layout,
  .article-body {
    grid-template-columns: 1fr;
  }

  .side-column {
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .login-wrap,
  .admin-wrap {
    padding: 10px;
  }

  .topbar {
    grid-template-columns: 1fr auto auto;
    padding: 12px;
  }

  .home-main {
    width: calc(100% - 24px);
    margin-top: 18px;
  }

  .home-main h1 {
    font-size: 30px;
  }

  .category-grid,
  .notice-row,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .account-page {
    width: calc(100% - 24px);
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-layout {
    padding: 18px 14px;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes star-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-18px, 14px, 0);
  }
}

@keyframes star-drift-alt {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(16px, -12px, 0);
  }
}

@keyframes star-pulse {
  0%,
  100% {
    opacity: 0.48;
  }
  50% {
    opacity: 0.86;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
