:root {
  color-scheme: light;
  --bg: #f6f8ff;
  --bg-soft: #ecf6ff;
  --card: rgba(255, 255, 255, 0.92);
  --text: #17324d;
  --muted: #607086;
  --line: rgba(23, 50, 77, 0.12);
  --primary: #195ec9;
  --primary-dark: #12438f;
  --accent: #ff6a3d;
  --accent-soft: #ffe3d9;
  --shadow: 0 24px 60px rgba(20, 56, 118, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(82, 170, 255, 0.24), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 179, 131, 0.22), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f1f7ff 45%, #edf4fb 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.church-logo {
  width: min(140px, 32vw);
  height: auto;
  display: block;
  flex-shrink: 0;
}

.topbar-brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.topbar h1,
.page-intro h2,
.hero-copy h2,
.poster-card h3 {
  margin: 0;
}

.topbar h1 {
  line-height: 1.1;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-btn,
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.nav-btn,
.secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
}

.primary {
  background: linear-gradient(135deg, var(--primary), #2d86f8);
  color: #fff;
  box-shadow: 0 14px 28px rgba(25, 94, 201, 0.24);
}

.nav-btn:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 24px;
  animation: fade-up 300ms ease;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.poster-card,
.card,
.cta-banner {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(24px, 4vw, 40px);
}

.hero-copy h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  max-width: 12ch;
}

.hero-copy p {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b33d15;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-card {
  padding: 22px;
  overflow: hidden;
}

.hero-art {
  position: relative;
  min-height: 290px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.88), transparent 20%),
    linear-gradient(180deg, #cbeeff 0%, #eff9ff 100%);
  overflow: hidden;
}

.cloud {
  position: absolute;
  width: 94px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  filter: drop-shadow(0 8px 18px rgba(23, 50, 77, 0.08));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 42px;
  height: 42px;
  left: 10px;
  top: -18px;
}

.cloud::after {
  width: 52px;
  height: 52px;
  right: 12px;
  top: -24px;
}

.cloud-a {
  top: 30px;
  left: 28px;
}

.cloud-b {
  top: 72px;
  right: 28px;
}

.card-stack {
  position: absolute;
  inset: auto 24px 26px 24px;
  display: grid;
  gap: 12px;
}

.stack-item {
  width: fit-content;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 18px 30px rgba(23, 50, 77, 0.15);
}

.stack-item.blue {
  background: #ecf5ff;
  color: #1356b0;
}

.stack-item.red {
  margin-left: 78px;
  background: #fff0ee;
  color: #d52d2d;
}

.stack-item.yellow {
  margin-left: 160px;
  background: #fff6d6;
  color: #b27c00;
}

.event-meta {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.event-meta div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(25, 94, 201, 0.07), rgba(255, 106, 61, 0.07));
}

.event-meta dt {
  font-size: 0.88rem;
  color: var(--muted);
}

.event-meta dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.poster-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr 0.75fr;
  gap: 20px;
}

.poster-card {
  padding: 20px;
}

.poster-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin-top: 14px;
}

.zoomable-image {
  cursor: zoom-in;
}

.poster-card-large img {
  aspect-ratio: 0.82;
  object-fit: cover;
}

.section-heading p,
.banner-label,
.result-kicker {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-heading h3,
.cta-banner h3 {
  margin: 0;
  font-size: 1.28rem;
}

.schedule-board {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.schedule-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #f6fbff;
  border: 1px solid rgba(25, 94, 201, 0.09);
}

.schedule-row span {
  color: var(--muted);
  flex-shrink: 0;
}

.schedule-row strong {
  text-align: right;
}

.schedule-row.highlight {
  background: linear-gradient(135deg, rgba(255, 106, 61, 0.1), rgba(255, 214, 201, 0.8));
  border-color: rgba(255, 106, 61, 0.2);
}

.placeholder-card {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  margin-top: 14px;
  padding: 22px;
  border-radius: 18px;
  border: 2px dashed rgba(25, 94, 201, 0.22);
  background:
    linear-gradient(135deg, rgba(25, 94, 201, 0.05), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(
      135deg,
      rgba(25, 94, 201, 0.02) 0,
      rgba(25, 94, 201, 0.02) 16px,
      rgba(255, 255, 255, 0.02) 16px,
      rgba(255, 255, 255, 0.02) 32px
    );
  color: var(--muted);
  text-align: center;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(25, 94, 201, 0.08);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.placeholder-card strong {
  color: var(--text);
  font-size: 1.05rem;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #113b7f 0%, #195ec9 48%, #2c8bff 100%);
  color: #fff;
}

.banner-action {
  background: #fff;
  color: var(--primary-dark);
}

.page-intro {
  padding: 8px 2px 0;
}

.page-intro p:last-child {
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.7;
}

.form-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}

.card {
  padding: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

label {
  display: grid;
  gap: 8px;
}

label > span {
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(23, 50, 77, 0.15);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(25, 94, 201, 0.5);
  box-shadow: 0 0 0 4px rgba(25, 94, 201, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  color: var(--muted);
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
  box-shadow: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.side-card h3,
.result-summary h3,
.request-panel h4,
.request-list h4 {
  margin-top: 0;
}

.side-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.info-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: #f7fbff;
  border: 1px solid rgba(25, 94, 201, 0.12);
}

.result-card {
  min-height: 280px;
}

.result-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  text-align: center;
  color: var(--muted);
}

.result-summary {
  display: grid;
  gap: 20px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.status-badge {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(25, 94, 201, 0.1);
  color: var(--primary-dark);
  font-weight: 800;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f7fbff;
  border: 1px solid rgba(25, 94, 201, 0.08);
}

.result-grid dt {
  margin-bottom: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.result-grid dd {
  margin: 0;
  font-weight: 700;
  white-space: pre-wrap;
}

.request-panel,
.request-list {
  padding-top: 6px;
  border-top: 1px solid rgba(23, 50, 77, 0.1);
}

.request-items {
  display: grid;
  gap: 12px;
}

.request-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f7fbff;
  border: 1px solid rgba(23, 50, 77, 0.08);
}

.request-item-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.request-status {
  font-size: 0.82rem;
  font-weight: 800;
  color: #b75b00;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(23, 50, 77, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 18px;
  background: #17324d;
  color: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 200ms ease;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}

.image-modal.open {
  display: flex;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 38, 0.72);
  backdrop-filter: blur(6px);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 980px);
  max-height: 92vh;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.image-modal-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 36px);
  object-fit: contain;
  border-radius: 16px;
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.92);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  z-index: 2;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .poster-grid,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-brand {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .hero-copy,
  .hero-card,
  .poster-card,
  .card,
  .cta-banner {
    border-radius: 22px;
  }

  .field-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .cta-banner,
  .form-actions,
  .result-head {
    flex-direction: column;
    align-items: stretch;
  }

  .image-modal-dialog {
    width: calc(100vw - 28px);
    padding: 12px;
  }

  .nav-btn,
  .primary,
  .secondary {
    width: 100%;
    text-align: center;
  }

  .topbar-brand {
    gap: 12px;
  }

  .church-logo {
    width: 108px;
  }

  .stack-item.red,
  .stack-item.yellow {
    margin-left: 0;
  }
}
