:root {
  --bg-top: #f7efe1;
  --bg-bottom: #e4edf8;
  --surface: rgba(9, 19, 38, 0.76);
  --surface-strong: rgba(10, 20, 41, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #5ea0ff;
  --accent-strong: #2f7dff;
  --danger: #e24848;
  --shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(94, 160, 255, 0.26), transparent 32%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

h1,
h2,
h3,
h4,
strong,
blockquote p {
  font-family: Georgia, "Times New Roman", serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.tab,
.folderBtn,
.miniEventCard,
.folderPulse {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.tab:hover,
.folderBtn:hover,
.miniEventCard:hover,
.folderPulse:hover {
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: #93c5fd;
}

#loginContainer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.loginCard {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(9, 19, 38, 0.92), rgba(31, 65, 119, 0.78));
  box-shadow: var(--shadow);
}

.loginCard h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.authModeToggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.authModeBtn {
  width: 100%;
}

.authModeBtn.active {
  background: linear-gradient(135deg, var(--accent), #76b8ff);
  color: #061528;
  box-shadow: 0 12px 24px rgba(94, 160, 255, 0.25);
}

.authModeCopy {
  margin: -2px 0 2px;
  color: var(--muted);
  line-height: 1.5;
}

.authSupportLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.92rem;
}

.authSupportLinks a,
.publicNav a,
.publicFaq a,
.publicActions a {
  color: #bfdbfe;
  text-decoration: none;
}

.authSupportLinks a:hover,
.publicNav a:hover,
.publicFaq a:hover,
.publicActions a:hover {
  text-decoration: underline;
}

#app {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

#sidebar {
  width: 290px;
  padding: 28px 18px 24px;
  background: linear-gradient(180deg, rgba(9, 19, 38, 0.95), rgba(20, 41, 78, 0.92));
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brandBlock h2 {
  margin: 8px 0 8px;
  font-size: 1.8rem;
}

.brandCopy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tabStack,
.sidebarSection,
#folderButtonList,
.sidebarPrompts,
.metricsGrid,
.insightCards,
.promptStack,
.eventList,
.folderOverview,
.timelineStack,
.storyHighlights,
.storyQuotes {
  display: grid;
  gap: 12px;
}

.sidebarSection {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.planStatus {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.planStatus h3 {
  margin: 0;
}

.usageLine {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.usageLine strong {
  color: var(--text);
  text-align: right;
}

.planHint {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.sectionTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.authActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.authActions button {
  flex: 1 1 160px;
}

.sidebarLabel {
  margin: 0;
  color: var(--muted);
}

.miniPill,
.eventFolderPill,
.statusBadge,
.chip,
.attachmentItem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
}

.miniPill {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.tab,
.folderBtn,
button,
select,
input,
textarea,
.miniEventCard,
.folderPulse {
  border: 1px solid transparent;
  border-radius: 16px;
}

.tab,
.folderBtn,
button,
.miniEventCard,
.folderPulse {
  cursor: pointer;
}

.tab,
.folderBtn,
.secondaryBtn,
.viewBtn,
.folderPulse,
.miniEventCard {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.tab.active,
.folderBtn.active,
.viewBtn.active,
button:not(.secondaryBtn):not(.deleteBtn),
.folderPulse:hover,
.miniEventCard:hover {
  background: linear-gradient(135deg, var(--accent), #76b8ff);
  color: #061528;
  box-shadow: 0 12px 24px rgba(94, 160, 255, 0.25);
}

button,
.tab,
.folderBtn,
.viewBtn,
.folderPulse,
.miniEventCard {
  padding: 12px 14px;
}

.secondaryBtn {
  background: rgba(255, 255, 255, 0.08);
}

.ghostBtn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}

.logoutBtn {
  width: 100%;
}

.legalLinks {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legalLinks a {
  color: #bfdbfe;
  text-decoration: none;
}

.legalLinks a:hover {
  text-decoration: underline;
}

.publicPage {
  min-height: 100vh;
}

.publicShell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 24px;
}

.publicNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 24px;
  background: rgba(9, 19, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.publicBrand {
  font-size: 1.1rem;
  font-weight: 700;
}

.publicNavLinks,
.publicActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.publicTrustRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.publicTrustRow span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbeafe;
  font-size: 0.92rem;
}

.publicHero,
.publicBand {
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(9, 19, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.publicHero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
}

.publicHeroCopy h1,
.publicSectionIntro h2 {
  margin: 8px 0 10px;
}

.publicHeroCopy p,
.publicSectionIntro p,
.publicStep p,
.publicUseGrid p,
.publicPriceCard li,
.publicFaq p,
.previewCard p {
  color: var(--muted);
  line-height: 1.6;
}

.publicPrimary,
.publicSecondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.publicPrimary {
  background: linear-gradient(135deg, var(--accent), #76b8ff);
  color: #061528 !important;
  font-weight: 700;
}

.publicSecondary {
  background: rgba(255, 255, 255, 0.06);
}

.publicPreview {
  min-width: 0;
}

.previewWindow {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(9, 19, 38, 0.98), rgba(24, 49, 89, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.previewTop {
  display: flex;
  gap: 8px;
}

.previewDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.previewHeroCard,
.previewCard,
.publicStep,
.publicPriceCard,
.publicFaq article,
.publicUseGrid article {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.previewHeroCard h3,
.publicStep h3,
.publicPriceCard h3,
.publicFaq h3,
.publicUseGrid h3 {
  margin: 8px 0;
}

.previewGrid,
.publicSteps,
.publicUseGrid,
.publicPricing,
.publicFaq {
  display: grid;
  gap: 14px;
}

.previewGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.publicSteps,
.publicUseGrid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.publicPricing {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.publicPricing .publicPriceCard {
  height: 100%;
}

.publicPriceCard ul {
  margin: 0;
  padding-left: 18px;
}

.publicPriceCard.featured {
  border-color: rgba(118, 184, 255, 0.45);
  background: rgba(66, 120, 204, 0.16);
}

.publicPriceCard.comingSoon,
.planCard.comingSoon {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.publicCtaBand {
  align-items: center;
}

.deleteBtn {
  background: linear-gradient(135deg, #d23f3f, #f87171);
  color: white;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(226, 232, 240, 0.72);
}

#main {
  flex: 1;
  padding: 26px;
}

.statusBanner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.statusBanner.success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.statusBanner.error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.34);
}

.controlDock,
.formActions,
.viewSwitches,
.heroActions,
.storyMetaRow,
.eventMetaRow,
.panelHeader,
.peopleRow,
.trashActions,
.trashTop,
.eventTopline,
.folderCreator {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.controlDock,
.heroPanel,
.panel,
.eventCard,
.trashCard,
.metricCard,
.insightCard,
.promptCard,
.miniEventCard,
.folderPulse,
.storyBadge,
.storyLead,
.storyColumn,
.verticalCard,
.spotlightCard,
.emptyState {
  background: var(--surface);
  backdrop-filter: blur(22px);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.controlDock,
.heroPanel,
.panel,
.eventCard,
.trashCard,
.storyLead,
.storyColumn,
.verticalCard,
.spotlightCard,
.emptyState {
  border-radius: 28px;
}

.controlDock,
.heroPanel,
.panel,
.storyLead,
.storyColumn,
.emptyState {
  padding: 20px;
}

.heroPanel {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(9, 19, 38, 0.92), rgba(33, 74, 135, 0.72));
}

.heroPanel h1,
.storyHero h1 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 3.2vw, 3.6rem);
  line-height: 1;
}

.heroCopy {
  margin: 0;
  max-width: 760px;
  line-height: 1.55;
  color: #dbeafe;
}

.heroActions {
  align-items: center;
  justify-content: flex-end;
}

.metricsGrid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.upgradePanel {
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(22px);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.pricingGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.planCard {
  display: grid;
  gap: 14px;
  align-content: space-between;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.planCard.current {
  border-color: rgba(118, 184, 255, 0.65);
  box-shadow: 0 14px 28px rgba(94, 160, 255, 0.18);
}

.planCard h4 {
  margin: 6px 0;
  font-size: 2rem;
}

.planCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.planCard ul {
  margin: 0;
  padding-left: 18px;
  color: #dbeafe;
  line-height: 1.7;
}

.planCard button:disabled {
  cursor: default;
  opacity: 0.7;
  transform: none;
}

.metricCard,
.insightCard,
.promptCard,
.storyBadge {
  padding: 18px;
  border-radius: 24px;
}

.metricCard p,
.insightLabel,
.storyBadge p {
  margin: 0 0 8px;
  color: #bfdbfe;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.metricCard h3,
.storyBadge h3 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.metricCard span,
.insightCard p,
.promptCard p,
.miniEventCard p,
.storyNarrative,
blockquote footer {
  color: var(--muted);
  line-height: 1.5;
}

.dashboardGrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.dashboardGrid .panel:nth-child(1),
.dashboardGrid .panel:nth-child(2),
.dashboardGrid .panel:nth-child(3),
.dashboardGrid .panel:nth-child(4) {
  grid-column: span 6;
}

.widePanel {
  grid-column: 1 / -1;
}

.panelHeader {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.panelHeader h3,
.panelHeader p {
  margin: 0;
}

.panelHeader p {
  color: var(--muted);
}

.modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(5, 10, 20, 0.58);
  backdrop-filter: blur(10px);
}

.modalOverlay[hidden] {
  display: none !important;
}

.modalCard {
  width: min(680px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.modalHeader {
  align-items: flex-start;
}

.customizeGrid {
  display: grid;
  gap: 12px;
}

.toggleRow {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.toggleRow span {
  display: grid;
  gap: 4px;
}

.toggleRow strong,
.toggleRow small {
  display: block;
}

.toggleRow small {
  color: var(--muted);
  line-height: 1.45;
}

.toggleRow input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.composerStack {
  display: grid;
  gap: 14px;
}

.composerSection {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.composerSection summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  color: #dbeafe;
}

.composerSection summary::-webkit-details-marker {
  display: none;
}

.composerSection[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.composerSection > .formGrid,
.composerSection > .formActions,
.composerSection > .attachmentPreview,
.composerSection > .subfolderComposer {
  margin: 16px 18px 18px;
}

.compactGrid {
  gap: 12px;
}

.compactHeader {
  margin-bottom: 10px;
}

.subfolderComposer {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.subfolderAddRow,
.sectionCardTop,
.sectionActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subfolderAddRow input,
.sectionTitleInput {
  flex: 1 1 220px;
}

.sectionList,
.sectionDetailsList {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.sectionCard,
.sectionDetails {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sectionCard textarea {
  margin-top: 10px;
}

.sectionAttachmentPreview {
  margin-top: 12px;
}

.sectionDetails summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
}

.sectionDetails p {
  margin: 12px 0 0;
  color: var(--muted);
}

.composerLabelGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.formGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fieldGroup {
  display: grid;
  gap: 8px;
}

.fieldGroup label,
.mutedLabel {
  color: #bfdbfe;
  font-size: 0.9rem;
}

.span2 {
  grid-column: span 2;
}

.span4 {
  grid-column: span 4;
}

.timelineStack {
  margin-top: 18px;
  isolation: isolate;
}

.dragHint {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(9, 19, 38, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

.eventCard,
.trashCard {
  position: relative;
  padding: 20px;
  overflow: visible;
}

.eventGlow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--event-color) 35%, transparent), transparent 42%);
  pointer-events: none;
}

.eventCard {
  border-left: 4px solid var(--event-color);
  z-index: 1;
  isolation: isolate;
}

.eventCard.menuOpen {
  z-index: 240;
}

.eventCard.dragging {
  opacity: 0.58;
}

.eventCard.dragTarget {
  outline: 2px dashed var(--event-color);
}

.eventHeader {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
}

.eventHeader h3,
.trashTop h3 {
  margin: 8px 0 8px;
  font-size: 1.5rem;
}

.eventSummary {
  margin: 0;
  color: #dbeafe;
  max-width: 760px;
}

.eventMetaRow,
.peopleRow,
.storyMetaRow,
.verticalMeta,
.spotlightTop,
.spotlightDates {
  color: var(--muted);
  font-size: 0.92rem;
}

.eventMetaRow,
.chipRow,
.peopleRow,
.imageStrip,
.eventAttachments {
  margin-top: 14px;
}

.eventSections {
  margin-top: 14px;
}

.customFieldList,
.customFieldDisplay,
.workspaceFolderList,
.workspaceMiniList {
  display: grid;
  gap: 12px;
}

.customFieldRow {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.5fr) auto;
  gap: 10px;
  align-items: center;
}

.customFieldDisplay {
  margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.customFieldChip {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 4px;
}

.customFieldChip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.customFieldChip strong {
  font-size: 0.95rem;
}

.statusBadge,
.eventFolderPill,
.chip {
  padding: 6px 10px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.09);
}

.statusBadge.done {
  background: rgba(55, 178, 112, 0.22);
  color: #bbf7d0;
}

.statusBadge.active {
  background: rgba(94, 160, 255, 0.22);
  color: #bfdbfe;
}

.statusBadge.planned {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}

.statusBadge.archived {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.menuBtn {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  color: white;
  font-size: 1.2rem;
  padding: 8px 10px;
  z-index: 210;
}

.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 38px;
  min-width: 160px;
  background: rgba(9, 19, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 22px 40px rgba(2, 6, 23, 0.42);
}

.dropdown div {
  padding: 12px 14px;
  cursor: pointer;
}

.dropdown div:hover {
  background: rgba(255, 255, 255, 0.1);
}

.eventWorkspace {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
}

.workspaceHeader,
.workspaceAddRow,
.workspaceFolderSummary,
.workspaceFolderActions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.workspaceHeader {
  align-items: start;
}

.workspaceHeader h4,
.workspaceHeader p {
  margin: 0;
}

.workspaceCopy {
  color: var(--muted);
}

.workspaceAddRow input {
  flex: 1 1 auto;
}

.workspaceFolder {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.workspaceFolderSummary {
  list-style: none;
  padding: 14px 16px;
  cursor: pointer;
}

.workspaceFolderSummary::-webkit-details-marker {
  display: none;
}

.workspaceFolderSummary strong {
  color: var(--muted);
  font-size: 0.84rem;
}

.workspaceFolderBody {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.chipRow,
.attachmentList,
.storyHighlights {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.attachmentItem {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.08);
}

.attachmentLink,
.externalLink {
  margin-left: 8px;
  color: #bfdbfe;
  text-decoration: none;
  font-weight: 700;
}

.attachmentLink:hover,
.externalLink:hover {
  text-decoration: underline;
}

.eventDrawerBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 20, 0.5);
  z-index: 80;
}

.eventDrawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  padding: 22px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  background: rgba(9, 19, 38, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -24px 0 40px rgba(2, 6, 23, 0.32);
  z-index: 90;
  overflow: auto;
}

.drawerHeader,
.drawerTabs,
.drawerPanel,
.drawerContent {
  display: grid;
  gap: 12px;
}

.drawerHeader {
  align-items: start;
}

.drawerTabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.drawerTab {
  width: 100%;
}

.drawerTab.active {
  background: linear-gradient(135deg, var(--accent), #76b8ff);
  color: #061528;
}

.drawerInnerPanel {
  margin: 0;
}

.drawerOverviewStack,
.subEventList {
  display: grid;
  gap: 14px;
}

.drawerEventSummary {
  margin: 0;
  color: #dbeafe;
  line-height: 1.55;
}

.drawerStatGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.drawerStat {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.drawerStat p,
.drawerStat strong {
  margin: 0;
}

.drawerStat p {
  color: var(--muted);
  font-size: 0.82rem;
}

.subfolderCard {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.subfolderHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.subfolderHeader input {
  flex: 1 1 auto;
}

.subfolderMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.subEventComposer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.subEventGrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
}

.subEventCard {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
}

.subEventCardTop,
.subEventActions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.subEventCard p,
.subEventCard small {
  margin: 0;
  color: var(--muted);
}

.thumbImage {
  width: 116px;
  height: 86px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.miniEventCard,
.folderPulse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.miniEventCard strong {
  display: block;
  margin-bottom: 4px;
}

.folderPulse strong {
  font-size: 1.3rem;
}

.viewSwitches {
  margin-bottom: 18px;
}

.viewPanel {
  min-height: 280px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.emptyTable {
  color: var(--muted);
}

.verticalTimeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 28px;
}

.verticalTimeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #76b8ff, rgba(118, 184, 255, 0.1));
}

.verticalNode {
  position: relative;
}

.verticalDot {
  position: absolute;
  left: -22px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--event-color);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--event-color) 24%, transparent);
}

.verticalCard {
  padding: 20px;
  border-left: 4px solid var(--event-color);
}

.verticalStep,
.spotlightOrder {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #bfdbfe;
}

.spotlightGraph {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.spotlightCard {
  padding: 18px 20px;
  border-top: 5px solid var(--event-color);
  background:
    linear-gradient(115deg, rgba(12, 24, 48, 0.94), rgba(35, 73, 132, 0.7)),
    var(--event-color);
}

.storyColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.storyBeat {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.storyIndex {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(118, 184, 255, 0.2);
  color: #bfdbfe;
  font-weight: 700;
}

blockquote {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-left: 3px solid #76b8ff;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.storyNarrative {
  margin-top: 0;
}

.emptyState {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .publicHero,
  .publicSteps,
  .publicUseGrid {
    grid-template-columns: 1fr;
  }

  .publicPricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
  }

  .dashboardGrid .panel:nth-child(1),
  .dashboardGrid .panel:nth-child(2),
  .dashboardGrid .panel:nth-child(3),
  .dashboardGrid .panel:nth-child(4),
  .widePanel,
  .storyColumns {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .formGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span4,
  .span2 {
    grid-column: span 2;
  }

  .heroPanel {
    flex-direction: column;
    align-items: flex-start;
  }

  .modalCard {
    padding: 18px;
  }

  .toggleRow {
    align-items: flex-start;
  }

  .pricingGrid {
    grid-template-columns: 1fr;
  }

  .composerLabelGrid {
    grid-template-columns: 1fr;
  }

  .drawerStatGrid,
  .subEventGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .publicShell {
    width: min(100%, calc(100% - 20px));
    padding: 14px 0 28px;
  }

  .publicNav,
  .publicHero,
  .publicBand {
    padding: 18px;
  }

  .publicNav,
  .publicNavLinks,
  .publicActions {
    flex-direction: column;
    align-items: stretch;
  }

  .previewGrid {
    grid-template-columns: 1fr;
  }

  .publicPricing {
    grid-template-columns: 1fr;
  }

  #main {
    padding: 18px;
  }

  .formGrid {
    grid-template-columns: 1fr;
  }

  .span4,
  .span2 {
    grid-column: span 1;
  }

  .controlDock {
    grid-template-columns: 1fr;
  }

  .spotlightCard {
    width: 100% !important;
  }

  .subfolderAddRow,
  .sectionCardTop,
  .sectionActions,
  .sectionDetails summary,
  .subfolderHeader,
  .workspaceAddRow,
  .workspaceHeader,
  .workspaceFolderSummary,
  .subEventCardTop,
  .subEventActions {
    flex-direction: column;
    align-items: stretch;
  }

  .customFieldRow {
    grid-template-columns: 1fr;
  }

  .eventDrawer {
    width: 100vw;
    padding: 18px;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  #sidebar,
  .controlDock,
  #dashboardView,
  #timelineView,
  #viewsView,
  #trashView {
    display: none !important;
  }

  #storyView {
    display: block !important;
  }

  .heroPanel,
  .panel,
  .storyLead,
  .storyColumn,
  .storyBadge {
    background: white;
    color: black;
    box-shadow: none;
    border: 1px solid #d1d5db;
  }
}
