:root {
  color-scheme: light;
  --forest: #214638;
  --forest-deep: #17382d;
  --clay: #835333;
  --cream: #f6f3eb;
  --paper: #fffefa;
  --ink: #202923;
  --muted: #66716a;
  --line: #dedfd5;
  --soft-green: #edf1e9;
  --danger: #913f31;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body { min-width: 0; margin: 0; color: var(--ink); background: var(--cream); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
:lang(ka) { letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--forest-deep); font-family: inherit; font-weight: 680; letter-spacing: -.02em; line-height: 1.25; }
h1 { margin-bottom: 10px; font-size: 30px; }
h2 { margin-bottom: 8px; font-size: 22px; }
h3 { margin-bottom: 6px; font-size: 18px; }
:lang(ka) h1, :lang(ka) h2, :lang(ka) h3 { letter-spacing: 0; line-height: 1.3; }
.eyebrow { margin: 0 0 7px; color: var(--clay); font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
:lang(ka) .eyebrow { letter-spacing: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; top: 10px; left: 10px; transform: translateY(-160%); padding: 10px 14px; border-radius: 7px; color: white; background: var(--forest-deep); }
.skip-link:focus { transform: translateY(0); }

.admin-body { min-height: 100vh; }
/* Sign-in, OAuth consent and signed-out pages keep a simple top bar: the logo
   and, on consent, the session actions, with no page navigation. */
.admin-header { position: sticky; z-index: 10; top: 0; display: flex; min-height: 72px; align-items: center; gap: 20px; padding: 0 clamp(20px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgb(255 254 250 / 97%); backdrop-filter: blur(12px); }
.admin-header .admin-tools { display: flex; min-width: 0; flex: 0 1 auto; align-items: center; gap: 9px; margin-left: auto; }
.admin-header .admin-tools form { margin: 0; }
.admin-header .admin-user { max-width: 140px; }
/* The main-app logo (templates/shared/logo.gohtml) in the main-app colors.
   Its sizing and the symbol's upward offset repeat public.css; see "Header
   logo" in README.md before changing either. The label sits under the logo. */
.admin-brand { --logo-h: 24px; --logo-main: #1a5238; --logo-accent: #c8682c; display: inline-flex; min-height: 44px; flex: 0 0 auto; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; color: var(--forest-deep); text-decoration: none; }
.admin-logo { display: inline-flex; flex: none; align-items: center; gap: calc(var(--logo-h) * .18); }
.logo-symbol { width: calc(var(--logo-h) * 1.125); height: var(--logo-h); transform: translateY(calc(var(--logo-h) * -.1476)); }
.logo-wordmark { width: calc(var(--logo-h) * 3.2283); height: var(--logo-h); }
.logo-main { fill: var(--logo-main); }
.logo-accent { fill: var(--logo-accent); }
.logo-stroke { stroke: var(--logo-main); }
.admin-brand-label { color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.25; white-space: nowrap; }
.admin-user { overflow: hidden; color: #46554b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.public-shortcut { display: inline-flex; min-height: 44px; align-items: center; color: var(--forest); font-size: 13px; font-weight: 680; text-decoration: none; white-space: nowrap; }
.public-shortcut:hover, .text-link:hover, .table-link:hover { text-decoration: underline; }

/* Signed-in pages list the admin pages in a left sidebar that stays in view
   while long pages scroll, and scrolls on its own if the list outgrows the
   window. Below 768px the sidebar becomes a slim bar whose Menu button opens
   the same links as an off-canvas drawer. The drawer is a popover, so the
   button, Escape, outside clicks and focus return work without JavaScript;
   admin.ts adds focus placement. Browsers without popover support list the
   links in the page flow instead. */
.admin-body-sidebar { --sidebar-w: 236px; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }
.admin-sidebar { position: sticky; z-index: 10; top: 0; display: flex; min-width: 0; height: 100vh; height: 100dvh; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); background: var(--paper); scrollbar-width: thin; }
.admin-bar { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 18px 22px 16px; }
.admin-menu-button, .admin-drawer-close { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px 8px 10px; border: 1px solid #cdd6cc; border-radius: 8px; color: var(--forest-deep); background: white; cursor: pointer; font-size: 14px; font-weight: 660; line-height: 1.25; -webkit-tap-highlight-color: transparent; }
.admin-drawer-close { padding: 0; }
.admin-menu-button:hover, .admin-drawer-close:hover { border-color: #9caf9d; background: #f5f8f2; }
.admin-menu-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.admin-menu-button, .admin-drawer-head { display: none; }
.admin-drawer { position: static; inset: auto; display: flex; width: auto; height: auto; min-height: 0; max-width: none; max-height: none; flex: 1 0 auto; flex-direction: column; gap: 18px; padding: 2px 12px 16px; margin: 0; overflow: visible; border: 0; color: inherit; background: transparent; }
.admin-nav ul { display: grid; gap: 2px; padding: 0; margin: 0; list-style: none; }
.admin-nav a { display: flex; min-height: 44px; align-items: center; padding: 9px 12px; border-radius: 8px; color: #46554b; font-size: 14px; font-weight: 620; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.admin-nav a:hover { color: var(--forest-deep); background: var(--soft-green); }
.admin-nav a[aria-current="page"] { color: var(--forest-deep); background: var(--soft-green); box-shadow: inset 3px 0 var(--forest); font-weight: 700; }
.admin-sidebar .admin-tools { display: grid; min-width: 0; gap: 4px; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--line); }
.admin-sidebar .public-shortcut { padding: 0 12px; border-radius: 8px; }
.admin-sidebar .public-shortcut:hover { background: var(--soft-green); }
.admin-session { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding-left: 12px; }
.admin-session .admin-user { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; white-space: normal; }
.admin-session form { flex: none; margin: 0; }
@media (forced-colors: active) {
  .admin-nav a[aria-current="page"] { outline: 2px solid CanvasText; outline-offset: -2px; }
}

/* Page content follows the width of its own column, so these rules respond
   to the main column (@container admin-main) rather than to the window. */
.admin-main { width: min(1270px, calc(100% - 64px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: 40px 0 80px; container: admin-main / inline-size; }
.admin-body-sidebar .admin-main { min-height: 100vh; }
.admin-main > * { min-width: 0; }
.admin-flash, .admin-error { padding: 15px 17px; margin: 0 0 20px; border: 1px solid #c8d8c8; border-radius: 9px; color: var(--forest-deep); background: #eff5ed; }
.admin-flash { font-size: 14px; }
.admin-error { border-color: #dfc3b9; color: #762f26; background: #fff4ef; }
.admin-error h2 { margin: 0 0 6px; color: inherit; font-size: 18px; }
.admin-error p { margin: 0 0 8px; }
.admin-error p:last-child { margin-bottom: 0; }
.admin-error a { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: .16em; }
.admin-error ul { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-left: 20px; margin: 8px 0 0; }
.admin-page-heading { display: flex; min-width: 0; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 22px; margin-bottom: 25px; }
/* The title keeps at least 18rem beside the actions; when the column is
   narrower (for example beside the sidebar on a tablet) the actions wrap below. */
.admin-page-heading > div { min-width: 0; flex: 1 1 18rem; }
.admin-page-heading h1 { max-width: 100%; margin-bottom: 8px; overflow-wrap: anywhere; }
.admin-page-heading p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.admin-page-heading .button { flex: 0 0 auto; }
.editor-heading { align-items: flex-start; }
.editor-heading > div { min-width: 0; }
.editor-heading p, .editor-heading code { min-width: 0; overflow-wrap: anywhere; }
.preview-note { margin-top: 9px !important; }

.button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 660; line-height: 1.25; text-align: center; text-decoration: none; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.button:hover { text-decoration: none; }
.button-primary { color: white; background: var(--forest); }
.button-primary:hover { background: var(--forest-deep); }
.button-secondary { border-color: #cdd6cc; color: var(--forest-deep); background: white; }
.button-secondary:hover { border-color: #9caf9d; background: #f5f8f2; }
.button-quiet { border-color: var(--line); color: #46554b; background: transparent; }
.button-quiet:hover { border-color: #b9c4ba; background: #f9faf6; }
.button-danger { border-color: #dfc3b9; color: #762f26; background: #fff6f2; }
.button-danger:hover { background: #f8e9e3; }
.button-small { min-height: 44px; padding: 8px 12px; font-size: 13px; }
.full-width { width: 100%; }

.admin-section { min-width: 0; padding: 24px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.admin-section > .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-size: 22px; }
.section-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.text-link { color: var(--forest); font-size: 13px; font-weight: 680; text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.stat-card { display: grid; min-width: 0; min-height: 130px; align-content: space-between; gap: 9px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.stat-card > span { color: var(--muted); font-size: 13px; font-weight: 620; line-height: 1.35; }
.stat-card strong { color: var(--forest-deep); font-size: 34px; font-variant-numeric: tabular-nums; font-weight: 650; line-height: 1; }
.stat-card a { display: inline-flex; min-height: 36px; align-items: center; color: var(--forest); font-size: 13px; font-weight: 660; text-decoration: none; }
.stat-card a:hover { text-decoration: underline; }

.admin-table-wrap { width: 100%; min-width: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: #4c5a50; font-size: 13px; font-weight: 700; text-align: left; }
.admin-table td { padding: 13px 12px; border-bottom: 1px solid #ebece5; color: #36443a; font-size: 14px; vertical-align: middle; overflow-wrap: break-word; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td strong { display: block; color: var(--ink); font-size: 14px; font-weight: 680; line-height: 1.4; }
.admin-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.mobile-record-meta { display: none !important; }
.admin-table code, code { color: #465b4d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.table-title { min-width: 150px; }
.table-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--forest); font-size: 14px; font-weight: 680; text-decoration: none; white-space: nowrap; }
.status { display: inline-flex; width: max-content; max-width: 100%; min-height: 27px; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.status::before { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; }
.status-live { color: #285a3d; background: #e8f2e8; }
.status-draft { color: #4d5a50; background: #eeefe9; }
.language-pill { display: inline-block; width: fit-content; max-width: 100%; justify-self: start; padding: 4px 8px; margin: 2px 3px 2px 0; border-radius: 6px; color: #28513b; background: var(--soft-green); font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.table-languages { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 5px; color: var(--muted); font-size: 13px; }

.admin-empty { display: grid; min-height: 150px; align-content: center; justify-items: center; gap: 8px; padding: 22px; text-align: center; }
.admin-empty h2 { margin: 0; font-size: 21px; }
.admin-empty p { max-width: 460px; margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.empty-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--forest); background: var(--soft-green); font-size: 22px; }
.empty-mark svg { display: block; width: 22px; height: 22px; }
.admin-not-found { min-height: 44vh; }
.admin-breadcrumbs { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 17px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.admin-breadcrumbs > * { min-width: 0; overflow-wrap: anywhere; }
.admin-breadcrumbs a { color: var(--forest); text-decoration: none; }

.admin-form { display: grid; gap: 16px; }
.narrow-form { max-width: 760px; }
.settings-form { max-width: 900px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 20px; }
.form-main { min-width: 0; }
.form-main > .image-section { margin-top: 16px; }
.form-main > .form-actions { padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--line); }
.form-section { min-width: 0; padding: 22px; margin: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.form-section-heading { display: flex; min-width: 0; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.form-section-heading > .status { align-self: flex-start; }
#region-details > .form-section-heading { margin-top: 20px; }
.form-section-heading h2 { margin: 0 0 5px; font-size: 22px; }
.form-section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.provisional-note, .date-note, .image-main-help { padding: 11px 13px; margin: 0 0 15px; border-left: 3px solid #9c704a; border-radius: 0 6px 6px 0; color: #4d5147; background: #f8f4eb; font-size: 13px; line-height: 1.5; }
.date-note { margin: 10px 0 0 !important; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; min-width: 0; gap: 7px; color: #34443a; font-size: 13px; font-weight: 650; line-height: 1.4; }
.field > span, .field > label { line-height: 1.4; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 11px; border: 1px solid #cfd5cd; border-radius: 8px; color: var(--ink); background: white; font-size: 16px; font-weight: 450; line-height: 1.45; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--forest); }
.field input:disabled, .field select:disabled, .field textarea:disabled { color: #66716a; background: #f1f2ee; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field small { color: var(--muted); font-size: 13px; font-weight: 450; line-height: 1.5; }
.field-error-help { color: var(--danger) !important; }
.settings-inquiry-help { max-width: 760px; margin: 15px 0 0; color: #4d5a50; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.settings-inquiry-help a { color: var(--forest-deep); font-weight: 650; overflow-wrap: anywhere; }
.empty-guidance { padding: 12px 14px; margin: 0 0 14px; border-radius: 8px; color: #4d5a50; background: var(--soft-green); font-size: 14px; }
.toggle-field { display: flex; min-width: 0; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: #33453a; background: #fafbf7; }
.toggle-field > span { display: grid; gap: 2px; font-size: 13px; }
.toggle-field strong { font-size: 13px; }
.toggle-field small { color: var(--muted); font-size: 13px; font-weight: 450; }
/* Checkboxes: a soft rounded square drawn on the native input, so forms,
   keyboard use and the dirty-state guards keep the built-in behavior. The
   state rules only set the --cb-* colors; :where() keeps them at equal
   specificity so the later state wins. */
:where(input[type="checkbox"]) { --cb-border: #7a857d; --cb-fill: white; --cb-mark: white; }
@media (hover: hover) {
  :where(label:hover input[type="checkbox"], input[type="checkbox"]:hover) { --cb-border: var(--forest); --cb-fill: var(--soft-green); }
}
:where(input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate) { --cb-border: var(--forest); --cb-fill: var(--forest); }
@media (hover: hover) {
  :where(label:hover input[type="checkbox"]:is(:checked, :indeterminate), input[type="checkbox"]:is(:checked, :indeterminate):hover) { --cb-border: var(--forest-deep); --cb-fill: var(--forest-deep); }
}
:where(input[type="checkbox"][aria-invalid="true"]) { --cb-border: var(--danger); }
:where(input[type="checkbox"][aria-invalid="true"]:is(:checked, :indeterminate)) { --cb-fill: var(--danger); }
:where(input[type="checkbox"]:disabled) { --cb-border: #c5cbc3; --cb-fill: #f1f2ee; --cb-mark: var(--muted); }
input[type="checkbox"] { -webkit-appearance: none; appearance: none; display: inline-grid; width: 20px; height: 20px; flex: 0 0 auto; place-content: center; margin: 0; border: 2px solid var(--cb-border); border-radius: 6px; background: var(--cb-fill); vertical-align: middle; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; background: var(--cb-mark); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); }
input[type="checkbox"]:indeterminate::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h12' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h12' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
input[type="checkbox"]:is(:checked, :indeterminate)::before { transform: scale(1); }
input[type="checkbox"]:disabled { cursor: not-allowed; }
@media (forced-colors: active) {
  input[type="checkbox"] { forced-color-adjust: none; border-color: CanvasText; background: Canvas; }
  input[type="checkbox"]:is(:checked, :indeterminate) { border-color: Highlight; background: Highlight; }
  input[type="checkbox"]::before { background: HighlightText; }
  input[type="checkbox"]:disabled { border-color: GrayText; }
  input[type="checkbox"]:disabled:is(:checked, :indeterminate) { background: GrayText; }
  input[type="checkbox"]:disabled::before { background: Canvas; }
  input[type="checkbox"]:focus-visible { outline-color: Highlight; }
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 3px 0; }
.narrow-form#region-form > .form-actions { padding-top: 17px; margin-top: 4px; border-top: 1px solid var(--line); }
.narrow-form#region-form > .form-actions button[form="delete-region"] { margin-left: auto; }
.form-aside { position: relative; align-self: stretch; }
.sticky-card { position: sticky; top: 68px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f1f3ed; }
.sticky-card h2 { margin-bottom: 8px; font-size: 21px; }
.sticky-card p { margin-bottom: 10px; color: #4d5a50; font-size: 13px; }
.sticky-card small { color: var(--muted); font-size: 13px; }
.check-list { display: grid; gap: 9px; padding: 0; margin: 15px 0; color: #46564b; font-size: 13px; list-style: none; }
.check-list li::before { margin-right: 8px; font-weight: 800; }
.check-list li.requirement-ready::before { color: #285a3d; content: "✓"; }
.check-list li.requirement-missing::before { color: var(--danger); content: "!"; }

.translation-stack { display: grid; gap: 9px; }
.translation-disclosure { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.translation-disclosure > summary, .content-editor > summary, .ui-text-editor > summary, .amenity-card > summary, .inline-edit > summary { display: flex; min-width: 0; min-height: 48px; align-items: center; gap: 8px; padding: 10px 13px; cursor: pointer; list-style: none; }
.translation-disclosure > summary::-webkit-details-marker, .content-editor > summary::-webkit-details-marker, .ui-text-editor > summary::-webkit-details-marker, .amenity-card > summary::-webkit-details-marker, .inline-edit > summary::-webkit-details-marker, .add-language > summary::-webkit-details-marker { display: none; }
.translation-disclosure > summary::after, .content-editor > summary::after, .ui-text-editor > summary::after, .amenity-card > summary::after, .inline-edit > summary::after, .add-language > summary::after { width: 8px; height: 8px; flex: 0 0 auto; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--muted); content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.translation-disclosure[open] > summary::after, .content-editor[open] > summary::after, .ui-text-editor[open] > summary::after, .amenity-card[open] > summary::after, .inline-edit[open] > summary::after, .add-language[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.translation-disclosure[open] > summary { background: #fbfcf8; }
.translation-disclosure > summary strong { color: var(--forest-deep); font-size: 14px; font-weight: 680; overflow-wrap: anywhere; }
.language-code { display: inline-grid; min-width: 30px; height: 23px; place-items: center; padding: 0 6px; margin-right: 1px; border-radius: 5px; color: var(--forest-deep); background: var(--soft-green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.disabled-label { color: var(--muted); font-size: 13px; font-weight: 450; }
.translation-card { display: grid; min-width: 0; gap: 14px; padding: 15px; margin: 0; border: 0; border-top: 1px solid #ebede6; background: white; }
.translation-card legend { padding: 0 6px; color: var(--muted); font-size: 12px; }

.editor-list { display: grid; gap: 11px; margin-bottom: 13px; }
.compact-list { gap: 10px; }
.editor-card { display: grid; min-width: 0; gap: 13px; padding: 16px; margin: 0; border: 1px solid #dfe4db; border-radius: 9px; background: #f8f9f5; }
.editor-card legend { padding: 0 6px; color: var(--forest-deep); font-size: 13px; font-weight: 700; }
.editor-card-top { display: flex; min-width: 0; align-items: flex-end; gap: 12px; }
.editor-card-top .field { min-width: 0; flex: 1 1 220px; }
.nested-list { display: grid; gap: 8px; }
.bed-row, .date-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(76px, 88px) 44px; align-items: end; gap: 9px; padding: 10px 0; border-bottom: 1px solid #e5e8e0; }
.date-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
.bed-row:last-child, .date-row:last-child { border-bottom: 0; }
.quantity-field { max-width: 110px; }
.icon-button { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid #d9bdb3; border-radius: 8px; color: #762f26; background: #fff6f2; cursor: pointer; font-size: 22px; line-height: 1; }
.icon-button:hover { background: #f8e9e3; }

.amenity-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
/* Amenity presence in the cottage editor: each amenity is a fieldset of three
   native radios drawn as icon buttons (check, crossed circle, cross), so one
   click sets it. The legend floats so it lays out as a flex item beside the
   buttons instead of sitting on the fieldset border. The checked button is
   filled and the others outlined, so the choice does not rest on color. */
.amenity-admin-row { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; padding: 5px 0; margin: 0; border: 0; border-bottom: 1px solid #e5e8e0; }
.amenity-admin-row > legend { float: left; min-width: 0; flex: 1 1 8em; padding: 0; color: #34443a; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.amenity-admin-row[aria-invalid="true"] { padding-inline: 10px 5px; border-radius: 8px; background: #fff6f2; box-shadow: inset 0 0 0 2px var(--danger); }
.amenity-admin-row[aria-invalid="true"] > legend { color: #762f26; font-weight: 650; }
.amenity-state-present { --state: #2b6a3e; --state-tint: #e9f2eb; }
.amenity-state-unspecified { --state: #69736c; --state-tint: #eff1ee; }
.amenity-state-absent { --state: #a3392b; --state-tint: #fbece8; }
.amenity-state { display: flex; flex: none; gap: 4px; }
.amenity-state-option { position: relative; display: block; width: 44px; height: 44px; cursor: pointer; }
.amenity-state-option > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.amenity-state-face { display: grid; width: 100%; height: 100%; place-items: center; border: 1.5px solid #d3d9d1; border-radius: 9px; color: var(--state); background: white; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.amenity-state-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .amenity-state-option:hover > .amenity-state-face { border-color: var(--state); background: var(--state-tint); }
}
.amenity-state-option > input:checked + .amenity-state-face { border-color: var(--state); color: white; background: var(--state); box-shadow: 0 1px 2px rgb(23 56 45 / 18%); }
.amenity-state-option > input:checked + .amenity-state-face .amenity-state-icon { stroke-width: 2.8; }
.amenity-state-option > input:focus-visible + .amenity-state-face { outline: 3px solid var(--forest); outline-offset: 2px; }
.amenity-state-key { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; margin: 0 0 14px; color: #46554b; font-size: 13px; font-weight: 600; line-height: 1.4; list-style: none; }
.amenity-state-key li { display: inline-flex; align-items: center; gap: 6px; }
.amenity-state-key .amenity-state-icon { width: 18px; height: 18px; color: var(--state); }
@media (forced-colors: active) {
  .amenity-state-face { border-color: ButtonText; color: ButtonText; }
  .amenity-state-option > input:checked + .amenity-state-face { forced-color-adjust: none; border-color: Highlight; color: HighlightText; background: Highlight; }
  .amenity-state-option > input:focus-visible + .amenity-state-face { outline-color: Highlight; }
  .amenity-state-key .amenity-state-icon { color: CanvasText; }
}

.image-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr)); gap: 14px; margin-bottom: 16px; }
.image-admin-card { display: grid; min-width: 0; align-content: start; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.image-preview { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #e8ede4; }
.image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main-image-badge { position: absolute; top: 10px; left: 10px; z-index: 1; width: max-content; max-width: calc(100% - 20px); min-height: 30px; padding: 6px 10px; font-size: 12px; box-shadow: 0 1px 4px rgb(0 0 0 / 20%); }
.image-meta-form { display: grid; min-width: 0; gap: 11px; padding: 14px; }
.image-meta-form .toggle-field { min-height: 44px; }
.image-main-help { margin: 0; }
.delete-row { padding: 0 14px 14px; }
.upload-form { display: flex; min-width: 0; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 15px; border: 1px dashed #cbd4c9; border-radius: 8px; background: #f8faf6; }
.upload-form .field { flex: 1 1 230px; }
.upload-form > small { flex: 1 1 100%; color: var(--muted); font-size: 13px; line-height: 1.5; }
.region-cover { display: grid; gap: 14px; }
.region-cover-preview { max-width: 480px; margin: 0; overflow: hidden; border-radius: 8px; background: #eef1ec; }
.region-cover-preview img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-preview { max-width: 480px; margin: 0; overflow: hidden; border-radius: 8px; }
.hero-preview img { width: 100%; height: auto; }
.region-cover > form:not(.upload-form) { justify-self: start; }
.save-first-note { padding: 14px; border: 1px dashed #cbd4c9; border-radius: 8px; color: #4d5a50; background: #f8faf6; font-size: 14px; }

.list-filter { display: flex; min-width: 0; flex-wrap: wrap; align-items: flex-end; gap: 11px; padding: 14px; margin: 0 0 11px; border: 1px solid #e6e7de; border-radius: 9px; background: #f8f8f3; }
.list-filter .field { flex: 1 1 220px; }
.filter-count { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.filter-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.phrase-search .field { flex-basis: 300px; }

.admin-tabs { position: sticky; z-index: 3; top: 0; display: flex; min-height: 56px; gap: 5px; overflow-x: auto; padding: 6px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 9px; background: rgb(255 254 250 / 97%); }
.admin-tabs a { display: inline-flex; min-height: 44px; flex: 0 0 auto; align-items: center; padding: 8px 13px; border-radius: 6px; color: #46554b; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.admin-tabs a:hover, .admin-tabs a[aria-current="page"] { color: var(--forest-deep); background: var(--soft-green); }
.admin-tabs a[aria-current="page"] { box-shadow: inset 0 -2px var(--forest); }
.content-editor, .ui-text-editor, .amenity-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.content-editor + .content-editor, .ui-text-editor + .ui-text-editor { margin-top: 9px; }
.content-editor[open] > summary, .ui-text-editor[open] > summary, .amenity-card[open] > summary { background: #f8faf6; }
.content-editor > summary strong, .content-editor > summary small { display: block; }
.content-editor > summary strong { color: var(--forest-deep); font-size: 15px; }
.content-editor > summary small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.content-editor-body { display: grid; gap: 12px; padding: 0 15px 15px; }
.ui-text-list { display: grid; gap: 8px; }
.ui-text-editor > summary { min-height: 62px; gap: 14px; }
.ui-text-editor > summary > span:first-child { display: grid; min-width: 0; flex: 1 1 auto; align-content: center; overflow-wrap: anywhere; }
.ui-text-editor > summary code { color: #52634f; font-size: 12px; line-height: 1.45; }
.ui-text-editor > summary small { display: block; min-width: 0; margin-top: 4px; color: #36443a; font-size: 14px; font-weight: 450; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.ui-text-editor > summary > span:last-child { display: inline-flex; min-height: 44px; flex: 0 0 auto; align-items: center; padding: 0 3px; color: var(--forest); font-size: 13px; font-weight: 680; white-space: nowrap; }
.ui-text-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 0 14px 14px; }
.ui-text-fields button { grid-column: 1 / -1; justify-self: start; }
.ui-text-scope-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pagination > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .button { min-height: 44px; }

.amenity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.amenity-card > summary { min-height: 60px; justify-content: space-between; }
.amenity-card > summary > span:first-child { min-width: 0; flex: 1 1 180px; }
.amenity-card > summary strong, .amenity-card > summary code { display: block; overflow-wrap: anywhere; }
.amenity-card > summary strong { color: var(--forest-deep); font-size: 15px; }
.amenity-card > summary code { margin-top: 3px; }
.amenity-summary-meta { display: flex; min-height: 40px; flex: 0 0 auto; align-items: center; color: var(--muted); font-size: 13px; text-align: right; }
.amenity-summary-meta span[aria-hidden="true"] { display: none; }
.amenity-card > summary > .amenity-card-name { display: flex; align-items: center; gap: 11px; }
.amenity-card-name > span { min-width: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.picker-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--forest); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.picker-icon-empty { display: block; border: 1.5px dashed #c5cbc3; border-radius: 6px; }
.icon-picker { min-width: 0; border: 1px solid #cfd5cd; border-radius: 8px; background: white; }
.icon-picker > summary { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 450; list-style: none; }
.icon-picker > summary::-webkit-details-marker { display: none; }
.icon-picker > summary::after { width: 8px; height: 8px; flex: 0 0 auto; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--muted); content: ""; transform: rotate(45deg) translateY(-2px); }
.icon-picker[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.icon-picker > summary[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--danger); }
.icon-picker-current { display: inline-flex; min-width: 0; align-items: center; gap: 9px; }
.icon-picker-current code { color: #52634f; font-size: 13px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; max-height: 252px; padding: 8px; margin: 0; overflow-y: auto; border: 0; border-top: 1px solid var(--line); }
.icon-option { position: relative; display: grid; min-height: 44px; place-items: center; border: 1px solid transparent; border-radius: 8px; color: #34443a; cursor: pointer; }
.icon-option:hover { background: var(--soft-green); }
.icon-grid .icon-option input { position: absolute; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; inset: 0; border: 0; opacity: 0; cursor: pointer; }
.icon-option:has(input:checked) { border-color: var(--forest); background: var(--soft-green); box-shadow: inset 0 0 0 1px var(--forest); }
.icon-option:has(input:focus-visible) { outline: 3px solid var(--forest); outline-offset: 1px; }
.icon-option .picker-icon { color: currentColor; }
.icon-option-none { grid-column: span 3; padding: 0 8px; font-size: 13px; font-weight: 600; text-align: center; }

/* Select menus: the option list that stands in for a native <select>, shared
   with the public search bar (web/templates/shared/select.gohtml). The closed
   summary looks like a text field and the list opens below it. */
.select-menu { position: relative; min-width: 0; }
.select-menu > summary { display: flex; min-width: 0; min-height: 44px; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #cfd5cd; border-radius: 8px; color: var(--ink); background: white; cursor: pointer; font-size: 16px; font-weight: 450; line-height: 1.45; list-style: none; }
.select-menu > summary::-webkit-details-marker { display: none; }
.select-menu > summary::after { width: 8px; height: 8px; flex: 0 0 auto; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--muted); content: ""; transform: rotate(45deg) translateY(-2px); }
.select-menu[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.select-menu > summary:hover { border-color: #aab4a9; }
.select-menu > summary:focus-visible, .select-menu[open] > summary { border-color: var(--forest); }
.select-menu > summary[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.select-value { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-menu:not(:has(.select-option > input:checked)) .select-value { color: var(--muted); }
.select-panel { position: absolute; z-index: 2; top: calc(100% + 4px); right: 0; left: 0; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 12px 28px rgb(23 56 45 / 16%), 0 2px 6px rgb(23 56 45 / 8%); scroll-margin-bottom: 16px; }
.select-options { display: grid; min-width: 0; max-height: min(320px, 50vh); gap: 2px; padding: 0; margin: 0; overflow-y: auto; border: 0; overscroll-behavior: contain; }
.select-menu .select-options[aria-invalid="true"] { border: 0; box-shadow: none; }
.select-option { position: relative; display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 6px; color: var(--ink); cursor: pointer; font-size: 15px; font-weight: 450; line-height: 1.4; }
.select-option:hover { background: #f4f6f1; }
.select-menu .select-option > input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none; }
.select-option > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.select-option > .icon { width: 20px; height: 20px; flex: none; color: var(--forest); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.select-option > input:checked + span { color: var(--forest-deep); font-weight: 650; }
.select-option > input:checked ~ .icon { visibility: visible; }
.select-option:has(> input:checked) { background: var(--soft-green); }
.select-option:has(> input:focus-visible) { outline: 3px solid var(--forest); outline-offset: -3px; }
.amenity-card-body { display: grid; gap: 12px; padding: 0 15px 15px; }
.amenity-card-body .admin-form { gap: 12px; }
.amenity-card-body .translation-card { padding: 13px; }
.amenity-card-body .inline-action { padding-top: 12px; border-top: 1px solid #e9e9e2; }
.add-language { margin-top: 14px; }
.add-language > summary { display: inline-flex; list-style: none; }
.add-language > summary::-webkit-details-marker { display: none; }
.inline-edit { min-width: 0; }
.inline-edit > summary { width: max-content; min-width: 44px; min-height: 44px; color: var(--forest); font-size: 14px; font-weight: 680; }
.inline-form { display: grid; min-width: 240px; gap: 10px; padding: 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf7; }
.inline-add-form { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; max-width: 760px; padding: 15px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.inline-add-form button { grid-column: 1 / -1; justify-self: start; }

.connection-list { display: grid; gap: 10px; }
.connection-card { display: flex; min-width: 0; align-items: flex-start; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.connection-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--forest); background: var(--soft-green); font-size: 20px; }
.connection-copy { min-width: 0; flex: 1 1 auto; }
.connection-copy h2, .connection-copy h3 { margin: 0 0 5px; color: var(--forest-deep); font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: 0; overflow-wrap: anywhere; }
.connection-copy p { margin: 0 0 5px; color: #46554b; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.connection-copy small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.connection-action { flex: 0 0 auto; margin: 0; }
.inline-action { margin: 0; }
.connection-list-revoked .connection-card { background: #f8f8f4; }
.connection-list-revoked .status { align-self: flex-start; }

.login-shell, .consent-shell { width: min(460px, calc(100% - 32px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: 42px 0; }
.login-brand { margin: 0 0 22px; }
.login-card { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 10px 30px rgb(34 52 40 / 5%); }
.login-card h1 { font-size: 28px; overflow-wrap: anywhere; }
.consent-shell h1 { font-size: 30px; }
.login-card > p:not(.eyebrow):not(.admin-error), .consent-shell > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.stack-form { display: grid; gap: 15px; margin-top: 20px; }
.login-footnote { margin: 14px 0; color: var(--muted); font-size: 13px; text-align: center; }
/* Password fields carry an eye button (templates/admin/partials/
   password-toggle.gohtml) over the input's right edge. It is hidden until
   admin.ts runs; while it shows, the input keeps typed text clear of it and
   Edge's own reveal button is left out so only one eye appears. */
.password-control { position: relative; min-width: 0; }
.password-control:has(> .password-toggle:not([hidden])) > input { padding-right: 52px; }
.password-control:has(> .password-toggle:not([hidden])) > input::-ms-reveal { display: none; }
.password-toggle { position: absolute; top: 0; right: 0; bottom: 0; display: grid; width: 46px; min-height: 44px; place-items: center; padding: 0; margin: 0; border: 1px solid transparent; border-radius: 0 8px 8px 0; color: #46554b; background: transparent; background-clip: padding-box; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.password-toggle[hidden], .password-icon[hidden] { display: none; }
.password-toggle:hover { color: var(--forest-deep); background-color: var(--soft-green); }
.password-toggle:focus-visible { color: var(--forest-deep); outline-offset: -4px; }
.password-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (forced-colors: active) {
  .password-toggle { color: ButtonText; }
  .password-toggle:hover { color: Highlight; }
  .password-toggle:focus-visible { outline-color: Highlight; }
}

.consent-shell { width: min(550px, calc(100% - 32px)); padding-top: 44px; }
.consent-client { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 15px; margin: 18px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.client-mark { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--forest); background: var(--soft-green); font-size: 20px; }
.consent-client > div { min-width: 0; }
.consent-client strong, .consent-client small { display: block; overflow-wrap: anywhere; }
.consent-client strong { color: var(--forest-deep); font-size: 16px; }
.consent-client small { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.scope-card { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.scope-card h2 { margin-bottom: 8px; font-family: inherit; font-size: 18px; font-weight: 700; letter-spacing: 0; }
.scope-card p, .scope-card li { color: #46554b; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.scope-card ul { padding-left: 20px; margin-bottom: 0; }
.consent-warning { padding: 12px 14px; border-left: 3px solid #9c704a; border-radius: 0 6px 6px 0; color: #4d5147; background: #f8f4eb; font-size: 14px !important; line-height: 1.5; }
.consent-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }

.public-shortcut, .button, .admin-nav a, .admin-tabs a, .table-link, summary { -webkit-tap-highlight-color: transparent; }
.admin-section, .form-section, .translation-disclosure, .content-editor, .ui-text-editor, .amenity-card, .stat-card, .connection-card { scroll-margin-block: 16px; }
#main-content, .admin-section, .form-section, details[id], .admin-main input[id], .admin-main select[id], .admin-main textarea[id], .admin-main .ql-editor[id], .admin-main summary[id] { scroll-margin-top: 86px; }
.admin-main input[id], .admin-main select[id], .admin-main textarea[id], .admin-main .ql-editor[id], .admin-main summary[id] { scroll-margin-top: 118px; }
.editor-action-bar { position: sticky; z-index: 4; top: 0; display: flex; min-width: 0; min-height: 56px; align-items: center; gap: 8px; padding: 5px; margin: 0 0 15px; border: 1px solid var(--line); border-radius: 9px; background: rgb(255 254 250 / 97%); }
.section-jump { display: flex; min-width: 0; min-height: 44px; flex: 1 1 auto; gap: 4px; overflow-x: auto; padding: 0; margin: 0; border: 0; background: transparent; scrollbar-width: thin; }
.section-jump a { display: inline-flex; min-height: 44px; flex: 0 0 auto; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--forest-deep); font-size: 13px; font-weight: 660; text-decoration: none; white-space: nowrap; }
.section-jump a:hover { background: var(--soft-green); }
.editor-save-button { flex: 0 0 auto; white-space: nowrap; }

/* Shell: sidebar widths and the phone bar. */
@media (min-width: 768px) and (max-width: 1199px) {
  .admin-body-sidebar { --sidebar-w: 216px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .admin-body-sidebar .admin-main { width: calc(100% - 48px); }
}
@media (max-width: 767px) {
  .admin-main { width: calc(100% - 32px); padding-top: 26px; }
  .admin-header { position: relative; padding-inline: 16px; }
  .admin-header .admin-user { display: none; }
  .admin-body-sidebar { display: block; }
  .admin-sidebar { position: relative; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); background: rgb(255 254 250 / 97%); }
  .admin-bar { min-height: 60px; padding: 8px 16px; }
  .admin-body-sidebar .admin-main { min-height: calc(100vh - 61px); }
  .admin-drawer { padding: 0 16px 16px; }
}
@supports not selector(:popover-open) {
  @media (max-width: 767px) {
    .admin-nav ul { display: flex; flex-wrap: wrap; }
  }
}
@supports selector(:popover-open) {
  @media (max-width: 767px) {
    .admin-menu-button { display: inline-flex; }
    .admin-drawer:not(:popover-open) { display: none; }
    .admin-drawer { position: fixed; inset: 0 auto 0 0; width: min(320px, calc(100vw - 48px)); height: 100vh; height: 100dvh; padding: 0 12px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); color: var(--ink); background: var(--paper); box-shadow: 0 18px 48px rgb(23 56 45 / 22%); animation: admin-drawer-in .18s ease-out; }
    .admin-drawer::backdrop { background: rgb(23 56 45 / 38%); }
    .admin-drawer-head { position: sticky; z-index: 1; top: 0; display: flex; min-height: 60px; align-items: center; justify-content: flex-end; padding: 8px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); background: var(--paper); }
    .admin-sidebar .admin-tools { padding-bottom: 4px; }
  }
}
@keyframes admin-drawer-in { from { transform: translateX(-100%); } }
@media (max-width: 520px) {
  .admin-main { padding-top: 23px; }
  .admin-header { gap: 5px 10px; }
  .admin-header .admin-tools { gap: 7px; }
}

/* Content: these follow the main column's width. */
@container admin-main (max-width: 1269px) {
  .form-layout { grid-template-columns: minmax(0, 1fr) 230px; }
}
@container admin-main (max-width: 1036px) {
  .stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat-card { grid-column: span 2; }
  .stat-card:nth-child(n + 4) { grid-column: span 3; }
}
@container admin-main (max-width: 728px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .form-aside { grid-row: 1; }
  .sticky-card { position: static; }
  .admin-section { padding: 19px; }
  .form-section { padding: 18px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat-card, .stat-card:nth-child(n + 4) { min-height: 92px; grid-column: auto; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; padding: 12px 14px; }
  .stat-card > span { grid-column: 1; }
  .stat-card strong { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
  .stat-card a { grid-column: 1; min-height: 32px; }
  .admin-page-heading { align-items: flex-start; }
  .admin-page-heading > .button { flex: 0 1 auto; }
  .amenity-admin-grid, .amenity-list { grid-template-columns: 1fr; }
}
/* Tables become labeled records once the main column is too narrow for every
   column; the cottage list needs about 780px, so beside the sidebar this
   switch happens at tablet widths as well as on phones. */
@container admin-main (max-width: 800px) {
  .admin-table { border-collapse: separate; border-spacing: 0 9px; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .admin-table tbody, .admin-table tr { display: block; }
  .admin-table tr { padding: 5px 13px; border: 1px solid var(--line); border-radius: 9px; background: white; }
  .admin-table td { display: grid; grid-template-columns: minmax(100px, 38%) minmax(0, 1fr); align-items: start; gap: 9px; padding: 8px 0; border-bottom: 1px solid #ebece5; font-size: 14px; overflow-wrap: anywhere; }
  .admin-table td::before { content: attr(data-label); color: #4c5a50; font-size: 13px; font-weight: 680; line-height: 1.45; }
  .admin-table td:first-child { display: block; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
  .admin-table td:first-child::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
  .admin-table tr:has(.mobile-record-meta) td:first-child .mobile-record-meta { display: block !important; }
  .admin-table tr:has(.mobile-record-meta) td:nth-child(2) { display: none; }
  .admin-table td:last-child { border-bottom: 0; }
  .admin-table td strong { font-size: 15px; }
  .admin-table td small { font-size: 13px; }
  .table-title { min-width: 0; }
  .table-link { min-height: 44px; }
  .admin-table td:has(.inline-form) { display: block; }
  .inline-edit { display: block; }
  .inline-edit > summary { width: 100%; }
  .inline-form { min-width: 0; width: 100%; }
}
@container admin-main (max-width: 568px) {
  .inline-add-form { grid-template-columns: minmax(0, 1fr); }
  .inline-add-form button { grid-column: 1; }
  .amenity-list { grid-template-columns: 1fr; }
  .amenity-card > summary { flex-wrap: wrap; }
  .amenity-summary-meta { margin-left: auto; }
  .connection-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); }
  .connection-action, .connection-card > .status { grid-column: 2; }
  .connection-action { justify-self: start; }
  .connection-copy h3 { font-size: 17px; }
  .ui-text-fields { grid-template-columns: minmax(0, 1fr); }
  .ui-text-fields button, .ui-text-scope-note { grid-column: 1; }
  .admin-error ul { display: block; }
  .date-row { grid-template-columns: minmax(0, 1fr) 44px; align-items: end; }
  .date-row .field { grid-column: 1; }
  .date-row .icon-button { grid-column: 2; grid-row: 1 / span 2; }
  .bed-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .bed-row > .field:first-child { grid-column: 1 / -1; }
  .bed-row > .quantity-field { grid-column: 1; max-width: 120px; }
  .bed-row > .icon-button { grid-column: 2; }
  .editor-card-top { flex-wrap: wrap; align-items: flex-start; }
  .editor-card-top .field { flex: 1 1 100%; }
  .editor-card-top [data-remove-row] { margin-left: auto; }
  .image-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .upload-form .field { flex-basis: 100%; }
  .upload-form .button { width: 100%; }
  .login-card { padding: 23px; }
  .login-shell, .consent-shell { padding-top: 24px; }
  .consent-actions { flex-direction: column-reverse; }
  .consent-actions .button { width: 100%; }
}
@container admin-main (max-width: 488px) {
  h1 { font-size: 28px; line-height: 1.3; }
  h2 { font-size: 21px; }
  .consent-shell h1 { font-size: 28px; }
  .admin-page-heading { display: block; margin-bottom: 20px; }
  .admin-page-heading > .button { margin-top: 13px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat-card, .stat-card:nth-child(n + 4) { min-height: 92px; grid-column: auto; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; padding: 12px 14px; }
  .stat-card > span { grid-column: 1; }
  .stat-card strong { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
  .stat-card a { grid-column: 1; min-height: 32px; }
  .admin-section { padding: 16px; }
  .section-heading h2, .form-section-heading h2 { font-size: 21px; }
  .form-grid, .ui-text-fields { grid-template-columns: minmax(0, 1fr); }
  .list-filter { align-items: stretch; padding: 12px; }
  .list-filter .field { flex-basis: 100%; }
  .list-filter > .button, .list-filter > a.button { flex: 1 1 auto; }
  .admin-section > .section-heading { align-items: flex-start; }
  .admin-section > .section-heading > .text-link { flex: 0 0 auto; }
  .form-actions .button { flex: 0 1 auto; }
  .amenity-card > summary { padding-inline: 12px; }
  .amenity-card-body { padding-inline: 12px; }
  .ui-text-editor > summary { gap: 8px; padding-inline: 11px; }
  .ui-text-editor > summary > span:last-child { min-height: 44px; }
  .content-editor-body { padding-inline: 12px; }
  .inline-add-form { grid-template-columns: minmax(0, 1fr); }
  .inline-add-form button { grid-column: 1; }
  .editor-action-bar { gap: 5px; padding: 4px; }
  .section-jump a { padding-inline: 8px; font-size: 12px; }
  .editor-save-button { padding-inline: 10px; font-size: 13px; }
  .admin-error, .admin-flash { padding: 13px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.admin-catalog-nav { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; padding: 0 0 10px; margin: -9px 0 20px; border-bottom: 1px solid var(--line); }
.admin-catalog-nav a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; padding: 8px 12px; border-radius: 7px; color: #46554b; font-size: 13px; font-weight: 650; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.admin-catalog-nav a:hover, .admin-catalog-nav a[aria-current="page"] { color: var(--forest-deep); background: var(--soft-green); }
.admin-catalog-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--forest); }
.heading-action-group { display: flex; flex: 0 0 auto !important; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.catalog-list { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.catalog-card > summary { min-height: 60px; }
.catalog-card .catalog-form { gap: 12px; }
.catalog-card .translation-card { padding: 13px; }
.catalog-delete-form { padding-top: 12px; border-top: 1px solid #e9e9e2; }
.catalog-conflict-help { padding: 13px 14px; border: 1px solid #dfc3b9; border-radius: 8px; color: #652f28; background: #fff5f0; }
.catalog-conflict-help p { margin: 0 0 5px; font-size: 14px; line-height: 1.5; }
.catalog-conflict-help ul { display: grid; gap: 2px; padding-left: 19px; margin: 0; }
.catalog-conflict-help li { padding-left: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.catalog-conflict-help li > a { display: inline-flex; min-height: 44px; align-items: center; color: inherit; font-weight: 650; text-underline-offset: 3px; }
.catalog-conflict-help .status { margin: 3px 0; vertical-align: middle; }
.catalog-label-help { margin: 0; color: #762f26; font-size: 13px; line-height: 1.5; }
.amenity-admin-groups { display: grid; gap: 15px; }
.amenity-admin-group { min-width: 0; padding: 0; margin: 0; border: 0; }
.amenity-admin-group + .amenity-admin-group { padding-top: 13px; border-top: 1px solid var(--line); }
.amenity-admin-group > legend { padding: 0; margin-bottom: 8px; color: var(--forest-deep); font-size: 15px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.amenity-admin-group .amenity-admin-grid { padding-top: 0; }
.nearby-editor-section .form-section-heading { align-items: center; }
.nearby-admin-list { display: grid; min-width: 0; gap: 9px; }
.nearby-admin-row { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.nearby-admin-row > summary { display: flex; min-width: 0; min-height: 52px; align-items: center; gap: 8px; padding: 8px 13px; cursor: pointer; list-style: none; }
.nearby-admin-row > summary::-webkit-details-marker { display: none; }
.nearby-admin-row > summary::after { width: 8px; height: 8px; flex: 0 0 auto; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--muted); content: ""; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.nearby-admin-row[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.nearby-admin-summary-title { display: flex; min-width: 0; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.nearby-admin-summary-title strong { color: var(--forest-deep); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.nearby-unknown-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 7px; border-radius: 999px; color: #59625c; background: #eeefe9; font-size: 11px; font-weight: 680; line-height: 1.3; }
.nearby-admin-state { display: none; width: max-content; max-width: 100%; min-height: 27px; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: normal; }
.nearby-admin-state-included { color: #285a3d; background: #e8f2e8; }
.nearby-admin-state-not-included { color: #4d5a50; background: #eeefe9; }
@supports selector(details:has(input:checked)) {
  .nearby-admin-state { display: inline-flex; }
  .nearby-admin-row:has(.nearby-select:checked) > summary .nearby-admin-state-not-included,
  .nearby-admin-row:not(:has(.nearby-select:checked)) > summary .nearby-admin-state-included { display: none; }
}
.nearby-admin-row-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.nearby-include-label { display: flex; min-width: 0; min-height: 44px; align-items: center; gap: 10px; color: #34443a; font-size: 14px; font-weight: 650; line-height: 1.45; }
.nearby-selected-invalid { margin: -6px 0 0 30px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.nearby-distance-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nearby-distance-grid .field input { width: 100%; min-width: 0; }

@container admin-main (max-width: 568px) {
  .nearby-distance-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nearby-admin-row > summary { flex-wrap: wrap; padding-inline: 11px; }
  .nearby-admin-state { margin-left: auto; }
  .nearby-admin-row-body { padding-inline: 11px; }
  .nearby-editor-section .form-section-heading { align-items: flex-start; flex-direction: column; }
  .heading-action-group { align-items: stretch; justify-content: flex-start; }
}

/* Description editor (web/static/rich-text.ts). Quill's stylesheet is not
   loaded; these rules are the part of quill.core.css that the enabled formats
   need, plus the toolbar and link panel, so nothing is styled inline. */
.rich-text-controls { display: grid; min-width: 0; gap: 8px; }
.rich-text-toolbar { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.rich-text-group { display: inline-flex; flex-wrap: wrap; gap: 2px; padding-right: 6px; border-right: 1px solid var(--line); }
.rich-text-group:last-child { padding-right: 0; border-right: 0; }
.rich-text-button { display: inline-grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 7px; color: #34443a; background: transparent; cursor: pointer; }
.rich-text-button:hover { border-color: #b9c4ba; background: #f5f8f2; }
.rich-text-button[aria-pressed="true"], .rich-text-button[aria-expanded="true"] { border-color: var(--forest); color: var(--forest-deep); background: var(--soft-green); }
.rich-text-button svg { width: 20px; height: 20px; pointer-events: none; }
.rich-text-button .ql-stroke { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.rich-text-button .ql-thin { stroke-width: 1; }
.rich-text-button .ql-fill, .rich-text-button .ql-stroke.ql-fill { fill: currentColor; }
.rich-text-button .ql-even { fill-rule: evenodd; }
.rich-text-button .ql-transparent { opacity: .4; }
.rich-text-link-panel { display: grid; min-width: 0; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f9faf6; }
.rich-text-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rich-text-link-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.rich-text-link-panel[hidden], .rich-text-link-panel [hidden], .rich-text-field textarea[hidden] { display: none; }
.rich-text-editor { position: relative; min-width: 0; }
.rich-text-editor .ql-editor { min-height: 160px; max-height: 70vh; overflow-y: auto; padding: 10px 11px; border: 1px solid #cfd5cd; border-radius: 8px; color: var(--ink); background: white; counter-reset: list-0; cursor: text; font-size: 16px; font-weight: 450; line-height: 1.55; overflow-wrap: break-word; tab-size: 4; white-space: pre-wrap; }
.rich-text-editor .ql-editor:focus { border-color: var(--forest); }
.rich-text-editor .ql-editor > * { margin: 0; padding: 0; }
.rich-text-editor .ql-editor > * + * { margin-top: .6em; }
.rich-text-editor .ql-editor h1, .rich-text-editor .ql-editor h2 { font-size: 20px; }
.rich-text-editor .ql-editor :is(h3, h4, h5, h6) { font-size: 17px; }
.rich-text-editor .ql-editor blockquote { padding-left: 14px; border-left: 3px solid #b9c4ba; color: #46554b; }
.rich-text-editor .ql-editor a { color: var(--forest); text-decoration: underline; }
.rich-text-editor .ql-editor li + li { margin-top: .25em; }
.rich-text-editor .ql-editor li { position: relative; padding-left: 1.6em; list-style-type: none; }
.rich-text-editor .ql-editor li > .ql-ui { position: absolute; }
.rich-text-editor .ql-editor li > .ql-ui::before { display: inline-block; width: 1.2em; margin-right: .4em; margin-left: -1.6em; text-align: right; white-space: nowrap; }
.rich-text-editor .ql-editor li:not([data-list="ordered"]) > .ql-ui::before { content: "\2022"; }
.rich-text-editor .ql-editor li[data-list="ordered"] { counter-increment: list-0; }
.rich-text-editor .ql-editor li[data-list="ordered"] > .ql-ui::before { content: counter(list-0, decimal) ". "; }
/* Numbering restarts after anything that is not a numbered item, as it does
   on the public page where each run becomes its own list. */
.rich-text-editor .ql-editor :is(p, h1, h2, h3, h4, h5, h6, blockquote), .rich-text-editor .ql-editor li:not([data-list="ordered"]) { counter-set: list-0; }
@media (forced-colors: active) {
  .rich-text-button[aria-pressed="true"], .rich-text-button[aria-expanded="true"] { border-color: Highlight; }
}

/* ---- Feedback, live checks and list tools (admin.ts, admin-ux.ts) ---- */

/* Several admin elements set their own display; [hidden] still hides them. */
[hidden]:not([hidden="until-found"]) { display: none !important; }

/* Toasts: the server's one-off message after a save, and messages from
   admin.ts. They sit in a corner, stay while pointed at or focused, and the
   close button or Escape dismisses them. */
.admin-toasts { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; width: min(420px, calc(100vw - 32px)); gap: 10px; pointer-events: none; }
.admin-toasts:empty { display: none; }
.admin-toast { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 8px 6px 8px 14px; margin: 0; border: 1px solid #c8d8c8; border-radius: 10px; color: var(--forest-deep); background: #eff5ed; box-shadow: 0 12px 32px rgb(23 56 45 / 18%); font-size: 14px; pointer-events: auto; animation: admin-toast-in .2s ease-out; }
.admin-toast-error { border-color: #dfc3b9; color: #762f26; background: #fff4ef; }
.admin-toast-info { border-color: var(--line); color: var(--ink); background: var(--paper); }
.admin-toast-mark { display: inline-flex; width: 22px; height: 22px; flex: none; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--forest); font-size: 13px; font-weight: 800; line-height: 1; }
.admin-toast-error .admin-toast-mark { background: var(--danger); }
.admin-toast-info .admin-toast-mark { background: var(--clay); }
.admin-toast-text { min-width: 0; flex: 1 1 auto; padding: 6px 0; font-weight: 620; line-height: 1.45; overflow-wrap: anywhere; }
.admin-toast-action { display: inline-flex; min-height: 44px; flex: none; align-items: center; padding: 0 6px; border: 0; color: inherit; background: none; cursor: pointer; font: inherit; font-weight: 720; text-decoration: underline; text-underline-offset: .16em; white-space: nowrap; }
.admin-toast-close { display: inline-flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }
.admin-toast-close:hover { background: rgb(0 0 0 / 6%); }
.admin-toast-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
@keyframes admin-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 520px) {
  .admin-toasts { right: 16px; bottom: 16px; left: 16px; width: auto; }
}

/* The confirm dialog that replaces the browser's own confirm box. */
.admin-dialog { width: min(470px, calc(100vw - 32px)); padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 60px rgb(23 56 45 / 28%); }
.admin-dialog::backdrop { background: rgb(23 35 28 / 45%); }
.admin-dialog h2 { margin-bottom: 8px; font-size: 19px; }
.admin-dialog p { margin-bottom: 18px; color: #3c4a40; font-size: 14px; overflow-wrap: anywhere; }
.admin-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Short explanations on icons and status buttons, on hover and keyboard
   focus. The name stays in aria-label or the visible text. */
:where([data-tip]) { position: relative; }
[data-tip]::after { position: absolute; z-index: 25; bottom: calc(100% + 7px); left: 50%; width: max-content; max-width: 220px; padding: 6px 9px; border-radius: 6px; color: white; background: var(--forest-deep); box-shadow: 0 6px 16px rgb(0 0 0 / 18%); content: attr(data-tip); font-size: 12px; font-weight: 620; letter-spacing: 0; line-height: 1.35; opacity: 0; pointer-events: none; text-align: center; text-transform: none; transform: translate(-50%, 3px); transition: opacity .12s ease, transform .12s ease, visibility .12s; visibility: hidden; white-space: normal; }
[data-tip]:focus-visible::after, [data-tip]:has(:focus-visible)::after { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
@media (hover: hover) {
  [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; visibility: visible; }
}
.icon-grid [data-tip]::after { bottom: auto; top: calc(100% + 4px); }

/* Unsaved changes, warnings and messages next to fields. */
.unsaved-badge { display: inline-flex; min-height: 26px; flex: none; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; color: #6a4320; background: #f7ead9; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.unsaved-badge::before { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); content: ""; }
.field-warning { padding: 7px 10px; margin: 6px 0 0; border-radius: 7px; color: #6a4320; background: #fbf1e4; font-size: 13px; font-weight: 600; line-height: 1.45; }
.field-error { margin: 2px 0 0; color: var(--danger); font-size: 13px; font-weight: 650; line-height: 1.45; }
.error-summary-detail { font-weight: 450; }
.char-counter { justify-self: end; font-variant-numeric: tabular-nums; text-align: right; }
.field small.char-counter { font-size: 12px; }
.field small.char-counter-near { color: #8a5a1c; font-weight: 700; }
.field small.url-preview { color: #46564b; font-size: 12px; overflow-wrap: anywhere; }
.input-with-action { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; }
.input-with-action > input { min-width: min(100%, 12rem); flex: 1 1 12rem; }
.input-with-action > .button { flex: none; }
.toggle-field-wrap { display: grid; min-width: 0; align-content: start; }
.translation-badge { display: inline-flex; min-height: 24px; flex: none; align-items: center; padding: 2px 9px; margin-left: auto; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.translation-badge-complete { color: #285a3d; background: #e8f2e8; }
.translation-badge-missing { color: #6a4320; background: #f7ead9; }
.translation-badge-empty { color: #4d5a50; background: #eeefe9; }
.translation-disclosure > summary .translation-badge { margin-right: 10px; }
.capacity-total { flex: none; align-self: center; padding: 6px 12px; margin: 0; border-radius: 999px; color: var(--forest-deep); background: var(--soft-green); font-size: 13px; font-weight: 700; white-space: nowrap; }
.publish-state { margin: 10px 0 0; color: #46564b; font-size: 13px; font-weight: 650; }
.last-updated { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.heading-actions .preview-note { margin: 0; }
.editor-action-bar .unsaved-badge { margin-left: auto; }
.section-jump a[aria-current="location"] { background: var(--soft-green); box-shadow: inset 0 -2px var(--forest); }
.form-actions .unsaved-badge { order: 2; }
.password-tools { display: flex; flex-wrap: wrap; gap: 8px; }

/* A sent form shows that it is working; a second press does nothing. */
form[aria-busy="true"], .is-busy { cursor: progress; }
.button.is-busy { opacity: .78; }
.image-admin-grid[aria-busy="true"] { opacity: .72; transition: opacity .15s ease; }

/* Amenities in the cottage editor: counts and set-all buttons per group. */
.amenity-group-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 8px; }
.amenity-group-counts { font-size: 12px; font-weight: 600; }
.amenity-set-all { display: flex; flex-wrap: wrap; gap: 4px; }
.amenity-set-all .button-small { min-height: 36px; padding: 6px 10px; font-size: 12px; }
@media (pointer: coarse) {
  .amenity-set-all .button-small { min-height: 44px; }
}
.nearby-admin-distances { flex: 0 1 auto; font-size: 12px; white-space: nowrap; }
.nearby-admin-empty { padding: 24px 18px; }

/* Catalog lists: categories, counts and the order buttons. */
.amenity-admin-category + .amenity-admin-category { margin-top: 24px; }
.amenity-category-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 16px; }
.count-badge { display: inline-flex; min-width: 24px; height: 22px; align-items: center; justify-content: center; padding: 0 7px; border-radius: 999px; color: var(--forest-deep); background: var(--soft-green); font-size: 12px; font-weight: 750; letter-spacing: 0; line-height: 1; vertical-align: middle; }
.reorder-form { display: flex; justify-content: flex-end; gap: 6px; padding: 0 15px 10px; margin: 0; }
.region-move-form { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.region-move-form .icon-button { min-width: 40px; min-height: 40px; border-color: #cdd6cc; color: var(--forest-deep); background: white; }
.region-drag-handle { padding: 8px; cursor: grab; user-select: none; font-size: 22px; }
.region-drag-handle[hidden] { display: none; }
[data-region-order] .is-dragging { opacity: .5; }
[data-region-order][aria-busy="true"] .region-drag-handle { cursor: wait; }
.reorder-form .icon-button, .image-move-form .icon-button { border-color: #cdd6cc; color: var(--forest-deep); background: white; font-size: 18px; }
.reorder-form .icon-button:hover, .image-move-form .icon-button:hover { border-color: #9caf9d; background: #f5f8f2; }
.icon-button:disabled, .icon-button:disabled:hover { cursor: not-allowed; opacity: .4; }
.icon-search-field { padding: 8px 8px 0; border-top: 1px solid var(--line); }
.icon-no-matches { padding: 6px 10px 0; margin: 0; font-size: 13px; }

/* Photos: order buttons, a drag handle where a pointer can drag, the alt
   text summary and the upload drop zone with a progress bar per file. */
.image-drag-handle { position: absolute; top: 8px; right: 8px; display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 8px; color: var(--forest-deep); background: rgb(255 255 255 / 92%); box-shadow: 0 1px 3px rgb(0 0 0 / 18%); cursor: grab; font-size: 20px; line-height: 1; user-select: none; }
.admin-js .image-drag-handle { display: inline-flex; }
@media (pointer: coarse) {
  .admin-js .image-drag-handle { display: none; }
}
.image-drag-handle::after { right: 0; left: auto; transform: translate(0, 3px); }
.image-drag-handle:hover::after { transform: none; }
.image-admin-card.is-dragging { opacity: .5; outline: 2px dashed var(--forest); outline-offset: 2px; }
.image-quick-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #ebece5; }
.image-quick-actions form { margin: 0; }
.image-move-form { display: flex; align-items: center; gap: 6px; }
.image-position-label { min-width: 2.2em; color: #46564b; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; text-align: center; }
.image-details > summary { display: flex; min-height: 48px; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; color: var(--forest-deep); cursor: pointer; font-size: 14px; font-weight: 680; }
.image-details[open] > summary { border-bottom: 1px solid #ebece5; }
.image-alt-progress { font-size: 12px; font-weight: 600; }
.image-count { flex: none; align-self: center; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.upload-form:has(.upload-drop) { padding: 0; border: 0; background: transparent; }
.upload-drop { display: grid; min-width: 0; flex: 1 1 100%; gap: 8px; padding: 18px; border: 2px dashed #cbd4c9; border-radius: 10px; background: #f8faf6; transition: border-color .15s ease, background-color .15s ease; }
.upload-drop.is-dragover { border-color: var(--forest); background: var(--soft-green); }
.upload-drop-mark { color: var(--forest); font-size: 24px; line-height: 1; }
.upload-drop small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.upload-progress { display: grid; flex: 1 1 100%; gap: 8px; padding: 0; margin: 0; color: #36443a; font-size: 13px; list-style: none; }
.upload-progress li { display: grid; gap: 4px; overflow-wrap: anywhere; }
.upload-progress progress { width: 100%; height: 8px; accent-color: var(--forest); }
.upload-progress .upload-done { color: #285a3d; }
.upload-progress .upload-failed { color: var(--danger); font-weight: 650; }
.file-preview-pending img { outline: 3px solid var(--clay); outline-offset: -3px; }
.file-preview-pending figcaption { padding: 6px 10px; color: #6a4320; font-size: 12px; font-weight: 650; }

/* Lists: sortable headings, thumbnails, row actions and counts. */
.sort-link { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--forest-deep); text-decoration: underline; }
.sort-mark { color: #9aa59c; font-size: 12px; }
th[aria-sort="ascending"] .sort-mark, th[aria-sort="descending"] .sort-mark { color: var(--forest); }
.table-title-thumb { display: flex; min-width: 200px; align-items: center; gap: 12px; }
.table-title-thumb > span:last-child { min-width: 0; }
.table-thumb { display: block; width: 64px; height: 44px; flex: none; border-radius: 6px; background: #e8ede4; object-fit: cover; }
.table-thumb-empty { border: 1px dashed #cbd4c9; }
.table-title-link { color: inherit; text-decoration: none; }
.table-title-link:hover strong { text-decoration: underline; }
.admin-table td small.row-warning { color: #8a4a1c; font-weight: 650; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 14px; }
.row-action-form { margin: 0; }
.row-actions .inline-edit { flex: 1 1 100%; }
.count-link { color: var(--forest); font-weight: 750; }
.admin-table td small.count-split { margin-top: 2px; font-size: 12px; }

/* The overview's list of cottages that need attention. */
.attention-list { display: grid; padding: 0; margin: 0; list-style: none; }
.attention-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid #ebece5; }
.attention-list li:last-child { border-bottom: 0; }
.attention-list li > a:first-child { color: var(--forest-deep); text-decoration: none; }
.attention-list li > a:first-child:hover { text-decoration: underline; }
.attention-problems { min-width: 0; flex: 1 1 240px; color: #6a4320; font-size: 13px; }
.attention-list .table-link { margin-left: auto; }

/* A page drawn for an action that could not be carried out. */
.admin-problem h1 { margin-bottom: 8px; font-size: 24px; }
.admin-problem .form-actions { justify-content: center; margin-top: 10px; }

/* Interface texts: where a phrase appears, whether it was changed, and
   which enabled languages still lack it. */
.ui-text-editor > summary > .phrase-meta { display: inline-flex; max-width: 45%; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; white-space: normal; }
.phrase-area, .phrase-changed { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.25; white-space: nowrap; }
.phrase-area { color: #4d5a50; background: #eeefe9; }
.phrase-changed { color: #6a4320; background: #f7ead9; }
.field-missing { margin-left: 6px; color: #8a4a1c; font-size: 12px; font-weight: 650; }
.phrase-reset { padding: 0 15px 15px; }
@container admin-main (max-width: 728px) {
  .ui-text-editor > summary > .phrase-meta { justify-content: flex-start; }
  .row-actions { justify-content: flex-start; }
  .attention-list .table-link { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-toast { animation: none; }
  .admin-toast-leaving, [data-tip]::after { transition: none; }
}
@media (forced-colors: active) {
  .admin-toast, .admin-dialog { border: 2px solid CanvasText; }
  [data-tip]::after { border: 1px solid CanvasText; }
}

@media (max-width: 767px) {
  .region-drag-handle { display: none; }
}
