/* 한모금 · 식음료 매장 취향 매칭 프로토타입 (swipe) */
.sw {
  --bg: #1C1512;
  --surface: #2A201B;
  --surface-2: #33271f;
  --line: #3B2E27;
  --text: #F6EDE3;
  --muted: #B09C8C;
  --primary: #FF6B35;
  --accent: #F2C14E;
  --ok: #7BC47F;
  --warn: #F2C14E;
  --danger: #E5484D;
  --on-primary: #1C1512;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --r-card: 24px;
  --r-pill: 999px;
}

.sw *, .sw *::before, .sw *::after { box-sizing: border-box; }
.sw [hidden] { display: none !important; }

html:has(body.sw) { background: #1C1512; }
body.sw {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% 18%, rgba(255, 107, 53, .10), transparent 70%),
    radial-gradient(700px 420px at 85% 90%, rgba(242, 193, 78, .06), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
:where(.sw) a { color: inherit; }
:where(.sw) button { font: inherit; color: inherit; }
.sw :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 상단 안내 띠와 헤더 */
.sw-band {
  height: 28px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  background: #140f0d;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-top {
  max-width: 1120px; margin: 0 auto;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 24px;
}
.sw-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.sw-brand__name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sw-brand__tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px 10px;
}
.sw-reset {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--muted); font-size: 13px; cursor: pointer;
}
.sw-reset:hover { color: var(--text); border-color: var(--muted); }

/* 무대: 화면 지도 | 폰 | 설명 */
.sw-stage {
  max-width: 1120px; margin: 0 auto;
  padding: 8px 24px 96px;
  display: grid;
  grid-template-columns: 220px 410px minmax(240px, 300px);
  justify-content: center;
  align-items: start;
  gap: 48px;
}

.sw-map { position: sticky; top: 24px; padding-top: 24px; }
.sw-map__title { margin: 0 0 16px; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.sw-map__title span { margin-left: 6px; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); }
.sw-map__list { list-style: none; margin: 0; padding: 0; position: relative; }
.sw-map__list::before {
  content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px;
  width: 2px; background: var(--line);
}
.sw-map__item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 4px 0;
  text-decoration: none; color: var(--muted);
}
.sw-map__dot {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--muted);
  transition: background .2s, border-color .2s, color .2s;
}
.sw-map__name { font-size: 15px; }
.sw-map__item:hover .sw-map__name { color: var(--text); }
.sw-map__item.is-done .sw-map__dot { border-color: #7a4a33; color: #e2a27f; }
.sw-map__item.is-current { color: var(--text); }
.sw-map__item.is-current .sw-map__dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 6px rgba(255, 107, 53, .18); }
.sw-map__item.is-current .sw-map__name { font-weight: 700; }
.sw-map__now { display: none; }

/* 폰 */
.sw-device {
  width: 410px;
  height: clamp(640px, calc(100vh - 120px), 820px);
  padding: 10px;
  border-radius: 48px;
  background: #0d0907;
  box-shadow: 0 0 0 1px #3b2e27, 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(255, 107, 53, .35);
}
.sw-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

/* 설명 */
.sw-note { padding-top: 24px; position: sticky; top: 24px; }
.sw-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--primary); letter-spacing: .01em; }
.sw-note__title { margin: 0 0 12px; font-family: var(--serif); font-size: 22px; line-height: 1.4; font-weight: 700; }
.sw-note__text { margin: 0 0 16px; color: var(--muted); }
.sw-note__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.sw-note__list li {
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  font-size: 14px; color: #e3d5c8;
}
.sw-note__list b { display: block; margin-bottom: 2px; color: var(--text); font-size: 13px; }
.sw-note__meta { margin: 0; font-size: 13px; color: var(--muted); }

/* 앱 공통 */
.sw-app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sw-appbar {
  flex: none;
  height: 56px; padding: 0 12px 0 6px;
  display: flex; align-items: center; gap: 4px;
  border-bottom: 1px solid var(--line);
  background: rgba(28, 21, 18, .92);
}
.sw-appbar__back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
.sw-appbar__back:hover { background: var(--surface); }
.sw-appbar__title { flex: 1; margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.sw-appbar__title--serif { font-family: var(--serif); }
.sw-appbar__step { font-size: 13px; color: var(--muted); padding-right: 4px; }
.sw-appbar__step b { color: var(--primary); }
.sw-progress { flex: none; height: 3px; background: var(--line); }
.sw-progress span { display: block; height: 100%; width: 50%; background: var(--primary); transition: width .3s; }

.sw-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 10px 20px;
  border-radius: 16px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
}
.sw-btn small { font-size: 12px; font-weight: 500; opacity: .8; }
.sw-btn:active { transform: scale(.98); }
.sw-btn--primary { background: var(--primary); color: var(--on-primary); }
.sw-btn--primary:hover { background: #ff7c4c; }
.sw-btn--primary:disabled { opacity: .6; cursor: default; }
.sw-btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.sw-btn--ghost:hover { border-color: var(--muted); }
.sw-btn--sm { min-height: 44px; padding: 8px 16px; font-size: 14px; border-radius: 14px; }
.sw-btn--grow { flex: 1; }

.sw-pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.sw-pill:hover { border-color: var(--muted); }
.sw-pill--accent { color: var(--accent); border-color: rgba(242, 193, 78, .4); }
.sw-pill:disabled { color: var(--ok); border-color: rgba(123, 196, 127, .4); cursor: default; }

.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-chip { position: relative; cursor: pointer; }
.sw-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw-chip span {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; color: #e3d5c8;
  transition: background .15s, border-color .15s, color .15s;
}
.sw-chip input:checked + span { background: rgba(255, 107, 53, .16); border-color: var(--primary); color: #ffd9c7; font-weight: 600; }
.sw-chip input:checked + span::before { content: "✓"; margin-right: 6px; font-size: 12px; color: var(--primary); }
.sw-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.sw-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sw-tag {
  padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: rgba(246, 237, 227, .04);
  font-size: 12px; color: #e3d5c8;
}
.sw-tag--aroma { border-color: rgba(242, 193, 78, .45); color: var(--accent); }
.sw-tags--sm .sw-tag { font-size: 11px; padding: 2px 8px; }

.sw-input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px;
}
.sw-input:focus { outline: none; border-color: var(--primary); }

/* 시그니처: 취향 스펙트럼 막대 */
.sw-specs { display: grid; gap: 6px; }
.sw-spec { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.sw-spec__end--r { text-align: right; }
.sw-spec__track {
  position: relative; height: 8px; border-radius: var(--r-pill);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(246, 237, 227, .14) calc(10% - 1px) 10%),
    #3a2c24;
  overflow: hidden;
}
.sw-spec__fill { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, #ff8a4f, var(--primary)); box-shadow: 0 0 10px rgba(255, 107, 53, .5); }

/* 1. 시작 */
.sw-start { justify-content: center; align-items: stretch; padding: 24px 24px 28px; gap: 20px; text-align: center; }
.sw-start__art { position: relative; height: 230px; flex: none; }
.sw-mini {
  position: absolute; left: 50%; top: 10px;
  width: 140px; aspect-ratio: 3 / 4;
  margin-left: -70px;
  border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .7);
}
.sw-mini--0 { transform: translateX(-74px) rotate(-11deg); }
.sw-mini--1 { transform: translateX(74px) rotate(11deg); }
.sw-mini--2 { transform: translateY(-6px); z-index: 2; }
.sw-mini__photo { height: 56%; }
.sw-mini__photo .sw-scene { width: 100%; height: 100%; display: block; }
.sw-mini__body { padding: 8px 10px; text-align: left; }
.sw-mini__name { display: block; margin-bottom: 6px; font-family: var(--serif); font-size: 13px; font-weight: 700; }
.sw-mini .sw-spec { grid-template-columns: 1fr; gap: 0; }
.sw-mini .sw-spec__end { display: none; }
.sw-mini .sw-spec__track { height: 6px; }
.sw-mini .sw-specs { gap: 5px; }
.sw-start__logo { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.sw-start__lead { margin: 6px 0 0; font-size: 18px; line-height: 1.5; color: #e9dccf; font-family: var(--serif); }
.sw-start__actions { display: grid; gap: 10px; }
.sw-start__foot { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* 2–3. 매장 등록 */
.sw-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sw-form { padding: 20px 16px 8px; display: grid; gap: 22px; }
.sw-field { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sw-label { margin: 0; padding: 0; font-size: 15px; font-weight: 700; }
.sw-label span { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.sw-help { margin: 0; font-size: 13px; color: var(--muted); }
.sw-photos { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.sw-photo {
  position: relative; aspect-ratio: 3 / 4;
  padding: 0; border-radius: 16px; overflow: hidden;
  border: 1.5px dashed #5a463a; background: var(--surface);
  cursor: pointer;
}
.sw-photo__img { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
.sw-photo__img .sw-scene { width: 100%; height: 100%; display: block; }
.sw-photo__empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sw-photo__label {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: rgba(20, 15, 13, .78); font-size: 11px; color: var(--text);
}
.sw-photo.is-filled { border-style: solid; border-color: var(--line); }
.sw-photo.is-filled .sw-photo__img { opacity: 1; }
.sw-photo.is-filled .sw-photo__empty { display: none; }
.sw-photo.is-filled::after {
  content: "✕"; position: absolute; right: 6px; top: 6px;
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(20, 15, 13, .78); font-size: 11px;
}

.sw-range { padding: 12px 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sw-range + .sw-range { margin-top: 0; }
.sw-range__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sw-range__val { font-size: 15px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.sw-range__track { position: relative; height: 32px; }
.sw-range__ticks {
  position: absolute; left: 14px; right: 14px; top: 12px; height: 8px;
  display: flex; justify-content: space-between;
  border-radius: var(--r-pill); background: #3a2c24;
}
.sw-range__ticks i { width: 2px; height: 8px; background: rgba(246, 237, 227, .16); }
.sw-range__fill {
  position: absolute; top: 0; height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #ff8a4f, var(--primary));
  box-shadow: 0 0 12px rgba(255, 107, 53, .55);
}
.sw-range input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 32px; margin: 0;
  background: transparent; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.sw-range input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 32px; }
.sw-range input[type=range]::-moz-range-track { background: transparent; }
.sw-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 28px; height: 28px; margin-top: 2px;
  border-radius: 50%; border: 3px solid var(--primary); background: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5); cursor: grab;
}
.sw-range input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 22px; height: 22px;
  border-radius: 50%; border: 3px solid var(--primary); background: var(--text); cursor: grab;
}

.sw-preview {
  flex: none;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #241b17, #1f1714);
}
.sw-preview__label { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.sw-preview__card { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.sw-preview__photo { width: 76px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.sw-preview__photo .sw-scene { width: 100%; height: 100%; display: block; }
.sw-preview__photo.is-empty { background: repeating-linear-gradient(135deg, #2a201b 0 8px, #30251f 8px 16px); }
.sw-preview__body { min-width: 0; display: grid; gap: 4px; }
.sw-preview__name { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-preview__meta { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-preview .sw-specs { gap: 3px; }
.sw-preview .sw-spec { grid-template-columns: 38px 1fr 38px; font-size: 10px; }
.sw-preview .sw-spec__track { height: 6px; }

.sw-actionbar {
  flex: none;
  display: flex; gap: 8px;
  padding: 10px 16px 16px;
  background: #1f1714;
}

.sw-toast {
  position: absolute; left: 50%; bottom: 96px; z-index: 80;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}

/* 4–6. 스와이프 */
.sw-deckapp { overflow: hidden; }
.sw-deck {
  position: relative; flex: 1; min-height: 0;
  container-type: size;
  display: grid; place-items: center;
}
.sw-card {
  position: absolute;
  width: min(calc(100cqw - 32px), calc((100cqh - 16px) * .75));
  aspect-ratio: 3 / 4;
  display: flex; flex-direction: column;
  border-radius: var(--r-card); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .8);
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s;
  will-change: transform;
}
.sw-card[data-depth="1"] { transform: translateY(14px) scale(.95); opacity: .9; }
.sw-card[data-depth="2"] { transform: translateY(28px) scale(.9); opacity: .55; }
.sw-card[data-depth="3"] { transform: translateY(28px) scale(.9); opacity: 0; }
.sw-card.is-top { cursor: grab; }
.sw-card.is-dragging { transition: none; cursor: grabbing; }
.sw-card.is-flying { transition: transform .32s ease-in, opacity .32s; opacity: .2; }
.sw-card__photo { position: relative; flex: 0 0 54%; overflow: hidden; }
.sw-card__photo .sw-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sw-card__photo::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(180deg, transparent, rgba(20, 13, 10, .85)); pointer-events: none; }
.sw-card__match {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(20, 15, 13, .82); border: 1px solid rgba(255, 107, 53, .5);
  font-size: 13px; color: #ffd9c7;
}
.sw-card__match b { color: var(--primary); font-size: 15px; margin-left: 2px; }
.sw-card__mine {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 700;
}
.sw-card__line {
  position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 2;
  margin: 0; font-size: 14px; color: #f6ede3; line-height: 1.45;
}
.sw-stamp {
  position: absolute; top: 28px; z-index: 3;
  padding: 6px 14px; border-radius: 10px;
  border: 3px solid currentColor;
  font-size: 22px; font-weight: 800; letter-spacing: .04em;
  opacity: 0; pointer-events: none;
  background: rgba(20, 15, 13, .5);
}
.sw-stamp--like { left: 20px; color: var(--ok); transform: rotate(-12deg); }
.sw-stamp--nope { right: 20px; color: #ff8a8d; transform: rotate(12deg); }
.sw-card__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 14px 16px 16px; }
.sw-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sw-card__name { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-card__meta { margin: 0; flex: none; font-size: 13px; color: var(--muted); }
.sw-card .sw-spec { font-size: 11px; }

.sw-deck__empty { position: relative; z-index: 1; max-width: 280px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.sw-deck__empty p { margin: 0; }
.sw-deck__empty-title { font-family: var(--serif); font-size: 20px; color: var(--text); }

.sw-deck__hint { flex: none; margin: 0; padding: 4px 16px 0; text-align: center; font-size: 13px; color: var(--muted); min-height: 24px; }
.sw-deck__actions { flex: none; display: flex; justify-content: center; gap: 28px; padding: 10px 16px 18px; }
.sw-round {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; transition: transform .15s, background .15s;
}
.sw-round:active { transform: scale(.92); }
.sw-round--nope { color: #ff8a8d; }
.sw-round--nope:hover { background: #3a2422; }
.sw-round--like { width: 72px; height: 72px; background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 10px 24px -8px rgba(255, 107, 53, .7); }
.sw-round--like:hover { background: #ff7c4c; }

.sw-sheet { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; }
.sw-sheet__scrim { position: absolute; inset: 0; background: rgba(10, 7, 6, .62); }
.sw-sheet__panel {
  position: relative;
  max-height: 92%; overflow-y: auto;
  padding: 10px 16px 18px;
  border-radius: 28px 28px 0 0;
  background: #241b17; border-top: 1px solid var(--line);
  animation: sw-up .32s cubic-bezier(.2, .8, .2, 1);
}
.sw-sheet__grip { display: block; width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: #4a3a31; }
.sw-sheet__title { margin: 0 0 14px; font-family: var(--serif); font-size: 24px; line-height: 1.3; }
.sw-q { padding: 12px 0; border-top: 1px solid var(--line); }
.sw-q__label { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.sw-q__label b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 12px; }
.sw-q__label span { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.sw-sheet__actions { display: flex; gap: 8px; padding-top: 12px; }
@keyframes sw-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.sw-match {
  position: absolute; inset: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center;
  background: radial-gradient(420px 420px at 50% 38%, rgba(255, 107, 53, .38), transparent 70%), rgba(18, 12, 10, .94);
  animation: sw-fade .25s ease-out;
}
.sw-match__pct { margin: 0; padding: 4px 14px; border-radius: var(--r-pill); border: 1px solid rgba(242, 193, 78, .5); color: var(--accent); font-size: 13px; font-weight: 600; }
.sw-match__title { margin: 0; font-family: var(--serif); font-size: 34px; letter-spacing: -.02em; }
.sw-match__pair { display: flex; align-items: center; gap: 0; margin: 8px 0; }
.sw-match__avatar {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--text); background: var(--surface);
  display: grid; place-items: center;
}
.sw-match__avatar .sw-scene { width: 100%; height: 100%; display: block; }
.sw-match__avatar--me { margin-left: -14px; background: linear-gradient(135deg, #f2c14e, #ff6b35); color: var(--on-primary); font-family: var(--serif); font-size: 30px; font-weight: 700; }
.sw-match__heart { position: relative; z-index: 2; width: 44px; height: 44px; margin-left: -14px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 4px #1C1512; }
.sw-match__text { margin: 0; font-size: 15px; color: #e9dccf; line-height: 1.6; }
.sw-match__text b { color: var(--text); }
.sw-match__actions { width: 100%; max-width: 300px; display: grid; gap: 8px; margin-top: 8px; }
@keyframes sw-fade { from { opacity: 0; } to { opacity: 1; } }

/* 7. 매칭과 채팅 */
.sw-matches { flex: none; display: flex; gap: 10px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.sw-mt {
  flex: none; width: 76px;
  display: grid; justify-items: center; gap: 6px;
  padding: 4px 0; border: 0; background: transparent; cursor: pointer;
  position: relative;
}
.sw-mt__photo { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); display: block; }
.sw-mt__photo .sw-scene { width: 100%; height: 100%; display: block; }
.sw-mt__name { font-size: 12px; color: var(--muted); max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-mt__new { position: absolute; top: 0; right: 0; padding: 1px 6px; border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary); font-size: 10px; font-weight: 700; }
.sw-mt.is-active .sw-mt__photo { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 53, .25); }
.sw-mt.is-active .sw-mt__name { color: var(--text); font-weight: 700; }

.sw-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sw-chat__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.sw-chat__avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface); }
.sw-chat__avatar .sw-scene { width: 100%; height: 100%; display: block; }
.sw-chat__who { flex: 1; min-width: 0; }
.sw-chat__name { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-chat__meta { margin: 0; font-size: 12px; color: var(--muted); }
.sw-chat__log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.sw-chat__day { align-self: center; margin: 0 0 4px; padding: 3px 12px; border-radius: var(--r-pill); background: var(--surface); font-size: 12px; color: var(--muted); }
.sw-bubble { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.sw-bubble p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.sw-bubble time { flex: none; font-size: 11px; color: var(--muted); }
.sw-bubble--them { align-self: flex-start; }
.sw-bubble--them p { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.sw-bubble--me { align-self: flex-end; flex-direction: row-reverse; }
.sw-bubble--me p { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; font-weight: 500; }
.sw-contact {
  align-self: center; width: min(280px, 100%);
  padding: 14px 16px; border-radius: 18px;
  background: #2f2620; border: 1px solid rgba(242, 193, 78, .4);
  display: grid; gap: 10px;
}
.sw-contact__title { margin: 0; font-size: 14px; font-weight: 700; color: var(--accent); }
.sw-contact__rows { margin: 0; display: grid; gap: 6px; }
.sw-contact__rows div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.sw-contact__rows dt { color: var(--muted); }
.sw-contact__rows dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.sw-chat__input { flex: none; display: flex; gap: 8px; padding: 10px 12px 14px; border-top: 1px solid var(--line); background: #1f1714; }
.sw-chat__input .sw-input { border-radius: var(--r-pill); }
.sw-send { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; }

.sw-confirm { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(10, 7, 6, .7); }
.sw-confirm__box { width: 100%; max-width: 320px; padding: 20px; border-radius: 22px; background: #2a201b; border: 1px solid var(--line); }
.sw-confirm__title { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.sw-confirm__box p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.sw-confirm__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 공고 대응표 */
.sw-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid rgba(242, 193, 78, .5); border-radius: var(--r-pill);
  background: #2a201b; color: var(--accent);
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}
.sw-fab:hover { background: #33271f; }
.sw-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--line); border-radius: 24px;
  background: #241b17; color: var(--text);
}
.sw-dialog::backdrop { background: rgba(10, 7, 6, .7); }
.sw-dialog__body { padding: 20px 20px 18px; }
.sw-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.sw-dialog__title { margin: 0; font-family: var(--serif); font-size: 24px; }
.sw-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.sw-mapping { list-style: none; margin: 0; padding: 0; display: grid; }
.sw-mapping li { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sw-mapping__need { color: #e3d5c8; }
.sw-mapping__show { color: var(--primary); text-decoration: none; font-weight: 600; }
.sw-mapping__show:hover { text-decoration: underline; }
.sw-dialog__foot { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.demo-notice {
  max-width: 1120px; margin: 0 auto;
  padding: 16px 24px 28px;
  font-size: 12px; color: var(--muted); text-align: center;
}

/* 모바일: 폰 테두리 없이 화면 전체를 앱으로 */
@media (max-width: 960px) {
  .sw-stage { grid-template-columns: 410px minmax(240px, 1fr); gap: 32px; }
  .sw-map { grid-column: 1 / -1; position: static; padding-top: 0; }
  .sw-map__list { display: flex; gap: 4px; }
  .sw-map__list::before { left: 16px; right: 16px; top: 15px; bottom: auto; width: auto; height: 2px; }
  .sw-map__list li { flex: 1; }
  .sw-map__item { flex-direction: column; gap: 4px; text-align: center; }
  .sw-map__name { font-size: 12px; }
}

@media (max-width: 760px) {
  .sw-top { height: 52px; padding: 0 12px 0 16px; }
  .sw-brand__name { font-size: 20px; }
  .sw-brand__tag { display: none; }
  .sw-reset { min-height: 40px; padding: 0 12px; }
  .sw-stage { display: block; padding: 0 0 80px; }
  .sw-map { padding: 6px 16px 8px; border-bottom: 1px solid var(--line); }
  .sw-map__title { display: none; }
  .sw-map__list { gap: 0; }
  .sw-map__list::before { top: 21px; }
  .sw-map__item { min-height: 44px; justify-content: center; }
  .sw-map__dot { width: 28px; height: 28px; font-size: 12px; }
  .sw-map__name { display: none; }
  .sw-map__now { display: block; margin: 4px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--text); }
  .sw-device {
    width: 100%;
    height: max(600px, calc(100svh - 28px - 52px - 88px));
    padding: 0; border-radius: 0; box-shadow: none; background: transparent;
  }
  .sw-screen { border-radius: 0; }
  .sw-note { position: static; padding: 24px 16px 0; }
  .sw-fab { right: 12px; bottom: 16px; width: 44px; padding: 0; justify-content: center; }
  .sw-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sw-mapping li { grid-template-columns: 1fr; gap: 4px; }
  /* 우하단 공고 대응표 버튼 자리를 비운다 */
  .sw-actionbar, .sw-chat__input, .sw-sheet__actions { padding-right: 64px; }
  .sw-preview__label { display: none; }
  .sw-preview { padding-top: 10px; }
  .demo-notice { padding: 16px 16px 72px; }
}

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