:root {
  --bg: #f3efe4;
  --panel: #fffdf8;
  --ink: #1c1a17;
  --muted: #6d655d;
  --line: #d8cfc4;
  --accent: #1f6f78;
  --accent-soft: #d7ece8;
  --danger: #a63d40;
  --danger-soft: #f7e2e2;
  --shadow: 0 18px 40px rgba(28, 26, 23, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31,111,120,0.12), transparent 28%),
    radial-gradient(circle at right 10%, rgba(166,61,64,0.08), transparent 26%),
    linear-gradient(180deg, #f8f5ec 0%, #f2ede3 100%);
}
a { color: inherit; }
a[href] {
  text-underline-offset: 2px;
}
button, input, textarea {
  font: inherit;
}
button, .button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-decoration: none;
}
button.primary, .button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button.danger, .button.danger {
  background: var(--danger-soft);
  border-color: #e5bbbb;
  color: var(--danger);
}
button.ghost {
  background: transparent;
}
button:disabled { opacity: 0.5; cursor: default; }
.notification-button {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  border-color: rgba(31,111,120,0.26);
  background: rgba(31,111,120,0.08);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(28,26,23,0.14);
  backdrop-filter: blur(8px);
}
.notification-button:hover {
  background: rgba(31,111,120,0.12);
}
.notification-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 1.05rem;
  line-height: 1;
}
.notification-button__badge {
  position: absolute;
  top: -4px;
  right: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 700;
}
@media (max-width: 720px) {
  .notification-button {
    width: 46px;
    height: 46px;
  }
  .section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .section-nav::-webkit-scrollbar {
    display: none;
  }
  .section-nav__link {
    white-space: nowrap;
  }
  .topbar-utility {
    justify-content: flex-start;
  }
}
.auth-help {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}
input, textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
}
textarea { min-height: 96px; resize: vertical; }
iframe {
  width: 100%;
  min-height: 78vh;
  border: 0;
  border-radius: 24px;
  background: white;
}
.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 24px auto 36px;
}
.topbar {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(216, 207, 196, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-utility {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  border-bottom: 1px solid rgba(216, 207, 196, 0.95);
  padding-bottom: 6px;
}
.section-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.8rem 0.72rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.section-nav__link:hover {
  color: var(--ink);
}
.section-nav__link.active {
  color: var(--ink);
}
.section-nav__link.active::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}
.toolbar--context {
  justify-content: flex-start;
}
.brand h1, .landing-card h1, .published-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); }
.brand-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.brand p, .landing-card p, .published-hero p, .muted { margin: 0.35rem 0 0; color: var(--muted); }
.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
.sidebar, .main-panel, .landing-card, .published-hero, .published-frame, .published-meta, .meta-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(216, 207, 196, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.sidebar, .main-panel {
  padding: 18px;
}
.sidebar {
  display: grid;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 10px;
}
.section-header h2, .section-header h3, .main-panel h2 { margin: 0; font-size: 1.1rem; }
.sub-list, .meta-list, .public-list {
  display: grid;
  gap: 10px;
}
.sub-card, .trash-card, .public-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,0.72);
}
.sub-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sub-card header, .trash-card header, .public-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}
.sub-actions, .row, .hero-actions, .toolbar, .modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sub-url, .share-link {
  display: block;
  font-size: 0.82rem;
  margin-top: 8px;
  color: var(--muted);
  text-decoration: none;
  word-break: break-all;
}
.color-picker {
  width: 128px;
  min-width: 128px;
  height: 36px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  cursor: pointer;
}
.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}
.color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}
.main-panel {
  min-height: 82vh;
}
.calendar-stage {
  display: grid;
  gap: 14px;
}
.banner {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(31,111,120,0.08);
  border: 1px solid rgba(31,111,120,0.14);
}
.banner.error {
  background: var(--danger-soft);
  border-color: #e5bbbb;
  color: var(--danger);
}
.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255,255,255,0.56);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28,26,23,0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  overscroll-behavior: contain;
}
.modal {
  width: min(760px, 100%);
  max-height: min(88vh, 980px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 28px 60px rgba(28,26,23,0.22);
  padding: 20px;
  display: grid;
  gap: 14px;
  overscroll-behavior: contain;
}
.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.modal-header > div {
  min-width: 0;
}
.modal-close {
  position: static;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  background: rgba(255,255,255,0.96);
  z-index: 2;
}
.check-list {
  display: grid;
  gap: 10px;
  max-height: min(36vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.check-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.76);
}
.check-input {
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
}
.check-copy {
  min-width: 0;
}
.check-copy strong {
  display: block;
  margin-bottom: 6px;
}
.check-copy .muted {
  overflow-wrap: anywhere;
}
.notice-unread {
  border-color: rgba(31,111,120,0.35);
  background: rgba(31,111,120,0.08);
}
.landing-wrap, .published-wrap {
  width: min(1120px, calc(100vw - 32px));
  margin: 48px auto;
}
.landing-card {
  padding: 32px;
  display: grid;
  gap: 18px;
}
.auth-card {
  gap: 22px;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 64px 20px;
}
.auth-centered-card {
  width: min(420px, calc(100vw - 32px));
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(216, 207, 196, 0.9);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(28, 26, 23, 0.08);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.auth-centered-card h1 {
  margin: 0;
  text-align: center;
  font-size: 2rem;
}
.auth-mark {
  text-align: center;
  font: 700 0.8rem/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-subcopy {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
}
.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.auth-form-card {
  display: grid;
  gap: 12px;
}
.auth-label {
  margin-bottom: 6px;
  font: 600 0.92rem/1.2 system-ui, sans-serif;
  color: var(--ink);
}
.auth-submit {
  width: 100%;
  justify-content: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font: 500 0.92rem/1 system-ui, sans-serif;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.auth-secondary-list {
  display: grid;
  gap: 10px;
}
.auth-provider-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.auth-request-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.auth-request-panel summary {
  cursor: pointer;
  font-weight: 700;
}
.auth-request-panel[open] {
  display: grid;
  gap: 12px;
}
.auth-link-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font: 500 0.95rem/1.4 system-ui, sans-serif;
}
.auth-link-row a {
  color: var(--accent);
  text-decoration: none;
}
.landing-grid, .published-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 18px;
  margin-top: 18px;
}
.auth-grid,
.auth-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.auth-intake-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
  display: grid;
  gap: 14px;
}
.auth-provider {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
  display: grid;
  gap: 12px;
}
.auth-provider.disabled {
  background: rgba(255,255,255,0.52);
}
.auth-provider-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.auth-provider-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font: 700 11px/1.1 system-ui, sans-serif;
  border: 1px solid rgba(31,111,120,0.22);
  color: var(--accent);
  background: rgba(31,111,120,0.08);
}
.title-with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.official-badge {
  border-color: rgba(116,140,66,0.28);
  background: rgba(165,201,111,0.18);
  color: #5f6f2c;
}
.auth-provider button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}
.stat-block {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
}
.published-hero {
  width: min(1120px, calc(100vw - 32px));
  margin: 24px auto 18px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}
.published-layout {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto 28px;
}
.published-frame, .published-meta {
  padding: 18px;
}
.published-meta {
  display: grid;
  gap: 12px;
  align-self: start;
}
.meta-card {
  padding: 16px;
  border-radius: 20px;
}
.event-detail-grid {
  gap: 12px;
}
.event-detail-description {
  line-height: 1.5;
}
.meta-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}
.hidden { display: none !important; }
.toast { position: fixed; right: 20px; top: 20px; z-index: 90; padding: 12px 16px; border-radius: 14px; background: #1f6f78; color: #fff; box-shadow: 0 18px 36px rgba(18, 44, 48, 0.28); font: 600 14px/1.2 system-ui, sans-serif; }
@media (max-width: 980px) {
  .grid, .landing-grid, .published-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .published-hero, .topbar {
    flex-direction: column;
    align-items: start;
  }
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.editor-sidebar {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.editor-main {
  min-height: 84vh;
}
.readonly-calendar-shell {
  margin-top: 16px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  min-height: 78vh;
}

.published-frame .readonly-calendar-shell {
  min-height: 70vh;
}

#timeline-calendar {
  margin-top: 16px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
}
.fc {
  --fc-border-color: var(--line);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255,255,255,0.72);
  --fc-button-bg-color: var(--accent);
  --fc-button-border-color: var(--accent);
  --fc-button-hover-bg-color: #185b62;
  --fc-button-hover-border-color: #185b62;
  --fc-button-active-bg-color: #154d53;
  --fc-button-active-border-color: #154d53;
  --fc-event-bg-color: #1f6f78;
  --fc-event-border-color: #1f6f78;
}
.fc .fc-toolbar-title {
  font-size: 1.2rem;
}
.readonly-calendar-shell, #timeline-calendar {
  position: relative;
  z-index: 1;
}
.fc, .fc-view-harness, .fc-scrollgrid {
  position: relative;
  z-index: 1;
}
.fc-popover, .fc-more-popover {
  z-index: 5;
}
.fc .fc-scrollgrid-section-sticky > *,
.fc .fc-col-header-cell,
.fc .fc-daygrid-day-number,
.fc .fc-timegrid-axis,
.fc .fc-timegrid-slot-label,
.fc .fc-timegrid-divider {
  background: #fdfbf7;
}
.fc .fc-scrollgrid-section-sticky > * {
  position: relative;
  z-index: 3;
}
.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
  position: relative;
  z-index: 4;
}
.modal, .share-sheet .modal {
  position: relative;
  z-index: 2001;
}
@media (max-width: 980px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-sidebar {
    position: static;
    max-height: none;
  }
  .auth-grid,
  .auth-notes {
    grid-template-columns: 1fr;
  }
}

.readonly-calendar-shell.compact {
  min-height: 320px;
  margin-top: 0;
  padding: 8px;
}

.readonly-calendar-shell .sx-host,
.readonly-calendar-shell .sx__calendar-wrapper {
  width: 100%;
  min-height: calc(78vh - 24px);
}

.readonly-calendar-shell.compact .sx-host,
.readonly-calendar-shell.compact .sx__calendar-wrapper {
  min-height: 300px;
}

.tg-sx-calendar-root {
  min-height: inherit;
}

.timeline-page-shell {
  width: min(1280px, calc(100vw - 32px));
}

.sx-host,
.sx__calendar-wrapper {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sx__calendar-wrapper {
  border-radius: 18px;
}

.published-frame,
.readonly-calendar-shell,
.readonly-calendar-shell .sx-host,
.readonly-calendar-shell .sx__calendar-wrapper,
.readonly-calendar-shell .sx__view-container {
  overflow: visible !important;
}

.readonly-calendar-shell .sx__view-selection-items,
.readonly-calendar-shell .sx__date-picker-popup {
  z-index: 220 !important;
  box-shadow: 0 18px 36px rgba(28, 26, 23, 0.16);
}

.readonly-calendar-shell .sx__calendar-header,
.readonly-calendar-shell .sx__view-selection,
.readonly-calendar-shell .sx__date-picker-wrapper,
.readonly-calendar-shell .sx__date-input-wrapper {
  position: relative;
  z-index: 210;
}

.editor-layout {
  grid-template-columns: minmax(290px, 320px) minmax(0, 1fr);
  align-items: start;
}

.editor-sidebar {
  display: grid;
  gap: 14px;
}

.timeline-settings summary,
.timeline-series summary,
.event-advanced summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.timeline-settings[open] summary,
.timeline-series[open] summary,
.event-advanced[open] summary {
  margin-bottom: 12px;
}

.event-form-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.event-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.event-form-grid label,
.event-supporting label,
.meta-list label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.event-form-grid input,
.event-form-grid select,
.event-supporting input,
.event-supporting textarea,
.meta-list input,
.meta-list textarea {
  min-width: 0;
  max-width: 100%;
}

.event-composer-card .banner {
  display: grid;
  gap: 10px;
}

.event-composer-card .banner button {
  justify-self: start;
}

.event-composer-card,
.timeline-settings-card,
.timeline-series-card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(216, 207, 196, 0.95);
  border-radius: 24px;
  padding: 18px;
}

.event-supporting {
  display: grid;
  gap: 12px;
}

.event-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.event-actions > * {
  width: 100%;
  min-width: 0;
}

.conversion-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(31, 111, 120, 0.18);
  background: rgba(31, 111, 120, 0.06);
}

.conversion-mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.conversion-mode-row button.active,
.conversion-occurrence.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.conversion-occurrence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.conversion-occurrence {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
}

.conversion-occurrence small {
  color: inherit;
  opacity: 0.8;
}

.section-copy {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

.field-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .conversion-occurrence-grid {
    grid-template-columns: 1fr;
  }
}

.sx__calendar {
  color: #1c1b1f;
}

.sx__month-grid-wrapper {
  display: grid !important;
  grid-auto-rows: minmax(0, 1fr);
  height: clamp(640px, 74vh, 780px);
  min-height: clamp(640px, 74vh, 780px);
}

.sx__month-grid-week {
  min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.sx__month-grid-day {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 10px 0 8px;
}

.sx__month-grid-day__events {
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(28px, auto);
  align-content: start;
  padding: 0 6px 2px;
  overflow: hidden;
}

.sx__month-grid-cell {
  height: 28px;
}

.readonly-calendar-shell.compact .sx__month-grid-wrapper {
  height: 360px;
  min-height: 360px;
}

.sx__time-grid-event,
.sx__date-grid-event,
.sx__month-grid-event {
  background: transparent !important;
  box-shadow: none !important;
}

.tg-sx-event-shell {
  overflow: hidden !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.sx__time-grid-event.tg-sx-event-shell {
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  border-inline-start: 0 !important;
}

.sx__time-grid-event.tg-sx-event-shell .sx__time-grid-event-inner {
  display: flex;
  width: 100%;
  height: 100%;
}

.tg-sx-event {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tg-event-bg, rgba(31, 122, 140, 0.14));
  box-shadow: inset 4px 0 0 var(--tg-event-main, #1f7a8c);
  color: var(--tg-event-fg, #163239);
  padding: 4px 8px 4px 10px;
  font: 600 12px/1.25 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tg-sx-event--month {
  min-height: 24px;
  white-space: nowrap;
  overflow: hidden;
}

.tg-sx-event--detail {
  height: 100%;
  min-height: 100%;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.tg-sx-event__time {
  font-size: 11px;
  opacity: 0.82;
  white-space: nowrap;
}

.tg-sx-event__title {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-sx-event--detail .tg-sx-event__title {
  width: 100%;
  white-space: normal;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.2;
}

.tg-sx-event--detail .tg-sx-event__time {
  margin-top: auto;
}

.embed-shell-app {
  padding: 12px;
}

.embed-card-app {
  border: 1px solid #d2cbbe;
  border-radius: 18px;
  overflow: hidden;
  background: #f5f1e8;
  box-shadow: 0 18px 40px rgba(73, 62, 49, 0.14);
}

.embed-copy-app {
  padding: 14px 18px 10px;
  background: linear-gradient(135deg, rgba(244,247,240,0.98), rgba(248,238,228,0.96));
  border-bottom: 1px solid #d8d0c4;
}

.embed-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}

.embed-copy-app h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.embed-copy-app p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #544c46;
}

.embed-calendar-wrap {
  background: #fdfbf7;
  padding: 10px 10px 0;
}

.embed-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1f7a82;
  background: #1f7a82;
  color: #fff !important;
  text-decoration: none;
  font: 600 13px/1.2 system-ui, sans-serif;
  white-space: nowrap;
}

.embed-footer-app {
  padding: 12px 18px 16px;
  font: 600 13px/1.2 system-ui, sans-serif;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.embed-footer-app a {
  color: #1f7a82;
  text-decoration: none;
}

.embed-footer-app .embed-open {
  color: #1f7a82;
  font-weight: 700;
}

.calendar-tip {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31,111,120,0.18);
  background: rgba(31,111,120,0.08);
  color: var(--muted);
}
.unavailable-note {
  margin-top: 8px;
  color: var(--danger);
}
.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.published-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.published-toolbar-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.published-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.published-search-input, .published-sort-select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
  padding: 0 14px;
  color: var(--ink);
}
.published-search-input {
  flex: 1 1 320px;
}
.published-hashtags {
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
}
.category-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.published-list-swap {
  animation: publishedSlideIn 220ms ease;
}
.account-choice {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
}
.account-choice span {
  display: grid;
  gap: 4px;
  text-align: left;
}
@keyframes publishedSlideIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Live hotfix: all-day events in week/date grid should keep labels visible */
.sx__date-grid-event .tg-sx-event,
.sx__month-grid-event .tg-sx-event {
  min-height: 28px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.sx__date-grid-event .tg-sx-event__time {
  display: none;
}

.sx__date-grid-event .tg-sx-event__title,
.sx__month-grid-event .tg-sx-event__title {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sx__date-grid-event {
  min-height: 30px;
}

/* Live hotfix: week-view all-day titles must stay visible without bleeding into neighboring days */
.sx__date-grid-event {
  min-width: 0 !important;
  overflow: hidden !important;
}

.sx__date-grid-event-text {
  position: static !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: inherit !important;
}

.sx__date-grid-event-text .sx__date-grid-event-time {
  display: inline !important;
  opacity: 0.92 !important;
}

/* Live hotfix: keep custom Schedule-X all-day chips visible in week/month grids */
.sx__date-grid-event.tg-sx-event-shell,
.sx__month-grid-event.tg-sx-event-shell {
  padding: 0 !important;
  background: transparent !important;
  border-inline-start: 0 !important;
  overflow: hidden !important;
}

.sx__date-grid-event > [data-ccid],
.sx__month-grid-event > [data-ccid],
.sx__date-grid-event .tg-sx-event-shell,
.sx__month-grid-event .tg-sx-event-shell {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.sx__date-grid-event .tg-sx-event,
.sx__month-grid-event .tg-sx-event,
.sx__date-grid-event .tg-sx-event--month,
.sx__month-grid-event .tg-sx-event--month {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 24px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.sx__date-grid-event .tg-sx-event__time,
.sx__month-grid-event .tg-sx-event__time {
  display: none !important;
}

.sx__date-grid-event .tg-sx-event__title,
.sx__month-grid-event .tg-sx-event__title {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.official-registry-card {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
}
.official-registry-copy {
  margin: 0 0 14px;
}
.official-sheet-wrap {
  overflow: auto;
  border: 1px solid rgba(216,207,196,0.9);
  border-radius: 18px;
  background: #fffdf8;
}
.official-sheet {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
.official-sheet th,
.official-sheet td {
  border-bottom: 1px solid rgba(216,207,196,0.78);
  padding: 10px;
  vertical-align: top;
  text-align: left;
}
.official-sheet th {
  font: 700 12px/1.1 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(243,239,228,0.8);
  position: sticky;
  top: 0;
}
.official-sheet td textarea {
  min-height: 88px;
}
.official-sheet td input,
.official-sheet td select,
.official-sheet td textarea {
  width: 100%;
}
.official-sheet-actions {
  min-width: 132px;
}
.official-sheet-actions .button,
.official-sheet-actions button {
  width: 100%;
  margin-bottom: 8px;
}
.official-sheet-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}


.readonly-calendar-shell .sx__view-selection-items {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: auto !important;
  min-width: 96px !important;
  width: max-content !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 6px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: rgba(255, 253, 248, 0.98) !important;
  overflow: visible !important;
}

.readonly-calendar-shell .sx__view-selection-item,
.readonly-calendar-shell .sx__view-selection-selected-item {
  display: flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  white-space: nowrap !important;
}

.readonly-calendar-shell .sx__date-picker-wrapper {
  position: relative !important;
}

.readonly-calendar-shell .sx__date-picker-popup {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: auto !important;
  width: 320px !important;
  max-width: min(320px, calc(100vw - 64px)) !important;
  min-width: 320px !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  background: rgba(255, 253, 248, 0.99) !important;
  overflow: hidden !important;
}

.readonly-calendar-shell .sx__date-picker__month-view,
.readonly-calendar-shell .sx__date-picker__years-view {
  width: 100% !important;
}


.readonly-calendar-shell .sx__calendar {
  overflow: visible !important;
}

.readonly-calendar-shell .sx__date-picker-popup,
.readonly-calendar-shell .sx__date-picker-popup.bottom-end,
.readonly-calendar-shell .sx__date-picker-popup.bottom-start {
  left: auto !important;
  right: 0 !important;
}

.export-list {
  max-height: none;
  padding-right: 0;
}
.export-row {
  grid-template-columns: minmax(0, 1fr);
}
.export-copy {
  display: grid;
  gap: 10px;
}
.export-copy label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.export-copy input[type=number],
.export-copy select,
.export-copy input[data-export-link-value] {
  width: 100%;
}

.check-row > .check-copy:first-child {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}
.check-row > .check-copy:first-child label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.check-row > .check-copy:first-child input[type=number],
.check-row > .check-copy:first-child select,
.check-row > .check-copy:first-child input[data-export-link-value] {
  width: 100%;
}

.official-registry-layout {
  grid-template-columns: minmax(0, 1fr);
}
.official-registry-layout .main-panel {
  min-height: auto;
}
.official-registry-section {
  display: grid;
  gap: 12px;
}
.official-registry-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}
.official-registry-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}
.official-registry-table th,
.official-registry-table td {
  border-bottom: 1px solid rgba(216, 207, 196, 0.8);
  padding: 10px;
  vertical-align: top;
  text-align: left;
}
.official-registry-table th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(31,111,120,0.06);
}
.official-registry-table input,
.official-registry-table select,
.official-registry-table textarea {
  width: 100%;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.92rem;
}
.official-registry-table textarea {
  min-height: 64px;
}
.row-actions {
  min-width: 146px;
}
.row-actions button {
  margin-right: 6px;
  margin-bottom: 6px;
}
