.tkc-month,
.tkc-week {
  display: block;
  width: 100%;
}

.tkc-month__toolbar,
.tkc-week__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tkc-month__label,
.tkc-week__label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  flex: 1;
}

.tkc-month__nav,
.tkc-week__nav {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 0.75rem;
  min-width: 42px;
  min-height: 42px;
  cursor: pointer;
  font-size: 1rem;
}

.tkc-month__weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tkc-month__weekdays > div {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0.35rem 0;
}

.tkc-month__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.tkc-month__day {
  min-height: 142px;
  padding: 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
}

.tkc-month__day--outside {
  background: #f8fafc;
  border-style: dashed;
  border-color: #eef2f7;
  cursor: default;
}

.tkc-month__day.is-today,
.tkc-weekgrid__day.is-today {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.tkc-month__day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tkc-month__day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}

.tkc-month__events {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tkc-month__event {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 0.65rem;
  background: #eef2ff;
  color: #312e81;
  padding: 0.44rem 0.5rem 0.48rem;
  border: 1px solid #c7d2fe;
  cursor: pointer;
}

.tkc-month__event:hover,
.tkc-month__event:focus {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.tkc-month__event-time {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.tkc-month__event-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.22;
  color: #111827;
}

.tkc-month__event-session {
  display: block;
  color: #4338ca;
  font-size: 0.68rem;
  margin-top: 0.15rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tkc-month__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.28rem;
}

.tkc-month__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
  font-size: 0.64rem;
  line-height: 1.2;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}

.tkc-month__badge--price {
  background: #111827;
  color: #ffffff;
}

.tkc-month__badge--tinker_level {
  background: #dbeafe;
  color: #1d4ed8;
}

.tkc-month__badge--age {
  background: #ecfeff;
  color: #155e75;
}

.tkc-month__badge--visibility {
  background: #fef3c7;
  color: #92400e;
}

.tkc-month__more {
  font-size: 0.74rem;
  color: #6b7280;
  padding: 0.15rem 0.1rem 0;
}

.tkc-weekgrid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.tkc-weekgrid__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

.tkc-weekgrid__times-head,
.tkc-weekgrid__day-head {
  height: 44px;
}

.tkc-weekgrid__times-head {
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
}

.tkc-weekgrid__times-allday {
  height: 48px;
  display: flex;
  align-items: center;
  color: #6b7280;
  font-size: 0.8rem;
}

.tkc-weekgrid__times-body {
  position: relative;
  height: calc(28px * var(--tkc-slot-count, 29));
}

.tkc-weekgrid__time {
  height: 28px;
  font-size: 0.72rem;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
}

.tkc-weekgrid__day {
  display: grid;
  grid-template-rows: 44px 48px 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

.tkc-weekgrid__day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.tkc-weekgrid__day-label { font-weight:700; color:#111827; font-size:0.9rem; }
.tkc-weekgrid__day-count { font-size:0.75rem; color:#6b7280; }

.tkc-weekgrid__allday {
  padding: 0.45rem 0.45rem 0.35rem;
  border-bottom: 1px solid #f3f4f6;
  display: grid;
  gap: 0.35rem;
}

.tkc-weekgrid__allday-item {
  width: 100%;
  text-align: left;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #312e81;
  border-radius: 0.65rem;
  padding: 0.36rem 0.46rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.tkc-weekgrid__tracks {
  position: relative;
  height: calc(28px * var(--tkc-slot-count, 29));
}

.tkc-weekgrid__slot {
  height: 28px;
  border-top: 1px solid #f3f4f6;
}

.tkc-weekgrid__event {
  position: absolute;
  border: 1px solid #c7d2fe;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border-radius: 0.78rem;
  padding: 0.34rem 0.4rem 0.4rem;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.tkc-weekgrid__event:hover,
.tkc-weekgrid__event:focus {
  background: #f8fafc;
  border-color: #a5b4fc;
}

.tkc-weekgrid__event-time { font-size:0.68rem; font-weight:700; color:#4338ca; margin-bottom:0.16rem; line-height:1.15; }
.tkc-weekgrid__event-title { font-size:0.8rem; font-weight:700; color:#111827; line-height:1.18; }
.tkc-weekgrid__event-session { font-size:0.7rem; color:#475569; margin-top:0.15rem; line-height:1.15; }
.tkc-weekgrid__event .tkc-badges { margin-top:0.26rem; gap:0.22rem; }
.tkc-weekgrid__event .tkc-badge { font-size:0.6rem; padding:0.08rem 0.3rem; }

@media (max-width: 1100px) {
  .tkc-weekgrid {
    grid-template-columns: 1fr;
  }
  .tkc-weekgrid__times {
    display: none;
  }
  .tkc-weekgrid__days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .tkc-weekgrid__days {
    grid-template-columns: 1fr;
  }
}

/* 0.5.16 visual harmony: align calendar views with the calmer shared palette */
.tkc-month__day,
.tkc-weekgrid__day {
  border-color: var(--tkc-line, #e6e8ef);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.tkc-month__event,
.tkc-weekgrid__allday-item {
  background: var(--tkc-accent-soft, #f3efff);
  border-color: #ded6fb;
  color: var(--tkc-accent-text, #44337a);
}

.tkc-month__event:hover,
.tkc-month__event:focus,
.tkc-weekgrid__allday-item:hover,
.tkc-weekgrid__allday-item:focus {
  background: #eee7ff;
  border-color: #cfc3f5;
}

.tkc-month__event-time,
.tkc-month__event-session,
.tkc-weekgrid__event-time {
  color: var(--tkc-accent-text, #44337a);
}

.tkc-month__badge {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tkc-month__badge--price {
  background: var(--tkc-warm-soft, #fff4e6);
  color: var(--tkc-warm-text, #8a4b10);
  border-color: rgba(234, 138, 34, 0.24);
}

.tkc-month__badge--tinker_level {
  background: #eef2ff;
  color: #4338ca;
  border-color: #d8ddff;
}

.tkc-month__badge--age {
  background: #ecfeff;
  color: #155e75;
  border-color: #c8f2f6;
}

.tkc-month__badge--visibility {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.tkc-weekgrid__event {
  border-color: #ded6fb;
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(67, 56, 202, 0.07);
}

.tkc-weekgrid__event:hover,
.tkc-weekgrid__event:focus {
  background: #fbfaff;
  border-color: #cfc3f5;
}

.tkc-weekgrid__event .tkc-badge {
  box-shadow: none;
}

/* Week auto-window polish */
.tkc-week__window-note {
  margin: -0.25rem 0 0.85rem;
  color: #64748b;
  font-size: 0.84rem;
}

.tkc-week__empty {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  color: #334155;
}

.tkc-week__empty strong {
  color: #111827;
  font-size: 1rem;
}

.tkc-weekgrid__times-allday {
  min-height: 48px;
  height: auto;
}

.tkc-weekgrid__day {
  grid-template-rows: 44px minmax(48px, auto) 1fr;
}

.tkc-weekgrid.has-no-timed {
  grid-template-columns: 120px 1fr;
}

.tkc-weekgrid.has-no-timed .tkc-weekgrid__day {
  grid-template-rows: 44px minmax(74px, auto);
}

.tkc-weekgrid.has-no-timed .tkc-weekgrid__allday {
  border-bottom: 0;
  min-height: 74px;
}

.tkc-weekgrid__allday.is-empty {
  align-content: center;
}

.tkc-weekgrid__allday-empty {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.tkc-weekgrid__allday-item {
  display: grid;
  gap: 0.08rem;
}

.tkc-weekgrid__allday-item small {
  color: #64748b;
  font-size: 0.68rem;
}

/* 1.2.10.14: event type accents in calendar views */
.tkc-month__event,
.tkc-weekgrid__event,
.tkc-weekgrid__allday-item {
  --tkc-event-accent: var(--tkc-accent, #6b46c1);
  border-left: 4px solid var(--tkc-event-accent, var(--tkc-accent, #6b46c1));
}

.tkc-month__event-time,
.tkc-month__event-session,
.tkc-weekgrid__event-time {
  color: var(--tkc-event-accent, var(--tkc-accent, #6b46c1));
}

.tkc-month__event:hover,
.tkc-month__event:focus,
.tkc-weekgrid__event:hover,
.tkc-weekgrid__event:focus,
.tkc-weekgrid__allday-item:hover,
.tkc-weekgrid__allday-item:focus {
  border-left-color: var(--tkc-event-accent, var(--tkc-accent, #6b46c1));
}

/* 1.2.10.16: search + filter ordering */
.tkc-filterbar__search {
  margin-top: 0.65rem;
}

.tkc-filterbar__search label {
  display: grid;
  gap: 0.25rem;
  max-width: 420px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 800;
}

.tkc-filterbar__search input[type="search"] {
  width: 100%;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  padding: 0.58rem 0.85rem;
  background: #fff;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.2;
}

.tkc-filterbar__search input[type="search"]:focus {
  outline: 2px solid rgba(107, 70, 193, 0.18);
  border-color: var(--tkc-accent, #6b46c1);
}


/* 1.2.10.17: guild-only badge emphasis */
.tkc-month__badge--visibility {
  background: #fff7d6 !important;
  border-color: #f3d36b !important;
  color: #7c4a03 !important;
  box-shadow: 0 0 0 1px rgba(217,119,6,.12), 0 0 14px rgba(250,204,21,.24);
}

/* 1.2.10.18: quieter Guild-only accent */
.tkc-month__badge--visibility {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #7c4a03 !important;
  box-shadow: 0 0 0 1px rgba(245,158,11,.08), 0 0 8px rgba(245,158,11,.10) !important;
}

/* 1.2.10.19: quieter Guild-only badge in calendar-specific views */
.tkc-month__badge--visibility {
  background: #fffdf0 !important;
  border-color: #f8e9a6 !important;
  color: #80620d !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.045), 0 0 4px rgba(245, 158, 11, 0.055) !important;
}

/* 1.2.10.27: mobile agenda polish
   Desktop keeps the calendar grid/timeline. Phones switch to readable agenda cards. */
.tkc-month__day-date,
.tkc-weekgrid__mobile-agenda,
.tkc-weekgrid__mobile-empty {
  display: none;
}

@media (max-width: 760px) {
  .tkc-month-wrapper,
  .tkc-week-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .tkc-month,
  .tkc-week {
    min-width: 0;
  }

  .tkc-month__toolbar,
  .tkc-week__toolbar {
    gap: 0.6rem;
    margin-bottom: 0.75rem;
  }

  .tkc-month__label,
  .tkc-week__label {
    font-size: 1rem;
    line-height: 1.2;
  }

  .tkc-month__nav,
  .tkc-week__nav {
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
  }

  .tkc-month__weekdays {
    display: none;
  }

  .tkc-month__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .tkc-month__day--outside,
  .tkc-month__day.has-no-events:not(.is-today) {
    display: none;
  }

  .tkc-month__day {
    min-height: 0;
    padding: 0.8rem;
    border-radius: 1rem;
  }

  .tkc-month__day-head {
    justify-content: flex-start;
    gap: 0.65rem;
    padding-bottom: 0.15rem;
  }

  .tkc-month__day-number {
    display: inline-grid;
    place-items: center;
    min-width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: var(--tkc-accent-soft, #f3efff);
    color: var(--tkc-accent-text, #44337a);
    font-size: 0.9rem;
  }

  .tkc-month__day-date {
    display: inline-block;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 800;
  }

  .tkc-month__events {
    gap: 0.45rem;
  }

  .tkc-month__event {
    padding: 0.65rem 0.72rem;
    border-radius: 0.85rem;
  }

  .tkc-month__event-title {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-size: 0.9rem;
  }

  .tkc-month__event-time,
  .tkc-month__event-session {
    font-size: 0.76rem;
    white-space: normal;
  }

  .tkc-month__badges {
    gap: 0.3rem;
    margin-top: 0.36rem;
  }

  .tkc-month__badge,
  .tkc-badge {
    font-size: 0.68rem;
    line-height: 1.15;
    padding: 0.12rem 0.42rem;
  }

  .tkc-week__window-note {
    display: none;
  }

  .tkc-weekgrid,
  .tkc-weekgrid.has-no-timed {
    display: block;
  }

  .tkc-weekgrid__times,
  .tkc-weekgrid__tracks,
  .tkc-weekgrid__allday {
    display: none !important;
  }

  .tkc-weekgrid__days {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .tkc-weekgrid__day {
    display: block;
    border-radius: 1rem;
    overflow: hidden;
  }

  .tkc-weekgrid__day.has-no-events:not(.is-today) {
    opacity: 0.72;
  }

  .tkc-weekgrid__day-head {
    height: auto;
    min-height: 0;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #eef2f7;
  }

  .tkc-weekgrid__day-label {
    font-size: 0.92rem;
  }

  .tkc-weekgrid__day-count {
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    min-width: 1.7rem;
    padding: 0.12rem 0.42rem;
    text-align: center;
    font-weight: 800;
  }

  .tkc-weekgrid__mobile-agenda {
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem;
  }

  .tkc-weekgrid__mobile-empty {
    display: block;
    padding: 0.75rem 0.85rem;
    color: #94a3b8;
    font-size: 0.85rem;
  }

  .tkc-weekgrid__mobile-item {
    display: grid;
    gap: 0.18rem;
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.72rem;
    text-align: left;
    border: 1px solid #ded6fb;
    border-left: 4px solid var(--tkc-event-accent, var(--tkc-accent, #6b46c1));
    border-radius: 0.85rem;
    background: var(--tkc-accent-soft, #f3efff);
    color: #111827;
    cursor: pointer;
  }

  .tkc-weekgrid__mobile-item:hover,
  .tkc-weekgrid__mobile-item:focus {
    background: #eee7ff;
    border-color: #cfc3f5;
    outline: none;
  }

  .tkc-weekgrid__mobile-time {
    color: var(--tkc-event-accent, var(--tkc-accent, #6b46c1));
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
  }

  .tkc-weekgrid__mobile-title {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.22;
  }

  .tkc-weekgrid__mobile-session {
    color: #475569;
    font-size: 0.76rem;
    line-height: 1.2;
  }
}

/* 1.9.27.0 — Agenda Frontend Finalization */
.tkc-month-wrapper {
  container-type: inline-size;
  container-name: tkc-month-shell;
}

.tkc-agenda-surface {
  padding: 0.85rem;
  border: 1px solid var(--tkc-line, #e6e8ef);
  border-radius: 1rem;
  background: #ffffff;
}

.tkc-agenda-surface .tkc-month__toolbar {
  margin-bottom: 0.65rem;
}

.tkc-agenda-surface__filters {
  margin: 0 0 0.7rem;
}

.tkc-agenda-surface__filters .tkc-filterbar {
  display: grid;
  justify-items: end;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.tkc-agenda-surface__filters .tkc-filterbar__toggle {
  width: 2.35rem;
  height: 2.35rem;
  box-shadow: none;
}

.tkc-agenda-surface__filters .tkc-filterbar__toggle + .tkc-filterbar__panel {
  margin-top: 0.55rem;
}

.tkc-agenda-surface__filters .tkc-filterbar__panel {
  width: 100%;
  padding: 0.8rem;
  border-color: #e7e0f2;
  border-radius: 0.8rem;
  background: #fbf9ff;
  box-shadow: none;
}

.tkc-month--layout-auto .tkc-month__day,
.tkc-month--layout-detail .tkc-month__day {
  min-height: 70px;
}

.tkc-month--layout-auto .tkc-month__day.has-events,
.tkc-month--layout-detail .tkc-month__day.has-events {
  min-height: 96px;
}

.tkc-month__dots {
  display: none;
}

/* Explicit compact widget layout. Auto uses the same rules when its own
   container becomes narrow, so Divi columns behave correctly regardless of
   the browser viewport width. */
.tkc-month--layout-compact .tkc-month__weekdays {
  display: grid !important;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.tkc-month--layout-compact .tkc-month__weekdays > div {
  padding: 0.2rem 0;
  font-size: 0.68rem;
}

.tkc-month--layout-compact .tkc-month__grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 0.2rem;
}

.tkc-month--layout-compact .tkc-month__day,
.tkc-month--layout-compact .tkc-month__day.has-events,
.tkc-month--layout-compact .tkc-month__day.has-no-events,
.tkc-month--layout-compact .tkc-month__day--outside {
  display: flex !important;
  min-width: 0;
  min-height: 42px;
  padding: 0.24rem 0.1rem;
  align-items: center;
  justify-content: flex-start;
  gap: 0.1rem;
  border: 1px solid transparent;
  border-radius: 0.62rem;
  background: transparent;
}

.tkc-month--layout-compact .tkc-month__day:not(.tkc-month__day--outside) {
  cursor: pointer;
}

.tkc-month--layout-compact .tkc-month__day.has-events {
  background: #faf8ff;
}

.tkc-month--layout-compact .tkc-month__day--outside {
  cursor: default;
}

.tkc-month--layout-compact .tkc-month__day.is-today {
  border-color: var(--tkc-accent, #6b46c1);
  box-shadow: none;
}

.tkc-month--layout-compact .tkc-month__day-head {
  width: 100%;
  min-height: 1.15rem;
  justify-content: center;
  padding: 0;
}

.tkc-month--layout-compact .tkc-month__day-number {
  display: inline;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 0.76rem;
  line-height: 1.1;
}

.tkc-month--layout-compact .tkc-month__day-date,
.tkc-month--layout-compact .tkc-month__events {
  display: none !important;
}

.tkc-month--layout-compact .tkc-month__dots {
  display: flex;
  min-height: 0.4rem;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
}

.tkc-month__dot {
  display: block;
  width: 0.34rem;
  height: 0.34rem;
  flex: 0 0 0.34rem;
  border-radius: 999px;
  background: var(--tkc-dot-color, var(--tkc-accent, #6b46c1));
}

@container tkc-month-shell (max-width: 720px) {
  .tkc-agenda-surface {
    padding: 0.6rem;
    border-radius: 0.85rem;
  }

  .tkc-month--layout-auto .tkc-month__toolbar {
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }

  .tkc-month--layout-auto .tkc-month__nav {
    min-width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    border-radius: 0.65rem;
  }

  .tkc-month--layout-auto .tkc-month__label {
    font-size: 0.92rem;
  }

  .tkc-month--layout-auto .tkc-month__weekdays {
    display: grid !important;
    gap: 0.2rem;
    margin-bottom: 0.2rem;
  }

  .tkc-month--layout-auto .tkc-month__weekdays > div {
    padding: 0.2rem 0;
    font-size: 0.68rem;
  }

  .tkc-month--layout-auto .tkc-month__grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.2rem;
  }

  .tkc-month--layout-auto .tkc-month__day,
  .tkc-month--layout-auto .tkc-month__day.has-events,
  .tkc-month--layout-auto .tkc-month__day.has-no-events,
  .tkc-month--layout-auto .tkc-month__day--outside {
    display: flex !important;
    min-width: 0;
    min-height: 42px;
    padding: 0.24rem 0.1rem;
    align-items: center;
    justify-content: flex-start;
    gap: 0.1rem;
    border: 1px solid transparent;
    border-radius: 0.62rem;
    background: transparent;
  }

  .tkc-month--layout-auto .tkc-month__day:not(.tkc-month__day--outside) {
    cursor: pointer;
  }

  .tkc-month--layout-auto .tkc-month__day.has-events {
    background: #faf8ff;
  }

  .tkc-month--layout-auto .tkc-month__day--outside {
    cursor: default;
  }

  .tkc-month--layout-auto .tkc-month__day.is-today {
    border-color: var(--tkc-accent, #6b46c1);
    box-shadow: none;
  }

  .tkc-month--layout-auto .tkc-month__day-head {
    width: 100%;
    min-height: 1.15rem;
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .tkc-month--layout-auto .tkc-month__day-number {
    display: inline;
    min-width: 0;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .tkc-month--layout-auto .tkc-month__day-date,
  .tkc-month--layout-auto .tkc-month__events {
    display: none !important;
  }

  .tkc-month--layout-auto .tkc-month__dots {
    display: flex;
    min-height: 0.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
  }
}


/* 1.9.27.1 — Agenda Frontend Polish */
.tkc-agenda-controls {
  margin: 0 0 0.38rem;
}

.tkc-agenda-controls .tkc-filterbar {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.tkc-agenda-controls .tkc-filterbar__toggle {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  box-shadow: none;
}

.tkc-agenda-controls .tkc-filterbar__toggle + .tkc-filterbar__panel {
  margin-top: 0.3rem;
}

.tkc-agenda-controls .tkc-filterbar__panel {
  width: 100%;
  padding: 0.75rem;
  border-color: #e7e0f2;
  border-radius: 0.8rem;
  background: #fbf9ff;
  box-shadow: none;
}

/* The global mobile calendar fallback predates the compact 7-column layout.
   Explicitly restore seven weekday columns in compact/auto mode. */
.tkc-month--layout-compact .tkc-month__weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

@container tkc-month-shell (max-width: 720px) {
  .tkc-month--layout-auto .tkc-month__weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .tkc-agenda-controls {
    margin-bottom: 0.28rem;
  }

  .tkc-agenda-controls .tkc-filterbar {
    padding: 0;
  }

  .tkc-agenda-controls .tkc-filterbar__panel {
    padding: 0.65rem;
  }

  .tkc-agenda-controls .tkc-filterbar__top {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .tkc-agenda-controls .tkc-filterbar__segmented,
  .tkc-agenda-controls .tkc-filterbar__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.26rem;
  }

  .tkc-agenda-controls .tkc-filterbar__segment {
    flex: 0 1 auto;
    min-width: 0;
    padding-inline: 0.48rem;
    white-space: nowrap;
  }

  .tkc-agenda-controls .tkc-filterbar__search-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
  }

  .tkc-agenda-controls .tkc-filterbar__search input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .tkc-agenda-controls .tkc-filterbar__search-button {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-height: 36px;
    padding: 0.48rem 0.72rem;
    font-size: 0.78rem;
    line-height: 1.1;
  }
}


/* 1.9.27.2 — Agenda Frontend Polish II */
.tkc-month__grid {
  gap: 0.42rem;
}

.tkc-month__day {
  min-height: 124px;
  padding: 0.48rem;
  gap: 0.38rem;
}

.tkc-month__day-head {
  align-items: flex-start;
}

.tkc-month__day-date {
  display: none;
}

.tkc-month__events {
  gap: 0.26rem;
}

.tkc-month__event {
  padding: 0.36rem 0.42rem 0.4rem;
  border-radius: 0.72rem;
  border-left-width: 3px;
  background: #f7f4ff;
}

.tkc-month__event:hover,
.tkc-month__event:focus {
  background: #f2eeff;
}

.tkc-month__event-time {
  margin-bottom: 0.12rem;
  font-size: 0.66rem;
}

.tkc-month__event-title {
  font-size: 0.76rem;
  line-height: 1.18;
}

.tkc-month__event-session {
  display: none;
}

.tkc-month__more {
  padding-top: 0.05rem;
  font-size: 0.68rem;
  color: #7c8698;
}

/* Switch auto month earlier to compact to avoid broken tablet middle states. */
@container tkc-month-shell (max-width: 860px) {
  .tkc-month--layout-auto .tkc-month__toolbar {
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }

  .tkc-month--layout-auto .tkc-month__nav {
    min-width: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    border-radius: 0.7rem;
  }

  .tkc-month--layout-auto .tkc-month__label {
    font-size: 0.96rem;
  }

  .tkc-month--layout-auto .tkc-month__weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.2rem;
    margin-bottom: 0.2rem;
  }

  .tkc-month--layout-auto .tkc-month__weekdays > div {
    padding: 0.2rem 0;
    font-size: 0.68rem;
  }

  .tkc-month--layout-auto .tkc-month__grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.2rem;
  }

  .tkc-month--layout-auto .tkc-month__day,
  .tkc-month--layout-auto .tkc-month__day.has-events,
  .tkc-month--layout-auto .tkc-month__day.has-no-events,
  .tkc-month--layout-auto .tkc-month__day--outside {
    display: flex !important;
    min-width: 0;
    min-height: 44px;
    padding: 0.24rem 0.1rem;
    align-items: center;
    justify-content: flex-start;
    gap: 0.1rem;
    border: 1px solid transparent;
    border-radius: 0.62rem;
    background: transparent;
  }

  .tkc-month--layout-auto .tkc-month__day.has-events {
    background: #faf8ff;
  }

  .tkc-month--layout-auto .tkc-month__day--outside {
    cursor: default;
  }

  .tkc-month--layout-auto .tkc-month__day-head {
    width: 100%;
    min-height: 1.15rem;
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  .tkc-month--layout-auto .tkc-month__day-number {
    display: inline;
    min-width: 0;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .tkc-month--layout-auto .tkc-month__day-date,
  .tkc-month--layout-auto .tkc-month__events {
    display: none !important;
  }

  .tkc-month--layout-auto .tkc-month__dots {
    display: flex;
    min-height: 0.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
  }
}

/* Keep detail mode usable a bit longer above compact breakpoint. */
@container tkc-month-shell (min-width: 861px) and (max-width: 1040px) {
  .tkc-month--layout-detail .tkc-month__grid,
  .tkc-month--layout-auto .tkc-month__grid {
    gap: 0.36rem;
  }

  .tkc-month--layout-detail .tkc-month__day,
  .tkc-month--layout-auto .tkc-month__day {
    min-height: 110px;
    padding: 0.4rem;
  }

  .tkc-month--layout-detail .tkc-month__event,
  .tkc-month--layout-auto .tkc-month__event {
    padding: 0.32rem 0.36rem 0.34rem;
  }

  .tkc-month--layout-detail .tkc-month__event-title,
  .tkc-month--layout-auto .tkc-month__event-title {
    font-size: 0.72rem;
  }
}

.tkc-agenda-controls {
  margin: 0 0 0.22rem;
}

.tkc-agenda-controls .tkc-filterbar__toggle {
  width: auto;
  height: 2.1rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  gap: 0.38rem;
  color: #4c1d95;
  box-shadow: none;
}

.tkc-agenda-controls .tkc-filterbar__toggle-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.tkc-agenda-controls .tkc-filterbar__toggle-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.tkc-agenda-controls .tkc-filterbar__active-count {
  position: static;
  min-width: 1.1rem;
  min-height: 1.1rem;
  padding: 0 0.24rem;
  border: 0;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.68rem;
}

.tkc-agenda-controls .tkc-filterbar__toggle + .tkc-filterbar__panel {
  margin-top: 0.18rem;
}

.tkc-agenda-controls .tkc-filterbar__panel {
  padding: 0.7rem;
}

@media (max-width: 899px) {
  .tkc-agenda-controls .tkc-filterbar__panel[hidden] {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .tkc-agenda-controls .tkc-filterbar__toggle {
    height: 1.95rem;
    padding: 0.34rem 0.6rem;
  }

  .tkc-agenda-controls .tkc-filterbar__panel {
    padding: 0.58rem;
  }
}


/* 1.9.27.4 — Final Agenda/UI Cleanup */
.tkc-agenda-controls .tkc-filterbar__panel {
  padding: 0.52rem 0.62rem;
  border-color: #ebe6f3;
  border-radius: 0.7rem;
  background: #fdfcff;
}

.tkc-agenda-controls .tkc-filterbar__top {
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.38rem;
}

.tkc-agenda-controls .tkc-filterbar__groups {
  gap: 0.35rem;
}

.tkc-agenda-controls .tkc-filterbar__group {
  gap: 0.18rem;
}

.tkc-agenda-controls .tkc-filterbar__legend,
.tkc-agenda-controls .tkc-filterbar__search label > span:first-child {
  font-size: 0.68rem;
  font-weight: 750;
  color: #667085;
}

.tkc-agenda-controls .tkc-filterbar__segmented,
.tkc-agenda-controls .tkc-filterbar__options {
  gap: 0.2rem;
}

.tkc-agenda-controls .tkc-filterbar__segment,
.tkc-agenda-controls .tkc-filterbar__chip {
  min-height: 1.7rem;
  padding: 0.14rem 0.42rem;
  font-size: 0.68rem;
  line-height: 1.1;
}

.tkc-agenda-controls .tkc-filterbar__search {
  margin-top: 0;
}

.tkc-agenda-controls .tkc-filterbar__search label {
  gap: 0.18rem;
}

.tkc-agenda-controls .tkc-filterbar__search-row {
  gap: 0.3rem;
}

.tkc-agenda-controls .tkc-filterbar__search input[type="search"] {
  min-height: 2rem;
  padding: 0.36rem 0.62rem;
  font-size: 0.78rem;
}

.tkc-agenda-controls .tkc-filterbar__search-button {
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  font-size: 0.7rem;
}

.tkc-agenda-controls .tkc-filterbar__reset {
  font-size: 0.68rem;
  opacity: 0.72;
}

@media (max-width: 700px) {
  .tkc-agenda-controls .tkc-filterbar__panel {
    padding: 0.48rem 0.52rem;
  }
}


/* 1.9.27.5 — mobile agenda filter labels may wrap instead of clipping */
@media (max-width: 700px) {
  .tkc-agenda-controls .tkc-filterbar__segment,
  .tkc-agenda-controls .tkc-filterbar__chip {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  .tkc-agenda-controls .tkc-filterbar__options,
  .tkc-agenda-controls .tkc-filterbar__segmented {
    max-width: 100%;
    overflow: visible;
  }
}
