:root {
  --parchment: #f1e2bf;
  --parchment-dark: #e0cfa8;
  --ink: #3f2e1b;
  --ink-soft: #5f4a33;
  --accent: #7a4e22;
  --ornament: #b6905f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 6%, rgba(122,78,34,0.12) 0 40px, transparent 42px),
    radial-gradient(circle at 95% 6%, rgba(122,78,34,0.12) 0 34px, transparent 36px),
    radial-gradient(circle at 5% 94%, rgba(122,78,34,0.12) 0 40px, transparent 42px),
    radial-gradient(circle at 95% 94%, rgba(122,78,34,0.12) 0 34px, transparent 36px),
    repeating-linear-gradient(0deg, rgba(100,70,40,0.03), rgba(100,70,40,0.03) 2px, transparent 2px, transparent 5px),
    var(--parchment);
  min-height: 100vh;
}

.page {
  width: min(1000px, 92vw);
  margin: 2rem auto;
  padding: 2rem;
  background: linear-gradient(170deg, #f6e9c9, var(--parchment-dark));
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(30, 18, 7, 0.25);
  position: relative;
}

.parchment-frame {
  border: 6px double var(--ornament);
  outline: 2px solid rgba(122, 78, 34, 0.5);
  outline-offset: -12px;
}

.parchment-frame::before,
.parchment-frame::after {
  content: "✶ ⚄";
  position: absolute;
  color: rgba(80, 45, 12, 0.45);
  font-size: 1.5rem;
}

.parchment-frame::before { top: 0.8rem; left: 1rem; }
.parchment-frame::after { right: 1rem; bottom: 0.8rem; }

h1, h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.04em;
}

.hero { text-align: center; margin-bottom: 1.8rem; }
.banner {
  width: min(100%, 880px);
  height: auto;
  border: 2px solid rgba(122, 78, 34, 0.35);
  border-radius: 8px;
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.subtitle { color: var(--ink-soft); margin-top: 0.4rem; }
.compact { margin-bottom: 1rem; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.link-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 248, 230, 0.7);
  border: 2px solid rgba(122, 78, 34, 0.4);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(50, 30, 10, 0.18);
}

.poster-wrap { text-align: center; }
.poster {
  max-width: 100%;
  width: min(900px, 100%);
  max-height: 70vh;
  object-fit: contain;
  border: 3px solid rgba(90, 50, 20, 0.4);
  background: #fdf8ea;
}

.content-panel { display: grid; gap: 1rem; }
.image-block h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.content-image {
  width: 100%;
  height: auto;
  border: 2px solid rgba(90, 50, 20, 0.35);
  border-radius: 8px;
  background: #fdf8ea;
}

.actions { text-align: center; margin-top: 1rem; }
.btn {
  border: 2px solid rgba(122, 78, 34, 0.5);
  background: #fdf6e4;
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.footer-note { text-align: right; margin-top: 1.4rem; }
.footer-note a { color: var(--accent); }

.panel {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 250, 238, 0.65);
  padding: 1rem;
  border: 2px solid rgba(122, 78, 34, 0.35);
  border-radius: 10px;
}

label, input { display: block; width: 100%; }
input {
  margin: 0.5rem 0 0.8rem;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #a47d49;
}

.toggle-list { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(122, 78, 34, 0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.45);
}

.error { color: #8a2d2d; min-height: 1.3rem; }
.hidden { display: none; }
