/* 찬장식탁 — N26 디프틱 + 괘선 표 내비 */
:root {
  --paper: #F3EEE4;
  --ink: #1F1B15;
  --soft: #5E574C;
  --rule: #1F1B15;
  --hair: rgba(31, 27, 21, .22);
  --olive: #5F6936; --olive-bg: #DADAB8;
  --wine: #7C2F2A;  --wine-bg: #EDD3CB;
  --mustard: #A97C1C; --mustard-bg: #F0DFA9;
  --serif: 'Noto Serif KR', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --mono: 'DM Mono', 'Pretendard Variable', Pretendard, -apple-system, 'Malgun Gothic', sans-serif; /* 한글은 DM Mono에 없어 Pretendard로 */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--sans); word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); letter-spacing: -0.02em; }
main, .mast, .foot { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* 상단: 상호 한 줄. 내비는 여기 두지 않는다 */
.mast { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 18px; padding-top: 22px; padding-bottom: 16px; }
.mast__name { font-size: 40px; font-weight: 800; line-height: 1.1; }
.mast__what { margin: 0; font: 500 13px/1.4 var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: .02em; }
.mast__what i { font-style: normal; color: var(--wine); }
.mast__tel { font: 500 15px/1 var(--mono); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* 디프틱: 같은 높이 두 장, 틈 없이 맞붙임 */
.diptych { display: grid; grid-template-columns: 1fr 1fr; height: clamp(320px, 56vh, 540px); border: 1px solid var(--rule); border-bottom: 0; }
.diptych__half { position: relative; margin: 0; overflow: hidden; }
.diptych__half + .diptych__half { border-left: 1px solid var(--rule); }
.diptych img { width: 100%; height: 100%; object-fit: cover; }
.diptych figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: var(--paper); border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); font: 500 12px/1.4 var(--mono); }

/* 2열×3행 괘선 표 = 내비 */
.board { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cell { position: relative; display: flex; align-items: baseline; gap: 16px; min-height: 84px; padding: 20px 56px 18px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; background: var(--paper); transition: background-color .2s; }
.cell b { flex: none; font: 800 30px/1.15 var(--serif); letter-spacing: -0.03em; }
.cell span { font: 400 13px/1.5 var(--mono); color: var(--soft); }
.cell::after { content: '→'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 20px/1 var(--mono); }
.cell[data-tone="olive"]:hover, .cell[data-tone="olive"]:focus-visible { background: var(--olive-bg); }
.cell[data-tone="wine"]:hover, .cell[data-tone="wine"]:focus-visible { background: var(--wine-bg); }
.cell[data-tone="mustard"]:hover, .cell[data-tone="mustard"]:focus-visible { background: var(--mustard-bg); }
.board[data-tone="olive"] .cell:not(:hover) { background: #E8E7D2; }
.board[data-tone="wine"] .cell:not(:hover) { background: #F2E2DC; }
.board[data-tone="mustard"] .cell:not(:hover) { background: #F4E9C9; }
.cell:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

/* 표 바로 아래 시간·전화 한 줄 */
.nowline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); font: 400 13.5px/1.5 var(--mono); }
.nowline a { font-weight: 500; text-underline-offset: 3px; }
.badge { padding: 3px 10px; border: 1px solid var(--ink); font-weight: 500; }
.badge.is-open { background: var(--olive); border-color: var(--olive); color: #fff; }
.badge.is-closed { background: var(--wine-bg); }
.intro { max-width: 40em; margin: 40px 0 56px; font: 600 21px/1.75 var(--serif); letter-spacing: -0.01em; }

/* 사업부 섹션 */
.unit { margin-bottom: 64px; border-top: 2px solid var(--rule); }
.unit__head { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid var(--hair); margin-bottom: 26px; }
.unit__no { justify-self: start; padding: 2px 8px; font: 500 13px/1.5 var(--mono); color: #fff; background: var(--ink); }
.unit[data-tone="olive"] .unit__no { background: var(--olive); }
.unit[data-tone="wine"] .unit__no { background: var(--wine); }
.unit[data-tone="mustard"] .unit__no { background: var(--mustard); }
.unit__head h2 { font-size: 34px; font-weight: 800; }
.unit__head p { margin: 0; font: 400 13px/1.5 var(--mono); color: var(--soft); text-align: right; }
.unit__body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.unit__text > p:first-child { margin-top: 0; }
.unit__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); }
.unit h3 { margin: 26px 0 6px; font-size: 19px; font-weight: 600; }
.unit h3 small { margin-left: 8px; font: 400 12.5px/1.5 var(--mono); color: var(--soft); letter-spacing: 0; }

.ledger { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule); }
.ledger caption { padding: 0 0 8px; text-align: left; font: 500 12.5px/1.5 var(--mono); color: var(--soft); }
.ledger th, .ledger td { padding: 11px 0; border-bottom: 1px solid var(--hair); vertical-align: baseline; }
.ledger th { padding-right: 16px; font-weight: 400; text-align: left; }
.ledger td { font: 500 14px/1.5 var(--mono); text-align: right; white-space: nowrap; }
.aside { margin: 16px 0 0; padding-left: 14px; border-left: 3px solid var(--mustard); color: var(--soft); font-size: 15px; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--ink); background: transparent; font: 600 15px/1 var(--sans); text-decoration: none; }
.btn:hover { background: var(--mustard-bg); }
.btn--fill { background: var(--ink); color: var(--paper); }
.btn--fill:hover { background: var(--wine); border-color: var(--wine); }

.news { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.news li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.news time { font: 500 14px/1.7 var(--mono); color: var(--olive); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cols h3 { margin-top: 0; }
.cols p { margin: 0; }
.addr { font: 600 19px/1.6 var(--serif); margin: 0 0 12px !important; }
.copy { margin-left: 8px; padding: 4px 10px; border: 1px solid var(--ink); background: var(--paper); font: 500 12px/1.4 var(--mono); cursor: pointer; vertical-align: 2px; }
.way { margin: 0; padding: 0; list-style: none; }
.way li { padding: 8px 0; border-bottom: 1px solid var(--hair); }

.foot { padding-top: 28px; padding-bottom: 40px; border-top: 2px solid var(--rule); font-size: 13.5px; color: var(--soft); }
.foot p { margin: 0; }
.foot__name { margin-bottom: 6px !important; font: 800 20px/1.3 var(--serif); color: var(--ink); }

/* 퀵메뉴: PC 오른쪽 세로 */
.quick { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 50; display: flex; flex-direction: column; border: 1px solid var(--rule); background: var(--paper); }
.quick a { display: flex; flex-direction: column; align-items: center; width: 70px; padding: 9px 4px; text-decoration: none; text-align: center; }
.quick a + a { border-top: 1px solid var(--rule); }
.quick a:first-child { background: var(--ink); color: var(--paper); }
.quick a:hover:not(:first-child) { background: var(--mustard-bg); }
.quick b { font: 700 14px/1.3 var(--sans); }
.quick span { font: 400 9.5px/1.3 var(--mono); opacity: .8; }

@media (max-width: 1240px) and (min-width: 721px) {
  main, .mast, .foot { padding-right: 104px; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  main, .mast, .foot { padding: 0 16px; }
  .mast { grid-template-columns: 1fr auto; gap: 4px 12px; padding-top: 16px; padding-bottom: 12px; }
  .mast__name { font-size: 30px; }
  .mast__what { grid-column: 1 / -1; grid-row: 2; }
  .mast__tel { font-size: 14px; }
  .diptych { grid-template-columns: 1fr; height: auto; }
  .diptych__half { height: 240px; }
  .diptych__half + .diptych__half { border-left: 0; border-top: 1px solid var(--rule); }
  .cell { flex-direction: column; gap: 4px; min-height: 92px; padding: 14px 30px 14px 14px; }
  .cell b { font-size: 22px; }
  .cell span { font-size: 11.5px; }
  .cell::after { right: 10px; top: 18px; transform: none; font-size: 16px; }
  .nowline { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; }
  .nowline .badge, .nowline > span { grid-column: 1 / -1; justify-self: start; }
  .nowline a { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--ink); text-decoration: none; }
  .intro { margin: 28px 0 40px; font-size: 18px; }
  .unit { margin-bottom: 48px; }
  .unit__head { grid-template-columns: auto 1fr; gap: 4px 12px; margin-bottom: 20px; }
  .unit__head h2 { font-size: 27px; }
  .unit__head p { grid-column: 1 / -1; text-align: left; }
  .unit__body, .cols { grid-template-columns: 1fr; gap: 28px; }
  .unit__img { aspect-ratio: 4 / 3; }
  .ledger th { font-size: 15px; }
  .ledger td { font-size: 13px; }
  .news li { grid-template-columns: 62px 1fr; gap: 10px; }
  .news time { white-space: nowrap; font-size: 13px; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .foot { padding-top: 24px; padding-bottom: 32px; }
  /* 퀵메뉴: 모바일 하단 바 3칸 */
  .quick { top: auto; bottom: 0; left: 0; right: 0; transform: none; flex-direction: row; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .quick a { flex: 1; width: auto; min-height: 56px; justify-content: center; }
  .quick a + a { border-top: 0; border-left: 1px solid var(--rule); }
  .quick__pc { display: none !important; }
  .quick b { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cell { transition: none; }
}
