/* Generated from q7r8s2t4.scss (runtime CSS served by app) */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --line: #dde3ea;
  --line-strong: #c5cfda;
  --ink: #0f1c2b;
  --ink-2: #3f4f63;
  --ink-3: #5a6a7e;
  --accent: #1e5aa8;
  --accent-hover: #174a8c;
  --accent-soft: #e6eef9;
  --accent-ink: #143f7a;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(30, 90, 168, 0.45);
  outline-offset: 2px;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}
@media (max-width: 520px) {
  .container {
    width: calc(100% - 32px);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  flex: none;
}

.title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.admin-link:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.page {
  flex: 1;
  padding-block: 40px 56px;
}
@media (max-width: 520px) {
  .page {
    padding-block: 24px 40px;
  }
}

.intro {
  margin-bottom: 28px;
  max-width: 720px;
}

.tagline {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

.controls {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 28, 43, 0.06);
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search {
  position: relative;
  flex: 1 1 320px;
}
.search .field {
  width: 100%;
  padding-left: 40px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.field {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}
.field::placeholder {
  color: var(--ink-3);
}
.field:hover {
  border-color: #a7b4c3;
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 90, 168, 0.18);
}

.select {
  appearance: none;
  padding-right: 36px;
  min-width: 120px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235a6a7e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn-ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 4px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  color: var(--ink-3);
  font-size: 0.85rem;
}
.meta b {
  color: var(--ink-2);
  font-weight: 600;
}
.meta .status-ok {
  color: var(--accent-ink);
}
.meta .status-error {
  color: var(--danger);
}

.notice {
  margin: 16px 0 24px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 0.85rem;
  word-break: keep-all;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 20px;
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@keyframes ng-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 28, 43, 0.06);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  animation: ng-rise 0.32s ease both;
  animation-delay: calc(var(--i, 0) * 30ms);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(15, 28, 43, 0.08);
  transform: translateY(-2px);
}
.card:hover .card-media img {
  transform: scale(1.03);
}

.card-media {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.item-id {
  color: var(--ink-3);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.price-block {
  display: grid;
  gap: 2px;
}
.price-block p {
  margin: 0;
}

.price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.discount-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.price-original {
  color: var(--ink-3);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.price-lowest {
  color: var(--ink-2);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.price-lowest.is-best {
  color: var(--accent-ink);
  font-weight: 600;
}
.price-lowest .muted-dot {
  color: var(--ink-3);
}

.ledger-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 28, 43, 0.06);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.ledger th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ledger td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.ledger tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
  animation: ng-rise 0.28s ease both;
  animation-delay: calc(var(--i, 0) * 25ms);
}
.ledger tbody tr:last-child td {
  border-bottom: 0;
}
.ledger tbody tr:hover {
  background: #f8fafc;
}
.ledger .col-id {
  width: 92px;
}
.ledger .col-img {
  width: 96px;
}
.ledger .col-name {
  font-weight: 500;
}
.ledger .col-price {
  width: 230px;
}
.ledger .col-actions {
  width: 220px;
}
.ledger .price-current {
  font-size: 1.05rem;
}

.mini {
  display: block;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

@media (max-width: 760px) {
  .ledger thead {
    display: none;
  }
  .ledger tbody, .ledger tr, .ledger td {
    display: block;
  }
  .ledger tbody tr {
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-areas: "img name" "img price" "id actions";
    gap: 6px 14px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }
  .ledger tbody tr:last-child {
    border-bottom: 0;
  }
  .ledger td {
    padding: 0;
    border: 0;
    width: auto !important;
  }
  .ledger .col-img {
    grid-area: img;
  }
  .ledger .col-name {
    grid-area: name;
  }
  .ledger .col-price {
    grid-area: price;
  }
  .ledger .col-id {
    grid-area: id;
    align-self: center;
  }
  .ledger .col-actions {
    grid-area: actions;
  }
  .ledger .col-actions .actions {
    justify-content: flex-start;
  }
}
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.empty .btn {
  margin-top: 10px;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 4px;
}

.empty-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.empty-body {
  margin: 0;
  max-width: 420px;
  color: var(--ink-2);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 20px;
}

.footer-note {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .controls {
    padding: 12px;
  }
  .search {
    flex-basis: 100%;
  }
  .select-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
  .select-wrap .select {
    width: 100%;
    min-width: 0;
    padding-left: 12px;
    padding-right: 32px;
    background-position: right 12px center;
  }
  .btn#refresh {
    flex: 0 0 auto;
    padding: 0 16px;
  }
  .card-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
