:root {
  color-scheme: light;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #17211d;
  background: #e9efeb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(140, 180, 158, 0.35), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(222, 185, 121, 0.24), transparent 28%),
    #e9efeb;
}

button,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 34px;
  border: 1px solid rgba(28, 50, 40, 0.1);
  border-radius: 30px;
  background: rgba(249, 250, 247, 0.86);
  box-shadow: 0 24px 70px rgba(45, 68, 57, 0.1);
  backdrop-filter: blur(16px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #51715f;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: #5e6d65;
  line-height: 1.7;
}

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

.primary-button,
.auto-capture-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.primary-button {
  background: #204f3a;
  color: #fff;
  box-shadow: 0 12px 28px rgba(32, 79, 58, 0.2);
}

.auto-capture-button {
  width: 100%;
  background: #b6542f;
  color: #fff;
  box-shadow: 0 12px 28px rgba(151, 64, 32, 0.2);
}

.secondary-button {
  border: 1px solid rgba(32, 79, 58, 0.16);
  background: #f4f6f2;
  color: #294739;
}

.primary-button:hover,
.auto-capture-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.auto-capture-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

main {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.panel {
  padding: 26px;
  border: 1px solid rgba(28, 50, 40, 0.1);
  border-radius: 26px;
  background: rgba(249, 250, 247, 0.92);
  box-shadow: 0 18px 50px rgba(45, 68, 57, 0.08);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.status-summary,
.gallery-count {
  padding: 8px 12px;
  border-radius: 999px;
  background: #e4ece7;
  color: #3e5e4c;
  font-size: 0.84rem;
  font-weight: 800;
}

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

.camera-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(28, 50, 40, 0.1);
  background: #fff;
}

.camera-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.camera-card strong {
  font-size: 1rem;
}

.camera-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
  color: #637168;
  font-size: 0.84rem;
}

.camera-card dt {
  font-weight: 700;
}

.camera-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.connection-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.connection-badge.online {
  background: #dff2e5;
  color: #21713f;
}

.connection-badge.offline {
  background: #f7dfdc;
  color: #9a4038;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.5fr);
  gap: 22px;
}

.capture-form {
  display: grid;
  gap: 16px;
}

.capture-form label {
  display: grid;
  gap: 8px;
  color: #526158;
  font-size: 0.88rem;
  font-weight: 800;
}

.capture-form select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(28, 50, 40, 0.16);
  border-radius: 15px;
  background: #fff;
  color: #17211d;
}

.capture-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.auto-capture-card {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(28, 50, 40, 0.12);
}

.auto-capture-card strong {
  color: #293f34;
}

.auto-capture-card p {
  margin: 6px 0 0;
  color: #6a756f;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
}

.danger-button {
  border-color: rgba(153, 55, 45, 0.22);
  color: #963c34;
}

.auto-capture-progress {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #f5ece6;
  color: #704534;
}

.auto-capture-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.79rem;
}

.auto-capture-progress > div span {
  min-width: 0;
  line-height: 1.4;
}

.auto-capture-progress > div strong {
  flex: 0 0 auto;
  color: #704534;
}

.auto-capture-progress progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e4d4ca;
  accent-color: #b6542f;
}

.auto-capture-progress progress::-webkit-progress-bar {
  background: #e4d4ca;
}

.auto-capture-progress progress::-webkit-progress-value {
  background: #b6542f;
}

.package-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  background: #e0eee5;
  color: #23603f;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.operation-message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #edf2ee;
  color: #57675e;
  font-size: 0.88rem;
  line-height: 1.55;
}

.operation-message.success {
  background: #e2f2e6;
  color: #286843;
}

.operation-message.error {
  background: #f8e5e2;
  color: #983e37;
}

.preview-empty,
.gallery-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed rgba(28, 50, 40, 0.18);
  border-radius: 20px;
  color: #7b8780;
  text-align: center;
}

.preview-figure {
  margin: 0;
}

.preview-figure img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 20px;
  background: #101612;
}

.preview-figure figcaption {
  margin-top: 12px;
  color: #66736c;
  font-size: 0.86rem;
}

.text-link {
  color: #276146;
  font-size: 0.88rem;
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(28, 50, 40, 0.1);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: rgba(32, 79, 58, 0.4);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #101612;
}

.gallery-item strong,
.gallery-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-item strong {
  font-size: 0.86rem;
}

.gallery-item span {
  color: #718078;
  font-size: 0.76rem;
}

.hidden {
  display: none !important;
}

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

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

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    padding-top: 10px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .camera-status-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
