* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* ===== Music Admin Panel ===== */
.music-admin {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.music-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.music-admin-header-left h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.music-track-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--front-muted, #888);
  margin-left: 6px;
}

.music-batch-hint {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--front-muted, #999);
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #ddd);
  background: var(--surface-color, #fff);
  color: var(--text-color, #222);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.4;
}

.music-btn:hover {
  background: var(--front-alt, #f5f5f5);
  border-color: var(--accent-color, #0070f3);
}

.music-btn-primary {
  background: var(--btn-primary-bg, #222);
  color: var(--btn-primary-text, #fff);
  border-color: var(--btn-primary-bg, #222);
}

.music-btn-primary:hover {
  background: var(--accent-color, #0070f3);
  border-color: var(--accent-color, #0070f3);
}

.music-btn-danger {
  background: var(--btn-danger-bg, #dc3545);
  color: var(--btn-danger-text, #fff);
  border-color: var(--btn-danger-bg, #dc3545);
}

.music-btn-danger:hover {
  opacity: 0.85;
}

.music-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--front-muted, #888);
}

.music-btn-ghost:hover {
  background: var(--front-alt, #f5f5f5);
  color: var(--text-color, #222);
}

.music-btn-icon {
  padding: 6px;
  border-radius: 6px;
}

.music-btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.music-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.music-btn-spinner {
  display: inline-flex;
  align-items: center;
}

.music-spinner {
  animation: music-spin 0.8s linear infinite;
}

@keyframes music-spin {
  to { transform: rotate(360deg); }
}

.music-track-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-track-card {
  border: 1px solid var(--border-color, #ddd);
  border-radius: 10px;
  background: var(--surface-color, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.music-track-card:hover {
  border-color: var(--accent-color, #0070f3);
  box-shadow: 0 2px 12px var(--shadow-color, rgba(0,0,0,0.06));
}

.music-track-card.is-editing {
  border-color: var(--accent-color, #0070f3);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.music-track-card.is-saved {
  border-color: var(--success-color, #28a745);
  box-shadow: 0 0 0 2px rgba(40,167,69,0.15);
}

.music-track-card.is-deleting {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s, transform 0.3s;
}

.music-track-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.music-track-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
}

.music-track-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color, #222);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--front-alt, #f5f5f5);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.music-track-num:hover {
  color: var(--button-text, #fff);
}
 
.music-track-num.is-selected {
  background: var(--accent-color, #0070f3);
  color: var(--button-text, #fff);
  font-weight: 600;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.music-track-body {
  flex: 1;
  min-width: 0;
}

.music-track-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.music-track-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color, #222);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  cursor: default;
}

.music-track-url {
  font-size: 0.72rem;
  color: var(--front-muted, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.music-track-artist {
  font-size: 0.75rem;
  color: var(--accent-color, #0070f3);
  font-weight: 500;
}

.music-track-duration {
  font-size: 0.72rem;
  color: var(--front-muted, #999);
  font-variant-numeric: tabular-nums;
}

.music-track-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.music-track-player-wrap {
  display: flex;
  align-items: center;
}

.music-track-player {
  height: 36px;
  width: 160px;
  border-radius: 6px;
  background: var(--front-alt, #f5f5f5);
}

.music-track-player::-webkit-media-controls-panel {
  background: var(--front-alt, #f5f5f5);
}

.music-track-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-inline-form {
  display: inline;
  margin: 0;
}

.music-clear-form {
  display: flex;
  gap: 8px;
}

.music-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.music-edit-input {
  padding: 6px 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--bg-color, #fff);
  color: var(--text-color, #222);
  width: 100%;
  max-width: 360px;
}

.music-edit-input:focus {
  outline: none;
  border-color: var(--accent-color, #0070f3);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.music-edit-error {
  font-size: 0.75rem;
  color: var(--error-color, #dc3545);
  padding: 4px 8px;
  background: rgba(220,53,69,0.08);
  border-radius: 4px;
}

.music-edit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.music-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  border: 2px dashed var(--border-color, #ddd);
  border-radius: 12px;
  color: var(--front-muted, #888);
}

.music-empty-icon {
  margin-bottom: 16px;
  opacity: 0.4;
}

.music-empty-state h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #222);
}

.music-empty-state p {
  margin: 0;
  font-size: 0.85rem;
}

.music-add-section {
  margin-top: 8px;
}

.music-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .music-add-grid {
    grid-template-columns: 1fr;
  }
  .music-track-card-inner {
    flex-wrap: wrap;
  }
  .music-track-player {
    width: 120px;
  }
  .music-track-name {
    max-width: 160px;
  }
  .music-track-url {
    max-width: 180px;
  }
}

.music-add-card {
  border: 1px solid var(--border-color, #ddd);
  border-radius: 10px;
  background: var(--surface-color, #fff);
  padding: 18px;
}

.music-add-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-color, #222);
}

.music-add-card-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.music-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-add-textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  font-size: 0.82rem;
  background: var(--bg-color, #fff);
  color: var(--text-color, #222);
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
}

.music-add-textarea:focus {
  outline: none;
  border-color: var(--accent-color, #0070f3);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.music-upload-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.music-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  border: 2px dashed var(--border-color, #ddd);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--front-muted, #888);
}

.music-upload-zone:hover,
.music-upload-zone.is-dragover {
  border-color: var(--accent-color, #0070f3);
  background: color-mix(in srgb, var(--accent-color) 4%, transparent);
}

.music-upload-zone.has-files {
  border-color: var(--success-color, #28a745);
  background: rgba(40,167,69,0.04);
}

.music-upload-zone p {
  margin: 8px 0 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-color, #222);
}

.music-upload-zone span {
  font-size: 0.75rem;
  color: var(--front-muted, #999);
}

.music-upload-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.music-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}

.music-upload-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 40px;
  background: var(--surface-color, #fff);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  min-width: 300px;
  max-width: 420px;
}

.music-upload-spinner-icon {
  animation: music-spin 1s linear infinite;
  color: var(--accent-color, #0070f3);
}

.music-upload-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color, #222);
  margin: 0;
}

.music-upload-progress-track {
  width: 100%;
  height: 6px;
  background: var(--front-alt, #f0f0f0);
  border-radius: 3px;
  overflow: hidden;
}

.music-upload-progress-fill {
  height: 100%;
  background: var(--accent-color, #0070f3);
  border-radius: 3px;
  transition: width 0.2s;
}

.music-upload-progress-fill.is-indeterminate {
  width: 30% !important;
  animation: music-progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes music-progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.music-upload-progress-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.75rem;
  color: var(--front-muted, #999);
}

.music-upload-files-count {
  font-size: 0.75rem;
  color: var(--front-muted, #999);
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  html[data-theme-dark] .music-upload-overlay {
    background: rgba(0,0,0,0.7);
    }
  html[data-theme-dark] .music-upload-overlay-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
  }
  html[data-theme-dark] .music-edit-input,
  html[data-theme-dark] .music-add-textarea {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-color);
  }
  html[data-theme-dark] .music-track-card {
    background: var(--surface-color);
    border-color: var(--border-color);
  }
  html[data-theme-dark] .music-add-card {
    background: var(--surface-color);
    border-color: var(--border-color);
  }
  html[data-theme-dark] .music-track-num {
    background: var(--button-color);
    color: var(--button-text);
  }
  html[data-theme-dark] .music-track-player::-webkit-media-controls-panel {
    background: var(--surface-color);
  }
  }

/* ============================================================
   TOZTO Design Token Architecture
   Layer 1: Fallback defaults (wabi) - overridden by inline theme CSS
   Layer 2: Semantic aliases - map component names to core tokens
   Layer 3: Functional colors - status colors
   ============================================================ */
:root {
  /* Core tokens (fallback = wabi; inline <style> overrides per theme) */
  --bg-color: #F5F1E8;
  --bg-image: none;
  --surface-color: #FCFAF5;
  --text-color: #222222;
  --muted-color: #7A746B;
  --border-color: #DDD6C8;
  --accent-color: #8C7B62;
  --button-color: #2F2B26;
  --button-text: #FFFFFF;
  --shadow-color: rgba(60,45,30,0.08);
  --front-alt: #EFE7DA;

  /* Semantic aliases */
  --card-bg: var(--surface-color);
  --text-secondary: var(--muted-color);
  --text-muted: var(--muted-color);
  --front-ink: var(--text-color);
  --front-text: var(--text-color);
  --front-muted: var(--muted-color);
  --front-line: var(--border-color);
  --front-surface: var(--surface-color);
  --front-accent: var(--accent-color);
  --btn-primary-bg: var(--button-color);
  --btn-primary-text: var(--button-text);
  --btn-secondary-bg: var(--front-alt);
  --btn-secondary-text: var(--text-color);

  /* Composite shadows */
  --card-shadow: 0 18px 44px var(--shadow-color);
  --hover-shadow: 0 24px 60px var(--shadow-color);

  /* Functional / status colors */
  --error-color: #e53e3e;
  --success-color: #38a169;
  --warning-color: #ecc94b;
  --btn-danger-bg: #e53e3e;
  --btn-danger-text: #fff;
  --btn-warning-bg: #ecc94b;
  --btn-warning-text: #2d3748;
}

/* Dark-theme native control adaptation */
:root[data-theme-dark] input,
:root[data-theme-dark] textarea,
:root[data-theme-dark] select {
  background-color: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}
:root[data-theme-dark] input::placeholder,
:root[data-theme-dark] textarea::placeholder {
  color: var(--text-muted);
}
:root[data-theme-dark] img { opacity: 0.92; }


body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s, border-color 0.3s;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  color: var(--text-color);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent-color);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-color);
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  font-size: 1.8rem;
  color: var(--text-color);
}

.page-header .btn {
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

.btn-danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-text);
}

.btn-warning {
  background: var(--btn-warning-bg);
  color: var(--btn-warning-text);
}

.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

/* Main */
.main {
  min-height: calc(100vh - 200px);
}

/* Post List */
.post-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.post-item {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.post-cover {
  margin-bottom: 1rem;
  border-radius: 6px;
  overflow: hidden;
  height: 200px;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-item h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-item h2 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s;
}

.post-item h2 a:hover {
  color: var(--accent-color);
}

.post-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.post-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Post Detail */
.post-detail {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s;
}

.post-cover-detail {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  max-height: 400px;
}

.post-cover-detail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-detail h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.post-detail .post-date {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.post-content {
  line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 1.5rem 0 1rem 0;
  color: var(--text-color);
}

.post-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.post-content ul,
.post-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.post-content code {
  background: var(--bg-color);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  color: var(--text-color);
  transition: background-color 0.3s;
}

.post-content pre {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  transition: background-color 0.3s;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content a {
  color: var(--accent-color);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Album Grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.album-grid.full-width {
  grid-template-columns: 1fr;
  text-align: center;
}

/* Album Card */
.album-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
}

.album-cover {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.album-card:hover .album-cover img {
  transform: scale(1.05);
}

.album-info {
  padding: 1.5rem;
}

.album-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.album-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.album-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Album Detail */
.album-detail {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s;
}

.album-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.album-header h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.album-header .album-meta {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.album-header .album-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  -webkit-line-clamp: unset;
}

/* Photos Grid */
.photos-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.photo-card {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  text-decoration: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 1rem 0.8rem 0.8rem;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.photo-card:hover .photo-caption {
  opacity: 1;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
}

.empty-state a {
  color: var(--accent-color);
  text-decoration: none;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: background-color 0.3s, border-color 0.3s;
}

/* 404 */
.not-found {
  text-align: center;
  padding: 3rem 0;
}

.not-found h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.not-found a {
  color: var(--accent-color);
  text-decoration: none;
}

/* ------------------------------
  管理后台样式
------------------------------ */

/* 登录页面 */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 300px);
}

.login-box {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
}

/* 表单样式 */
.form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* 提示?/
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(229, 62, 62, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(229, 62, 62, 0.2);
}

.alert-success {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(56, 161, 105, 0.2);
}

.alert-warning {
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
  color: var(--text-color, #6b4d15);
  border: 1px solid color-mix(in srgb, var(--accent-color) 24%, transparent);
}

.admin-login-setup {
  display: grid;
  gap: 12px;
  color: var(--muted-color);
  line-height: 1.8;
}

.admin-login-setup code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  background: var(--shadow-color);
  color: var(--text-color);
}

/* 仪表?/
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.stat-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.stat-link:hover {
  text-decoration: underline;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* 表格 */
.admin-table {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: var(--bg-color);
  font-weight: 600;
  color: var(--text-color);
}

.admin-table td {
  color: var(--text-secondary);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 文件上传 */
.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.file-upload:hover {
  border-color: var(--accent-color);
}

.file-upload input[type="file"] {
  border: none;
  padding: 0;
  background: none;
}

.upload-preview,
.current-cover {
  margin-top: 1rem;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.upload-preview img,
.current-cover img {
  width: 100%;
  border-radius: 6px;
}

.current-cover p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.upload-preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

/* 可排序照?/
.photos-toolbar {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.photos-toolbar .btn {
  font-size: 0.9rem;
}

.photos-sortable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.sortable-photo {
  background: var(--bg-color);
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
  border: 2px solid var(--border-color);
  transition: border-color 0.2s;
  position: relative;
}

.sortable-photo.selected {
  border-color: var(--accent-color);
}

.sortable-photo:hover {
  border-color: var(--accent-color);
}

.sortable-photo:active {
  cursor: grabbing;
}

.sortable-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

.photo-info {
  padding: 0.75rem;
}

.photo-info input[type="text"] {
  font-size: 0.85rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.photo-info .btn {
  width: 100%;
  font-size: 0.8rem;
}

/* Dropzone 样式 */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  min-height: 150px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s;
}

.dropzone:hover,
.dropzone.dz-drag-hover {
  border-color: var(--accent-color);
}

.dz-progress {
  background: var(--border-color);
  height: 6px;
  border-radius: 3px;
  margin: 0.5rem 0;
  overflow: hidden;
}

.dz-upload {
  background: var(--accent-color);
  height: 100%;
  transition: width 0.3s;
}

.dz-success-mark,
.dz-error-mark {
  display: none;
}

.dz-error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Markdown双栏编辑?/
.editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 600px;
}

.editor-container textarea {
  height: 100%;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: none;
}

.editor-preview {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  overflow-y: auto;
  height: 100%;
}

.editor-preview .post-content {
  margin: 0;
  padding: 0;
}

/* 媒体?/
.media-toolbar {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.media-item {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.media-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.media-item.selected {
  border: 2px solid var(--accent-color);
}

.media-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.media-item-info {
  padding: 0.75rem;
  font-size: 0.85rem;
}

.media-item-caption {
  color: var(--text-color);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-item-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.media-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination .btn {
  min-width: 2.5rem;
  justify-content: center;
}

.pagination .btn.active {
  background: var(--accent-color);
  color: white;
}

.front-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--front-line);
  flex-wrap: wrap;
}

.front-pagination a,
.front-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--front-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.front-pagination a:hover {
  border-color: var(--accent-color);
  color: var(--front-text);
}

  .front-pagination .is-current {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--button-text, #fff);
    font-weight: 600;
  }

.front-pagination .is-disabled {
  opacity: 0.36;
  pointer-events: none;
}

.front-pagination .is-gap {
  border: none;
  min-width: 20px;
}

/* ------------------------------
  Responsive layout
------------------------------ */

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    gap: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-header .btn {
    margin-left: 0;
    margin-right: 0.5rem;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .post-detail,
  .album-detail {
    padding: 1.5rem;
  }

  .album-header h1 {
    font-size: 1.8rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-table {
    overflow-x: auto;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .photos-sortable {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .editor-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .editor-container textarea {
    height: 300px;
  }

  .editor-preview {
    height: 300px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ------------------------------
  Frontend refresh
------------------------------ */
.site-shell {
  --front-ink: var(--text-color, #141414);
  --front-muted: var(--muted-color, var(--shadow-color));
  --front-line: var(--border-color, var(--shadow-color));
  --front-surface: var(--surface-color, #fffdf9);
  --front-alt: var(--front-alt, #f3eee7);
  --front-accent: var(--accent-color, #b76535);
  background: var(--bg-color, #f4efe8);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--front-ink);
  transition: background-color 0.3s, color 0.3s;
}

.site-shell a {
  color: inherit;
}

.site-shell-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--front-line, var(--shadow-color));
  background: var(--bg-color, #f4efe8);
  backdrop-filter: blur(18px);
}

.site-shell-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg-color, #f4efe8);
}

.site-shell-bar {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  text-decoration: none;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.site-top-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-top-nav-link {
  position: relative;
  text-decoration: none;
  color: var(--front-muted);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.site-top-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-top-nav-link:hover,
.site-top-nav-link.active {
  color: var(--front-ink);
}

.site-top-nav-link:hover::after,
.site-top-nav-link.active::after {
  transform: scaleX(1);
}

.site-top-nav-link.is-utility {
  padding: 0.48rem 0.9rem;
  border: 1px solid var(--front-line, var(--shadow-color));
  border-radius: 999px;
  color: var(--front-ink);
}

.site-top-nav-link.is-utility::after {
  display: none;
}

.s

.site-top-nav-link.has-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.site-top-nav-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-top-nav-icon svg {
  width: 100%;
  height: 100%;
}

.site-top-nav-label {
  white-space: nowrap;
}

.site-top-nav-link.starts-utility-group {
  margin-left: 0.6rem;
}

.site-top-nav-link.is-static {
  cursor: default;
  opacity: 0.7;
}
.site-top-nav-link.is-utility:hover {
  background: var(--front-line, var(--shadow-color));
}

.site-shell-main {
  min-height: calc(100vh - 220px);
}

.site-shell-footer {
  border-top: 1px solid var(--front-line, var(--shadow-color));
  padding: 32px 0 46px;
}

.site-shell-footer-inner {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--front-muted);
  font-size: 0.94rem;
}

.front-page,
.front-page-narrow,
.front-section,
.story-page,
.gallery-page,
.about-page {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
}

.front-page {
  padding: 32px 0 80px;
}

.front-page-narrow,
.story-page {
  width: min(1120px, calc(100% - 56px));
}

.front-page-narrow,
.story-page,
.about-page {
  padding: 42px 0 84px;
}

.front-intro,
.front-section-head,
.gallery-head,
.about-columns,
.story-backlink {
  border-top: 1px solid var(--front-line);
}

.front-intro {
  padding-top: 24px;
  margin-bottom: 24px;
}

.front-intro h1,
.story-head h1,
.gallery-head h1,
.about-hero h1 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.front-intro h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  margin-bottom: 16px;
}

.front-intro p:last-child,
.story-summary,
.gallery-head-copy p,
.about-hero p,
.about-block p {
  color: var(--front-muted);
}

.front-intro p:last-child,
.about-hero p {
  max-width: 44rem;
  font-size: 1.05rem;
}

.front-hero {
  position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-color, #141414) 12%, #000 88%) 0%, color-mix(in srgb, var(--bg-color, #26201c) 8%, #000 92%) 48%, color-mix(in srgb, var(--bg-color, #181818) 10%, #000 90%) 100%);
  background: linear-gradient(135deg, #141414 0%, #26201c 48%, #181818 100%);
  color: #fff;
  overflow: hidden;
  margin-bottom: 56px;
}

.front-hero-media,
.front-hero-overlay {
  position: absolute;
  inset: 0;
}

.front-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.56) contrast(1.02) saturate(0.96);
  transform: scale(1.02);
}

.front-hero-overlay {
  background: linear-gradient(94deg, rgba(10, 10, 12, 0.82) 0%, rgba(10, 10, 12, 0.64) 40%, rgba(10, 10, 12, 0.18) 100%), linear-gradient(180deg, rgba(10, 10, 12, 0.1), rgba(10, 10, 12, 0.44));
}

.front-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  min-height: calc(100svh - 88px);
  padding: clamp(56px, 8vw, 96px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 28px;
  align-content: end;
  align-items: end;
}

.front-eyebrow {
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.78;
}

.front-hero-copy {
  max-width: 720px;
}

.front-hero-copy h1 {
  font-size: clamp(3.2rem, 7.6vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin-bottom: 18px;
}

.front-lead {
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1rem, 1rem + 0.35vw, 1.18rem);
}

.front-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.front-link-primary,
.front-link-secondary,
.section-link,
.front-inline-link,
.story-backlink a,
.front-hero-note-link {
  text-decoration: none;
}

.front-link-primary,
.front-link-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.front-link-primary {
  background: var(--button-text);
  color: var(--button-text);
}

.front-link-secondary {
  color: #fff;
}

.front-link-primary:hover,
.front-link-secondary:hover {
  transform: translateY(-1px);
}

.front-link-secondary:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: color-mix(in srgb, var(--surface-color) 5%, transparent);
}

.front-hero-note {
  max-width: 320px;
  justify-self: end;
  color: rgba(255, 255, 255, 0.76);
}

.front-hero-note-link {
  display: inline-block;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.25;
  margin-bottom: 10px;
}

.front-section {
  padding-bottom: 30px;
  margin-bottom: 32px;
}

.front-section-head {
  padding-top: 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.front-section-head h2 {
  font-size: clamp(1.9rem, 2.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-section-title {
  font-size: clamp(0.82rem, 0.92vw, 1.02rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.front-section-head .front-eyebrow {
  margin-bottom: 5px;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  opacity: 0.56;
}

.section-link,
.front-inline-link,
.story-backlink a {
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--front-muted);
}

.front-album-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.front-album-grid-page {
  padding-top: 8px;
}

/* When there are few albums, switch to a centered 2-column layout */
.front-album-grid.has-few-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.front-album-card {
  grid-column: span 4;
  position: relative;
  min-height: 460px;
  background: var(--surface-color, #1a1a1a);
  color: var(--front-text, #fff);
  overflow: hidden;
  text-decoration: none;
}

.front-album-card.is-featured {
  grid-column: span 6;
  min-height: 560px;
}

.front-album-card img,
.story-cover img,
.gallery-cover img,
.front-post-media img,
.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-album-card::after,
.gallery-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.04) 15%, rgba(10, 10, 12, 0.76) 100%);
}

.front-album-card.no-image,
.front-post-media.no-image {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-color, #2f2926) 10%, #000 90%) 0%, color-mix(in srgb, var(--bg-color, #171717) 6%, #000 94%) 100%);
}

.front-album-card-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 22px;
}

.front-card-index {
  margin-bottom: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--front-muted, rgba(255, 255, 255, 0.72));
}

.front-album-card h3,
.front-post-copy h3 {
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.front-album-card h3 {
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  margin-bottom: 12px;
}

.front-album-meta {
  display: flex;
  gap: 10px 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--front-muted, rgba(255, 255, 255, 0.78));
  margin-bottom: 10px;
}

.front-album-card-body p:last-child {
  color: var(--front-text, rgba(255, 255, 255, 0.82));
  max-width: 30rem;
}

.front-post-list {
  display: grid;
}

.front-post-row {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-top: 1px solid var(--front-line);
  text-decoration: none;
}

.front-post-list-page .front-post-row:first-child,
.front-section-story .front-post-row:first-child {
  border-top: 0;
}

.front-post-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-color, #d8d0c6);
}

.front-post-media img,
.gallery-photo img {
  transition: transform 0.55s ease;
}

.front-post-row:hover img,
.gallery-photo:hover img {
  transform: scale(1.04);
}

.front-post-copy {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.front-post-meta {
  color: var(--front-muted);
  font-size: 0.9rem;
}

.front-post-copy h3 {
  margin: 0;
  min-height: calc(1.1em * 2);
  font-size: clamp(1.7rem, 2vw, 2.4rem);
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.front-post-summary {
  color: var(--front-muted);
  max-width: 42rem;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.front-inline-link {
  margin-top: 8px;
}

.front-list-page {
  padding-top: 28px;
}

.front-list-hero {
  min-height: 260px;
  padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--front-line);
  border-bottom: 1px solid var(--front-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

.front-list-hero-copy {
  max-width: 820px;
}

.front-list-hero-copy .front-eyebrow {
  margin-bottom: 10px;
}

.front-list-hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.front-list-hero-copy p {
  max-width: 48rem;
  margin: 0;
  color: var(--front-muted);
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.75;
}

.front-list-hero-side {
  justify-self: end;
  width: 100%;
  padding-bottom: 6px;
  text-align: right;
}

.front-list-hero-side span {
  display: block;
  margin-bottom: 12px;
  color: var(--front-muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.front-list-hero-side strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--front-ink);
  font-size: clamp(2.2rem, 4.2vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.front-list-toolbar {
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--front-line);
}

.front-list-toolbar .directory-filters {
  margin: 0;
}

.front-list-overview {
  margin: 22px 0 18px;
}

.front-list-overview .front-overview-card {
  min-height: 138px;
  padding: 18px 0 18px;
  border-width: 0;
  border-top: 1px solid var(--front-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.front-list-overview .front-overview-card strong {
  font-size: clamp(1.75rem, 3vw, 2.7rem);
}

.page-posts .front-post-list-page {
  margin-top: 18px;
  border-bottom: 1px solid var(--front-line);
}

.page-posts .front-post-row {
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  padding: clamp(22px, 3vw, 34px) 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.page-posts .front-post-row:first-child {
  border-top: 1px solid var(--front-line);
}

.page-posts .front-post-row:hover {
  transform: translateX(4px);
}

.page-posts .front-post-media {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.page-posts .front-post-copy {
  gap: 12px;
  align-content: center;
}

.front-post-meta-line {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
}

.front-post-meta-line .front-post-meta {
  margin: 0;
}

.page-posts .front-post-copy h3 {
  min-height: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 4.1vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.page-posts .front-post-summary {
  max-width: 42rem;
  font-size: 1rem;
}

.page-albums .front-album-grid-page {
  gap: clamp(16px, 2vw, 24px);
  padding-top: 16px;
}

.page-albums .front-album-card {
  min-height: clamp(380px, 44vw, 560px);
  border-radius: 16px;
  box-shadow: 0 22px 60px var(--shadow-color);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.page-albums .front-album-card:nth-child(6n + 1),
.page-albums .front-album-card:nth-child(6n + 4) {
  grid-column: span 6;
}

/* 孤儿行兜底：最后一行只剩一张卡片时占满整行 */
.page-albums .front-album-grid-page > .front-album-card:last-child:nth-child(3n+1) {
  grid-column: 1 / -1;
}

.page-albums .front-album-grid.has-few-cards .front-album-card,
.page-albums .front-album-grid.has-few-cards .front-album-card:nth-child(6n + 1),
.page-albums .front-album-grid.has-few-cards .front-album-card:nth-child(6n + 4) {
  grid-column: auto;
}

.page-albums .front-album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 72px var(--shadow-color);
}

.page-albums .front-album-card::after {
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.02) 12%, rgba(10, 10, 12, 0.72) 100%);
}

.page-albums .front-album-card-body {
  padding: clamp(20px, 2.2vw, 30px);
  color: rgba(255, 255, 255, 0.88);
}

.page-albums .front-album-card h3 {
  max-width: 10ch;
  font-size: clamp(1.8rem, 3.1vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}

.page-albums .front-album-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.page-albums .front-album-card .meta-badge {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
/* P1-4: 提升卡片密度 */
.page-albums .front-album-grid-page {
  gap: clamp(12px, 1.5vw, 18px);
  padding-top: 16px;
  transition: opacity 0.22s ease;
}

.page-albums .front-album-card {
  min-height: clamp(340px, 38vw, 480px);
}


/* P3-10: 加强特色卡片 */
.page-albums .front-album-card.is-featured {
  min-height: clamp(440px, 48vw, 600px);
}

.page-albums .front-album-card.is-featured h3 {
  font-size: clamp(2.2rem, 4vw, 4.8rem);
  max-width: 14ch;
}

/* P3-11: 增强悬停效果 */
.page-albums .front-album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 72px var(--shadow-color);
}

.page-albums .front-album-card:hover img {
  transform: scale(1.04);
  transition: transform 0.4s ease;
}

.page-albums .front-album-card:hover::after {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.page-albums .front-album-card img {
  transition: transform 0.4s ease;
}
/* ============================================================
   Douban-style albums page
   ============================================================ */

.douban-albums {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.douban-albums-header {
  margin-bottom: 28px;
}

.douban-albums-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-color);
  margin: 0 0 8px;
}

.douban-albums-count {
  font-size: 0.9rem;
  color: var(--front-muted);
}

/* Grid */
.douban-albums-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, auto-fill), minmax(200px, 1fr));
  gap: 28px 24px;
  padding-top: 28px;
}

/* Card */
.douban-album-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.douban-album-cover {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-color, #f0f0f0);
  margin-bottom: 10px;
}

.douban-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.douban-album-card:hover .douban-album-cover img {
  transform: scale(1.05);
}

/* Info */
.douban-album-info h3 {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-color);
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.douban-album-meta {
  font-size: 0.8rem;
  color: var(--front-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .douban-albums {
    width: calc(100% - 32px);
    padding: 28px 0 60px;
  }

  .douban-albums-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    padding-top: 20px;
  }

  .douban-album-info h3 {
    font-size: 0.85rem;
  }

  .douban-album-meta {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .douban-albums-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }
}

.page-albums .front-album-card::after {
  transition: opacity 0.3s ease;
}

.story-head {
  padding-top: 24px;
  margin-bottom: 28px;
}

.story-head h1 {
  font-size: clamp(3rem, 5vw, 5.4rem);
  margin-bottom: 16px;
}

.story-summary {
  max-width: 40rem;
  font-size: 1.08rem;
}

.story-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-color, #1a1a1a);
  margin-bottom: 30px;
}

.story-body {
  display: grid;
  gap: 1.2rem;
  font-size: 1.08rem;
  line-height: 1.95;
}

.story-body p {
  max-width: 44rem;
}

.story-empty,
.front-empty {
  color: var(--front-muted);
}

.front-empty {
  padding: 18px 0;
  border-top: 1px solid var(--front-line);
}

.front-empty-state {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--front-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-color, #FCFAF5) 94%, transparent 6%);
  box-shadow: 0 18px 44px var(--shadow-color, rgba(60,45,30,0.08));
}

.front-empty-state-kicker {
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.front-empty-state h3 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--text-color);
}

.front-empty-state p {
  max-width: 42rem;
  color: var(--muted-color);
  line-height: 1.85;
}

.front-empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.front-empty-state .front-link-primary,
.front-empty-state .front-link-secondary {
  min-width: 136px;
}

.story-backlink {
  margin-top: 40px;
  padding-top: 18px;
}

.gallery-page {
  padding: 40px 0 84px;
}

.gallery-head {
  padding-top: 22px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
}

.gallery-head h1 {
  font-size: clamp(3rem, 5vw, 5.4rem);
  margin-bottom: 14px;
}

.gallery-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.gallery-meta dt,
.about-block h2 {
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--front-muted);
}

.gallery-meta dd {
  margin: 0;
}

.gallery-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-color, #1a1a1a);
  margin-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-color, #1a1a1a);
}

.gallery-photo-caption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 16px;
  color: #fff;
  font-size: 0.92rem;
}

.about-hero {
  max-width: 840px;
  margin-bottom: 34px;
}

.about-hero h1 {
  font-size: clamp(3rem, 5vw, 5.3rem);
  margin-bottom: 18px;
}

.about-columns {
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 24px;
}

.about-block-lead p {
  font-size: 1.05rem;
}

@media (max-width: 1100px) {
  .front-album-card,
  .front-album-card.is-featured {
    grid-column: span 6;
    min-height: 480px;
  }

  .gallery-head,
  .about-columns,
  .front-hero-inner {
    grid-template-columns: 1fr;
  }

  .front-hero-note {
    justify-self: start;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-shell-bar,
  .site-shell-footer-inner,
  .front-page,
  .front-page-narrow,
  .front-section,
  .story-page,
  .gallery-page,
  .about-page,
  .front-hero-inner {
    width: calc(100% - 32px);
  }

  .site-shell-bar {
    padding: 16px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-top-nav {
    gap: 0.9rem 1rem;
  }

  .front-hero {
    min-height: auto;
    margin-bottom: 42px;
  }

  .front-hero-inner {
    min-height: auto;
    padding: 54px 0 42px;
  }

  .front-hero-copy h1 {
    font-size: clamp(2.7rem, 12vw, 4.6rem);
  }

  .front-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .front-link-primary,
  .front-link-secondary {
    width: 100%;
  }

  .front-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .front-album-grid,
  .gallery-grid,
  .about-columns,
  .gallery-meta {
    grid-template-columns: 1fr;
  }

  .front-album-card,
  .front-album-card.is-featured {
    grid-column: auto;
    min-height: 420px;
  }

  .front-post-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .front-post-copy h3,
  .front-album-card h3 {
    line-height: 1.04;
  }
}

@media (max-width: 1100px) {
  .front-list-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .front-list-hero-side {
    justify-self: start;
    text-align: left;
  }

  .page-posts .front-post-row {
    grid-template-columns: minmax(220px, 36%) minmax(0, 1fr);
  }

  .page-albums .front-album-card,
  .page-albums .front-album-card:nth-child(6n + 1),
  .page-albums .front-album-card:nth-child(6n + 4) {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .front-list-page {
    padding-top: 20px;
  }

  .front-list-hero {
    gap: 22px;
    padding: 28px 0 26px;
  }

  .front-list-hero-copy h1 {
    font-size: clamp(3rem, 18vw, 5rem);
    letter-spacing: -0.055em;
  }

  .front-list-hero-copy p {
    font-size: 0.98rem;
  }

  .front-list-hero-side strong {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .front-list-overview {
    margin-top: 18px;
  }

  .front-list-overview .front-overview-card {
    min-height: 0;
    padding: 15px 0;
  }

  .page-posts .front-post-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 0;
    transform: none;
  }

  .page-posts .front-post-row:hover {
    transform: none;
  }

  .page-posts .front-post-media {
    aspect-ratio: 16 / 11;
    border-radius: 12px;
  }

  .page-posts .front-post-copy h3 {
    max-width: 100%;
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    line-height: 1;
  }

  .page-albums .front-album-grid.has-few-cards,
  .page-albums .front-album-grid-page {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .page-albums .front-album-card,
  .page-albums .front-album-card:nth-child(6n + 1),
  .page-albums .front-album-card:nth-child(6n + 4) {
    grid-column: auto;
    min-height: 360px;
    border-radius: 14px;
  }

  .page-albums .front-album-card h3 {
    max-width: 100%;
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    line-height: 1.08;
  }
  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n) {
    display: block;
    grid-template-rows: unset;
    min-height: 360px;
  }

  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n) img {
    position: absolute;
    inset: 0;
  }

  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n) .front-album-card-body {
    position: absolute;
    inset: auto 0 0 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    padding: clamp(20px, 2.2vw, 30px);
  }

  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n)::after {
    display: block;
  }

  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n) h3 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    color: #fff;
  }

  .page-albums .front-album-grid-page > .front-album-card:nth-child(3n) .front-album-meta {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
  }
}

.form-help {
  margin-top: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.directory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 12px 0 24px;
}

.directory-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.88rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color, #fff) 92%, var(--text-color, #000) 8%);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.directory-chip:hover,
.directory-chip.active {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color, #d6a354) 14%, transparent 86%);
  color: var(--text-color);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: fit-content;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.meta-badge a {
  color: inherit;
  text-decoration: none;
}

.meta-badge a:hover {
  color: var(--text-color);
}

.photo-thumb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.photo-thumb-item {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-secondary);
}

.photo-thumb-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.photo-thumb-item span {
  font-size: 0.88rem;
  line-height: 1.45;
}

.page-subtitle {
  margin: -0.75rem 0 1.5rem;
  color: var(--text-secondary);
}

.admin-empty {
  margin: 1rem 0 0;
  color: var(--text-secondary);
}

.front-hero-note-sub {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8rem;
}

.admin-hero-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-color) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-color) 35%, transparent);
  color: var(--text-color);
  font-size: 0.74rem;
  white-space: nowrap;
}

.admin-layout-section {
  margin-top: 10px;
}

.page-header-sub {
  margin-bottom: 1rem;
}

.page-header-sub h3 {
  font-size: 1.1rem;
}

.admin-home-layout-card {
  max-width: 760px;
}

.admin-home-layout-hint {
  margin-top: -0.25rem;
}

.form-help {
  margin-top: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.site-shell-footer {
  border-top: 1px solid var(--border-color, var(--shadow-color));
  padding: 36px 0 44px;
  background: color-mix(in srgb, var(--surface-color, #f8f5f0) 50%, transparent);
}

.site-shell-footer-inner {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr) minmax(200px, 0.7fr);
  gap: 28px;
  align-items: end;
  color: var(--front-muted);
  font-size: 0.94rem;
}

.site-footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.7;
}

.site-footer-brand {
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--front-text);
  text-decoration: none;
}

.site-footer-copy {
  max-width: 560px;
  line-height: 1.8;
}

.site-footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.site-footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer-title {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--front-text);
}

.site-footer-links a,
.site-footer-meta a {
  color: var(--front-muted);
  text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-meta a:hover {
  color: var(--front-text);
}

.site-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  text-align: right;
}

@media (max-width: 1024px) {
  .home-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-shell-footer-inner {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .site-footer-meta {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .home-post-grid {
    grid-template-columns: 1fr;
  }

  .front-home-section-copy {
    font-size: 0.88rem;
  }

  .site-footer-links {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .site-footer-links {
    grid-template-columns: 1fr;
  }
}

.front-home-posts {
  padding-top: 30px;
  border-top: 1px solid var(--front-line);
}

.front-home-posts .front-section-head {
  margin-bottom: 28px;
}

.home-post-grid {
  gap: 26px;
}

.home-post-card {
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-color, #fff) 84%, transparent);
  box-shadow: 0 14px 36px var(--shadow-color);
}

.home-post-card-media {
  border-bottom: 1px solid var(--front-line, var(--shadow-color));
}

.home-post-card-body {
  padding: 20px 20px 22px;
}

.home-post-card-body h3 {
  font-size: 1.14rem;
}

.site-shell-header {
  backdrop-filter: blur(14px);
}

.site-shell-bar {
  min-height: calc(var(--top-nav-height, 76) * 1px);
}

.site-shell-footer {
  margin-top: 10px;
}

.page-home-grid .site-shell-main {
  padding-top: 26px;
}

.home-grid {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
  padding: 4px 0 84px;
}

.home-grid-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.84fr);
  gap: 28px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--border-color, var(--shadow-color));
  border-radius: 32px;
  background: color-mix(in srgb, var(--surface-color, #ffffff) 92%, transparent);
  box-shadow: 0 24px 60px var(--shadow-color, var(--shadow-color));
}

.home-grid-hero-media {
  display: block;
  aspect-ratio: 16 / 8.5;
  border-radius: 24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.home-grid-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-grid-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.home-grid-hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.home-grid-hero-lead {
  margin-top: 18px;
  color: var(--front-text);
  line-height: 1.88;
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-grid-hero-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 22px;
}

.home-grid-hero-meta {
  color: var(--front-muted);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.home-grid-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-grid-hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
}

.home-grid-hero-action.primary {
  background: var(--front-text);
  color: var(--bg-color, #fff);
}

.home-grid-hero-action.secondary {
  border: 1px solid var(--front-line, var(--shadow-color));
  background: color-mix(in srgb, var(--surface-color, #fff) 82%, transparent);
  color: var(--front-text);
}

.home-grid-posts {
  margin-top: 24px;
}

.home-post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.home-post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 420px;
  height: 100%;
  border: 1px solid var(--front-line, var(--shadow-color));
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-color, #fff) 92%, transparent);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 16px 36px var(--shadow-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.3s;
}

.home-post-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent-color) 32%, transparent);
  box-shadow: 0 24px 44px var(--shadow-color);
}

.home-post-card-media {
  aspect-ratio: 4 / 2.8;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.home-post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.home-post-card:hover .home-post-card-media img {
  transform: scale(1.035);
}

.home-post-card-media.is-default,
.front-post-media.is-default,
.story-cover.is-default {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-color) 96%, transparent) 0%, color-mix(in srgb, var(--front-alt) 92%, transparent) 48%, color-mix(in srgb, var(--accent-color) 18%, transparent) 100%);
}

.home-post-card-media.is-default img,
.front-post-media.is-default img,
.story-cover.is-default img {
  object-fit: cover;
  filter: saturate(0.92) contrast(0.98);
}

.home-post-card-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) 1fr auto;
  align-content: start;
  align-items: start;
  gap: 12px;
  padding: 18px;
  min-width: 0;
  flex: 1;
}

.home-post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.home-post-card-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 0.72rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-color) 95%, transparent);
  border: 1px solid var(--shadow-color);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted-color);
}

.home-post-card-date {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--front-muted);
}

.home-post-card h2 {
  margin: 0;
  min-height: calc(1.38em * 2);
  font-size: clamp(1.06rem, 1.5vw, 1.32rem);
  line-height: 1.38;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-post-card-summary {
  color: var(--front-muted);
  line-height: 1.78;
  font-size: 0.9rem;
  min-height: calc(1.78em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-post-card .meta-badge {
  background: color-mix(in srgb, var(--surface-color) 92%, transparent);
  border-color: var(--shadow-color);
  color: var(--shadow-color);
}

.home-post-card-link {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.home-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--front-line);
}

.home-pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-pagination-page,
.home-pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--front-line, var(--shadow-color));
  background: color-mix(in srgb, var(--surface-color, #fff) 88%, transparent);
  color: var(--front-text);
  text-decoration: none;
}

.home-pagination-page.active {
  background: var(--front-text);
  color: var(--bg-color, #fff);
  border-color: var(--front-text);
}

.home-pagination-arrow.disabled {
  pointer-events: none;
  opacity: 0.4;
}

.home-feed-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-color);
  letter-spacing: 0.24em;
  font-size: 0.82rem;
}

@media (max-width: 1180px) {
  .home-grid-hero {
    grid-template-columns: 1fr;
  }

  .home-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-post-card {
    min-height: 390px;
  }
}

@media (max-width: 768px) {
  .home-grid {
    width: calc(100% - 32px);
    padding-bottom: 60px;
  }

  .home-grid-hero {
    gap: 18px;
    padding: 16px;
    border-radius: 24px;
  }

  .home-grid-hero-media {
    border-radius: 18px;
    aspect-ratio: 16 / 10;
  }

  .home-grid-hero-copy h1 {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .home-grid-posts {
    margin-top: 22px;
  }

  .home-post-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-post-card {
    min-height: 0;
    border-radius: 20px;
  }

  .home-post-card-body {
    padding: 16px;
  }

  .home-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .home-pagination-pages {
    justify-content: flex-start;
  }
}

/* ------------------------------
  Admin workspace refresh
------------------------------ */

body.admin-shell {
  background: var(--bg-color);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-color);
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface-color) 88%, transparent);
  border-bottom: 1px solid var(--border-color);
}

.admin-header-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-color);
  color: var(--text-color, #f7f1e6);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 24px var(--muted-color);
}

.admin-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-header-copy a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-header-copy span,
.admin-kicker,
.admin-panel-kicker,
.admin-page-kicker {
  color: var(--muted-color);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-header-tools,
.admin-panel-actions,
.admin-sidebar-actions,
.admin-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-workspace {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.admin-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-sidebar-card,
.admin-panel,
.admin-table,
.form,
.login-box,
.stat-card,
.admin-overview {
  background: color-mix(in srgb, var(--surface-color) 92%, transparent);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 18px 44px var(--shadow-color);
}

.admin-sidebar-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-sidebar-card strong {
  font-size: 1.18rem;
  color: var(--text-color);
}

.admin-sidebar-card span {
  color: var(--muted-color);
  line-height: 1.65;
  font-size: 0.92rem;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-color) 92%, transparent);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 18px 44px var(--shadow-color);
}

.admin-sidebar-nav > a,
.admin-sidebar-site-link,
.admin-sidebar-nav .logout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--muted-color);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-sidebar-nav > a:hover,
.admin-sidebar-site-link:hover,
.admin-sidebar-nav .logout:hover,
.admin-sidebar-nav > a.active {
  background: color-mix(in srgb, var(--accent-color) 14%, transparent);
  color: var(--text-color);
  transform: translateY(-1px);
}

.admin-sidebar-nav .logout {
  font: inherit;
}

.admin-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-page-header h2 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  color: var(--text-color);
  letter-spacing: -0.04em;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted-color);
  max-width: 720px;
}

.admin-overview {
  padding: 24px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
}

.admin-overview-copy h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  color: var(--text-color);
}

.admin-overview-copy p:last-child {
  margin: 0;
  color: var(--muted-color);
  line-height: 1.7;
}

.admin-overview-actions {
  align-content: start;
}

.admin-overview-actions span {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--muted-color);
  color: var(--muted-color);
  line-height: 1.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 0;
}

.stat-card {
  padding: 22px;
  text-align: left;
}

.stat-number {
  font-size: clamp(2rem, 3vw, 2.7rem);
  color: var(--text-color);
  letter-spacing: -0.05em;
}

.stat-label {
  color: var(--muted-color);
  margin-bottom: 0.8rem;
}

.stat-link {
  color: var(--accent-color);
}

.admin-panel-grid,
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-panel {
  padding: 22px;
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-panel-head h3 {
  margin: 6px 0 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.admin-recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
}

.admin-recent-item:first-child {
  border-top: none;
  padding-top: 0;
}

.admin-recent-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
}

.admin-recent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted-color);
  font-size: 0.88rem;
}

.admin-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
}

.admin-summary-row:first-child {
  border-top: none;
  padding-top: 0;
}

.admin-summary-row span {
  color: var(--muted-color);
}

.admin-summary-row strong {
  color: var(--text-color);
  text-align: right;
  max-width: 65%;
  line-height: 1.6;
}

.admin-rule-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted-color);
  line-height: 1.8;
}

.admin-compact-form .form-group:last-of-type {
  margin-bottom: 0;
}

.admin-table {
  overflow: auto;
}

.admin-table table {
  min-width: 840px;
}

.admin-table th {
  background: var(--muted-color);
  color: var(--text-color);
}

.admin-table td {
  color: var(--muted-color);
}

.admin-empty {
  margin: 0;
  color: var(--muted-color);
}

@media (max-width: 1180px) {
  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .stats-grid,
  .admin-panel-grid,
  .admin-settings-grid,
  .admin-overview {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .admin-header-inner,
  .admin-page-header,
  .admin-overview,
  .stats-grid,
  .admin-panel-grid,
  .admin-settings-grid,
  .admin-recent-item,
  .admin-summary-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-header-inner,
  .admin-page-header,
  .admin-recent-item,
  .admin-summary-row {
    align-items: flex-start;
  }

  .admin-workspace {
    width: min(100%, calc(100% - 24px));
  }

  .admin-header-inner {
    width: min(100%, calc(100% - 24px));
  }

  .stats-grid,
  .admin-panel-grid,
  .admin-settings-grid,
  .admin-overview {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-summary-row strong {
    max-width: 100%;
    text-align: left;
  }

  .admin-table table {
    min-width: 720px;
  }
}

/* Homepage and admin polish refresh */
.home-grid {
  width: min(1380px, calc(100% - 56px));
  padding: 10px 0 84px;
}

.home-grid-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--shadow-color);
  border-radius: 32px;
  background: color-mix(in srgb, var(--surface-color) 96%, var(--bg-color));
  box-shadow: 0 24px 60px var(--shadow-color);
}

.home-grid-hero-media {
  width: 100%;
  aspect-ratio: 16 / 7.1;
  border-radius: 24px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.home-grid-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: min(860px, 100%);
}

.home-grid-hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.home-grid-hero-lead {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--front-text);
  line-height: 1.9;
  font-size: 1rem;
}

.home-grid-hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.home-grid-posts {
  margin-top: 34px;
}

.home-post-grid {
  display: grid;
  grid-template-columns: repeat(var(--home-post-columns, 3), minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.home-post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--front-line, var(--shadow-color));
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-color, #fff) 94%, transparent);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 16px 36px var(--shadow-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.3s;
}

.home-post-card-media {
  aspect-ratio: 4 / 2.55;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.home-post-card-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) 1fr auto;
  align-content: start;
  align-items: start;
  gap: 14px;
  padding: 18px 18px 20px;
  min-width: 0;
  flex: 1;
}

.home-post-card h2 {
  margin: 0;
  min-height: calc(1.42em * 2);
  font-size: clamp(1.04rem, 1.3vw, 1.24rem);
  line-height: 1.42;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-post-card-summary {
  color: var(--front-muted);
  line-height: 1.72;
  font-size: 0.9rem;
  min-height: calc(1.72em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-pagination {
  margin-top: 34px;
}

.admin-settings-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.92fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-color) 96%, transparent);
  box-shadow: 0 18px 44px var(--shadow-color);
}

.admin-settings-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-settings-intro-copy h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.admin-settings-intro-copy p:last-child {
  margin: 0;
  color: var(--muted-color);
  line-height: 1.78;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-status-pill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
}

.admin-status-pill span {
  color: var(--muted-color);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-status-pill strong {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.5;
}

.admin-status-pill.is-emphasis {
  background: color-mix(in srgb, var(--accent-color) 14%, var(--surface-color));
  border-color: color-mix(in srgb, var(--accent-color) 28%, transparent);
}

.admin-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.admin-editor-main {
  padding: 24px;
}

.admin-editor-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-guide-card strong {
  font-size: 1.08rem;
}

.admin-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.admin-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  color: var(--muted-color);
  font-size: 0.78rem;
}

.admin-rule-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-rule-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 72%, transparent);
}

.admin-rule-card strong {
  display: block;
  color: var(--text-color);
  margin-bottom: 6px;
}

.admin-rule-card p {
  margin: 0;
  color: var(--muted-color);
  line-height: 1.7;
}

.admin-filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-color) 88%, transparent);
  box-shadow: 0 12px 30px var(--shadow-color);
}

.admin-filter-panel .directory-filters {
  margin: 0;
}

.admin-home-layout-card {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.admin-home-layout-hint {
  margin-bottom: 0;
}

@media (max-width: 1180px) {
  .home-grid {
    width: min(100%, calc(100% - 40px));
  }

  .admin-settings-intro,
  .admin-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .home-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-grid {
    width: calc(100% - 24px);
    padding-bottom: 60px;
  }

  .home-grid-hero {
    padding: 16px;
    border-radius: 24px;
  }

  .home-grid-hero-media {
    border-radius: 18px;
    aspect-ratio: 16 / 10;
  }

  .home-grid-hero-copy h1 {
    font-size: clamp(1.9rem, 8vw, 2.9rem);
  }

  .home-grid-hero-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-post-grid,
  .admin-status-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-panel,
  .admin-settings-intro,
  .admin-editor-main {
    padding: 18px;
  }
}


body,
body.admin-shell,
.site-shell {
  background: var(--bg-color);
  color: var(--text-color);
}

.site-shell {
  --front-ink: var(--text-color);
  --front-text: var(--text-color);
  --front-muted: var(--muted-color);
  --front-line: var(--border-color);
  --front-surface: var(--surface-color);
  --front-accent: var(--accent-color);
}

.site-shell-header,
.site-shell-footer,
.home-grid-hero,
.home-post-card,
.admin-settings-intro,
.admin-filter-panel,
.admin-panel,
.admin-sidebar-card,
.admin-sidebar-nav,
.admin-overview,
.login-box,
.form,
.stat-card,
.admin-table {
  border-color: var(--border-color);
  box-shadow: 0 18px 44px var(--shadow-color);
}

.site-shell-header {
  background: transparent;
  border-bottom-color: var(--border-color);
}

.site-shell-header::before {
  background: var(--bg-color);
  opacity: calc(var(--top-nav-opacity, 82) / 100);
}

.site-shell-footer {
  border-top-color: var(--border-color);
}

.site-shell-footer-inner,
.site-footer-copy,
.site-footer-links a,
.site-footer-meta,
.home-grid-hero-meta,
.home-post-card-date,
.home-post-card-summary,
.page-subtitle,
.admin-sidebar-card span,
.admin-recent-meta,
.admin-summary-row span,
.admin-empty,
.form-help,
.admin-status-pill span,
.admin-rule-card p,
.admin-overview-copy p:last-child,
.admin-overview-actions span {
  color: var(--muted-color);
}

.site-footer-title,
.site-top-nav-link:hover,
.site-top-nav-link.active,
.home-grid-hero-copy h1,
.home-post-card h2,
.home-post-card-link,
.admin-page-header h2,
.admin-panel-head h3,
.admin-recent-link,
.admin-summary-row strong,
.stat-number,
.admin-sidebar-card strong,
.admin-header-copy a,
.admin-overview-copy h3,
.admin-status-pill strong {
  color: var(--text-color);
}

.site-top-nav-link,
.site-footer-eyebrow,
.admin-panel-kicker,
.admin-page-kicker,
.admin-kicker {
  color: var(--muted-color);
}

.site-top-nav-link::after {
  background: var(--accent-color);
}

.home-grid-hero {
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--front-alt) 100%);
}

.home-grid-hero-media,
.home-post-card-media,
.home-post-card-media.is-default,
.front-post-media.is-default,
.story-cover.is-default {
  background: linear-gradient(135deg, var(--front-alt) 0%, var(--surface-color) 52%, var(--border-color) 100%);
}

.home-grid-hero-action.primary,
.btn-primary,
.admin-brand-mark {
  background: var(--button-color);
  color: var(--button-text);
}

.home-grid-hero-action.secondary,
.btn-secondary {
  background: var(--surface-color);
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn,
.home-grid-hero-action,
.directory-chip,
.admin-tag,
.admin-status-pill,
.admin-rule-card,
.theme-option-card,
.admin-sidebar-nav > a,
.admin-sidebar-site-link,
.admin-sidebar-nav .logout {
  border-color: var(--border-color);
}

.btn-warning {
  background: var(--accent-color);
  color: var(--button-text);
}

.admin-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.admin-sidebar-nav {
  background: var(--surface-color);
}

.admin-sidebar-nav > a,
.admin-sidebar-site-link,
.admin-sidebar-nav .logout,
.admin-table td,
.admin-rule-list,
.stat-label {
  color: var(--text-color);
}

.admin-sidebar-nav > a:hover,
.admin-sidebar-site-link:hover,
.admin-sidebar-nav .logout:hover,
.admin-sidebar-nav > a.active {
  background: var(--front-alt);
  color: var(--text-color);
}

.admin-panel,
.admin-sidebar-card,
.admin-overview,
.login-box,
.form,
.stat-card,
.admin-table,
.admin-settings-intro,
.admin-filter-panel,
.admin-status-pill,
.admin-rule-card {
  background: var(--surface-color);
}

.admin-settings-intro {
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--front-alt) 100%);
}

.admin-overview-actions span,
.admin-table th {
  background: var(--front-alt);
  color: var(--text-color);
}

.admin-panel-span-2 {
  grid-column: span 2;
}

.admin-theme-form {
  display: grid;
  gap: 18px;
}

.theme-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.theme-option-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: var(--surface-color);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 14px 32px var(--shadow-color);
}

.theme-option-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.theme-option-card.is-active {
  border-color: var(--accent-color);
  box-shadow: 0 20px 42px var(--shadow-color);
}

.theme-option-card input {
  position: absolute;
  inset: 16px 16px auto auto;
  accent-color: var(--accent-color);
}

.theme-option-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 24px;
}

.theme-option-head strong {
  display: block;
  font-size: 1rem;
  color: var(--text-color);
}

.theme-option-head p {
  margin-top: 6px;
  color: var(--muted-color);
  line-height: 1.7;
  font-size: 0.9rem;
}

.theme-option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--front-alt);
  color: var(--text-color);
  font-size: 0.76rem;
  white-space: nowrap;
}

.theme-option-preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr 0.8fr;
  gap: 10px;
}

.theme-swatch {
  display: block;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--theme-border, var(--border-color));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-color) 10%, transparent);
}

.theme-swatch.is-bg {
  background: var(--theme-bg);
}

.theme-swatch.is-surface {
  background: var(--theme-surface);
}

.theme-swatch.is-accent {
  background: var(--theme-accent);
}

.theme-swatch.is-button {
  background: var(--theme-button);
}

.theme-token-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-token-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  font-size: 0.84rem;
}

.theme-token-list li span {
  color: var(--muted-color);
}

.theme-token-list li strong {
  color: var(--text-color);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

@media (max-width: 1180px) {
  .admin-panel-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .theme-option-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------
   TOZTO Hero magazine carousel refresh
--------------------------------- */
.home-grid {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 68px;
}

.home-hero-magazine,
.home-grid-posts {
  width: 100%;
}

.home-hero-magazine {
 margin-bottom: 28px;
  position: relative;
}

.home-hero-stage {
 position: relative;
 border-radius: 28px;
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 22px 52px var(--shadow-color);
}

.home-hero-slides {
  display: grid;
  background: linear-gradient(135deg, var(--front-alt) 0%, var(--surface-color) 100%);
}

.home-hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.home-hero-slide.is-active {
  opacity: 1;
}

.home-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-hero-image-wash {
 position: absolute;
 inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.04) 0%, rgba(17, 17, 17, 0.12) 100%),
    linear-gradient(120deg, rgba(17, 17, 17, 0) 0%, rgba(17, 17, 17, 0) 52%, rgba(17, 17, 17, 0.36) 100%);
  pointer-events: none;
}

.home-hero-overlay-card {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  width: min(324px, calc(100% - 44px));
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-color);
  box-shadow: 0 14px 34px var(--shadow-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-hero-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.home-hero-overlay-card h1 {
  margin: 10px 0 0;
  font-size: clamp(1.92rem, 2.35vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text-color);
}

.home-hero-subtitle {
  margin: 14px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  letter-spacing: 0.08em;
}

.home-hero-description {
  margin: 14px 0 0;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.78;
}

.home-hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.home-hero-date {
  color: var(--muted-color);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.home-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.home-hero-link:hover {
  color: var(--accent-color);
}

.home-hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.home-hero-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-hero-nav {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(34, 34, 34, 0.08);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-color) 72%, transparent);
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-hero-nav:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(34, 34, 34, 0.14);
}

.home-hero-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.home-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.home-hero-dot:hover {
  transform: scale(1.12);
  background: rgba(34, 34, 34, 0.4);
}

.home-hero-dot.is-active {
  background: var(--text-color);
}

.home-hero-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 52px;
  justify-content: flex-end;
  color: var(--muted-color);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.home-hero-counter-divider {
  opacity: 0.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .home-grid {
    width: min(760px, calc(100% - 28px));
  }

  .home-hero-stage {
    min-height: auto;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .home-hero-slides {
    min-height: 360px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 44px var(--shadow-color);
  }

  .home-hero-overlay-card {
    position: static;
    width: 100%;
    margin-top: 16px;
    border-radius: 22px;
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 40px var(--shadow-color);
  }

  .home-hero-overlay-card h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .home-hero-meta-row,
  .home-hero-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-dots {
    justify-content: flex-start;
  }

  .home-hero-counter {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .home-grid {
    width: calc(100% - 20px);
    padding-bottom: 46px;
  }

  .home-hero-magazine {
    margin-bottom: 24px;
  }

  .home-hero-slides {
    min-height: 280px;
  }

  .home-hero-overlay-card {
    padding: 20px 16px 18px;
  }
}

/* TOZTO admin compact workspace refresh */
.admin-header {
  background: color-mix(in srgb, var(--bg-color) 84%, #ffffff 16%);
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent 20%);
  backdrop-filter: blur(18px);
}

.admin-header-inner {
  width: min(1380px, calc(100% - 32px));
  padding: 12px 0;
  gap: 20px;
}

.admin-header-brand {
  gap: 12px;
}

.admin-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  font-size: 1rem;
  box-shadow: 0 10px 24px var(--shadow-color);
}

.admin-header-copy {
  gap: 3px;
}

.admin-header-copy a {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.admin-header-copy span {
  font-size: 0.86rem;
}

.admin-header-tools {
  gap: 10px;
}

.admin-header-status {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 74%, transparent);
  color: var(--muted-color);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-workspace {
  width: min(1380px, calc(100% - 32px));
  padding: 22px 0 40px;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-sidebar {
  top: 80px;
  gap: 14px;
}

.admin-sidebar-card,
.admin-panel,
.admin-table,
.form,
.login-box,
.stat-card,
.admin-overview,
.admin-sidebar-nav {
  border-radius: 22px;
  box-shadow: 0 14px 34px var(--shadow-color);
}

.admin-sidebar-card {
  padding: 16px;
  gap: 10px;
}

.admin-sidebar-brand-card {
  gap: 12px;
}

.admin-sidebar-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar-brand-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-sidebar-brand-head strong,
.admin-sidebar-card-head strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.admin-sidebar-site-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted-color);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-sidebar-nav {
  padding: 12px;
  gap: 0;
}

.admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-nav-group-title {
  margin: 0;
  padding: 4px 8px 0;
  color: var(--muted-color);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-nav-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.admin-nav-item:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--surface-color) 58%, transparent);
  border-color: var(--border-color);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--front-alt) 76%, #ffffff 24%) 0%, rgba(255, 255, 255, 0.92) 100%);
  border-color: color-mix(in srgb, var(--accent-color) 22%, var(--border-color) 78%);
  box-shadow: inset 0 1px 0 var(--border-color);
}

.admin-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--front-alt) 82%, #ffffff 18%);
  color: var(--accent-color);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-nav-item.active .admin-nav-icon {
  background: var(--button-color);
  color: var(--button-text, #fff);
}

.admin-nav-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.admin-nav-copy strong {
  color: var(--text-color);
  font-size: 0.96rem;
  line-height: 1.2;
}

.admin-nav-copy small {
  color: var(--muted-color);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-sidebar-quick-card {
  gap: 12px;
}

.admin-sidebar-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sidebar-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-sidebar-quick-grid .btn {
  justify-content: center;
  min-height: 42px;
  padding-inline: 10px;
}

.admin-sidebar-utility-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-sidebar-site-link,
.admin-sidebar-utility-links .logout {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 72%, transparent);
  color: var(--text-color);
  text-decoration: none;
  justify-content: center;
}

.admin-sidebar-utility-links form {
  margin: 0;
}

.admin-sidebar-utility-links .logout:hover,
.admin-sidebar-site-link:hover {
  background: var(--front-alt);
  border-color: color-mix(in srgb, var(--accent-color) 22%, var(--border-color) 78%);
}

.admin-content {
  gap: 18px;
}

.admin-page-header {
  align-items: flex-start;
  gap: 14px;
  padding: 6px 2px 2px;
}

.admin-page-header-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-page-header h2 {
  margin: 0;
  font-size: clamp(1.76rem, 2.3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.page-subtitle {
  margin: 0;
  max-width: 72ch;
  color: var(--muted-color);
  line-height: 1.65;
}

.admin-page-header-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.admin-page-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  color: var(--muted-color);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-page-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-panel,
.form,
.login-box,
.stat-card,
.admin-overview {
  padding: 18px;
}

.admin-panel-grid,
.admin-settings-grid,
.stats-grid,
.admin-overview {
  gap: 16px;
}

.admin-panel-head {
  gap: 12px;
  margin-bottom: 4px;
}

.admin-panel-head h3 {
  margin: 4px 0 0;
  font-size: 1.06rem;
}

.admin-table {
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 0.82rem 0.9rem;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.94rem;
  line-height: 1.55;
}

.form-grid,
.form-row,
.admin-overview-actions,
.admin-panel-actions,
.admin-sidebar-actions {
  gap: 12px;
}

.form-group label {
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  min-height: 44px;
}

textarea {
  line-height: 1.65;
}

.form-help {
  font-size: 0.82rem;
}

.theme-option-grid {
  gap: 14px;
}

.theme-option-card {
  padding: 14px;
  border-radius: 18px;
}

.admin-rule-list,
.admin-summary-list,
.admin-tag-list {
  gap: 10px;
}

@media (max-width: 1180px) {
  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-sidebar-quick-grid,
  .admin-sidebar-utility-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-header-inner,
  .admin-workspace {
    width: min(100%, calc(100% - 24px));
  }

  .admin-header-inner {
    padding: 10px 0;
  }

  .admin-header-tools,
  .admin-page-header-side,
  .admin-page-context,
  .admin-sidebar-quick-grid,
  .admin-sidebar-utility-links {
    width: 100%;
  }

  .admin-header-tools,
  .admin-page-header-side {
    align-items: stretch;
  }

  .admin-sidebar-quick-grid,
  .admin-sidebar-utility-links {
    grid-template-columns: 1fr;
  }

  .admin-page-header {
    padding-inline: 0;
  }
}

/* TOZTO theme grid expansion */
.theme-option-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 760px) {
  .theme-option-grid {
    grid-template-columns: 1fr;
  }

  .theme-panel-sticky-head {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .theme-panel-sticky-actions {
    width: 100%;
  }

  .theme-panel-sticky-actions > .btn {
    width: 100%;
  }
}

/* TOZTO grouped theme settings + directory pages */
.theme-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.theme-panel-sticky-head {
  position: sticky;
  top: 96px;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-color) 96%, transparent 4%) 0%, color-mix(in srgb, var(--bg-color) 90%, transparent 10%) 74%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-panel-sticky-head > .theme-group-head,
.theme-panel-sticky-head > .theme-custom-head {
  flex: 1;
  min-width: 0;
}

.theme-panel-sticky-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 760px) {
  .theme-panel-sticky-head {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .theme-panel-sticky-actions {
    width: 100%;
  }

  .theme-panel-sticky-actions > .btn {
    width: 100%;
  }
}

.theme-group-stack,
.theme-custom-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.theme-group-head,
.theme-custom-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.theme-group-head h4,
.theme-custom-head h4,
.theme-group-headline strong {
  margin: 0;
}

.theme-group-head p,
.theme-custom-head p,
.theme-group-headline p,
.directory-section-head p,
.directory-stat-card p,
.directory-other-card p,
.directory-hero-description,
.directory-hero-lead {
  margin: 0;
  color: var(--muted-color);
  line-height: 1.72;
}

.theme-group-panel,
.theme-custom-panel {
  border: 1px solid var(--border-color);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface-color) 90%, transparent);
  box-shadow: 0 18px 48px var(--shadow-color);
  padding: 20px;
}

.theme-group-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.theme-group-headline strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.theme-option-grid-grouped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.theme-custom-toprow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 16px;
  align-items: end;
}

.theme-custom-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  color: var(--text-color);
}

.theme-custom-toggle input {
  margin: 0;
}

.admin-theme-custom-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.theme-custom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.theme-color-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 66%, transparent);
}

.theme-color-field label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.theme-color-field small {
  color: var(--muted-color);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.theme-color-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-color-input {
  flex: 1;
}

.theme-color-chip {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 0 0 1px var(--border-color);
}

.theme-custom-preview {
  padding-top: 4px;
}

.theme-custom-preview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.theme-custom-preview-card p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.theme-custom-preview-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.theme-custom-preview-card > span {
  max-width: 32ch;
  line-height: 1.7;
}

.theme-custom-preview-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
}

.theme-custom-preview-link {
  font-size: 0.92rem;
  font-weight: 600;
}

.page-directory .site-shell-main {
  padding-top: 22px;
}

.directory-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.directory-hero {
  margin-top: 8px;
}

.directory-hero-media {
  position: relative;
  min-height: 640px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-color) 74%, white 26%);
  background: var(--surface-color);
  box-shadow: 0 28px 80px var(--shadow-color);
}

.directory-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,18,18,0.04) 0%, rgba(18,18,18,0.12) 52%, rgba(18,18,18,0.28) 100%);
}

.directory-hero-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-hero-panel {
  position: absolute;
  right: 40px;
  bottom: 40px;
  z-index: 1;
  width: min(420px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.68);
  color: var(--text-color, #1d1d1d);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(25, 20, 18, 0.12);
}

.directory-hero-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--shadow-color);
}

.directory-hero-panel h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.directory-hero-lead {
  font-size: 1rem;
}

.directory-hero-description {
  max-width: 32ch;
}

.directory-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.88rem;
  color: var(--shadow-color);
}

.directory-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.directory-hero-actions a,
.directory-card-link,
.directory-timeline-link strong {
  color: var(--button-color);
  font-weight: 600;
  text-decoration: none;
}

.directory-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.directory-stat-card,
.directory-section,
.directory-other-card,
.directory-album-card,
.directory-post-card,
.directory-timeline-item {
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 90%, transparent);
  box-shadow: 0 18px 42px var(--shadow-color);
}

.directory-stat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
}

.directory-stat-card span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.directory-stat-card strong {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.05em;
}

.directory-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
}

.directory-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.directory-section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 2.2vw, 2.4rem);
  letter-spacing: -0.04em;
}

.directory-section-head > p {
  max-width: 34ch;
  text-align: right;
}

.directory-album-grid,
.directory-post-grid,
.directory-other-grid {
  display: grid;
  gap: 16px;
}

.directory-page.is-album .directory-album-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-page.is-album .directory-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-page.is-article .directory-post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-page.is-article .directory-album-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-page.is-mixed .directory-album-grid,
.directory-page.is-mixed .directory-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-album-card,
.directory-post-card,
.directory-other-card,
.directory-timeline-item {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.directory-album-card,
.directory-post-card {
  border-radius: 24px;
}

.directory-album-media,
.directory-post-media {
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  background: var(--front-alt);
}

.directory-album-media img,
.directory-post-media img,
.directory-timeline-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.directory-album-card:hover .directory-album-media img,
.directory-post-card:hover .directory-post-media img,
.directory-timeline-item:hover .directory-timeline-media img {
  transform: scale(1.03);
}

.directory-album-media img,
.directory-post-media img,
.directory-timeline-media img {
  transition: transform 0.45s ease;
}

.directory-album-body,
.directory-post-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.directory-card-meta,
.directory-timeline-meta,
.directory-other-card span {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.directory-album-body h3,
.directory-post-body h3,
.directory-timeline-copy h3,
.directory-other-card strong {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.directory-album-body p,
.directory-post-body p,
.directory-timeline-copy p,
.directory-other-card p {
  margin: 0;
  color: var(--muted-color);
  line-height: 1.72;
}

.directory-timeline-list {
  display: grid;
  gap: 16px;
}

.directory-timeline-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
}

.directory-timeline-media {
  min-height: 100%;
  background: var(--front-alt);
}

.directory-timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.directory-timeline-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.directory-other-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-other-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
}

.directory-other-card small {
  color: var(--muted-color);
  font-size: 0.86rem;
}

@media (max-width: 1120px) {
  .theme-custom-grid,
  .directory-overview-grid,
  .directory-other-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page,
  .page-directory .site-shell-main {
    width: min(100%, calc(100% - 28px));
  }

  .directory-hero-media {
    min-height: 580px;
  }

  .directory-page.is-album .directory-album-grid,
  .directory-page.is-article .directory-post-grid,
  .directory-page.is-album .directory-post-grid,
  .directory-page.is-article .directory-album-grid,
  .directory-page.is-mixed .directory-album-grid,
  .directory-page.is-mixed .directory-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .theme-custom-toprow,
  .theme-custom-grid,
  .directory-overview-grid,
  .directory-other-grid,
  .directory-page.is-album .directory-album-grid,
  .directory-page.is-article .directory-post-grid,
  .directory-page.is-album .directory-post-grid,
  .directory-page.is-article .directory-album-grid,
  .directory-page.is-mixed .directory-album-grid,
  .directory-page.is-mixed .directory-post-grid {
    grid-template-columns: 1fr;
  }

  .theme-color-field,
  .theme-group-panel,
  .theme-custom-panel,
  .directory-section,
  .directory-stat-card {
    padding: 16px;
  }

  .directory-page {
    width: min(100%, calc(100% - 20px));
    margin-bottom: 56px;
  }

  .directory-hero-media {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .directory-hero-media::after {
    display: none;
  }

  .directory-hero-media > img {
    position: relative;
    height: 320px;
  }

  .directory-hero-panel {
    position: relative;
    inset: auto;
    width: 100%;
    border-radius: 0 0 28px 28px;
    background: color-mix(in srgb, var(--surface-color) 90%, transparent);
    box-shadow: none;
  }

  .directory-section-head,
  .directory-timeline-item,
  .directory-timeline-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .directory-section-head > p {
    text-align: left;
    max-width: none;
  }

  .directory-timeline-media {
    width: 100%;
    min-height: 220px;
  }
}

html[data-theme] body,
html[data-theme] .site-shell,
html[data-theme] .admin-shell,
html[data-theme] .douban-albums {
  background: var(--bg-color);
  color: var(--text-color);
}

.page-posts .douban-albums-grid {
  grid-template-columns: repeat(var(--grid-cols, auto-fill), minmax(180px, 1fr));
  gap: 24px 18px;
}

.page-posts .douban-album-cover {
  aspect-ratio: 4 / 3;
}

.page-posts .douban-album-info h3 {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .page-posts .douban-albums-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 10px;
  }
}

@media (max-width: 480px) {
  .page-posts .douban-albums-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html[data-theme] .front-page,
html[data-theme] .front-page-narrow {
  background: var(--bg-color);
  color: var(--text-color);
}

html[data-theme] .site-shell a,
html[data-theme] .front-link-primary,
html[data-theme] .home-post-card-link,
html[data-theme] .directory-timeline-link {
  color: var(--accent-color);
}

html[data-theme] .site-shell-header,
html[data-theme] .site-shell-footer,
html[data-theme] .admin-header {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .site-shell-header::before {
  background: var(--bg-color);
  opacity: calc(var(--top-nav-opacity, 82) / 100);
}

html[data-theme] .site-shell-bar,
html[data-theme] .site-shell-footer-inner,
html[data-theme] .front-section-head,
html[data-theme] .gallery-head,
html[data-theme] .directory-section-head {
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .site-top-nav-link,
html[data-theme] .site-shell-footer,
html[data-theme] .front-section-head p,
html[data-theme] .gallery-head-copy p,
html[data-theme] .directory-section-head > p,
html[data-theme] .home-grid-hero-meta,
html[data-theme] .home-post-card-date,
html[data-theme] .home-post-card-summary,
html[data-theme] .directory-card-meta,
html[data-theme] .directory-timeline-meta,
html[data-theme] .directory-other-card small {
  color: var(--muted-color);
}

html[data-theme] .site-top-nav-link:hover,
html[data-theme] .site-top-nav-link.active,
html[data-theme] .admin-panel-kicker,
html[data-theme] .front-eyebrow,
html[data-theme] .home-post-card .meta-badge {
  color: var(--accent-color);
}

html[data-theme] .site-top-nav-link::after,
html[data-theme] .theme-option-card.is-active::after {
  background: var(--accent-color);
}

html[data-theme] .btn-primary,
html[data-theme] a.btn-primary,
html[data-theme] button.btn-primary,
html[data-theme] .home-grid-hero-action.primary {
  background: var(--button-color);
  border-color: var(--button-color);
  color: var(--button-text);
}

html[data-theme] .btn-secondary,
html[data-theme] a.btn-secondary,
html[data-theme] button.btn-secondary,
html[data-theme] .home-grid-hero-action.secondary {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .btn-danger,
html[data-theme] a.btn-danger,
html[data-theme] button.btn-danger {
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-bg);
  color: var(--btn-danger-text);
}

html[data-theme] .btn-warning,
html[data-theme] a.btn-warning,
html[data-theme] button.btn-warning {
  background: var(--btn-warning-bg);
  border-color: var(--btn-warning-bg);
  color: var(--btn-warning-text);
}

html[data-theme] .home-grid-hero,
html[data-theme] .home-hero-stage,
html[data-theme] .home-post-card,
html[data-theme] .front-post-card,
html[data-theme] .front-album-card,
html[data-theme] .gallery-photo,
html[data-theme] .directory-section,
html[data-theme] .directory-stat-card,
html[data-theme] .directory-album-card,
html[data-theme] .directory-post-card,
html[data-theme] .directory-other-card,
html[data-theme] .directory-timeline-item,
html[data-theme] .story-shell,
html[data-theme] .post-detail,
html[data-theme] .album-detail,
html[data-theme] .admin-sidebar,
html[data-theme] .admin-sidebar-card,
html[data-theme] .admin-panel,
html[data-theme] .admin-filter-panel,
html[data-theme] .admin-settings-intro,
html[data-theme] .admin-table,
html[data-theme] .login-box,
html[data-theme] .theme-group-panel,
html[data-theme] .theme-custom-panel,
html[data-theme] .theme-option-card,
html[data-theme] .theme-color-field {
  background: var(--surface-color);
  background: color-mix(in srgb, var(--surface-color) 94%, transparent 6%);
  border-color: var(--border-color);
  color: var(--text-color);
  box-shadow: 0 18px 44px var(--shadow-color);
}

html[data-theme] .home-post-card:hover,
html[data-theme] .front-post-card:hover,
html[data-theme] .front-album-card:hover,
html[data-theme] .directory-album-card:hover,
html[data-theme] .directory-post-card:hover,
html[data-theme] .directory-other-card:hover,
html[data-theme] .theme-option-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 24px 60px var(--shadow-color);
}

html[data-theme] .home-hero-slides,
html[data-theme] .home-grid-hero-media,
html[data-theme] .home-post-card-media,
html[data-theme] .front-post-media,
html[data-theme] .front-album-card.no-image,
html[data-theme] .gallery-photo.no-image,
html[data-theme] .directory-hero-media,
html[data-theme] .directory-album-media,
html[data-theme] .directory-post-media,
html[data-theme] .directory-timeline-media,
html[data-theme] .theme-custom-preview,
html[data-theme] .theme-option-preview {
  background: var(--front-alt);
  background: linear-gradient(135deg, var(--front-alt) 0%, var(--surface-color) 100%);
}

html[data-theme] .home-post-card-media.is-default,
html[data-theme] .front-post-media.is-default,
html[data-theme] .story-cover.is-default {
  background: linear-gradient(135deg, var(--front-alt) 0%, var(--surface-color) 52%, color-mix(in srgb, var(--accent-color) 18%, transparent 82%) 100%);
}

html[data-theme] .home-hero-panel,
html[data-theme] .directory-hero-panel {
  background: color-mix(in srgb, var(--surface-color) 68%, transparent);
  background: color-mix(in srgb, var(--surface-color) 70%, transparent 30%);
  border-color: color-mix(in srgb, var(--border-color) 70%, transparent 30%);
  color: var(--text-color);
  box-shadow: 0 24px 60px var(--shadow-color);
}

html[data-theme] .home-hero-panel p,
html[data-theme] .home-hero-panel span,
html[data-theme] .directory-hero-panel p,
html[data-theme] .directory-hero-panel span {
  color: var(--muted-color);
}

html[data-theme] .home-hero-control,
html[data-theme] .home-hero-dot,
html[data-theme] .home-hero-arrow {
  background: color-mix(in srgb, var(--surface-color) 76%, transparent 24%);
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .home-hero-dot.is-active,
html[data-theme] .home-hero-control:hover,
html[data-theme] .home-hero-arrow:hover {
  background: var(--button-color);
  border-color: var(--button-color);
  color: var(--button-text);
}

html[data-theme] .admin-nav-item,
html[data-theme] .admin-sidebar-nav > a,
html[data-theme] .admin-sidebar-site-link,
html[data-theme] .admin-sidebar-nav .logout,
html[data-theme] .admin-sidebar-utility-links .logout {
  color: var(--muted-color);
  border-color: transparent;
}

html[data-theme] .admin-nav-item:hover,
html[data-theme] .admin-nav-item.active,
html[data-theme] .admin-sidebar-nav > a:hover,
html[data-theme] .admin-sidebar-nav > a.active,
html[data-theme] .admin-sidebar-site-link:hover,
html[data-theme] .admin-sidebar-nav .logout:hover,
html[data-theme] .admin-sidebar-utility-links .logout:hover {
  background: var(--front-alt);
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .admin-table table,
html[data-theme] .admin-table th,
html[data-theme] .admin-table td {
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] .admin-table th,
html[data-theme] .admin-status-pill,
html[data-theme] .home-post-card-order,
html[data-theme] .home-post-card .meta-badge,
html[data-theme] .theme-token-list li,
html[data-theme] .admin-header-status {
  background: var(--front-alt);
  border-color: var(--border-color);
  color: var(--muted-color);
}

html[data-theme] .admin-status-pill strong,
html[data-theme] .admin-header-copy a,
html[data-theme] .admin-sidebar-card strong,
html[data-theme] .admin-panel-head h3,
html[data-theme] .theme-option-head strong,
html[data-theme] .theme-group-head h4,
html[data-theme] .theme-custom-head h4,
html[data-theme] .theme-group-headline strong,
html[data-theme] .home-post-card h2,
html[data-theme] .front-post-card h3,
html[data-theme] .front-album-card h3,
html[data-theme] .directory-album-body h3,
html[data-theme] .directory-post-body h3,
html[data-theme] .directory-timeline-copy h3,
html[data-theme] .directory-other-card strong {
  color: var(--text-color);
}

html[data-theme] .admin-status-pill span,
html[data-theme] .admin-header-copy span,
html[data-theme] .admin-sidebar-card span,
html[data-theme] .theme-option-head p,
html[data-theme] .theme-group-head p,
html[data-theme] .theme-custom-head p,
html[data-theme] .theme-group-headline p,
html[data-theme] .theme-token-list li span,
html[data-theme] .form-help,
html[data-theme] .directory-album-body p,
html[data-theme] .directory-post-body p,
html[data-theme] .directory-timeline-copy p,
html[data-theme] .directory-other-card p {
  color: var(--muted-color);
}

html[data-theme] input,
html[data-theme] textarea,
html[data-theme] select,
html[data-theme] .theme-color-input {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-theme] input:focus,
html[data-theme] textarea:focus,
html[data-theme] select:focus,
html[data-theme] .theme-color-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 18%, transparent 82%);
}

html[data-theme] .theme-option-card.is-active,
html[data-theme] .admin-status-pill.is-emphasis {
  border-color: var(--accent-color);
  box-shadow: 0 22px 54px var(--shadow-color);
}

html[data-theme] .theme-swatch.is-bg { background: var(--theme-bg); }
html[data-theme] .theme-swatch.is-surface { background: var(--theme-surface); }
html[data-theme] .theme-swatch.is-accent { background: var(--theme-accent); }
html[data-theme] .theme-swatch.is-button { background: var(--theme-button); }

html[data-theme] .theme-panel-sticky-head {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-color) 94%, transparent 6%) 0%, color-mix(in srgb, var(--bg-color) 88%, transparent 12%) 74%, transparent 100%);
}

html[data-theme] .theme-panel-sticky-actions .btn {
  box-shadow: 0 14px 34px var(--shadow-color);
}

html[data-theme] .theme-custom-toggle {
  background: color-mix(in srgb, var(--surface-color) 78%, transparent 22%);
  border-color: color-mix(in srgb, var(--border-color) 78%, transparent 22%);
  color: var(--text-color);
}

html[data-theme] .home-hero-image-wash,
html[data-theme] .directory-hero-media::after {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--shadow-color) 24%, transparent 76%) 0%, color-mix(in srgb, var(--shadow-color) 54%, transparent 46%) 100%),
    linear-gradient(120deg, transparent 0%, transparent 52%, color-mix(in srgb, var(--text-color) 22%, transparent 78%) 100%);
}

html[data-theme] .home-hero-overlay-card,
html[data-theme] .directory-hero-panel {
  border-color: color-mix(in srgb, var(--border-color) 54%, rgba(255, 255, 255, 0.2) 46%);
  background: color-mix(in srgb, var(--surface-color) 74%, transparent 26%);
  color: var(--text-color);
  box-shadow: 0 24px 60px var(--shadow-color);
}

html[data-theme] .home-hero-controls {
  border-top-color: color-mix(in srgb, var(--border-color) 72%, transparent 28%);
}

html[data-theme] .home-hero-nav {
  background: color-mix(in srgb, var(--surface-color) 76%, transparent 24%);
  border-color: color-mix(in srgb, var(--border-color) 72%, transparent 28%);
  color: var(--text-color);
}

html[data-theme] .home-hero-nav:hover {
  background: color-mix(in srgb, var(--surface-color) 92%, transparent 8%);
  border-color: var(--accent-color);
}

html[data-theme] .home-hero-dot {
  background: color-mix(in srgb, var(--text-color) 20%, transparent 80%);
}

html[data-theme] .home-hero-dot:hover {
  background: color-mix(in srgb, var(--text-color) 38%, transparent 62%);
}

html[data-theme] .home-hero-dot.is-active {
  background: var(--text-color);
}

html[data-theme] .home-hero-counter,
html[data-theme] .directory-hero-label,
html[data-theme] .directory-hero-meta {
  color: var(--muted-color);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

.site-top-nav-link:focus-visible,
.front-link-primary:focus-visible,
.front-link-secondary:focus-visible,
.front-inline-link:focus-visible,
.directory-chip:focus-visible,
.btn:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 18%, transparent 82%);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------
  TOZTO front polish round 2
------------------------------ */
.front-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.front-overview-card {
  min-height: 168px;
  padding: 20px 20px 18px;
  border: 1px solid color-mix(in srgb, var(--border-color) 76%, white 24%);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-color) 92%, white 8%) 0%, color-mix(in srgb, var(--surface-color) 98%, transparent 2%) 100%);
  box-shadow: 0 18px 44px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.front-overview-card span,
.home-directory-order,
.front-quick-link span,
.home-hero-fact span {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--front-muted);
}

.front-overview-card strong,
.front-quick-link strong,
.home-directory-card strong,
.home-hero-fact strong {
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--front-ink);
  margin-bottom: 4px;
}

.front-overview-card p,
.front-quick-link p,
.home-directory-card p {
  margin: 0;
  color: var(--front-muted);
  line-height: 1.45;
}

.home-overview-strip {
  margin-bottom: 34px;
}

.front-page-overview,
.about-overview-grid {
  margin-bottom: 24px;
}

.front-home-section {
  margin-top: 34px;
}

.home-featured-albums .front-section-head,
.home-grid-posts .front-section-head,
.home-directory-atlas .front-section-head,
.about-links-section .front-section-head {
  margin-bottom: 18px;
}

.home-album-grid {
  margin-top: 6px;
}

.home-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-directory-card,
.front-quick-link {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--border-color) 78%, white 22%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-color) 94%, white 6%) 0%, color-mix(in srgb, var(--surface-color) 100%, transparent 0%) 100%);
  box-shadow: 0 18px 44px var(--shadow-color);
  text-decoration: none;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.home-directory-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-directory-card:hover,
.front-quick-link:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent-color) 28%, var(--border-color) 72%);
  box-shadow: 0 24px 56px var(--shadow-color);
}

.home-directory-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--front-muted);
  font-size: 0.88rem;
}

.home-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.home-hero-fact {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
}

.home-hero-fact span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero-fact strong {
  color: #fff;
  font-size: 0.94rem;
}

.front-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.front-quick-link {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.front-quick-link strong {
  max-width: 12ch;
}

.about-links-section {
  margin-top: 40px;
}

@media (max-width: 1100px) {
  .front-overview-grid,
  .front-quick-links,
  .home-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .front-overview-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .front-quick-links,
  .home-directory-grid,
  .home-hero-facts {
    grid-template-columns: 1fr;
  }

  .front-overview-card,
  .home-directory-card,
  .front-quick-link {
    min-height: 0;
    min-width: 170px;
  }

  .home-overview-strip,
  .front-page-overview,
  .about-overview-grid,
  .front-home-section,
  .about-links-section {
    margin-top: 24px;
  }
}

  .front-intro h1 {
    font-size: clamp(2.2rem, 7vw, 3rem);
  }

/* homepage tighten round 3 */
.front-section-head-compact {
  margin-bottom: 18px;
}

.front-section-head-compact .front-eyebrow {
  margin-bottom: 8px;
}

.front-section-head-compact h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: -0.03em;
}

.front-home-posts {
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--front-line) 82%, transparent 18%);
}

.home-grid-posts {
  margin-top: 28px;
}

.home-post-grid {
  width: 100%;
  grid-template-columns: repeat(var(--home-post-columns, 4), minmax(0, 1fr));
  gap: 16px;
  justify-content: stretch;
  align-items: stretch;
}

.home-post-card {
  min-height: 0;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border-color) 86%, white 14%);
  background: color-mix(in srgb, var(--surface-color) 97%, white 3%);
  box-shadow: 0 4px 14px var(--shadow-color);
}

.home-post-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-color) 16%, var(--border-color) 84%);
  box-shadow: 0 10px 24px var(--shadow-color);
}

.home-post-card-media {
  aspect-ratio: 16 / 10.5;
  border-bottom: 1px solid var(--shadow-color);
}

.home-post-card-body {
  gap: 10px;
  padding: 15px 15px 16px;
}

.home-post-card-meta {
  gap: 8px;
  font-size: 0.76rem;
}

.home-post-card-date,
.home-post-card-directory {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--front-muted);
}

.home-post-card-directory {
  position: relative;
  padding-left: 10px;
}

.home-post-card-directory::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--front-muted) 70%, transparent 30%);
  transform: translateY(-50%);
}

.home-post-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  letter-spacing: -0.018em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-post-card-summary {
  font-size: 0.86rem;
  line-height: 1.72;
  min-height: calc(1.72em * 3);
  color: color-mix(in srgb, var(--front-muted) 92%, var(--front-text) 8%);
}

.home-post-card-link {
  padding-top: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

@media (max-width: 1100px) {
  .home-grid {
    width: min(920px, calc(100% - 36px));
    padding: 6px 0 60px;
  }

  .home-hero-stage {
    min-height: clamp(380px, 46vw, 430px);
    border-radius: 28px;
  }

  .home-hero-overlay-card {
    right: 24px;
    bottom: 24px;
    width: min(320px, calc(100% - 44px));
    padding: 22px 22px 18px;
  }

  .home-hero-overlay-card h1 {
    font-size: clamp(1.85rem, 3.8vw, 2.45rem);
  }

  .home-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .home-grid {
    width: calc(100% - 24px);
    padding: 4px 0 52px;
  }

  .home-post-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-post-card {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .home-grid {
    width: min(720px, calc(100% - 24px));
    padding: 4px 0 52px;
  }

  .home-hero-stage {
    min-height: auto;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .home-hero-slides {
    min-height: 320px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 38px var(--shadow-color);
  }

  .home-hero-overlay-card {
    position: static;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 14px;
    padding: 20px 18px 18px;
    border-radius: 20px;
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px var(--shadow-color);
  }

  .home-hero-overlay-card h1 {
    font-size: clamp(1.85rem, 6.8vw, 2.3rem);
  }

  .home-hero-description {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .home-hero-meta-row,
  .home-hero-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .home-hero-facts {
    gap: 10px;
  }

  .home-hero-dots,
  .home-hero-counter {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .home-grid {
    width: calc(100% - 18px);
    padding-bottom: 42px;
  }

  .home-hero-magazine {
    margin-bottom: 22px;
  }

  .home-hero-slides {
    min-height: 240px;
    border-radius: 20px;
  }

  .home-hero-overlay-card {
    margin-top: 12px;
    padding: 18px 14px 16px;
    border-radius: 18px;
  }

  .home-hero-overlay-card h1 {
    font-size: clamp(1.72rem, 7.6vw, 2.12rem);
  }

  .home-hero-description {
    font-size: 0.92rem;
  }
}

/* TOZTO homepage reading polish 2026-07-08 */
.home-hero-magazine{margin-bottom:26px;}
.home-hero-overlay-card{right:22px;bottom:22px;width:min(324px,calc(100% - 44px));padding:18px 18px 16px;border-radius:22px;background:transparent;box-shadow:none;}
.home-hero-overlay-card h1{margin-top:10px;font-size:clamp(1.92rem,2.35vw,2.6rem);letter-spacing:-.05em;}
.home-hero-description{margin-top:14px;font-size:.95rem;line-height:1.78;}
.home-hero-meta-row{gap:14px;margin-top:18px;}
.home-hero-date{font-size:.84rem;letter-spacing:.08em;}
.home-hero-link{gap:6px;font-size:.88rem;letter-spacing:.04em;}
.home-hero-controls{gap:12px;margin-top:18px;padding-top:14px;}
.home-hero-nav-group{gap:8px;}
.home-hero-nav{width:38px;height:38px;}
.home-hero-dots{gap:8px;}
.home-hero-dot{width:8px;height:8px;}
.home-hero-counter{gap:5px;min-width:52px;font-size:.8rem;}
.home-hero-facts{gap:10px;margin-top:14px;}
.home-hero-fact{padding:10px 12px;border-radius:14px;gap:4px;background:rgba(255,255,255,.12);}
.home-hero-fact span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.74);}
.home-hero-fact strong{font-size:.94rem;}
.front-home-posts{padding-top:20px;}
.home-grid-posts{margin-top:22px;}
.home-post-grid{gap:14px;}
.home-post-card{border-radius:13px;border-color:color-mix(in srgb,var(--border-color) 88%,white 12%);background:color-mix(in srgb,var(--surface-color) 98%,white 2%);box-shadow:0 3px 12px var(--shadow-color);}
.home-post-card:hover{transform:translateY(-1px);box-shadow:0 9px 20px var(--shadow-color);}
.home-post-card-media{aspect-ratio:16/9.2;}
.home-post-card-body{gap:8px;padding:12px 12px 13px;}
.home-post-card-meta{gap:6px;font-size:.7rem;}
.home-post-card h3{font-size:.94rem;line-height:1.38;letter-spacing:-.012em;}
.home-post-card-summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.81rem;line-height:1.62;min-height:calc(1.62em * 2);}
.home-post-card-link{font-size:.66rem;letter-spacing:.12em;color:color-mix(in srgb,var(--front-muted) 82%,var(--front-text) 18%);}
@media (max-width:1100px){.home-hero-overlay-card{right:20px;bottom:20px;width:min(300px,calc(100% - 40px));padding:18px 18px 16px;}.home-hero-overlay-card h1{font-size:clamp(1.75rem,3.55vw,2.25rem);}.home-post-grid{gap:14px;}}
@media (max-width:860px){.home-hero-slides{min-height:300px;}.home-hero-overlay-card{position:static;right:auto;bottom:auto;width:100%;margin-top:12px;padding:18px 16px 16px;border-radius:18px;}.home-hero-overlay-card h1{font-size:clamp(1.72rem,6vw,2.08rem);}.home-hero-description{margin-top:10px;font-size:.92rem;line-height:1.52;}.home-hero-meta-row{flex-direction:column;align-items:flex-start;gap:10px;}.home-hero-controls{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;}.home-hero-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}}
@media (max-width:640px){.home-hero-slides{min-height:220px;}.home-hero-overlay-card{margin-top:10px;padding:16px 13px 14px;border-radius:16px;}.home-hero-overlay-card h1{font-size:clamp(1.58rem,7vw,1.96rem);}.home-hero-description{font-size:.88rem;}.home-post-card-body{padding:12px 11px 12px;}}
/* /TOZTO homepage reading polish */

/* TOZTO homepage compact cards 2026-07-08 */
.home-hero-magazine{margin-bottom:14px;}
.front-home-posts{padding-top:4px;}
.home-grid-posts{margin-top:8px;}
.home-posts-head{margin-bottom:10px;align-items:center;min-height:auto;}
.home-posts-kicker{margin:0;font-size:.68rem;letter-spacing:.22em;color:color-mix(in srgb,var(--front-muted) 88%,var(--front-text) 12%);}
.home-post-grid{gap:12px;}
.home-post-card{min-height:0;border-radius:12px;box-shadow:0 2px 10px var(--shadow-color);overflow:hidden;}
.home-post-card:hover{transform:translateY(-1px);box-shadow:0 8px 18px var(--shadow-color);}
.home-post-card-media{aspect-ratio:auto;height:148px;min-height:148px;max-height:148px;}
.home-post-card-media img{width:100%;height:100%;object-fit:cover;display:block;}
.home-post-card-body{gap:6px;padding:10px 11px 11px;}
.home-post-card-meta{gap:5px;font-size:.68rem;line-height:1.3;}
.home-post-card h3{margin:0;font-size:.9rem;line-height:1.32;letter-spacing:-.01em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:calc(1.32em * 2);}
.home-post-card-summary,.home-post-card-link{display:none!important;}
@media (max-width:1100px){.home-hero-magazine{margin-bottom:12px;}.front-home-posts{padding-top:2px;}.home-grid-posts{margin-top:6px;}.home-post-card-media{height:144px;min-height:144px;max-height:144px;}}
@media (max-width:860px){.home-hero-magazine{margin-bottom:10px;}.home-grid-posts{margin-top:4px;}.home-posts-head{margin-bottom:8px;}.home-post-card-media{height:176px;min-height:176px;max-height:176px;}.home-post-card-body{padding:10px 11px 12px;}}
@media (max-width:640px){.home-hero-overlay-card{margin-top:8px;}.front-home-posts{padding-top:0;}.home-grid-posts{margin-top:2px;}.home-post-card-media{height:168px;min-height:168px;max-height:168px;}.home-post-card-body{padding:9px 10px 10px;}.home-post-card h3{font-size:.88rem;}}
/* /TOZTO homepage compact cards */

/* TOZTO homepage mobile hero tighten 2026-07-08 */
@media (max-width:860px){
  .home-hero-overlay-card{padding:14px 14px 13px;border-radius:16px;}
  .home-hero-overlay-card h1{margin-top:8px;font-size:clamp(1.62rem,5.8vw,1.94rem);}
  .home-hero-description{margin-top:8px;font-size:.88rem;line-height:1.46;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .home-hero-meta-row{margin-top:10px;gap:8px;}
  .home-hero-facts{margin-top:10px;gap:6px;}
  .home-hero-fact{padding:8px 10px;border-radius:12px;}
  .home-hero-fact span{font-size:.66rem;}
  .home-hero-fact strong{font-size:.88rem;}
  .home-hero-controls{margin-top:12px;padding-top:10px;gap:8px;justify-content:flex-start;}
  .home-hero-nav{width:34px;height:34px;}
  .home-hero-counter{min-width:44px;font-size:.74rem;}
}
@media (max-width:640px){
  .home-hero-overlay-card{margin-top:6px;padding:12px 12px 11px;border-radius:14px;}
  .home-hero-overlay-card h1{font-size:clamp(1.46rem,6.6vw,1.82rem);}
  .home-hero-description{margin-top:7px;font-size:.83rem;line-height:1.42;}
  .home-hero-meta-row{margin-top:8px;gap:7px;}
  .home-hero-facts{margin-top:8px;gap:6px;}
  .home-hero-fact{padding:7px 9px;}
  .home-hero-controls{margin-top:10px;padding-top:8px;}
}
/* /TOZTO homepage mobile hero tighten */

/* TOZTO audit cleanup: detail pages + admin density */
.story-page {
  width: min(860px, calc(100% - 40px));
  padding: 30px 0 64px;
}

.story-head {
  padding-top: 18px;
  margin-bottom: 20px;
}

.story-head h1 {
  max-width: 14ch;
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 4.8vw, 4.35rem);
}

.story-cover {
  aspect-ratio: 16 / 8.8;
  margin-bottom: 22px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 38px var(--shadow-color);
}

.story-body {
  gap: 0.92rem;
  font-size: 1rem;
  line-height: 1.9;
}

.story-body p,
.story-empty {
  max-width: 42rem;
  margin: 0;
  white-space: pre-line;
}

.story-backlink,
.gallery-backlink {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--front-line);
}

.story-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--front-line);
}

.story-nav-prev,
.story-nav-next {
  min-width: 0;
}

.story-nav-prev a,
.story-nav-next a {
  display: block;
  color: var(--front-muted);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.story-nav-prev a:hover,
.story-nav-next a:hover {
  color: var(--front-text);
}

.story-nav-next {
  text-align: right;
}

.story-nav-back a {
  color: var(--front-muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s;
}

.story-nav-back a:hover {
  color: var(--front-text);
}

@media (max-width: 768px) {
  .story-nav {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .story-nav-back {
    grid-column: 1 / -1;
    text-align: center;
  }
}

.story-backlink a,
.gallery-backlink a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--front-muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-backlink a:hover,
.gallery-backlink a:hover {
  color: var(--front-text);
}

.gallery-page {
  width: min(1120px, calc(100% - 40px));
  padding: 30px 0 64px;
}

.gallery-head {
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: 20px 28px;
  align-items: start;
  padding-top: 18px;
  margin-bottom: 18px;
}

.gallery-head h1 {
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 4.8vw, 4.6rem);
}

.gallery-head-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-description,
.gallery-head-copy > p:last-child {
  max-width: 38rem;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
}

.gallery-meta {
  align-self: start;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 12px;
}

.gallery-meta > div {
  padding-top: 10px;
  border-top: 1px solid var(--front-line);
}

.gallery-meta dt {
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.gallery-meta dd {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--front-text);
}

.gallery-cover {
  aspect-ratio: 16 / 6.5;
  margin-bottom: 16px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 38px var(--shadow-color);
}

.gallery-grid {
  gap: 10px;
}

.gallery-photo {
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 12px 28px var(--shadow-color);
}

.gallery-photo::after {
  opacity: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.02) 24%, rgba(10, 10, 12, 0.52) 100%);
  transition: opacity 0.22s ease;
}

.gallery-photo:hover::after,
.gallery-photo:focus-visible::after {
  opacity: 1;
}

.gallery-photo-caption {
  padding: 12px 14px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gallery-photo:hover .gallery-photo-caption,
.gallery-photo:focus-visible .gallery-photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.admin-login {
  width: min(1040px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 24px 0 40px;
  align-items: center;
}

.admin-login-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 20px;
  align-items: center;
}

.admin-login-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 4px;
}

.admin-login-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--text-color);
}

.admin-login-copy p:last-child {
  margin: 0;
  max-width: 32rem;
  color: var(--muted-color);
  line-height: 1.78;
}

.login-box {
  max-width: none;
  padding: 24px 24px 22px;
  border-radius: 24px;
}

.login-box h2 {
  margin: 6px 0 16px;
  text-align: left;
}

.admin-login-form .btn {
  width: 100%;
  justify-content: center;
}

.admin-table {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-panel,
.admin-sidebar-card,
.admin-sidebar-nav,
.admin-overview,
.admin-table,
.form,
.login-box,
.stat-card,
.admin-filter-panel,
.admin-settings-intro {
  border-radius: 20px;
  box-shadow: 0 12px 28px var(--shadow-color);
}

.admin-workspace {
  width: min(1320px, calc(100% - 28px));
  padding: 18px 0 34px;
  gap: 18px;
}

.admin-sidebar {
  top: 76px;
  gap: 12px;
}

.admin-overview {
  padding: 18px 20px;
  gap: 14px;
}

.stats-grid,
.admin-panel-grid,
.admin-settings-grid,
.admin-status-grid {
  gap: 14px;
}

.stat-card,
.admin-panel {
  padding: 18px;
}

.stat-number {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
}

.admin-panel-head {
  margin-bottom: 12px;
}

.admin-panel-head h3 {
  font-size: 1.08rem;
}

.admin-filter-panel,
.admin-settings-intro,
.admin-editor-main {
  padding: 18px;
}

.admin-editor {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.admin-editor-side {
  position: sticky;
  top: 76px;
  gap: 14px;
}

.form {
  padding: 22px;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  margin-bottom: 0.42rem;
  font-size: 0.92rem;
}

.form-row {
  gap: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  background: var(--surface-color);
}

.form-group textarea {
  min-height: 100px;
}

.form-help {
  margin-top: 8px;
  color: var(--muted-color);
  font-size: 0.82rem;
  line-height: 1.55;
}

.form-actions {
  margin-top: 1.4rem;
}

.admin-editor-main .current-cover {
  margin-inline: 0;
  max-width: 240px;
}

.admin-editor-main .current-cover img {
  border-radius: 14px;
}

.photo-preview-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.photo-preview-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 68%, transparent);
}

.photo-preview-item img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.photo-preview-item span {
  color: var(--muted-color);
  overflow-wrap: anywhere;
}

.admin-table table {
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 0.92rem;
}

.admin-table td .btn,
.admin-table td form .btn {
  min-height: 34px;
  padding: 0 12px;
}

.admin-theme-intro,
.admin-theme-workbench,
.admin-theme-settings-link {
  position: relative;
}

.theme-option-card:has(input:focus-visible) {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 18%, transparent 82%), 0 18px 40px var(--shadow-color);
}

.theme-panel-sticky-head {
  top: 86px;
  padding-bottom: 10px;
}

.theme-group-panel,
.theme-custom-panel {
  padding: 18px;
  border-radius: 22px;
  box-shadow: 0 14px 34px var(--shadow-color);
}

.theme-option-card {
  padding: 12px;
  border-radius: 18px;
}

@media (max-width: 1100px) {
  .gallery-head,
  .admin-login-shell,
  .admin-editor {
    grid-template-columns: 1fr;
  }

  .admin-editor-side {
    position: static;
  }
}

@media (max-width: 768px) {
  .story-page,
  .gallery-page {
    width: calc(100% - 24px);
    padding: 24px 0 52px;
  }

  .story-head h1,
  .gallery-head h1,
  .admin-login-copy h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .story-cover,
  .gallery-cover {
    border-radius: 18px;
  }

  .gallery-head {
    gap: 16px;
  }

  .gallery-meta {
    grid-template-columns: 1fr;
  }

  .gallery-photo::after,
  .gallery-photo-caption {
    opacity: 1;
    transform: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-login {
    width: calc(100% - 24px);
    padding: 18px 0 32px;
  }

  .login-box {
    padding: 18px;
  }

  .admin-workspace {
    width: calc(100% - 20px);
    padding: 14px 0 28px;
  }

  .admin-page-context {
    display: none;
  }

  .admin-filter-panel,
  .admin-settings-intro,
  .admin-overview,
  .admin-panel,
  .admin-editor-main,
  .stat-card,
  .form {
    padding: 16px;
  }

  .admin-table table {
    min-width: 640px;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* TOZTO audit cleanup round 2: album semantics + admin polish */
.gallery-photo {
  overflow: hidden;
}

.gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-theme-intro {
  align-items: start;
}

.admin-theme-intro .admin-status-grid,
.admin-settings-intro .admin-status-grid {
  align-self: stretch;
}

.admin-theme-workbench {
  overflow: clip;
}

.admin-theme-settings-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.admin-theme-settings-link .form-actions {
  margin-top: auto;
}

.theme-settings-stack {
  gap: 18px;
}

.theme-group-stack,
.theme-custom-panel,
.admin-theme-custom-form {
  gap: 16px;
}

.theme-group-headline {
  margin-bottom: 12px;
}

.admin-compact-form {
  display: grid;
  gap: 14px;
}

.admin-compact-form .form-row {
  margin-bottom: 0;
}

.admin-summary-list {
  gap: 8px;
}

.admin-summary-row {
  align-items: start;
}

.admin-summary-row strong {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .admin-panel-span-2 {
    grid-column: auto;
  }

  .admin-status-grid,
  .admin-settings-grid,
  .theme-custom-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .admin-status-grid,
  .admin-settings-grid,
  .theme-custom-grid,
  .theme-option-grid-grouped,
  .theme-custom-toprow {
    grid-template-columns: 1fr;
  }

  .admin-summary-row {
    flex-direction: column;
    gap: 6px;
  }

  .admin-summary-row strong {
    max-width: 100%;
    text-align: left;
  }

  .theme-custom-toggle {
    width: 100%;
    justify-content: flex-start;
  }
}

/* TOZTO hero ultra-compact polish 2026-07-08 */
.page-home .site-shell-main{padding-top:16px;}
.home-grid{padding:0 0 0;}
.home-hero-magazine{margin-bottom:0;}
.home-hero-stage{min-height:clamp(304px,36vw,380px);border-radius:12px;overflow:hidden;}
.home-grid-posts{margin-top:2px;}
.home-hero-overlay-card{right:16px;bottom:16px;width:min(272px,calc(100% - 32px));padding:12px 14px 11px;border-radius:16px;border:1px solid rgba(255,255,255,.42);background:rgba(255,255,255,.54);box-shadow:0 10px 24px var(--shadow-color);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);}
.home-hero-summary{display:-webkit-box;margin:0;color:var(--text-color);text-decoration:none;font-size:.82rem;line-height:1.48;font-weight:500;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.home-hero-summary:hover{color:var(--text-color);opacity:.86;}
.home-hero-controls{margin-top:9px;padding-top:8px;gap:8px;border-top:1px solid rgba(34,34,34,.06);}
.home-hero-nav-group{gap:6px;}
.home-hero-nav{width:32px;height:32px;}
.home-hero-dots{gap:6px;}
.home-hero-dot{width:7px;height:7px;}
.home-hero-counter{min-width:38px;font-size:.72rem;}
@media (max-width:1100px){.page-home .site-shell-main{padding-top:14px;}.home-grid{padding-bottom:50px;}.home-hero-magazine{margin-bottom:0;}.home-hero-stage{min-height:clamp(284px,40vw,340px);}.home-hero-overlay-card{right:14px;bottom:14px;width:min(220px,calc(100% - 36px));padding:12px 14px;}.home-hero-description{font-size:.74rem;}}
@media (max-width:860px){.page-home .site-shell-main{padding-top:12px;}.home-grid{padding-bottom:40px;}.home-hero-stage{min-height:auto;}.home-hero-slides{min-height:244px;}.home-hero-magazine{margin-bottom:0;}.home-hero-overlay-card{position:static;right:auto;bottom:auto;width:100%;margin-top:8px;padding:14px 16px;border-radius:14px;background:transparent;}.home-hero-description{font-size:.76rem;}.home-hero-cta{font-size:.7rem;}.home-hero-controls{margin-top:8px;padding-top:7px;justify-content:flex-start;}.home-hero-nav{width:30px;height:30px;}.home-grid-posts{margin-top:2px;}}
@media (max-width:640px){.home-grid{padding-bottom:32px;}.home-hero-magazine{margin-bottom:0;}.home-hero-slides{min-height:196px;}.home-hero-overlay-card{margin-top:6px;padding:12px 14px;border-radius:13px;}.home-hero-description{font-size:.72rem;-webkit-line-clamp:2;}.home-hero-cta{font-size:.66rem;padding:4px 12px;}.home-hero-controls{margin-top:7px;padding-top:6px;gap:7px;}.home-grid-posts{margin-top:0;}}
/* /TOZTO hero ultra-compact polish */

/* TOZTO hero frameless controls 2026-07-08 */
.home-hero-stage{border:none!important;box-shadow:none!important;overflow:hidden;background:transparent;border-radius:12px;}
.home-hero-slides{border:none!important;box-shadow:none!important;border-radius:12px;overflow:hidden;}
.home-hero-image-wash{background:linear-gradient(180deg,rgba(17,17,17,.02) 0%,rgba(17,17,17,.08) 100%),linear-gradient(120deg,rgba(17,17,17,0) 0%,rgba(17,17,17,0) 58%,rgba(17,17,17,.22) 100%);}
.home-hero-overlay-card{position:absolute;right:12px;bottom:10px;z-index:3;width:min(240px,calc(100% - 48px));padding:14px 16px;display:flex;flex-direction:column;gap:0;background:transparent!important;border:none!important;border-radius:0;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.home-hero-description{font-size:.78rem;line-height:1.52;color:rgba(255,255,255,.88);margin:0;text-shadow:0 1px 10px rgba(0,0,0,.22);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}

.home-hero-controls{margin-top:10px;padding-top:0;gap:6px;justify-content:flex-start;border-top:none!important;display:flex;align-items:center;}
.home-hero-dots{gap:5px;}
.home-hero-dot{width:6px;height:6px;background:rgba(255,255,255,.42);}
.home-hero-dot.is-active{background:#fff;transform:none;}
.home-hero-counter{min-width:32px;font-size:.66rem;color:rgba(255,255,255,.88);text-shadow:0 1px 8px rgba(0,0,0,.22);}
.home-hero-nav{position:absolute;top:50%;z-index:3;transform:translateY(-50%);width:40px;height:40px;border:none;background:rgba(255,255,255,.18);color:#fff;box-shadow:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
.home-hero-nav:hover{background:rgba(255,255,255,.26);color:#fff;transform:translateY(-50%);}
.home-hero-nav:focus-visible{outline:2px solid rgba(255,255,255,.82);outline-offset:2px;}
.home-hero-nav-prev{left:12px;}
.home-hero-nav-next{right:12px;}
@media (max-width:1100px){.home-hero-overlay-card{right:10px;bottom:1px;width:min(176px,calc(100% - 76px));}.home-hero-nav{width:38px;height:38px;}.home-hero-nav-prev{left:10px;}.home-hero-nav-next{right:10px;}}
@media (max-width:860px){.home-hero-stage{overflow:hidden;}.home-hero-slides{min-height:228px;}.home-hero-overlay-card{position:absolute;right:10px;bottom:1px;left:auto;width:min(170px,calc(100% - 72px));margin-top:0;padding:0;background:transparent!important;}.home-hero-summary{font-size:.72rem;line-height:1.34;}.home-hero-controls{margin-top:8px;gap:5px;}.home-hero-counter{font-size:.62rem;min-width:28px;}.home-hero-nav{width:34px;height:34px;}.home-hero-nav-prev{left:8px;}.home-hero-nav-next{right:8px;}.home-grid-posts{margin-top:2px;}}
@media (max-width:640px){.home-hero-slides{min-height:188px;}.home-hero-overlay-card{right:8px;bottom:1px;width:min(152px,calc(100% - 56px));}.home-hero-summary{font-size:.68rem;line-height:1.3;-webkit-line-clamp:2;}.home-hero-controls{margin-top:6px;gap:4px;}.home-hero-dot{width:5px;height:5px;}.home-hero-counter{font-size:.58rem;min-width:24px;}.home-hero-nav{width:30px;height:30px;border-radius:999px;}.home-hero-nav-prev{left:6px;}.home-hero-nav-next{right:6px;}}
/* /TOZTO hero frameless controls */

/* TOZTO hero seam + edge nav refinement 2026-07-08 */
.page-home .front-home-posts{border-top:none!important;padding-top:10px;}
.page-home .front-home-posts .front-section-head{border-top:none!important;padding-top:0;margin-bottom:16px;}
.page-home .front-home-posts .front-eyebrow{margin-bottom:0;}
html[data-theme] .page-home .home-hero-nav,
.page-home .home-hero-nav{position:absolute;top:50%;z-index:3;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:30px;height:56px;padding:0;border:none!important;border-radius:0;background:transparent!important;color:transparent;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;opacity:.74;transition:opacity .18s ease,transform .18s ease;}
html[data-theme] .page-home .home-hero-nav:hover,
.page-home .home-hero-nav:hover{background:transparent!important;border-color:transparent!important;color:transparent;opacity:1;transform:translateY(-50%);}
.page-home .home-hero-nav span{display:none;}
.page-home .home-hero-nav::before{content:'';display:block;width:11px;height:11px;border-top:1.8px solid rgba(255,255,255,.94);border-right:1.8px solid rgba(255,255,255,.94);filter:drop-shadow(0 1px 8px rgba(0,0,0,.24));}
.page-home .home-hero-nav-prev{left:8px;}
.page-home .home-hero-nav-prev::before{transform:rotate(-135deg);}
.page-home .home-hero-nav-next{right:8px;}
.page-home .home-hero-nav-next::before{transform:rotate(45deg);}
.page-home .home-hero-nav:focus-visible{outline:2px solid rgba(255,255,255,.76);outline-offset:1px;}
@media (max-width:1100px){.page-home .front-home-posts{padding-top:8px;}.page-home .home-hero-nav{width:28px;height:52px;}.page-home .home-hero-nav-prev{left:7px;}.page-home .home-hero-nav-next{right:7px;}}
@media (max-width:860px){.page-home .front-home-posts{padding-top:6px;}.page-home .front-home-posts .front-section-head{margin-bottom:14px;}.page-home .home-hero-nav{width:24px;height:46px;opacity:.78;}.page-home .home-hero-nav::before{width:10px;height:10px;border-top-width:1.7px;border-right-width:1.7px;}.page-home .home-hero-nav-prev{left:6px;}.page-home .home-hero-nav-next{right:6px;}}
@media (max-width:640px){.page-home .front-home-posts{padding-top:4px;}.page-home .front-home-posts .front-section-head{margin-bottom:12px;}.page-home .home-hero-nav{width:22px;height:40px;}.page-home .home-hero-nav::before{width:9px;height:9px;border-top-width:1.6px;border-right-width:1.6px;}.page-home .home-hero-nav-prev{left:4px;}.page-home .home-hero-nav-next{right:4px;}}
/* /TOZTO hero seam + edge nav refinement */

/* TOZTO homepage compact v2 2026-07-08 */
.page-home .site-shell-main{padding-top:12px;}
.page-home .home-grid{padding-bottom:48px;}
.page-home .home-hero-magazine{margin-bottom:0;}
.page-home .home-hero-stage{aspect-ratio:16/5;border-radius:12px;overflow:hidden;}
.page-home .home-hero-slides{min-height:272px;}
.page-home .home-hero-image-wash{background:linear-gradient(180deg,rgba(17,17,17,.04) 0%,rgba(17,17,17,.16) 100%),linear-gradient(120deg,rgba(17,17,17,0) 0%,rgba(17,17,17,0) 48%,rgba(17,17,17,.28) 100%),radial-gradient(ellipse at 88% 84%,rgba(10,10,10,.44) 0%,rgba(10,10,10,.18) 28%,rgba(10,10,10,0) 56%);}
.page-home .home-hero-overlay-card{position:absolute;right:14px;bottom:1px;width:min(240px,calc(100% - 48px));padding:14px 16px;display:flex;flex-direction:column;align-items:flex-end;gap:0;text-align:right;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;}
.page-home .home-hero-description{font-size:.78rem;line-height:1.52;color:rgba(255,255,255,.88);margin:0;text-shadow:0 1px 10px rgba(0,0,0,.22);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}

.page-home .home-hero-controls{width:100%;margin-top:6px;justify-content:flex-end;gap:7px;}
.page-home .home-hero-dots{justify-content:flex-end;}
.page-home .home-hero-counter{text-align:right;}
.page-home .home-hero-dot{background:rgba(255,255,255,.42);}
.page-home .home-hero-dot.is-active{background:#fff;}
.page-home .home-hero-dot:hover{background:rgba(255,255,255,.68);}
.page-home .home-hero-counter{color:rgba(255,255,255,.88);text-shadow:0 1px 8px rgba(0,0,0,.22);}
.page-home .home-hero-controls{border-top:1px solid rgba(255,255,255,.14);}
.page-home .home-hero-kicker{margin:0;font-size:.62rem;letter-spacing:.22em;text-transform:uppercase;color:rgba(255,255,255,.72);text-shadow:0 1px 8px rgba(0,0,0,.18);}
.page-home .home-hero-title{margin:1px 0 0;font-size:1.38rem;line-height:1.18;letter-spacing:-.04em;color:rgba(255,255,255,.96);text-shadow:0 1px 14px rgba(0,0,0,.28);}
.page-home .home-hero-meta{display:inline-flex;align-items:center;gap:8px;margin-top:4px;font-size:.7rem;color:rgba(255,255,255,.64);text-shadow:0 1px 8px rgba(0,0,0,.16);}
.page-home .home-hero-date{color:rgba(255,255,255,.64);letter-spacing:.06em;}
.page-home .home-hero-cta{display:inline-flex;align-items:center;gap:4px;margin-top:6px;padding:4px 12px;border:1px solid rgba(255,255,255,.28);border-radius:999px;font-size:.7rem;font-weight:500;color:rgba(255,255,255,.92);text-decoration:none;text-shadow:0 1px 8px rgba(0,0,0,.14);transition:background .18s ease,border-color .18s ease,color .18s ease;}
.page-home .home-hero-cta:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.44);color:#fff;}

.page-home .home-grid-posts{margin-top:0;}
.page-home .front-home-posts{padding-top:6px;}
.page-home .front-home-posts .front-section-head{margin-bottom:12px;}
.page-home .home-post-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start;}
.page-home .home-post-card{height:auto;min-height:0;border-radius:12px;}
.page-home .home-post-card-media{height:168px;min-height:168px;max-height:168px;}
.page-home .home-post-card-body{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 11px 12px;min-width:0;flex:none;}
.page-home .home-post-card-meta{gap:6px;font-size:.68rem;line-height:1.22;opacity:.82;}
.page-home .home-post-card h3{margin:0;min-height:0;font-size:.92rem;line-height:1.34;letter-spacing:-.012em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.page-home .home-pagination{margin-top:22px;}
@media (max-width:1100px){.page-home .site-shell-main{padding-top:10px;}.page-home .home-grid{padding-bottom:42px;}.page-home .home-hero-stage{min-height:clamp(252px,34vw,306px);}.page-home .home-hero-slides{min-height:252px;}.page-home .home-hero-overlay-card{right:12px;bottom:1px;width:min(260px,calc(100% - 48px));padding:14px 16px;}.page-home .home-post-grid{gap:14px;}.page-home .home-post-card-media{height:156px;min-height:156px;max-height:156px;}background:transparent;border:none;box-shadow:none;backdrop-filter:none;}
@media (max-width:900px){.page-home .home-hero-stage{min-height:auto;}.page-home .home-hero-slides{min-height:224px;}.page-home .home-hero-overlay-card{right:10px;bottom:1px;width:min(240px,calc(100% - 48px));padding:12px 14px;}.page-home .home-hero-title{font-size:1.2rem;}.page-home .home-hero-description{font-size:.72rem;}.page-home .home-hero-kicker{font-size:.6rem;}.page-home .home-post-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}.page-home .front-home-posts .front-section-head{margin-bottom:10px;}background:transparent;border:none;box-shadow:none;backdrop-filter:none;}
@media (max-width:640px){.page-home .site-shell-main{padding-top:8px;}.page-home .home-grid{padding-bottom:28px;}.page-home .home-hero-magazine{margin-bottom:0;}.page-home .home-hero-slides{min-height:188px;}.page-home .home-hero-overlay-card{right:8px;bottom:1px;width:min(200px,calc(100% - 40px));padding:10px 12px;}.page-home .home-hero-title{font-size:1.05rem;}.page-home .home-hero-description{font-size:.68rem;-webkit-line-clamp:2;}.page-home .home-hero-kicker{font-size:.56rem;}.page-home .home-hero-meta{font-size:.66rem;gap:4px;}.page-home .home-hero-cta{font-size:.66rem;padding:4px 12px;}.page-home .home-hero-controls{margin-top:4px;gap:5px;}.page-home .front-home-posts{padding-top:4px;}.page-home .home-post-grid{grid-template-columns:1fr;gap:12px;}.page-home .home-post-card-media{height:172px;min-height:172px;max-height:172px;}.page-home .home-post-card-body{padding:9px 10px 11px;gap:3px;}.page-home .home-post-card h3{font-size:.89rem;line-height:1.32;}.page-home .home-pagination{margin-top:18px;}background:transparent;border:none;box-shadow:none;backdrop-filter:none;}
/* /TOZTO homepage compact v2 */

/* TOZTO homepage image crop soften 2026-07-08 */
.page-home .home-post-card-media{height:212px;min-height:212px;max-height:212px;overflow:hidden;background:color-mix(in srgb,var(--surface-color) 94%,black 6%);}
.page-home .home-post-card-media img{width:100%;height:100%;object-fit:cover;object-position:center center;display:block;}
@media (max-width:1100px){.page-home .home-post-card-media{height:196px;min-height:196px;max-height:196px;}}
@media (max-width:900px){.page-home .home-post-card-media{height:210px;min-height:210px;max-height:210px;}}
@media (max-width:640px){.page-home .home-post-card-media{height:186px;min-height:186px;max-height:186px;}}
/* /TOZTO homepage image crop soften */

/* TOZTO shell compact rhythm 2026-07-08 */
.site-shell-bar{padding:10px 0;min-height:calc(var(--top-nav-height, 76) * 1px);gap:18px;}
.site-brand{font-size:clamp(1.08rem,1rem + .44vw,1.4rem);letter-spacing:.24em;}
.site-top-nav{gap:.95rem;}
.site-top-nav-link{font-size:.92rem;}
.site-top-nav-link.is-utility{padding:.38rem .76rem;}
.site-shell-main{min-height:calc(100vh - 186px);}
.site-shell-footer{padding:24px 0 30px;margin-top:4px;}
.site-shell-footer-inner{gap:22px;font-size:.9rem;}
.site-footer-brand-block{gap:7px;}
.site-footer-eyebrow{font-size:.58rem;letter-spacing:.2em;}
.site-footer-brand{font-size:clamp(1.18rem,1.06rem + .72vw,1.58rem);letter-spacing:-.02em;}
.site-footer-copy{line-height:1.64;max-width:500px;font-size:.9rem;}
.site-footer-links{gap:18px;}
.site-footer-links > div{gap:8px;}
.site-footer-title{font-size:.68rem;letter-spacing:.16em;}
.site-footer-meta{gap:6px;font-size:.84rem;}
@media (max-width:768px){.site-shell-bar{padding:10px 0 8px;min-height:calc(var(--top-nav-height, 76) * 1px);gap:10px;}.site-brand{font-size:1rem;letter-spacing:.2em;}.site-top-nav{gap:.72rem .86rem;}.site-top-nav-link{font-size:.88rem;}.site-top-nav-link.is-utility{padding:.32rem .68rem;}.site-shell-footer{padding:20px 0 24px;}.site-shell-footer-inner{gap:16px;font-size:.88rem;}.site-footer-brand{font-size:1.12rem;}.site-footer-copy{font-size:.86rem;line-height:1.58;}.site-footer-links{gap:14px;}.site-footer-meta{text-align:left;align-items:flex-start;}}
/* /TOZTO shell compact rhythm */
/* TOZTO homepage pagination lightweight 2026-07-08 */
.page-home .home-pagination{
  justify-content:center;
  gap:10px;
  margin-top:16px;
  padding-top:0;
  border-top:none;
}

.page-home .home-pagination-pages{
  gap:4px;
}

.page-home .home-pagination-page,
.page-home .home-pagination-arrow{
  min-height:30px;
  padding:.34rem .62rem;
  border:none;
  border-radius:999px;
  background:transparent;
  color:color-mix(in srgb,var(--front-text) 64%,transparent);
  font-size:.72rem;
  font-weight:500;
  line-height:1;
  letter-spacing:.12em;
  transition:background-color .18s ease,color .18s ease,opacity .18s ease,transform .18s ease;
}

.page-home .home-pagination-page{
  min-width:30px;
  padding:.34rem .48rem;
}

.page-home .home-pagination-arrow{
  padding:.34rem .3rem;
}

.page-home .home-pagination-page:hover,
.page-home .home-pagination-arrow:hover{
  background:rgba(24,24,24,.05);
  color:var(--front-text);
  transform:translateY(-1px);
}

.page-home .home-pagination-page.active{
  background:rgba(24,24,24,.08);
  color:var(--front-text);
  border:none;
  box-shadow:none;
}

.page-home .home-pagination-arrow.disabled,
.page-home .home-pagination-arrow[aria-disabled='true']{
  opacity:.26;
}

@media (max-width:900px){
  .page-home .home-pagination{
    gap:8px;
    margin-top:14px;
  }
}

@media (max-width:640px){
  .page-home .home-pagination{
    gap:6px;
    margin-top:12px;
  }

  .page-home .home-pagination-pages{
    gap:2px;
  }

  .page-home .home-pagination-page,
  .page-home .home-pagination-arrow{
    min-height:28px;
    padding:.3rem .48rem;
    font-size:.68rem;
    letter-spacing:.08em;
  }

  .page-home .home-pagination-page{
    min-width:28px;
    padding:.3rem .42rem;
  }

  .page-home .home-pagination-arrow{
    padding:.3rem .22rem;
  }
}
/* /TOZTO homepage pagination lightweight */
/* TOZTO homepage pagination mobile layout handoff 2026-07-08 */
@media (max-width:768px){
  .page-home .home-pagination{
    flex-direction:row;
    align-items:center;
    justify-content:center;
  }

  .page-home .home-pagination-pages{
    justify-content:center;
  }
}
/* /TOZTO homepage pagination mobile layout handoff */
/* TOZTO footer custom slots 2026-07-08 */
.site-shell-footer{
  padding:18px 0 20px;
  margin-top:4px;
  border-top:1px solid var(--shadow-color);
  background:transparent;
}

.site-shell-footer-inner.site-shell-footer-minimal{
  width:min(1280px,calc(100% - 56px));
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:18px 24px;
  font-size:.84rem;
  color:var(--muted-color);
}

.site-footer-slot{
  min-width:0;
  display:flex;
  align-items:center;
}

.site-footer-slot-left{justify-content:flex-start;}
.site-footer-slot-center{justify-content:center;text-align:center;}
.site-footer-slot-right{justify-content:flex-end;text-align:right;gap:10px;flex-wrap:wrap;}

.site-footer-item,
.site-footer-icp{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:var(--muted-color);
  text-decoration:none;
  font-size:.82rem;
  line-height:1.4;
  letter-spacing:.01em;
  transition:color .18s ease,opacity .18s ease;
}

.site-footer-item.is-static,
.site-footer-icp.is-static{cursor:default;}

.site-footer-item:hover,
.site-footer-icp:hover{color:var(--text-color);}

.site-footer-item-icon{
  display:inline-flex;
  width:13px;
  height:13px;
  flex:0 0 13px;
  opacity:.82;
}

.site-footer-item-icon svg{
  width:100%;
  height:100%;
  display:block;
}

.site-footer-item-label{
  min-width:0;
  overflow-wrap:anywhere;
}

.site-footer-icp{
  opacity:.9;
}

@media (max-width:900px){
  .site-shell-footer{padding:16px 0 18px;}
  .site-shell-footer-inner.site-shell-footer-minimal{
    grid-template-columns:1fr;
    gap:10px;
    width:calc(100% - 32px);
    font-size:.82rem;
  }
  .site-footer-slot,
  .site-footer-slot-center,
  .site-footer-slot-right{
    justify-content:flex-start;
    text-align:left;
  }
  .site-footer-slot-right{gap:8px;}
}

@media (max-width:640px){
  .site-shell-footer{padding:14px 0 16px;}
  .site-shell-footer-inner.site-shell-footer-minimal{gap:8px;font-size:.8rem;}
  .site-footer-item,
  .site-footer-icp{font-size:.78rem;gap:5px;}
  .site-footer-item-icon{width:12px;height:12px;flex-basis:12px;}
}
/* /TOZTO footer custom slots */

/* TOZTO admin footer config 2026-07-08 */
.admin-footer-config{
  display:grid;
  gap:14px;
}

.admin-footer-config-group{
  display:grid;
  gap:12px;
  padding:14px 15px;
  border:1px solid var(--border-color);
  border-radius:16px;
  background:color-mix(in srgb,var(--surface-color) 92%,var(--bg-color) 8%);
}

.admin-footer-config-title{
  font-size:.72rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted-color);
}

.admin-footer-config-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}

.admin-footer-config-grid .form-group.is-wide{
  grid-column:1 / -1;
}

@media (max-width:768px){
  .admin-footer-config-group{padding:12px 13px;border-radius:14px;}
  .admin-footer-config-grid{grid-template-columns:1fr;gap:10px;}
}
/* /TOZTO admin footer config */

/* TOZTO admin footer builder 2026-07-08 */
.admin-settings-subnav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px;
}

.admin-settings-subnav-item{
  display:grid;
  gap:4px;
  padding:14px 16px;
  border:1px solid color-mix(in srgb,var(--border-color) 82%,transparent 18%);
  border-radius:16px;
  background:color-mix(in srgb,var(--surface-color) 94%,transparent 6%);
  color:inherit;
  text-decoration:none;
  transition:border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.admin-settings-subnav-item strong{
  font-size:.92rem;
  line-height:1.2;
}

.admin-settings-subnav-item span{
  font-size:.76rem;
  color:var(--muted-color);
  line-height:1.45;
}

.admin-settings-subnav-item:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--accent-color) 24%,var(--border-color) 76%);
  box-shadow:0 10px 26px rgba(0,0,0,.05);
}

.admin-settings-subnav-item.active{
  border-color:color-mix(in srgb,var(--accent-color) 34%,var(--border-color) 66%);
  background:color-mix(in srgb,var(--surface-color) 82%,var(--front-alt) 18%);
  box-shadow:0 14px 30px rgba(0,0,0,.06);
}

.admin-footer-builder-panel{
  display:grid;
  gap:18px;
}

.admin-footer-builder{
  display:grid;
  gap:18px;
}

.admin-footer-builder-columns{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.admin-footer-builder-slot,
.admin-footer-builder-extra{
  display:grid;
  gap:14px;
  padding:16px;
  border:1px solid color-mix(in srgb,var(--border-color) 82%,transparent 18%);
  border-radius:18px;
  background:color-mix(in srgb,var(--surface-color) 96%,transparent 4%);
}

.admin-footer-builder-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.admin-footer-builder-head h3{
  margin:4px 0 0;
}

.admin-footer-slot-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:color-mix(in srgb,var(--front-alt) 78%,transparent 22%);
  color:var(--muted-color);
  font-size:.74rem;
  letter-spacing:.08em;
  white-space:nowrap;
}

.admin-footer-item-list{
  display:grid;
  gap:12px;
}

.admin-footer-item{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid color-mix(in srgb,var(--border-color) 78%,transparent 22%);
  border-radius:16px;
  background:color-mix(in srgb,var(--bg-color) 72%,var(--surface-color) 28%);
}

.admin-footer-item-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
  gap:12px;
}

.admin-footer-item-grid .form-group.is-wide{
  grid-column:1 / -1;
}

.admin-footer-item-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.admin-footer-slot-empty{
  margin:0;
  padding:14px;
  border:1px dashed color-mix(in srgb,var(--border-color) 72%,transparent 28%);
  border-radius:14px;
  color:var(--muted-color);
  font-size:.84rem;
  line-height:1.6;
  background:color-mix(in srgb,var(--surface-color) 72%,transparent 28%);
}

.admin-footer-builder-extra-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}

.site-footer-slot-group{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 14px;
  min-width:0;
}

.site-footer-slot-center .site-footer-slot-group{
  justify-content:center;
}

.site-footer-slot-right .site-footer-slot-group{
  justify-content:flex-end;
}

@media (max-width:960px){
  .admin-footer-builder-columns{
    grid-template-columns:1fr;
  }
}

@media (max-width:768px){
  .admin-settings-subnav{
    grid-template-columns:1fr;
    gap:10px;
    margin-bottom:16px;
  }

  .admin-settings-subnav-item,
  .admin-footer-builder-slot,
  .admin-footer-builder-extra{
    padding:14px;
    border-radius:16px;
  }

  .admin-footer-item-grid,
  .admin-footer-builder-extra-grid{
    grid-template-columns:1fr;
    gap:10px;
  }

/* ---- Top Nav Appearance Sliders ---- */
.admin-topnav-appearance-panel { margin-top: 24px; }
.admin-topnav-appearance-panel .admin-panel-body { padding: 20px 24px; }
.admin-topnav-slider-group { display: flex; flex-direction: column; gap: 24px; }
.admin-topnav-slider-item { display: flex; flex-direction: column; gap: 8px; }
.admin-topnav-slider-head { display: flex; align-items: center; justify-content: space-between; }
.admin-topnav-slider-head label { font-weight: 600; font-size: 0.94rem; color: var(--text-color); }
.admin-topnav-slider-value { font-size: 0.88rem; font-weight: 600; color: var(--accent-color); background: var(--alt-color, #eee); padding: 2px 10px; border-radius: 6px; min-width: 44px; text-align: center; }
.admin-topnav-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--border-color); border-radius: 3px; outline: none; cursor: pointer; }
.admin-topnav-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--button-color); cursor: pointer; border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.admin-topnav-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--button-color); cursor: pointer; border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }

}

@media (max-width:640px){
  .site-footer-slot-group{
    gap:6px 12px;
  }

  .admin-footer-item{
    padding:12px;
    gap:10px;
  }

  .admin-footer-item-actions .btn{
    flex:1 1 calc(50% - 4px);
  }
}
/* /TOZTO admin footer builder */

/* TOZTO P2/P3 cleanup round 3: detail readability + admin consistency */
.story-page,
.gallery-page{
  border-top:0;
}

.story-head,
.gallery-head{
  border-top:1px solid color-mix(in srgb,var(--front-line) 86%,transparent 14%);
}

.story-cover img,
.gallery-cover img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.story-body{
  max-width:44rem;
}

.story-body p{
  color:var(--front-text);
  letter-spacing:.005em;
}

.story-body p + p{
  margin-top:.1rem;
}

.story-body a,
.gallery-description a{
  color:var(--accent-color);
  text-underline-offset:3px;
}

.story-body img{
  width:100%;
  max-width:100%;
  height:auto;
  border-radius:18px;
  box-shadow:0 14px 32px var(--shadow-color);
}

.gallery-description{
  color:var(--front-muted);
}

.gallery-cover,
.story-cover,
.gallery-photo{
  background:color-mix(in srgb,var(--text-color) 92%,#000 8%);
}

.gallery-grid{
  align-items:start;
}

.gallery-photo{
  transform:translateZ(0);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.gallery-photo:hover,
.gallery-photo:focus-visible{
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--accent-color) 28%,transparent 72%);
}

.admin-header-inner{
  min-width:0;
}

.admin-header-tools{
  align-items:center;
  justify-content:flex-end;
}

.admin-header-status{
  max-width:32ch;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.admin-table{
  border-radius:18px;
}

.admin-table th{
  white-space:nowrap;
}

.admin-table td:first-child,
.admin-table td:nth-child(3){
  max-width:260px;
  overflow-wrap:anywhere;
}

.admin-table td{
  line-height:1.5;
}

.admin-table td form{
  display:inline-flex!important;
  vertical-align:middle;
}

.admin-filter-panel{
  align-items:center;
}

.admin-filter-panel > div:first-child strong{
  display:block;
  margin-top:3px;
  font-size:1rem;
  line-height:1.35;
}

.directory-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.directory-chip{
  line-height:1.25;
  white-space:nowrap;
}

.admin-editor-main form{
  display:grid;
  gap:0;
}

.admin-editor-main textarea[name="content"]{
  min-height:320px;
  line-height:1.72;
}

.admin-editor-main textarea[name="description"]{
  min-height:96px;
  line-height:1.65;
}

.admin-sidebar-card .admin-rule-list{
  margin-top:10px;
}

.photo-preview-item strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.photo-preview-item span{
  display:block;
  margin-top:3px;
  font-size:.78rem;
  line-height:1.45;
}

@media (max-width:900px){
  .site-footer-slot-right .site-footer-slot-group{
    justify-content:flex-start;
  }
}

@media (max-width:768px){
  .story-head,
  .gallery-head{
    padding-top:14px;
    margin-bottom:16px;
  }

  .story-cover{
    aspect-ratio:16 / 10;
    margin-bottom:18px;
  }

  .gallery-cover{
    aspect-ratio:16 / 9;
    margin-bottom:12px;
  }

  .story-body{
    font-size:.96rem;
    line-height:1.82;
    gap:.78rem;
  }

  .gallery-meta > div{
    padding-top:8px;
  }

  .admin-header-inner{
    gap:12px;
  }

  .admin-brand-mark{
    width:36px;
    height:36px;
    border-radius:12px;
  }

  .admin-header-copy a{
    font-size:1rem;
  }

  .admin-header-tools{
    width:100%;
    justify-content:flex-start;
  }

  .admin-header-status{
    display:none;
  }

  .admin-filter-panel{
    align-items:flex-start;
  }

  .directory-filters{
    width:100%;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:2px;
  }

  .directory-chip{
    flex:0 0 auto;
  }

  .admin-editor-main textarea[name="content"]{
    min-height:260px;
  }
}

@media (max-width:560px){
  .story-page,
  .gallery-page{
    width:calc(100% - 20px);
    padding-top:18px;
  }

  .story-head h1,
  .gallery-head h1{
    max-width:100%;
    margin-bottom:10px;
  }

  .gallery-photo{
    aspect-ratio:4 / 3.15;
  }

  .admin-table table{
    min-width:560px;
  }

  .admin-table th,
  .admin-table td{
    padding:10px 11px;
    font-size:.86rem;
  }

  .admin-table td .btn,
  .admin-table td form .btn{
    min-height:31px;
    padding:0 10px;
    font-size:.78rem;
  }

  .admin-footer-item-actions .btn{
    flex:1 1 100%;
  }
}
/* /TOZTO P2/P3 cleanup round 3 */

/* TOZTO homepage type scale tune 2026-07-09 */
.page-home .home-posts-kicker{font-size:.72rem;}
.page-home .home-hero-summary{font-size:.84rem;line-height:1.66;}
.page-home .home-hero-counter{font-size:.7rem;}
.page-home .home-post-card-meta{font-size:.74rem;line-height:1.28;}
.page-home .home-post-card h3{font-size:.98rem;line-height:1.38;}
.page-home .home-pagination-page,
.page-home .home-pagination-arrow{font-size:.94rem;}
@media (max-width:900px){
  .page-home .home-hero-summary{font-size:.78rem;line-height:1.6;}
  .page-home .home-post-card h3{font-size:.95rem;}
}
@media (max-width:640px){
  .page-home .home-posts-kicker{font-size:.7rem;}
  .page-home .home-hero-summary{font-size:.74rem;line-height:1.56;}
  .page-home .home-post-card-meta{font-size:.72rem;line-height:1.26;}
  .page-home .home-post-card h3{font-size:.92rem;line-height:1.34;}
  .page-home .home-pagination-page,
  .page-home .home-pagination-arrow{font-size:.9rem;}
}
/* /TOZTO homepage type scale tune */

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.pagination-inner {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--front-line);
  border-radius: 8px;
  color: var(--front-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.pagination-page:hover {
  border-color: var(--accent-color);
  color: var(--front-text);
}
.pagination-page.active {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color, #d6a354) 14%, transparent 86%);
  color: var(--front-text);
}
.pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: var(--front-muted);
  font-size: 0.9rem;
}


/* ---- Admin Toast ---- */
.admin-toast-container {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.admin-toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--button-text, #fff);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
  max-width: 360px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.admin-toast.is-visible { opacity: 1; transform: translateX(0); }
.admin-toast-success { background: #2e7d32; }
.admin-toast-error { background: #c62828; }

/* ---- Admin Breadcrumb ---- */
.admin-header-copy { display: flex; flex-direction: column; gap: 2px; }
  background: var(--success-color, #2e7d32);
  background: var(--error-color, #c62828);
.admin-breadcrumb a:hover { color: var(--text-color); }
.admin-breadcrumb-sep { user-select: none; opacity: 0.5; }

/* ---- Admin Save Button ---- */
.admin-header-tools { display: flex; align-items: center; gap: 12px; }
.admin-save-area { display: flex; align-items: center; gap: 10px; }
.admin-save-btn { transition: background 0.2s, opacity 0.2s; }
.admin-save-btn.is-dirty { background: var(--accent-color); box-shadow: 0 0 0 3px rgba(var(--accent-color), 0.2); }
.admin-save-btn.is-saving { opacity: 0.7; pointer-events: none; }
.admin-save-btn.is-saved { background: #2e7d32; }
.admin-save-status { font-size: 0.78rem; color: var(--muted-color); min-width: 60px; }
.admin-save-status.is-saving { color: var(--accent-color); }
.admin-save-status.is-saved { color: #2e7d32; }
.admin-save-status.is-error { color: #c62828; }
  background: var(--success-color, #2e7d32);
/* ---- Compact header on scroll ---- */
.admin-header.is-compact { padding: 6px 0; }
  color: var(--success-color, #2e7d32);
  color: var(--error-color, #c62828);
.admin-header.is-compact .admin-header-copy { font-size: 0.82rem; }
.admin-header.is-compact .admin-brand-mark { width: 28px; height: 28px; font-size: 0.8rem; }

/* TOZTO hero compact banner —aspect-ratio drives height, image crops from center */
.home-hero-stage,.page-home .home-hero-stage{aspect-ratio:16/5;min-height:0!important;border-radius:12px;overflow:hidden}
.home-hero-slides,.page-home .home-hero-slides{min-height:0!important}
.home-hero-slide img{object-fit:cover;width:100%;height:100%}

html[data-theme] .page-albums .front-album-card-body {
  color: rgba(255, 255, 255, 0.88);
}

html[data-theme] .page-albums .front-album-card h3 {
  color: #fff;
}

html[data-theme] .page-albums .front-album-meta {
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme] .page-albums .front-album-card .meta-badge {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

/* Background Music Player */
.bg-music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-music-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-color, #fafafa);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color, #333);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bg-music-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.bg-music-toggle:active {
  transform: scale(0.95);
}
.bg-music-player.is-playing .bg-music-toggle {
  background: var(--accent-color, #0070f3);
  color: var(--button-text, #fff);
  box-shadow: 0 2px 14px rgba(0,0,0,0.18);
}
.bg-music-icon {
  position: absolute;
  transition: opacity 0.2s;
}
.bg-music-icon-play {
  opacity: 1;
}
.bg-music-icon-pause {
  opacity: 0;
}
.bg-music-player.is-playing .bg-music-icon-play {
  opacity: 0;
}
.bg-music-player.is-playing .bg-music-icon-pause {
  opacity: 1;
}
/* player.js - prev/next buttons wrapper */
.bg-music-btn-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-color, #fff);
  border-radius: 28px;
  padding: 4px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
  border: 1px solid var(--border-color, #e5e5e5);
}
.bg-music-prev,
.bg-music-next {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--front-muted, #888);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.bg-music-prev:hover,
.bg-music-next:hover {
  background: var(--border-color, #e5e5e5);
  color: var(--text-color, #222);
}
.bg-music-toggle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.bg-music-ring {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-color, #0070f3);
  border-top-color: transparent;
  animation: bg-music-spin 1.5s linear infinite;
  pointer-events: none;
}
@keyframes bg-music-spin {
  to { transform: rotate(360deg); }
}
.bg-music-track-label {
  position: absolute;
  bottom: -28px;
  right: 0;
  font-size: 0.7rem;
  color: var(--front-muted, #999);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s;
}

/* ===== Standardized Admin Header Buttons ===== */
.admin-header-tools .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.admin-header-tools .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.admin-header-tools .btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.admin-header-tools .btn-primary {
  background: var(--button-color, #2f2b26);
  color: var(--button-text, #fff);
  border-color: var(--button-color, #2f2b26);
}

.admin-header-tools .btn-primary:hover {
  background: var(--button-color, #2f2b26);
  filter: brightness(1.1);
}

.admin-header-tools .btn-secondary {
  background: transparent;
  color: var(--text-color, #222);
  border-color: var(--border-color, #ddd);
}

.admin-header-tools .btn-secondary:hover {
  background: var(--front-alt, #eee);
  border-color: var(--muted-color, #777);
}

.admin-header-tools .btn-danger {
  background: transparent;
  color: #c62828;
  border-color: rgba(198,40,40,0.25);
}

.admin-header-tools .btn-danger:hover {
  background: rgba(198,40,40,0.08);
  border-color: rgba(198,40,40,0.4);
}

/* Quick create buttons group */
.admin-header-quick-create {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Save button group */
.admin-save-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border-color, #ddd);
}

/* Utility buttons group */
.admin-header-utility {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid var(--border-color, #ddd);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .admin-header-tools {
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-save-area,
  .admin-header-utility {
    border-left: none;
    padding-left: 0;
  }
}
/* SPA loading bar */
.spa-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 10000;
  pointer-events: none;
}
.spa-loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--accent-color, #333);
}
.spa-loading-bar.is-loading::after {
  animation: spa-bar-slide 1.2s ease-in-out infinite;
}
@keyframes spa-bar-slide {
  0%   { width: 0;   left: 0; }
  50%  { width: 50%; left: 25%; }
  100% { width: 0;   left: 100%; }
}

/* ===== 暗黑主题：管理后台硬编码颜色覆盖 ===== */
:root[data-theme-dark] body.admin-shell {
  background: var(--bg-color);
  color: var(--text-color);
}
:root[data-theme-dark] .admin-header {
  background: color-mix(in srgb, var(--surface-color) 88%, transparent);
  border-bottom-color: var(--border-color);
}
:root[data-theme-dark] .admin-header-copy a {
  color: var(--text-color);
}
:root[data-theme-dark] .admin-header-copy span,
:root[data-theme-dark] .admin-kicker,
:root[data-theme-dark] .admin-panel-kicker,
:root[data-theme-dark] .admin-page-kicker {
  color: var(--muted-color);
}
:root[data-theme-dark] .admin-brand-mark {
  background: var(--accent-color);
  color: var(--bg-color);
  box-shadow: 0 10px 24px var(--shadow-color);
}
:root[data-theme-dark] .admin-sidebar-card,
:root[data-theme-dark] .admin-panel,
:root[data-theme-dark] .admin-table,
:root[data-theme-dark] .form,
:root[data-theme-dark] .login-box,
:root[data-theme-dark] .stat-card,
:root[data-theme-dark] .admin-overview,
:root[data-theme-dark] .admin-sidebar-nav {
  background: color-mix(in srgb, var(--surface-color) 92%, transparent);
  border-color: var(--border-color);
  box-shadow: 0 18px 44px var(--shadow-color);
}
:root[data-theme-dark] .admin-sidebar-card strong,
:root[data-theme-dark] .admin-page-header h2,
:root[data-theme-dark] .admin-overview-copy h3,
:root[data-theme-dark] .stat-number,
:root[data-theme-dark] .admin-panel-head h3,
:root[data-theme-dark] .admin-recent-link,
:root[data-theme-dark] .admin-summary-title,
:root[data-theme-dark] .admin-settings-item strong,
:root[data-theme-dark] .admin-table th,
:root[data-theme-dark] .admin-table td {
  color: var(--text-color);
}
:root[data-theme-dark] .admin-sidebar-card span,
:root[data-theme-dark] .page-subtitle,
:root[data-theme-dark] .admin-overview-copy p,
:root[data-theme-dark] .stat-label,
:root[data-theme-dark] .admin-recent-meta,
:root[data-theme-dark] .admin-summary-meta,
:root[data-theme-dark] .admin-settings-item span,
:root[data-theme-dark] .admin-table .actions,
:root[data-theme-dark] .admin-empty,
:root[data-theme-dark] .admin-home-layout-hint {
  color: var(--muted-color);
}
:root[data-theme-dark] .admin-sidebar-nav > a,
:root[data-theme-dark] .admin-sidebar-site-link,
:root[data-theme-dark] .admin-sidebar-nav .logout {
  color: var(--muted-color);
}
:root[data-theme-dark] .admin-sidebar-nav > a:hover,
:root[data-theme-dark] .admin-sidebar-site-link:hover,
:root[data-theme-dark] .admin-sidebar-nav .logout:hover,
:root[data-theme-dark] .admin-sidebar-nav > a.active {
  background: color-mix(in srgb, var(--accent-color) 16%, transparent);
  color: var(--text-color);
}
:root[data-theme-dark] .admin-overview-actions span {
  background: color-mix(in srgb, var(--text-color) 6%, transparent);
  color: var(--muted-color);
}
:root[data-theme-dark] .stat-link {
  color: var(--accent-color);
}
:root[data-theme-dark] .admin-recent-item,
:root[data-theme-dark] .admin-summary-item,
:root[data-theme-dark] .admin-settings-item {
  border-top-color: var(--border-color);
}
:root[data-theme-dark] .admin-table th {
  border-bottom-color: var(--border-color);
}
:root[data-theme-dark] .admin-table tr:last-child td {
  border-bottom: none;
}
:root[data-theme-dark] .admin-actions .btn,
:root[data-theme-dark] .admin-panel-actions .btn,
:root[data-theme-dark] .admin-header-tools .btn {
  color: var(--text-color);
  border-color: var(--border-color);
}
:root[data-theme-dark] .admin-actions .btn:hover,
:root[data-theme-dark] .admin-panel-actions .btn:hover,
:root[data-theme-dark] .admin-header-tools .btn:hover {
  background: color-mix(in srgb, var(--text-color) 8%, transparent);
}
:root[data-theme-dark] .theme-option-card {
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--surface-color) 60%, transparent);
}
:root[data-theme-dark] .theme-option-card:hover {
  border-color: var(--accent-color);
}
:root[data-theme-dark] .theme-option-card.is-active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color) 30%, transparent);
}
:root[data-theme-dark] .theme-option-name {
  color: var(--text-color);
}
:root[data-theme-dark] .theme-option-desc {
  color: var(--muted-color);
}
:root[data-theme-dark] .admin-login {
  background: var(--bg-color);
  color: var(--text-color);
}
:root[data-theme-dark] .admin-login-setup code {
  background: color-mix(in srgb, var(--surface-color) 80%, transparent);
  color: var(--accent-color);
}

/* ===== 暗黑主题：前台硬编码颜色覆盖 ===== */
:root[data-theme-dark] .front-link-primary {
  background: var(--button-color);
  color: var(--button-text);
}
:root[data-theme-dark] .front-link-secondary {
  color: var(--text-color);
  border-color: var(--border-color);
}
:root[data-theme-dark] .site-shell-footer {
  background: color-mix(in srgb, var(--surface-color) 40%, transparent);
}
:root[data-theme-dark] .home-grid-hero {
  background: color-mix(in srgb, var(--surface-color) 85%, transparent);
}
:root[data-theme-dark] .home-grid-hero-media {
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}
:root[data-theme-dark] .front-hero-note {
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  border-color: var(--border-color);
}
:root[data-theme-dark] .front-hero-note-link {
  color: var(--text-color);
}
:root[data-theme-dark] .front-eyebrow,
:root[data-theme-dark] .front-lead,
:root[data-theme-dark] .front-hero-copy p {
  color: var(--muted-color);
}
:root[data-theme-dark] .front-hero-copy h1 {
  color: var(--text-color);
}
:root[data-theme-dark] .post-card,
:root[data-theme-dark] .album-card,
:root[data-theme-dark] .note-card,
:root[data-theme-dark] .directory-card {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--text-color);
}
:root[data-theme-dark] .post-card-title,
:root[data-theme-dark] .album-card-title,
:root[data-theme-dark] .note-card-title,
:root[data-theme-dark] .directory-card-title {
  color: var(--text-color);
}
:root[data-theme-dark] .post-card-excerpt,
:root[data-theme-dark] .album-card-meta,
:root[data-theme-dark] .note-card-meta,
:root[data-theme-dark] .directory-card-meta,
:root[data-theme-dark] .post-meta,
:root[data-theme-dark] .article-meta {
  color: var(--muted-color);
}
:root[data-theme-dark] .article-content,
:root[data-theme-dark] .post-content,
:root[data-theme-dark] .page-content {
  color: var(--text-color);
}
:root[data-theme-dark] .article-content h1,
:root[data-theme-dark] .article-content h2,
:root[data-theme-dark] .article-content h3,
:root[data-theme-dark] .article-content h4,
:root[data-theme-dark] .post-content h1,
:root[data-theme-dark] .post-content h2,
:root[data-theme-dark] .post-content h3 {
  color: var(--text-color);
}
:root[data-theme-dark] .article-content a,
:root[data-theme-dark] .post-content a,
:root[data-theme-dark] .page-content a {
  color: var(--accent-color);
}
:root[data-theme-dark] .article-content blockquote,
:root[data-theme-dark] .post-content blockquote {
  border-left-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 6%, transparent);
  color: var(--muted-color);
}
:root[data-theme-dark] .article-content code,
:root[data-theme-dark] .post-content code,
:root[data-theme-dark] .page-content code {
  background: color-mix(in srgb, var(--surface-color) 80%, transparent);
  color: var(--accent-color);
}
:root[data-theme-dark] .article-content pre,
:root[data-theme-dark] .post-content pre {
  background: color-mix(in srgb, var(--surface-color) 90%, transparent);
  border-color: var(--border-color);
}
:root[data-theme-dark] .tag,
:root[data-theme-dark] .badge,
:root[data-theme-dark] .meta-badge {
  background: color-mix(in srgb, var(--surface-color) 70%, transparent);
  border-color: var(--border-color);
  color: var(--muted-color);
}
:root[data-theme-dark] .section-title,
:root[data-theme-dark] .front-section-head h2,
:root[data-theme-dark] .front-section-head h3 {
  color: var(--text-color);
}
:root[data-theme-dark] .site-shell-header a,
:root[data-theme-dark] .site-nav a,
:root[data-theme-dark] .site-footer-links a {
  color: var(--text-color);
}
:root[data-theme-dark] .site-shell-header a:hover,
:root[data-theme-dark] .site-nav a:hover,
:root[data-theme-dark] .site-footer-links a:hover {
  color: var(--accent-color);
}
:root[data-theme-dark] .site-footer-copy,
:root[data-theme-dark] .site-footer-meta {
  color: var(--muted-color);
}
:root[data-theme-dark] .divider,
:root[data-theme-dark] hr {
  border-color: var(--border-color);
}
:root[data-theme-dark] ::selection {
  background: var(--accent-color);
  color: var(--bg-color);
}

/* ── Story page enhancements ──────────────────────────────────────────────── */
.story-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:4px}
.story-meta-sep{width:4px;height:4px;border-radius:50%;background:var(--muted-color);opacity:.4}
.story-meta-item{font-size:.84rem;color:var(--muted-color);display:inline-flex;align-items:center;gap:4px}
.story-meta-item::before{content:'';display:inline-block;width:12px;height:12px;background:var(--muted-color);opacity:.5;mask-size:contain;-webkit-mask-size:contain}
.story-summary{max-width:42rem;margin-top:12px;font-size:1rem;line-height:1.75;color:var(--muted-color)}
.story-content{display:grid;gap:1rem}
.story-content h1{font-size:2rem;margin:1.2rem 0 .6rem}
.story-content h2{font-size:1.6rem;margin:1rem 0 .5rem;padding-bottom:.4rem;border-bottom:1px solid var(--border-color)}
.story-content h3{font-size:1.3rem;margin:.8rem 0 .4rem}
.story-content h4,.story-content h5,.story-content h6{font-size:1.1rem;margin:.6rem 0 .3rem}
.story-content p{margin:0;max-width:44rem}
.story-content ul,.story-content ol{padding-left:1.5rem;margin:0;max-width:44rem}
.story-content li{margin-bottom:.3rem}
.story-content blockquote{margin:0;padding:.6rem 1rem;border-left:3px solid var(--accent-color);background:var(--front-alt,#f0f0f0);border-radius:0 8px 8px 0;max-width:44rem}
.story-content code{padding:.15rem .4rem;border-radius:4px;background:var(--front-alt,#f0f0f0);font-size:.88em}
.story-content pre{max-width:44rem;padding:1rem;border-radius:10px;background:var(--front-alt,#f0f0f0);overflow-x:auto}
.story-content pre code{padding:0;background:transparent;font-size:.85em;line-height:1.6}
.story-content img{max-width:100%;border-radius:10px;margin:.5rem 0}
.story-content table{width:100%;max-width:44rem;border-collapse:collapse;margin:.5rem 0}
.story-content th,.story-content td{padding:.5rem .8rem;border:1px solid var(--border-color);text-align:left}
.story-content th{background:var(--front-alt,#f0f0f0);font-weight:600}
.story-content hr{margin:1.5rem 0;border:none;border-top:1px solid var(--border-color);max-width:44rem}
.story-content a{color:var(--accent-color);text-decoration:underline;text-underline-offset:2px}
.story-nav-all{font-size:.88rem;color:var(--muted-color);text-align:center;white-space:nowrap}
.story-nav-label{display:block;font-size:.78rem;color:var(--muted-color);margin-bottom:2px}
.story-nav-title{display:block;font-size:.94rem;color:var(--text-color);font-weight:500;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.story-nav-prev,.story-nav-next{text-decoration:none;padding:8px 0;min-width:0}
.story-nav-prev:hover .story-nav-title,.story-nav-next:hover .story-nav-title{color:var(--accent-color)}
@media (max-width:768px){.story-nav{grid-template-columns:1fr}.story-nav-all{display:none}.story-nav-prev,.story-nav-next{padding:4px 0}}
