:root {
  --brand-700: #00529c;
  --brand-600: #1078ca;
  --brand-500: #1688d5;
  --brand-100: #e6f4ff;
  --brand-050: #f5fbff;
  --text-strong: #292929;
  --text: #575757;
  --text-soft: #7f878c;
  --surface: #ffffff;
  --surface-soft: #fafcfd;
  --page: #f6f8fa;
  --border: #eaebeb;
  --border-hover: #cfd8dc;
  --focus: rgba(15, 120, 200, 0.14);
  --shadow-panel: 0 18px 54px rgba(23, 63, 90, 0.08);
  --shadow-canvas: 0 24px 56px rgba(20, 58, 84, 0.16);
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 12px;
  --radius-sm: 12px;
  --font-app: var(--font-bri-regular);
  --font-app-medium: var(--font-bri-medium);
  --font-app-semibold: var(--font-bri-semibold);
  --font-app-bold: var(--font-bri-bold);
  --scroll-track: #eaf1f5;
  --scroll-thumb: #a8bfcc;
  --scroll-thumb-hover: #8eacbd;
  --scroll-thumb-active: #789caf;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75 10 12.25l4.5-4.5' stroke='%235d7483' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html {
  min-width: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--page);
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  color: var(--text-strong);
  background:
    radial-gradient(circle at 9% -8%, rgba(15, 120, 200, 0.10), transparent 31rem),
    linear-gradient(180deg, #fbfdfe 0%, var(--page) 58%, #f6f9fa 100%);
  font-family: var(--font-app);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
p { margin: 0; }
img { max-width: 100%; }
button, input, select {
  font-family: var(--font-app-medium);
  font-size: inherit;
  font-weight: 400;
  outline: 0;
}
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html::-webkit-scrollbar,
.date-time-popover::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar-track,
.date-time-popover::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 999px; }
html::-webkit-scrollbar-thumb,
.date-time-popover::-webkit-scrollbar-thumb {
  min-height: 42px;
  background: var(--scroll-thumb);
  border: 3px solid var(--scroll-track);
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb:hover,
.date-time-popover::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
html::-webkit-scrollbar-thumb:active,
.date-time-popover::-webkit-scrollbar-thumb:active { background: var(--scroll-thumb-active); }
.date-time-popover { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }

.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e8eef2;
}
.navbar { min-height: 68px; display: flex; align-items: center; }
.navbar-container {
  width: min(1460px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.navbar-brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}
.header-logo { display: block; width: 116px; height: auto; object-fit: contain; }

.app-shell {
  width: min(1460px, calc(100% - 40px));
  margin: 28px auto 30px;
  display: grid;
  grid-template-columns: minmax(470px, .93fr) minmax(430px, 1.07fr);
  gap: clamp(22px, 2.2vw, 32px);
  align-items: start;
}
.panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(15, 120, 200, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
}
.editor-panel, .preview-panel { min-width: 0; padding: 26px; }
.panel-heading, .preview-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eyebrow {
  font-family: var(--font-app-bold);
  margin: 0 0 5px;
  color: var(--brand-500);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.editor-eyebrow { font-weight: 700; font-synthesis: weight; }
h1, h2 {
  margin: 0;
  font-family: var(--font-app-bold);
  color: var(--brand-700);
  line-height: 1.2;
}
h1 { font-size: clamp(22px, 2vw, 27px); font-weight: 700; font-synthesis: weight; letter-spacing: -.025em; }
h2 { font-size: 18px; font-weight: 400; letter-spacing: -.015em; }
