/* schedule.css — เลย์เอาต์เฉพาะหน้าตารางงาน (ปฏิทินกระดาษ + โน้ตงาน)
   ชิ้นส่วนกลาง (.ticket .receipt .card .seg .chip .pin .empty) อยู่ใน theme2027.css */

/* สีหัวใจตามประเภทงาน */
.t-solo { color: var(--c-pink-deep); }
.t-unit { color: var(--c-blue-text); }
.t-group { color: var(--c-yellow-deep); }
.receipt .t-unit { color: var(--c-blue); }

/* ===== ตั๋วงานถัดไป ===== */
.next-ticket { max-width: 760px; }
.next-ticket .ticket__main { padding-block: var(--sp-5); }
.next-ticket .ticket__title { overflow-wrap: anywhere; }
.cd { display: grid; grid-template-columns: repeat(3, auto); gap: var(--sp-3); }
.cd div { text-align: center; }
.cd b { display: block; font-family: var(--f-mono); font-size: 1.6rem; line-height: 1; }
.cd span { font-size: var(--fs-caption); font-family: var(--f-body); }
.cd-today { font-family: var(--f-body); font-size: 1.125rem; }
@media (max-width: 479px) {
  .next-ticket { grid-template-columns: 1fr; }
  .next-ticket .ticket__stub { border-left: 0; border-top: 2px dashed rgba(31,36,48,.45); justify-items: start; padding-left: calc(var(--sp-5) + 4px); }
}

/* ===== ปฏิทิน + ด้านข้าง ===== */
.sch-board { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 900px) { .sch-board { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.sch-side { display: grid; gap: var(--sp-6); }
@media (min-width: 600px) and (max-width: 899px) { .sch-side { grid-template-columns: 1fr 1fr; align-items: start; } }

.cal { padding: var(--sp-8) var(--sp-3) var(--sp-4); }
@media (min-width: 600px) { .cal { padding-inline: var(--sp-5); } }
/* ห่วงสันปฏิทิน */
.cal__rings {
  position: absolute; top: -9px; left: 22px; right: 22px; height: 20px;
  background: repeating-linear-gradient(90deg, transparent 0 15px, var(--ink-3) 15px 19px, transparent 19px 34px);
  -webkit-mask: linear-gradient(#000 0 0); border-radius: 3px; pointer-events: none;
}
.cal__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.cal__month { margin: 0; text-align: center; font-family: var(--f-display); font-size: var(--fs-h3); font-variation-settings: "SOFT" 100; }
.cal__nav { display: flex; gap: var(--sp-1); }
.cal__nav .icon-btn { width: 40px; height: 40px; box-shadow: none; background: var(--paper-2); }
@media (max-width: 399px) { #go-today { padding-inline: 10px; } .cal__month { font-size: 1.0625rem; } }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__dow { text-align: center; font-family: var(--f-mono); font-size: var(--fs-caption); font-weight: 700; color: var(--ink-3); padding-bottom: 4px; }
.cal__day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  min-height: 48px; padding: 6px 0 4px;
  border: 0; border-radius: var(--r-sm); background: var(--paper-2); color: var(--ink);
  font: 500 var(--fs-small)/1.1 var(--f-body); cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
@media (min-width: 600px) { .cal__day { min-height: 60px; font-size: 1rem; } }
.cal__day.is-other { background: transparent; color: var(--ink-3); opacity: .55; cursor: default; }
.cal__day.has-ev { background: var(--c-pink-soft); }
@media (hover: hover) { button.cal__day:hover { transform: translateY(-2px); } }
.cal__day.is-today > span:first-child {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--c-pink-deep); color: #fff; font-weight: 700;
}
.cal__day.is-selected { box-shadow: inset 0 0 0 2px var(--c-pink-deep); background: var(--paper); }
.cal__hearts { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; font-size: .75rem; line-height: 1; }
.cal__hearts b { font-size: .7rem; color: var(--ink-2); }
.cal__legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; margin-top: var(--sp-4); font-size: var(--fs-small); }
.cal__legend > span { display: inline-flex; align-items: center; gap: 4px; }

/* ใบสรุปปี */
.tally-acc > summary { gap: var(--sp-3); }
.tally-acc > summary > span:first-child { flex: 1; }
.tally-acc > summary .chip { flex: none; }
.tally-acc .acc__body { padding-top: var(--sp-1); }
.tally { padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + var(--zig)); filter: none; }
.tally .receipt__row span:first-child { display: inline-flex; align-items: center; gap: 6px; }

.sch-filter { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; padding: var(--sp-4); }
.sch-seg { flex-wrap: wrap; border-radius: var(--r-md); }
.sch-seg button { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.sch-seg button[aria-pressed="true"] i { color: #fff; }

/* ===== โน้ตงาน ===== */
.notes-grid { display: grid; gap: var(--sp-6) var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.notes-grid > .empty, .notes-grid > .month-sep { grid-column: 1 / -1; }
.month-sep { margin: var(--sp-4) 0 0; text-align: center; font-family: var(--f-mono); font-weight: 700; letter-spacing: .08em; }
.sch-note {
  position: relative; display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1);
  border-top: 6px solid var(--note-c, var(--c-pink-deep));
}
.sch-note--solo { --note-c: var(--c-pink-deep); background: var(--c-pink-soft); }
.sch-note--unit { --note-c: var(--c-blue); background: var(--c-blue-soft); }
.sch-note--group { --note-c: var(--c-yellow-deep); background: var(--c-yellow-soft); }
.sch-note .pin { --pin-c: var(--note-c); }
.notes-grid > .sch-note:nth-child(odd) { transform: rotate(-.8deg); }
.notes-grid > .sch-note:nth-child(even) { transform: rotate(.7deg); }
@media (max-width: 479px) { .notes-grid > .sch-note:nth-child(n) { transform: none; } }
.sch-note.is-past { opacity: .72; filter: grayscale(.5); }
.sch-note__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-small); font-weight: 600; }
.sch-note__date { font-family: var(--f-mono); }
.sch-note__type { display: inline-flex; align-items: center; gap: 4px; }
.sch-note__title { margin: 0; font-size: 1.0625rem; overflow-wrap: anywhere; }
.sch-note__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sch-note__chips .chip { white-space: normal; }
.sch-note__remark { margin: 0; font-size: var(--fs-small); color: var(--ink-2); overflow-wrap: anywhere; }
.sch-note__cal { align-self: flex-start; margin-top: auto; }

/* footer social */
.social-row { justify-content: center; margin-bottom: var(--sp-5); }
.social-row .icon-btn { text-decoration: none; }
