@import url('fonts.css');

:root {
  --color-green: #848D15;
  --color-green-dark: #818E00;
  --color-pink: #A46497;
  --color-text: #111111;
  --color-text-muted: #4A4A4A;
  --color-bg: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-wall: #1A1A1A;
  --color-border: #EAEAEA;
  --font: 'Maven Pro', system-ui, sans-serif;
  --header-height: 72px;
  --logo-height: 20px;
  --radius-card: 24px;
  --radius-button: 5px;
}

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

html {
  font-size: 93.75%;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--color-pink);
}

/* —— Header —— */

.site-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: var(--header-height);
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.page-home .header-left {
  flex: 1 1 auto;
  min-width: 0;
}

.page-home .header-disclaimer {
  margin: 0;
  flex: 1 1 8rem;
  min-width: 0;
  max-width: 26rem;
  font-size: calc(0.62rem + 1px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-text-muted);
}

.logo {
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: var(--logo-height);
  width: auto;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  min-width: 0;
}

.header-stat strong {
  font-weight: 800;
}

.header-sep {
  color: var(--color-text-muted);
  font-weight: 400;
}

.header-countdown {
  font-weight: 500;
  color: var(--color-text-muted);
}

.btn-primary {
  display: inline-block;
  background: var(--color-green);
  color: #fff;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  border-radius: var(--radius-button);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--color-green-dark);
  color: #fff;
}

.header-upload-wrap .btn-header {
  margin-left: 0;
}

.header-upload-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.15rem;
  position: relative;
}

.upload-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.upload-help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.7rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}

.upload-help-trigger:hover,
.upload-help.is-pinned .upload-help-trigger {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.upload-help-popover {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 200;
  width: min(17.5rem, calc(100vw - 2rem));
  padding: 0.65rem 0.85rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: left;
}

.upload-help-popover[hidden] {
  display: none;
}

.upload-help-close {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.upload-help-close:hover {
  color: var(--color-text);
}

.upload-help-close[hidden] {
  display: none;
}

.upload-help-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
}

.upload-help-list li + li {
  margin-top: 0.35rem;
}

.upload-help-url {
  color: var(--color-text);
  font-weight: 500;
  word-break: break-all;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  color: var(--color-pink);
  border-color: var(--color-pink);
}

.form-error {
  color: #b00020;
  font-weight: 500;
}

.form-success {
  color: var(--color-green-dark);
  font-weight: 600;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.upload-note {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.upload-label span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--color-text);
}

.upload-label input[type="file"] {
  width: 100%;
}

.upload-file-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.35rem 0.35rem 0.35rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-surface);
}

.upload-file-picker-name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-file-picker-btn {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
}

.upload-file-picker-btn:hover {
  color: var(--color-pink);
  border-color: var(--color-pink);
}

.upload-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  cursor: pointer;
}

.upload-consent input {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.upload-consent-link {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-consent-link:hover {
  color: var(--color-pink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fan-status {
  font-size: 1.1rem;
  font-weight: 600;
}

.fan-status-approved {
  color: var(--color-green-dark);
}

.insta-section {
  margin: 2rem 0;
}

#insta-canvas {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  margin: 1rem 0;
}

.fan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.insta-share-hint {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.fan-downloads {
  margin: 2rem 0 1rem;
}

.admin-page .admin-item {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.admin-item img {
  width: 256px;
  height: 256px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--color-wall);
}

.admin-item h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-queue-more {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #fff8e6;
  border: 1px solid #e6d9a8;
  border-radius: 8px;
  font-size: 0.95rem;
}

.admin-bulk-form {
  margin: 0;
}

.admin-bulk-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.admin-bulk-choice legend {
  padding: 0;
}

.admin-bulk-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-bulk-option--approve {
  color: var(--color-primary, #6b7c0f);
}

.admin-bulk-option--reject {
  color: #8b3a3a;
}

.admin-bulk-option--skip {
  color: var(--color-text-muted);
  font-weight: 500;
}

.admin-bulk-submit {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--color-border);
}

.admin-bulk-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.visually-hidden {
  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: 640px) {
  .admin-page .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item img {
    width: 100%;
    max-width: 320px;
  }
}

.header-center-empty {
  display: none;
}

/* Hamburger */

.header-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: var(--color-green);
  cursor: pointer;
  position: relative;
  z-index: 111;
}

.menu-toggle:hover {
  background: var(--color-green-dark);
}

.menu-toggle-bar {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 1px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.menu-toggle-bar {
  transition: transform 0.2s, opacity 0.2s;
}

.site-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 0.5rem 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 110;
}

.site-menu[hidden] {
  display: none;
}

.site-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-menu a:hover {
  background: var(--color-bg);
}

/* —— Home: viewport-filling wall —— */

.page-home .site-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.home-noscript {
  margin: 1rem;
  max-width: 42rem;
}

.wall-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: var(--color-wall);
  overflow: hidden;
  position: relative;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-label textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
}

.insta-format-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.insta-format-toggle .is-active {
  border-color: var(--color-green);
  color: var(--color-green-dark);
}

.mod-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.mod-badge-approve {
  background: #e8f5e9;
  color: #2e7d32;
}

.mod-badge-review {
  background: #fff8e1;
  color: #f57f17;
}

.mod-badge-reject {
  background: #ffebee;
  color: #c62828;
}

.mod-flags {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.mod-consent {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.admin-tools {
  font-size: 0.9rem;
}

.admin-tools a {
  font-weight: 600;
}

.admin-breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.admin-hub-section {
  margin: 2rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.admin-hub-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.admin-hub-note,
.admin-hub-meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.admin-traffic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.admin-traffic-stat {
  flex: 1 1 120px;
  padding: 1rem;
  background: var(--color-bg-subtle, #f5f7fa);
  border-radius: 10px;
  text-align: center;
}

.admin-traffic-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-traffic-stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.admin-traffic-table {
  width: 100%;
  max-width: 280px;
  border-collapse: collapse;
  margin: 0 0 0.5rem;
}

.admin-traffic-table th,
.admin-traffic-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-traffic-table th:last-child,
.admin-traffic-table td:last-child {
  text-align: right;
}

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

.admin-hub-links li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.admin-hub-links a {
  font-weight: 700;
}

.admin-hub-link-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.wall-viewer {
  width: 100%;
  height: 100%;
  background: var(--color-wall);
}

.wall-viewer .openseadragon-container,
.wall-viewer .openseadragon-canvas {
  background: var(--color-wall) !important;
}

.wall-viewer .openseadragon-container {
  width: 100% !important;
  height: 100% !important;
}

.wall-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  touch-action: none;
}


.wall-image:not([hidden]) + .wall-placeholder {
  display: none;
}

.wall-placeholder {
  color: #666;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

/* —— Subpages (Impressum etc.) —— */

body.page-sub {
  overflow: auto;
  display: block;
}

body.page-sub .site-header {
  grid-template-columns: auto 1fr;
}

body.page-sub .header-center {
  display: none;
}

body.page-sub .site-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.page-card {
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-card);
}

.page-card h1 {
  color: var(--color-text);
  font-weight: 600;
  margin-top: 0;
}

.page-prose h2 {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.page-prose h2:first-of-type {
  margin-top: 1.5rem;
}

.page-prose p {
  margin: 0 0 1rem;
}

.page-prose .legal-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.page-prose .btn-primary {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  text-decoration: none;
}

.btn-mobile-break {
  display: none;
}

.steps-list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.steps-list li {
  margin-bottom: 0.5rem;
}

.page-tagline {
  font-weight: 600;
  color: var(--color-text);
  font-size: 1.05rem;
}

.page-claim {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-green);
  background: var(--color-bg);
  border-radius: 0 var(--radius-button) var(--radius-button) 0;
}

.page-claim p {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.6;
}

.page-signoff {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* —— Mobile —— */

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .header-left {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    justify-content: space-between;
  }

  .page-home .header-left {
    flex-wrap: wrap;
    row-gap: 0.35rem;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
  }

  .page-home .header-center {
    position: relative;
    z-index: 1;
  }

  .page-home .header-menu-wrap {
    margin-left: auto;
  }

  .page-home .header-disclaimer {
    flex: 1 1 100%;
    order: 3;
    max-width: none;
    padding-left: calc(22px + 0.5rem);
  }

  .logo img {
    height: 22px;
  }

  .header-center {
    grid-column: 1;
    grid-row: 2;
    justify-content: center;
    padding-bottom: 0.25rem;
  }

  :root {
    --header-height: auto;
  }
}

@media (max-width: 520px) {
  .page-home .header-disclaimer {
    padding-left: 0;
    font-size: calc(0.58rem + 1px);
  }

  .header-sep {
    display: none;
  }

  .header-center {
    flex-direction: column;
    gap: 0.35rem;
  }

  .btn-header {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 87.5%;
  }

  body.page-sub .site-main {
    max-width: none;
    padding: 0 0 1.5rem;
  }

  body.page-sub .page-card {
    padding: 1.25rem 1rem 1.5rem;
    border-radius: 0;
  }

  body.page-sub .page-prose h2 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
  }

  .upload-consent {
    font-size: 0.75rem;
    line-height: 1.35;
    gap: 0.4rem;
  }

  .upload-consent input {
    margin-top: 0.12rem;
  }

  .btn-mobile-break {
    display: revert;
  }

  .page-prose .btn-primary {
    white-space: normal;
    text-align: center;
    max-width: 100%;
    line-height: 1.35;
  }
}
