:root {
  --bg: #0a0c10;
  --bg-elev: #12151c;
  --text: #e8eaef;
  --muted: rgba(232, 234, 239, 0.55);
  --accent: #c9a962;
  --accent-soft: rgba(201, 169, 98, 0.18);
  --border: rgba(255, 255, 255, 0.08);
  --nav: #2f6fb5;
  --nav-hover: #3a82cf;
  --radius: 14px;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

.bg-glow {
  position: fixed;
  inset: -30% -20%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 20% 0%, rgba(201, 169, 98, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 15%, rgba(120, 160, 220, 0.08), transparent 65%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 255, 255, 0.04), transparent 55%);
  z-index: 0;
}

.site-head {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 1.5rem 3rem;
  max-width: 42rem;
  margin-inline: auto;
}

.site-head.compact {
  padding: 2rem 1.5rem 1rem;
  text-align: left;
  max-width: 56rem;
}

.site-head h1 {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--accent);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.head-nav {
  margin-top: 1.75rem;
}

.link-admin {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.2s, border-color 0.2s;
}

.link-admin:hover {
  background: var(--accent-soft);
  border-color: rgba(201, 169, 98, 0.35);
}

main,
.page-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.notice {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--muted);
}

.notice strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}

.notice-error {
  border-color: rgba(220, 100, 100, 0.35);
  color: #e8b4b4;
}

.notice-ok {
  border-color: rgba(120, 200, 160, 0.35);
  color: #b8e0cc;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .masonry {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1100px) {
  .masonry {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
}

.tile {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.2s;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  border-color: rgba(201, 169, 98, 0.22);
}

.tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tile-img-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #08090c;
  position: relative;
}

.tile-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile:hover .tile-img-wrap img {
  transform: scale(1.05);
}

.tile-video-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 12, 0.72);
  color: #f5f5f7;
  font-size: 0.95rem;
  letter-spacing: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tile--video:hover .tile-video-badge {
  background: rgba(8, 9, 12, 0.85);
}

.pswp__video-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.pswp__video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  background: #000;
}

.tile-cap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem 1.15rem;
}

.tile-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.tile-desc {
  font-size: 0.82rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-about {
  width: 100%;
  max-width: none;
  margin: 0.55rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.topic-about .topic-desc-p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.topic-about a {
  color: var(--accent, #c4a35a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.topic-about a:hover {
  color: var(--text);
}

.topic-desc-links {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}

.topic-desc-links a {
  display: inline;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 163, 90, 0.4);
  padding-bottom: 0.05rem;
  line-height: 1.3;
}

.topic-desc-links a:hover {
  border-bottom-color: var(--accent, #c4a35a);
}

.site-foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-foot code {
  font-size: 0.76em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.site-foot a {
  color: var(--accent);
}

/* PhotoSwipe captions */
.pswp-caption-outer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  pointer-events: none;
}

.pswp__custom-caption {
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(1rem, 5vw, 3rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.45;
  pointer-events: none;
}

.pswp__custom-caption h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.pswp__custom-caption p {
  margin: 0;
  opacity: 0.85;
}

/* Admin */
.page-admin .site-head a {
  color: var(--accent);
}

.admin-wrap {
  max-width: 34rem;
  margin-inline: auto;
}

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.admin-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-subnav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-subnav a.is-active {
  border-color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.14);
  color: #f4f1ea;
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.admin-search label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 16rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-search input[type="search"] {
  width: 100%;
}

.admin-photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.admin-photo-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 10rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-photo-filters input,
.admin-photo-filters select {
  width: 100%;
}

.admin-photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}

.admin-pager a {
  color: var(--accent, #c4a35a);
}

.admin-repair-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.admin-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .admin-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-home-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-home-card:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background: rgba(196, 163, 90, 0.08);
}

.admin-home-card strong {
  font-size: 1.05rem;
}

.account-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.account-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.account-subnav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.account-subnav a.is-active {
  border-color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.14);
  color: #f4f1ea;
}

.account-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .account-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.account-home-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-home-card:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background: rgba(196, 163, 90, 0.08);
}

.account-home-card strong {
  font-size: 1.05rem;
}

.account-edit-panel {
  max-width: 28rem;
}

.account-edit-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.85rem;
}

.user-wm-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 960px) {
  .user-wm-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.user-wm-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}

.user-wm-card h2 {
  color: var(--accent, #c9a962);
  flex: 0 0 auto;
}

.user-wm-card .stack-form {
  flex: 1 1 auto;
}

.uwm-preview-block {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 1.25rem;
}

.user-wm-card .uwm-preview-frame {
  margin-top: 0;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  background: #0a0c10;
}

.user-wm-card .uwm-preview-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.uwm-combo-note {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  min-height: 2.4em;
  line-height: 1.35;
}

.uwm-current-img {
  vertical-align: middle;
  max-height: 56px;
  width: auto;
  display: block;
}

.uwm-current-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.12) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: rgba(0, 0, 0, 0.35);
  vertical-align: middle;
}


.panel {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--border);
}

.panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
}

.panel label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.panel input[type="text"],
.panel input[type="password"],
.panel input[type="email"],
.panel input[type="file"],
.panel .password-field input,
.panel select,
.panel textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.panel .password-field input {
  margin-top: 0;
  padding-right: 4.25rem;
  box-sizing: border-box;
}

.panel .password-toggle {
  background: transparent;
  border: none;
  border-radius: 6px;
  box-shadow: none;
  color: var(--accent, #c4a35a);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
}

.panel .password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.panel button {
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #c9a962, #a88b42);
  color: #15130a;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.upload-form textarea {
  resize: vertical;
  min-height: 4rem;
}

.upload-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 1.25rem;
}

.upload-preview-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.upload-preview-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0c10;
}

.upload-preview-thumb img,
.upload-preview-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.upload-preview-thumb.is-dng {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent, #c9a962);
}

.upload-preview-thumb.is-video {
  position: relative;
}

.upload-preview-thumb.is-video::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 12, 0.35);
  color: #f5f5f7;
  font-size: 1rem;
  pointer-events: none;
}

.upload-dng-hint {
  margin: -0.35rem 0 1rem;
  font-size: 0.85rem;
}

.upload-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.upload-preview-meta strong {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-meta span {
  font-size: 0.7rem;
  color: var(--muted);
}

.upload-preview-remove {
  margin: 0;
  padding: 0.3rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.upload-preview-remove:hover {
  color: #f0c4c4;
  border-color: rgba(220, 100, 100, 0.45);
  background: rgba(180, 60, 60, 0.2);
}

.form-error {
  color: #f0a8a8;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-list li:last-child {
  border-bottom: 0;
}

.admin-list img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.account-upload-list li.account-upload-item {
  align-items: flex-start;
}

.account-upload-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.account-upload-edit {
  flex: 1 1 16rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-upload-fields {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .account-upload-fields {
    grid-template-columns: 1.4fr 1fr;
  }
}

.account-upload-fields label {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.account-upload-fields input,
.account-upload-fields select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}

.account-upload-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.account-upload-delete {
  margin: 0;
  flex: 0 0 auto;
}

.account-upload-delete .btn-danger,
button.btn-danger {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 100, 100, 0.45);
  background: rgba(180, 60, 60, 0.25);
  color: #f0c4c4;
  cursor: pointer;
}

.account-upload-delete .btn-danger:hover,
button.btn-danger:hover {
  background: rgba(180, 60, 60, 0.4);
}

.admin-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(200, 80, 80, 0.2);
  color: #ffb4b4;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-meta {
  flex: 1;
}

.admin-meta strong {
  display: block;
  font-weight: 500;
}

.muted {
  font-size: 0.82rem;
  color: var(--muted);
}

.btn-danger {
  background: rgba(200, 80, 80, 0.25) !important;
  color: #ffb4b4 !important;
}

.btn-ghost {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
}

.logout-row {
  margin-top: 1rem;
}

/* Brand + proguitar-like top menu */
.brand-bar {
  position: relative;
  z-index: 2;
  padding: 1.35rem 1.25rem 1rem;
  background: linear-gradient(180deg, #151820 0%, #0a0c10 100%);
  border-bottom: 1px solid var(--border);
}

.brand-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.brand-inner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(70vw, 220px);
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: #152038;
  color: #f3e6d4;
  padding: 1rem 1.25rem;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.footer-brand-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  width: 100%;
}

.footer-brand {
  display: inline-flex;
  flex-shrink: 0;
}

.footer-brand img {
  display: block;
  height: 28px;
  width: auto;
  opacity: 0.95;
}

.footer-legal {
  margin: 0;
  color: #c9b8a0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.site-footer .footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0 auto;
  color: #c9b8a0;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-footer .footer-credit:hover,
.site-footer .footer-credit:focus-visible {
  color: var(--accent);
}

.site-footer .footer-credit img {
  height: 20px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: 3px;
  padding: 0.12rem 0.28rem;
  object-fit: contain;
}

@media (max-width: 640px) {
  .footer-brand-block {
    justify-content: center;
  }

  .site-footer .footer-credit {
    margin-left: 0;
  }
}

.top-nav {
  position: relative;
  z-index: 2;
  background: var(--nav);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.top-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 2.65rem;
}

.nav-left,
.nav-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
}

.top-nav a:hover,
.top-nav a.is-active {
  background: rgba(255, 255, 255, 0.16);
}

.nav-user {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

.hero-block {
  margin-bottom: 1.75rem;
}

.hero-block h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
}

.crumb {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.crumb a {
  color: var(--accent);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .topic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .topic-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1100px) {
  .topic-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
}

.topic-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s, border-color 0.2s, box-shadow 0.3s;
}

.topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 181, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.topic-cover {
  display: block;
  aspect-ratio: 1;
  background: #0d1118;
  overflow: hidden;
}

.topic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent);
  background: radial-gradient(circle at 30% 20%, rgba(47, 111, 181, 0.35), transparent 55%);
}

.topic-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem 1.1rem;
}

.topic-meta strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.topic-meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

.topic-meta em {
  font-style: normal;
  font-size: 0.8rem;
  color: rgba(232, 234, 239, 0.4);
}

.page-auth .page-main {
  max-width: 32rem;
}

.auth-card.wide {
  max-width: 40rem;
}

.auth-card h1 {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 400;
}

.stack-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.password-field {
  position: relative;
  display: block;
  margin-top: 0.35rem;
}

.password-field input {
  width: 100%;
  padding-right: 4.25rem;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent, #c4a35a);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.password-toggle[aria-pressed="true"] {
  color: var(--text);
}


.auth-links {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-links a {
  color: var(--accent);
}

.admin-row {
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-actions form {
  margin: 0;
}

.admin-actions button {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.status-pending {
  background: rgba(201, 169, 98, 0.2);
  color: #e6d3a0;
}

.status-approved {
  background: rgba(90, 180, 130, 0.2);
  color: #b8e0cc;
}

.status-rejected {
  background: rgba(200, 80, 80, 0.2);
  color: #ffb4b4;
}

.panel-sub {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.panel-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}

.topic-admin-list .admin-meta {
  min-width: 12rem;
}

.panel input[type="number"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.panel input[type="range"] {
  width: 100%;
  max-width: 28rem;
  margin-top: 0.5rem;
  accent-color: var(--accent, #c4a35a);
}

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
}

.check-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.range-hint {
  display: flex;
  justify-content: space-between;
  max-width: 28rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.watermark-form {
  max-width: 36rem;
}

.watermark-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .watermark-layout {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  }
}

.watermark-preview-panel {
  min-width: 0;
}

.watermark-preview-note {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.watermark-preview-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0c10;
  max-width: 36rem;
}

.watermark-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.watermark-preview-status {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
}

.wm-font-dropdown {
  position: relative;
  margin-top: 0.35rem;
  max-width: 36rem;
}

.wm-font-trigger.panel-like-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  text-align: left;
}

.wm-font-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  flex-shrink: 0;
}

.wm-font-dropdown.is-open .wm-font-caret {
  transform: rotate(180deg);
}

.wm-font-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #12151c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  max-height: 16rem;
  overflow: auto;
}

.wm-font-menu[hidden] {
  display: none !important;
}

.wm-font-item {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
}

.wm-font-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wm-font-item.is-selected {
  background: rgba(196, 163, 90, 0.18);
  color: #f4f1ea;
}



@media (max-width: 640px) {
  .top-nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.35rem 0.5rem 0.55rem;
  }

  .nav-left,
  .nav-right {
    justify-content: flex-start;
  }

  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: none;
  }
}

/* Emner pulldown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.nav-dropdown.is-active .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  opacity: 0.9;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 40;
  min-width: 260px;
  max-width: min(90vw, 360px);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0.4rem;
  border-radius: 8px;
  background: #1a2330;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.nav-dropdown-panel[hidden] {
  display: none !important;
}

.nav-dd-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-dd-link:hover,
.nav-dd-link.is-current {
  background: rgba(255, 255, 255, 0.12);
}

.nav-dd-child {
  padding-left: 1.15rem;
  font-weight: 400;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.88) !important;
}

.nav-dd-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  opacity: 0.65;
}

.nav-dropdown-empty {
  display: block;
  padding: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.nav-sub-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0 0.25rem;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  margin: 0.15rem 0 0.35rem 0.55rem;
  padding-left: 0.35rem;
}

.album-section {
  margin-bottom: 2.75rem;
}

.album-section-head {
  margin-bottom: 1rem;
}

.album-section-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 400;
}

.album-section-head h2 a {
  color: inherit;
  text-decoration: none;
}

.album-section-head h2 a:hover {
  color: var(--accent);
}

.album-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.album-section-desc {
  margin-top: 0.35rem !important;
  max-width: 40rem;
}

.topic-grid-single {
  margin-bottom: 2rem;
}
