:root {
  --ink: #171515;
  --muted: #6d6966;
  --line: #e7e2dc;
  --paper: #fffdf9;
  --canvas: #f3f0eb;
  --green: #1f6a49;
  --green-soft: #e8f4ed;
  --red: #a13f37;
  --red-soft: #f8eae8;
  --amber: #8b641f;
  --amber-soft: #faf1dc;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, Arial,
    sans-serif;
}

button,
input {
  font: inherit;
}

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

.site-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 40px 20px;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  opacity: 0.7;
  pointer-events: none;
}

.ambient-one {
  top: -22vw;
  right: -12vw;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, #e2d8ca 0%, transparent 70%);
}

.ambient-two {
  bottom: -28vw;
  left: -16vw;
  width: 56vw;
  height: 56vw;
  background: radial-gradient(circle, #ded8d0 0%, transparent 70%);
}

.lookup-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  overflow: hidden;
  border: 1px solid rgb(35 31 28 / 12%);
  border-radius: 32px;
  background: rgb(255 253 249 / 96%);
  box-shadow: 0 30px 90px rgb(44 38 32 / 12%);
}

.brand-header {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 36px;
  border-bottom: 1px solid var(--line);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 108px;
  height: auto;
  object-fit: contain;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #cfe1d6;
  border-radius: 999px;
  padding: 9px 13px;
  background: #f4faf6;
  color: #21563e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2b9a64;
  box-shadow: 0 0 0 5px rgb(43 154 100 / 12%);
}

.intro {
  padding: 56px 52px 30px;
}

.eyebrow {
  margin: 0 0 13px;
  color: #817a73;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 55px);
  font-weight: 790;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.intro-copy {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

.lookup-form {
  display: grid;
  gap: 10px;
  margin: 0 52px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgb(53 46 40 / 5%);
}

.lookup-form label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 750;
}

.lookup-form label:first-child {
  margin-top: 0;
}

.lookup-form input {
  width: 100%;
  height: 54px;
  border: 1px solid #d9d3cd;
  border-radius: 14px;
  outline: none;
  background: #fff;
  padding: 0 17px;
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.lookup-form input::placeholder {
  color: #aaa39d;
}

.lookup-form input:focus {
  border-color: #544e49;
  box-shadow: 0 0 0 4px rgb(42 38 35 / 8%);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row button {
  display: inline-flex;
  min-width: 174px;
  height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  padding: 0 22px;
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.search-row button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #322e2d;
}

.search-row button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgb(255 255 255 / 32%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-area {
  min-height: 24px;
  padding: 24px 52px 0;
}

.notice {
  display: grid;
  gap: 5px;
  border-radius: 18px;
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.6;
}

.notice strong {
  font-size: 15px;
}

.notice.waiting {
  border: 1px solid #ead8ad;
  background: var(--amber-soft);
  color: var(--amber);
}

.notice.error {
  border: 1px solid #edcac6;
  background: var(--red-soft);
  color: var(--red);
}

.notice.empty {
  border: 1px solid var(--line);
  background: #f8f6f2;
  color: #625d58;
}

.results {
  display: grid;
  gap: 18px;
}

.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 4px 2px 0;
}

.result-vendor {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-heading h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.lookup-meta {
  display: grid;
  gap: 4px;
  color: #827b75;
  font-size: 11px;
  text-align: right;
}

.result-list {
  display: grid;
  gap: 10px;
}

.stock-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.stock-copy {
  min-width: 0;
  padding: 20px 22px;
}

.stock-copy h3 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.stock-copy dl {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin: 0;
}

.stock-copy dl div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.stock-copy dt {
  color: #938c86;
  font-size: 10px;
  font-weight: 700;
}

.stock-copy dd {
  min-width: 0;
  margin: 0;
  color: #5f5954;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.stock-state {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  border-left: 1px solid;
  text-align: center;
}

.stock-state .state-label {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.25;
  white-space: nowrap;
}

.stock-card.available .stock-state {
  border-color: #cfe4d7;
  background: var(--green-soft);
  color: var(--green);
}

.stock-card.unavailable .stock-state {
  border-color: #ecd0cd;
  background: var(--red-soft);
  color: var(--red);
}

.lookup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 38px;
  padding: 24px 52px 28px;
  border-top: 1px solid var(--line);
  color: #817a73;
  font-size: 11px;
  line-height: 1.6;
}

.lookup-footer p {
  max-width: 580px;
  margin: 0;
}

.lookup-footer a {
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .site-shell {
    display: block;
    padding: 0;
  }

  .lookup-panel {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-header {
    min-height: 78px;
    padding: 17px 20px;
  }

  .brand-logo {
    width: 92px;
  }

  .service-badge {
    gap: 7px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .intro {
    padding: 40px 22px 24px;
  }

  .intro h1 {
    font-size: 36px;
  }

  .intro-copy {
    font-size: 14px;
  }

  .lookup-form {
    margin: 0 16px;
    padding: 20px;
    border-radius: 20px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }

  .status-area {
    padding: 20px 16px 0;
  }

  .result-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .lookup-meta {
    text-align: left;
  }

  .stock-card {
    grid-template-columns: minmax(0, 1fr) 94px;
  }

  .stock-copy {
    padding: 17px;
  }

  .stock-copy dl {
    display: grid;
  }

  .stock-copy dl div {
    display: grid;
    gap: 2px;
  }

  .lookup-footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 28px;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
