/* 자리각 — eat.kimdoosi.com
   딥다크 · 헤어라인 · 숫자는 모노. 장식보다 정보가 먼저 보이게. */

@font-face {
  font-family: "PretendardSub";
  src: url("/assets/fonts/Pretendard-subset.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --bg-2: #101113;
  --panel: #121316;
  --panel-2: #17181c;
  --line: #23252a;
  --line-2: #1b1d21;
  --ink: #f2f0ec;
  --ink-2: #c3c8ce;
  --dim: #868d95;
  --dim-2: #666d74;
  --lime: #d8f25c;
  --lime-dim: #a9c33e;
  --warm: #ff7a59;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
  --radius: 16px;
  --tap: 44px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--ink);
  font-family: "PretendardSub", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  background: radial-gradient(90% 100% at 50% 0%, rgba(216, 242, 92, 0.055), rgba(11, 11, 12, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px calc(56px + env(safe-area-inset-bottom));
}

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

/* ── 상단 ─────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

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

.brand-mark { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.brand-mark i {
  display: block; width: 4px; border-radius: 1px; background: var(--lime);
}
.brand-mark i:nth-child(1) { height: 8px; opacity: .45; }
.brand-mark i:nth-child(2) { height: 11px; opacity: .7; }
.brand-mark i:nth-child(3) { height: 14px; }

.brand-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.src-pill {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
}

/* ── 히어로 ───────────────────────────────────── */

.hero { padding: 14px 0 26px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--lime-dim);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.hero h1 .hl {
  color: var(--lime);
}

.lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.62;
}
.lede b { color: var(--ink); font-weight: 650; }

/* ── 폼 ───────────────────────────────────────── */

.panel {
  background: linear-gradient(180deg, var(--panel) 0%, #0f1013 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 16px 18px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}

.form-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fs-line {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.fs-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--dim);
}
.fs-edit {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.oneline {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.oneline input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  background: #0b0c0e;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.oneline input::placeholder { color: var(--dim-2); }
.oneline input:focus { outline: none; border-color: #3a3f47; }

.oneline-btn {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.oneline-btn:active { background: #22242a; }

.field { margin-bottom: 18px; }

.flabel {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.01em;
}

input.text {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #2b2e34;
  background: #0b0c0e;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* iOS 확대 방지 */
  font-weight: 600;
  letter-spacing: -0.02em;
}
input.text::placeholder { color: var(--dim-2); font-weight: 500; font-size: 15px; }
input.text:focus { outline: none; border-color: var(--lime-dim); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.chips:first-of-type { margin-top: 0; }
.field > .chips[role="group"] { margin-top: 8px; }

.chip {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #2b2e34;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.98); }
.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #0b0b0c;
  font-weight: 700;
}

.chip-day { min-width: 38px; padding: 0 0; flex: 1 1 0; }
.chips-days { gap: 6px; }

.cta {
  width: 100%;
  height: 54px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--lime);
  color: #0b0b0c;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 12px 26px -12px rgba(216, 242, 92, .55);
}
.cta:active { background: #c9e34f; }
.cta[disabled] { background: #2a2d33; color: var(--dim); box-shadow: none; cursor: default; }
.cta-ghost {
  background: transparent;
  border: 1px solid var(--lime-dim);
  color: var(--lime);
  box-shadow: none;
  height: 50px;
}
.cta-ghost:active { background: rgba(216, 242, 92, .08); }

.dim { opacity: .72; }

.micro {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dim-2);
  text-align: center;
}

/* ── 로딩 ─────────────────────────────────────── */

.skeleton { padding-top: 26px; }
.sk-text { margin: 0 0 14px; font-size: 12px; color: var(--dim); }
.sk-line {
  height: 10px; width: 120px; border-radius: 4px;
  background: linear-gradient(90deg, #1a1c20, #26292f, #1a1c20);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.sk-card {
  height: 128px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: linear-gradient(90deg, #101114, #16171b, #101114);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0% { background-position: 140% 0; }
  100% { background-position: -40% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-card, .sk-line { animation: none; }
}

/* ── 결과 ─────────────────────────────────────── */

.result { padding-top: 30px; }

.result-head { margin-bottom: 14px; }
.result-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.3;
}
.result-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.5;
}
.result-sub b { color: var(--ink-2); font-weight: 600; }

.cards { display: grid; gap: 10px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 0;
  overflow: hidden;
}
.card .out { margin-top: auto; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rank {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--lime);
  letter-spacing: 0.04em;
}
.cat {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.card h3 {
  margin: 0 0 3px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.32;
  word-break: keep-all;
}
.addr {
  margin: 0 0 13px;
  font-size: 12px;
  color: var(--dim-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.metric-num {
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.metric-num span { font-size: 15px; color: var(--dim); margin-left: 1px; }
.metric-label { font-size: 11.5px; color: var(--dim); line-height: 1.35; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
  line-height: 1.45;
}
.facts li:last-child { border-bottom: 0; }
.fk {
  flex: 0 0 52px;
  color: var(--dim-2);
  font-size: 11px;
  padding-top: 1px;
  letter-spacing: 0.01em;
}
.fv { color: var(--ink-2); }
.fv em { font-style: normal; color: var(--ink); font-weight: 650; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 12px; }
.tag {
  font-size: 10.5px;
  color: var(--lime);
  background: rgba(216, 242, 92, .09);
  border: 1px solid rgba(216, 242, 92, .22);
  border-radius: 5px;
  padding: 2px 6px;
  letter-spacing: 0.01em;
}

.maprow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0 12px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
}
.maprow-label {
  color: var(--dim-2);
  font-size: 11px;
  margin-right: 2px;
}
.maprow a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid #2c3036;
  padding-bottom: 1px;
}
.maprow a:active { color: var(--ink); }
.maprow-vote {
  margin: 9px 0 0 31px;
  padding: 0;
  border-top: 0;
  gap: 12px;
  font-size: 11.5px;
}
.maprow-vote a { color: var(--dim-2); }

.out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #0e0f11;
  color: var(--lime);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.out:active { background: #14161a; }
.out svg { flex: 0 0 auto; }

.vote-box { margin-top: 16px; }

.share-sheet {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(216, 242, 92, .25);
  background: rgba(216, 242, 92, .045);
  border-radius: 14px;
}
.share-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
}
.share-link { display: flex; gap: 8px; }
.share-url-text {
  flex: 1;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #33373d;
  background: #0b0c0e;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.share-url-text::-webkit-scrollbar { display: none; }
.share-link button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid #3a3f47;
  background: #1c1e23;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.share-actions { display: flex; gap: 8px; margin-top: 8px; }
.mini {
  flex: 1;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid #33373d;
  background: #16181c;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.caveat {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--dim-2);
}

/* ── 에러 ─────────────────────────────────────── */

.error-box {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #3a2a26;
  background: #17100e;
  border-radius: 14px;
}
.error-title { margin: 0 0 6px; font-size: 15px; font-weight: 750; color: #ffb4a0; }
.error-body { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* ── 원리 ─────────────────────────────────────── */

.how { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.how h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how-list li { display: flex; gap: 12px; }
.how-list .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim-2);
  padding-top: 3px;
}
.how-list b { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.how-list p { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.how-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--line);
  font-size: 12px;
  color: var(--dim);
  line-height: 1.6;
}
.how-note b { color: var(--ink-2); }

/* ── 푸터 ─────────────────────────────────────── */

.foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  color: var(--dim-2);
  font-size: 11px;
  line-height: 1.7;
}
.foot p { margin: 0 0 8px; }
.foot b { color: var(--dim); font-weight: 600; }
.foot a { color: var(--dim); }

/* ── 투표 페이지 ──────────────────────────────── */

.v-hero { padding: 8px 0 22px; }
.v-hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.22;
}
.v-meta { margin: 0; font-size: 12.5px; color: var(--dim); }
.v-meta b { color: var(--ink-2); font-weight: 650; }

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

.opt {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 15px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, background .14s ease;
  overflow: hidden;
}
.opt:active { background: #15171b; }
.opt.is-on { border-color: var(--lime-dim); background: rgba(216, 242, 92, .05); }
.opt-top { display: flex; align-items: flex-start; gap: 11px; }
.bullet {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid #3a3f47;
  display: flex; align-items: center; justify-content: center;
}
.opt.is-on .bullet { border-color: var(--lime); background: var(--lime); }
.bullet i { width: 7px; height: 7px; border-radius: 50%; background: #0b0b0c; opacity: 0; }
.opt.is-on .bullet i { opacity: 1; }

.opt-name { font-size: 17px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.3; }
.opt-sub { margin: 3px 0 0; font-size: 12px; color: var(--dim); }
.opt-note {
  margin: 9px 0 0 31px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.bar {
  display: none;
  position: relative;
  height: 5px;
  margin: 12px 0 0 31px;
  border-radius: 3px;
  background: #191b20;
  overflow: hidden;
}
.opt.voted .bar { display: block; }
.bar i {
  position: absolute; inset: 0 auto 0 0;
  background: var(--lime);
  border-radius: 3px;
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.opt-count {
  display: flex; justify-content: space-between;
  margin: 7px 0 0 31px;
  font-size: 11px;
  color: var(--dim-2);
  font-family: var(--mono);
}
.opt-count .mine { color: var(--lime); font-family: inherit; }

.opt-out {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 12px 0 0 31px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 242, 92, .35);
  padding-bottom: 1px;
}
.opt-out:active { color: var(--ink); }
.opt-out svg { opacity: .7; }

.v-actions { margin-top: 16px; }

#v-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  margin: 0;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 12, .96);
  border-top: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#v-actions .cta { max-width: 520px; margin: 0 auto; }
#v-actions .micro { max-width: 520px; margin: 6px auto 0; font-size: 10.5px; }
body.has-votebar { padding-bottom: 112px; }

.v-more { margin-top: 40px; }
.v-more .cta { height: 46px; border: 1px solid var(--line); color: var(--ink-2); background: transparent; box-shadow: none; font-size: 14px; font-weight: 600; }

.v-note {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: var(--dim-2);
  line-height: 1.6;
}

.kakao-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #3a3020;
  background: #16130c;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #e8d9b4;
}

.v-result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.v-result p { margin: 0; font-size: 13px; color: var(--ink-2); }
.v-result b { color: var(--lime); }
.v-result .btn-row { display: flex; gap: 8px; margin-top: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #0b0b0c;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 넓은 화면 ────────────────────────────────── */

@media (min-width: 760px) {
  .shell { max-width: 940px; padding: 0 32px 80px; }
  .hero { padding: 40px 0 34px; }
  .hero h1 { font-size: 48px; }
  .lede { font-size: 15px; max-width: 560px; }
  .panel { padding: 22px; }
  .cards { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .result-head h2 { font-size: 26px; }
  .how-list { grid-template-columns: repeat(2, 1fr); gap: 18px 28px; }
  .vote-list { grid-template-columns: 1fr; }
  .v-hero h1 { font-size: 34px; }
}
