:root {
  --bg: #f5f1fb;
  --bg-soft: rgba(247, 241, 252, 0.94);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: rgba(255, 255, 255, 0.99);
  --line: rgba(123, 0, 95, 0.18);
  --line-strong: rgba(123, 0, 95, 0.34);
  --text: #2c2140;
  --muted: #756483;
  --accent: #7b005f;
  --accent-strong: #f08ccf;
  --accent-bright: #9de7ff;
  --cyan-soft: #dff5ff;
  --accent-soft: rgba(123, 0, 95, 0.08);
  --alert: #ffb48a;
  --shadow: 0 8px 20px rgba(55, 70, 85, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: #7b005f;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 120, 120, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 120, 120, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent);
}

body::after {
  content: none;
}

.page-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 0 20px;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at left center, rgba(123, 0, 95, 0.12), transparent 24%),
    radial-gradient(circle at right top, rgba(240, 140, 207, 0.16), transparent 22%),
    radial-gradient(circle at right bottom, rgba(157, 231, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f4fc 0%, #f4effa 100%);
}

.page-shell::before {
  content: none;
}

.hero,
.panel {
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.hero {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: #fff;
  overflow: hidden;
}

.topbar,
.panel-menu,
.hero-grid,
.cover-panel-header,
.portal-grid,
.board-grid,
.forum-grid,
.stack-list,
.upload-grid,
.info-grid,
.schedule-grid,
.library-header,
.panel-heading,
.admin-panel-header,
.mini-status-grid {
  display: grid;
  gap: 18px;
}

.topbar {
  align-items: center;
  grid-template-columns: 1fr auto;
  margin-bottom: 0;
  padding: 12px 18px;
  background: linear-gradient(90deg, #7b005f, #7b005f, #86cdea);
  color: #fff;
}

.panel-menu {
  grid-template-columns: repeat(10, auto);
  justify-content: start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-top: 1px solid rgba(123, 0, 95, 0.12);
  border-bottom: 1px solid rgba(123, 0, 95, 0.12);
  border-radius: 0;
  background: #fff;
}

.panel-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(123, 0, 95, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.panel-menu a:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(123, 0, 95, 0.08);
  box-shadow: none;
}

.panel-select-wrap {
  display: grid;
  gap: 8px;
  padding: 0 18px 14px;
  background: #fff;
}

.panel-select-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
}

.retro-banner {
  position: relative;
  min-height: 112px;
  background:
    repeating-conic-gradient(
      from -12deg at 50% 100%,
      #f29ad8 0deg 12deg,
      #7b005f 12deg 24deg,
      #9de7ff 24deg 36deg
    );
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.retro-masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 12px 18px;
}

.retro-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.retro-badge-mark {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #fff url("kiska.png") center/84% no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.retro-badge-text {
  font-family: "Orbitron", sans-serif;
  color: #2c2c2c;
  font-size: 1.1rem;
}

.retro-socials {
  display: flex;
  gap: 12px;
  align-items: center;
}

.retro-socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  color: #7b005f;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.retro-socials img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.category-index-panel {
  padding-top: 14px;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-row:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(72, 49, 99, 0.08);
}

.category-row h3 {
  margin: 4px 0 6px;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
}

.category-row p {
  margin: 0;
}

.category-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 0, 95, 0.18);
  background: rgba(123, 0, 95, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.user-auth-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.brand-mark,
.brand-icon {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 58px;
}

.brand-mark {
  background: rgba(255, 255, 255, 0.16) url("kiska.png") center/86% no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: none;
}

.brand-icon {
  background: rgba(255, 255, 255, 0.16) url("kiska.png") center/86% no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.brand-icon svg {
  display: none;
}

.eyebrow,
.section-tag,
.panel-copy,
.hero-text,
.topic-pills span,
.feature-list,
.file-meta,
.file-empty-text,
.portal-tag {
  color: var(--muted);
}

.eyebrow,
.section-tag,
.portal-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.brand h1,
.hero-copy h2,
.panel h2,
.portal-card h3,
.hero-panel strong {
  margin: 0;
  font-family: "Orbitron", sans-serif;
}

.hero-grid {
  grid-template-columns: 1fr 300px;
  align-items: stretch;
}

.hero-copy h2 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
  max-width: 9ch;
  margin: 12px 0 18px;
  text-wrap: balance;
  text-shadow: none;
}

.hero-text,
.panel p,
.feature-list,
.portal-card p {
  font-size: 0.97rem;
  line-height: 1.58;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-panel,
.cover-panel,
.stream-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.hero-panel {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after,
.cover-panel::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(123, 0, 95, 0.18), transparent 55%);
  pointer-events: none;
}

.cover-panel {
  margin-top: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  border-top: 4px solid #7b005f;
}

.cover-panel-alt {
  background:
    radial-gradient(circle at top right, rgba(211, 143, 199, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(143, 207, 240, 0.08), transparent 24%),
    var(--panel);
}

.cover-panel-header {
  align-items: start;
  grid-template-columns: 1fr auto;
  margin-bottom: 12px;
}

.cover-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.feature-cover-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, minmax(0, 0.75fr));
  gap: 10px;
}

.cover-gallery-alt {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cover-shot {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.86);
  min-height: 148px;
}

.cover-shot-wide {
  grid-column: span 2;
}

.cover-shot-hero {
  grid-row: span 3;
  min-height: 420px;
}

.cover-shot-tall {
  grid-row: span 2;
  min-height: 308px;
}

.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(6, 2, 12, 0.26);
}

.cover-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(123, 0, 95, 0.18);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.feature-cover-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 18px;
  background:
    linear-gradient(180deg, transparent, rgba(250, 246, 252, 0.1) 20%, rgba(24, 15, 32, 0.6));
}

.feature-kicker {
  margin: 0 0 8px;
  color: #f2ddff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.feature-cover-overlay h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(24, 15, 32, 0.35);
}

.feature-cover-overlay h3 span {
  color: #f3b6df;
}

.feature-cover-overlay p:last-child {
  margin: 10px 0 0;
  max-width: 24rem;
  color: #f8efff;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mini-status-grid {
  margin-top: 14px;
}

.mini-status-grid article,
.upload-stats article,
.schedule-grid article {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mini-status-grid strong,
.upload-stats span,
.schedule-grid strong {
  display: block;
  font-size: 1.12rem;
}

.primary-btn,
.secondary-btn,
.portal-link,
.card-link,
.admin-btn,
button {
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-btn,
.portal-link,
.card-link,
.admin-btn,
button {
  color: #fff;
  background: linear-gradient(135deg, #7b005f, #f08ccf);
  padding: 14px 18px;
}

.secondary-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
}

.primary-btn:hover,
.secondary-btn:hover,
.portal-link:hover,
.card-link:hover,
.admin-btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(72, 49, 99, 0.12);
}

main {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.panel {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.portal-grid,
.info-grid,
.upload-grid {
  grid-template-columns: 1fr;
}

.board-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.forum-grid {
  grid-template-columns: 1fr;
}

.portal-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  position: relative;
  overflow: hidden;
}

.catalog-panel,
.board-panel {
  min-width: 0;
}

.stack-list {
  margin-top: 18px;
}

.stack-list article,
.forum-card,
.post-card,
.share-card,
.thread-card,
.thread-message,
.rom-section,
.rom-entry,
.compose-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stack-list article,
.forum-card,
.post-card,
.share-card,
.thread-card,
.thread-message,
.rom-section,
.rom-entry {
  padding: 18px;
}

.compose-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.post-list,
.share-list,
.thread-list,
.thread-messages,
.rom-section-list,
.rom-entry-list {
  display: grid;
  gap: 14px;
}

.post-list.empty,
.share-list.empty,
.thread-list.empty,
.rom-section-list.empty {
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 20px;
}

.post-meta,
.share-meta,
.inline-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card h3,
.share-card h3,
.forum-card h3,
.thread-card h3 {
  margin: 0 0 8px;
  font-family: "Orbitron", sans-serif;
}

.post-card p,
.share-card p,
.forum-card p,
.thread-card p,
.thread-message p {
  margin: 0;
}

.post-card header,
.share-card header,
.thread-card header {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.thread-card {
  display: grid;
  gap: 14px;
}

.thread-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: start;
}

.thread-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.thread-message {
  background: rgba(255, 255, 255, 0.025);
}

.thread-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.thread-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thread-reply-form {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.rom-board {
  margin-top: 18px;
}

.rom-toolbar,
.rom-mode-switch,
.rom-board-stack {
  display: grid;
  gap: 14px;
}

.rom-toolbar {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  position: relative;
  z-index: 3;
}

.rom-mode-switch {
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: start;
  align-items: center;
  position: relative;
  z-index: 4;
}

.rom-mode-switch .mini-btn {
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 700;
  position: relative;
  z-index: 5;
}

.rom-mode-switch button:last-child {
  border-color: rgba(240, 140, 207, 0.42);
  background: linear-gradient(135deg, rgba(123, 0, 95, 0.16), rgba(240, 140, 207, 0.22));
  box-shadow: 0 10px 24px rgba(123, 0, 95, 0.14);
}

.rom-mode-switch button:last-child:hover {
  border-color: rgba(240, 140, 207, 0.62);
}

.rom-search-group {
  max-width: 520px;
}

.active-mode {
  border-color: var(--line-strong);
  background: rgba(123, 0, 95, 0.12);
}

.danger-btn {
  border-color: rgba(255, 120, 120, 0.34);
  background: rgba(255, 120, 120, 0.12);
  color: #8f2d3d;
}

.rom-section {
  display: grid;
  gap: 14px;
}

.rom-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.rom-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.rom-section-main {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.rom-cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 36px rgba(6, 2, 12, 0.22);
}

.rom-cover-placeholder {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: var(--muted);
  text-align: center;
}

.rom-section-body {
  display: grid;
  gap: 14px;
}

.rom-shelf {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.rom-shelf-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.rom-shelf-header h4 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
}

.rom-entry {
  background: rgba(255, 255, 255, 0.025);
}

.rom-entry header {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.rom-entry h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
}

@media (max-width: 720px) {
  .rom-section-header,
  .rom-section-main {
    grid-template-columns: 1fr;
  }
}

.resource-actions,
.entry-files,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-files {
  margin-top: 12px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
}

.chip-link:hover {
  border-color: var(--line-strong);
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 36px rgba(72, 49, 99, 0.1);
}

.portal-visual {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #f6f8fb;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
}

.portal-visual svg,
.portal-logo {
  display: block;
  width: min(100%, 240px);
  max-height: 96px;
  object-fit: contain;
}

.portal-copy {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.portal-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
}

.discord-card {
  background: #fff;
}

.twitch-card {
  background: #fff;
}

.admin-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(123, 0, 95, 0.26);
  background: rgba(123, 0, 95, 0.08);
}

.hidden,
.admin-panel.hidden,
.modal.hidden {
  display: none;
}

.panel-heading {
  align-items: start;
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
}

.dropzone {
  position: relative;
  min-height: 280px;
  border: 2px dashed rgba(123, 0, 95, 0.34);
  border-radius: 24px;
  padding: 26px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  background:
    radial-gradient(circle at top, rgba(123, 0, 95, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.82);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dropzone.dragover {
  border-color: var(--accent-strong);
  background:
    radial-gradient(circle at top, rgba(123, 0, 95, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.92);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.upload-stats {
  display: grid;
  gap: 14px;
}

.library-header {
  align-items: center;
  grid-template-columns: 1fr auto;
  margin: 22px 0 14px;
}

.admin-panel-header {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.admin-actions,
.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.user-auth-tabs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.file-library {
  display: grid;
  gap: 12px;
}

.file-library.empty {
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 20px;
}

.file-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.file-type {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(123, 0, 95, 0.2), rgba(123, 0, 95, 0.22));
  font-weight: 700;
}

.file-name {
  margin: 0 0 6px;
  font-weight: 700;
}

.file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-btn {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-list {
  padding-left: 18px;
  margin: 18px 0 0;
}

.feature-list li::marker {
  color: var(--accent);
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.topic-pills span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 1000;
  background: rgba(69, 49, 88, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 430px);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.input-group {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.input-group input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.input-group textarea {
  width: 100%;
  resize: vertical;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}

.login-message {
  min-height: 24px;
  color: var(--alert);
}

.hero.twitch-boost {
  border-color: rgba(123, 0, 95, 0.48);
  box-shadow: 0 24px 60px rgba(72, 49, 99, 0.12);
}

@media (max-width: 920px) {
  .topbar,
  .panel-menu,
  .hero-grid,
  .cover-panel-header,
  .feature-cover-grid,
  .cover-gallery,
  .cover-gallery-alt,
  .category-row,
  .portal-grid,
  .board-grid,
  .forum-grid,
  .upload-grid,
  .info-grid,
  .panel-heading,
  .library-header,
  .admin-panel-header {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-items: start;
  }

  .hero-copy h2 {
    max-width: 100%;
  }

  .cover-shot-wide,
  .cover-shot-hero,
  .cover-shot-tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }

  .portal-card,
  .rom-section-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100% - 6px);
    padding-top: 4px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 16px;
  }

  .brand {
    align-items: flex-start;
  }

  .hero-actions,
  .file-actions,
  .entry-files,
  .resource-actions,
  .topbar-actions,
  .modal-actions,
  .admin-actions {
    flex-direction: column;
  }

  .file-card {
    grid-template-columns: 1fr;
  }
}
