/* ============================================================
   모찌떡집 — 디자인 토큰
   색 이름은 빵집 재료에서 따왔어요. 글자색은 모두 배경 대비 4.5:1 이상(WCAG AA).
   ============================================================ */
:root {
  /* 바탕 (60%) — 우유식빵 속살, 버터크림 */
  --bg: #FFF8EE;
  --bg-2: #FBEBD3;
  --surface: #FFFDF8;
  --field: #FFFFFF;
  /* 보조 (30%) — 버터, 딸기우유, 피스타치오 */
  --butter: #FFE9A6;
  --butter-soft: #FFF2CF;
  --butter-line: #F1D99A;
  --blush: #F8E0D6;
  --blush-line: #EEC8BB;
  --pista: #EEF3DF;
  --pista-line: #D6E1BA;
  /* 선 */
  --line: #EEDFC9;
  --line-2: #DFCAAD;
  /* 글자 — 코코아 / 모카 / 라떼 */
  --ink: #3B2A1E;      /* 13:1 */
  --ink-2: #6B5140;    /* 6.9:1 */
  --ink-3: #87695A;    /* 4.7:1 — 흰·크림 바탕에서만 */
  /* 강조 (10%) — 구운 크러스트 */
  --crust: #A9592A;    /* 흰 글자 5.1:1 */
  --crust-d: #8F4A21;  /* 글자용 6.3:1 */
  --crust-soft: #FCEBDB;
  --berry: #A8452F;    /* 필독·경고 5.6:1 */
  --matcha: #4E6B2E;
  --caramel: #9A6A1F;

  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(91, 58, 31, .07);
  --shadow: 0 1px 2px rgba(91, 58, 31, .06), 0 12px 28px -16px rgba(91, 58, 31, .3);
  --shadow-pop: 0 2px 6px rgba(91, 58, 31, .08), 0 24px 60px -20px rgba(59, 42, 30, .45);

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 64px;
  --gutter: 20px;
  color-scheme: light;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.7 var(--sans); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--crust) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }
.sp { flex: 1; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; position: relative; display: inline-block; }
.dot.on { background: #5E8A2F; }
.dot.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #5E8A2F; opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 99px; text-decoration: none;
  font-weight: 700; font-size: 16px; background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-2); transition: transform .18s var(--ease), background .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--crust); border-color: var(--crust); color: #fff; }
.btn.primary:hover { background: var(--crust-d); border-color: var(--crust-d); }
.btn.outline { background: var(--surface); border-color: var(--crust); color: var(--crust-d); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--berry); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 19px; height: 19px; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-2); }

/* ============ nav (위에 붙는 메뉴) ============ */
.nav {
  position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1080px; margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.brand { display: none; font-weight: 800; font-size: 19px; letter-spacing: -.04em; color: var(--ink); }
.tabs { flex: 1; display: flex; gap: 2px; padding: 4px; border-radius: 99px; background: var(--bg-2); }
.tab {
  flex: 1; min-width: 0; min-height: 44px; display: grid; place-items: center; padding: 0 4px; border-radius: 99px;
  font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow-sm); }
.nav-edit { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--crust-soft); color: var(--crust-d); }
@media (min-width: 720px) {
  .nav-in { padding: 0 var(--gutter); }
  .brand { display: block; }
  .tabs { flex: none; margin-left: auto; }
  .tab { min-width: 84px; padding: 0 18px; }
}

/* ============ hero (첫 화면) ============ */
.hero {
  position: relative; min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; overflow: hidden;
  background:
    radial-gradient(90% 55% at 50% 0%, #FFEFC4 0%, rgba(255, 239, 196, 0) 70%),
    radial-gradient(60% 40% at 100% 100%, #FBE1D4 0%, rgba(251, 225, 212, 0) 70%),
    var(--bg);
}
.boot { margin: auto; color: var(--ink-2); }
.hero-in {
  flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 28px var(--gutter) 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.status {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 7px 16px 7px 14px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.status.on { color: var(--ink); }
.handle { margin: 0; font-size: 16px; font-weight: 600; color: var(--crust-d); letter-spacing: 0; }
.brand-title { display: inline-block; margin: 2px 0 0; line-height: .9; }
.brand-title .ko {
  display: block; font-weight: 800; font-size: clamp(38px, min(11.25vw, 8.5svh), 86px); letter-spacing: -.045em; color: var(--ink);
  padding-right: .06em;
}
.brand-title .ko em { font-style: normal; color: var(--crust); }
.brand-title .en {
  display: block; text-align: right; margin-top: .12em; padding-right: .1em;
  font-family: var(--serif); font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100, "opsz" 72;
  font-size: clamp(32px, 9vw, 64px); line-height: 1; letter-spacing: -.02em; color: var(--crust);
}
.lede { max-width: 30em; margin: 18px auto 0; font-size: 17px; color: var(--ink-2); }

.open-list { width: 100%; max-width: 460px; margin-top: 30px; text-align: left; }
.open-h { display: flex; align-items: center; gap: 9px; margin: 0 4px 10px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.open-list ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.open-list li + li { border-top: 1px solid var(--line); }
.open-row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px 12px 12px; text-decoration: none; transition: background .15s; }
.open-row:hover { background: var(--butter-soft); }
.open-row .thumb { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--bg-2); flex: none; }
.open-row .thumb img, .open-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.open-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.open-row .tx b { font-size: 16.5px; }
.open-row .tx small { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-row .pr { font-weight: 700; font-size: 15px; color: var(--crust-d); font-variant-numeric: tabular-nums; white-space: nowrap; }
.open-row .go { width: 18px; height: 18px; color: var(--ink-3); }
.open-empty { margin: 0; padding: 22px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink-2); text-align: center; }
.ov-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.ov-link .i { width: 17px; height: 17px; }
.ov-link:hover { color: var(--crust-d); }

/* 샘플 띠 — 오른쪽으로 계속 흐름 */
.marquee { position: relative; padding: 4px 0 calc(22px + env(safe-area-inset-bottom)); overflow: hidden; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 28px; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.mq-track { display: flex; width: max-content; animation: mq var(--dur, 48s) linear infinite; }
.marquee:hover .mq-track, .marquee:active .mq-track { animation-play-state: paused; }
.mq-half { display: flex; gap: 12px; padding-right: 12px; }
.mq-tile { flex: none; height: 148px; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-sm); }
.mq-tile img, .mq-tile video { width: 100%; height: 100%; object-fit: cover; }
@keyframes mq { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (min-width: 720px) { .mq-tile { height: 172px; } }
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; }
  .marquee { overflow-x: auto; }
  .dot.on::after { animation: none; }
}

/* ============ sections ============ */
.sec { padding: 56px 0 64px; scroll-margin-top: var(--nav-h); }
.sec.band { background: var(--bg-2); }
.sec-h { margin: 0 0 22px; }
.kicker { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100; font-size: 19px; line-height: 1.2; color: var(--crust-d); }
.sec-h h2 { margin: 2px 0 0; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.035em; }
.sub-h { margin: 36px 0 14px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.empty { color: var(--ink-2); text-align: center; padding: 28px 0; margin: 0; }

/* 읽는 글 */
.prose { font-size: 16px; line-height: 1.8; color: var(--ink); }
.prose p { margin: 0 0 .85em; }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 .85em; padding-left: 1.2em; }
.prose li { margin: .2em 0; }
.prose b, .scope b, .steps b, .q-help b { font-weight: 700; background: linear-gradient(transparent 58%, var(--butter) 58%); padding: 0 1px; }
.prose a { color: var(--crust-d); text-underline-offset: 3px; }

/* ============ 타입 (게시글 모음) ============ */
.notice-line {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 18px; margin: 0 0 28px;
  border-radius: 16px; background: var(--butter-soft); border: 1px solid var(--butter-line);
  text-decoration: none; color: var(--ink); transition: background .15s;
}
.notice-line:hover { background: var(--butter); }
.notice-line .must { flex: none; font-weight: 800; font-size: 16px; color: var(--berry); }
.notice-line .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15.5px; }
.notice-line .tt { font-weight: 700; }
.notice-line .sub { color: var(--ink-2); }
.notice-line .cnt { flex: none; font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--surface); border-radius: 99px; padding: 2px 9px; }
.notice-line .i { width: 18px; height: 18px; color: var(--ink-2); }

.posts { display: grid; gap: 36px; }
@media (min-width: 720px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; } }
.post-link { display: block; text-decoration: none; color: inherit; }
.post-cover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.post-cover img, .post-cover video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .5s var(--ease); }
.post-link:hover .post-cover img { transform: scale(1.03); }
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 100%; }
.mosaic > :first-child { grid-row: span 2; }
.single { height: 100%; }
.cover-empty { height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); }
.more-badge { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 99px; background: rgba(59, 42, 30, .72); color: #fff; font-size: 13px; font-weight: 700; }
.post-meta { padding: 16px 2px 0; }
.row1 { display: flex; align-items: baseline; gap: 12px; }
.row1 h3 { flex: 1; margin: 0; font-size: 21px; line-height: 1.35; font-weight: 800; letter-spacing: -.025em; }
.row1 .price { flex: none; font-size: 17px; font-weight: 800; color: var(--crust-d); font-variant-numeric: tabular-nums; }
.post-sum { margin: 4px 0 0; color: var(--ink-2); font-size: 15.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags span { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border-radius: 99px; padding: 4px 11px; }

/* ============ 안내 ============ */
.must-read { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--berry); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.must-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; color: var(--berry); }
.must-h .i { width: 20px; height: 20px; }
.scope { display: grid; gap: 12px; }
@media (min-width: 720px) { .scope { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scope-card { border-radius: var(--r); padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.scope-card.good { background: var(--pista); border-color: var(--pista-line); }
.scope-card.meh { background: var(--butter-soft); border-color: var(--butter-line); }
.scope-card.no { background: var(--blush); border-color: var(--blush-line); }
.scope-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16.5px; line-height: 1.35; }
.scope-h b { background: none !important; }
.lv { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.lv .i { width: 16px; height: 16px; stroke-width: 2.6; }
.good .lv { background: var(--matcha); }
.meh .lv { background: var(--caramel); }
.no .lv { background: var(--berry); }
.scope ul { margin: 12px 0 0; padding-left: 1.15em; font-size: 15.5px; line-height: 1.7; }
.scope li { margin: 5px 0; }

/* 접었다 펴는 목록 */
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.acc-i + .acc-i { border-top: 1px solid var(--line); }
.acc-i summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 18px; cursor: pointer; font-weight: 700; font-size: 16.5px; line-height: 1.45; }
.acc-i summary::-webkit-details-marker { display: none; }
.acc-i summary:hover { background: var(--bg); }
.acc-i summary .t { flex: 1; }
.acc-i summary .d { font-size: 13.5px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.acc-i .chev { color: var(--ink-2); transition: transform .25s var(--ease); }
.acc-i[open] .chev { transform: rotate(180deg); }
.acc-i .prose { padding: 0 18px 20px; }
.acc-i.hot { background: var(--butter-soft); }
.badge { display: inline-block; margin-right: 8px; padding: 1px 9px; border-radius: 99px; background: var(--berry); color: #fff; font-style: normal; font-size: 12.5px; font-weight: 700; vertical-align: 2px; }
.new { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 6px; background: var(--butter); color: var(--crust-d); font-size: 11.5px; font-weight: 800; vertical-align: 2px; }

/* ============ 신청 ============ */
.closed-box { display: flex; gap: 10px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px; border-radius: var(--r); background: var(--blush); border: 1px solid var(--blush-line); font-weight: 600; }
.steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 15.5px; line-height: 1.55; }
.steps .n { flex: none; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%; display: grid; place-items: center; background: var(--butter); color: var(--crust-d); font-weight: 800; font-size: 14px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } .steps li { flex-direction: column; } }

.apply-card { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px 24px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .apply-card { padding: 30px 32px 32px; } }
.pick .lbl { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sum { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.sum-h { display: flex; align-items: center; gap: 10px; }
.sum-h b { flex: 1; font-size: 17px; }
.sum-edit { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; font-size: 14px; font-weight: 700; color: var(--crust-d); text-decoration: none; }
.sum-edit .i { width: 16px; height: 16px; }
.sum ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 15px; color: var(--ink-2); }
.sum li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sum li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-t { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed var(--line-2); font-weight: 700; }
.sum-t b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.apply-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r); background: var(--crust-soft); color: var(--ink); font-size: 15px; line-height: 1.6; }
.apply-note .i { color: var(--crust-d); margin-top: 2px; width: 18px; height: 18px; }

.qs { list-style: none; margin: 8px 0 0; padding: 0; }
.q { padding: 20px 0 4px; }
.q + .q { border-top: 1px solid var(--line); }
.q-l { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.qn { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); font-size: 13.5px; font-weight: 800; }
.req { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--berry); background: var(--blush); padding: 1px 8px; border-radius: 99px; }
.q-help { margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.q input, .q textarea, .f input:not(.switch), .f textarea, .f select {
  display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--field); font-size: 16px; line-height: 1.6; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; outline: 0;
}
.q textarea, .f textarea { resize: vertical; min-height: 96px; }
.q input:focus, .q textarea:focus, .f input:not(.switch):focus, .f textarea:focus, .f select:focus { border-color: var(--crust); box-shadow: 0 0 0 4px color-mix(in srgb, var(--crust) 16%, transparent); }
::placeholder { color: var(--ink-3); opacity: 1; }

.agree { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); cursor: pointer; font-size: 15.5px; line-height: 1.55; }
.agree input { position: absolute; opacity: 0; pointer-events: none; }
.agree .box { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--field); display: grid; place-items: center; color: transparent; }
.agree .box .i { width: 15px; height: 15px; stroke-width: 3; }
.agree input:checked + .box { background: var(--crust); border-color: var(--crust); color: #fff; }
.agree:focus-within { outline: 3px solid color-mix(in srgb, var(--crust) 45%, transparent); outline-offset: 2px; }
.agree b { font-weight: 700; }
.apply-actions { display: grid; gap: 10px; margin-top: 22px; }
#apply-next { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1.5px dashed var(--line-2); }
.next-tip { margin: 0; text-align: center; color: var(--ink-2); font-size: 15px; }
.copied p { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 16px; border-radius: var(--r); background: var(--pista); border: 1px solid var(--pista-line); font-weight: 600; line-height: 1.55; }
.copied p .i { color: var(--matcha); margin-top: 2px; }
.copied.fail p { background: var(--blush); border-color: var(--blush-line); }
.copied details { margin-top: 8px; }
.copied summary { cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 6px 2px; min-height: 36px; }
pre { margin: 6px 0 0; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font: 14px/1.6 var(--sans); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }

.overseas { max-width: 760px; margin-top: 22px; padding: 22px 20px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
@media (min-width: 720px) { .overseas { padding: 26px 32px; } }
.ov-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 10px; font-size: 17px; }
.ov-h .en { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--crust-d); font-size: 17px; white-space: nowrap; }
.ov-h .i { color: var(--crust-d); }
.mail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.mail { flex: 1 1 250px; min-width: 0; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line-2); font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; }
.mail span { overflow-wrap: anywhere; line-height: 1.35; padding: 8px 0; }
.mail-row .btn { flex: 1 0 auto; }
.mail .i { color: var(--crust-d); }

/* ============ footer ============ */
.foot { padding: 48px 0 calc(110px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.thanks { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100; font-size: clamp(40px, 11vw, 72px); line-height: 1; letter-spacing: -.03em; }
.thanks span { color: var(--crust); }
.foot-mail { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 15.5px; }
.foot-mail a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.foot-mail .i { color: var(--crust-d); width: 18px; height: 18px; }
.foot-row { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; margin-top: 26px; font-size: 14px; color: var(--ink-2); }
.foot-row a { color: var(--ink-2); }
.mini { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px; font-size: 14px; color: var(--ink-2); }
.mini .i { width: 16px; height: 16px; }
.mini:hover { color: var(--ink); }

/* ============ 겹쳐 뜨는 페이지 (공지 / 타입 글 / 관리자) ============ */
.page { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: pageIn .26s var(--ease) both; }
@keyframes pageIn { from { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }
.page-h {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px;
  min-height: calc(var(--nav-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.page-h h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 99px; font-weight: 700; font-size: 15px; color: var(--ink-2); flex: none; }
.back:hover { background: var(--bg-2); color: var(--ink); }
.page-in { max-width: 760px; margin: 0 auto; padding: 22px var(--gutter) calc(120px + env(safe-area-inset-bottom)); }

/* 공지 페이지 */
.n-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 22px 24px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.n-card.must { border-left: 5px solid var(--berry); }
.n-card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.4; font-weight: 800; letter-spacing: -.02em; }
.n-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.n-meta .must { color: var(--berry); font-weight: 800; font-size: 15px; }
.notice-page .sub-h:first-child { margin-top: 0; }

/* 타입 글 */
.gallery { display: flex; align-items: center; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery.one { justify-content: center; }
.g-tile { position: relative; flex: none; scroll-snap-align: center; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-sm); }
/* 그림은 자르지 않고 원래 비율 그대로 */
.g-tile img, .g-tile video { width: auto; height: auto; max-height: min(62vh, 540px); max-width: min(84vw, 640px); object-fit: contain; }
.gallery.one .g-tile img, .gallery.one .g-tile video { max-width: 100%; }
.play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.play .i { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.gal-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 200px; border-radius: var(--r); background: var(--bg-2); color: var(--ink-2); }
.gal-note { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; font-size: 14px; color: var(--ink-2); }
.gal-note .i { width: 16px; height: 16px; }
.tp-head { margin: 26px 0 0; }
.tp-head h1 { margin: 0; font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -.035em; }
.tp-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 16.5px; }
.tp-head .from { color: var(--crust-d); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.facts dt { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.facts dt .i { width: 16px; height: 16px; color: var(--crust-d); }
.facts dd { margin: 3px 0 0; font-weight: 700; font-size: 15.5px; line-height: 1.45; }
.tp-desc { margin-top: 24px; }
.note-box { margin-top: 20px; padding: 16px 18px; border-radius: var(--r); background: var(--butter-soft); border: 1px solid var(--butter-line); }
.note-h { margin: 0 0 4px; font-weight: 800; font-size: 15px; color: var(--crust-d); }

/* 견적 */
.quote { margin-top: 30px; padding: 22px 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
@media (min-width: 720px) { .quote { padding: 28px 28px 24px; } }
.q-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.q-sub { margin: 20px 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.q-list { display: grid; gap: 8px; }
.q-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--field); cursor: pointer; transition: border-color .15s, background .15s; }
.q-opt:hover { border-color: var(--line-2); }
.q-opt.on { border-color: var(--crust); background: #FFF6EA; }
.q-opt:focus-within { outline: 3px solid color-mix(in srgb, var(--crust) 40%, transparent); outline-offset: 2px; }
.q-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; background: var(--field); transition: background .15s, border-color .15s; }
.mark.sq { border-radius: 8px; }
.mark .i { width: 15px; height: 15px; stroke-width: 3; }
.q-opt.on .mark { background: var(--crust); border-color: var(--crust); color: #fff; }
.q-opt .lbl { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; line-height: 1.4; }
.q-opt .pr { flex: none; font-weight: 700; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.q-opt.on .pr { color: var(--crust-d); }
.q-desc { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 400; color: var(--ink-2); line-height: 1.5; }
.stepper { flex: none; display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 99px; padding: 3px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper .qv { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.q-note { margin: 8px 4px 0; font-size: 14px; color: var(--ink-2); }
.q-note.center { text-align: center; margin-top: 12px; }
.q-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 20px 0 16px; padding-top: 16px; border-top: 1.5px dashed var(--line-2); font-weight: 700; }
.q-total b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.alpha { margin-left: 4px; font-size: 16px; font-weight: 800; color: var(--crust-d); }

/* ============ 작은 창 ============ */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: calc(56px + env(safe-area-inset-top)) 16px 16px; }
.scrim { position: absolute; inset: 0; background: rgba(59, 42, 30, .42); animation: fade .2s both; }
.sheet { position: relative; width: 100%; max-width: 460px; max-height: calc(100dvh - 90px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); animation: pop .24s var(--ease) both; }
.sheet-wrap.closing .scrim { animation: fade .18s reverse both; }
.sheet-wrap.closing .sheet { animation: pop .18s reverse both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px 22px; }
.sheet-h h3 { flex: 1; margin: 0; font-size: 18px; font-weight: 800; }
.sheet-b { padding: 4px 22px 24px; }
.sheet-b .btn { margin-top: 8px; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin: 0 0 14px; border-radius: var(--r); background: var(--butter-soft); border: 1px solid var(--butter-line); font-size: 14.5px; line-height: 1.6; }
.hint .i { color: var(--crust-d); margin-top: 2px; width: 18px; height: 18px; }

/* ============ 피드백 (신청 칸 맨 아래, 가볍게) ============ */
.fb { max-width: 760px; margin-top: 36px; padding-top: 24px; border-top: 1px dashed var(--line-2); }
.fb-h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15.5px; }
.fb-h2 .i { width: 18px; height: 18px; color: var(--crust-d); }
.fb-intro { margin: 4px 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.fb textarea { display: block; width: 100%; min-height: 84px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--field); font-size: 16px; line-height: 1.6; resize: vertical; outline: 0; transition: border-color .15s, box-shadow .15s; }
.fb textarea:focus { border-color: var(--crust); box-shadow: 0 0 0 4px color-mix(in srgb, var(--crust) 16%, transparent); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.fb-note { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.fb-send { flex: none; }
.fb-done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--pista); border: 1px solid var(--pista-line); font-size: 15px; font-weight: 600; }
.fb-done > .i { color: var(--matcha); width: 18px; height: 18px; stroke-width: 2.6; }
.fb-done > span { flex: 1 1 200px; }
.fb-limit { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.fb-limit .i { width: 18px; height: 18px; color: var(--crust-d); }
.fb-done + .fb-limit { background: none; border: 0; padding: 4px 2px 0; font-size: 13.5px; }
.fb-more { min-height: 36px; font-size: 14px; font-weight: 700; color: var(--crust-d); text-decoration: underline; text-underline-offset: 3px; }
.fb-bar { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.fb-total { font-weight: 800; font-size: 16px; }
.fb-item { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.fb-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 13.5px; color: var(--ink-2); }
.fb-h b { color: var(--ink); }
.fb-cat { padding: 1px 9px; border-radius: 99px; background: var(--butter); color: var(--crust-d); font-weight: 700; font-size: 12.5px; }
.fb-t { margin: 8px 0 0; white-space: pre-wrap; font-size: 15.5px; line-height: 1.7; }
.fb-item .acts { display: flex; gap: 8px; margin-top: 10px; }
.fb-old { margin: 18px 0 8px; }

/* ============ lightbox ============ */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(36, 26, 19, .96); display: flex; flex-direction: column; animation: fade .2s both; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 14px 12px; color: #fff; font-variant-numeric: tabular-nums; }
.lb-top button, .lb-nav button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 12px; touch-action: pan-y; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; }
.lb-nav { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px 12px max(16px, env(safe-area-inset-bottom)); }
.lb-dots { display: flex; gap: 6px; }
.lb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.lb-dots i.on { background: #fff; }

/* ============ toast (위쪽 가운데) ============ */
.toasts { position: fixed; z-index: 95; left: 50%; top: calc(var(--nav-h) + 12px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 11px 18px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-pop); animation: tin .26s var(--ease) both; text-align: center; }
.toast.err { background: var(--berry); color: #fff; }
.toast.out { animation: tout .24s ease both; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }

/* ============ 관리자 수정 ============ */
.admin .page-h h2 { font-size: 16.5px; }
.save-state { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.save-state.on { color: var(--berry); }
.save-btn { position: relative; flex: none; }
.save-btn.dirty::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--butter); border: 2px solid var(--crust); }
@media (max-width: 400px) { .save-state { display: none; } .admin .back span { display: none; } .admin .back { padding: 0 10px; } }
.admin-jump {
  position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top)); z-index: 2; display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.admin-jump::-webkit-scrollbar { display: none; }
.admin-jump button { flex: none; min-height: 38px; padding: 0 15px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.admin-jump button:hover { color: var(--ink); border-color: var(--line-2); }
.admin .page-in { max-width: 820px; }
.ag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px 22px; margin-bottom: 16px; scroll-margin-top: calc(var(--nav-h) + 72px); }
@media (min-width: 720px) { .ag { padding: 26px 28px 28px; } }
.ag-h { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.ag-d { margin: 6px 0 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.f { display: block; margin: 16px 0 0; }
.fl { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.f input:not(.switch), .f textarea, .f select { margin-top: 6px; }
.help { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.f-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.f-row > .f { min-width: 0; }
.f.tg { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding-top: 24px; }
.f-row > .f.tg:first-child { padding-top: 0; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; margin: 0; padding: 0; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; border: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .22s var(--ease); }
.switch:checked { background: var(--crust); }
.switch:checked::after { transform: translateX(20px); }
.lst { margin: 20px 0 0; }
.lst-h { margin: 0 0 8px; }
.li { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); margin-bottom: 10px; }
.li-h { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; min-height: 52px; }
.li-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; text-align: left; font-weight: 700; font-size: 15.5px; }
.li-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-t .i { flex: none; color: var(--ink-2); transform: rotate(-90deg); transition: transform .2s var(--ease); }
.li.open .li-t .i { transform: none; }
.li-t.static { font-size: 14px; color: var(--ink-2); }
.li-ops { display: flex; flex: none; }
.li-ops button { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.li-ops button:hover { background: var(--bg-2); color: var(--ink); }
.li-ops button:disabled { opacity: .3; pointer-events: none; }
.li-ops .rm:hover { color: var(--berry); }
.li-ops .i { width: 18px; height: 18px; }
.li-b { padding: 0 14px 16px; border-top: 1px solid var(--line); }
.li-b > .f:first-child, .li-b > .f-row:first-child > .f { margin-top: 12px; }
.li-b .lst .li { background: var(--surface); }
.add-btn { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--crust-d); font-weight: 700; font-size: 15px; }
.add-btn:hover { background: var(--butter-soft); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.mt { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.mt img, .mt video { width: 100%; height: 100%; object-fit: cover; }
.mt .ops { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(36, 26, 19, .6)); }
.mt .ops button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(36, 26, 19, .35); }
.mt .ops .i { width: 16px; height: 16px; }
.cover-tag { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--crust); color: #fff; font-size: 11.5px; font-weight: 700; }
.up { aspect-ratio: 3 / 4; border-radius: 12px; border: 1.5px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--crust-d); cursor: pointer; text-align: center; }
.up:hover { background: var(--butter-soft); }
.etc { display: grid; gap: 10px; margin-top: 12px; }
.etc .help { margin: 0 0 4px; }
