/* The calendar inherits the site's Marim component tokens and readable UI face. */
.tc-calendar,.bc-sheet,.bc-confirm {font:400 16px/1.5 var(--font-ui);color:var(--tc-ink);}
.bc-panel {display:grid;gap:14px;min-width:0;}
.bc-panel *, .bc-sheet *, .bc-confirm * {box-sizing:border-box;}
.bc-panel [hidden] {display:none!important;}
.bc-panel button {cursor:pointer;}
.bc-panel button:disabled {cursor:default;}
.bc-pills {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
.bc-more {width:100%;}
.bc-day-content:empty,.bc-status:empty {display:none;}
.bc-status {display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0;font-size:16px;}
.bc-label {margin:0 0 8px;font-size:16px;font-weight:600;}
.bc-month {padding:8px 0;border-block:1px solid var(--tc-line);}
.bc-month-head {display:grid;grid-template-columns:44px 1fr 44px;gap:4px;align-items:center;text-align:center;margin-bottom:8px;}
.bc-nav {width:44px;min-height:44px;font:600 24px/1.2 var(--font-ui);border:1px solid var(--tc-line);border-radius:8px;background:white;color:var(--tc-ink);}
.bc-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;text-align:center;}
.bc-weekday {font-size:13px;padding:6px 0;color:var(--tc-ink-soft);}
.bc-day {padding:0;min-width:0;min-height:44px;border:2px solid transparent;border-radius:8px;background:transparent;color:var(--tc-ink);font:600 16px/1.5 var(--font-ui);}
.bc-day:hover {border-color:var(--tc-action);}
.bc-day[aria-pressed=true] {background:var(--tc-ink);color:white;}
.bc-day.is-off {text-decoration:line-through;}
.bc-day:disabled {color:#58666b;background:#f4f1ea;}
.bc-slots {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.bc-slot {min-height:52px;padding:10px 6px;display:flex;flex-direction:column;align-items:center;gap:4px;border:1.5px solid var(--tc-line);border-radius:10px;background:white;color:var(--tc-ink);font:600 16px/1.5 var(--font-ui);}
.bc-slot span {font-size:14px;font-weight:400;}
.bc-slot[aria-pressed=true] {background:var(--tc-ink);border-color:var(--tc-ink);color:white;}
.bc-book:disabled {background:#e2e8e9;color:#42575e;}
.bc-skeleton {min-height:76px;border-radius:12px;background:linear-gradient(100deg,#e4eaeb 25%,#f6f8f8 50%,#e4eaeb 75%);background-size:200% 100%;animation:bc-load 1.5s infinite;}
@keyframes bc-load {to{background-position:-200% 0;}}
.bc-sheet,.bc-confirm {box-sizing:border-box;border:0;border-radius:20px;padding:20px;width:min(480px,100%);max-height:90dvh;background:var(--tc-paper);}
.bc-sheet::backdrop,.bc-confirm::backdrop {background:rgba(8,24,30,.55);}
.bc-sheet-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;}
.bc-sheet-head>b {font-size:20px;}
.bc-confirm>div {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;}
.bc-demo {max-width:420px;margin-block:24px;}
@media(max-width:959px){.bc-sheet {margin:auto 0 0;max-width:none;width:100%;border-radius:20px 20px 0 0;padding:18px 16px max(18px,env(safe-area-inset-bottom));}.bc-sheet-body {max-width:480px;margin:auto;}.bc-sheet-head{max-width:480px;margin-inline:auto;}}
@media(prefers-reduced-motion:reduce){.bc-skeleton{animation:none;}}
/* Reflow without clipping enlarged labels; calendar keeps real touch targets inside a scroll region. */
.bc-pills .tc-pill small {white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}
.bc-pills .tc-pill {padding-inline:3px;}
.bc-month {overflow-x:auto;}
.bc-grid {width:max-content;min-width:100%;grid-template-columns:repeat(7,minmax(max-content,1fr));}
.bc-day {min-width:max(44px,calc(2ch + 8px));}
.bc-slots {grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));}
.bc-slot {min-width:0;overflow-wrap:anywhere;}
.bc-slot span {max-width:100%;}
.bc-pills {display:flex;overflow-x:auto;padding:2px;}
.bc-pills .tc-pill {flex:1 0 auto;min-width:68px;padding:6px 8px;}
.bc-pills .tc-pill small {white-space:nowrap;max-width:none;overflow-wrap:normal;}
.bc-pills .bc-skeleton {flex:1;min-width:60px;}
.bc-slots {display:flex;flex-wrap:wrap;}
.bc-slot {flex:1 1 max(140px,10ch);}

/* Past dates occupy blank alignment cells, never interactive or boxed. */
.bc-past {display:block;min-height:44px;pointer-events:none;}
.bc-nav:disabled {opacity:.35;cursor:default;}
.bc-date-actions {display:flex;flex-wrap:wrap;gap:8px;}
.bc-date-actions .tc-btn {flex:1 1 100px;min-height:44px;}
