:root {
  --bg-primary: #f5f5f7;
  --bg-elevated: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --line-subtle: #d2d2d7;
  --accent-primary: #0071e3;
  --accent-press: #0062c4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.wrap { max-width: 980px; margin: 0 auto; padding: 20px; }
.topbar { position: sticky; top: 0; backdrop-filter: blur(8px); background: rgba(245,245,247,.75); border-bottom: 1px solid var(--line-subtle); z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.topbar-actions { align-items: center; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin: 0;
}
.logo-icon {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.hero h2 { margin: 6px 0; font-size: 32px; line-height: 1.25; }
.hero p { color: var(--text-secondary); margin: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-primary); font-weight: 700; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.auth-grid { display: grid; gap: 10px; }
.auth-actions { display: grid; gap: 10px; }
.auth-full { width: 100%; }
.signup-id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.id-check-btn {
  min-width: 92px;
  white-space: nowrap;
}
.auth-help {
  margin: -2px 0 2px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}
.auth-help.ok { color: #067a3d; }
.auth-help.error { color: #b42318; }
.naver-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.naver-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #03c75a;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
}
.naver-sdk-login-mount {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.account-menu {
  position: relative;
}
.account-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(320px, 52vw);
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.account-menu-btn:hover,
.account-menu-btn[aria-expanded="true"] {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.12);
}
.account-menu-btn span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-chevron {
  flex: 0 0 auto;
  color: var(--text-secondary);
  transform: rotate(90deg);
  transition: transform 140ms ease;
}
.account-menu-btn[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(-90deg);
}
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}
.account-dropdown button {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.account-dropdown button:hover {
  background: #f3f7ff;
  color: var(--accent-primary);
}
.toast-region {
  position: fixed;
  top: 74px;
  right: max(16px, calc((100vw - 980px) / 2 + 20px));
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  padding: 12px 14px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.auth-link-row { display: flex; justify-content: flex-end; }
.auth-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent-primary);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--accent-press); }
.auth-step-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e7e9ee;
  border-radius: 12px;
  background: #fbfcff;
}
.auth-step-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #3a4a5f;
}
.auth-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.auth-consent-check input {
  margin-top: 4px;
  width: auto;
  padding: 0;
}
.auth-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-inline-check input {
  width: auto;
  padding: 0;
}
.password-tooltip-wrap {
  position: relative;
}
.password-eye-wrap {
  position: relative;
}
.password-eye-wrap input {
  padding-right: 42px;
}
.password-peek-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #1f2937;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.password-peek-btn svg {
  width: 20px;
  height: 20px;
}
.password-peek-btn svg path,
.password-peek-btn svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-peek-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
  border-radius: 6px;
}
.password-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: min(360px, 42vw);
  padding: 10px;
  border: 1px solid #d7dce4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  z-index: 20;
}
.password-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-left: 1px solid #d7dce4;
  border-bottom: 1px solid #d7dce4;
  background: #fff;
}
.password-checklist {
  margin: 2px 0 0;
  padding: 10px 12px;
  border: 1px solid #e7e9ee;
  border-radius: 10px;
  background: #fff;
  list-style: none;
  display: grid;
  gap: 6px;
}
.password-checklist li {
  position: relative;
  padding-left: 20px;
  font-size: 12px;
  color: #6e6e73;
}
.password-checklist li::before {
  content: '◻';
  position: absolute;
  left: 0;
  top: 0;
  color: #9aa0a6;
}
.password-checklist li.ok {
  color: #067a3d;
}
.password-checklist li.ok::before {
  content: '☑';
  color: #067a3d;
}
.password-checklist li.error {
  color: #b42318;
}
.password-checklist li.error::before {
  content: '☒';
  color: #b42318;
}
label { display: grid; gap: 6px; font-size: 13px; color: var(--text-secondary); }
input,
select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-subtle);
  font-size: 15px;
  background: #fff;
}
input:focus,
select:focus { outline: 2px solid rgba(0,113,227,.25); border-color: var(--accent-primary); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-step1-actions,
.auth-step-actions {
  justify-content: center;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--accent-primary);
  color: white;
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
}
.btn:hover { background: var(--accent-press); }
.btn.ghost { background: #fff; color: var(--text-primary); border: 1px solid var(--line-subtle); }
.msg { min-height: 20px; color: #0a66c2; font-size: 14px; }
.hint { color: var(--text-secondary); font-size: 14px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.advanced-settings {
  color: var(--text-secondary);
}
.advanced-settings summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 0;
  cursor: pointer;
  color: #777b83;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  user-select: none;
  transition: color 140ms ease;
}
.advanced-settings summary::-webkit-details-marker {
  display: none;
}
.advanced-settings summary::before {
  content: '›';
  font-size: 12px;
  transform: rotate(0deg);
  transition: transform 140ms ease;
}
.advanced-settings summary:hover {
  color: var(--text-primary);
}
.advanced-settings[open] summary {
  color: var(--text-primary);
}
.advanced-settings[open] summary::before {
  transform: rotate(90deg);
}
.advanced-settings-body {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: height 180ms ease, opacity 140ms ease, transform 180ms ease;
}
.advanced-settings[open] .advanced-settings-body {
  opacity: 1;
  transform: translateY(0);
}
.results, .pantry-list { display: grid; gap: 10px; }
.result-summary,
.shelf-result,
.pantry-item {
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.result-meta { color: var(--text-secondary); font-size: 13px; }
.shelf-result {
  display: grid;
  gap: 10px;
}
.shelf-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.shelf-result-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.shelf-count {
  display: grid;
  grid-template-columns: auto 72px;
  align-items: center;
  gap: 4px 8px;
  color: var(--text-secondary);
  font-size: 12px;
}
.shelf-count input {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 13px;
}
.shelf-count small {
  grid-column: 1 / -1;
  color: #7b8494;
  font-size: 11px;
  text-align: right;
}
.result-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef5ff;
  color: #185abc;
  font-size: 12px;
  font-weight: 700;
}
.product-line-list {
  display: grid;
  gap: 8px;
}
.product-line {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) minmax(220px, 0.62fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 10px;
  background: #fbfcfe;
}
.product-marker {
  display: block;
  width: 4px;
  height: 100%;
  min-height: 48px;
  border-radius: 999px;
  background: var(--marker-color, var(--accent-primary));
}
.product-line-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.product-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.product-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-fact {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f0f3f8;
  color: #596273;
  font-size: 12px;
  line-height: 1.2;
}
.product-controls {
  display: grid;
  grid-template-columns: minmax(82px, 0.35fr) minmax(160px, 1fr);
  gap: 8px;
  align-items: end;
}
.product-count,
.product-picker {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
}
.product-count input,
.product-picker select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.product-count small {
  color: #7b8494;
  font-size: 11px;
}
.candidate-list {
  display: grid;
  gap: 8px;
}
.candidate-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #edf0f5;
  padding-top: 8px;
}
.candidate-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.candidate-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-preview-canvas {
  width: 112px;
  height: 78px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: #f8fafc;
}
.product-preview-three {
  width: 112px;
  height: 78px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: linear-gradient(150deg, #ffffff 0%, #eef5ff 100%);
  overflow: hidden;
}
.product-preview-three-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.pantry3d {
  min-height: 340px;
  border-radius: 16px;
  border: 1px solid #d9e2f1;
  background: linear-gradient(160deg, #f7f8fb 0%, #eef2f9 55%, #e7edf8 100%);
  padding: 12px;
}
.cabinet-wrap {
  border: 1px solid #d8e0ef;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.78);
}
.shelf-title { font-size: 13px; color: #4b5c77; margin: 0 0 8px; }
.cabinet-stage {
  position: relative;
  min-height: 520px;
  border-radius: 12px;
  border: 1px solid #cfd8e8;
  background: radial-gradient(circle at 20% 0%, #fdfefe 0%, #edf2fa 58%, #e4ebf7 100%);
  perspective: 1180px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  display: grid;
  place-items: center;
  padding: 18px;
}
.cabinet-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.34), rgba(228,236,248,.42)),
    repeating-linear-gradient(90deg, rgba(118,141,178,.08) 0 2px, transparent 2px 42px);
  transform: translateZ(-2px);
  pointer-events: none;
}
.cabinet-stage::after {
  content: '';
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 4px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(26, 35, 54, 0.32) 0%, rgba(26, 35, 54, 0.11) 46%, rgba(26,35,54,0) 100%);
  filter: blur(5px);
  transform: translateZ(-1px);
  pointer-events: none;
}
.cabinet-stage.dragging { cursor: grabbing; }
.cabinet-stage-canvas {
  display: block;
  height: clamp(560px, 58vw, 760px);
  min-height: 560px;
  padding: 0;
  isolation: isolate;
}
.cabinet-stage-canvas::before,
.cabinet-stage-canvas::after {
  display: none;
}
.cabinet-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.cabinet-three-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;
}
.cabinet-scene {
  --rx: 20deg;
  --ry: -36deg;
  --reveal: 0;
  transform-style: preserve-3d;
  transform: translateZ(26px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-origin: center center;
  transition: transform 120ms ease;
}
.cabinet-scene.dragging { transition: none; }
.cabinet-shell {
  --shell-depth: 96px;
  width: min(var(--shell-w, 260px), 74vw);
  height: var(--shell-h, 460px);
  padding: 12px 10px;
  border: 10px solid rgba(198, 166, 136, 0.48);
  border-bottom-width: 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(244,236,228,.16) 0%, rgba(237,226,214,.07) 100%);
  backdrop-filter: blur(2.5px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 -12px 24px rgba(98, 72, 46, 0.14),
    0 20px 34px rgba(45, 59, 85, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--shell-depth) * 0.5));
}
.cabinet-levels {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-back {
  position: absolute;
  inset: 10px 10px 10px 10px;
  border-radius: 3px;
  border: 1px solid rgba(137, 104, 74, 0.48);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(170,132,100,.28));
  transform: translateZ(calc(var(--shell-depth) * -0.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  pointer-events: none;
}
.cabinet-post {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 11px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(206, 167, 130, 0.76), rgba(144, 106, 76, 0.66));
  border: 1px solid rgba(126, 94, 68, 0.54);
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 3;
}
.cabinet-post-left {
  left: 8px;
  transform: translateZ(calc(var(--shell-depth) * 0.5));
}
.cabinet-post-right {
  right: 8px;
  transform: translateZ(calc(var(--shell-depth) * 0.5));
}
.cabinet-side,
.cabinet-top {
  position: absolute;
  pointer-events: none;
}
.cabinet-side {
  top: 10px;
  width: var(--shell-depth);
  height: calc(100% - 20px);
  border-radius: 2px;
  border: 1px solid rgba(118, 87, 61, 0.58);
}
.cabinet-side-left {
  left: 0;
  background: linear-gradient(180deg, rgba(196, 159, 126, 0.74), rgba(142, 106, 77, 0.62));
  transform-origin: left center;
  transform: translateZ(0) rotateY(-90deg) translateZ(calc(var(--shell-depth) * 0.5));
}
.cabinet-side-right {
  right: -2px;
  background: linear-gradient(180deg, rgba(175, 138, 106, 0.74), rgba(128, 94, 67, 0.62));
  transform-origin: right center;
  transform: translateZ(0) rotateY(90deg) translateZ(calc(var(--shell-depth) * 0.5));
}
.cabinet-top {
  top: -1px;
  left: 9px;
  right: 9px;
  height: var(--shell-depth);
  border-radius: 2px;
  border: 1px solid rgba(152, 116, 86, 0.5);
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(203,167,133,.5));
  transform-origin: top center;
  transform: translateZ(0) rotateX(90deg) translateZ(calc(var(--shell-depth) * -0.5));
}
.cabinet-shell::before,
.cabinet-shell::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.cabinet-shell::before {
  top: 6px;
  left: 8px;
  right: 8px;
  height: calc(100% - 12px);
  border-radius: 3px;
  border: 1px solid rgba(177, 139, 105, 0.4);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(195,161,129,.24));
  transform: translateZ(calc(var(--shell-depth) * -0.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.cabinet-shell::after {
  display: none;
}
.cabinet-level {
  --shelf-depth: 32px;
  border-top: 2px solid rgba(244, 234, 223, 0.58);
  border-bottom: 2px solid rgba(173, 134, 101, 0.42);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(236, 218, 197, .06));
  display: block;
  padding: 8px 6px 6px;
  overflow: visible;
  flex: 0 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--shelf-depth) * 0.45));
}
.cabinet-level::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.28), rgba(185,150,119,.28));
  border: 1px solid rgba(150, 116, 86, 0.38);
  transform: translateZ(calc(var(--shelf-depth) * -0.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  pointer-events: none;
}
.cabinet-level::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 2px;
  width: var(--shelf-depth);
  height: calc(100% - 6px);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(166, 130, 98, 0.68), rgba(110, 84, 62, 0.56));
  border: 1px solid rgba(110, 80, 56, 0.5);
  transform-origin: right center;
  transform: translateZ(0) rotateY(90deg) translateZ(calc(var(--shelf-depth) * 0.5));
  pointer-events: none;
}
.cabinet-shelf-floor,
.cabinet-shelf-lip {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  transform-style: preserve-3d;
}
.cabinet-shelf-floor {
  bottom: -2px;
  height: var(--shelf-depth);
  border-radius: 3px;
  border: 1px solid rgba(128, 94, 68, 0.42);
  background:
    linear-gradient(90deg, rgba(255,255,255,.34), rgba(163,124,92,.22)),
    repeating-linear-gradient(90deg, rgba(101,74,51,.12) 0 1px, transparent 1px 18px);
  transform-origin: bottom center;
  transform: rotateX(90deg) translateZ(calc(var(--shelf-depth) * -0.5));
  box-shadow: 0 7px 12px rgba(75, 56, 39, 0.12);
}
.cabinet-shelf-lip {
  bottom: -1px;
  height: 8px;
  border: 1px solid rgba(112, 82, 58, 0.46);
  background: linear-gradient(180deg, rgba(218, 183, 148, .88), rgba(139, 101, 72, .76));
  transform: translateZ(calc(var(--shelf-depth) * 0.5 + 2px));
  box-shadow: 0 4px 8px rgba(66, 48, 34, 0.18);
}
.drag-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  margin: 0;
  font-size: 11px;
  color: #5b6881;
  background: rgba(255,255,255,.84);
  border: 1px solid #d0d9ea;
  border-radius: 999px;
  padding: 3px 8px;
}
.box-3d {
  --w: 64px;
  --h: 34px;
  --d: 24px;
  --z: 8px;
  --lane-z: 0px;
  --x: 10px;
  --lane-shift: 0px;
  --yaw: -24deg;
  --c: #4f8cff;
  position: absolute;
  left: calc(var(--x) + (var(--lane-shift) * var(--reveal)));
  bottom: 8px;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--z) * 1px + var(--lane-z))) rotateY(var(--yaw)) rotateX(8deg);
  filter: drop-shadow(0 14px 18px rgba(31, 45, 79, 0.36));
}
.box-lane-front {
  --lane-shift: 6px;
  z-index: 3;
}
.box-lane-back {
  --lane-shift: -20px;
  z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(23, 35, 60, 0.28));
}
.box-3d .face {
  position: absolute;
  border: 1px solid rgba(18, 31, 53, 0.22);
  border-radius: 4px;
  backface-visibility: hidden;
}
.box-3d .front,
.box-3d .back {
  width: var(--w);
  height: var(--h);
  left: 0;
  top: 0;
}
.box-3d .front {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c));
  transform: translateZ(calc(var(--d) / 2));
}
.box-3d .back {
  background: color-mix(in srgb, var(--c) 58%, #1f2937);
  transform: rotateY(180deg) translateZ(calc(var(--d) / 2));
}
.box-3d .right,
.box-3d .left {
  width: var(--d);
  height: var(--h);
  top: 0;
}
.box-3d .right {
  left: calc(var(--w) - var(--d));
  background: color-mix(in srgb, var(--c) 48%, #0f172a);
  transform-origin: right center;
  transform: rotateY(90deg) translateZ(calc(var(--d) / 2));
}
.box-3d .left {
  left: 0;
  background: color-mix(in srgb, var(--c) 78%, #fff);
  transform-origin: left center;
  transform: rotateY(-90deg) translateZ(calc(var(--d) / 2));
}
.box-3d .top,
.box-3d .bottom {
  width: var(--w);
  height: var(--d);
  left: 0;
}
.box-3d .top {
  top: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.26), rgba(255,255,255,0)),
    color-mix(in srgb, var(--c) 70%, #fff);
  transform-origin: top center;
  transform: rotateX(90deg) translateZ(calc(var(--d) / 2));
}
.box-3d .bottom {
  bottom: 0;
  background: color-mix(in srgb, var(--c) 48%, #334155);
  transform-origin: bottom center;
  transform: rotateX(-90deg) translateZ(calc(var(--d) / 2));
}
.box-label {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  z-index: 2;
  font-size: 10px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.box-chip {
  position: relative;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3fb;
  border: 1px solid #c8d5ea;
  font-size: 11px;
  color: #4b5c77;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(373px, calc(100vw - 24px));
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-primary); }

.password-rotation-card {
  width: min(480px, calc(100vw - 24px));
}

.bottom-ad-shell {
  margin: 20px 0 30px;
  min-height: 108px;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 108px;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  color: #7a828e;
  background: linear-gradient(180deg, #fafbfc, #f3f6fa);
  text-align: center;
  gap: 4px;
}

.ad-placeholder small {
  color: #9aa1ad;
  font-size: 12px;
}

.bottom-ad-slot {
  display: block;
  min-height: 108px;
  width: 100%;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-inner strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 15px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a,
.auth-consent-check a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover,
.auth-consent-check a:hover {
  color: var(--accent-press);
}

.policy-logo {
  color: var(--text-primary);
  text-decoration: none;
}

.policy-page {
  padding-top: 28px;
  padding-bottom: 32px;
}

.policy-card {
  max-width: 860px;
  margin: 0 auto;
}

.policy-card h1 {
  margin: 6px 0 8px;
  font-size: 34px;
  letter-spacing: 0;
}

.policy-card h2 {
  margin: 28px 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.policy-card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.policy-updated {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.policy-history {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.policy-history ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-history li {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
}

.policy-history a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.policy-history span,
.policy-history small {
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  .grid3 { grid-template-columns: 1fr; }
  .hero h2 { font-size: 27px; }
  .topbar-inner {
    gap: 12px;
  }
  .logo {
    font-size: 19px;
  }
  .signup-id-row {
    grid-template-columns: 1fr;
  }
  .id-check-btn {
    width: 100%;
  }
  .account-menu-btn {
    max-width: 44vw;
    padding-inline: 10px;
  }
  .account-dropdown {
    min-width: 168px;
  }
  .toast-region {
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  .shelf-result-head,
  .product-title-row,
  .candidate-line {
    align-items: stretch;
    flex-direction: column;
  }
  .product-line,
  .candidate-line {
    grid-template-columns: 1fr;
  }
  .product-preview-canvas {
    justify-self: stretch;
    width: 100%;
    max-width: 180px;
  }
  .product-preview-three {
    justify-self: stretch;
    width: 100%;
    max-width: 180px;
  }
  .product-controls {
    grid-template-columns: 1fr;
  }
  .shelf-result-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .shelf-count {
    grid-template-columns: minmax(0, 1fr) 76px;
    width: 100%;
  }
  .product-marker {
    width: 100%;
    height: 4px;
    min-height: 4px;
  }
  .product-title {
    white-space: normal;
  }
  .cabinet-stage-canvas {
    height: 560px;
  }
  .password-tooltip {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 8px;
  }
  .password-tooltip::before {
    display: none;
  }
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .policy-card h1 {
    font-size: 28px;
  }
}
