/* 일정 카드 목록형 — 표 종이 같은 미색, 남색 글자, 도장 빨강. 제목은 고운바탕, 본문은 나눔고딕. */
:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --ink: #1F2A44;
  --soft: #6A7085;
  --line: #E3DDD2;
  --red: #C8402E;
  --red-bg: #FBE9E5;
  --navy: #1F2A44;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.65 'Nanum Gothic', '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; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 8px; border: 1.5px solid var(--navy); font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--navy); border-color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; margin-top: 14px; }
.btn--line { background: transparent; margin-top: 8px; }

.hd { border-bottom: 1px solid var(--line); background: var(--card); }
.hd__in { max-width: 1120px; margin: 0 auto; padding: 0 24px; min-height: 58px; display: flex; align-items: center; justify-content: space-between; }
.hd__brand { font-family: var(--serif); font-weight: 700; font-size: 19px; text-decoration: none; }
.hd__owner { font-size: 14px; font-weight: 700; color: var(--red); text-decoration: none; }
.hd__owner:hover { text-decoration: underline; }

.head { background: var(--navy); color: #F3EFE6; }
.head__in { max-width: 1120px; margin: 0 auto; padding: 28px 24px 30px; }
.head__k { margin: 0 0 4px; font-size: 13px; color: #B9BFD0; }
.head h1 { font-family: var(--serif); font-weight: 700; font-size: 32px; letter-spacing: -0.5px; }
.head__sub { margin: 6px 0 0; font-size: 14.5px; color: #D6D9E3; max-width: 40em; }

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

/* 거르개 */
.filters { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 16px 0 12px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.tabs { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--navy); }
.tab { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 16px; border: 0; background: var(--card); cursor: pointer; font-weight: 800; line-height: 1.35; }
.tab small { font-weight: 400; font-size: 11.5px; color: var(--soft); }
.tab.is-on { background: var(--navy); color: #fff; }
.tab.is-on small { color: #C9CEDB; }
.menus { display: flex; gap: 6px; flex-wrap: wrap; }
.mt { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 13.5px; }
.mt.is-on { border-color: var(--red); color: var(--red); font-weight: 800; background: var(--red-bg); }
.hide { margin-left: auto; font-size: 13.5px; color: var(--soft); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.hide input { accent-color: var(--navy); width: 16px; height: 16px; }

/* 날짜 소제목 + 회차 카드 */
.dh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 26px 0 10px; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.dh span { font-family: 'Nanum Gothic', sans-serif; font-weight: 400; font-size: 13px; color: var(--soft); }
.dh--off { color: #A8ABB6; font-size: 16px; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.card { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.card__time b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.card__time span { font-size: 13px; color: var(--soft); }
.card__what p { margin: 0; font-weight: 700; }
.card__what small { font-size: 13px; color: var(--soft); }
.card__btn { min-width: 84px; padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--red); background: var(--card); color: var(--red); font-weight: 800; cursor: pointer; }
.card__btn:hover { background: var(--red-bg); }
.card.is-on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.card.is-on .card__btn { background: var(--red); color: #fff; }
.rest { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rest li { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; color: var(--soft); }
.rest li b { font-weight: 700; }
.rest--taken { background: repeating-linear-gradient(135deg, #F1EDE6 0 4px, #E8E2D7 4px 8px); }
.rest--taken b { text-decoration: line-through; }
.rest--blocked { border: 1px dashed #C7C1B5; }
.rest--past { background: #EFECE6; color: #A8ABB6 !important; }
.empty { margin: 28px 0; color: var(--soft); }

/* 오른쪽 신청서 */
.side { position: sticky; top: 16px; margin-top: 18px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.side__k { margin: 0 0 10px; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.chosen { margin: 0 0 16px; padding: 14px; border-radius: 8px; background: var(--red-bg); }
.chosen p { margin: 0; font-size: 13.5px; }
.chosen b { display: block; font-size: 24px; font-weight: 800; color: var(--red); }
.chosen span { font-size: 13px; color: var(--soft); }
.chosen--none { background: var(--bg); font-size: 14px; color: var(--soft); }
.chosen--none b { display: inline; font-size: inherit; color: var(--red); }
.f { display: block; margin-bottom: 10px; }
.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, .f textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; font-size: 16px; color: var(--ink); }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--navy); background: #fff; }
.f textarea { resize: vertical; }
.err { margin: 0 0 8px; color: var(--red); font-size: 14px; font-weight: 800; }
.err:empty { display: none; }
.small { margin: 10px 0 0; font-size: 12.5px; color: var(--soft); }

/* 완료: 표 한 장 */
.ticket { border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.ticket__top { position: relative; padding: 20px; background: var(--navy); color: #F3EFE6; }
.ticket__top p { margin: 0; }
.ticket__k { font-size: 12.5px; color: #B9BFD0; }
.ticket__d { font-family: var(--serif); font-size: 18px; margin-top: 4px !important; }
.ticket__t { font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.ticket__t span { font-size: 16px; font-weight: 400; color: #B9BFD0; margin-left: 4px; }
.stamp { position: absolute; right: 16px; top: 18px; padding: 4px 10px; border: 2px solid #F2C14E; color: #F2C14E; border-radius: 4px; font-weight: 800; font-size: 13px; transform: rotate(-6deg); }
.ticket__bot { position: relative; padding: 22px 20px 20px; border-top: 2px dashed var(--line); }
.ticket__bot::before, .ticket__bot::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket__bot::before { left: -11px; }
.ticket__bot::after { right: -11px; }
.ticket dl { display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
.ticket dt { color: var(--soft); }
.ticket dd { margin: 0; font-weight: 700; }

/* 모바일 아래 띠 */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(31, 42, 68, .1); }
.sheet p { margin: 0; flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.sheet p b { display: block; font-size: 15px; }
.sheet p span { color: var(--soft); }
.sheet .btn { width: auto; flex: none; min-height: 44px; }

.about { max-width: 1120px; margin: 56px auto 0; padding: 28px 24px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; border-top: 1px solid var(--line); }
.about h2 { font-family: var(--serif); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.about ul { list-style: none; margin: 0; padding: 0; }
.about li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.about li small { color: var(--soft); font-size: 13px; }
.about p { margin: 0 0 8px; font-size: 14px; }
.about a { color: var(--red); font-weight: 800; }
.maker { max-width: 1120px; margin: 28px auto 0; padding: 0 24px; }
.maker p { margin: 0; padding: 14px 16px; border-radius: 10px; background: #EFEBE3; font-size: 13.5px; color: var(--soft); }
.maker b { color: var(--ink); }
.maker a { color: var(--ink); font-weight: 800; }
.ft { max-width: 1120px; margin: 0 auto; padding: 22px 24px 48px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--soft); }

@media (min-width: 861px) { .sheet { display: none !important; } }
@media (max-width: 860px) {
  .main { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side { position: static; margin-top: 28px; }
  .cards { grid-template-columns: 1fr; }
  .hide { margin-left: 0; }
  body.has-sheet .ft { padding-bottom: 110px; }
}
@media (max-width: 560px) {
  .hd__in, .head__in, .main { padding-left: 16px; padding-right: 16px; }
  .head__in { padding-top: 22px; padding-bottom: 22px; }
  .head h1 { font-size: 27px; }
  .filters { gap: 8px; padding: 12px 0 10px; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 0; }
  .menus { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .mt { flex: none; }
  .dh { font-size: 17px; margin-top: 22px; }
  .card { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .card__time b { font-size: 18px; }
  .card__what p { font-size: 14px; }
  .card__what small { font-size: 12px; }
  .card__btn { min-width: 0; padding: 8px 12px; font-size: 14px; }
  .about { grid-template-columns: 1fr; gap: 20px; padding: 24px 16px 0; margin-top: 40px; }
  .maker { padding: 0 16px; }
  .ft { padding: 20px 16px 40px; flex-direction: column; }
}
