:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6b76;
  --line: #e3e6ea;
  --accent: #1f7a4d;
  --accent-dark: #17633e;
  --accent-soft: #e8f3ed;
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; }

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

svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layout */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

/* Header */

.head { margin-bottom: 18px; }

h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.loc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.loc svg { width: 18px; height: 18px; color: var(--accent); }

/* Gallery */

.stage {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #e7eaee;
  border-radius: var(--radius);
  overflow: hidden;
}

.stage-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.stage-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stage-link img.cover { object-fit: cover; }

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.15s;
}

.nav:hover { background: #fff; }
.nav svg { width: 22px; height: 22px; stroke-width: 2.2; }
.nav.prev { left: 12px; }
.nav.next { right: 12px; }

.count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}

.thumbs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: -2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.thumb:hover,
.thumb.is-active { opacity: 1; }
.thumb.is-active { outline-color: var(--accent); }

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

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.desc {
  margin-top: 24px;
  padding: 28px 32px 32px;
}

h2 {
  margin: 0 0 22px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

h3 {
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 + h3 { margin-top: 0; }

.desc p { margin: 0; }

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

.list li {
  position: relative;
  padding-left: 22px;
  margin: 6px 0;
}

.list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.plot-no {
  margin-top: 28px !important;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Video */

.video { margin-top: 28px; }

.video-label {
  margin: 0 0 10px !important;
  font-weight: 600;
}

.yt {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.yt-poster,
.yt iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

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

.play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, background 0.15s;
}

.play svg {
  width: 40px;
  height: 40px;
  margin-left: 3px;
  fill: currentColor;
  stroke: none;
}

.yt-poster:hover .play {
  background: var(--accent-dark);
  transform: scale(1.06);
}

/* Contact */

.side {
  position: sticky;
  top: 24px;
}

.contact { padding: 24px; }

.contact-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 0.15s, color 0.15s;
}

.btn + .btn { margin-top: 10px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline {
  background: #fff;
  color: var(--accent);
}

.btn-outline:hover { background: var(--accent-soft); }

.contact .btn-outline { font-size: 15px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile contact bar */

.mbar { display: none; }

/* Lightbox */

.lb {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 16, 18, 0.97);
  color: #fff;
  overflow: hidden;
}

.lb::backdrop { background: rgba(14, 16, 18, 0.97); }

.lb-img {
  position: absolute;
  top: 60px;
  left: 72px;
  width: calc(100% - 144px);
  height: calc(100% - 120px);
  object-fit: contain;
}

.lb-n {
  position: absolute;
  top: 18px;
  left: 22px;
  font-size: 15px;
  opacity: 0.85;
}

.lb-close {
  position: absolute;
  top: 8px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.lb-close svg { width: 26px; height: 26px; }

.lb .nav {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.lb .nav:hover { background: rgba(255, 255, 255, 0.24); }

.lb button:focus-visible { outline-color: rgba(255, 255, 255, 0.6); }

/* Responsive */

@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .side {
    position: static;
    margin-top: 24px;
  }

  body { padding-bottom: 76px; }

  .mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .mbar .btn { min-height: 48px; }
  .mbar .btn + .btn { margin-top: 0; }
}

@media (max-width: 640px) {
  .page { padding: 20px 0 32px; }

  .head { padding: 0 16px; }

  h1 { font-size: 26px; }

  .stage { border-radius: 0; }

  .nav { width: 38px; height: 38px; }
  .nav.prev { left: 8px; }
  .nav.next { right: 8px; }

  .thumbs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    overflow-x: auto;
    padding: 0 16px 2px;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }

  .thumbs::-webkit-scrollbar { display: none; }

  .card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .desc { padding: 24px 18px 28px; }
  .contact { padding: 22px 18px; }

  h2 { font-size: 20px; }

  .lb-img {
    left: 0;
    width: 100%;
  }

  .lb .nav {
    top: auto;
    bottom: 10px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
