/* Author rules that set `display` on an element (e.g. `.login-screen { display: flex }`)
   otherwise override the browser's default `[hidden] { display: none }` rule — this makes
   the native `hidden` attribute (used by admin.js to toggle screens) always win. */
[hidden] { display: none !important; }

/* ============================================================
   Takayom1 Portfolio — design tokens (from Claude Design handoff)
   ============================================================ */
:root {
  --bg: #131014;
  --bg-card: #1c171c;
  --bg-modal: #1a151a;
  --bg-media: #0f0c10;

  --text-primary: #f7eef1;
  --text-secondary: #b6a7ae;
  --text-muted: #a89aa1;
  --text-dim: #cdbfc6;
  --text-faint: #85757c;
  --text-faint-2: #74656c;

  --accent: #c496d3;
  --accent-hover: #d3aede;
  --accent-ink: #201430;

  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-stronger: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(185, 142, 224, 0.25);
  --border-accent-strong: rgba(185, 142, 224, 0.5);

  --font-heading: 'Unbounded', sans-serif;
  --font-body: 'Onest', sans-serif;
  --font-mono: 'Onest', sans-serif;

  --radius-card: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-pill: 100px;

  --max-width: 1200px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  animation: page-fade-in .32s ease both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.page-leaving {
  opacity: 0;
  transition: opacity .22s ease;
}

body.intro-active { overflow: hidden; }

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #131014;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity .6s ease;
}
.intro-overlay.fade-out { opacity: 0; pointer-events: none; }
.intro-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

input[type="range"] { accent-color: var(--accent); }

img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; }
video { -webkit-user-drag: none; }

button { font-family: inherit; }

@keyframes pulseDot {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  --nav-pad-x: 48px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  min-height: 104px;
  background: rgba(19, 16, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: padding .3s ease;
}

.nav-logo {
  position: absolute;
  top: 50%;
  left: var(--nav-pad-x);
  transform: translate(0, -50%);
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  transition: left .35s ease, transform .35s ease;
}
.nav-logo:hover { color: var(--text-primary); }
.nav-logo-img { height: 64px; width: auto; display: block; margin-right: 12px; transition: height .3s ease; rotate: 0deg; }
.nav-logo-img.wobble-in { animation: icon-wobble-in .35s ease; }
.nav-logo-img.wobble-out { animation: icon-wobble-out .35s ease; }
@keyframes icon-wobble-in {
  0% { rotate: 0deg; }
  50% { rotate: 10deg; }
  100% { rotate: 0deg; }
}
@keyframes icon-wobble-out {
  0% { rotate: 0deg; }
  50% { rotate: -10deg; }
  100% { rotate: 0deg; }
}
.nav-logo-text {
  color: var(--text-primary);
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .25s ease, max-width .35s ease, margin-left .35s ease;
}
.copyright { font-size: 11px; color: var(--accent); vertical-align: super; margin-left: 2px; }

.nav.scrolled .nav-logo {
  left: 50%;
  transform: translate(-50%, -50%);
}
.nav.scrolled .nav-logo-text {
  opacity: 0;
  max-width: 0;
  margin-left: 0;
  pointer-events: none;
}
.nav.scrolled .nav-logo-img { height: 48px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
}
.nav-cta:hover { background: var(--accent-hover); color: var(--accent-ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 28px;
  cursor: pointer;
  border: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { border: 1px solid var(--border-stronger); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--border-accent-strong); color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 120px 48px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(185, 142, 224, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 56px;
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 0 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
  background: var(--bg-card);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(15, 12, 16, 0.85), transparent);
  pointer-events: none;
}
.hero-media-caption .title { font-weight: 500; font-size: 15px; }
.hero-media-caption .sub { font-family: var(--font-mono); font-size: 13px; color: #d8c8cf; margin-top: 4px; }

/* ============================================================
   Media placeholder (used where no real asset is supplied yet)
   ============================================================ */
.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  background: var(--bg-card);
}

/* ============================================================
   Section headings
   ============================================================ */
.section { padding: 40px 48px 120px; max-width: var(--max-width); margin: 0 auto; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 20px;
}
.section h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}
.section-link { color: var(--accent); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   Cards / project grid
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  cursor: pointer;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease;
  animation: card-in .35s ease both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.card:hover { transform: translateY(-4px); border-color: rgba(185, 142, 224, 0.3); }

.card-media { position: relative; aspect-ratio: 4 / 3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 12, 16, 0.15);
  pointer-events: none;
}
.card-play-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(19, 16, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.triangle {
  width: 0; height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  margin-left: 3px;
}

.card-body { padding: 18px 20px 22px; }
.card-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}
.card-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; }
.card-desc { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ============================================================
   Filter chips (Works page)
   ============================================================ */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-dim);
  transition: all .15s ease;
}
.chip.active {
  border-color: var(--border-accent-strong);
  background: rgba(185, 142, 224, 0.15);
  color: var(--accent);
}

/* ============================================================
   Pricing
   ============================================================ */
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.price-card.emphasis {
  background: linear-gradient(160deg, rgba(185, 142, 224, 0.14), rgba(185, 142, 224, 0.03));
  border-color: rgba(185, 142, 224, 0.3);
}
.price-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.price-title { font-family: var(--font-heading); font-weight: 700; font-size: 19px; margin-bottom: 8px; }
.price-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.price-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-amount { font-family: var(--font-heading); font-size: 26px; font-weight: 800; color: var(--accent); }
.price-unit { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.price-footnote { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint-2); margin: 20px 0 0; }

/* ============================================================
   Contact
   ============================================================ */
.contact-panel {
  background: linear-gradient(135deg, rgba(185, 142, 224, 0.12), rgba(185, 142, 224, 0.03));
  border: 1px solid rgba(185, 142, 224, 0.2);
  border-radius: var(--radius-xl);
  padding: 56px;
  text-align: center;
}
.contact-panel h2 { font-family: var(--font-heading); font-size: 30px; font-weight: 800; margin: 0 0 14px; }
.contact-panel p { color: #c9bac1; font-size: 16px; margin: 0 0 28px; }
.contact-panel .btn-primary { display: inline-flex; padding: 16px 32px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.contact-actions .btn-outline { padding: 16px 28px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.contact-grid .contact-panel { height: 100%; display: flex; flex-direction: column; justify-content: center; }

/* ============================================================
   Spotify "now playing" widget — read-only, no seek/skip controls
   ============================================================ */
.spotify-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.spotify-widget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spotify-widget-head svg { flex-shrink: 0; }

.spotify-widget-body { display: flex; align-items: center; gap: 16px; }

.spotify-cover-wrap { position: relative; flex-shrink: 0; }
.spotify-cover {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #131014;
  display: block;
}
.spotify-cover-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.spotify-track-info { flex: 1; min-width: 0; }
.spotify-title {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotify-artist {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-progress-track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 12px;
  overflow: hidden;
}
.spotify-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 1s linear;
}

.spotify-time {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.spotify-offline {
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  padding: 12px 0;
}

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

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 28px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-faint-2);
  font-size: 13px;
}
.footer-row { display: flex; justify-content: space-between; align-items: center; }
.footer .mono { font-family: var(--font-mono); }
.footer-credit { font-size: 11px; color: var(--text-faint-2); opacity: .6; text-align: center; }

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--text-faint-2);
  opacity: .55;
  transition: opacity .2s ease, color .2s ease;
}
.admin-link:hover { opacity: 1; color: var(--text-dim); }
.admin-link-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Page header (Works page)
   ============================================================ */
.page-head { padding: 56px 48px 20px; max-width: var(--max-width); margin: 0 auto; }
.back-link { font-size: 13px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.page-head h1 { font-family: var(--font-heading); font-size: 40px; font-weight: 800; margin: 0 0 12px; }
.page-head p { color: var(--text-muted); font-size: 15px; margin: 0 0 8px; }

/* ============================================================
   Player modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 10, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .25s ease;
}

.modal-panel {
  width: min(980px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  transform: scale(.96);
  transition: transform .25s ease;
}
.modal-overlay.open .modal-panel { transform: scale(1); }

.modal-media {
  position: relative;
  background: var(--bg-media);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-media.is-video {
  aspect-ratio: 16 / 9;
  align-self: center;
  justify-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82vh, 700px);
}
.modal-media img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.modal-media video { width: 100%; height: 100%; object-fit: contain; display: block; }

.modal-media, .modal-info { transition: opacity .18s ease; }
.modal-media.fade-swap, .modal-info.fade-swap { opacity: 0; }

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(19, 16, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: background .2s ease;
}
.modal-nav:hover { background: rgba(19, 16, 20, 0.85); }
.modal-nav-prev { left: 14px; }
.modal-nav-next { right: 14px; }
@media (max-width: 640px) {
  .modal-nav { width: 34px; height: 34px; font-size: 18px; }
  .modal-nav-prev { left: 8px; }
  .modal-nav-next { right: 8px; }
}

/* ---- Full-size photo zoom (click the image inside the modal) ---- */
.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 7, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.zoom-overlay.open { display: flex; }
.zoom-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 8px; }

.modal-info { padding: 36px; display: flex; flex-direction: column; }
.modal-info .card-tag { margin-bottom: 10px; }
.modal-info h3 { font-family: var(--font-heading); font-size: 24px; font-weight: 700; margin: 0 0 14px; }
.modal-info p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; margin: 0 0 28px; }
.modal-info-actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-info-actions .btn-primary,
.modal-info-actions .btn-outline { padding: 14px; font-size: 14px; width: 100%; }
.modal-info-actions .btn-outline { color: var(--text-dim); }

@media (max-width: 860px) {
  .modal-panel { grid-template-columns: 1fr; }
}

/* Plyr theme override to match the pink brand accent */
:root {
  --plyr-color-main: #b98ee0;
  --plyr-video-background: #0f0c10;
  --plyr-menu-background: #1a151a;
  --plyr-menu-color: #f7eef1;
  --plyr-tooltip-background: #1a151a;
  --plyr-tooltip-color: #f7eef1;
  --plyr-control-icon-size: 16px;
  --plyr-control-radius: 6px;
  --plyr-font-family: 'Onest', sans-serif;
}
.modal-media .plyr { height: 100%; width: 100%; }
.modal-media .plyr__video-wrapper { height: 100%; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 90px 32px 60px; gap: 40px; }
  .hero-media { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 16px 24px; --nav-pad-x: 24px; min-height: 96px; }
  html { scroll-padding-top: 104px; }
  .section, .page-head { padding-left: 24px; padding-right: 24px; }
  .footer { padding: 24px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-logo-text { display: none; }
  .nav-logo-img { margin-right: 0; }
  .nav.scrolled .nav-logo {
    left: var(--nav-pad-x);
    transform: translate(0, -50%);
    rotate: 0deg;
  }
  .nav.scrolled .nav-logo-img { height: 64px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(19, 16, 20, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-cta { padding: 8px 16px; font-size: 13px; }
  .hero h1 { font-size: 38px; }
  .grid-3 { grid-template-columns: 1fr; }
  .modal-overlay { padding: 0; }
  .modal-panel { border-radius: 0; max-height: 100vh; height: 100%; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 20px 44px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .section, .page-head { padding-left: 20px; padding-right: 20px; }
  .nav { padding: 14px 16px; --nav-pad-x: 16px; min-height: 92px; }
  html { scroll-padding-top: 100px; }
  .footer { padding: 20px 16px; gap: 10px; }
  .footer-row { flex-direction: column; gap: 8px; text-align: center; }
  .contact-panel { padding: 32px 22px; }
  .price-card { padding: 24px; }
  .modal-info { padding: 24px; }
  .login-card { padding: 28px 22px; }
  .dropzone { padding: 32px 20px; }
  .admin-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Admin panel
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-logo { width: 56px; height: 56px; margin: 0 auto 4px; }
.login-card h1 { font-family: var(--font-heading); font-size: 20px; font-weight: 800; margin: 0; }
.login-card p { color: var(--text-muted); font-size: 13px; margin: 0 0 8px; }
.login-error { color: #e08a9e; font-size: 13px; }

.config-warning {
  background: rgba(185, 142, 224, 0.08);
  border: 1px solid rgba(185, 142, 224, 0.25);
  color: var(--text-dim);
  font-size: 13px;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.config-warning code { color: var(--accent); }

.save-indicator {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.logout-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.logout-btn:hover { border-color: rgba(185, 142, 224, 0.5); color: var(--accent); }

.admin-shell { min-height: 100vh; display: flex; }

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-logo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 500;
  font-size: 18px;
  padding: 0 12px 28px;
}
.admin-logo-img { height: 52px; width: auto; margin-right: 10px; }
.admin-logo .sub { flex-basis: 100%; font-size: 11px; font-weight: 500; color: var(--text-faint); margin-top: 8px; }

.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover { background: rgba(255, 255, 255, 0.04); }
.admin-nav-item.active { background: rgba(185, 142, 224, 0.12); color: var(--accent); }

.admin-sidebar-foot { margin-top: auto; padding: 16px 12px 4px; border-top: 1px solid var(--border); }

.admin-main { flex: 1; padding: 40px 48px; max-width: 1100px; }
.admin-main h1 { font-family: var(--font-heading); font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.admin-main > p { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; }

.admin-tab { display: none; }
.admin-tab.active { display: block; }

.dropzone {
  border: 2px dashed var(--border-stronger);
  border-radius: 20px;
  padding: 56px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: border-color .2s ease, background .2s ease;
}
.dropzone.dragover { border-color: var(--accent); background: rgba(185, 142, 224, 0.06); }
.dropzone-icon { font-size: 34px; margin-bottom: 12px; }
.dropzone-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.dropzone-hint { font-size: 13px; color: var(--text-faint); }

.section-row { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 16px; }
.section-row h2 { font-family: var(--font-heading); font-size: 17px; font-weight: 700; margin: 0; }
.section-row .count { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }

.upload-list { display: flex; flex-direction: column; gap: 10px; }
.upload-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}
.upload-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #131014;
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upload-controls { display: contents; }
.upload-name-input,
.upload-desc-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  padding: 2px 0;
}
.upload-name-input { font-weight: 600; font-size: 14px; }
.upload-desc-input { font-size: 12px; color: var(--text-faint); }
.upload-name-input:focus,
.upload-desc-input:focus { outline: none; color: var(--accent); }
.upload-name-input::placeholder,
.upload-desc-input::placeholder { color: var(--text-faint); }

.featured-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: var(--border-strong);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.featured-toggle input { accent-color: var(--accent); }
.featured-toggle:has(input:checked) { color: var(--accent); }

.upload-status {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.upload-progress {
  margin-top: 10px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width .15s ease;
}

.select-field {
  background: #131014;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #d69bb0;
  flex-shrink: 0;
  background: transparent;
  border: none;
}
.icon-btn:hover { background: rgba(185, 142, 224, 0.1); }

.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.admin-card-media { aspect-ratio: 4 / 3; position: relative; background: #131014; }
.admin-card-media img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-delete {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(19, 16, 20, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  border: none;
  color: var(--text-primary);
}
.admin-card-body { padding: 12px 14px; }
.admin-card-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-card-cat { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.cat-form { display: flex; gap: 10px; margin-bottom: 24px; }
.text-field {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
}
.text-field::placeholder { color: var(--text-faint); }
.btn-add {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.btn-add:hover { background: var(--accent-hover); }

.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 10px 10px 10px 18px;
  font-size: 14px;
  font-weight: 600;
}
.cat-pill-remove {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  border: none;
}
.cat-pill-remove:hover { background: rgba(185, 142, 224, 0.15); color: var(--accent); }

.price-edit-list { display: flex; flex-direction: column; gap: 14px; }
.price-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.price-edit-row label { font-size: 11px; color: var(--text-faint); display: block; margin-bottom: 6px; }
.price-edit-row input {
  width: 100%;
  background: #131014;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
}
.price-edit-row input.price-input { color: var(--accent); font-weight: 700; }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar-foot { display: none; }
  .admin-main { padding: 28px 20px; max-width: 100%; }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .price-edit-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .upload-row { flex-wrap: wrap; }
  .upload-meta { flex-basis: 100%; order: 1; }
  .upload-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-basis: 100%;
    order: 2;
    margin-left: 72px;
  }
  .upload-controls .select-field { flex: 1; min-width: 0; }
  .cat-form { flex-direction: column; }
  .cat-form .btn-add { width: 100%; }
}
