/* Bounded schedule displays; event cards and editor styles remain independent. */
.schedule-widget{--sw-solo:#3B6FFF;--sw-collab:#0D9488;--sw-large:#E88727;min-width:0;color:var(--text)}
.schedule-widget *{box-sizing:border-box}
.schedule-widget a{color:inherit;text-decoration:none}
.schedule-widget button{font-family:inherit;cursor:pointer;color:inherit}
.schedule-widget svg{width:16px;height:16px;flex:0 0 16px;vertical-align:middle}
.schedule-widget .sw-heading{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;line-height:1.4;margin:0 0 12px;letter-spacing:0;color:var(--text)}
.schedule-widget.sw-home .sw-heading-link{display:inline-flex;align-items:center;gap:8px;min-width:0}
.schedule-widget.sw-home .sw-heading-link:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.schedule-widget.sw-home .sw-heading-link:focus-visible{color:var(--accent);outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}
.schedule-widget .sw-scroll-tools{display:flex;gap:9px;margin-inline-start:auto}
.schedule-widget .sw-scroll-tools button{display:grid;place-items:center;width:25px;height:25px;border:1px solid var(--line);border-radius:7px;background:var(--panel);padding:3px;color:var(--muted)}
.schedule-widget.sw-home .sw-tiles{display:flex;align-items:stretch;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin;padding-bottom:7px}
.schedule-widget .sw-tile{flex:0 0 calc((100% - 10px)/2);background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:12px;min-width:0;display:flex;align-items:flex-start;gap:10px;scroll-snap-align:start}
/* Stretch the home card body so its final participant row aligns across tiles. */
.schedule-widget.sw-home .sw-tile .sw-row-body{display:flex;flex-direction:column;align-self:stretch}
.schedule-widget .sw-card-meta{display:block}
.schedule-widget .sw-tile .sw-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:2px 8px}
.schedule-widget .sw-tile .sw-row-date{margin-bottom:0}
.schedule-widget .sw-tile .sw-title{margin-top:3px}
.schedule-widget .sw-tile:hover,.schedule-widget .sw-row:hover .sw-title{color:var(--accent)}
.schedule-widget .sw-row-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.schedule-widget .sw-dot{background:var(--sw-color);width:6px;height:6px;border-radius:50%;display:inline-block;flex:0 0 6px}
.schedule-widget .sw-solo{--sw-color:var(--sw-solo)}
.schedule-widget .sw-collab{--sw-color:var(--sw-collab)}
.schedule-widget .sw-large{--sw-color:var(--sw-large)}
.schedule-widget .sw-status{font-size:10px;font-weight:700;background:var(--panel2);border:1px solid var(--line);border-radius:4px;padding:1px 5px;color:var(--muted)}
.schedule-widget .sw-title{display:block;font-size:14px;line-height:1.5;font-weight:800;color:var(--text);overflow-wrap:anywhere}
/* The clamped title always reserves two line boxes without fixed pixel heights. */
.schedule-widget.sw-home .sw-tile .sw-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;min-block-size:2lh;overflow:hidden}
.schedule-widget.sw-home .sw-tile .schedule-participants{margin-top:auto;padding-top:7px}
.schedule-widget .sw-cancelled .sw-title{text-decoration:line-through;color:var(--muted)}
.schedule-widget .sw-message{padding:18px 14px;font-size:12px;color:var(--muted);line-height:1.8;margin:0}
.schedule-widget .sw-message button{display:block;border:0;background:none;color:var(--accent);font-size:12px;font-weight:700;margin-top:8px;padding:0}
.schedule-widget.sw-home{margin-bottom:20px}
.schedule-widget.sw-home>.sw-message{border:1px solid var(--line);border-radius:13px;background:var(--panel)}
.schedule-widget.sw-profile{background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.schedule-widget.sw-profile>.sw-heading{padding:14px 13px 11px;margin:0;border-bottom:1px solid var(--line);font-size:13px}
.schedule-widget .sw-toolbar{display:flex;align-items:center;gap:10px;padding:12px 12px 8px;min-width:0}
.schedule-widget .sw-monthnav{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;min-width:0}
.schedule-widget .sw-monthnav strong{font-size:12px;white-space:nowrap;font-weight:800}
.schedule-widget .sw-monthnav button{display:grid;place-items:center;background:none;border:0;border-radius:6px;padding:4px;width:24px;height:26px;flex:0 0 24px;color:var(--muted)}
.schedule-widget .sw-monthnav button:hover{background:var(--panel2)}
.schedule-widget .sw-view-switch{margin-left:auto;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);background:var(--panel);border-radius:7px;padding:5px 7px;font-size:11px;font-weight:700;white-space:nowrap;color:var(--muted)}
.schedule-widget .sw-view-switch svg{width:13px;height:13px;flex-basis:13px}
.schedule-widget .sw-monthgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;margin:0 12px}
.schedule-widget .sw-weekday{padding:4px 0 5px;font-size:10px;font-weight:800;text-align:center;color:var(--muted)}
.schedule-widget .sw-weekday.sw-sun{color:#D95C5C}
.schedule-widget .sw-weekday.sw-sat{color:var(--accent)}
.schedule-widget .sw-day{min-width:0;height:31px;padding:3px 0 2px;border:0;border-radius:7px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:1px;background:transparent;font-size:11px;font-weight:800;line-height:1.3}
.schedule-widget .sw-day:hover{background:var(--panel2)}
.schedule-widget .sw-day.sw-out{opacity:.55;color:var(--muted)}
.schedule-widget .sw-day.sw-active{background:var(--glow);box-shadow:inset 0 0 0 2px var(--accent)}
.schedule-widget .sw-day.sw-active .sw-day-number,.schedule-widget .sw-day.sw-today .sw-day-number{color:var(--accent)}
.schedule-widget .sw-day-dots{display:flex;align-items:center;justify-content:center;gap:2px;height:5px}
.schedule-widget .sw-day-dots .sw-dot{width:4px;height:4px;flex-basis:4px}
.schedule-widget .sw-day-count{display:none;font-size:9px;font-weight:700;color:var(--muted);line-height:1.2}
.schedule-widget .sw-legend{display:flex;flex-wrap:wrap;gap:6px 10px;padding:10px 13px 9px;border-bottom:1px solid var(--line)}
.schedule-widget .sw-legend>span{display:flex;align-items:center;gap:5px;font-size:9px;font-weight:700;color:var(--muted);white-space:nowrap}
.schedule-widget .sw-selected[aria-busy="true"] .sw-rows{opacity:.65}
.schedule-widget .sw-selected-title{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;padding:11px 13px 1px}
.schedule-widget .sw-selected-title>span{font-size:11px;font-weight:650;color:var(--muted)}
.schedule-widget .sw-rows{padding:0 13px}
.schedule-widget .sw-row{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);align-items:flex-start;min-width:0}
.schedule-widget .sw-row:last-child{border-bottom:0}
.schedule-widget .sw-row-date{display:block;font-size:10px;font-weight:700;line-height:1.5;color:var(--muted);overflow-wrap:anywhere;margin-bottom:3px}
.schedule-widget .sw-row-body{display:block;flex:1;min-width:0}
.schedule-widget .sw-row .sw-title{font-size:12px;margin-top:3px}
.schedule-widget .sw-chevron{flex:0 0 12px;align-self:center;color:var(--muted)}
.schedule-widget .sw-chevron svg{width:13px;height:13px}
.schedule-widget .schedule-thumbnail{display:block;flex:0 0 32%;max-width:116px;aspect-ratio:16/9;overflow:hidden;border-radius:6px;background:var(--panel2)}
.schedule-widget .schedule-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}
.schedule-widget.sw-home .schedule-thumbnail{flex-basis:40%;max-width:144px}
.schedule-widget .schedule-card-time{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.5}
.schedule-widget .schedule-service-icon{display:inline-flex;flex:0 0 16px;width:16px;height:16px}
.schedule-widget .schedule-service-icon img{width:100%;height:100%;object-fit:contain}
.schedule-widget .schedule-participants{display:flex;align-items:center;flex-wrap:nowrap;gap:3px;margin-top:7px}
.schedule-widget .schedule-participant,.schedule-widget .schedule-participant-more{display:inline-grid;place-items:center;flex:0 0 auto;width:22px;height:22px;border:1px solid var(--line);border-radius:50%;background:var(--panel2);color:var(--muted);font-size:9px;font-weight:800;overflow:hidden}
.schedule-widget .schedule-participant img{display:block;width:100%;height:100%;object-fit:cover}
.schedule-widget .schedule-participant-more{width:auto;min-width:22px;padding:0 3px}
.schedule-widget .sw-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;border-top:1px solid var(--line);padding:9px 13px;font-size:11px;font-weight:700;color:var(--accent)}
.schedule-widget .sw-footer a{display:inline-flex;align-items:center;gap:2px}
.schedule-widget .sw-footer svg{width:13px;height:13px;flex-basis:13px}
.schedule-widget .sw-register{display:none!important}
.schedule-widget .sw-more{display:block;color:var(--accent);font-size:11px;padding:10px 13px}
.schedule-widget a:focus-visible,.schedule-widget button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:820px){
  .content[data-mtab="schedules"]>.main{display:none}
  .content[data-mtab="schedules"] #relCard,.content[data-mtab="schedules"] #memberCard{display:none}
  .content:not([data-mtab="schedules"]) #profileScheduleWidget{display:none}
  .content[data-mtab="rels"] #profileScheduleWidget,.content[data-mtab="members"] #profileScheduleWidget{display:none}
  .content[data-mtab="events"] #memberCard{display:none}
  #profileScheduleWidget{order:4;min-width:0;width:100%}
  .content #memberCard{order:5}
  .schedule-widget.sw-profile{margin-top:2px}
  .schedule-widget.sw-profile>.sw-heading{padding:13px 13px 10px}
  .schedule-widget .sw-toolbar{padding:13px 13px 11px}
  .schedule-widget .sw-monthnav{gap:6px}
  .schedule-widget .sw-weekday{padding:7px 0}
  .schedule-widget .sw-day{height:auto;min-height:55px;gap:2px;padding:5px 1px 3px;font-size:12px}
  .schedule-widget .sw-day-count{display:block}
  .schedule-widget .sw-day-dots{height:7px}
  .schedule-widget .sw-day-dots .sw-dot{width:5px;height:5px;flex-basis:5px}
  .schedule-widget .sw-legend{padding:11px 12px;gap:9px 12px}
  .schedule-widget .sw-legend>span{font-size:10px}
  .schedule-widget .sw-selected-title{padding:13px 13px 6px}
  .schedule-widget .sw-row-date{font-size:11px}
  .schedule-widget .sw-row .sw-title{font-size:14px}
  .schedule-widget .sw-footer{min-height:48px;justify-content:space-between}
  .schedule-widget .sw-register{display:inline-flex!important}
}
@media(max-width:700px){
  .schedule-widget .sw-tile{flex-basis:79%;padding:13px}
  .schedule-widget.sw-home .sw-tiles[data-scroll-right="true"]{
    -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);
    mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);
  }
}
@media(max-width:350px){
  .schedule-widget .sw-heading{font-size:13px;gap:6px}
  .schedule-widget .sw-scroll-tools{gap:4px}
  .schedule-widget .sw-toolbar{gap:7px;padding-inline:10px}
  .schedule-widget .sw-monthnav{gap:3px}
  .schedule-widget .sw-legend{padding-inline:10px;gap:8px}
  .schedule-widget .sw-monthgrid{margin-inline:9px}
}
/* Approved profile schedule calendar sizing for streamer and group pages.
   Its responsive presets stay independent of the full calendar page. */
.schedule-widget.sw-profile{
  --sw-cal-today-diameter:16px;
  --sw-cal-day-height:41px;
  --sw-cal-day-top:3px;
  --sw-cal-number-font-size:11px;
  --sw-cal-day-bottom:2px;
  --sw-cal-number-dot-gap:4px;
  --sw-cal-day-inner-gap:1px;
  --sw-cal-number-height:18px;
  --sw-cal-dot-row-height:4px;
  --sw-cal-weekday-top:1px;
  --sw-cal-weekday-bottom:2px;
  --sw-cal-week-row-gap:0px;
  --sw-cal-month-nav-height:26px;
  --sw-cal-month-toolbar-top:9px;
  --sw-cal-month-toolbar-bottom:5px;
  --sw-cal-legend-top:7px;
  --sw-cal-legend-bottom:6px;
  --sw-cal-legend-row-gap:3px;
  --sw-cal-selected-title-top:7px;
  --sw-cal-selected-title-bottom:0px;
  --sw-cal-schedule-row-top:8px;
  --sw-cal-schedule-row-bottom:8px;
  --sw-cal-profile-header-top:14px;
  --sw-cal-profile-header-bottom:11px;
  --sw-cal-profile-footer-height:35px;
  --sw-cal-profile-footer-top:9px;
  --sw-cal-profile-footer-bottom:9px;
  --sw-cal-profile-empty-top:18px;
  --sw-cal-profile-empty-bottom:18px;
  --sw-cal-number-slot:max(var(--sw-cal-number-height),var(--sw-cal-today-diameter),calc(var(--sw-cal-number-font-size) + 4px));
}
@media(max-width:820px){
  .schedule-widget.sw-profile{
  --sw-cal-today-diameter:16px;
  --sw-cal-day-height:48px;
  --sw-cal-day-top:4px;
  --sw-cal-number-font-size:12px;
  --sw-cal-day-bottom:5px;
  --sw-cal-count-bottom-shift:-1px;
  --sw-cal-number-dot-gap:2px;
  --sw-cal-day-inner-gap:1px;
  --sw-cal-number-height:18px;
  --sw-cal-dot-row-height:6px;
  --sw-cal-weekday-top:4px;
  --sw-cal-weekday-bottom:4px;
  --sw-cal-week-row-gap:0px;
  --sw-cal-month-nav-height:26px;
  --sw-cal-month-toolbar-top:10px;
  --sw-cal-month-toolbar-bottom:8px;
  --sw-cal-legend-top:8px;
  --sw-cal-legend-bottom:8px;
  --sw-cal-legend-row-gap:6px;
  --sw-cal-selected-title-top:9px;
  --sw-cal-selected-title-bottom:2px;
  --sw-cal-schedule-row-top:8px;
  --sw-cal-schedule-row-bottom:8px;
  --sw-cal-profile-header-top:13px;
  --sw-cal-profile-header-bottom:10px;
  --sw-cal-profile-footer-height:48px;
  --sw-cal-profile-footer-top:9px;
  --sw-cal-profile-footer-bottom:9px;
  --sw-cal-profile-empty-top:18px;
  --sw-cal-profile-empty-bottom:18px;
  }
}
.schedule-widget.sw-profile .sw-day{
  height:auto;min-height:var(--sw-cal-day-height);justify-content:flex-start;gap:0;
  padding-top:var(--sw-cal-day-top);padding-bottom:var(--sw-cal-day-bottom);
}
.schedule-widget.sw-profile .sw-day>*{flex-shrink:0}
.schedule-widget.sw-profile .sw-day-number{
  position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;
  width:var(--sw-cal-number-slot);min-width:0;max-width:none;height:var(--sw-cal-number-slot);
  min-height:var(--sw-cal-number-slot);flex:0 0 var(--sw-cal-number-slot);
  padding:0;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none;
  font-size:var(--sw-cal-number-font-size);line-height:1;
}
.schedule-widget.sw-profile .sw-day.sw-today .sw-day-number{color:#fff}
.schedule-widget.sw-profile .sw-day.sw-today .sw-day-number::before{
  content:"";position:absolute;z-index:-1;left:50%;top:50%;transform:translate(-50%,-50%);
  width:var(--sw-cal-today-diameter);height:var(--sw-cal-today-diameter);
  border-radius:50%;background:var(--accent);pointer-events:none;
}
.schedule-widget.sw-profile .sw-day-dots{margin-top:var(--sw-cal-number-dot-gap);height:var(--sw-cal-dot-row-height)}
.schedule-widget.sw-profile .sw-day-count{margin-top:var(--sw-cal-day-inner-gap)}
@media(max-width:820px){
  .schedule-widget.sw-profile .sw-day-count{position:relative;bottom:var(--sw-cal-count-bottom-shift)}
}
.schedule-widget.sw-profile .sw-monthgrid{row-gap:var(--sw-cal-week-row-gap)}
.schedule-widget.sw-profile .sw-weekday{padding-top:var(--sw-cal-weekday-top);padding-bottom:var(--sw-cal-weekday-bottom)}
.schedule-widget.sw-profile .sw-monthnav button{height:var(--sw-cal-month-nav-height)}
.schedule-widget.sw-profile .sw-toolbar{padding-top:var(--sw-cal-month-toolbar-top);padding-bottom:var(--sw-cal-month-toolbar-bottom)}
.schedule-widget.sw-profile .sw-legend{
  padding-top:var(--sw-cal-legend-top);padding-bottom:var(--sw-cal-legend-bottom);row-gap:var(--sw-cal-legend-row-gap);
}
.schedule-widget.sw-profile .sw-selected-title{
  padding-top:var(--sw-cal-selected-title-top);padding-bottom:var(--sw-cal-selected-title-bottom);
}
.schedule-widget.sw-profile .sw-row{padding-top:var(--sw-cal-schedule-row-top);padding-bottom:var(--sw-cal-schedule-row-bottom)}
.schedule-widget.sw-profile>.sw-heading{padding-top:var(--sw-cal-profile-header-top);padding-bottom:var(--sw-cal-profile-header-bottom)}
.schedule-widget.sw-profile .sw-footer{
  min-height:var(--sw-cal-profile-footer-height);
  padding-top:var(--sw-cal-profile-footer-top);padding-bottom:var(--sw-cal-profile-footer-bottom);
}
.schedule-widget.sw-profile .sw-message{padding-top:var(--sw-cal-profile-empty-top);padding-bottom:var(--sw-cal-profile-empty-bottom)}
