/* 타임라인 막대형 — 콘크리트 회색, 먹색 테두리, 신호 주황. 숫자는 Space Mono, 글은 Noto Sans KR. */
:root {
  --bg: #E9E8E4;
  --card: #F7F6F3;
  --ink: #141414;
  --soft: #66655F;
  --line: #C9C7BF;
  --orange: #FF5A1F;
  --orange-bg: #FFD9C7;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 0; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn--orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn--orange:hover { background: var(--ink); border-color: var(--ink); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--line { background: transparent; }

.hd { display: flex; align-items: center; gap: 24px; padding: 18px 32px; border-bottom: 2px solid var(--ink); background: var(--card); }
.hd__brand { font-weight: 900; font-size: 20px; text-decoration: none; letter-spacing: -0.5px; }
.hd__brand b { margin-left: 6px; font-weight: 400; color: var(--soft); }
.hd__addr { margin: 0; font-size: 13px; color: var(--soft); }
.hd__owner { margin-left: auto; padding: 8px 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hd__owner:hover { background: var(--orange); }

.main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }

/* 날짜 목록 — 날마다 작은 막대 미리보기 */
.dates { background: var(--card); border: 2px solid var(--ink); }
.dates__h { margin: 0; padding: 10px 12px; border-bottom: 2px solid var(--ink); font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; }
.dates__h span { font-family: var(--mono); font-weight: 400; color: var(--soft); font-size: 12px; }
.dates__list { display: flex; flex-direction: column; }
.dt { display: grid; grid-template-columns: 74px 1fr 38px; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.dt:last-child { border-bottom: 0; }
.dt__d { font-size: 13px; color: var(--soft); white-space: nowrap; }
.dt__d b { font-family: var(--mono); color: var(--ink); font-size: 14px; }
.dt__mini { display: grid; grid-template-columns: repeat(11, 1fr); gap: 1px; height: 12px; }
.dt__n { font-size: 12px; text-align: right; color: var(--orange); font-weight: 700; }
.m { display: block; background: var(--orange); }
.m--taken { background: #4A4945; }
.m--blocked { background: #A9A79F; }
.m--past { background: #D2D0C9; }
.m--gap, .m--off { background: transparent; box-shadow: inset 0 0 0 1px #D2D0C9; }
.dt:hover:not(:disabled) { background: #fff; }
.dt.is-on { background: var(--ink); color: #fff; }
.dt.is-on .dt__d, .dt.is-on .dt__d b { color: #fff; }
.dt.is-on .m--gap { box-shadow: inset 0 0 0 1px #555; }
.dt:disabled { cursor: default; }
.dt--off .dt__d, .dt--off .dt__n, .dt:disabled .dt__n { color: #A9A79F; font-weight: 400; }

/* 큰 막대 */
.tl { min-width: 0; }
.tl__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tl__k { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--soft); letter-spacing: 1px; }
.tl h1 { font-size: 30px; font-weight: 900; letter-spacing: -1px; }
.menus { display: flex; border: 2px solid var(--ink); }
.mu { padding: 8px 14px; border: 0; background: var(--card); cursor: pointer; font-size: 14px; font-weight: 500; }
.mu + .mu { border-left: 2px solid var(--ink); }
.mu.is-on { background: var(--ink); color: #fff; font-weight: 700; }

.bar { position: relative; }
.bar__scale { position: relative; display: grid; grid-template-columns: repeat(11, 1fr); font-family: var(--mono); font-size: 12px; color: var(--soft); margin-bottom: 4px; }
.bar__scale span { transform: translateX(-50%); width: max-content; }
.bar__scale span:first-child { transform: none; }
.bar__scale span:last-child { position: absolute; right: 0; transform: none; }
.bar__track { position: relative; display: grid; grid-template-columns: repeat(11, 1fr); height: 156px; border: 2px solid var(--ink); background: var(--card); }
.seg { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 8px 7px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; overflow: hidden; }
.seg:last-child { border-right: 0; }
.seg__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 83.33%; z-index: 0; }
.seg__t, .seg__s { position: relative; z-index: 1; }
.seg__t { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.seg__s { font-size: 11.5px; line-height: 1.3; }
.seg--open .seg__fill { background: var(--orange-bg); }
.seg--open:hover .seg__fill { background: #FFC4A8; }
.seg.is-on .seg__fill { background: var(--orange); }
.seg.is-on { color: #fff; }
.seg--taken .seg__fill { background: repeating-linear-gradient(135deg, #4A4945 0 4px, #5C5B56 4px 8px); }
.seg--taken { color: #EDEBE6; }
.seg--taken .seg__t { text-decoration: line-through; }
.seg--blocked .seg__fill { background: transparent; border: 2px dashed #8E8C85; border-left: 0; }
.seg--blocked { color: var(--soft); }
.seg--past .seg__fill { background: #DAD8D1; }
.seg--past { color: #8E8C85; }
.seg:disabled { cursor: default; }
.seg--gap { background: repeating-linear-gradient(90deg, transparent 0 6px, #DCDAD3 6px 7px); cursor: default; }
.seg--gap .seg__t { color: #A9A79F; font-weight: 400; font-size: 12px; }
.now { position: absolute; top: -6px; bottom: -6px; left: var(--at); width: 2px; background: #D11F1F; z-index: 2; pointer-events: none; }
.now b { position: absolute; top: -18px; left: -12px; font-size: 11px; color: #D11F1F; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 12.5px; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.k { width: 14px; height: 14px; display: inline-block; }
.k--open { background: var(--orange-bg); outline: 1px solid var(--orange); }
.k--taken { background: #4A4945; }
.k--blocked { border: 2px dashed #8E8C85; }
.k--past { background: #DAD8D1; }
.k--gap { background: repeating-linear-gradient(90deg, transparent 0 3px, #C9C7BF 3px 4px); outline: 1px solid var(--line); }

/* 아래 책상: 고른 시간 + 신청 */
.desk { margin-top: 22px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; background: var(--card); border: 2px solid var(--ink); }
.desk__hint { grid-column: 1 / -1; margin: 0; padding: 18px 20px; color: var(--soft); }
.desk__hint b { color: var(--orange); }
.desk > .err { grid-column: 1 / -1; margin: 0; padding: 12px 20px 0; }
.pick { padding: 20px; background: var(--ink); color: #fff; }
.pick__time { white-space: nowrap; margin: 0 0 10px; font-size: 25px; font-weight: 700; line-height: 1.1; color: var(--orange); }
.pick__time span { margin: 0 6px; color: #888; font-size: 20px; }
.pick__what { margin: 0; font-size: 14px; color: #CFCDC6; }
.pick__what b { color: #fff; }
.form { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
.f { display: block; margin-bottom: 10px; }
.f--wide, .form .err, .form .btn, .form .tiny { grid-column: 1 / -1; }
.f > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.f i { font-style: normal; font-weight: 400; color: var(--soft); }
.f input { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 0; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.f input:focus { outline: none; border-color: var(--ink); }
.err { margin: 0 0 8px; color: #C21D1D; font-size: 14px; font-weight: 700; }
.err:empty { display: none; }
.tiny { margin: 8px 0 0; font-size: 12.5px; color: var(--soft); }

.rcpt { grid-column: 1 / -1; max-width: 460px; margin: 22px auto; padding: 22px 24px; background: #fff; border: 1px solid var(--line); box-shadow: 4px 4px 0 var(--ink); }
.rcpt__badge { display: inline-block; margin: 0 0 6px; padding: 2px 9px; background: #FFE58A; font-size: 12.5px; font-weight: 700; }
.rcpt h2 { font-size: 18px; font-weight: 900; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.rcpt dl { display: grid; grid-template-columns: 58px 1fr; gap: 6px 12px; margin: 12px 0; padding-bottom: 12px; border-bottom: 2px dashed var(--line); font-size: 14.5px; }
.rcpt dt { color: var(--soft); }
.rcpt dd { margin: 0; font-weight: 700; }
.rcpt dd small { font-weight: 400; color: var(--soft); }
.rcpt__note { margin: 0 0 14px; font-size: 13.5px; color: var(--soft); }
.rcpt__act { display: grid; gap: 8px; }

.info { max-width: 1240px; margin: 48px auto 0; padding: 24px 32px 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; border-top: 2px solid var(--ink); }
.info h2 { font-size: 14px; font-weight: 900; margin-bottom: 8px; }
.info ul { list-style: none; margin: 0; padding: 0; }
.info li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info li b { font-family: var(--mono); font-weight: 400; font-size: 13px; white-space: nowrap; }
.info li.pass { color: var(--soft); }
.info li small { font-size: 12px; }
.info p { margin: 0 0 8px; font-size: 14px; }
.info a { font-family: var(--mono); font-weight: 700; }
.maker { max-width: 1240px; margin: 28px auto 0; padding: 0 32px; }
.maker p { margin: 0; padding: 14px 16px; border-left: 4px solid var(--orange); background: var(--card); font-size: 13.5px; color: var(--soft); }
.maker b { color: var(--ink); }
.maker a { font-weight: 700; color: var(--ink); }
.ft { max-width: 1240px; margin: 0 auto; padding: 22px 32px 48px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--soft); }

@media (max-width: 960px) {
  .hd__addr { display: none; }
  .main { grid-template-columns: minmax(0, 1fr); }
  .dates { min-width: 0; }
  .dates__list { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dt { flex: none; width: 112px; grid-template-columns: 1fr; gap: 4px; border-bottom: 0; border-right: 1px solid var(--line); }
  .dt__n { text-align: left; }
  .desk { grid-template-columns: 1fr; }
}

/* 모바일: 막대를 세로로 세운다 */
@media (max-width: 640px) {
  .hd { padding: 14px 16px; gap: 12px; }
  .hd__brand { font-size: 18px; }
  .hd__owner { padding: 7px 10px; font-size: 13px; }
  .main { padding: 18px 16px 0; gap: 18px; }
  .tl h1 { font-size: 24px; }
  .menus { width: 100%; }
  .mu { flex: 1 1 0; padding: 8px 4px; font-size: 13px; }
  .bar__scale { display: none; }
  .bar__track { grid-template-columns: 1fr; grid-template-rows: repeat(11, auto); height: auto; }
  .seg { flex-direction: row; align-items: center; min-height: 50px; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); gap: 12px; }
  .seg:last-child { border-bottom: 0; }
  .seg__fill { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 83.33%; }
  .seg--blocked .seg__fill { border-left: 2px dashed #8E8C85; border-top: 0; }
  .seg__s { font-size: 12.5px; }
  .seg--gap { background: repeating-linear-gradient(0deg, transparent 0 6px, #DCDAD3 6px 7px); }
  .now { top: var(--at); bottom: auto; left: -6px; right: -6px; width: auto; height: 2px; }
  .now b { top: -16px; left: auto; right: 6px; }
  .pick__time { font-size: 26px; }
  .form { grid-template-columns: 1fr; padding: 16px; }
  .rcpt { margin: 16px 12px; padding: 18px; }
  .info { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px 0; margin-top: 36px; }
  .maker { padding: 0 16px; }
  .ft { padding: 20px 16px 40px; flex-direction: column; }
}
