/* 주간 시간 격자형 — 캘린더 앱 같은 격자. 서체 Gothic A1, 짙은 숲색 하나만 강조색으로 */
:root {
  --bg: #FBFBF9;
  --panel: #FFFFFF;
  --ink: #1C211E;
  --ink-2: #4D5550;
  --muted: #8C938E;
  --line: #E4E7E2;
  --line-2: #D3D8D1;
  --forest: #1F5C46;
  --forest-2: #2D7A5E;
  --mint: #E3F0E9;
  --hatch-a: #F1F2EE;
  --hatch-b: #E6E8E3;
  --row: 54px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14.5px/1.55 'Gothic A1', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
body.is-locked { overflow: hidden; }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }

/* 머리줄 — 캘린더 앱처럼 범위와 앞뒤 이동 */
.bar { display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 16px; color: var(--forest); width: 252px; flex: none; }
.bar__brand svg { width: 30px; height: 30px; }
.bar__brand em { font-style: normal; font-weight: 500; color: var(--muted); }
.bar__nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.navbtn { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--panel); font-size: 20px; line-height: 1; cursor: pointer; }
.navbtn:hover:not(:disabled) { background: var(--mint); border-color: var(--forest-2); }
.navbtn:disabled { opacity: .35; cursor: default; }
.bar__range { margin-left: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.4px; white-space: nowrap; }
.bar__owner { margin-left: auto; padding: 8px 14px; border-radius: 99px; background: var(--forest); color: #fff; font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.bar__owner:hover { background: var(--ink); }

.shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: calc(100vh - 140px); }

/* 왼쪽 좁은 열 */
.side { padding: 22px 24px; border-right: 1px solid var(--line); background: var(--panel); }
.side__name { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.side__desc { margin: 0 0 20px; font-size: 13px; color: var(--ink-2); }
.mini { margin-bottom: 22px; }
.mini__title { margin: 0 0 8px; font-weight: 700; font-size: 13.5px; }
.mini__dow, .mini__grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini__dow span { font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.mini__d { display: grid; place-items: center; height: 30px; margin: 1px; border: 0; border-radius: 50%; background: none; font-size: 12.5px; }
.mini__d.is-out { color: #C8CCC6; }
.mini__d.is-closed { color: #B4B9B2; }
button.mini__d { cursor: pointer; font-weight: 600; }
button.mini__d:hover { background: var(--mint); }
.mini__d.is-shown { background: var(--mint); color: var(--forest); }
.mini__d.is-today { box-shadow: inset 0 0 0 1.5px var(--forest); }

.classes { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.classes legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 13.5px; }
.cls { position: relative; display: block; padding: 9px 12px 9px 34px; margin-bottom: 5px; border-radius: 8px; cursor: pointer; }
.cls::before { content: ''; position: absolute; left: 11px; top: 13px; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line-2); background: var(--panel); }
.cls.is-on { background: var(--mint); }
.cls.is-on::before { border-color: var(--forest); background: var(--forest); box-shadow: inset 0 0 0 3px var(--mint); }
.cls input { position: absolute; opacity: 0; pointer-events: none; }
.cls:has(input:focus-visible) { outline: 2px solid var(--forest); }
.cls__name { display: block; font-weight: 600; font-size: 13.5px; }
.cls__price { font-size: 12px; color: var(--muted); }

.keys { list-style: none; margin: 0 0 20px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.key { display: inline-block; width: 16px; height: 12px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; }
.key--open { background: var(--panel); border: 1px solid var(--line-2); }
.key--taken { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 2px, #C5CAC2 2px 3.5px); }
.key--blocked { background: #ECEEEA; border: 1px dashed #B7BDB5; }
.key--past { background: var(--hatch-a); opacity: .6; }
.side__info { display: grid; grid-template-columns: 34px 1fr; gap: 6px 8px; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.side__info dt { font-weight: 700; color: var(--ink); }
.side__info dd { margin: 0; }

/* 격자 */
.board { padding: 18px 24px 0; min-width: 0; }
.board__tip { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.board__tip.is-err { color: #A53A24; font-weight: 700; }
.grid { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); }
.grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.corner { background: var(--panel); }
.dhead { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 8px 2px 10px; background: var(--panel); }
.dhead span { font-size: 12px; color: var(--muted); font-weight: 600; }
.dhead b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 19px; font-weight: 700; }
.dhead em { font-style: normal; font-size: 11px; color: var(--muted); }
.dhead.is-today b { background: var(--forest); color: #fff; }
.dhead.is-closed b { color: #B4B9B2; }
.gut { padding: 4px 8px 0 0; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gut--gap { color: #BCC1BA; }

.cell { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 6px 8px; margin: 0; border-top: 0; border-left: 0; text-align: left; font-size: 12px; border-radius: 0; }
.cell--open { background: var(--panel); cursor: pointer; }
.cell__t { font-weight: 600; color: var(--forest); font-size: 12.5px; }
.cell__go { font-size: 11px; color: var(--muted); }
.cell--open:hover, .cell--open:focus-visible { background: var(--mint); outline: none; box-shadow: inset 0 0 0 2px var(--forest-2); }
.cell--open:hover .cell__go { color: var(--forest); }
.cell--taken { background: repeating-linear-gradient(135deg, var(--hatch-a) 0 6px, var(--hatch-b) 6px 8px); color: #8F968F; }
.cell--blocked { background: #F0F1EE; color: #7E857F; }
.cell--blocked span { padding: 1px 6px; border: 1px dashed #B7BDB5; border-radius: 4px; background: var(--panel); }
.cell--past, .cell--out { background: repeating-linear-gradient(135deg, #FAFAF8 0 6px, #F2F3F0 6px 8px); color: #B6BBB4; }
.cell--sel { margin: 2px; padding: 6px 8px; background: var(--forest); color: #fff; border-radius: 6px !important; border: 0 !important; cursor: pointer; box-shadow: 0 4px 12px -4px rgba(31, 92, 70, .6); }
.cell--sel b { font-size: 12.5px; }
.cell--sel span { font-size: 11.5px; opacity: .85; }
.gaprow { display: flex; align-items: center; justify-content: center; background: #F6F7F4; }
.gaprow span { font-size: 11.5px; color: #A3AAA2; letter-spacing: .5px; }
.closed { z-index: 1; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, #F4F5F2 0 6px, #E9EBE6 6px 8px); }
.closed span { writing-mode: vertical-rl; font-size: 12.5px; letter-spacing: 6px; color: #9AA199; font-weight: 600; }

.maker { margin: 22px 0 0; }
.maker p { margin: 0; padding: 14px 16px; border-radius: 8px; background: var(--mint); font-size: 13px; color: var(--ink-2); max-width: 780px; }
.maker b { color: var(--forest); margin-right: 3px; }
.maker a { font-weight: 700; color: var(--forest); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 22px 0 36px; font-size: 12px; color: var(--muted); }

/* 서랍 */
.scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(20, 30, 25, .32); }
.drawer { position: fixed; z-index: 1101; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; background: var(--panel); box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .35); overflow-y: auto; animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
.drawer__in { position: relative; padding: 26px 26px 32px; }
.x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--hatch-a); font-size: 22px; line-height: 1; cursor: pointer; }
.x:hover { background: var(--hatch-b); }
.dr__title { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.evt { display: flex; flex-direction: column; margin-bottom: 20px; padding: 12px 14px; border-left: 4px solid var(--forest); background: var(--mint); border-radius: 0 8px 8px 0; }
.evt b { font-size: 16px; }
.evt span { font-size: 13px; color: var(--ink-2); }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; margin-bottom: 5px; font-weight: 700; font-size: 13px; }
.field i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 2px var(--mint); }
.field textarea { resize: vertical; }
.error { margin: 0 0 10px; color: #A53A24; font-weight: 700; font-size: 13px; }
.error:empty { display: none; }
.sum { margin: 0 0 14px; font-weight: 600; font-size: 14px; }
.sum span { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border: 0; border-radius: 10px; background: var(--forest); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.primary:hover { background: var(--ink); }
.secondary { width: 100%; min-height: 46px; margin-top: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); font-weight: 600; cursor: pointer; }
.secondary:hover { border-color: var(--forest); }
.fine { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.ok { margin: 18px 0 16px; }
.ok svg { width: 40px; height: 40px; color: var(--forest); }
.ok h2 { font-size: 21px; font-weight: 800; margin: 10px 0 6px; }
.pend { display: inline-block; margin: 0; padding: 2px 9px; border-radius: 4px; background: #FCEFC7; color: #6E5410; font-size: 12.5px; font-weight: 700; }
.who { display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; margin: 0 0 16px; font-size: 14px; }
.who dt { color: var(--muted); }
.who dd { margin: 0; font-weight: 600; }
.msg { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-2); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .bar__brand { width: auto; }
  .side { padding: 18px 16px; }
  .board { padding: 16px 16px 0; }
}
@media (max-width: 720px) {
  :root { --row: 50px; }
  .bar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .bar__brand span em { display: none; }
  .bar__owner { padding: 6px 11px; font-size: 12.5px; }
  .bar__nav { order: 3; width: 100%; }
  .bar__range { font-size: 17px; margin-left: 6px; }
  .shell { display: block; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .side__desc, .mini, .side__info { display: none; }
  .side__name { display: none; }
  .classes { margin-bottom: 10px; }
  .classes legend { font-size: 13px; }
  #menuPick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .cls { margin: 0; padding: 8px 6px 8px 8px; border: 1px solid var(--line); text-align: left; }
  .cls::before { display: none; }
  .cls.is-on { border-color: var(--forest); }
  .cls__name { font-size: 12.5px; line-height: 1.35; }
  .cls__price { font-size: 11px; }
  .keys { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 10px 0 0; font-size: 11.5px; }
  .board { padding: 12px 10px 0; }
  .board__tip { font-size: 12.5px; padding: 0 4px; }
  .gut { padding-right: 5px; font-size: 11px; }
  .maker { margin: 18px 4px 0; }
  .foot { padding: 18px 4px 28px; flex-direction: column; }
  .drawer { top: auto; width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; animation-name: rise; }
  @keyframes rise { from { transform: translateY(40px); opacity: .4; } }
  .drawer__in { padding: 22px 18px 28px; }
}
