/* A fixed dialog height keeps its shell in place while a cabinet tab changes. */
.modal {
  height: min(720px, calc(100vh - 40px));
  scrollbar-gutter: stable;
}

.calendar-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.admin-panel { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 4px; }
.admin-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:22px 0 12px; }
.admin-panel-head .admin-heading { margin:0; }
.people-search { width:100%; border:1px solid var(--line); background:#fffdf8; padding:11px; font-size:12px; }
.admin-meta { font-size:11px; line-height:1.55; color:#5f6c61; }
.approval-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.person-label { display:flex; gap:8px; margin-top:9px; }
.person-label input { min-width:0; flex:1; border:1px solid var(--line); padding:8px; background:#fffdf8; font-size:11px; }
.payment-note { margin:13px 0 0; padding:11px 12px; background:#e8eee4; color:#526354; font-size:11px; line-height:1.5; }
.template-picker { display:grid; gap:10px; padding:13px; background:#eef1e9; border:1px solid rgba(79,105,85,.22); }
.template-picker-head { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.template-picker-head label { flex:1; }
.template-picker .subcopy { margin:0; }
.template-quick { display:flex; gap:7px; flex-wrap:wrap; }
.template-card { display:grid; gap:3px; min-width:132px; text-align:left; border:1px solid var(--line); background:#fffdf8; padding:9px 11px; color:var(--ink); font-size:11px; font-weight:700; }
.template-card:hover { border-color:var(--moss); background:#e2eadf; }
.template-card span { font:9px 'DM Mono',monospace; color:#637066; text-transform:uppercase; }
.template-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 14px; border:1px solid var(--line); padding:12px; margin:0; }
.template-fields legend { padding:0 5px; font-size:11px; font-weight:700; }
.template-filled { background:#e3efe1!important; border-color:#789879!important; box-shadow:inset 3px 0 0 #4f6955; }
.booking-actions { display:grid; gap:9px; }
.booking-card .button-outline { background:transparent; }
.save-explanation { margin:12px 0 0; font-size:10px; line-height:1.5; color:#526354; }
.header-actions { display:flex; align-items:center; gap:16px; }
.language-toggle { border:1px solid var(--line); background:transparent; color:var(--ink); padding:6px 8px; font:10px 'DM Mono',monospace; }
.tour-feature { margin-top:64px; }
.tour-feature h3 { font:600 23px 'Playfair Display'; margin:24px 0 12px; }
.checklist { display:grid; gap:8px; margin:0; padding:0; list-style:none; font-size:13px; line-height:1.55; }
.route-plan { display:grid; gap:0; border-top:1px solid var(--line); }
.route-plan article { display:grid; grid-template-columns:42px 1fr; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.route-plan article>span { font:10px 'DM Mono',monospace; padding-top:4px; }
.route-plan h3 { margin:0 0 4px; font-size:20px; }
.route-plan p { margin:0; font-size:12px; line-height:1.6; }
.route-plan small { display:block; margin-top:7px; color:#526354; font-size:10px; }
.map-frame { overflow:hidden; aspect-ratio:16/10; border:1px solid var(--line); background:#e4dac7; }
.map-frame iframe { width:100%; height:100%; border:0; }
.faq-list { border-top:1px solid var(--line); }
.faq-list details { border-bottom:1px solid var(--line); padding:14px 0; }
.faq-list summary { cursor:pointer; font-weight:700; font-size:13px; }
.faq-list p { margin:10px 0 0; font-size:12px; line-height:1.6; }
.review-card { border:1px solid var(--line); background:#fffdf8; padding:15px; margin-bottom:10px; }
.review-card b { display:block; font-size:12px; }
.review-card span { display:block; color:#c84f2f; letter-spacing:2px; margin:5px 0; }
.review-card p { margin:0; font-size:12px; line-height:1.6; }
.similar-list { display:grid; gap:8px; }
.similar-list a { display:grid; grid-template-columns:1fr auto; gap:5px 12px; padding:13px; color:var(--ink); background:#fffdf8; border:1px solid var(--line); text-decoration:none; }
.similar-list span { font:9px 'DM Mono',monospace; text-transform:uppercase; color:#637066; }
.similar-list b { font:600 18px 'Playfair Display'; }
.similar-list small { grid-column:2; grid-row:1/3; align-self:center; font-size:11px; }
.template-source-preview { padding:12px; border:1px solid var(--line); background:#fffdf8; }
.template-source-preview h4 { margin:0 0 9px; font:600 17px 'Playfair Display'; }
.template-source-preview p { margin:0; font-size:11px; color:#526354; }
.template-source-preview dl { margin:0; display:grid; gap:7px; }
.template-source-preview dl div { display:grid; grid-template-columns:120px 1fr; gap:8px; font-size:10px; }
.template-source-preview dt { color:#637066; }
.template-source-preview dd { margin:0; overflow-wrap:anywhere; }
.notification-card.unread { border-left:3px solid var(--rust); }
.catalog-map-button { width:100%; padding:11px 17px!important; background:#e2eadf; color:var(--ink); text-align:left; }
.catalog-map-frame { margin-bottom:16px; }
.chat-thread { display:grid; gap:8px; max-height:360px; overflow:auto; padding:4px 0; }
.chat-message { max-width:84%; padding:10px 12px; border:1px solid var(--line); background:#fffdf8; }
.chat-message.mine { margin-left:auto; background:#e2eadf; border-color:#9caf9c; }
.chat-message b,.chat-message small { display:block; font-size:10px; color:#526354; }
.chat-message p { margin:5px 0; font-size:12px; line-height:1.5; }
.chat-form { margin-top:15px; }
.chat-compose-tools { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.chat-attachment-label { display:inline-flex!important; width:max-content; cursor:pointer; border:1px solid var(--line); background:#fffdf8; padding:9px 11px; font-size:11px!important; }
.chat-attachment-label input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.chat-file-name { font-size:10px; color:#637066; overflow-wrap:anywhere; }
.chat-stickers { display:flex; gap:6px; flex-wrap:wrap; }
.chat-sticker { width:34px; height:34px; border:1px solid var(--line); background:#fffdf8; font-size:18px; cursor:pointer; }
.chat-sticker:hover { background:#e2eadf; border-color:#789879; }
.chat-image-link { display:grid; gap:6px; margin-top:8px; color:inherit; text-decoration:none; font-size:10px; }
.chat-image { display:block; width:min(260px,100%); max-height:220px; object-fit:cover; border:1px solid var(--line); }
.chat-file { display:grid; grid-template-columns:auto 1fr; gap:5px 8px; align-items:center; margin-top:8px; border:1px solid var(--line); padding:8px 10px; color:var(--ink); text-decoration:none; font-size:11px; }
.chat-file small { grid-column:2; color:#637066; font-size:9px; }
.modal.account-modal { width:min(860px,100%); height:min(820px,calc(100vh - 32px)); }
.modal.account-modal #dashboardContent { display:grid; gap:18px; }
.dashboard-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.dashboard-head .mode-switch { width:auto; margin:0; padding:9px 12px; font-size:10px; }
.account-grid { grid-template-columns:minmax(0,1.45fr) minmax(260px,.85fr); align-items:start; }
.account-grid.account-single { grid-template-columns:minmax(0,1fr); }
.account-block { background:#f8f5ee; border:1px solid var(--line); padding:18px; }
.account-block .admin-heading { margin-top:0; }
.account-side { display:grid; gap:24px; }
.account-side .booking { margin-bottom:8px; }
.account-calendar { border-top:1px solid var(--line); padding-top:18px; }
.account-tabs { overflow-x:auto; white-space:nowrap; }
.admin-mode-head { display:flex; align-items:start; justify-content:space-between; gap:18px; padding:18px; margin:-4px -4px 22px; background:var(--ink); color:#f5f1e9; }
.admin-mode-head .eyebrow { color:#c8d5c4; margin-bottom:8px; }
.admin-mode-head h3 { margin:0 0 6px; font:600 26px 'Playfair Display'; }
.admin-mode-head p:not(.eyebrow) { max-width:440px; margin:0; font-size:11px; line-height:1.55; color:#dce4d7; }
.admin-mode-head .button { min-width:190px; background:transparent; color:#f5f1e9; border-color:#dce4d7; }
.modal.admin-modal { width:min(1120px,calc(100vw - 28px)); height:min(880px,calc(100vh - 24px)); background:#eef1e9; }
.admin-app-shell { display:grid; gap:22px; }
.admin-app-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:22px; background:var(--ink); color:#f5f1e9; }
.admin-app-header .eyebrow { margin:0 0 7px; color:#c8d5c4; }
.admin-app-header h2 { margin:0 0 7px; font:600 29px 'Playfair Display'; }
.admin-app-header p:not(.eyebrow) { max-width:510px; margin:0; color:#dce4d7; font-size:12px; line-height:1.55; }
.admin-shell-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.admin-shell-actions .button { width:auto; margin:0; background:transparent; color:#f5f1e9; border-color:#dce4d7; }
.admin-shell-actions .logout { color:#f5f1e9; border-color:rgba(245,241,233,.5); }
.admin-app-content { display:grid; gap:22px; }

@media (max-width: 760px) {
  .modal { height: calc(100vh - 24px); }
  .template-picker-head { display:grid; align-items:stretch; }
  .template-fields { grid-template-columns:1fr; }
  .header-actions { gap:8px; }
  .route-plan article { grid-template-columns:30px 1fr; }
  .template-source-preview dl div { grid-template-columns:1fr; gap:2px; }
  .account-grid { grid-template-columns:1fr; }
  .dashboard-head, .dashboard-actions { align-items:flex-start; }
  .dashboard-actions { display:grid; justify-content:stretch; }
  .admin-app-header { display:grid; }
  .admin-shell-actions { justify-content:stretch; }
  .admin-mode-head { display:grid; }
}
