/* Toss-inspired design tokens */
:root {
  --blue: #3182f6;
  --blue-press: #1b64da;
  --blue-soft: #e8f3ff;
  --orange: #f04452;
  --orange-soft: #fff0f1;
  --franchise: #ff7a00;
  --franchise-soft: #fff3e6;
  --bg: #f2f4f6;
  --card: #ffffff;
  --grey-50: #f9fafb;
  --grey-100: #f2f4f6;
  --grey-200: #e5e8eb;
  --grey-300: #d1d6db;
  --grey-400: #b0b8c1;
  --grey-500: #8b95a1;
  --grey-600: #6b7684;
  --grey-700: #4e5968;
  --grey-800: #333d4b;
  --grey-900: #191f28;
  --radius: 24px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --maxw: 600px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* duotone icon palette (워크칩 아이콘 체계) */
  --ic-blue: #3182f6;
  --ic-blue-soft: #c9e2ff;
  --ic-green: #03b26c;
  --ic-green-soft: #c2f0db;
  --ic-orange: #ff8a00;
  --ic-orange-deep: #e06f00;
  --ic-orange-soft: #ffe2b8;
  --ic-red: #f04452;
  --ic-yellow: #ffc342;
  --ic-yellow-deep: #e59400;
  --ic-purple: #7b4de8;
  --ic-purple-soft: #d9ccff;
  --ic-grey: #6b7684;
  --ic-grey-soft: #e5e8eb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--grey-900);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
.ic { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(49, 130, 246, 0.45); outline-offset: 2px; border-radius: 8px; }

/* ---------- motion (OPS) ---------- */
.press { transition: transform 0.15s var(--ease), background-color 0.15s; }
.press:active { transform: scale(0.98); }
.fade-up { animation: fade-up 0.35s var(--ease) both; }
.is-static .fade-up { animation: none; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- skeleton ---------- */
.sk { display: block; border-radius: 8px; background: var(--grey-200); animation: pulse 1.6s ease-in-out infinite; }
.sk-tile { flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); }
.sk-line { height: 14px; margin: 4px 0; }
.sk-line.lg { height: 22px; margin: 10px 0; }
.sk-title { width: 55%; height: 30px; margin-top: 10px; }
.sk-block { height: 72px; margin-top: 14px; border-radius: var(--radius-sm); }
.sk-num { width: 32px; height: 26px; }
.w30 { width: 30%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px; padding: 0 20px; border-radius: 16px;
  font-size: 16px; font-weight: 600;
  transition: transform 0.12s var(--ease), background-color 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-lg { height: 56px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-primary:disabled { background: var(--grey-300); cursor: default; }
.btn-secondary { background: var(--blue-soft); color: var(--blue); margin-top: 12px; }
.btn-secondary:active { background: #d6e8ff; }

.brand-mark {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 24px;
}
.brand-mark.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 14px; }
img.brand-mark { display: block; object-fit: cover; background: #000; }

/* ---------- login ---------- */
.login-body { background: #fff; }
.login {
  min-height: 100dvh;
  width: 100%; max-width: 440px; margin: 0 auto;
  display: flex;
}
.login-form { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 56px 24px calc(24px + var(--safe-b)); }
.login-top { flex: 1; }
.login-eyebrow { margin-top: 28px; color: var(--grey-600); font-size: 15px; font-weight: 600; }
.login-title { margin-top: 6px; font-size: 28px; line-height: 1.35; font-weight: 700; letter-spacing: -0.03em; }
.login-desc { margin-top: 12px; color: var(--grey-600); font-size: 16px; }
.field { display: block; margin-top: 40px; }
.field-label { display: block; font-size: 14px; color: var(--grey-600); margin-bottom: 8px; font-weight: 500; }
.field-box {
  display: flex; align-items: center;
  border-bottom: 2px solid var(--grey-200);
  transition: border-color 0.15s;
}
.field-box:focus-within { border-color: var(--blue); }
.field-box.is-error { border-color: var(--orange); animation: shake 0.35s; }
.field-box input {
  flex: 1; min-width: 0; width: 100%; height: 56px; padding: 0; border: 0; border-radius: 0; outline: 0; background: none;
  font: inherit; font-size: 22px; font-weight: 600; color: var(--grey-900);
}
.field-box input::placeholder { color: var(--grey-300); font-weight: 500; }
.field-toggle { padding: 8px 10px; font-size: 14px; color: var(--grey-600); border-radius: 8px; }
.field-toggle:active { background: var(--grey-100); }
.field-error { margin-top: 10px; color: var(--orange); font-size: 14px; font-weight: 500; }
.login-cta { padding-top: 24px; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 56px; padding: 0 12px 0 20px;
  max-width: var(--maxw); margin: 0 auto;
  background: rgba(242, 244, 246, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -12px; border-radius: 999px; color: var(--grey-800); }
.icon-btn:hover, .icon-btn:active { background: var(--grey-200); }
.topbar-title {
  flex: 1; min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.text-btn { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--grey-600); }
.text-btn:hover, .text-btn:active { background: var(--grey-200); }

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 20px calc(48px + var(--safe-b)); }

.hero { padding: 20px 4px 24px; }
.hero-eyebrow { color: var(--grey-600); font-size: 15px; font-weight: 600; }
.hero-title { margin-top: 6px; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.hero-sub { margin-top: 8px; color: var(--grey-600); font-size: 15px; }

/* 한눈에 보기 (stat tiles) */
.stats-card { padding: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 4px 14px; border-radius: var(--radius-md); background: var(--grey-50);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: transform 0.15s var(--ease), background-color 0.15s, box-shadow 0.15s;
}
.stat:hover { background: var(--grey-100); }
.stat.is-active { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.stat-label { font-size: 13px; color: var(--grey-600); font-weight: 500; }
.stat-num { font-size: 22px; line-height: 26px; font-weight: 700; color: var(--grey-900); font-variant-numeric: tabular-nums; }
.stat.is-active .stat-num { color: var(--blue); }

/* segmented control */
.seg-wrap { position: sticky; top: 56px; z-index: 15; margin: 0 -20px; padding: 12px 20px; background: var(--bg); }
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 14px; background: var(--grey-200);
}
.seg-btn {
  position: relative; z-index: 1; height: 42px; border-radius: 11px;
  font-size: 15px; font-weight: 600; color: var(--grey-600);
  transition: color 0.2s;
}
.seg-btn.is-active { color: var(--grey-900); }
.seg-thumb {
  position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: 42px;
  border-radius: 11px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s var(--ease);
}
.seg-thumb.is-right { transform: translateX(100%); }

/* search + chips */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 16px; border-radius: var(--radius-md);
  background: #fff; color: var(--grey-500);
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.15s;
}
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); }
.search-clear { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--grey-300); color: #fff; }
.search input::-webkit-search-cancel-button { display: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: 16px; color: var(--grey-900);
}
.search input::placeholder { color: var(--grey-400); }

.chips {
  display: flex; gap: 8px; margin: 12px -20px 8px; padding: 0 20px;
  overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: #fff; color: var(--grey-700); font-size: 14px; font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}
.chip:hover { background: var(--grey-50); }
.chip.is-active, .chip.is-active:hover { background: var(--grey-800); color: #fff; }

/* cards */
.card {
  display: block; background: var(--card); border-radius: var(--radius);
  padding: 22px 20px; margin-bottom: 12px;
}
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 6px; }
.count { color: var(--blue); font-weight: 700; }
.section-title { display: flex; align-items: center; gap: 6px; margin: 32px 4px 12px; font-size: 15px; font-weight: 600; color: var(--grey-600); }

/* menu list (OPS) */
.group { margin-top: 20px; }
.group-title { padding: 0 4px 10px; font-size: 14px; font-weight: 600; color: var(--grey-500); display: flex; gap: 6px; }
.menu { display: flex; flex-direction: column; padding: 8px; border-radius: var(--radius); background: var(--card); margin-bottom: 12px; }
.menu-row {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 12px; border-radius: var(--radius-md); text-align: left;
}
a.menu-row:hover { background: var(--grey-50); }
.tile-ic {
  flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--grey-50);
}
.tile-ic.letter { background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 18px; }
.tile-ic.letter.is-franchise { background: var(--franchise-soft); color: var(--franchise); }
.menu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 16px; font-weight: 600; color: var(--grey-900); }
.menu-sub { font-size: 14px; color: var(--grey-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { flex: none; display: grid; color: var(--grey-400); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--grey-100); color: var(--grey-500); font-size: 12px; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.badge-direct { background: var(--blue-soft); color: var(--blue); }
.badge-franchise { background: var(--franchise-soft); color: var(--franchise); }

/* store heading */
.store-head { padding: 12px 4px 18px; }
.store-meta { display: flex; align-items: center; gap: 8px; color: var(--grey-600); font-size: 15px; font-weight: 600; }
.store-name { margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.alias { font-size: 18px; color: var(--grey-500); font-weight: 600; }
.store-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-link .store-name { color: var(--grey-900); }

/* quick actions */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.quick.two { grid-template-columns: repeat(2, 1fr); }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 88px; border-radius: var(--radius); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--grey-800);
}
.quick-btn:hover { background: var(--grey-50); }

/* address */
.addr { padding-bottom: 18px; border-bottom: 1px solid var(--grey-100); }
.addr-text { margin-top: 4px; font-size: 18px; font-weight: 600; line-height: 1.45; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px; border-radius: 12px;
  background: var(--grey-100); color: var(--grey-700); font-size: 14px; font-weight: 600;
}
.pill:active { background: var(--grey-200); }

/* door code */
.code {
  margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--blue-soft);
}
.code-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--blue); }
.code-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.code-line .chip-btn { background: #fff; color: var(--blue); }
.code-value { font-size: 28px; font-weight: 800; letter-spacing: 0.02em; color: var(--grey-900);
  font-variant-numeric: tabular-nums;
}
.code-muted { background: var(--grey-100); }
.code-muted .code-label { color: var(--grey-700); }
.code-note { margin-top: 4px; font-size: 16px; font-weight: 600; }

/* steps */
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; }
.step-ic {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--grey-50);
}
.steps li.is-note .step-ic { background: var(--orange-soft); }
.steps li.is-note .step-text { color: var(--orange); font-weight: 600; }
.step-label { font-size: 13px; color: var(--grey-500); font-weight: 500; }
.step-text { font-size: 16px; color: var(--grey-800); font-weight: 500; line-height: 1.5; }

/* calls */
.calls { display: grid; gap: 8px; }
.call {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--grey-50);
  border: 1px solid var(--grey-100);
  transition: transform 0.12s var(--ease), background-color 0.12s;
}
.call:hover { background: var(--grey-100); }
.call-text { flex: 1; display: flex; flex-direction: column; }
.call-name { font-size: 13px; color: var(--grey-600); font-weight: 500; }
.call-phone { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.call-cta { flex: none; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; display: grid; place-items: center; }

/* rows */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--grey-100); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; padding-bottom: 4px; }
.row-main { flex: 1; min-width: 0; }
.row-label { font-size: 13px; color: var(--grey-500); font-weight: 500; }
.row-value { margin-top: 2px; font-size: 16px; font-weight: 600; color: var(--grey-900); line-height: 1.45; }
.row-value.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.row-sub { margin-top: 2px; font-size: 13px; color: var(--blue); font-weight: 600; }
.chip-btn {
  flex: none; height: 32px; padding: 0 11px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--grey-100); color: var(--grey-700); font-size: 13px; font-weight: 600;
}
.chip-btn:active { background: var(--grey-200); }

/* image tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tiles.docs { margin-top: 16px; }
.tile { margin: 0; }
.tile-img {
  display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--grey-100);
  border: 1px solid var(--grey-100);
}
.tiles.docs .tile-img img { object-position: top; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s var(--ease); }
.tile-img:hover img { transform: scale(1.03); }
.tile figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--grey-700);
}
.tile-dl { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); flex: none; }
.tile-dl:active { background: #d6e8ff; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 12px; text-align: center; color: var(--grey-500); font-size: 15px; }
.group + .empty, #store-list > .empty { margin-top: 12px; border-radius: var(--radius); background: var(--card); }
.empty.small { flex-direction: row; justify-content: center; gap: 8px; padding: 16px 0 4px; font-size: 14px; }

/* integrated view */
/* 화면 밖 업장 블록은 그리기를 미뤄 긴 통합 보기도 가볍게 스크롤됩니다. */
.store-block { margin-top: 8px; scroll-margin-top: 136px; content-visibility: auto; contain-intrinsic-size: auto 1400px; }
.region-divider { display: flex; align-items: center; gap: 12px; margin: 36px 8px 4px; color: var(--grey-500); font-size: 14px; font-weight: 700; }
.region-divider::after { content: ""; flex: 1; height: 1px; background: var(--grey-300); }

.footnote { margin-top: 32px; text-align: center; font-size: 13px; color: var(--grey-500); }

/* ---------- viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: rgba(0, 0, 0, 0.92); opacity: 0; transition: opacity 0.2s;
}
.viewer.is-open { opacity: 1; }
.viewer-bar { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 12px; color: #fff; padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.viewer-title { flex: 1; font-size: 16px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; border-radius: 12px; color: #fff; }
.viewer-download { padding: 0 14px; background: var(--blue); font-size: 15px; font-weight: 600; }
.viewer-stage { flex: 1; display: grid; place-items: center; padding: 8px 8px calc(16px + var(--safe-b)); overflow: auto; }
.viewer-stage { position: relative; }
.viewer-stage img { max-width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; border-radius: 8px; touch-action: pinch-zoom; transition: filter 0.2s; }
.viewer.is-loading .viewer-stage img { filter: blur(6px); }
.viewer-spinner {
  position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%;
  opacity: 0; pointer-events: none; animation: spin 0.8s linear infinite;
}
.viewer.is-loading .viewer-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- admin (add / edit / delete) ---------- */
.admin-actions { display: flex; gap: 6px; margin-top: 10px; }
.pill-danger { color: var(--orange); }
.pill-primary { background: var(--blue-soft); color: var(--blue); }
.pill-primary:active { background: #d6e8ff; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 4px 0; }
.list-head .section-title { margin: 0; }
.list-head + #store-list .group:first-child { margin-top: 14px; }
.add-block { margin: 4px 0; }
.btn-ghost { background: var(--grey-100); color: var(--grey-700); }
.btn-danger-ghost { background: var(--orange-soft); color: var(--orange); margin-bottom: 12px; }

.ed-field { display: block; margin-bottom: 16px; }
.ed-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--grey-600); }
.ed-label em { color: var(--orange); font-style: normal; }
.ed-hint { display: block; margin-top: 4px; font-size: 13px; color: var(--grey-500); }
.editor input[type="text"], .editor input[type="tel"], .editor textarea {
  display: block; width: 100%; min-width: 0; padding: 12px 14px; border: 1.5px solid var(--grey-200); border-radius: 12px;
  background: var(--grey-50); font: inherit; font-size: 16px; color: var(--grey-900); resize: vertical;
}
.editor input:focus, .editor textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.editor input::placeholder, .editor textarea::placeholder { color: var(--grey-400); }
.ed-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.radio-seg input { position: absolute; opacity: 0; pointer-events: none; }
.radio-seg span {
  display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px;
  background: var(--grey-100); color: var(--grey-600); font-weight: 600; cursor: pointer;
}
.radio-seg input:checked + span { background: var(--blue); color: #fff; }
.radio-seg input:focus-visible + span { outline: 3px solid rgba(49, 130, 246, 0.45); }

.switch-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.switch-row .card-title { margin-bottom: 0; }
.switch-row input { position: absolute; opacity: 0; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--grey-300); transition: background-color 0.2s; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease);
}
.switch-row input:checked + .switch { background: var(--blue); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid rgba(49, 130, 246, 0.45); outline-offset: 2px; }
.ed-delivery { margin-top: 18px; }

.ed-contacts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; align-items: flex-start; }
.ed-contact { display: grid; grid-template-columns: 1fr 1.4fr 40px; gap: 6px; width: 100%; }
.ed-remove {
  display: grid; place-items: center; width: 40px; height: 40px; align-self: center;
  border-radius: 10px; background: var(--grey-100); color: var(--grey-600);
}
.ed-remove:active { background: var(--grey-200); }
.ed-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.ed-image { position: relative; display: flex; flex-direction: column; gap: 6px; }
.ed-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--grey-100); }
.ed-image input[type="text"] { padding: 8px 10px; font-size: 14px; }
.ed-image .ed-remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; background: rgba(25, 31, 40, 0.7); color: #fff; }
.ed-add-image {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 4 / 3; padding: 8px; border: 1.5px dashed var(--grey-300); border-radius: 12px;
  color: var(--grey-600); font-size: 13px; font-weight: 600; text-align: center; cursor: pointer;
}
.ed-add-image:active { background: var(--grey-50); }
.ed-bar {
  position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 2fr; gap: 8px;
  margin: 8px -16px 0; padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(rgba(242, 244, 246, 0), var(--bg) 30%);
}
.ed-bar .btn-secondary { margin-top: 0; background: #fff; color: var(--grey-700); }

/* password sheet */
.sheet {
  position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.2s;
}
.sheet.is-open { opacity: 1; }
.sheet-panel {
  width: 100%; max-width: var(--maxw); padding: 28px 24px calc(20px + var(--safe-b));
  border-radius: 24px 24px 0 0; background: #fff;
  transform: translateY(24px); transition: transform 0.25s var(--ease);
}
.sheet.is-open .sheet-panel { transform: none; }
.sheet-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-desc { margin: 6px 0 20px; color: var(--grey-600); font-size: 15px; }
.sheet .field-error { min-height: 21px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 12px; }
@media (min-width: 600px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 24px; max-width: 420px; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 14px; background: rgba(25, 31, 40, 0.92); color: #fff;
  font-size: 15px; font-weight: 600; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  .hero-title { font-size: 30px; }
  .login-title { font-size: 32px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
