:root {
  --bg: #F5E9DA;
  --surface: #FBF3E8;
  --paper: #FFF9F1;
  --line: #EADBC8;
  --line-strong: #D9C3AB;
  --cell-line: #E2CFB8;
  --tint: #F1E1CE;
  --text: #36180F;
  --muted: #765648;
  --accent: #B4472A;
  --accent-dark: #8E3219;
  --brand: #6E2413;
  --on-accent: #FFF9F1;
  --on-accent-soft: #FBE6D6;
  --sun: #C8321E;
  --sat: #2F6DA8;
  /* 겹치는 정도 (0명 → 모두) */
  --h0: #F1E1CE;
  --h1: #EBC7A8;
  --h2: #DFA57D;
  --h3: #CF7F54;
  --h4: #B4472A;
  --h5: #7A2613;
  --display: 'Black Han Sans', 'Noto Sans KR', sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); }
a:hover { color: var(--text); }
[hidden] { display: none !important; }
.only-mobile, .narrow-only { display: none !important; }
.muted { color: var(--muted); }
.hint { font-size: 13px; line-height: 1.55; color: var(--muted); }
.error { color: var(--sun); font-size: 14px; font-weight: 700; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; }
.ico { display: inline-flex; }
:focus-visible { outline: 2.5px solid var(--text); outline-offset: 2px; }

/* 틀 */
.top, .home, main, .footer { max-width: calc(1200px + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
main { padding-top: 32px; padding-bottom: 48px; }

/* 상단 */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: 0.5px; color: var(--brand); }
.brand-text small { font-size: 12px; font-weight: 500; color: var(--muted); }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.top-nav > a:not(.btn) { padding: 12px 16px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--text); border-radius: 999px; }
.top-nav > a:not(.btn):hover { background: var(--surface); }
.top-menu { display: none; position: relative; }
.top-menu summary { list-style: none; }
.top-menu summary::-webkit-details-marker { display: none; }
.top-menu nav { position: absolute; right: 0; top: 54px; z-index: 20; width: 220px; padding: 8px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 16px 32px rgba(78, 24, 10, 0.18); display: grid; }
.top-menu nav a { padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--text); }
.top-menu nav a:hover { background: var(--bg); }

/* 버튼·입력 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 28px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--on-accent);
  font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn.small { padding: 13px 22px; font-size: 15px; gap: 8px; }
.btn.big { padding: 18px 30px; font-size: 17px; }
.btn.light { background: var(--paper); color: var(--brand); }
.btn.light:hover { background: #fff; color: var(--brand); }
.btn.dark { background: var(--text); color: var(--on-accent); }
.btn.dark:hover { background: #4a2417; }
.btn.square { height: 48px; padding: 0 20px; border-radius: 14px; font-size: 15px; }
.btn.ghost { background: var(--paper); color: var(--brand); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); color: var(--brand); }
.btn.ghost.small { padding: 9px 14px; font-size: 13px; }
.btn.wide { width: 100%; height: 56px; padding: 0 20px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.round-btn {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 0;
}
.round-btn.small { width: 44px; height: 44px; background: var(--paper); }
.round-btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.round-btn:hover { background: var(--paper); color: var(--text); }
.round-btn.accent:hover { background: var(--accent-dark); color: var(--on-accent); }
.input {
  height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--paper); font-size: 16px; color: var(--text); min-width: 0;
}
.input.big { height: 56px; padding: 0 18px; border-radius: 16px; font-size: 17px; width: 100%; }
.input::placeholder { color: #A48A7B; }
.label { font-size: 15px; font-weight: 700; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(18px, 2.5vw, 28px); min-width: 0; }

/* ---------- 홈 ---------- */
.home { display: flex; flex-direction: column; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.hero { position: relative; overflow: hidden; background: var(--accent); border-radius: 36px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 48px; align-items: center; }
.hero-deco { display: none; }
.hero-copy { position: relative; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero-pill { padding: 8px 14px; border-radius: 999px; background: var(--accent-dark); color: var(--on-accent-soft); font-size: 13px; font-weight: 700; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5vw, 70px); line-height: 1.12; color: var(--on-accent); text-wrap: balance; }
.hero p { max-width: 460px; font-size: 18px; line-height: 1.65; color: var(--on-accent-soft); }
.demo { background: var(--paper); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 24px 48px rgba(78, 24, 10, 0.28); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-head div { display: flex; flex-direction: column; gap: 4px; }
.demo-head b { font-size: 19px; }
.demo-head span { font-size: 13px; color: var(--muted); }
.demo-head em { font-style: normal; padding: 7px 12px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.demo-grid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; }
.demo-day { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 2px; white-space: nowrap; }
.demo-time { font-size: 12px; color: var(--muted); }
.demo-grid i { height: 30px; border-radius: 7px; }
.demo-grid .l0 { background: var(--h0); } .demo-grid .l1 { background: var(--h1); } .demo-grid .l2 { background: var(--h2); }
.demo-grid .l3 { background: var(--h3); } .demo-grid .l4 { background: var(--h4); } .demo-grid .l5 { background: var(--h5); }
.demo-best { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--bg); }
.demo-check { width: 44px; height: 44px; border-radius: 50%; background: var(--h5); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demo-best div { display: flex; flex-direction: column; gap: 2px; }
.demo-best small { font-size: 12px; font-weight: 700; color: var(--accent-dark); }
.demo-best b { font-size: 16px; }

.usecases { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; scroll-margin-top: 20px; }
.usecase { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--paper); }
.usecase h3 { font-size: 16px; font-weight: 700; }
.usecase p { font-size: 13px; line-height: 1.55; color: var(--muted); }

.features { display: flex; flex-direction: column; gap: 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); }
.section-head a { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 15px; font-weight: 700; text-decoration: none; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.feature-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.feature h3 { font-size: 20px; font-weight: 700; }
.feature p { font-size: 15px; line-height: 1.65; color: var(--muted); }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.cta-copy { display: flex; align-items: center; gap: 20px; flex: 1 1 420px; min-width: 0; }
.cta-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta h2 { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--brand); }
.cta p { font-size: 16px; line-height: 1.6; color: var(--muted); margin-top: 6px; }

/* 하단 */
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 40px; }
.footer::before { content: ""; flex: 0 0 100%; border-top: 1px solid var(--line); margin-bottom: 16px; }
.footer p { font-size: 14px; color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer a { padding: 12px 0; font-size: 14px; text-decoration: none; }
.tabbar { display: none; }

/* ---------- 새 일정 만들기 ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.15; }
.page-head p { font-size: 17px; color: var(--muted); margin-top: 10px; }
.create-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 24px; align-items: start; }
.create-grid .panel { padding: clamp(20px, 3vw, 32px); }
.create-left { display: flex; flex-direction: column; gap: 28px; }
.create-right { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 16px 18px; border-radius: 18px; border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--text); }
.opt b { font-size: 16px; font-weight: 700; }
.opt span { font-size: 13px; line-height: 1.5; color: var(--muted); }
.opt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.opt.on span { color: var(--on-accent-soft); }
.time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.time-row label { font-size: 14px; font-weight: 500; color: var(--muted); }

.picker { display: flex; flex-direction: column; gap: 18px; }
.picker-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 17px; font-weight: 700; padding: 0 8px; white-space: nowrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; user-select: none; -webkit-user-select: none; }
.cal-wd { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-wd.sun, .cal-day.sun:not(.on), .day-btn.sun:not(.on), .g-day .sun, .tile .sun { color: var(--sun); }
.cal-wd.sat, .cal-day.sat:not(.on), .day-btn.sat:not(.on), .g-day .sat, .tile .sat { color: var(--sat); }
.cal-day { position: relative; height: 52px; min-width: 0; padding: 0; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); color: var(--text); font-size: 16px; font-weight: 700; touch-action: none; }
.cal-day small { position: absolute; top: 3px; left: 0; right: 0; font-size: 9px; font-weight: 700; line-height: 1; color: var(--accent-dark); pointer-events: none; }
.cal-day.today { border-color: var(--text); }
.cal-day.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cal-day.on small { color: var(--on-accent-soft); }
.cal-day:disabled { opacity: 0.35; cursor: default; }
.day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day-btn { height: 72px; padding: 0; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); color: var(--text); font-size: 18px; font-weight: 700; }
.day-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.create-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.summary { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.summary small { font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.summary-text { font-size: 17px; font-weight: 700; }

.empty { max-width: 460px; margin: 40px auto; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 40px 24px; }
.empty h1 { font-family: var(--display); font-weight: 400; font-size: 28px; }

/* ---------- 일정 화면 ---------- */
.event { display: flex; flex-direction: column; gap: 28px; }
.ev-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(24px, 3.5vw, 40px); border-radius: 32px; background: var(--accent); }
.ev-hero-copy { display: flex; flex-direction: column; gap: 12px; flex: 1 1 360px; min-width: 0; }
.ev-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; color: var(--on-accent); overflow-wrap: anywhere; }
.ev-meta { font-size: 17px; color: var(--on-accent-soft); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.hero-chip { padding: 7px 14px; border-radius: 999px; background: var(--accent-dark); color: var(--on-accent-soft); font-size: 14px; font-weight: 500; }
.hero-chip.me { background: var(--paper); color: var(--brand); font-weight: 700; }
.share-box { display: flex; flex-direction: column; gap: 10px; flex: 0 1 420px; min-width: 0; padding: 18px; border-radius: 22px; background: var(--paper); }
.share-box small { font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.share-row { display: flex; align-items: center; gap: 10px; }
.share-url { flex: 1 1 auto; min-width: 0; height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 14px; background: var(--bg); font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 24px; align-items: start; }
.panels .panel { display: flex; flex-direction: column; gap: 18px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { font-size: 21px; font-weight: 700; }
.panel-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.panel-sub strong { color: var(--text); }
.save-pill { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--brand); flex-shrink: 0; }
.save-pill.busy { color: var(--muted); }
.save-pill.busy .ico { display: none; }

.login { display: flex; flex-direction: column; gap: 12px; }
.login-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.login-row .input { height: 52px; border-radius: 16px; padding: 0 16px; }
.login-row .btn { padding: 0 24px; height: 52px; }
.editor { display: flex; flex-direction: column; gap: 14px; }
.editor-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.editor-foot .push { margin-left: auto; }

/* 시간표 */
.grid-wrap { overflow-x: auto; margin: -6px; padding: 6px; }
.grid {
  --ch: 44px; --cr: 10px; --rg: 5px; --tw: 48px;
  display: grid;
  grid-template-columns: var(--tw) repeat(var(--cols), minmax(40px, 1fr));
  column-gap: 5px; row-gap: var(--rg);
  user-select: none; -webkit-user-select: none;
}
.grid.slot-30 { --ch: 26px; --cr: 7px; --rg: 3px; }
.grid.slot-15 { --ch: 16px; --cr: 5px; --rg: 2px; }
.g-corner, .g-time { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.g-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 4px; line-height: 1.2; }
.g-day span { font-size: 12px; font-weight: 500; color: var(--muted); }
.g-day b { font-size: 17px; font-weight: 700; white-space: nowrap; }
.g-time { height: var(--ch); display: flex; align-items: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grid.slot-30 .g-time, .grid.slot-15 .g-time { font-size: 12px; }
.cell { height: var(--ch); border-radius: var(--cr); }
.grid.slot-30 .cell.hour, .grid.slot-15 .cell.hour, .grid.slot-30 .g-time:not(:empty), .grid.slot-15 .g-time:not(:empty) { margin-top: 4px; }
.grid.mine .cell { border: 1.5px solid var(--cell-line); background: var(--paper); cursor: pointer; touch-action: none; }
.grid.mine .cell.on { background: var(--accent); border-color: var(--accent); }
.grid.all .cell { cursor: pointer; }
[data-level="0"] { background: var(--h0); } [data-level="1"] { background: var(--h1); } [data-level="2"] { background: var(--h2); }
[data-level="3"] { background: var(--h3); } [data-level="4"] { background: var(--h4); } [data-level="5"] { background: var(--h5); }
.cell.confirmed, .tile.confirmed { outline: 2.5px solid var(--text); outline-offset: -2.5px; }
.cell.sel, .tile.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--text); position: relative; z-index: 1; }

/* 날짜만 정하는 일정 */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; user-select: none; -webkit-user-select: none; }
.tile { min-height: 72px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.25; padding: 8px 4px; cursor: pointer; }
.tile span { font-size: 12px; font-weight: 500; color: var(--muted); }
.tile b { font-size: 17px; font-weight: 700; }
.tile em { font-style: normal; font-size: 12px; font-weight: 700; }
.tiles.mine .tile { border: 1.5px solid var(--cell-line); background: var(--paper); touch-action: none; }
.tiles.mine .tile.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tiles.mine .tile.on span, .tile[data-level="4"] span, .tile[data-level="5"] span { color: var(--on-accent-soft); }
.tile[data-level="4"], .tile[data-level="5"] { color: var(--on-accent); }

.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.legend i { width: 18px; height: 18px; border-radius: 5px; }
.legend i[data-level="0"] { border: 1px solid var(--line-strong); }
.detail { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); min-height: 62px; justify-content: center; }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.detail-head strong { font-size: 16px; }
.detail-head span { font-size: 14px; font-weight: 700; color: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.chip.yes { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip.no { background: var(--tint); color: var(--muted); font-weight: 500; text-decoration: line-through; }

.best-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 24px; padding: clamp(22px, 3vw, 32px); border-radius: 28px; background: var(--text); }
.best-main { display: flex; align-items: center; gap: 18px; flex: 1 1 420px; min-width: 0; }
.best-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.best-main div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.best-main small { font-size: 14px; font-weight: 700; color: var(--h1); }
.best-main strong { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; color: var(--on-accent); }
.best-others { flex: 0 0 100%; list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 249, 241, 0.16); display: grid; gap: 8px; }
.best-others li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--on-accent-soft); }
.best-others button { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 249, 241, 0.35); background: transparent; color: var(--on-accent); font-size: 13px; font-weight: 700; }
.best-others button:hover { background: rgba(255, 249, 241, 0.12); }

/* ---------- 안내·정책 페이지 ---------- */
.doc { max-width: 800px; margin: 8px auto 0; padding: clamp(22px, 4vw, 40px); }
.doc h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; margin-bottom: 14px; }
.doc h2 { font-size: 20px; margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 20px 0 6px; }
.doc p { margin: 0 0 12px; line-height: 1.7; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; line-height: 1.65; }
.doc li ul { margin-top: 6px; }
.doc a:not(.btn) { font-weight: 700; }
.doc .lead { font-size: 18px; color: var(--muted); }
.doc-meta { color: var(--muted); font-size: 14px; }
.doc-cta { margin-top: 28px; text-align: center; }
.contact-box { display: grid; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin: 20px 0; }
.contact-box span { font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.contact-box a { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--on-accent); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  width: max-content; max-width: calc(100vw - 32px); text-align: center; z-index: 30;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 휴대폰 ---------- */
@media (max-width: 820px) {
  :root { --gutter: 18px; }
  .only-mobile { display: flex !important; }
  .only-desktop, .wide-only { display: none !important; }
  .narrow-only { display: inline !important; }

  .top { padding-top: 22px; flex-wrap: nowrap; }
  .top-nav { display: none; }
  .top-menu { display: block; }
  .brand { gap: 10px; }
  .brand svg { width: 40px; height: 40px; }
  .brand-text b { font-size: 23px; }
  .brand-text small { font-size: 11px; }
  body[data-view="create"] .top, body[data-view="event"] .top,
  body[data-view="create"] .footer, body[data-view="event"] .footer { display: none; }
  main { padding-top: 22px; padding-bottom: 24px; }

  /* 홈 */
  .home { gap: 14px; padding-top: 14px; padding-bottom: 20px; }
  .hero { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 268px; padding: 22px; border-radius: 26px; }
  .hero-deco { position: absolute; right: -14px; bottom: -14px; display: grid; grid-template-columns: repeat(4, 34px); gap: 5px; transform: rotate(-8deg); }
  .hero-deco i { height: 34px; border-radius: 8px; }
  .hero-copy { gap: 10px; flex: 1; width: 100%; }
  .hero-pill, .demo { display: none; }
  .hero h1 { font-size: 33px; line-height: 1.14; }
  .hero p { max-width: 210px; font-size: 13.5px; line-height: 1.55; }
  .hero .btn { margin-top: auto; height: 48px; padding: 0 22px; font-size: 15px; }
  .usecases { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 10px 8px; border-radius: 22px; }
  .usecase { align-items: center; gap: 6px; padding: 10px 0; border-radius: 16px; background: transparent; }
  .usecase:first-child { background: var(--paper); }
  .usecase svg { width: 28px; height: 28px; }
  .usecase h3 { font-size: 12px; font-weight: 500; }
  .usecase:first-child h3 { font-weight: 700; color: var(--accent-dark); }
  .usecase h3 span, .usecase p { display: none; }
  .features { gap: 12px; }
  .section-head { align-items: center; flex-wrap: nowrap; }
  .section-head h2 { font-family: inherit; font-size: 17px; font-weight: 700; }
  .section-head a { font-size: 13px; padding: 6px 0; gap: 6px; white-space: nowrap; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .feature { gap: 8px; padding: 14px 12px; border-radius: 20px; }
  .feature-icon { width: 40px; height: 40px; border-radius: 13px; }
  .feature-icon svg { width: 22px; height: 22px; }
  .feature h3 { font-size: 14px; line-height: 1.3; }
  .feature p { font-size: 12px; line-height: 1.5; }
  .cta { flex-wrap: nowrap; gap: 12px; padding: 12px 14px; border-radius: 22px; }
  .cta-copy { gap: 12px; flex: 1 1 auto; }
  .cta-icon { width: 46px; height: 46px; }
  .cta-icon svg { width: 22px; height: 22px; }
  .cta h2 { font-family: inherit; font-size: 14px; font-weight: 700; }
  .cta p { font-size: 12px; line-height: 1.45; margin-top: 2px; }
  .cta .btn { height: 44px; padding: 0 18px; font-size: 14px; flex-shrink: 0; }

  .footer { justify-content: center; text-align: center; padding-bottom: 20px; }
  .footer nav { justify-content: center; gap: 0 16px; }
  .footer a { padding: 8px 0; font-size: 13px; }
  body[data-view="home"], body[data-view="doc"] { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body[data-view="home"] .tabbar, body[data-view="doc"] .tabbar {
    position: fixed; left: 18px; right: 18px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 15;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    padding: 8px 6px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(78, 24, 10, 0.16);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; }
  .tabbar a.on { color: var(--accent-dark); font-weight: 700; }
  .tabbar .tabbar-new { justify-self: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent); justify-content: center; }

  /* 새 일정 */
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 26px; }
  .create-grid { gap: 14px; }
  .create-grid .create-left { background: transparent; border: 0; border-radius: 0; padding: 0; gap: 14px; }
  .create-grid .create-right { padding: 14px; border-radius: 22px; gap: 14px; }
  .field { gap: 8px; }
  .label { font-size: 14px; }
  .input.big { height: 52px; padding: 0 16px; font-size: 16px; }
  .opt-grid { gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
  .opt { height: 44px; padding: 0; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: transparent; color: var(--muted); }
  .opt b { font-size: 15px; }
  .opt span { display: none; }
  .opt.on { color: var(--on-accent); }
  .time-row { gap: 8px; padding: 10px 12px; border-radius: 16px; }
  .time-row label { font-size: 13px; }
  .time-row .input { padding: 0 8px; font-size: 15px; }
  .picker { gap: 10px; }
  .cal-title { font-size: 16px; padding: 0 4px; }
  .round-btn.small { width: 38px; height: 38px; }
  .cal-grid { gap: 5px; }
  .cal-wd { font-size: 12px; padding: 2px 0; }
  .cal-day { height: 44px; border-radius: 12px; font-size: 15px; }
  .day-picker { gap: 5px; }
  .day-btn { height: 56px; border-radius: 14px; font-size: 16px; }
  .create-foot { flex-direction: column; align-items: stretch; padding-top: 14px; }
  .create-foot .btn { height: 56px; padding: 0 20px; }
  .summary-text { font-size: 15px; }

  /* 일정 */
  .event { gap: 14px; }
  .m-head { align-items: center; gap: 12px; }
  .m-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .m-title h1 { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .m-meta { font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .tabs { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 8px; z-index: 5; }
  .tabs button { height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 700; }
  .event[data-tab="mine"] .tabs button[data-for="mine"],
  .event[data-tab="all"] .tabs button[data-for="all"] { background: var(--accent); color: var(--on-accent); }
  .panels { gap: 0; }
  .panels .panel { background: transparent; border: 0; border-radius: 0; padding: 0; gap: 14px; }
  .event[data-tab="mine"] .panel-all, .event[data-tab="all"] .panel-mine, .event[data-tab="mine"] .best-bar { display: none; }
  .panel-head { flex-wrap: nowrap; }
  .panel-head h2 { display: none; }
  .panel-sub { margin-top: 0; font-size: 14px; line-height: 1.4; color: var(--text); }
  .panel-all .panel-head { flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
  .panel-all .panel-sub { display: none; }
  .save-pill { padding: 6px 10px; font-size: 12px; gap: 5px; }
  .login-row { grid-template-columns: 1fr 1fr; }
  .login-row .btn { grid-column: 1 / -1; }
  .grid { --tw: 34px; column-gap: 4px; --rg: 4px; grid-template-columns: var(--tw) repeat(var(--cols), minmax(36px, 1fr)); }
  .grid.mine { --ch: 48px; }
  .grid.all { --ch: 36px; --cr: 9px; }
  .grid.slot-30 { --ch: 28px; --cr: 7px; --rg: 3px; }
  .grid.slot-15 { --ch: 18px; --cr: 5px; --rg: 2px; }
  .g-corner, .g-time { background: var(--bg); }
  .g-day span { font-size: 11px; }
  .g-day b { font-size: 16px; }
  .g-time { font-size: 12px; }
  .cell.sel, .tile.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4.5px var(--text); }
  .legend { font-size: 11px; gap: 5px; }
  .legend i { width: 16px; height: 16px; border-radius: 4px; }
  .detail { padding: 12px 14px; gap: 8px; background: var(--surface); }
  .detail-head strong { font-size: 15px; }
  .detail-head span { font-size: 13px; }
  .chips { gap: 6px; }
  .chip { padding: 5px 11px; font-size: 12px; }
  .best-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; border-radius: 24px; }
  .best-main { flex: none; }
  .best-icon { display: none; }
  .best-main small { font-size: 12px; }
  .best-main strong { font-size: 22px; }
  .best-bar .btn { height: 50px; padding: 0 20px; font-size: 16px; }
  .best-others { padding-top: 12px; }
  .best-others li { font-size: 13px; }
  .doc { border-radius: 22px; }
}

@media (max-width: 380px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta p { display: none; }
}
