/* Enthree palette: ivory workspaces, white surfaces and forest-green actions. */
:root {
  --brand-forest: #214E3D;
  --brand-forest-dark: #163A2D;
  --brand-sage: #E8EEE7;
  --brand-ivory: #F7F5EF;
  --brand-sand: #EAE3D5;
  --brand-gold: #927543;
  --brand-ink: #22372E;
  --accent: var(--brand-forest);
  --accent-pressed: var(--brand-forest-dark);
  --accent-contrast: #FFFFFF;
  --accent-tint: var(--brand-sage);
  --accent-2: #788B6E;
  --accent-3: #355D49;
  --accent-4: #47705A;
  --bg: var(--brand-ivory);
  --bg-grad-1: var(--brand-ivory);
  --bg-grad-2: var(--brand-ivory);
  --bg-grad-3: var(--brand-ivory);
  --surface: #FFFFFF;
  --surface-2: #F0EEE6;
  --surface-bg: #FFFFFF;
  --grouped: #EEEAE1;
  --label: var(--brand-ink);
  --label-2: #5D685F;
  --label-3: #657065;
  --hairline: #DDE1D7;
  --surface-border: #E0E3DA;
  --fill: #ECEFE8;
  --fill-2: #D7DCD2;
  --green: #35734E;
  --shadow-lg: 0 16px 50px #173C2820, 0 2px 6px #173C2810;
}
body { background: var(--brand-ivory); }
.shell { --label-3: #657065; }
.sidebar { background: #FDFCF8; border-color: #E6E5DC; }
.topbar { background: #FDFCF8ED; border-color: #E6E5DC; }
.sidebar .nav-item.active { background: var(--brand-sage); color: var(--brand-forest-dark); }
.sidebar .nav-item.active .ico,.tabbar a.active,.sidebar .section-label,.topbar-context { color: var(--brand-forest); }
.sidebar .nav-item .ico { color: #748074; }
.surface,.card,.list { border-color: #E1E4DA; }
.shell .btn-primary,.sheet .btn-primary,.auth-submit,.btn-primary { background: var(--brand-forest); color: #fff; border-color: var(--brand-forest); }
.shell .btn-primary:hover,.sheet .btn-primary:hover,.auth-submit:hover,.btn-primary:hover { background: var(--brand-forest-dark); border-color: var(--brand-forest-dark); }
.shop-page .btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.btn-surface { background: #FFF; color: var(--brand-ink); }
.input,.textarea,.custom-select-trigger { background: #FDFCF9; border-color: #DCE0D5; }
.input:focus,.textarea:focus { outline-color: #47705A45; }
.field > label { color: #485A4C; }
.segmented,.builder-tabs { background: #EEEEE5; }
.settings-tabs { border-color: #DCE1D5; }
.settings-tabs button[aria-selected=true] { color: var(--brand-forest); border-color: var(--brand-forest); }
.settings-tabs button:focus-visible,.studio-panels:focus-visible { outline-color: var(--brand-forest); }
.eyebrow,.list-section-title { color: #52654F; }
.table th,.table tbody tr:hover { background: #F6F7F1; }
.table th { color: #526250; }
.table td { border-color: #E4E7DE; }
.account-summary { background: #FFF; border-color: #DEE3D9; }
.account-avatar,.avatar { background: #E5EADB; color: var(--brand-forest); }
.badge.accent { background: #E8EEE3; color: #31573A; }
.badge.green { background: #E6F0E6; color: #285D39; }
.pricing-policy,.price-preview,.security-box { background: #EDF1E9; }
.price-buyer-total { color: var(--brand-forest-dark); }
.progress i,.analytics-bar { background: #678267; }
.design-preview-card { background: #ECEDE4; }
.overview-event { background: #F9FAF4; }
.studio-action-bar { background: #FFFFFFF5; border-color: #DEE4D7; }
.auth-form-panel { background: #FAF9F4; }
.auth-brand { background-image: url('/assets/images/enthree-brand.png'); background-position: 64% center; }
.auth-brand-scrim { background: linear-gradient(180deg,#122C2440,#122C24BA); }
.auth-brand-title .grad { color: #DBDFC3; }
.auth-brand-sub,.auth-brand-foot,.auth-stat span { color: #E1E7D8; }
.auth-brand-eyebrow,.auth-stat strong { color: #D9D4B9; }
.studio-welcome { background: #183629 url('/assets/images/enthree-brand.png') center 53% / cover; border-radius: 20px; }
.studio-welcome::before { background: linear-gradient(90deg,#153829F0 0%,#153829C4 44%,#15382968 100%); }
.studio-welcome .eyebrow { color: #D8D9B9; }
.studio-welcome h2 { color: #fff; }
.studio-welcome p { color: #F0F2E5; }
.balance-hero,.admin-ledger-hero { background-image: linear-gradient(90deg,#153629ED,#163C2ABA),url('/assets/images/enthree-brand.png'); }
.balance-hero::before { background: transparent; }
.balance-hero p,.balance-pending span,.admin-ledger-hero p { color: #DBE5D5; }
.balance-hero .eyebrow,.admin-ledger-hero .eyebrow { color: #DED9BD; }
.analytics-hero { background-image: linear-gradient(110deg,#16392FEF,#16392F88),url('/assets/images/enthree-brand.png'); }
.analytics-hero .footnote { color: #E0E7DA; }
.analytics-hero .eyebrow { color: #E3DCC3; }
.pdf-preset-card .preview-mini-pdf-head { background-image: linear-gradient(90deg,#142E38B0,#142E3840),url('/assets/images/festival-lumina.png'); }
.pdf-preset-card .mini-pdfHeader-boxed .preview-mini-pdf-head { background-image: linear-gradient(90deg,#173529 50%,transparent 50%),url('/assets/images/festival-lumina.png'); }

/* A filtered or incomplete row keeps the same card widths and heights. */
.grid.event-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); gap: 20px; align-items: start; }
.event-grid .event-card { display: grid; grid-template-rows: 190px 60px; min-width: 0; height: 250px; overflow: visible; }
.event-grid .cover.cover-lg { height: 190px; min-height: 0; aspect-ratio: auto; border-radius: 16px 16px 0 0; overflow: hidden; }
.event-grid .cover-overlay { inset: auto 18px 16px; }
.event-grid .cover-overlay .title2 { font-size: 19px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.event-grid .cover-overlay .footnote { font-size: 12px; }
.event-grid .meta.meta-slim { height: 60px; padding: 10px 14px; }
.event-grid .meta .btn-primary { background: #F2F5ED; border-color: transparent; color: var(--brand-forest); }
.event-grid .cover-chip { font-size: 10px; }
.event-grid .cover-ring { display: none; }

/* Native popovers escape sheet clipping while keeping inherited event styles. */
.custom-select-panel {
  --label: #233B2D; --label-2: #52634E; --label-3: #5A6954;
  --accent: #214E3D; --accent-tint: #E8EEE7; --surface: #FFF; --hairline: #DCE2D6; --fill: #EFF3E9;
  position: fixed; inset: auto; margin: 0; box-sizing: border-box; min-width: 0;
  grid-template-rows: auto minmax(0,1fr); gap: 7px; padding: 9px;
  border: 1px solid #D5DFCF; border-radius: 14px; background: #FFF; color: #233B2D;
  box-shadow: 0 14px 45px #173D2928,0 2px 8px #173D2914; overflow: hidden; text-align: left;
}
.custom-select-panel[data-type=creatable] { grid-template-rows: auto minmax(0,1fr) auto; }
.theme-poster .custom-select-panel,.theme-festival .custom-select-panel { background: #FFF; color: #233B2D; }
.custom-select-panel::backdrop { background: transparent; }
.custom-select-search { min-height: 40px; border-radius: 8px; font: 400 14px/1.5 var(--font-body); background: #F8FAF4; color: #233B2D; }
.custom-select-search::placeholder { color: #62705C; opacity: 1; }
.custom-select-options { min-height: 0; overscroll-behavior: contain; scrollbar-gutter: stable; }
.custom-select-option { min-height: 42px; color: #263E2D; }
.custom-select-option-main { min-height: 42px; font-size: 14px; line-height: 1.5; font-weight: 500; }
.custom-select-option-main span { white-space: normal; overflow-wrap: anywhere; }
.custom-select-option.active { background: #E9F0E2; color: #214E3D; }
.custom-select-option.active .custom-select-option-main::after { content: '✓'; margin-left: auto; padding-left: 12px; color: #214E3D; }
.custom-select-add { position: static; background: #214E3D; color: #FFF; box-shadow: none; padding: 9px 12px; font: 500 13px/1.5 var(--font-body); overflow-wrap: anywhere; }
.custom-select-add:disabled { opacity: 1; background: #EEF1E9; color: #5D6D54; }
.custom-select-remove { width: 34px; height: 34px; color: #53654C; }
.custom-select-status:not([hidden]) { color: #A53D31; font-size: 12px; padding: 4px 6px; }
.custom-select-trigger { cursor: pointer; }
.custom-select-trigger[aria-expanded=true] { border-color: #55774E; box-shadow: 0 0 0 3px #DCE8D9; }
.custom-select-trigger > ion-icon { transition: transform .18s; }
.custom-select-trigger[aria-expanded=true] > ion-icon { transform: rotate(180deg); }
.dt-search .input { padding-left: 38px; }

/* The public website uses the same palette, with its own spacious typography. */
body:has(.site-header) { --bg: #F7F5EF; --text: #213C2E; --text-dim: #5D6A5F; --border: #DEE2D5; --gradient: linear-gradient(120deg,#214E3D,#718C5D); --gold: #967B47; --clay: #42674B; }
.site-header,.site-header.scrolled { background: #F7F5EFF0; border-color: #E3E5DA; }
.site-header .nav-login { border-color: #214E3D; background: #214E3D; color: #fff; }
.site-header .nav-login:hover { background: #163A2D; }
.hero .gradient-text { color: #55764D; }
.hero .eyebrow { color: #536D48; }
.hero .eyebrow-dot { background: #71815A; box-shadow: 0 0 0 4px #D8DFC9; }
.hero .product-art { background-image: url('/assets/images/enthree-brand.png'); background-position: 60% center; }
.hero .product-caption { color: #E7E7CA; }
.hero .product-admission { background: #FFFEF9FA; border-color: #F4F1E6; }
.hero .product-admission-info > span,.product-footnote span:last-child { color: #587147; }
.hero .product-admission-info h2 { color: #264D38; }
.hero .product-admission-stub { border-color: #C9D4BD; }
.hero-principles,.product-footnote,.product-admission-meta { color: #63715E; }
.feature-icon { background: #E4EADA!important; color: #41653E!important; }
.cta { background-image: linear-gradient(90deg,#143D2AF2,#143D2A6B),url('/assets/images/enthree-brand.png'); }
.cta .btn-primary { background: #F5F0E2; color: #244B35; border-color: transparent; }
.cta p { color: #DAE6D2; }
.mobile-menu { background: #F7F5EFFA; }
.mobile-menu-glow { background: radial-gradient(circle,#A7BE8840,transparent 70%); }
.mobile-close { background: #E9EEDF; border-color: #D7DFCA; }
.trust-strip { border-color: #DEE2D5; }
.faq-item { background: #FFFEFA; border-color: #DDE4D3; }
:focus-visible { outline-color: #476D41; }

@media(min-width:861px) {
  .studio-welcome { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
  .event-grid .event-card { grid-template-rows: clamp(165px,22vh,190px) 60px; height: auto; }
  .event-grid .cover.cover-lg { height: clamp(165px,22vh,190px); }
}
@media(max-width:860px) {
  .custom-select-trigger,.custom-select-option,.custom-select-option-main { min-height: 44px; }
  .custom-select-search { font-size: 16px; }
  .shell .input,.shell .textarea,.sheet .input,.sheet .textarea,.shop-page .input,.shop-page .textarea { font-size: 16px; min-height: 44px; }
  .tabbar { background: #FFFFFCF5; border-color: #DDE4D5; }
  .custom-select-panel { border-radius: 14px; }
}
@media(max-width:600px) {
  .grid.event-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .event-grid .event-card { grid-template-rows: 210px 64px; height: 274px; }
  .event-grid .cover.cover-lg { height: 210px; }
  .event-grid .meta.meta-slim { height: 64px; }
  .studio-welcome { min-height: 205px; padding: 24px; background-position: 62% center; }
  .studio-welcome h2 { max-width: 270px; font-size: 29px; }
  .studio-welcome p { font-size: 13px; line-height: 1.65; }
  .events-tab-segmented { min-width: 0; }
  .events-tab-segmented button { min-width: 0; padding: 8px 6px; font-size: 11px; }
  .metrics-ribbon > div { min-width: 0; }
  .tabbar:not(.admin-tabbar) { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1px; }
  .tabbar:not(.admin-tabbar):has(a:nth-child(6)) { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .tabbar:not(.admin-tabbar) a { min-width: 0; padding-left: 0; padding-right: 0; font-size: 9px; }
}
@media(prefers-reduced-motion:reduce) { .custom-select-trigger > ion-icon { transition: none; } }
