:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --line: #e3e3e0;
  --accent: #1f4e79;
  --accent-text: #ffffff;
  --buy: #03c75a;
  --warn: #b3261e;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --card: #1c1c1f;
    --text: #ececee;
    --muted: #9a9aa0;
    --line: #2e2e33;
    --accent: #6ea8dc;
    --accent-text: #0b1520;
    --warn: #f28b82;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
  word-break: keep-all;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 480px; }
.center { text-align: center; padding-top: 15vh; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 800; letter-spacing: .08em; text-decoration: none; color: var(--text); }
.foot { padding: 40px 0; font-size: 14px; }

.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 10px 18px;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--warn); border: 1px solid var(--line); }
.btn.sm { padding: 5px 10px; font-size: 14px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(24px, 5vw, 34px); margin: 0 0 8px; }
.ex { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.searchbar { display: flex; gap: 8px; margin-top: 16px; }
.searchbar input { flex: 1; font-size: 17px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.watch-head { display: flex; flex-direction: column; gap: 2px; }
/* 브랜드는 작은 회색 대문자, 모델명은 크고 굵게 */
.brand { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.watch-name { font-size: 20px; font-weight: 700; line-height: 1.3; }
.ref { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.sizes { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.size { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.size b { font-size: 20px; }
.note { font-size: 12.5pt; color: var(--muted); margin: 0 0 8px; } /* 비고: 10.5pt(14px)에서 2pt 키움 */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.product { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.product img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--line); flex: none; }
.product .info { min-width: 0; flex: 1; }
.product .pname { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product .price { font-weight: 700; font-size: 14px; }
.buy { background: var(--buy); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 4px; }
.empty { text-align: center; padding: 32px 16px; }

.chat-fab { position: fixed; right: 16px; bottom: 16px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.2); cursor: pointer; }
.chat { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head button { border: 0; background: none; color: var(--text); font-size: 18px; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; }
.msg.bot { background: var(--bg); align-self: flex-start; }
.msg.me { background: var(--accent); color: var(--accent-text); align-self: flex-end; }
.msg .products { grid-template-columns: 1fr; margin-top: 8px; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.chat-note { margin: 0; padding: 0 12px 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 520px) {
  .searchbar { flex-direction: column; }
}
