/* 토칸비 첫 화면. 외부 글꼴·스크립트를 부르지 않는다(docs/calendar-v0.md 15-5). */
:root {
  --bg: #f7f6f2; --surface: #ffffff; --ink: #1c2126; --muted: #5d6670; --line: #dcdad2;
  --accent: #0b6b5d; --accent-ink: #ffffff; --soft: #e2f1ee;
  --festival: #a35a00; --holiday: #c0342b;
  --font: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Hiragino Sans", "Noto Sans CJK KR", "Malgun Gothic", "Yu Gothic", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b; --surface: #1d2327; --ink: #eceeef; --muted: #a2abb3; --line: #333b41;
    --accent: #5fc9b6; --accent-ink: #06251f; --soft: #1f3a35;
    --festival: #e8a650; --holiday: #ff8479; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top, main, footer { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 6px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.langs { display: flex; gap: 2px; flex-wrap: wrap; }
.langs button { border: 0; background: none; padding: 6px 9px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.langs button[aria-pressed="true"] { color: var(--ink); font-weight: 700; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

section { margin-top: 18px; }
.find label { display: block; font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; text-wrap: balance; }
.searchbox { position: relative; }
#q { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 17px; }
#q:focus { border-color: var(--accent); outline: none; }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.suggest button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 11px 14px; }
.suggest button:hover, .suggest button:focus { background: var(--soft); }
.suggest small, .suggest .none { color: var(--muted); }
.suggest .none { padding: 11px 14px; margin: 0; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; line-height: 1.3; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.active-artist { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--soft); border-radius: 12px; padding: 8px 12px; font-size: 15px; }
.active-artist strong { font-weight: 700; }
.active-artist button { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 2px 4px; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head h1 { font-size: 18px; margin: 0; font-variant-numeric: tabular-nums; }
.cal-head button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: none; font-size: 20px; line-height: 1; }
.cal-head button:disabled { opacity: .3; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dow span { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.day { aspect-ratio: 1 / 1; min-height: 44px; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; font-variant-numeric: tabular-nums; }
.day:hover { background: var(--soft); }
.day.off { color: var(--muted); opacity: .45; }
.day.hol .n { color: var(--holiday); font-weight: 700; }
.day.today .n { text-decoration: underline; text-underline-offset: 3px; }
.day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.day[aria-pressed="true"] .n { color: inherit; }
.day[aria-pressed="true"] .dot { background: var(--accent-ink); }
.dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--accent); }
.dot.festival { background: var(--festival); }
.dot.holiday { background: var(--holiday); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 2px 0; font-size: 12px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }

.list h2 { font-size: 16px; margin: 0 0 6px; }
#list { list-style: none; margin: 0; padding: 0; }
#list li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 12px 2px; }
button.row:hover { background: var(--soft); }
.row .when { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.row .what { min-width: 0; }
.row .title { font-weight: 600; overflow-wrap: anywhere; }
.row .meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row .who { font-size: 13px; color: var(--accent); }
.tag { display: inline-block; font-size: 11px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-right: 6px; vertical-align: 1px; }
.tag.festival { color: var(--festival); }
.tag.holiday { color: var(--holiday); }
.more { margin: 10px 0 0; width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.status { color: var(--muted); font-size: 14px; }

footer { margin-top: 36px; padding-bottom: 32px; border-top: 1px solid var(--line); padding-top: 14px; }
footer p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }

dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 20px 18px 18px; }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog .x { position: sticky; float: right; top: 0; margin: -8px -6px 0 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 20px; line-height: 1; }
dialog h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
dialog .sub { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
dialog dl { margin: 12px 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
dialog dt { color: var(--muted); }
dialog dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.btn { display: inline-block; border: 1px solid var(--accent); color: var(--accent); background: none; border-radius: 10px; padding: 9px 13px; font-size: 14px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.srcline { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; overflow-wrap: anywhere; }
.who-links { display: flex; flex-wrap: wrap; gap: 6px; }
dialog ul.mini { list-style: none; padding: 0; margin: 10px 0 0; }
dialog ul.mini li { border-top: 1px solid var(--line); }

@media (max-width: 420px) {
  .row { grid-template-columns: 78px 1fr; }
  .find label { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .day, .chip, .suggest button { transition: background-color .12s; }
}

/* about */
.about h1 { font-size: 22px; margin: 18px 0 6px; }
.about h2 { font-size: 15px; color: var(--muted); margin: 26px 0 6px; }
.about p { margin: 0 0 10px; max-width: 65ch; }

/* 정적 검색용 페이지(/ko/, /ja/, /en/, /zh/): 새 선택자만 추가, 기존 화면은 그대로 */
.pglangs a { padding: 6px 9px; border-radius: 8px; font-size: 14px; color: var(--muted); text-decoration: none; }
.pglangs a[aria-current="page"] { color: var(--ink); font-weight: 700; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pg h1 { font-size: 22px; margin: 18px 0 8px; }
.pg h2 { font-size: 15px; color: var(--muted); margin: 26px 0 8px; }
.pg p { margin: 0 0 10px; max-width: 65ch; }
.pg ul.plain { list-style: none; margin: 0 0 10px; padding: 0; }
.pg ul.plain li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.pg .meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pg .when { font-size: 13px; color: var(--muted); }
.pg .what { font-weight: 600; overflow-wrap: anywhere; }
.pg .btn { display: inline-block; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.pg .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
