:root {
  --bg-top: #f7f8fe;
  --bg-bottom: #d6e6ff;
  --ink: #1d2b50;
  --primary: #2f67d6;
  --accent: #00a29a;
  --card: rgba(255, 255, 255, 0.85);
  --line: rgba(47, 103, 214, 0.18);
  --shadow: 0 25px 45px rgba(26, 64, 140, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: linear-gradient(155deg, var(--bg-top), var(--bg-bottom));
  position: relative;
}

.background-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(3px);
  pointer-events: none;
}

.shape-a {
  width: 44vw;
  height: 44vw;
  right: -10vw;
  top: -10vw;
  background: radial-gradient(circle at 40% 40%, rgba(0, 162, 154, 0.3), rgba(0, 162, 154, 0.05));
}

.shape-b {
  width: 35vw;
  height: 35vw;
  left: -8vw;
  bottom: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(47, 103, 214, 0.24), rgba(47, 103, 214, 0.04));
}

.page-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  margin-bottom: 1.2rem;
}

.hero-eyebrow {
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.06;
  font-weight: 900;
}

.hero-subtext {
  margin: 0.85rem auto 0;
  max-width: 760px;
  color: #344b78;
}

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
}

.section-head span {
  font-size: 0.9rem;
  color: #4d638f;
}

.sample-section {
  margin-bottom: 1rem;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.sample-item {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  min-height: 170px;
  cursor: pointer;
  background: #edf2ff;
}

.sample-item img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.sample-item:hover img {
  transform: scale(1.03);
}

.sample-item::after {
  content: attr(data-label);
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}

.sample-item.fallback {
  display: grid;
  place-items: center;
  color: #305694;
  border: 1px dashed rgba(48, 86, 148, 0.45);
  padding: 0.8rem;
  text-align: center;
}

.poster-form {
  display: grid;
  gap: 0.8rem;
}

.poster-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.poster-form textarea {
  width: 100%;
  border: 1px solid rgba(35, 75, 151, 0.2);
  border-radius: 13px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #ffffff;
  resize: vertical;
  min-height: 110px;
  max-height: 210px;
}

.poster-form input[type="file"] {
  width: 100%;
  border: 1px solid rgba(35, 75, 151, 0.2);
  border-radius: 13px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #ffffff;
}

.field-hint {
  font-size: 0.88rem;
  color: #4d638f;
  font-weight: 600;
}

.poster-form button {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(115deg, var(--primary), var(--accent));
  cursor: pointer;
  width: fit-content;
}

.poster-form button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.poster-form button:hover {
  transform: translateY(-1px);
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.form-status.pending {
  color: #47629b;
}

.form-status.success {
  color: #11795d;
}

.form-status.error {
  color: #ba3f57;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 34, 0.82);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-stage {
  width: min(1200px, 100%);
  height: min(82vh, 760px);
  position: relative;
}

.main-img {
  left: 50%;
  width: min(58vw, 620px);
  max-height: 82vh;
  opacity: 1;
  z-index: 3;
  cursor: pointer;
}

.side-img {
  width: min(28vw, 300px);
  max-height: 46vh;
  opacity: 0.48;
  filter: saturate(0.8);
  cursor: pointer;
}

.main-img,
.side-img,
.incoming-img {
  position: absolute;
  top: 50%;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transition:
    left 360ms cubic-bezier(0.22, 1, 0.36, 1),
    width 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 360ms ease;
}

.lightbox-stage.resetting .main-img,
.lightbox-stage.resetting .side-img,
.lightbox-stage.resetting .incoming-img {
  transition: none;
}

#mainImage {
  transform: translate(-50%, -50%) scale(1);
}

#sidePrev {
  left: 18%;
  transform: translate(-50%, -50%) scale(0.58);
  z-index: 1;
}

#sideNext {
  left: 82%;
  transform: translate(-50%, -50%) scale(0.58);
  z-index: 1;
}

#incomingImage {
  width: min(28vw, 300px);
  max-height: 46vh;
  opacity: 0;
  filter: saturate(0.8);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%) scale(0.42);
}

#incomingImage.incoming-next {
  left: 106%;
}

#incomingImage.incoming-prev {
  left: -6%;
}

.lightbox-stage.moving-next #mainImage {
  left: 18%;
  width: min(28vw, 300px);
  max-height: 46vh;
  opacity: 0.48;
  transform: translate(-50%, -50%) scale(0.58);
  filter: saturate(0.8);
  z-index: 2;
}

.lightbox-stage.moving-next #sideNext {
  left: 50%;
  width: min(58vw, 620px);
  max-height: 82vh;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: saturate(1);
  z-index: 3;
}

.lightbox-stage.moving-next #sidePrev {
  left: 6%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.42);
}

.lightbox-stage.moving-next #incomingImage {
  left: 82%;
  opacity: 0.48;
  transform: translate(-50%, -50%) scale(0.58);
}

.lightbox-stage.moving-prev #mainImage {
  left: 82%;
  width: min(28vw, 300px);
  max-height: 46vh;
  opacity: 0.48;
  transform: translate(-50%, -50%) scale(0.58);
  filter: saturate(0.8);
  z-index: 2;
}

.lightbox-stage.moving-prev #sidePrev {
  left: 50%;
  width: min(58vw, 620px);
  max-height: 82vh;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: saturate(1);
  z-index: 3;
}

.lightbox-stage.moving-prev #sideNext {
  left: 94%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.42);
}

.lightbox-stage.moving-prev #incomingImage {
  left: 18%;
  opacity: 0.48;
  transform: translate(-50%, -50%) scale(0.58);
}

.lightbox-arrow,
.lightbox-close {
  position: absolute;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  border-radius: 999px;
}

.lightbox-close {
  right: 20px;
  top: 16px;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.45rem;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.admin-body {
  overflow-x: hidden;
}

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

.admin-sidebar,
.admin-main {
  min-height: calc(100vh - 5rem);
}

.admin-heading {
  align-items: flex-start;
}

.admin-heading h1,
.admin-heading h2,
.admin-heading h3 {
  margin: 0;
}

.admin-caption {
  margin: 0 0 1rem;
  color: #4d638f;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sync-status {
  font-size: 0.88rem;
  color: #4d638f;
  font-weight: 700;
}

.sync-status[data-tone="error"] {
  color: #ba3f57;
}

.request-list {
  display: grid;
  gap: 0.75rem;
}

.request-list-empty,
.admin-empty {
  border: 1px dashed rgba(47, 103, 214, 0.35);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  padding: 1rem;
  color: #406091;
}

.request-card {
  border: 1px solid rgba(47, 103, 214, 0.16);
  background: #fff;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.request-card:hover,
.request-card.active {
  transform: translateY(-1px);
  border-color: rgba(47, 103, 214, 0.42);
  box-shadow: 0 14px 30px rgba(31, 66, 135, 0.12);
}

.request-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.request-card p,
.request-card small {
  margin: 0.4rem 0 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-submitted {
  background: rgba(47, 103, 214, 0.12);
  color: #2b5fc4;
}

.status-in_progress {
  background: rgba(233, 165, 0, 0.18);
  color: #8e5c00;
}

.status-done {
  background: rgba(17, 121, 93, 0.14);
  color: #11795d;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.detail-card {
  border: 1px solid rgba(47, 103, 214, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  padding: 1rem;
}

.detail-card h3,
.detail-card p {
  margin: 0;
}

.detail-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.detail-card p {
  color: #31476f;
  line-height: 1.65;
  white-space: pre-wrap;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.inline-field,
.admin-field {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

.inline-field select,
.admin-field textarea,
.admin-field input[type="file"] {
  width: 100%;
  border: 1px solid rgba(35, 75, 151, 0.2);
  border-radius: 13px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #ffffff;
}

.admin-field {
  margin-bottom: 1rem;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 0.82rem 1.15rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(115deg, var(--primary), var(--accent));
}

.ghost-button {
  border: 1px solid rgba(47, 103, 214, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.result-form {
  border-top: 1px solid rgba(47, 103, 214, 0.14);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.result-preview {
  border-top: 1px solid rgba(47, 103, 214, 0.14);
  margin-top: 1rem;
  padding-top: 1rem;
}

.result-message {
  margin: 0 0 1rem;
  color: #31476f;
  line-height: 1.65;
}

.result-image {
  width: min(460px, 100%);
  display: block;
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(24, 48, 99, 0.16);
}

.hidden {
  display: none !important;
}

@media (max-width: 1000px) {
  .sample-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar,
  .admin-main {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-wrap {
    width: min(1120px, calc(100% - 1rem));
    padding-top: 1.25rem;
  }

  .card {
    border-radius: 20px;
    padding: 1rem;
  }

  .sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .sample-item,
  .sample-item img {
    min-height: 130px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .lightbox-stage {
    height: min(74vh, 620px);
  }

  .side-img {
    max-height: 28vh;
    width: min(32vw, 220px);
  }

  .lightbox-arrow {
    width: 40px;
    height: 40px;
  }

  #sidePrev {
    left: 16%;
  }

  #sideNext {
    left: 84%;
  }

  .lightbox-stage.moving-next #mainImage {
    left: 16%;
    width: min(32vw, 220px);
  }

  .lightbox-stage.moving-next #sideNext {
    width: min(68vw, 420px);
  }

  .lightbox-stage.moving-prev #mainImage {
    left: 84%;
    width: min(32vw, 220px);
  }

  .lightbox-stage.moving-prev #sidePrev {
    width: min(68vw, 420px);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
