/* NEIS Circle Timetable — isolated styles */
.tt-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px}
.tt-head h1{margin:2px 0 8px;font-size:38px;letter-spacing:-.055em}.tt-head>div>p:last-child{max-width:720px;margin:0;color:var(--muted);line-height:1.7}
.tt-head-actions{display:flex;gap:8px;flex:0 0 auto}
.tt-summary{display:grid;grid-template-columns:180px 180px minmax(240px,1fr);gap:12px;margin:0 0 18px}
.tt-summary article{min-width:0;padding:16px 18px;border:1px solid var(--line);border-radius:18px;background:var(--card);display:grid;gap:2px}
.tt-summary span{font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.tt-summary b{font-size:22px;letter-spacing:-.03em}.tt-summary small{color:var(--muted);font-size:10px}.tt-summary .tt-next b{font-size:15px}
.tt-board{display:grid;grid-template-columns:repeat(5,minmax(180px,1fr));gap:12px;align-items:stretch;overflow-x:auto;padding-bottom:8px;scrollbar-width:thin}
.tt-day{min-width:180px;border:1px solid var(--line);border-radius:22px;background:var(--card);overflow:hidden}
.tt-day.today{border-color:color-mix(in srgb,var(--accent) 38%,var(--line));box-shadow:0 12px 32px color-mix(in srgb,var(--accent) 8%,transparent)}
.tt-day>header{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--soft) 76%,var(--card))}
.tt-day>header>div{display:flex;align-items:center;gap:7px}.tt-day>header span{font-size:13px;font-weight:800}.tt-day>header b{padding:4px 7px;border-radius:99px;background:var(--accent2);color:var(--accent);font-size:7px;text-transform:uppercase;letter-spacing:.07em}
.tt-day>header button{width:30px;height:30px;border:0;border-radius:10px;background:var(--card);color:var(--accent);font-size:18px}
.tt-day-body{display:grid;align-content:start;gap:10px;min-height:440px;padding:12px}
.tt-event{position:relative;display:grid;grid-template-columns:5px minmax(0,1fr) 24px;gap:9px;align-items:start;padding:12px 10px 12px 8px;border:1px solid color-mix(in srgb,var(--tt-color) 24%,var(--line));border-radius:16px;background:color-mix(in srgb,var(--tt-color) 7%,var(--card));cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.tt-event:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--tt-color) 48%,var(--line));box-shadow:0 12px 26px color-mix(in srgb,var(--tt-color) 11%,transparent)}
.tt-event.is-now{box-shadow:0 0 0 2px color-mix(in srgb,var(--tt-color) 35%,transparent)}
.tt-event-bar{width:5px;height:100%;min-height:58px;border-radius:99px;background:var(--tt-color)}
.tt-event-main{min-width:0;display:grid;gap:5px}.tt-event-title{display:flex;align-items:flex-start;gap:6px;justify-content:space-between}.tt-event-title b{min-width:0;font-size:12px;line-height:1.25}.tt-event-title span{flex:0 0 auto;padding:3px 5px;border-radius:7px;background:color-mix(in srgb,var(--tt-color) 13%,transparent);color:var(--tt-color);font-size:7px;font-weight:800}
.tt-event time{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}.tt-event small{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:9px}.tt-event small svg{width:11px;height:11px}.tt-event p{margin:1px 0 0;color:var(--muted);font-size:9px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.tt-event-menu{width:24px;height:24px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);opacity:.6}.tt-event-menu:hover{background:var(--soft);opacity:1}
.tt-empty-day{min-height:110px;display:grid;place-items:center;align-content:center;gap:3px;border:1px dashed var(--line);border-radius:16px;background:transparent;color:var(--muted);text-align:center}.tt-empty-day span{font-size:22px;color:var(--accent)}.tt-empty-day b{font-size:10px}.tt-empty-day small{font-size:8px}
.tt-mobile-only{display:none}.tt-color-field{display:grid;gap:8px;margin:13px 0;color:var(--muted);font-size:11px;font-weight:700}.tt-palette{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.tt-palette>button{width:30px;height:30px;border:3px solid transparent;border-radius:10px;background:var(--swatch)}.tt-palette>button.active{border-color:var(--card);box-shadow:0 0 0 2px var(--ink)}.tt-custom-color{display:flex;align-items:center;gap:7px;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:10px;background:var(--soft);font-size:9px;font-weight:700}.tt-custom-color input{width:20px;height:20px;padding:0;border:0;background:transparent}
.tt-editor-modal{width:min(720px,100%)}
.tt-loading{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.tt-loading i{display:block;height:480px;border-radius:22px;background:linear-gradient(90deg,var(--soft),var(--card),var(--soft));background-size:220% 100%;animation:shimmer 1.2s infinite}

@media(max-width:1100px){.tt-board{grid-template-columns:repeat(5,minmax(210px,1fr))}}
@media(max-width:760px){
  .tt-head{align-items:flex-start;gap:14px;margin-bottom:14px}.tt-head h1{font-size:30px}.tt-head>div>p:last-child{font-size:11px}.tt-head-actions{display:grid;grid-template-columns:auto auto}.tt-head-actions button{padding-inline:12px}
  .tt-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tt-summary .tt-next{grid-column:1/-1}.tt-summary article{padding:13px 14px;border-radius:16px}.tt-summary b{font-size:18px}
  .tt-desktop-only{display:none}.tt-mobile-only{display:block}
  .tt-mobile-days{display:flex;gap:7px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none}.tt-mobile-days::-webkit-scrollbar{display:none}.tt-mobile-days button{min-width:64px;height:48px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px;padding:0 10px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--muted)}.tt-mobile-days button.active{border-color:var(--accent);background:var(--accent2);color:var(--accent)}.tt-mobile-days b{font-size:10px}.tt-mobile-days span{min-width:18px;height:18px;display:grid;place-items:center;border-radius:99px;background:var(--soft);font-size:8px}
  .tt-mobile-day{border:1px solid var(--line);border-radius:22px;background:var(--card);overflow:hidden}.tt-mobile-day>header{display:flex;align-items:center;justify-content:space-between;padding:14px 15px;border-bottom:1px solid var(--line)}.tt-mobile-day h2{margin:0;font-size:18px}.tt-mobile-day header p{margin:2px 0 0;color:var(--muted);font-size:9px}.tt-mobile-day header .primary{height:36px;font-size:10px}
  .tt-mobile-list{display:grid;gap:9px;padding:11px}.tt-event{grid-template-columns:5px minmax(0,1fr) 26px;padding:12px 10px 12px 8px}.tt-event-title b{font-size:13px}.tt-event time{font-size:10px}.tt-event p{-webkit-line-clamp:3}.tt-empty-day{min-height:170px}
  .tt-editor-modal .row{grid-template-columns:1fr 1fr}.tt-editor-modal{padding:18px}.tt-palette>button{width:28px;height:28px}
}
@media(max-width:420px){.tt-head{display:grid}.tt-head-actions{width:100%;grid-template-columns:1fr 1fr}.tt-head-actions button{width:100%}.tt-editor-modal .row{grid-template-columns:1fr}.tt-summary{grid-template-columns:1fr 1fr}.tt-mobile-days button{min-width:60px}}

/* v148 — clearer time, cleaner location and full-week support */
.tt-time-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:2px;
}
.tt-time-row time{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--ink);
  font-variant-numeric:tabular-nums;
  letter-spacing:-.015em;
}
.tt-time-row time strong{
  font-size:13px;
  line-height:1;
  font-weight:850;
}
.tt-time-row time span{
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}
.tt-time-row em{
  flex:0 0 auto;
  padding:4px 6px;
  border-radius:8px;
  background:color-mix(in srgb,var(--tt-color) 10%,var(--soft));
  color:var(--tt-color);
  font-size:7px;
  font-style:normal;
  font-weight:800;
  white-space:nowrap;
}
.tt-location-pill{
  width:max-content;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border:1px solid color-mix(in srgb,var(--tt-color) 22%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--tt-color) 8%,var(--card));
  color:var(--ink);
  font-size:8.5px;
  font-weight:750;
  line-height:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tt-reminder-note{
  align-self:end;
  min-height:45px;
  display:grid;
  align-content:center;
  gap:3px;
  margin:13px 0;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--soft);
}
.tt-reminder-note b{
  font-size:10px;
  color:var(--ink);
}
.tt-reminder-note span{
  color:var(--muted);
  font-size:8px;
  line-height:1.35;
}
@media(max-width:760px){
  .tt-time-row time strong{font-size:15px}
  .tt-time-row time span{font-size:11px}
  .tt-location-pill{font-size:9px;padding:6px 9px}
}


/* v149 — restore fixed school week + optional weekend days */
.tt-head-actions{flex-wrap:wrap}
.tt-board.tt-days-5{grid-template-columns:repeat(5,minmax(180px,1fr))}
.tt-board.tt-days-6{grid-template-columns:repeat(6,minmax(180px,1fr))}
.tt-board.tt-days-7{grid-template-columns:repeat(7,minmax(180px,1fr))}
.tt-extra-day-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.tt-extra-day-options button{min-height:76px;display:grid;align-content:center;justify-items:start;gap:4px;padding:14px;text-align:start}
.tt-extra-day-options button b{font-size:13px;color:var(--ink)}
.tt-extra-day-options button small{font-size:9px;line-height:1.4;color:var(--muted)}
@media(max-width:760px){
  .tt-head-actions{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .tt-head-actions button{width:100%;min-width:0;padding-inline:8px}
  .tt-extra-day-options{grid-template-columns:1fr}
}
@media(max-width:420px){
  .tt-head-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* v150 — premium full-color timetable cards */
.tt-event{
  grid-template-columns:minmax(0,1fr) 28px;
  gap:10px;
  padding:14px 12px 14px 14px;
  border:0;
  border-radius:18px;
  background:var(--tt-color);
  color:#fff;
  box-shadow:0 10px 24px color-mix(in srgb,var(--tt-color) 26%,transparent);
  overflow:hidden;
}
.tt-event::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,0) 52%,rgba(0,0,0,.08));
}
.tt-event:hover{
  transform:translateY(-2px);
  border-color:transparent;
  box-shadow:0 14px 30px color-mix(in srgb,var(--tt-color) 34%,transparent);
}
.tt-event.is-now{
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tt-color) 30%,#fff),0 14px 30px color-mix(in srgb,var(--tt-color) 32%,transparent);
}
.tt-event-bar{display:none}
.tt-event-main,.tt-event-menu{position:relative;z-index:1}
.tt-event-main{gap:8px}
.tt-event-title{align-items:center;gap:10px}
.tt-event-title b{
  font-size:13px;
  line-height:1.25;
  font-weight:850;
  color:#fff;
  letter-spacing:-.015em;
}
.tt-event-title span{
  padding:5px 7px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:7.5px;
  font-weight:800;
  backdrop-filter:blur(4px);
}
.tt-time-row{
  justify-content:flex-start;
  gap:10px;
  margin:0;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  background:rgba(255,255,255,.12);
}
.tt-time-row time{
  flex:1 1 auto;
  justify-content:flex-start;
  gap:7px;
  color:#fff;
}
.tt-time-row time strong{
  font-size:14px;
  line-height:1;
  font-weight:900;
  color:#fff;
}
.tt-time-row time span{
  color:rgba(255,255,255,.72);
  font-size:11px;
}
.tt-time-row em{
  padding:4px 7px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.12);
  color:#fff;
  font-size:7px;
}
.tt-location-pill{
  padding:5px 8px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:8.5px;
}
.tt-event p{
  margin:0;
  color:rgba(255,255,255,.82);
  font-size:9px;
  line-height:1.5;
}
.tt-event-menu{
  width:28px;
  height:28px;
  border-radius:9px;
  background:rgba(255,255,255,.12);
  color:#fff;
  opacity:1;
  font-weight:800;
}
.tt-event-menu:hover{background:rgba(255,255,255,.22)}
@media(max-width:760px){
  .tt-event{
    grid-template-columns:minmax(0,1fr) 30px;
    padding:15px 12px 15px 15px;
    border-radius:19px;
  }
  .tt-event-title b{font-size:14px}
  .tt-time-row{padding:10px 11px}
  .tt-time-row time strong{font-size:16px}
  .tt-location-pill{font-size:9px}
}


/* v151 — removable optional days + adaptive card density */
.tt-day-actions{display:flex;align-items:center;gap:6px}
.tt-day-actions button{flex:0 0 auto}
.tt-day-actions [data-tt-remove-day]{
  background:color-mix(in srgb,#d64545 10%,var(--card));
  color:#c93434;
}
.tt-day-actions [data-tt-remove-day]:hover{
  background:color-mix(in srgb,#d64545 18%,var(--card));
}

.tt-board.tt-days-6 .tt-event,
.tt-board.tt-days-7 .tt-event{
  padding:12px 10px 12px 12px;
  border-radius:16px;
  gap:8px;
}
.tt-board.tt-days-6 .tt-event-title b,
.tt-board.tt-days-7 .tt-event-title b{font-size:12px}
.tt-board.tt-days-6 .tt-event-title span,
.tt-board.tt-days-7 .tt-event-title span{font-size:7px;padding:4px 6px}
.tt-board.tt-days-6 .tt-time-row,
.tt-board.tt-days-7 .tt-time-row{
  padding:7px 8px;
  gap:6px;
}
.tt-board.tt-days-6 .tt-time-row time,
.tt-board.tt-days-7 .tt-time-row time{
  min-width:0;
  gap:5px;
  flex-wrap:wrap;
}
.tt-board.tt-days-6 .tt-time-row time strong{font-size:12px}
.tt-board.tt-days-7 .tt-time-row time strong{font-size:11px}
.tt-board.tt-days-6 .tt-time-row em,
.tt-board.tt-days-7 .tt-time-row em{
  font-size:6.5px;
  padding:3px 5px;
  max-width:100%;
}
.tt-board.tt-days-6 .tt-location-pill,
.tt-board.tt-days-7 .tt-location-pill{
  font-size:8px;
  padding:4px 6px;
}
.tt-board.tt-days-6 .tt-event-menu,
.tt-board.tt-days-7 .tt-event-menu{
  width:24px;
  height:24px;
  font-size:11px;
}
.tt-board.tt-days-6 .tt-event,
.tt-board.tt-days-7 .tt-event,
.tt-board.tt-days-6 .tt-event-main,
.tt-board.tt-days-7 .tt-event-main,
.tt-board.tt-days-6 .tt-time-row,
.tt-board.tt-days-7 .tt-time-row{
  min-width:0;
}
.tt-board.tt-days-6 .tt-time-row,
.tt-board.tt-days-7 .tt-time-row{flex-wrap:wrap}
.tt-board.tt-days-6 .tt-time-row em,
.tt-board.tt-days-7 .tt-time-row em{margin-left:0}
.tt-board.tt-days-6 .tt-event p,
.tt-board.tt-days-7 .tt-event p{
  font-size:8px;
  -webkit-line-clamp:2;
}
.tt-board.tt-days-7 .tt-day{min-width:160px}
.tt-board.tt-days-6 .tt-day{min-width:170px}

@media(max-width:1100px){
  .tt-board.tt-days-6{grid-template-columns:repeat(6,minmax(185px,1fr))}
  .tt-board.tt-days-7{grid-template-columns:repeat(7,minmax(175px,1fr))}
}


.tt-mobile-header-actions{display:flex;align-items:center;gap:8px}
.tt-mobile-header-actions [data-tt-remove-day]{
  width:36px;height:36px;padding:0;border-radius:11px;
  color:#c93434;background:color-mix(in srgb,#d64545 10%,var(--card));
}


/* v152 — balanced compact cards, fixed header alignment, single-line time */
.tt-event{
  display:block;
  padding:13px 13px 12px;
  border-radius:17px;
  min-height:0;
}
.tt-event-main{display:grid;gap:9px;min-width:0}
.tt-event-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-width:0;
}
.tt-event-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-size:13px;
  line-height:1.2;
  font-weight:850;
  letter-spacing:-.015em;
}
.tt-event-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
  min-width:max-content;
}
.tt-event-category{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  background:rgba(255,255,255,.13);
  color:#fff;
  font-size:7.5px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
.tt-event-menu{
  flex:0 0 28px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  padding:0;
  line-height:1;
}
.tt-time-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 9px;
  min-width:0;
}
.tt-time-row time{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:6px;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
}
.tt-time-row time strong{
  flex:0 1 auto;
  min-width:0;
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}
.tt-time-row time span{flex:0 0 auto}
.tt-time-row em{
  flex:0 0 auto;
  white-space:nowrap;
}
.tt-location-pill{
  min-height:25px;
  padding:0 9px;
  line-height:1;
}
.tt-event p{margin-top:-1px}
.tt-board.tt-days-6 .tt-event,
.tt-board.tt-days-7 .tt-event{
  padding:11px 11px 10px;
}
.tt-board.tt-days-6 .tt-event-main,
.tt-board.tt-days-7 .tt-event-main{gap:7px}
.tt-board.tt-days-6 .tt-event-top,
.tt-board.tt-days-7 .tt-event-top{gap:7px}
.tt-board.tt-days-6 .tt-event-name{font-size:12px}
.tt-board.tt-days-7 .tt-event-name{font-size:11.5px}
.tt-board.tt-days-6 .tt-event-tools,
.tt-board.tt-days-7 .tt-event-tools{gap:4px}
.tt-board.tt-days-6 .tt-event-category,
.tt-board.tt-days-7 .tt-event-category{
  min-height:24px;
  padding:0 7px;
  font-size:6.5px;
}
.tt-board.tt-days-6 .tt-event-menu,
.tt-board.tt-days-7 .tt-event-menu{
  flex-basis:24px;
  width:24px;
  height:24px;
}
.tt-board.tt-days-6 .tt-time-row,
.tt-board.tt-days-7 .tt-time-row{
  grid-template-columns:minmax(0,1fr) auto;
  flex-wrap:nowrap;
  padding:7px 8px;
}
.tt-board.tt-days-6 .tt-time-row time,
.tt-board.tt-days-7 .tt-time-row time{
  flex-wrap:nowrap;
  gap:4px;
  white-space:nowrap;
}
.tt-board.tt-days-6 .tt-time-row time strong{font-size:11px}
.tt-board.tt-days-7 .tt-time-row time strong{font-size:10.5px}
.tt-board.tt-days-6 .tt-time-row em,
.tt-board.tt-days-7 .tt-time-row em{
  font-size:6px;
  padding:3px 4px;
  white-space:nowrap;
}
.tt-board.tt-days-6 .tt-location-pill,
.tt-board.tt-days-7 .tt-location-pill{
  min-height:22px;
  padding:0 7px;
}
@media(max-width:760px){
  .tt-event{
    padding:14px 14px 13px;
    border-radius:18px;
  }
  .tt-event-main{gap:9px}
  .tt-event-name{font-size:14px}
  .tt-event-tools{gap:7px}
  .tt-event-category{min-height:29px;padding:0 10px;font-size:8px}
  .tt-event-menu{width:29px;height:29px;flex-basis:29px}
  .tt-time-row{
    grid-template-columns:minmax(0,1fr) auto;
    padding:9px 10px;
    gap:8px;
  }
  .tt-time-row time{gap:6px;overflow:visible}
  .tt-time-row time strong{font-size:14px}
  .tt-time-row em{font-size:7px}
}
@media(max-width:380px){
  .tt-event-top{gap:7px}
  .tt-event-name{font-size:13px}
  .tt-event-category{padding:0 8px}
  .tt-time-row{gap:6px;padding:8px}
  .tt-time-row time{gap:4px}
  .tt-time-row time strong{font-size:12px}
  .tt-time-row em{font-size:6.5px;padding:3px 5px}
}


/* v153 — taller day columns, protected time text, adaptive dense schedules */
.tt-day-body{
  min-height:560px;
  align-content:start;
}
.tt-time-row{
  grid-template-columns:minmax(max-content,1fr) auto;
}
.tt-time-row time{
  overflow:visible;
  min-width:max-content;
}
.tt-time-row time strong{
  overflow:visible;
  text-overflow:clip;
}
.tt-time-row em{
  max-width:none;
}
.tt-board.tt-days-6 .tt-time-row,
.tt-board.tt-days-7 .tt-time-row{
  grid-template-columns:1fr;
  align-items:start;
}
.tt-board.tt-days-6 .tt-time-row em,
.tt-board.tt-days-7 .tt-time-row em{
  justify-self:start;
}
.tt-board.tt-days-6 .tt-time-row time,
.tt-board.tt-days-7 .tt-time-row time{
  min-width:0;
  width:100%;
  overflow:visible;
}
.tt-board.tt-days-6 .tt-time-row time strong,
.tt-board.tt-days-7 .tt-time-row time strong{
  flex:0 0 auto;
}

/* Per-day density: only the crowded column becomes more compact. */
.tt-day.tt-count-4 .tt-day-body,
.tt-day.tt-count-5 .tt-day-body,
.tt-day.tt-count-6 .tt-day-body{gap:8px}

.tt-day.tt-count-4 .tt-event,
.tt-day.tt-count-5 .tt-event,
.tt-day.tt-count-6 .tt-event{
  padding:10px 10px 9px;
  border-radius:15px;
}
.tt-day.tt-count-4 .tt-event-main,
.tt-day.tt-count-5 .tt-event-main,
.tt-day.tt-count-6 .tt-event-main{gap:6px}

.tt-day.tt-count-4 .tt-event-name{font-size:12px}
.tt-day.tt-count-5 .tt-event-name,
.tt-day.tt-count-6 .tt-event-name{font-size:11px}

.tt-day.tt-count-4 .tt-event-category,
.tt-day.tt-count-5 .tt-event-category,
.tt-day.tt-count-6 .tt-event-category{
  min-height:23px;
  padding:0 7px;
  font-size:6.5px;
}
.tt-day.tt-count-4 .tt-event-menu,
.tt-day.tt-count-5 .tt-event-menu,
.tt-day.tt-count-6 .tt-event-menu{
  width:23px;height:23px;flex-basis:23px;
}

.tt-day.tt-count-4 .tt-time-row,
.tt-day.tt-count-5 .tt-time-row,
.tt-day.tt-count-6 .tt-time-row{
  padding:6px 7px;
  gap:5px;
}
.tt-day.tt-count-4 .tt-time-row time strong{font-size:11px}
.tt-day.tt-count-5 .tt-time-row time strong,
.tt-day.tt-count-6 .tt-time-row time strong{font-size:10px}
.tt-day.tt-count-4 .tt-time-row em,
.tt-day.tt-count-5 .tt-time-row em,
.tt-day.tt-count-6 .tt-time-row em{
  font-size:6px;
  padding:3px 4px;
}
.tt-day.tt-count-4 .tt-location-pill,
.tt-day.tt-count-5 .tt-location-pill,
.tt-day.tt-count-6 .tt-location-pill{
  min-height:21px;
  padding:0 6px;
  font-size:7.5px;
}
.tt-day.tt-count-5 .tt-event p,
.tt-day.tt-count-6 .tt-event p{
  font-size:7.5px;
  -webkit-line-clamp:1;
}

/* Keep complete time text visible in ordinary 5-day layout too. */
.tt-board.tt-days-5 .tt-time-row{
  grid-template-columns:minmax(0,1fr) auto;
}
.tt-board.tt-days-5 .tt-time-row time{
  min-width:0;
  overflow:visible;
}
.tt-board.tt-days-5 .tt-time-row time strong{
  font-size:12px;
  white-space:nowrap;
}
.tt-board.tt-days-5 .tt-time-row em{
  font-size:6.5px;
  padding:3px 5px;
}

@media(max-width:760px){
  .tt-day-body{min-height:0}
  .tt-mobile-list{min-height:360px}
  .tt-time-row{
    grid-template-columns:1fr;
  }
  .tt-time-row time{
    min-width:0;
    width:100%;
    overflow:visible;
  }
  .tt-time-row em{
    justify-self:start;
  }
}


/* v154 — keep mobile timetable cards at natural height */
@media(max-width:760px){
  .tt-mobile-list{
    display:grid;
    align-content:start;
    grid-auto-rows:max-content;
    min-height:360px;
  }
  .tt-mobile-list .tt-event{
    height:auto;
    min-height:0;
    align-self:start;
  }
}


/* v155 — refined timetable action sheet */
.tt-action-menu{
  display:grid;
  gap:10px;
  margin-top:18px;
}
.tt-action-row{
  width:100%;
  min-height:58px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  align-items:center;
  gap:14px;
  padding:0 16px 0 18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--soft);
  color:var(--ink);
  text-align:left;
}
.tt-action-copy{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
  white-space:nowrap;
  overflow:hidden;
}
.tt-action-copy b{
  flex:0 0 auto;
  font-size:14px;
  line-height:1;
}
.tt-action-copy small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
}
.tt-action-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  justify-self:end;
  border-radius:10px;
  background:var(--card);
  color:var(--ink);
  font-size:16px;
  line-height:1;
}
.tt-action-row:hover{
  background:color-mix(in srgb,var(--soft) 72%,var(--card));
}
.tt-action-row.danger{
  border-color:color-mix(in srgb,#d64545 28%,var(--line));
  background:color-mix(in srgb,#d64545 6%,var(--card));
  color:#b83a31;
}
.tt-action-row.danger .tt-action-copy small{color:color-mix(in srgb,#b83a31 72%,var(--muted))}
.tt-action-row.danger .tt-action-icon{
  background:color-mix(in srgb,#d64545 10%,var(--card));
  color:#b83a31;
}
@media(max-width:760px){
  .tt-action-menu{gap:9px;margin-top:16px}
  .tt-action-row{
    min-height:56px;
    padding:0 14px 0 16px;
    border-radius:15px;
    gap:12px;
  }
  .tt-action-copy{gap:8px}
  .tt-action-copy b{font-size:13px}
  .tt-action-copy small{font-size:10px}
  .tt-action-icon{width:28px;height:28px;font-size:15px}
}


/* v156 — dedicated tablet timetable layout (keeps desktop and phone layouts untouched) */
@media (min-width:521px) and (max-width:1100px){
  .tt-head{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    gap:16px;
    margin-bottom:16px;
  }
  .tt-head h1{font-size:34px}
  .tt-head>div>p:last-child{max-width:680px;font-size:12px}
  .tt-head-actions{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
  }
  .tt-head-actions button{
    width:100%;
    min-width:0;
    height:44px;
  }

  .tt-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-bottom:16px;
  }
  .tt-summary article{
    padding:15px 16px;
    border-radius:17px;
  }
  .tt-summary b{font-size:20px}
  .tt-summary .tt-next{grid-column:auto}

  .tt-desktop-only{display:none!important}
  .tt-mobile-only{display:block!important}

  .tt-mobile-days{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:2px 1px 11px;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
  }
  .tt-mobile-days::-webkit-scrollbar{display:none}
  .tt-mobile-days button{
    min-width:82px;
    height:50px;
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:7px;
    padding:0 11px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--card);
    color:var(--muted);
    scroll-snap-align:start;
  }
  .tt-mobile-days button.active{
    border-color:var(--accent);
    background:var(--accent2);
    color:var(--accent);
  }
  .tt-mobile-days b{font-size:10.5px}
  .tt-mobile-days span{
    min-width:19px;
    height:19px;
    display:grid;
    place-items:center;
    border-radius:99px;
    background:var(--soft);
    font-size:8px;
  }

  .tt-mobile-day{
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:22px;
    background:var(--card);
  }
  .tt-mobile-day>header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:15px 17px;
    border-bottom:1px solid var(--line);
  }
  .tt-mobile-day h2{margin:0;font-size:20px}
  .tt-mobile-day header p{margin:3px 0 0;color:var(--muted);font-size:10px}
  .tt-mobile-header-actions{display:flex;align-items:center;gap:8px}
  .tt-mobile-day header .primary{height:38px;font-size:10px}

  .tt-mobile-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start;
    grid-auto-rows:max-content;
    gap:11px;
    min-height:330px;
    padding:12px;
  }
  .tt-mobile-list .tt-event{
    height:auto;
    min-height:0;
    align-self:start;
    padding:14px;
    border-radius:18px;
  }
  .tt-mobile-list .tt-event-name{font-size:14px}
  .tt-mobile-list .tt-time-row{
    grid-template-columns:1fr;
    gap:6px;
    padding:9px 10px;
  }
  .tt-mobile-list .tt-time-row time{
    min-width:0;
    width:100%;
    overflow:visible;
  }
  .tt-mobile-list .tt-time-row time strong{font-size:14px}
  .tt-mobile-list .tt-time-row em{justify-self:start}
  .tt-mobile-list .tt-empty-day{
    min-height:180px;
    grid-column:1/-1;
  }
}
@media (min-width:521px) and (max-width:720px){
  .tt-mobile-list{grid-template-columns:1fr}
}
