/* =========================================================
   0) TABLE OF CONTENTS
   1) Design tokens & base
   2) Layout wrappers
   3) Grid primitives
   4) Timeline components (thead, cell, event)
   5) Seasonal components
   6) Editor (overlay) UI
   7) Sidebar, tables, forms & buttons
========================================================= */


/* =========================================================
   1) DESIGN TOKENS & BASE
========================================================= */

:root {
  --thw: 100px; /* Timeline Header Width */
}
html,
body {
  height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
  display: grid;
  grid-template-rows: auto 1fr;
}
body.theme-dark {
  --background: #2a2d30;
  --ink: white;
  --muted: #e1e1e1;

  --g-outline: #222427;
  --g-panel: #313538;
  --g-bar: #3d4145;

  --seasonal-line: #574f45;
  --seasonal-bg: #a4967c;
  
  background: var(--background);
}
body.theme-light {
  --background: white;
  --ink: #2a2d30;
  --muted: #9aa3ad;

  --g-outline: #f7f7f7;
  --g-panel: #fdfdfd;
  --g-bar: #e1e1e1;

  --seasonal-line: #fff3e3;
  --seasonal-bg: #fffcf7;
  
  background: var(--background);
}





/* =========================================================
   2) LAYOUT WRAPPERS
========================================================= */

header {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--g-bar);
}
header h1 {
  font-size: 18px;
  margin: 0;
}
header .meta {
  display:none;
  font-size: 12px;
  color: var(--muted);
}
header .err {
  display:none;
  color: #ffb4b4;
  font-size: 12px;
}

.actions {
  display:flex;
  gap: 2em;
}

/* Buttons */
button {
  background: var(--g-bar);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  text-align: center;
}
button:hover {
  filter: brightness(1.1);
  background-color: var(--ink);
  color:var(--background);
}
button.danger {
  display:inline-block;
  border-color: #9c5454;
  background: #ffeaea;
  color:#9c5454;
  font-weight:bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size:0.5em;
}
button.ghost {
  background: transparent;
  border-color: var(--muted);
}
button.ghost:hover {
  background-color: var(--muted);
  color:var(--background);
}

/* Selects */
.ed-table select {
  width: 100%;
  background: var(--background);
  color: var(--ink);
  border: 1px solid var(--g-bar);
  border-left:7px solid var(--jcolor);
  border-radius: 6px;
  padding: 6px;
}
.ed-table select option {
  background: var(--g-panel);
  color: var(--ink);
}

.seg {
  position: relative;
  background:var(--g-outline);
  border-radius: 10px;
  padding:3px;
  outline:1px solid var(--g-bar);
  margin-top:10px;
}
.seg:before {
  content:attr(data-label);
  display:block;
  position:absolute;
  bottom:100%;
  margin-bottom:2px;
  left:0;
  font-size:8px;
  text-transform: uppercase;
  color:var(--muted);
  white-space: nowrap;
}
.seg button {
  background:transparent;
  border:none;
}
.seg button:hover,
.seg button[aria-pressed=true] {
  background:var(--background);
  outline:1px solid var(--muted);
  color:var(--ink);
  border:none;
}


.viewport {
  display: flex;
  position: relative;
  overflow: auto;
  justify-content: start;
  align-items: start;
  --col-min: var(--week-col-min);
  --row-min: var(--timeline-row-min);
  min-height: calc(100vh - 58px);
}
.grid {
  display: grid;
  gap: 6px;
  padding: 12px;
  grid-template-columns: var(--col-min);
  min-width: max-content;
}


/* =========================================================
   3) GRID PRIMITIVES
   (corner/year label, week labels)
========================================================= */

.corner {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  z-index: 5;
  background: var(--g-panel);
  border: 1px solid var(--g-panel);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  border-radius:5px;
}
.wlabel {
  position: relative;
  left: 0;
  z-index: 3;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  white-space: nowrap;
}
.wlabel__inner {
  display: block;
  position: relative;
  text-align: center;
  font-size:8px;
}
/* Week row has at least one active event */
.wlabel .wlabel__inner.has-events {
  font-weight: 600;
  color: var(--ink);
  padding: 5px 7px 6px 7px;
  border-radius: 10px;
  background: var(--g-outline);
}
.wlabel--weekband {
  justify-content: left;
}
.wlabel--weekband:after {
  display:block;
  content:" ";
  position:absolute;
  top:100%;
  left:10px;
  width:calc(100% - 20px);
  height:5px;
  border:1px solid var(--g-bar);
  border-bottom:none;
}


/* =========================================================
   4) TIMELINE COMPONENTS
   - Column header (.thead)
   - Timeline cells (.cell)
   - Event cards (.event)
   (Horizontal overrides colocated)
========================================================= */

/* ---- Column header (timeline name) ---- */
.thead {
  display:flex;
  flex-direction:column;
  position: sticky;
  top: 0;
  left:0;
  z-index: 4;
  background: var(--background);
  outline: 1px solid var(--g-bar);
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: wrap;
  overflow: hidden;
  border-radius:5px;
}
.thead-thumb {
  display:block;
  position:relative;
  width:100%;
  height:100%;
  max-height:65px;
  object-fit: cover;
  object-position: center;
  z-index:1;
  flex-grow:1;
}
.thead:before {
  display:block;
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  content:" ";
  background: #485459;
  background: linear-gradient(180deg,rgba(72, 84, 89, 0) 33%, rgba(72, 84, 89, 1) 100%);
  z-index: 2;
  mix-blend-mode: multiply;
}
.thead-title {
  --sidepad: 5px;
  --sidespace: 0.5px;
  display:flex;
  justify-content: center;
  align-items: center;
  position:relative;
  font-size:6px;
  text-transform: uppercase;
  z-index:5 !important;
  background:var(--background);
  padding:3px var(--sidepad) 3px var(--sidepad);
  letter-spacing: 0.5px;
  flex-grow:1;
}

/* ---- Timeline cells ---- */
.cell {
  position: relative;
  background: var(--g-panel);
  border: 1px solid var(--g-outline);
  border-radius: 6px;
  overflow: visible;
  min-width:100px;
}
.cell:before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: calc(100% + 15px);
  height: 1px;
  margin-top: 0px;
  background-color: var(--g-bar);
  border-radius: 0;
  pointer-events: none;
}

/* ---- Event cards ---- */
.event {
  border-radius: 10px;
  position: relative;
  padding: 0;
  font-size: 12px;
  line-height: 1.25;
  border: 1px solid var(--jcolor);
  /* box-shadow: 0 2px 10px rgba(0,0,0,.5); */
  background: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width:250px;
  gap: 0px;
  height:fit-content;
  margin:auto 10px;
  flex-grow: 1;
}
.event .topline {
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0px;
  flex-wrap: wrap;
  padding: 0.75em 0.5em 0.5em 1em;
  flex-grow: 0;
  text-align: left;;
}
.event .thumb {
  display: block;
  position:relative;
  width: 10px;
  height: auto;
  object-fit: cover;
  border-radius:5px 0 0 5px;
  outline:1px solid var(--jcolor);
  background-color: var(--jcolor);
  flex-grow: 1;
}
.event img.thumb {
  display:block;
  position:relative;
  width:50px;
  height:auto;
  object-fit: cover;
  border-radius:5px 0 0 5px;
  flex-grow: 1;
  padding-left: 3px;
}
.event .cat {
  display: inline-flex;
  position: absolute;
  top:-3.5px;
  align-items: center;
  gap: 0px;
  padding: 0px 3px 0px 3px;
  border-radius: 10px;
  text-decoration: none;
  text-transform:uppercase;
  background: var(--jcolor);
  outline: 1.5px solid var(--jcolor);
  font-size: 6px;
  letter-spacing: 0.5px;
  color: var(--jtext);
  white-space: nowrap;
  width:fit-content;
}
.event .desc {
  width: 100%;
  font-weight: 600;
}
.event .meta {
  font-size: 8px;
  color: var(--muted);
}
.event .chips {
  display: flex;
  flex-wrap: wrap;
  flex-grow:0;
  justify-content: start;
  width: fit-content;
  padding:0;
  margin:3px 0 0 0;
  font-size:0.8em;
}
.event .chip:not(.location) + .chip:before {
  content:", ";
}
.event .chip .icon {
  position: absolute;
  left: 0%;
  top: 0%;
  margin: 0;
  height:100%;
  width:auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  outline: 1px solid var(--jcolor);
}
.event .chip .icon + span {
  padding-left: 22px;
}
.event .chips .chip.location {
  background: var(--background);
  color: var(--muted);
  font-style:italic;
  outline:none;
  padding: 0 10px 1px 0;
}
.event .chips .chip.location:before {
  content:"@";
}

.event .event-sticky {
  display:flex;
  align-items: stretch;
  padding-right:1em;
}
.event .event-sticky {
  position: sticky;
  width:fit-content;
  top: 0px;
  left:var(--thw);
}




/* Bundle host owns the day cell when present */
.bundle-host {
  display:flex;
  align-items: stretch;
  gap:0px;
  position: relative;
  margin: auto 15px;
  width: max-content;
}
.bundle-host .event {
  margin-left:0;
  margin-right:0;
  border-radius:0px;
}
.bundle-host .event:nth-child(n+2) .thumb {
  border-radius: 0px;
}
.bundle-host .event:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.bundle-host .event:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}



/* Host for week/year bin fragments */
.bin-host { 
  display:flex;
  position: relative;
  align-items: center;
  gap:8px;
}

/* Constrain ALL frags (bars + chips) to their slot slice */
.granularity--day .bin-host > .event.granularity-pref-year.bar-frag,
.granularity--day .bin-host > .event.granularity-pref-year.chip-frag,
.granularity--day .bin-host > .event.granularity-pref-week.bar-frag,
.granularity--day .bin-host > .event.granularity-pref-week.chip-frag,
.granularity--week .bin-host > .event.granularity-pref-year.bar-frag,
.granularity--week .bin-host > .event.granularity-pref-year.chip-frag,
.granularity--week .bin-host > .event.granularity-pref-day.bar-frag,
.granularity--week .bin-host > .event.granularity-pref-day.chip-frag,
.granularity--year .bin-host > .event.granularity-pref-week.bar-frag,
.granularity--year .bin-host > .event.granularity-pref-week.chip-frag,
.granularity--year .bin-host > .event.granularity-pref-day.bar-frag,
.granularity--year .bin-host > .event.granularity-pref-day.chip-frag {
  display:block;
  min-width:initial;
  position: relative;
  box-sizing: border-box;            /* include padding/borders in width */
  margin: 0;                         /* avoid margin expanding past slice */
  width: calc(100% / var(--slots));
  max-width: calc(100% / var(--slots)); /* belt & suspenders */
}


/* =========================================================
   Granularity DAY
========================================================= */
.granularity--day .event.granularity-pref-year .thumb,
.granularity--day .event.granularity-pref-year .meta,
.granularity--day .event.granularity-pref-year .cat,
.granularity--day .event.granularity-pref-week .thumb,
.granularity--day .event.granularity-pref-week .meta {
  display:none;
}
.granularity--day .event.granularity-pref-year {
  background:var(--jcolor);
  padding:0;
  line-height:initial;
}
.granularity--day .event.granularity-pref-week .topline {
  background-color:var(--g-panel);
  padding:2px 7px;
  margin-left:14px;
  outline:1px solid var(--g-panel);
}
.granularity--day .event.granularity-pref-week .topline {
  outline:none;
}
.granularity--day .event.granularity-pref-week .cat {
  top:-10px;
  border-radius: 3px 3px 0 0;
  padding-bottom:0px;
}
.granularity--day .thead.granularity-pref-year:before,
.granularity--day .thead.granularity-pref-year .thead-thumb,
.granularity--day .thead.granularity-pref-week:before,
.granularity--day .thead.granularity-pref-week .thead-thumb {
  display:none;
}
.granularity--day .event.granularity-pref-year {
  background-color:var(--jcolor);
  position:initial;
  outline:none;
  padding:0px;
  z-index: 1;
}
.granularity--day .event.granularity-pref-year .event-sticky {
  content:" ";
  height:5px;
  border-radius: 3px;
}
.granularity--day .event.granularity-pref-year .event-sticky .topline {
  display:block;
  width:100%;
  padding-left:17px;
}
.granularity--day .event.granularity-pref-year .event-sticky .desc {
  font-size:0.7em;
  font-weight:normal;
  color:var(--muted);
  letter-spacing: 0.5px;
  margin-top:-2.5em;
}

/* =========================================================
   Granularity WEEK
========================================================= */
.granularity--week .event.granularity-pref-year .thumb,
.granularity--week .event.granularity-pref-year .meta,
.granularity--week .event.granularity-pref-year .cat,
.granularity--week .event.granularity-pref-day .thumb,
.granularity--week .event.granularity-pref-day .meta {
  display:none;
}
.granularity--week .event.granularity-pref-year {
  background:var(--jcolor);
  padding:0;
  line-height:initial;
}
.granularity--week .event.granularity-pref-day .topline {
  outline:none;
}
.granularity--week .event.granularity-pref-day .cat {
  top:-10px;
  border-radius: 3px 3px 0 0;
  padding-bottom:0px;
}
.granularity--week .event.granularity-pref-week.bar-frag:not(.frag--start) {
  width:109%;
  margin-left:-9%;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left:none;
}
.granularity--week .event.granularity-pref-week.bar-frag:not(.frag--start) .event-sticky {
  opacity:0;
}
.granularity--week .thead.granularity-pref-year:before,
.granularity--week .thead.granularity-pref-year .thead-thumb,
.granularity--week .thead.granularity-pref-day:before,
.granularity--week .thead.granularity-pref-day .thead-thumb,
.granularity--week .event.granularity-pref-day .event-sticky .cat,
.granularity--week .event.granularity-pref-day .event-sticky .meta,
.granularity--week .event.granularity-pref-day .event-sticky .thumb,
.granularity--week .event.granularity-pref-day .event-sticky .chips {
  display:none;
}
.granularity--week .event.granularity-pref-day {
  position:initial;
  outline:none;
  padding:0px;
}
.granularity--week .event.granularity-pref-day .event-sticky {
  position:relative;
  left:0;
  background-color:var(--jcolor);
  content:" ";
  width:auto;
  height:5px;
  border-radius: 3px;
}
.granularity--week .event.granularity-pref-day .event-sticky .topline {
  display:block;
  width:100%;
  padding:7px 0 0 0;
}
.granularity--week .event.granularity-pref-day .event-sticky .desc {
  font-size:0.7em;
  font-weight:normal;
  color:var(--muted);
  letter-spacing: 0.5px;
}
.granularity--week .event.granularity-pref-day.bar-frag:not(.frag--start) .event-sticky {
  width:100%;
  margin-left:-12px;
}
.granularity--week .event.granularity-pref-day.bar-frag:not(.frag--start) .event-sticky .desc {
  display:none;
}
.granularity--week .event.granularity-pref-year {
  background-color:var(--jcolor);
  position:initial;
  outline:none;
  padding:0px;
  z-index: 1;
}
.granularity--week .event.granularity-pref-year .event-sticky {
  content:" ";
  height:5px;
  border-radius: 3px;
}
.granularity--week .event.granularity-pref-year .event-sticky .topline {
  display:block;
  width:100%;
  padding-left:17px;
}
.granularity--week .event.granularity-pref-year .event-sticky .desc {
  font-size:0.7em;
  font-weight:normal;
  color:var(--muted);
  letter-spacing: 0.5px;
  margin-top:-2.5em;
}

/* =========================================================
   Granularity YEAR
========================================================= */
.granularity--year .event.granularity-pref-week .thumb,
.granularity--year .event.granularity-pref-week .meta {
  display:none;
}
.granularity--year .event.granularity-pref-week .topline {
  background-color:var(--g-panel);
  display:flex;
  flex-direction: column;
  align-items: stretch;
  margin:0;
  outline:none;
  background:transparent;
  padding:7px 15px 7px 7px;
}
.granularity--year .event.granularity-pref-week .cat {
  display:block;
  position:relative;
  top:0;
  left:0;
  margin:0 0 5px 0;
  box-sizing: border-box;
}
.granularity--year .event.granularity-pref-week .desc {
  width:100%;
  padding: 0;
  box-sizing: border-box;
  font-size:0.9em;
}
.granularity--year .thead.granularity-pref-week:before,
.granularity--year .thead.granularity-pref-week .thead-thumb,
.granularity--year .thead.granularity-pref-day:before,
.granularity--year .thead.granularity-pref-day .thead-thumb,
.granularity--year .event.granularity-pref-day .event-sticky .cat,
.granularity--year .event.granularity-pref-day .event-sticky .meta,
.granularity--year .event.granularity-pref-day .event-sticky .thumb,
.granularity--year .event.granularity-pref-day .event-sticky .chips {
  display:none;
}
.granularity--year .event.granularity-pref-day {
  position:initial;
  outline:none;
  padding:0px;
}
.granularity--year .event.granularity-pref-week .event-sticky {
  padding-right:0;
}
.granularity--year .event.granularity-pref-day .event-sticky {
  position:relative;
  left:0;
  background-color:var(--jcolor);
  content:" ";
  width:auto;
  height:5px;
  border-radius: 3px;
}
.granularity--year .event.granularity-pref-day .event-sticky .topline {
  display:block;
  width:100%;
  padding:7px 0 0 0;
}
.granularity--year .event.granularity-pref-day .event-sticky .desc {
  font-size:0.7em;
  font-weight:normal;
  color:var(--muted);
  letter-spacing: 0.5px;
}

/* =========================================================
   5) SEASONAL COMPONENTS
   (labels + background lanes)
   (Horizontal overrides colocated)
========================================================= */

.wlabel--seasonal {
  /* different base if you want */
  position: relative;
  padding-left: 0;
  padding-right: 0;
  min-width:100px;
}

/* Seasonal background cells across timelines */
.cell--seasonal {
  position: relative;
  background-color: transparent;
  border-style: none;
}
.cell--seasonal:after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 2px;
  height: calc(100% + 15px);
  margin-left: -1px;
  border-left: 2px dashed var(--seasonal-line);
  border-radius: 0;
  pointer-events: none;
  opacity: 1;
}
.cell--seasonal::before {
  content: " ";
  position: absolute;
  left: -1px;
  top: 50%;
  width: calc(100% + 15px);
  height: 1px;
  margin-top: 0px;
  background-color: var(--seasonal-line);
  border-radius: 0;
  pointer-events: none;
}
.wlabel--seasonal::before {
  content: " ";
  position: absolute;
  top: -1px;
  left: 50%;
  height: calc(100%);
  width: 2px;
  margin-left: -1px;
  background-color: var(--seasonal-line);
  border-radius: 0;
  pointer-events: none;
}
.cell.outside:before,
.cell--seasonal.outside:before {
  display:none;
}

.wlabel__inner--seasonal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0px;
  position: relative;
  border: 1.5px solid var(--seasonal-line);
  background-color: var(--seasonal-bg);
  border-radius:10px;
  padding:15px 5px 5px 5px;
  text-align: left;
  flex-grow: 1;
}
.wlabel__inner--seasonal > * {
  text-align: center !important;
}
.seasonal-thumb {
  display: block;
  position: absolute;
  left: 50%;
  top: 0%;
  margin:-11px 0 0 -11px;
  text-transform: uppercase;
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}
.seasonal-name {
  font-weight: 600;
  font-size: 8px;
  color: var(--ink);
  text-transform: uppercase;
}
.seasonal-desc {
  font-size: 7px;
  text-transform: uppercase;
}


/* =========================================================
   6) EDITOR (OVERLAY) UI
========================================================= */

body.editing {
  overflow: hidden;
}
#editor {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
}
#editor .editor__backdrop {
  position: absolute;
  inset: 0;
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
#editor .editor__panel {
  position: relative;
  margin: 0;
  width:min(1400px, 96vw);
  height:92vh;
  display: flex;
  flex-direction: column;
  margin:4vh auto; 
  background: var(--background);
  border: 1px solid var(--g-outline);
  border-radius:12px;
  color: var(--ink);
  overflow: hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--g-outline);
  background: var(--g-bar);
}
.editor__title {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.editor__actions button {
  margin-left: 8px;
}
.editor__body {
  flex: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 0;
}

.editor__sidebar,
.editor__main,
.editor__seasonal {
  overflow: auto;
}
.editor__sidebar {
  border-right: 1px solid var(--g-bar);
  background-color: var(--g-panel);
  padding: 10px;
}
.editor__main {
  padding: 10px;
}
.editor__seasonal {
  border-left: 1px solid var(--g-bar);
  background-color: var(--g-outline);
  padding: 10px;
}


/* =========================================================
   7) SIDEBAR, TABLES, FORMS & BUTTONS
========================================================= */

/* Sidebar list */
.ed-tl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ed-tl-list + .ed-main-head {
  margin-top:2em;
}
.ed-main-titlebar {
  width:100%;
}
.ed-tl {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 0px;
  outline: 1px solid var(--g-bar);
  border-radius: 8px;
  background: var(--background);
}
.ed-tl.is-active {
  outline: 2px solid var(--muted);
  background: var(--g-outline);
}
.ed-tl:hover {
  background: var(--g-outline);
  border-color: var(--muted);
}
.ed-tl .ed-tl__meta {
  font-size: 11px;
  color: #9aa3ad;
  margin:2px 5px;
}
.ed-tl .ed-tl__btns button {
  margin-left: 6px;
  padding:2px 7px;
  min-width:20px
}

.ed-tl > .ghost {
  display:block;
  color:transparent;
  background: var(--g-outline);
  border-color: var(--g-outline);
  border-radius:8px 0px 0px 8px;
}
.ed-tl.is-active > .ghost {
  display:block;
  color:var(--background);
  background: var(--muted);
  border-color: var(--muted);
}
.ed-tl:hover > .ghost {
  display:block;
  color:transparent;
  background: var(--g-bar);
  border-color: var(--g-bar);
}
.ed-tl > .ghost:hover {
  display:block;
  color:var(--background);
  background: var(--muted);
  border-color: var(--muted);
}

.ed-timelines {
  display:flex;
  flex-direction: column;
  justify-content: flex-start;
  padding:8px 8px 8px 0;
  flex-grow: 1;
}

/* Event table */
.ed-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ed-table th,
.ed-table td {
  border-bottom: 1px solid var(--g-bar);
  padding: 0;
  vertical-align: top;
}
.ed-table th {
  position: sticky;
  top: 0;
  background: var(--g-bar);
  z-index: 1;
}
.ed-table tr {
  --jcolor: attr[data-cat-id];
}
.ed-table td {
  gap: 20px;
  padding: 20px;
  text-align: center;
}
input[type="text"] {
  --pad:6px;
  background: var(--background);
  color: var(--ink);
  border: 1px solid var(--g-bar);
  border-radius: var(--pad);
  padding: var(--pad);
  flex-grow:1;
  width:calc(100% - var(--pad) - var(--pad));
}

.ed-row-btns {
  display:flex;
  justify-content: space-between;
}
.ed-row-data {
  display:flex;
  flex-direction: column;
  gap:8px;
  margin-bottom:8px;
}
.ed-row-data-top,
.ed-row-data-bottom {
  display: flex;
  width:100%;
  gap:10px;
}
.ed-desc {
  width:300px;
  flex-grow: 1;
}
.ed-date,
.ed-duration,
.ed-sea-date {
  max-width:50px !important;
  flex-shrink: 0;
  flex-grow:0;
}
.ed-image {
  display:flex;
  align-items: center;
  gap:6px;
}
.ed-btn-box {
  display:flex;
  align-items: stretch;
  gap:7px;
  background-color:var(--g-outline);
  padding:7px 5px 7px 7px;
  border-radius:5px;
  margin-left:auto;
}
.ed-btn-box button {
  padding:3px 5px;
}
.ed-btn-box.small button {
  font-size:0.5rem !important;
}
.ed-thumb {
  display: inline-block;
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  background-color: var(--g-bar);
}

/* Seasonal panel */
.ed-sect {
  margin-bottom: 16px;
}
.ed-sect h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
}
.ed-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.ed-sea {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--g-bar);
  background-color: var(--background);
  border-radius: 8px;
  padding: 8px;
}
.ed-sea input[type="text"] {
  width: 100%;
  background: var(--background);
  color: var(--ink);
  border: 1px solid var(--g-bar);
  border-radius: 6px;
  padding: 6px;
}
.ed-sea-image {
  display:flex;
  width:100%;
  gap:10px;
}
.ed-sea .ed-thumb {
  padding:3px
}


