/* ============================================================
   Pickly — base tokens, themes, shared components
   ============================================================ */

:root {
  --brand: #3ba55d;
  --brand-2: #8bd450;
  --brand-ink: #ffffff;
  --ink: #16241b;
  --ink-2: #3d5346;
  --muted: #6d8377;
  --bg: #f6f8f5;
  --bg-2: #eef3ee;
  --card: #ffffff;
  --card-2: #fbfdfa;
  --line: #e3eae4;
  --line-2: #eff3f0;
  --shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 14px 34px -10px rgba(16, 40, 24, .12);
  --shadow-sm: 0 1px 2px rgba(16, 40, 24, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Noto Sans Mono CJK KR", Menlo, Consolas, monospace;
  --ok: #2f9e5b;
  --warn: #d08a1a;
  --danger: #d4453f;
  --info: #3a7bd5;
  --sb-w: 268px;
  --studio-w: 384px;
}

body[data-theme="cafe"] {
  --brand: #d9a25f;
  --brand-2: #f0c987;
  --brand-ink: #241711;
  --ink: #f4e9dc;
  --ink-2: #d8c7b6;
  --muted: #a99a8a;
  --bg: #17110d;
  --bg-2: #1e1712;
  --card: #241b15;
  --card-2: #2b211a;
  --line: #3a2c23;
  --line-2: #33261e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 18px 42px -12px rgba(0, 0, 0, .55);
}

body[data-theme="retro"] {
  --brand: #2b4b8f;
  --brand-2: #6f8fd0;
  --brand-ink: #f5f2e6;
  --ink: #1d2338;
  --ink-2: #3a4560;
  --muted: #63708c;
  --bg: #d8d3c3;
  --bg-2: #cbc6b5;
  --card: #eae6d7;
  --card-2: #f2eee1;
  --line: #b3ae9c;
  --line-2: #c3beb0;
  --shadow: 4px 4px 0 rgba(29, 35, 56, .18);
  --radius: 4px;
  --radius-sm: 3px;
  --radius-lg: 6px;
  --font: "Noto Sans Mono CJK KR", ui-monospace, "MS Gothic", monospace;
}

body[data-theme="neon"] {
  --brand: #00e5ff;
  --brand-2: #ff3ea5;
  --brand-ink: #04121a;
  --ink: #e9f6ff;
  --ink-2: #a9c6d8;
  --muted: #7f9aae;
  --bg: #070d18;
  --bg-2: #0b1524;
  --card: #0f1b2b;
  --card-2: #122238;
  --line: #1e3550;
  --line-2: #172b42;
  --shadow: 0 0 0 1px rgba(0, 229, 255, .12), 0 20px 52px -16px rgba(0, 229, 255, .2);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0; line-height: 1.25; letter-spacing: -.015em; font-weight: 800;
  text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere;
}
p { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
li, summary, dt, dd, blockquote, figcaption { word-break: keep-all; overflow-wrap: anywhere; }

/* monoline icon */
svg.ui-ico { display: inline-block; vertical-align: -.16em; flex: 0 0 auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; font-size: 14px;
  background: var(--card); color: var(--ink); line-height: 1.2;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand) 70%);
  color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 18px -10px rgba(35, 121, 74, .55);
}
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); background: var(--card-2); }
body[data-theme="neon"] .btn-primary { box-shadow: 0 0 24px rgba(0, 229, 255, .35); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-soft { background: var(--bg-2); color: var(--ink); border-color: transparent; }
.btn-outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); font-size: 16px; line-height: 1;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 14.5px; font-family: inherit; line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 165, 93, .16);
}
.textarea { resize: vertical; min-height: 84px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

/* ---------- badges / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid transparent;
}
.chip-brand { background: rgba(59, 165, 93, .12); color: var(--brand); }
.chip-pro { background: linear-gradient(120deg, #ffd76e, #ff9d4d); color: #4a2a00; }
.chip-free { background: var(--bg-2); color: var(--muted); }
.chip-ok { background: rgba(47, 158, 91, .14); color: var(--ok); }
.chip-warn { background: rgba(208, 138, 26, .14); color: var(--warn); }
.chip-info { background: rgba(58, 123, 213, .14); color: var(--info); }
.chip-danger { background: rgba(212, 69, 63, .14); color: var(--danger); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* hairline + focus polish */
:focus-visible { outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: -.02em; font-size: 18px; flex-shrink: 0; }
.brand > span:not(.brand-mark) { white-space: nowrap; }
.brand-img {
  width: 34px; height: 34px; border-radius: 50%; display: block; flex: 0 0 auto;
  background: #fff; object-fit: cover;
  box-shadow: 0 4px 12px rgba(16, 40, 24, .18);
}
.brand-word { white-space: nowrap; }
.brand-ko {
  font-size: 10.5px; font-weight: 800; letter-spacing: .01em; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  border-radius: 999px; padding: 2px 7px; margin-inline-start: -2px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  font-size: 18px; box-shadow: 0 4px 12px rgba(59, 165, 93, .3);
}
body[data-theme="neon"] .brand-mark { box-shadow: 0 0 18px rgba(0, 229, 255, .55); }
body[data-theme="neon"] .brand-img { box-shadow: 0 0 18px rgba(0, 229, 255, .45); }

/* ---------- mascot ---------- */
.mascot { display: block; width: 100%; height: auto; }

/* ---------- English company footer ---------- */
.company-foot {
  width: min(1200px, 100% - 40px); margin: 28px auto 0; padding: 20px 0 10px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
  line-height: 1.5;
}
.cf-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); margin-bottom: 12px; flex-wrap: wrap; }
.cf-logo { width: 26px; height: 26px; border-radius: 50%; background: #fff; object-fit: cover; box-shadow: 0 2px 6px rgba(16, 40, 24, .16); }
.cf-tag { color: var(--muted); font-size: 11.8px; font-weight: 600; margin-inline-start: 2px; }
.cf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.cf-grid dt { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cf-grid dd { margin: 1px 0 0; font-size: 12.2px; color: var(--ink-2); }
.cf-grid a { color: var(--brand); font-weight: 700; text-decoration: none; }
.cf-grid a:hover { text-decoration: underline; }
.cf-note { margin-top: 13px; font-size: 11.4px; line-height: 1.55; max-width: 78em; color: var(--muted); }
.company-foot-compact { padding: 12px 0 4px; margin-top: 16px; }
.cf-line { font-size: 11.2px; line-height: 1.6; color: var(--muted); text-align: center; }
.cf-line b { color: var(--ink-2); }
.cf-line a { color: var(--brand); font-weight: 700; text-decoration: none; }
@media (max-width: 760px) {
  .cf-grid { grid-template-columns: 1fr 1fr; }
  .company-foot { width: calc(100% - 28px); margin-top: 22px; }
}
.modal .company-foot { width: 100%; margin: 4px 0 0; border-top: 0; padding: 2px 0 0; }
.modal .cf-grid { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.modal .cf-note { font-size: 11px; }
.cm-mark { width: 28px; height: 28px; border-radius: 50%; vertical-align: -6px; margin-inline-end: 4px; background: #fff; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(10, 22, 14, .52); backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-card {
  width: min(560px, 100%); max-height: min(86vh, 780px); overflow: auto;
  background: var(--card); border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 26px; position: relative;
  animation: pop .18s ease;
}
.modal-card.wide { width: min(760px, 100%); }
.modal-close { position: absolute; top: 12px; inset-inline-end: 12px; }
.modal h2 { font-size: 20px; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------- toast ---------- */
#toasts { position: fixed; z-index: 120; inset-block-end: 22px; inset-inline-end: 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); animation: pop .18s ease;
  max-width: 320px;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kbd { font-family: var(--mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.tip { font-size: 12px; color: var(--muted); }

/* switch */
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .16s ease; cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .16s ease;
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
body[dir="rtl"] .switch input:checked + span::after { transform: translateX(-18px); }

.pk-costume > g { display: none; }
.pk-costume > g.on { display: block; }

/* ---------- independent add-on / 3-step connect ---------- */
.hero-about { margin-top: 16px; max-width: 36em; }
.about-line { font-size: 13.6px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.about-line .chip { flex: 0 0 auto; }
.about-note { font-size: 12.2px; color: var(--muted); margin-top: 7px; line-height: 1.55; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.step-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px 18px; }
.step-num {
  position: absolute; top: -13px; inset-inline-start: 18px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 13px;
  background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: var(--brand-ink);
  box-shadow: 0 6px 14px rgba(59, 165, 93, .28);
}
.step-ico { font-size: 21px; margin-bottom: 6px; }
.step-card h3 { font-size: 14px; margin-bottom: 5px; }
.step-card p { font-size: 12.6px; color: var(--muted); line-height: 1.55; }
.steps-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.steps-note a { color: var(--brand); font-weight: 800; }
.steps.mini { gap: 10px; margin-top: 4px; }
.steps.mini .step-card { padding: 18px 12px 12px; border-radius: 14px; }
.steps.mini .step-card h3 { font-size: 12.6px; }
.steps.mini .step-card p { font-size: 11.5px; }
.mini-steps { font-size: 12.3px; color: var(--muted); margin: 10px 0 12px; }
.disclaimer { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); font-size: 12.3px; color: var(--ink-2); }
.disclaimer b { font-size: 12px; display: block; margin-bottom: 4px; }
.disclaimer p { margin-top: 4px; line-height: 1.5; }
.price-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; text-align: center; }
.foot-note { font-size: 11.5px; color: var(--muted); max-width: 46em; flex-basis: 100%; margin-top: 10px; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .steps.mini { grid-template-columns: 1fr; }
}

/* focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
