:root {
  --bg: #0b0f14;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.04);
  --text: #e8eef6;
  --muted: rgba(232,238,246,0.72);
  --border: rgba(255,255,255,0.12);
  --brand: #7dd3fc;
  --danger: #fb7185;

  --header-bg: rgba(11,15,20,0.7);
  --body-bg: radial-gradient(1200px 600px at 30% 0%, rgba(125,211,252,0.10), transparent 55%), var(--bg);
}

html[data-theme="light"] {
  --bg: #f7fafc;
  --panel: rgba(2,6,23,0.04);
  --panel2: rgba(2,6,23,0.03);
  --text: #0b1220;
  --muted: rgba(11,18,32,0.72);
  --border: rgba(2,6,23,0.14);
  --brand: #0284c7;
  --danger: #e11d48;

  --header-bg: rgba(247,250,252,0.75);
  --body-bg: radial-gradient(1200px 600px at 30% 0%, rgba(2,132,199,0.10), transparent 55%), var(--bg);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--body-bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 700; letter-spacing: 0.3px; }

.nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  width: 44px;
  height: 40px;
  padding: 0;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255,255,255,0.06); }
.nav-toggle-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  position: relative;
  opacity: 0.9;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.nav { display: flex; gap: 14px; align-items: center; }
.nav-right { display: flex; gap: 10px; align-items: center; }

.nav-link { color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); text-decoration: none; }
.nav-cta { color: var(--text); border: 1px solid var(--border); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { background: rgba(255,255,255,0.06); }
.theme-icon { opacity: 0.8; }
.theme-label { font-size: 13px; color: var(--muted); }

.footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { padding: 18px 24px; }

.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; padding: 12px 0 0; }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0; }
.lead { color: var(--muted); font-size: 18px; margin: 12px 0 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(125,211,252,0.45);
  background: rgba(125,211,252,0.12);
  color: var(--text);
  font-weight: 600;
}
.btn:hover { text-decoration: none; background: rgba(125,211,252,0.18); }
.btn.secondary { border-color: var(--border); background: rgba(255,255,255,0.04); }
.btn.small { padding: 7px 10px; border-radius: 10px; font-size: 13px; }
.btn.danger { border-color: rgba(251,113,133,0.5); background: rgba(251,113,133,0.10); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.card h3 { margin: 0 0 8px; }
.muted { color: var(--muted); }

.about-card { overflow: hidden; }
.about-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.prose p, .prose li { color: var(--muted); }
.prose h2 { margin-top: 0; }

.notice { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); margin: 14px 0; }
.notice.error { border-color: rgba(251,113,133,0.5); }

.object-card { padding: 0; overflow: hidden; }
.object-link { display: block; }
.object-media { height: 180px; background: var(--panel2); border-bottom: 1px solid var(--border); }
.object-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder { height: 100%; display: grid; place-items: center; color: rgba(232,238,246,0.35); }
.object-body { padding: 14px 16px; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); font-size: 12px; }

.object-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.back-row { margin-top: 16px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.gallery-item { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel2); }
.gallery img { width: 100%; height: 200px; object-fit: cover; display: block; }

.form { display: grid; gap: 12px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"], .field input[type="password"], .field input[type="file"], .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.field input[type="color"] {
  width: 48px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.alpha-picker {
  width: 120px;
}
.alpha-label {
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
}
.field textarea { resize: vertical; }
.field.checkbox label { font-weight: 600; display: inline-flex; gap: 10px; align-items: center; }

.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 10px; align-items: center; }

.design-panel { display: none; }
.design-panel.is-active { display: block; }

.table { display: grid; gap: 8px; }
.table-row { display: grid; grid-template-columns: 1.4fr 0.3fr 0.4fr 0.9fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); }
.table-head { font-weight: 700; color: var(--muted); background: transparent; border-color: transparent; padding-bottom: 0; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }

.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.image-item { display: block; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.03); }
.image-item input { display: block; margin: 10px; }
.image-item img { width: 100%; height: 120px; object-fit: cover; display: block; }

.slideshow { border: 1px solid var(--border); border-radius: 18px; background: var(--panel); overflow: hidden; }
.slideshow-frame { height: 320px; background: var(--panel2); position: relative; }
.slideshow-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slideshow-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.65)); }
.slideshow-overlay .title { font-weight: 700; }
.slideshow-overlay .cta { margin-top: 8px; display: inline-flex; }
.slideshow-meta { padding: 12px 14px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
}
.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
}
html[data-theme="light"] .cookie-banner-inner {
  background: rgba(255,255,255,0.85);
}
.cookie-actions { display: flex; gap: 10px; }

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav-group {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .js .nav-group { display: none; }
  .js .header.is-open .nav-group { display: flex; }

  .nav { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav-link { display: block; width: 100%; }
  .nav-right { justify-content: space-between; width: 100%; }
  .theme-label { display: none; }

  .admin-actions { flex-wrap: wrap; justify-content: flex-start; }

  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: repeat(2, 1fr); }
  .table-row { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .slideshow-frame { height: 240px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}
