@font-face {
  src: url("/static/fonts/opensans-latin-400.woff2") format("woff2");
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface2: #eef1f3;
  --border: rgba(38, 53, 62, 0.08);
  --border-strong: rgba(38, 53, 62, 0.14);
  --text: #26353e;
  --text-muted: #5d6f7e;
  --accent: #0088c7;
  --accent-hover: #0075ad;
  --accent-muted: rgba(0, 136, 199, 0.1);
  --brand-blue: #0088c7;
  --brand-navy: #26353e;
  --brand-slate: #5d6f7e;
  --success: #2a9d4e;
  --warning: #b78300;
  --danger: #d93025;
  --radius: 10px;
  --btn-radius: 500px;
  --touch: 44px;
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 10px;
  --space-lg: 14px;
  --space-xl: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --z-nav-overlay: 150;
  --z-side-nav: 200;
  --z-chrome: 100;
  --z-splash: 500;
  --z-onboarding: 550;
  --z-modal: 600;
  --z-toast: 700;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

#app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: min(900px, 100%);
  margin: 0 auto;
  overflow: hidden;
  overflow-x: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.top-bar {
  display: flex;
  flex-direction: column;
  background: var(--brand-navy);
  flex-shrink: 0;
  z-index: var(--z-chrome);
  min-width: 0;
  max-width: 100%;
}

.top-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  padding-top: max(8px, var(--safe-top));
  min-height: 46px;
  min-width: 0;
  max-width: 100%;
}

.top-bar h1 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.header-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.header-progress-fill {
  height: 100%;
  width: 0;
  background: var(--brand-blue);
  transition: width 0.25s ease;
}

.header-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 8px 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.header-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.1);
  min-width: 0;
}

.header-toggle {
  border: none;
  border-radius: var(--btn-radius);
  min-height: 44px;
  padding: 7px 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.header-toggle.active {
  background: var(--accent);
  color: #fff;
}

.quick-selector {
  position: relative;
  min-width: 0;
}

.quick-selector-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-navy);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

#quickSelectorLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-selector-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}

.quick-selector-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: calc(var(--z-chrome) + 5);
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(38, 53, 62, 0.22);
  max-height: min(58dvh, 420px);
  overflow: hidden;
}

.quick-selector-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.quick-selector-list {
  display: grid;
  gap: 4px;
  max-height: calc(min(58dvh, 420px) - 62px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quick-selector-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.quick-selector-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-selector-item small {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-selector-item.active,
.quick-selector-item:active {
  background: var(--accent-muted);
}

.quick-selector-empty {
  padding: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.header-notes-btn {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
}

.header-logo--inverse {
  filter: brightness(0) invert(1);
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.save-dot--saving {
  background: rgba(255, 255, 255, 0.55);
  animation: save-pulse 1s ease-in-out infinite;
}

.save-dot--failed {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.35);
  cursor: pointer;
}

@keyframes save-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 8px;
  min-width: var(--touch);
  min-height: var(--touch);
  border-radius: 8px;
  line-height: 1;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-brand {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  height: 28px;
  width: auto;
}

.side-nav {
  position: fixed;
  top: 0; left: 0;
  width: min(280px, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
  z-index: var(--z-side-nav);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-lg);
  padding-top: max(var(--space-lg), var(--safe-top));
  padding-bottom: max(var(--space-lg), var(--safe-bottom));
  padding-left: max(var(--space-lg), var(--safe-left));
  box-shadow: 4px 0 24px rgba(38, 53, 62, 0.08);
}
.side-nav.open { transform: translateX(0); }

.nav-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  min-width: var(--touch);
  min-height: var(--touch);
}

.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(38, 53, 62, 0.45);
  z-index: var(--z-nav-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

.nav-section { margin-bottom: var(--space-md); }
.nav-section label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.toggle-group {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: var(--btn-radius);
  padding: 3px;
}
.toggle {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  min-height: var(--touch);
}
.toggle.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

select, input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="search"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  min-height: var(--touch);
}

.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 1px;
  min-height: var(--touch);
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--surface2);
}

.nav-link.danger {
  color: var(--danger);
  margin-top: 6px;
}

.room-search-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 4px;
}

textarea { min-height: 100px; resize: vertical; font-family: inherit; }

.room-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  min-height: var(--touch);
  color: var(--text);
  min-width: 0;
}
.room-list-item > :first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-list-item:hover { background: var(--surface2); }
.room-list-item.active {
  background: var(--brand-navy);
  color: #fff;
}
.room-pct { font-size: 0.72rem; opacity: 0.65; }
.room-list-item.active .room-pct { opacity: 0.85; }

.main-content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-lg) 14px;
  padding-bottom: var(--space-lg);
}

.bottom-bar {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  padding-bottom: max(8px, var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: var(--z-chrome);
  box-shadow: 0 -2px 10px rgba(38, 53, 62, 0.04);
  min-width: 0;
  max-width: 100%;
}

.nav-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 10px;
  border: none;
  border-radius: var(--btn-radius);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: var(--touch);
}

.nav-btn.primary {
  background: var(--accent);
  color: #fff;
}

.nav-btn.primary:active {
  background: var(--accent-hover);
}
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.section-header {
  margin-bottom: var(--space-md);
}
.section-header h2 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  font-weight: 700;
  color: var(--brand-navy);
  word-break: break-word;
}
.section-header p { color: var(--text-muted); font-size: 0.84rem; line-height: 1.45; word-break: break-word; }

.category-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
}
.category-title {
  padding: 10px 14px;
  background: transparent;
  font-weight: 600;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  color: var(--brand-navy);
  word-break: break-word;
}

.group-block { padding: 2px 0; }
.group-name {
  padding: 6px 14px 2px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-height: var(--touch);
  user-select: none;
}
.check-item:last-child { border-bottom: none; }
.check-item:active { background: var(--surface2); }

.check-item input[type="checkbox"] {
  width: 24px; height: 24px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.check-item label {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  cursor: pointer;
  word-break: break-word;
}

.number-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.number-item label { flex: 1; min-width: 0; font-size: 0.9rem; word-break: break-word; }
.number-item input[type="number"] {
  width: 100px;
  min-height: var(--touch);
  text-align: center;
}

.notes-section {
  margin-top: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
  min-width: 0;
  max-width: 100%;
}
.notes-section h3 { font-size: 0.9rem; margin-bottom: var(--space-sm); }
.notes-actions { display: flex; gap: 6px; margin-top: 6px; }

.btn {
  padding: 10px 20px;
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  background: var(--brand-slate);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: var(--touch);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 8px 12px; font-size: 0.82rem; min-height: var(--touch); }

.task-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--space-md);
}
.task-view-controls .btn {
  flex: 1;
  min-width: 150px;
}

.task-room-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
}
.task-room-accordion summary {
  list-style: none;
  cursor: pointer;
}
.task-room-accordion summary::-webkit-details-marker { display: none; }
.task-room-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  font-weight: 600;
  font-size: 0.88rem;
  min-height: var(--touch);
  border-bottom: 1px solid var(--border);
}
.task-room-name { flex: 1; min-width: 0; word-break: break-word; }
.task-room-pct {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
.task-room-body { padding-bottom: 4px; }
.task-goto-room { flex-shrink: 0; }

.meta-readiness {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.required { color: var(--warning); }

.review-warnings {
  margin: 6px 0 0 18px;
  font-size: 0.85rem;
  overflow-wrap: break-word;
}
.review-warnings li { margin-bottom: 2px; word-break: break-word; }

.ios-email-banner {
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  font-size: 0.84rem;
  line-height: 1.4;
  background: var(--accent-muted);
  border: 1px solid rgba(43, 128, 195, 0.2);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.ios-email-banner strong { display: block; margin-bottom: 4px; }

.email-help {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 10px;
  line-height: 1.45;
}
.muted-text { color: var(--text-muted); font-size: 0.85rem; }

.email-add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}
.email-add-row input { flex: 1; min-width: 0; }

.form-grid {
  display: grid;
  gap: 8px;
  margin-bottom: var(--space-md);
  min-width: 0;
  max-width: 100%;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.field-help,
.card-help {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
}
.card h3 { font-size: 0.95rem; margin-bottom: var(--space-md); }

.setup-next-card p,
.completion-card p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: var(--space-md);
}

.completion-card {
  background: var(--brand-navy);
  color: #fff;
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin: var(--space-lg) 0 var(--space-md);
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.08);
}
.completion-card h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}
.completion-card p {
  color: rgba(255, 255, 255, 0.78);
}

.summary-composer-card textarea {
  margin-top: var(--space-md);
}

.notes-import-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  background: var(--bg);
}

.notes-import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: var(--space-sm);
}

.note-import-group {
  margin-bottom: var(--space-sm);
}
.note-import-group h4 {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.note-import-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.note-import-item:active {
  background: var(--surface2);
}
.note-import-item input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.note-import-item span {
  min-width: 0;
}
.note-import-item strong,
.note-import-item small {
  display: block;
}
.note-import-item strong {
  font-size: 0.86rem;
  color: var(--brand-navy);
}
.note-import-item small {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.global-note-card {
  display: grid;
  gap: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
}
.global-note-card h3 {
  font-size: 0.95rem;
  margin: 2px 0 6px;
}
.global-note-card p {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.note-group-label {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-source-missing {
  align-self: start;
  padding: 6px 10px;
  border-radius: var(--btn-radius);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  max-width: 100%;
}
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: var(--touch);
  max-width: 100%;
  min-width: 0;
}
.email-chip.selected { background: var(--accent); color: white; }
.chip-label {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chip-delete {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  min-width: var(--touch);
  min-height: var(--touch);
  opacity: 0.7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-delete:hover { opacity: 1; background: rgba(38, 53, 62, 0.1); }

.history-item {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.history-item:hover { background: var(--surface2); }
.history-item .meta { color: var(--text-muted); font-size: 0.75rem; margin-top: 4px; }
.history-item.fail { border-left: 3px solid var(--danger); }
.history-item.ok { border-left: 3px solid var(--success); }

.template-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: var(--space-md);
}
.template-stats span {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.template-card .btn {
  width: 100%;
}
.template-actions {
  display: grid;
  gap: 8px;
}
.template-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.template-import-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.template-tree h4 {
  margin: 14px 0 8px;
  color: var(--brand-navy);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.template-node {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
  overflow: hidden;
}
.template-node summary,
.template-leaf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--touch);
  padding: 8px 10px;
  list-style: none;
}
.template-node summary::-webkit-details-marker { display: none; }
.template-node summary span,
.template-leaf span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}
.template-children {
  padding: 0 8px 8px;
}
.template-children .template-node {
  margin-top: 6px;
  margin-bottom: 0;
  background: var(--bg);
}
.template-leaf {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.template-leaf:last-child { border-bottom: 0; }
.template-action {
  width: auto !important;
  flex: 0 0 auto;
  min-width: 72px;
  padding-left: 10px;
  padding-right: 10px;
}
.danger-text {
  color: var(--danger) !important;
}

.modal {
  position: fixed; inset: 0;
  background: rgba(38, 53, 62, 0.55);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  max-width: min(500px, 100%);
  width: 100%;
  min-width: 0;
  max-height: 80vh;
  overflow-x: hidden;
  overflow-y: auto;
}
.modal-content h3 { margin-bottom: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1; min-width: 120px; }

.sample-modal {
  max-width: min(560px, 100%);
  max-height: min(86vh, 720px);
  padding: 18px;
}
.sample-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.sample-modal-header h3 { margin-bottom: 0; }
.sample-eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sample-close {
  flex: 0 0 auto;
  min-width: 38px;
  width: 38px;
  height: 38px;
  color: var(--text-muted);
  background: var(--surface2);
}
.sample-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.sample-disclaimer {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-muted);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.4;
}
.sample-meta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sample-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border);
}
.sample-meta-row:last-child { border-bottom: 0; }
.sample-meta-row span { color: var(--text-muted); }
.sample-meta-row strong {
  color: var(--text);
  text-align: right;
}
.sample-section {
  text-align: left;
  min-width: 0;
}
.sample-section h4 {
  margin-bottom: 8px;
  color: var(--brand-navy);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sample-section p,
.sample-list {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.sample-list {
  padding-left: 18px;
}
.sample-list li + li { margin-top: 5px; }
.sample-completed-list {
  display: grid;
  gap: 10px;
}
.sample-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  min-width: 0;
}
.sample-card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}
.sample-card-title span {
  font-weight: 700;
  color: var(--text);
}
.sample-card-title small {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-align: right;
}
.sample-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sample-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 0.84rem;
  min-width: 0;
}
.sample-item span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sample-item strong {
  color: var(--accent);
  font-size: 0.82rem;
  white-space: nowrap;
}
.sample-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(42, 157, 78, 0.12);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
}
.sample-item.unchecked .sample-check {
  background: rgba(183, 131, 0, 0.14);
  color: var(--warning);
}
.sample-card-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.sample-card-note strong { color: var(--text); }
.sample-loading,
.sample-alert,
.sample-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.sample-alert { color: var(--danger); }

.grammar-wizard { max-width: min(520px, 100%); }
.grammar-wizard-header h3 { margin-bottom: 8px; }
.grammar-wizard-body { min-height: 120px; }

.grammar-progress { margin-bottom: 16px; }
.grammar-progress span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.grammar-progress-track {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}
.grammar-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.2s ease;
  width: 0;
}

.grammar-status { font-size: 0.95rem; color: var(--text-muted); margin: 8px 0; }
.grammar-status.ok { color: var(--success); }
.grammar-offline-note {
  font-size: 0.8rem;
  color: var(--warning);
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(245,158,11,0.1);
  border-radius: 8px;
}

.grammar-issue-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}
.grammar-type-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
}
.grammar-type-badge.spelling {
  background: rgba(245,158,11,0.15);
  color: var(--warning);
}
.grammar-type-badge.small {
  font-size: 0.65rem;
  padding: 2px 6px;
  margin-right: 4px;
}
.grammar-issue-message {
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.grammar-context-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.grammar-context {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.grammar-context-text {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.grammar-highlight {
  background: rgba(245,158,11,0.35);
  color: inherit;
  padding: 1px 2px;
  border-radius: 3px;
  font-weight: 600;
}

.grammar-suggestions { margin-bottom: 8px; }
.grammar-suggestion-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  max-width: 100%;
}
.grammar-suggestion-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-muted);
}
.grammar-suggestion-option.keep-original:has(input:checked) {
  border-color: var(--text-muted);
  background: rgba(128,128,128,0.08);
}
.grammar-suggestion-option input[type="radio"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--accent);
}
.grammar-suggestion-text {
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
  min-width: 0;
  flex: 1;
}

.grammar-wizard-actions { margin-top: 16px; }
.grammar-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
@media (min-width: 400px) {
  .grammar-action-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.grammar-btn {
  min-height: 48px;
  min-width: 0;
  padding: 12px 8px;
  font-size: 0.85rem;
}
.grammar-btn-wide { width: 100%; margin-bottom: 10px; }
.grammar-btn-cancel { width: 100%; min-height: var(--touch); }

.grammar-summary-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.grammar-summary-stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}
.grammar-summary-stat.accepted {
  background: rgba(34,197,94,0.12);
  color: var(--success);
}
.grammar-summary-stat.skipped {
  background: rgba(128,128,128,0.12);
  color: var(--text-muted);
}
.grammar-summary-section { margin-bottom: 14px; }
.grammar-summary-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.grammar-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}
.grammar-summary-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
}
.grammar-summary-list.muted { color: var(--text-muted); }
.grammar-preview {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.grammar-preview-text {
  background: var(--surface2);
  border: 1px solid var(--success);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  z-index: var(--z-toast);
  box-shadow: 0 4px 20px rgba(38, 53, 62, 0.25);
  transition: opacity 0.3s;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.hidden { opacity: 0; pointer-events: none; }

.hidden { display: none !important; }

/* Sample mode banner */
.sample-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #8a5a00;
  background: linear-gradient(0deg, rgba(0,0,0,0.06), rgba(0,0,0,0.06)), #b9770a;
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}
.sample-banner-text {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.3;
  min-width: 0;
}
.sample-banner-text strong {
  letter-spacing: 0.06em;
}
.sample-banner-exit {
  flex-shrink: 0;
  min-height: var(--touch);
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.sample-banner-exit:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Start Walkthrough page */
.start-view-toggle {
  margin-top: 4px;
}
.start-view-help {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.start-view-help li + li {
  margin-top: 6px;
}

/* Splash / Home screen */
#splashScreen {
  position: fixed;
  inset: 0;
  z-index: var(--z-splash);
  background: var(--bg);
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior: none;
}

.splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 max(48px, var(--safe-bottom));
  text-align: center;
}

.splash-screen > :not(.splash-header-band) {
  width: 100%;
  max-width: 360px;
  padding-left: max(24px, var(--safe-left));
  padding-right: max(24px, var(--safe-right));
  box-sizing: border-box;
}

.splash-header-band {
  width: 100%;
  align-self: stretch;
  margin: 0 0 24px;
  padding: max(16px, var(--safe-top)) max(24px, var(--safe-right)) 16px max(24px, var(--safe-left));
  background: var(--brand-navy);
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.splash-logo {
  height: 44px;
  width: auto;
  max-width: min(280px, 100%);
}

.splash-logo--inverse {
  filter: brightness(0) invert(1);
}

.splash-property {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
  word-break: break-word;
}

.splash-unit {
  color: var(--brand-blue);
}

.splash-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 340px;
  margin-bottom: 24px;
}

.splash-actions {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.splash-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 13px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--btn-radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: var(--touch);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  box-shadow: 0 1px 2px rgba(38, 53, 62, 0.04);
}
.splash-btn:hover { border-color: var(--brand-blue); color: var(--text); }
.splash-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.splash-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.splash-btn.sample {
  margin-top: 4px;
  border-style: dashed;
  background: rgba(0, 136, 199, 0.04);
  color: var(--brand-navy);
}
.splash-btn.sample:hover {
  background: var(--accent-muted);
}
.splash-btn .splash-btn-hint {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}
.splash-btn.primary .splash-btn-hint { color: rgba(255, 255, 255, 0.75); }

.splash-resume-card {
  width: 100%;
  max-width: 360px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 1px 3px rgba(38, 53, 62, 0.04);
}
.splash-resume-card h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.splash-resume-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 4px 0;
}
.splash-resume-stat span:last-child { color: var(--accent); font-weight: 600; }

.splash-cache-dismiss {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.splash-pwa-hint {
  width: 100%;
  max-width: 360px;
  margin-top: 20px;
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.splash-pwa-hint strong { color: var(--accent); font-weight: 600; }

.splash-error {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius);
  text-align: left;
  margin-bottom: 12px;
}

.splash-version {
  margin-top: 16px;
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.06em;
}

.splash-footer {
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.splash-credit {
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.45;
  letter-spacing: 0.02em;
}
.splash-credit a {
  color: inherit;
  text-decoration: none;
}
.splash-credit a:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.splash-install-link {
  margin-top: 18px;
}
.splash-link-btn {
  background: none;
  border: none;
  padding: 8px 4px;
  min-height: var(--touch);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
}
.splash-link-btn:hover { color: var(--accent-hover); }

/* ---- First-run "Add to Home Screen" onboarding -------------------------- */
.onboarding {
  position: fixed;
  inset: 0;
  z-index: var(--z-onboarding);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(32px, var(--safe-bottom));
}
.onboarding.hidden { display: none; }

.onboarding-header-band {
  width: 100%;
  align-self: stretch;
  margin-bottom: 20px;
  padding: max(16px, var(--safe-top)) max(24px, var(--safe-right)) 16px max(24px, var(--safe-left));
  background: var(--brand-navy);
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}
.onboarding-logo {
  height: 40px;
  width: auto;
  max-width: min(260px, 100%);
}
.onboarding-logo--inverse { filter: brightness(0) invert(1); }

.onboarding-body {
  width: 100%;
  max-width: 380px;
  padding-left: max(20px, var(--safe-left));
  padding-right: max(20px, var(--safe-right));
  box-sizing: border-box;
}

.onboarding-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
  margin-bottom: 10px;
}
.onboarding-lead {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 18px;
}
.onboarding-lead strong { color: var(--text); font-weight: 600; }

.onboarding-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(38, 53, 62, 0.05);
}
.onboarding-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.onboarding-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.onboarding-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.onboarding-step-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-step-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}
.onboarding-step-text strong { font-weight: 700; }
.onboarding-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 30px;
  height: 30px;
  margin: 0 2px;
  border-radius: 7px;
  background: var(--accent-muted);
  color: var(--accent);
}
.onboarding-icon-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.onboarding-android {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
}
.onboarding-android strong { color: var(--text); font-weight: 600; }

.onboarding-dontshow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  min-height: var(--touch);
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.onboarding-dontshow input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.onboarding-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--btn-radius);
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: var(--touch);
  cursor: pointer;
  font-family: inherit;
}
.onboarding-btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.status-banner {
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.status-banner.warn {
  background: rgba(183, 131, 0, 0.08);
  border: 1px solid rgba(183, 131, 0, 0.25);
}
.status-banner.ok {
  background: rgba(42, 157, 78, 0.08);
  border: 1px solid rgba(42, 157, 78, 0.25);
}

@media (min-width: 768px) {
  .side-nav { position: relative; transform: none; width: 260px; flex-shrink: 0; height: auto; }
  .nav-close, .nav-overlay { display: none; }
  #app { flex-direction: row; flex-wrap: wrap; max-width: min(1200px, 100%); height: 100dvh; overflow: hidden; overflow-x: hidden; }
  .top-bar { width: 100%; }
  .header-filter {
    grid-template-columns: 220px minmax(260px, 1fr) 150px;
    align-items: start;
  }
  .main-content { flex: 1; min-height: 0; }
  .bottom-bar { width: 100%; }
}
