/* 살롱로그 — the 예약장 (the shop's paper appointment book) as a stylesheet.
   Paper stock, ruled hour columns, 먹 ink, one highlighter. Self-hosted Pretendard Bold for display;
   the Korean system stack for text (zero bytes, instantly legible on the owner's own phone).
   No third-party requests: the font ships in public/fonts/. Read docs/identity.md before editing. */
@font-face {
  font-family: "Pretendard Display";
  src: url("/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17161a;
  --ink-soft: #514d46;
  --ink-faint: #6b665c;   /* ≥5.3:1 on paper — measured, not eyeballed */
  --paper: #fbf8f1;          /* 모조지 cream */
  --panel: #fffdf8;
  --line: #e4dfd3;
  --line-strong: #cdc6b6;
  --accent: #c9d92b;         /* 형광펜 연두 — the marker in the 예약장 */
  --accent-soft: #f1f5cf;
  --stamp: #4a5568;          /* the 시술완료 stamp */
  --stamp-soft: #edf0f4;
  --brick: #a03a2a;          /* 취소 · 노쇼 */
  --brick-soft: #f7e8e4;
  --radius: 6px;             /* paper is squared off, not pill-shaped */
  --rule: 1px solid var(--line);
  --display: "Pretendard Display", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --text: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

h1, h2, h3, .brand, .tt-head strong, .stat-v { font-family: var(--display); }
h1 { font-size: 1.55rem; line-height: 1.3; margin: 1.2rem 0 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.12rem; margin: 1.4rem 0 0.5rem; }
h3 { font-size: 0.98rem; margin: 1rem 0 0.3rem; }
p { margin: 0.5rem 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 3px; }
a:hover { background: var(--accent-soft); }
.lede { color: var(--ink-soft); font-size: 1.02rem; }
.fine, .hint { color: var(--ink-faint); font-size: 0.86rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

/* --- header / nav ------------------------------------------------------------------------------ */
.pubhead, .apphead { background: var(--panel); border-bottom: 2px solid var(--ink); }
.headrow { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.brand:hover { background: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 3px;
  background: var(--ink); color: var(--paper); font-size: 0.74rem; font-weight: 700;
  box-shadow: inset 0 -4px 0 var(--accent);
}
.pubnav, .appnav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.94rem; }
.appnav { overflow-x: auto; }
.pubnav a, .appnav a { text-decoration: none; color: var(--ink-soft); padding: 4px 2px; }
.pubnav a:hover, .appnav a:hover { background: none; color: var(--ink); }
.pubnav a.here, .appnav a.here { color: var(--ink); font-weight: 700; box-shadow: inset 0 -5px 0 var(--accent); }
.demobar { background: var(--accent); color: var(--ink); font-size: 0.86rem; padding: 6px 16px; text-align: center; font-weight: 600; }
.inline { display: inline; }
.linkish { background: none; border: 0; color: var(--ink-soft); font: inherit; cursor: pointer; padding: 4px 2px; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* --- landing ----------------------------------------------------------------------------------- */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 1.9rem; margin-top: 0.4rem; line-height: 1.25; }
.hero .lede { max-width: 48ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.kicker { display: inline-block; font-size: 0.82rem; letter-spacing: 0.02em; color: var(--ink); font-weight: 700; background: var(--accent); padding: 2px 8px; }

.btn {
  display: inline-block; padding: 9px 15px; border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #000; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: 0.85rem; font-weight: 500; }
.btn.danger { color: var(--brick); border-color: var(--brick); text-decoration: none; }
button.btn { cursor: pointer; font: inherit; }

.card { background: var(--panel); border: var(--rule); border-top: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.card > :first-child { margin-top: 0; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.statrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
@media (min-width: 700px) { .statrow { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--panel); border: var(--rule); border-radius: var(--radius); padding: 10px 12px; }
.stat-v { display: block; font-size: 1.22rem; font-weight: 700; }
.stat-l { display: block; color: var(--ink-faint); font-size: 0.82rem; }
.stat-h { display: block; color: var(--ink-soft); font-size: 0.78rem; }
.ticks { padding-left: 1.1rem; margin: 0.4rem 0; }
.ticks li { margin: 0.3rem 0; }
.ticks li::marker { color: var(--accent); }

/* --- forms ------------------------------------------------------------------------------------- */
label { display: block; margin: 10px 0; font-size: 0.9rem; color: var(--ink-soft); }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  display: block; width: 100%; max-width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}
textarea { min-height: 70px; }
form.stack { max-width: 460px; }
form.rowform { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 10px 0; }
form.rowform label { margin: 0; }
form.rowform input, form.rowform select { width: auto; min-width: 140px; }
.flash { padding: 9px 12px; border-radius: var(--radius); margin: 12px 0; font-size: 0.92rem; border-left: 5px solid var(--ink); }
.flash.ok { background: var(--accent-soft); }
.flash.err { background: var(--brick-soft); border-color: var(--brick); color: #7a2b1e; }
.flash.info { background: var(--stamp-soft); }

/* --- tables (they are ruled sheets) ------------------------------------------------------------ */
.tablewrap { overflow-x: auto; margin: 10px 0; border: var(--rule); border-radius: var(--radius); background: var(--panel); }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.grid th, table.grid td { text-align: left; padding: 7px 10px; border-bottom: var(--rule); vertical-align: top; }
table.grid th { background: #f3efe4; border-bottom: 2px solid var(--ink); font-family: var(--display); font-size: 0.8rem; color: var(--ink); white-space: nowrap; }
table.grid tr:last-child td { border-bottom: 0; }
td.empty { color: var(--ink-faint); text-align: center; padding: 16px; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 0.76rem; border: 1px solid var(--line-strong); color: var(--ink-soft); background: #f7f3e9; }
.badge.booked { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.badge.done { background: var(--stamp-soft); border-color: #c3ccd8; color: #2f3a48; }
.badge.cancelled, .badge.no_show { background: var(--brick-soft); border-color: var(--brick); color: #7a2b1e; }
.badge.paid { background: var(--accent); border-color: var(--ink); color: var(--ink); font-weight: 700; }
.badge.requested { background: #fdf6e3; border-color: var(--line-strong); color: var(--ink-soft); }
.badge.free { background: #f4f7ef; border-color: #d5dfc8; color: #3f4a34; }

/* --- the 예약장: a real timetable, one row per slot ------------------------------------------- */
.calbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 10px 0; }
.calbar .nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.daygrid { display: grid; gap: 12px; }
@media (min-width: 860px) { .daygrid.two { grid-template-columns: 1fr 1fr; } }

.tt { border: var(--rule); border-top: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.tt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 12px; border-bottom: var(--rule); background: #f3efe4; }
.tt-head strong { font-size: 0.98rem; }
/* One row per slot; a booking occupies as many rows as its duration needs, so a 180-minute perm is
   visibly three hours of the day rather than one small chip. */
.tgrid { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-auto-rows: 42px; grid-auto-flow: row; }
.tlabel { grid-column: 1; padding: 2px 6px; font-family: var(--display); font-size: 0.74rem; color: var(--ink-soft); border-top: var(--rule); border-right: 2px solid var(--line); font-variant-numeric: tabular-nums; text-align: right; }
.tgrid > .tlabel:first-child { border-top: 0; }
.tcell { grid-column: 2; border-top: var(--rule); padding: 3px; min-width: 0; }
.tcell.free { display: flex; align-items: center; padding-left: 8px; }
.tcell.free .addslot { font-size: 0.8rem; color: var(--ink-faint); text-decoration: none; }
.tcell.free:hover { background: var(--accent-soft); }
.tcell.free:hover .addslot { color: var(--ink); font-weight: 600; }
.tcell.busy { background: repeating-linear-gradient(45deg, #f6f2e6, #f6f2e6 6px, #efe9da 6px, #efe9da 12px); }
.tcell.drop { background: var(--accent-soft); outline: 2px dashed var(--ink); outline-offset: -3px; }

/* the booking block; a paid 예약금 gets the highlighter stroke (the signature detail) */
.bk { position: relative; display: block; height: 100%; padding: 4px 8px; border-radius: 4px; background: #fff; border: 1px solid var(--line-strong); border-left: 4px solid var(--ink); text-decoration: none; color: inherit; overflow: hidden; }
.bk:hover { background: var(--accent-soft); }
.bk .bk-time { display: block; font-size: 0.74rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bk .bk-svc { display: block; font-family: var(--display); font-size: 0.9rem; }
.bk .bk-meta { display: block; font-size: 0.76rem; color: var(--ink-soft); }
.bk.paid { border-left-color: var(--accent); }
.bk.paid::before {
  /* exactly what an owner does with a 형광펜: a slightly crooked stroke across the ones who paid */
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 42%;
  background: var(--accent); opacity: 0.55; transform: rotate(-0.8deg); z-index: 0;
}
.bk > * { position: relative; z-index: 1; }
.bk.done { border-left-color: var(--stamp); }
.bk.cancelled, .bk.no_show { background: var(--brick-soft); border-left-color: var(--brick); text-decoration: line-through; }
.bk[draggable="true"] { cursor: grab; }
.bk.dragging { opacity: 0.45; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(152px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.weekcol { border: var(--rule); border-top: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); min-width: 152px; }
.weekcol h3 { margin: 0; padding: 7px 9px; font-size: 0.82rem; border-bottom: var(--rule); background: #f3efe4; }
.weekcol h3 a { text-decoration: none; color: inherit; }
.weekcol .rows { padding: 4px; }
.weekcol .bk { height: auto; margin: 3px 0; }
.todaymark { box-shadow: inset 0 0 0 2px var(--accent); }
.todaymark h3 { background: var(--accent); }
.todaymark h3::after { content: " 오늘"; font-weight: 400; }

/* --- misc -------------------------------------------------------------------------------------- */
.note { background: var(--accent-soft); border: 1px solid var(--accent); border-left: 5px solid var(--ink); color: var(--ink); padding: 9px 12px; border-radius: var(--radius); font-size: 0.88rem; }
.hint { color: var(--ink-faint); font-size: 0.83rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.stack-tight > * { margin: 4px 0; }
.photo { max-width: 100%; border-radius: 4px; border: var(--rule); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
a.pill, span.pill { display: inline-block; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 0.85rem; color: var(--ink-soft); background: var(--panel); }
a.pill.here { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.legal h2 { margin-top: 1.6rem; }
.legal p, .legal li { font-size: 0.94rem; }
.foot { border-top: 2px solid var(--ink); margin-top: 36px; padding: 18px 0 30px; background: var(--panel); }
.foot p { margin: 4px 0; font-size: 0.85rem; color: var(--ink-soft); }
.foot-name { font-family: var(--display); color: var(--ink); }
.foot-legal, .foot-fine { color: var(--ink-faint); font-size: 0.8rem; }
/* A screenshot of a dense app screen needs the full container width to be readable; two of them
   side by side at 1080 px is 500 px each, which is a thumbnail, not evidence. */
.shots { display: grid; gap: 22px; margin: 18px 0; }
.shots figure { margin: 0; }
.shots img, .guide-hero img { display: block; width: 100%; height: auto; border: var(--rule); border-top: 2px solid var(--ink); border-radius: var(--radius); background: var(--panel); }
.shots figcaption, .guide-hero figcaption { margin-top: 6px; }
.guide-hero { display: grid; gap: 16px; align-items: start; }
@media (min-width: 820px) { .guide-hero { grid-template-columns: 1.1fr 0.9fr; } }

@media print {
  .pubhead, .apphead, .foot, .actions, .calbar, .btn, form { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card, .tt, .tablewrap { break-inside: avoid; border-color: #999; }
  a { color: #000; text-decoration: none; }
  .bk.paid::before { opacity: 0.35; }
}
