:root {
  --black: #0a0a0a;
  --purple: #7B2FBE;
  --yellow: #FFE600;
  --white: #FFFFFF;
  --grey: #1a1a1a;
}

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

body {
  background: var(--purple);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  position: relative;
}

/* main-col: flex column en todos los tamaños */
.main-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Login ─────────────────────────────────────────────────────────────── */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem;
  gap: 2rem;
  background: var(--black);
}

.login-logo {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.login-logo span { color: var(--yellow); }

.login-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
  margin-top: 0.5rem;
  text-align: center;
}

.btn-gitlab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--yellow);
  color: var(--black);
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  border: 3px solid var(--black);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.3);
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.1s;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}

.btn-gitlab:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(255,255,255,0.3);
}

.btn-gitlab:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255,255,255,0.3);
}

.btn-gitlab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: #cc2222;
  color: var(--white);
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.82rem;
  border: 2px solid rgba(255,255,255,0.2);
  max-width: 320px;
  text-align: center;
  line-height: 1.5;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.header {
  background: var(--black);
  padding: 0.85rem 1rem;
  border-bottom: 3px solid var(--purple);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-logo {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.header-logo span { color: var(--yellow); }

.header-logo small {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
  margin-top: 3px;
}

.btn-admin {
  background: var(--purple);
  color: var(--white);
  border: 2px solid var(--purple);
  padding: 0.4rem 0.8rem;
  font-family: Impact, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.1s, color 0.1s;
}

.btn-header-logout {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}

.btn-header-logout:hover { color: #cc2222; }

.btn-admin:hover {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

/* ── Content ───────────────────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: calc(68px + env(safe-area-inset-bottom) + 0.5rem);
}

/* ── Section header ────────────────────────────────────────────────────── */
.section-header { margin-bottom: 1rem; }

.section-title {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.section-count {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
  margin-top: 4px;
}

/* ── Link cards ────────────────────────────────────────────────────────── */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  background: #141414;
  border: 2px solid #2a2a2a;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.12s, transform 0.1s;
}

.link-card:hover {
  border-color: var(--yellow);
  transform: translateX(3px);
}

.link-card:active { transform: translateX(5px); }

.link-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-icon.sheets { background: #0d7755; }
.link-icon.docs   { background: #1a73e8; }
.link-icon.slides { background: #e0920a; }
.link-icon.drive  { background: #3a3a3a; }

.link-info { flex: 1; min-width: 0; }

.link-title {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--white);
}

.link-subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  font-family: monospace;
}

.link-arrow {
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  font-size: 1.2rem;
}

/* ── Bottom Nav ────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #111;
  border-top: 3px solid var(--purple);
  display: flex;
  align-items: stretch;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar { display: none; }

.nav-item {
  flex: 1;
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 0.4rem;
  cursor: pointer;
  border: none;
  border-right: 1px solid #1e1e1e;
  background: transparent;
  color: rgba(255,255,255,0.35);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  font-family: Impact, sans-serif;
  text-transform: uppercase;
  transition: color 0.12s, background 0.12s;
}

.nav-item:last-child { border-right: none; }

.nav-item.active {
  color: var(--yellow);
  background: rgba(255,230,0,0.07);
  border-top: 3px solid var(--yellow);
  margin-top: -3px;
}

.nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* ── Game selector ─────────────────────────────────────────────────────── */
.game-selector {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.game-selector::-webkit-scrollbar { display: none; }

.game-tab {
  padding: 0.45rem 1rem;
  border: 2px solid #333;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-family: Impact, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.game-tab.active {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255,230,0,0.06);
}

.game-tab:hover:not(.active) {
  border-color: #555;
  color: rgba(255,255,255,0.7);
}

/* ── Yo section ────────────────────────────────────────────────────────── */
.yo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 0.75rem;
}

.yo-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--purple);
  border: 3px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.yo-title {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 1.8rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.yo-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
  max-width: 240px;
  line-height: 1.7;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: color 0.12s, border-color 0.12s;
}

.btn-logout:hover {
  color: #cc2222;
  border-color: #cc2222;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  color: rgba(255,255,255,0.25);
  border: none;
  font-family: monospace;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: color 0.12s;
  text-align: left;
}

.sidebar-logout-btn:hover { color: #cc2222; }

.yo-badge {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.15);
  font-family: monospace;
  margin-top: 0.25rem;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.3rem 0.6rem;
}

/* ── Admin Panel ───────────────────────────────────────────────────────── */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.admin-panel {
  background: var(--black);
  border-top: 3px solid var(--yellow);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.admin-header {
  padding: 1rem;
  border-bottom: 2px solid #1e1e1e;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-shrink: 0;
}

.admin-badge {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--purple);
  font-family: monospace;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-badge::before {
  content: '●';
  color: var(--purple);
}

.admin-title {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
}

.admin-repo-hint {
  font-size: 0.68rem;
  font-family: monospace;
  color: rgba(255,255,255,0.35);
  background: #0d0d0d;
  border-left: 3px solid var(--yellow);
  padding: 0.5rem 0.75rem;
  margin: 0 1rem 0;
  line-height: 1.6;
  flex-shrink: 0;
}

.admin-repo-hint strong { color: var(--yellow); }

.btn-close {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--black);
  width: 34px;
  height: 34px;
  font-family: Impact, sans-serif;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

.admin-tabs {
  display: flex;
  border-bottom: 2px solid #1e1e1e;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  margin-top: 0.75rem;
}

.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  padding: 0.65rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: Impact, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s;
}

.admin-tab.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.admin-links-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.admin-count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  font-family: monospace;
}

.btn-new {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 rgba(255,255,255,0.15);
  padding: 0.4rem 0.8rem;
  font-family: Impact, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-new:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.15);
}

.admin-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: #141414;
  border: 2px solid #2a2a2a;
  margin-bottom: 0.4rem;
}

.admin-link-info { flex: 1; min-width: 0; }

.admin-link-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-link-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  font-family: monospace;
  margin-top: 1px;
}

.btn-edit {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--black);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.btn-delete {
  background: #cc2222;
  color: var(--white);
  border: 2px solid var(--black);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.admin-new-tab {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #1e1e1e;
}

.admin-new-tab-title {
  font-family: Impact, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.admin-new-tab-row {
  display: flex;
  gap: 0.5rem;
}

.input-text {
  flex: 1;
  background: #111;
  border: 2px solid #3a3a3a;
  color: var(--white);
  padding: 0.55rem 0.75rem;
  font-family: monospace;
  font-size: 0.88rem;
}

.input-text:focus {
  outline: none;
  border-color: var(--yellow);
}

.input-text::placeholder { color: rgba(255,255,255,0.18); }

.btn-add-tab {
  background: var(--purple);
  color: var(--white);
  border: 2px solid var(--purple);
  padding: 0.55rem 1rem;
  font-family: Impact, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.btn-add-tab:hover:not(:disabled) {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.btn-add-tab:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-delete-tab {
  background: transparent;
  color: #cc2222;
  border: 1px solid #cc2222;
  padding: 0.4rem 0.75rem;
  font-family: Impact, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── Link Form ─────────────────────────────────────────────────────────── */
.form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.form-panel {
  background: var(--white);
  color: var(--black);
  max-height: 90dvh;
  overflow-y: auto;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  background: var(--yellow);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid var(--black);
  position: sticky;
  top: 0;
}

.form-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  font-family: monospace;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 2px;
}

.form-title {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
  line-height: 1;
}

.form-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.3rem; }

.form-label {
  font-family: Impact, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
}

.form-hint {
  font-size: 0.7rem;
  font-family: monospace;
  color: #777;
}

.form-input {
  border: 2px solid var(--black);
  padding: 0.65rem 0.75rem;
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--black);
  background: #f5f5f5;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--white);
}

.type-selector { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.type-btn {
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-family: Impact, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.type-btn.active {
  background: var(--black);
  color: var(--white);
}

.form-footer {
  padding: 1rem 1.25rem;
  border-top: 2px solid #e0e0e0;
  display: flex;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  background: var(--white);
}

.btn-cancel {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--black);
  background: var(--white);
  font-family: Impact, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-save {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--black);
  background: var(--black);
  color: var(--white);
  font-family: Impact, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-save:disabled { opacity: 0.35; cursor: not-allowed; }

.form-commit-hint {
  margin: 0 1.25rem 0.75rem;
  font-size: 0.67rem;
  font-family: monospace;
  color: #555;
  background: #f0f0f0;
  padding: 0.5rem 0.6rem;
  border-left: 3px solid var(--yellow);
  line-height: 1.6;
}

/* ── Loading / Empty ───────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 1rem;
}

.loading-text {
  font-family: monospace;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.12em;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255,255,255,0.18);
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.9;
}

/* ── Saving indicator ──────────────────────────────────────────────────── */
.saving-indicator {
  position: sticky;
  bottom: 0;
  background: var(--yellow);
  color: var(--black);
  padding: 0.5rem 1rem;
  font-family: monospace;
  font-size: 0.75rem;
  text-align: center;
  letter-spacing: 0.1em;
}

/* ── Install prompt ────────────────────────────────────────────────────── */
.install-prompt {
  position: fixed;
  bottom: calc(68px + env(safe-area-inset-bottom) + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: var(--white);
  padding: 0.75rem 1rem;
  border: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  z-index: 150;
  max-width: calc(480px - 2rem);
  width: calc(100% - 2rem);
  box-shadow: 4px 4px 0 var(--black);
}

.install-prompt-title {
  font-family: Impact, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.install-prompt-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  font-family: monospace;
}

.btn-install {
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--black);
  padding: 0.4rem 0.75rem;
  font-family: Impact, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-dismiss {
  background: transparent;
  color: rgba(255,255,255,0.3);
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Sidebar (desktop only) ─────────────────────────────────────────────── */
.sidebar { display: none; }

/* ── Desktop ≥ 640px ───────────────────────────────────────────────────── */
@media (min-width: 640px) {
  body { background: #060606; }

  #app {
    flex-direction: row;
    max-width: 1200px;
    height: 100dvh;
    overflow: hidden;
    border-left: 3px solid #1e1e1e;
    border-right: 3px solid #1e1e1e;
  }

  /* Sidebar */
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 220px;
    min-width: 220px;
    background: #0d0d0d;
    border-right: 3px solid #1e1e1e;
    padding: 1.5rem 0 1rem;
    height: 100dvh;
    overflow-y: auto;
    flex-shrink: 0;
  }

  .sidebar-logo {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 2px solid #1e1e1e;
    margin-bottom: 1.25rem;
  }

  .sidebar-logo-text {
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1;
  }

  .sidebar-logo-text span { color: var(--yellow); }

  .sidebar-logo-sub {
    font-size: 0.5rem;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.2);
    font-family: monospace;
    margin-top: 5px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0.75rem;
    flex: 1;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    color: rgba(255,255,255,0.35);
    font-family: Impact, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
  }

  .sidebar-item:hover {
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.04);
  }

  .sidebar-item.active {
    color: var(--yellow);
    background: rgba(255,230,0,0.07);
    border-left-color: var(--yellow);
  }

  .sidebar-item svg { flex-shrink: 0; opacity: 0.7; }
  .sidebar-item.active svg { opacity: 1; }

  .sidebar-footer {
    padding: 1rem 0.75rem 0;
    border-top: 2px solid #1e1e1e;
    margin-top: 0.75rem;
  }

  .sidebar-admin-btn {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--purple);
    color: var(--white);
    border: none;
    font-family: Impact, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
  }

  .sidebar-admin-btn:hover {
    background: var(--yellow);
    color: var(--black);
  }

  /* Main content column */
  .main-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100dvh;
    overflow: hidden;
  }

  .header {
    flex-shrink: 0;
    border-bottom: 2px solid #1e1e1e;
  }

  .content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1.5rem;
  }

  /* Hide mobile nav */
  .bottom-nav { display: none; }

  /* Admin: centered modal on desktop */
  .admin-overlay {
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
  }

  .admin-panel {
    max-width: 680px;
    width: 100%;
    max-height: 85dvh;
    border-top: none;
    border: 3px solid var(--yellow);
  }

  /* Link form: centered modal on desktop */
  .form-overlay {
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
  }

  .form-panel {
    max-width: 560px;
    width: 100%;
    max-height: 85dvh;
  }
}

/* ── Tablet 481–639px ──────────────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 639px) {
  body {
    background: var(--purple);
    background-image: repeating-linear-gradient(
      45deg, transparent, transparent 10px,
      rgba(0,0,0,0.12) 10px, rgba(0,0,0,0.12) 20px
    );
  }
  #app {
    border-left: 3px solid var(--purple);
    border-right: 3px solid var(--purple);
  }
}
