@charset "UTF-8";

@font-face { font-family: Hind; src: url('./assets/hind-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Hind; src: url('./assets/hind-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ink: #334155; --muted: #64748b; --paper: #f7f9fc; --line: #e2e8f0;
  --accent: #006bc7; --link: #0063b8; --sidebar: 244px;
  font-family: Hind, Arial, sans-serif; font-synthesis: none;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: .55; cursor: default; }
a { color: var(--link); }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #58a6e7; outline-offset: 4px; }
svg { display: block; }
.skip { position: fixed; top: -80px; left: 265px; padding: 15px; background: white; z-index: 100; }
.skip:focus { top: 10px; }

/* Helle Navigation; das Original-Logo wird ohne den fehlerhaften Außenrand gezeigt. */
.sidebar { width: var(--sidebar); height: 100dvh; position: fixed; left: 0; top: 0; background: #fff; border-right: 1px solid var(--line); padding: 28px 18px; display: flex; flex-direction: column; z-index: 5; overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 15px; margin: 0 0 35px; text-decoration: none; color: var(--ink); text-align: center; }
.brand img { width: 112px; height: 112px; object-fit: contain; }
.brand-small { font-size: 18px; font-weight: 600; line-height: 1.4; }
.brand-small > span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.nav-label, .tiny { font-size: 10px; letter-spacing: 1.2px; color: var(--muted); font-weight: 600; margin: 0 12px 15px; }
nav { display: grid; gap: 5px; }
.nav-button { text-align: left; padding: 12px 10px; background: transparent; color: #526177; display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.4; border-radius: 7px; }
.nav-button span { font: 400 19px/1 Arial, sans-serif; width: 22px; text-align: center; flex-shrink: 0; color: #718198; }
.nav-button:hover { color: var(--link); background: #f3f7fc; }
.nav-button.selected { background: #eaf3fd; color: var(--link); font-weight: 600; }
.nav-button.selected span { color: var(--link); }
.sidebar-bottom { margin-top: auto; padding: 28px 10px 0; }
.sidebar-bottom .tiny { margin: 0; }
.sidebar-bottom p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.sidebar-bottom small { font-size: 11px; color: var(--muted); }
.generations { display: flex; gap: 10px; align-items: center; margin: 16px 0; color: var(--muted); font-size: 12px; }
.generations i { width: 20px; height: 1px; background: #cbd5e1; }
.generations strong { background: #eaf3fd; border-radius: 5px; padding: 6px 10px; color: var(--link); }

.shell { margin-left: var(--sidebar); }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 36px; border-bottom: 1px solid var(--line); background: #fff; font-size: 14px; }
.topbar strong { font-weight: 600; }
.muted { color: #94a3b8; margin: 0 12px; }
.role-switch { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; }
select { background: #fff; border: 1px solid #cbd5e1; border-radius: 5px; padding: 8px 11px; color: var(--ink); max-width: 100%; }
.prototype { display: flex; gap: 12px; align-items: baseline; padding: 10px 36px; color: #526177; font-size: 11px; line-height: 1.5; background: #f0f4f9; border-bottom: 1px solid var(--line); }
.prototype strong { white-space: nowrap; }
main { padding: 30px 36px 15px; max-width: 1500px; margin: auto; outline: none; }
h1, h2, h3 { font-family: inherit; font-weight: 600; letter-spacing: -.3px; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 20px; line-height: 1.3; margin: 14px 0 7px; }
p { line-height: 1.65; }
.eyebrow { font-size: 10px; letter-spacing: 1.3px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

.hero { background: #eef5fc; border: 1px solid #dce9f7; border-radius: 9px; padding: 28px 30px; margin-bottom: 24px; }
.hero p { font-size: 15px; color: #526177; margin: 0 0 20px; }
.primary { display: inline-flex; gap: 24px; align-items: center; background: var(--accent); border-radius: 5px; padding: 11px 17px; color: #fff; font-size: 13px; font-weight: 600; }
.primary:hover { background: #005aaa; }
.primary span { font-size: 18px; }
.hero-caption { display: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stats article { background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; padding: 20px 17px; gap: 13px; align-items: center; }
.stat-icon { font-size: 24px; color: #7590ad; width: 32px; flex-shrink: 0; text-align: center; }
.stats small { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; }
.stats strong { font-size: 23px; font-weight: 600; display: block; line-height: 1.2; }
.stats article div > span { font-size: 11px; color: var(--muted); display: block; margin-top: 6px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(230px, 1fr); gap: 22px; margin-bottom: 32px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.section-head { padding: 23px 24px 10px; }
.section-head p { font-size: 11px; color: var(--muted); margin: 0 0 12px; }
.task-row { display: flex; gap: 13px; padding: 18px 24px; border-top: 1px solid #edf1f6; align-items: flex-start; }
.check { width: 20px; height: 20px; border: 1px solid #bac6d4; border-radius: 4px; background: #fff; flex-shrink: 0; padding: 0; font: 14px Arial, sans-serif; color: #fff; margin-top: 2px; }
.task-row > div:nth-child(2) { flex: 1; min-width: 0; }
.task-row strong { font-size: 14px; font-weight: 600; display: block; line-height: 1.4; }
.task-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.task-meta { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.task-action { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; white-space: nowrap; }
.xp { font-size: 11px; background: #edf5fe; border-radius: 4px; color: var(--link); padding: 3px 7px; }
.task-action .text-button { font-size: 11px; padding: 0; }
.check[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.done strong { text-decoration: line-through; color: var(--muted); }
.text-button { color: var(--link); background: transparent; padding: 5px 0; font-size: 13px; font-weight: 600; }
.text-button:hover { text-decoration: underline; }
.all-tasks { margin: 12px 24px 18px; }

.level-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 25px; text-align: left; }
.level-card .eyebrow { color: var(--muted); }
.level-symbol { font-size: 35px; line-height: 1; margin: 20px 0; color: #6a9ac4; }
.level-card h2 { font-size: 22px; }
.level-card p { font-size: 14px; color: var(--muted); }
.progress { margin: 25px 0 21px; }
progress { width: 100%; height: 6px; display: block; border: 0; border-radius: 4px; overflow: hidden; background: #e6edf5; }
progress::-webkit-progress-bar { background: #e6edf5; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.progress > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.progress strong { color: var(--ink); }
.level-card > small { font-size: 11px; line-height: 1.6; display: block; color: var(--muted); }

.section-head.inline { padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-note { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.tour-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tour-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.tour-art { height: 75px; background: #edf4fb; display: flex; align-items: center; gap: 15px; padding: 18px 20px; color: #52799b; }
.tour-art > span:first-child { font-size: 32px; line-height: 1; }
.tour-art .art-label { font-size: 10px; letter-spacing: 1.4px; }
.art-1 { background: #f0f5fa; }
.art-2 { background: #f1f5f9; }
.tour-body { padding: 20px; }
.pill { font-size: 11px; border: 1px solid #dce5ef; border-radius: 4px; padding: 3px 7px; color: #526177; display: inline-block; line-height: 1.4; }
.tour-body p { font-size: 14px; color: var(--muted); margin: 0; }
.tour-date { font-size: 12px; margin: 18px 0; }
details { font-size: 12px; color: #526177; line-height: 1.7; }
summary { cursor: pointer; }
details p { margin-top: 12px !important; }
details ul { padding-left: 16px; }
.tour-bottom { border-top: 1px solid #edf1f6; margin-top: 17px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.tour-bottom small { font-size: 11px; color: var(--muted); }
.tour-bottom button { font-size: 12px; }

.note { margin: 25px 0 10px; background: #edf5fe; border-left: 3px solid #9ac2e8; border-radius: 4px; padding: 19px 23px; color: #526177; font-size: 13px; }
.note p { margin: 7px 0 0; }
.compact { margin-bottom: 24px; line-height: 1.7; }
.page-title { padding: 12px 0 8px; }
.page-title h1 { font-size: 30px; }
.page-title p { color: var(--muted); font-size: 15px; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.filters button { padding: 10px 15px; border: 1px solid #dce5ef; border-radius: 5px; color: #526177; background: #fff; font-size: 13px; }
.filters button.active { background: #eaf3fd; color: var(--link); border-color: #bed9f1; }
.empty { padding: 25px; font-size: 14px; color: var(--muted); }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.source { padding: 18px; height: 194px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.source h2 { font-size: 17px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.source p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.source a { font-size: 13px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 0; }
.source a:hover { text-decoration: underline; }
.step { font-size: 25px; font-weight: 600; color: #7894ae; margin-bottom: 16px; }
.admin-panel { padding: 28px; margin: 25px 0; }
.admin-panel p, .admin-panel ul { font-size: 14px; line-height: 1.9; color: #526177; }
.family { padding: 16px 20px; margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.family label { display: flex; align-items: center; gap: 12px; }
.family span { font-size: 12px; color: var(--muted); }
footer { max-width: 1500px; margin: auto; padding: 25px 36px; display: flex; justify-content: space-between; gap: 15px; font-size: 11px; color: var(--muted); align-items: center; }
footer .text-button { font-size: 11px; }
#notice:not(:empty) { position: fixed; bottom: 20px; right: 25px; z-index: 20; padding: 15px 20px; border: 1px solid #bed9f1; border-radius: 7px; color: #355d80; background: #edf5fe; font-size: 13px; max-width: min(460px, 90vw); box-shadow: 0 6px 25px #33415515; pointer-events: none; }

.signed-out .sidebar { display: none; }
.signed-out .shell { margin-left: 0; }
.login-card { max-width: 470px; padding: 32px; margin: 40px auto; }
.login-card h1 { font-size: 27px; }
.login-card p { color: var(--muted); font-size: 14px; }
.form-grid { display: grid; gap: 17px; }
label { font-size: 13px; color: #526177; }
.form-grid label, dialog > label { display: grid; gap: 5px; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; padding: 10px 12px; }
input:focus-visible, textarea:focus-visible { outline: 3px solid #58a6e7; outline-offset: 2px; }
textarea { min-height: 80px; resize: vertical; }
.form-grid > button { justify-self: start; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 15px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.secondary { padding: 9px 13px; background: #fff; border: 1px solid #cbd5e1; color: var(--link); border-radius: 5px; font-size: 12px; }
.secondary:hover { background: #f0f6fc; }
.muted-copy { color: var(--muted); font-size: 12px; }
#user-controls { display: flex; align-items: center; gap: 22px; }
#user-controls small { display: block; color: var(--muted); font-size: 11px; }
.dashboard-tasks { margin-bottom: 30px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 15px 0; }
.toolbar select { margin-left: 10px; }
.toolbar a { font-size: 12px; }
.tour-list { display: grid; gap: 14px; margin: 15px 0 28px; }
.tour-item { display: grid; grid-template-columns: 128px minmax(170px, 1.4fr) minmax(145px, 1fr) 156px; gap: 20px; padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: #fff; align-items: start; }
.tour-when strong { display: block; font-size: 14px; line-height: 1.5; }
.tour-when small { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.tour-description h3 { font-size: 18px; margin: 0 0 7px; }
.tour-description > p { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.tour-description .warning { color: #8a5c10; background: #fff8e9; border-radius: 5px; padding: 9px; }
.participants > strong { font-size: 12px; }
.participants > div { margin: 8px 0; }
.participants > small { font-size: 11px; color: var(--muted); display: block; }
.name-chip { display: inline-block; margin: 0 5px 5px 0; font-size: 12px; padding: 4px 7px; background: #edf5fe; color: #355d80; border-radius: 4px; }
.tour-controls { display: grid; gap: 10px; }
.tour-controls label { font-size: 11px; }
.tour-controls select { width: 100%; margin-top: 4px; font-size: 11px; padding: 7px 4px; }
.tour-controls .primary { font-size: 12px; justify-content: center; padding: 9px 10px; }
.tour-controls .pill { text-align: center; }
.task-action select { max-width: 168px; font-size: 11px; padding: 6px; }
.add-task { padding: 20px; margin: 20px 0; }
.add-task > summary { font-size: 14px; font-weight: 600; }
.add-task .form-grid { margin-top: 20px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.team-card { padding: 24px; }
.team-card p { font-size: 13px; color: var(--muted); }
.team-card > strong { font-size: 13px; }
.avatar { width: 43px; height: 43px; display: grid; place-items: center; background: #edf5fe; color: #355d80; border-radius: 50%; margin-bottom: 18px; font-weight: 600; font-size: 20px; }
.requests { display: grid; gap: 18px; }
.request { padding: 25px; }
.request p { font-size: 13px; }
.request dl { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 13px; }
.request dt { font-weight: 600; }
.request dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 25px; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
dialog { width: min(600px, 92vw); max-height: 85dvh; overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; }
dialog::backdrop { background: rgb(51 65 85 / 25%); }
dialog p { font-size: 13px; color: var(--muted); }
dialog > label { margin: 15px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-menu { display: none; }
.preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 12px 36px; border-bottom: 1px solid #c9def3; background: #eaf3fd; }
.preview-controls[hidden] { display: none; }
.preview-controls label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.preview-controls select { font-size: 13px; }
.preview-controls > span { font-size: 12px; color: #526177; flex: 1; }
.tour-title { padding: 0; background: transparent; text-align: left; color: var(--link); font-weight: 600; font-size: inherit; line-height: 1.35; }
.tour-title:hover { text-decoration: underline; }
.planning-summary { font-size: 12px; color: var(--muted); }
.detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin: 18px 0; }
.detail-heading > button { flex-shrink: 0; }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.detail-card { padding: 25px; margin-bottom: 22px; }
.detail-card h3 { font-size: 15px; margin-top: 18px; }
.detail-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 14px; font-size: 14px; }
.detail-card dt { color: var(--muted); }
.detail-card dd { margin: 0; overflow-wrap: anywhere; }
.packing-checklist { list-style: none; padding: 0; columns: 2; column-gap: 30px; }
.packing-checklist li { break-inside: avoid; margin-bottom: 12px; }
.packing-checklist label { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.packing-checklist input, .inline-check input { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--accent); }
.packing-checklist label:has(input:checked) { color: var(--muted); text-decoration: line-through; }
.form-section { border: 1px solid var(--line); border-radius: 7px; padding: 18px; margin: 0; min-width: 0; }
.form-section legend { font-weight: 600; padding: 0 7px; }
.form-section p { margin-top: 0; }
.form-section > label { margin: 12px 0; }
.form-section small { font-size: 11px; color: var(--muted); }
.form-columns.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-columns.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-columns select { width: 100%; }
.duration-preview { padding: 10px 14px; border-radius: 6px; background: #edf5fe; margin: 0; color: #355d80; }
.packing-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.packing-chips > span { padding: 5px 9px; background: #eaf3fd; color: #355d80; border: 1px solid #d5e5f7; border-radius: 5px; font-size: 12px; overflow-wrap: anywhere; }
.preset-insert { display: flex; gap: 10px; margin-bottom: 15px; }
.preset-insert select { min-width: 0; flex: 1; }
.preset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.preset-card { padding: 24px; }
.preset-card p { font-size: 12px; color: var(--muted); }
.library-row { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.library-row small { display: block; margin-top: 5px; color: var(--muted); }
.inline-check { display: flex !important; flex-direction: row; align-items: center; gap: 10px; padding: 5px 0; }
.task-toolbar { align-items: center; margin-bottom: 20px; }
.task-toolbar > label { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.planning-task strong { margin-top: 8px; }
.task-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #526177; }
.task-status i { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.task-status.unassigned i { background: #d74343; }
.task-status.pending i { background: #d5a318; }
.task-status.done i { background: #27945a; }
.unassigned-text { color: #b53434; font-size: 12px; }
.assignment-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.assignee { display: inline-block; font-size: 11px; border: 1px solid #e3d5a9; background: #fff9e9; padding: 3px 7px; border-radius: 4px; color: #786016; }
.assignee.finished { background: #edf8f1; color: #246640; border-color: #c3e5cd; }
.priority-label { font-size: 10px; }
.priority-label select { display: block; margin-top: 4px; }
.planning-task .task-action { min-width: 132px; }
.change-notice { background: #fff8e9; color: #826117; border-left: 2px solid #dcb95c; padding: 8px 10px; font-size: 11px; line-height: 1.6; margin: 10px 0; display: block; }
.compact-tasks article { display: grid; grid-template-columns: 110px minmax(170px,1fr) minmax(120px,1fr); gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); align-items: start; }
.compact-tasks strong { font-size: 13px; }
.compact-tasks .change-notice { grid-column: 2 / -1; }
@media (max-width: 700px) {
  .details-grid, .preset-grid { grid-template-columns: 1fr; }
  .detail-heading { display: block; }
  .detail-heading > button { margin-bottom: 14px; }
  .detail-card { padding: 20px; }
  .detail-card dl { grid-template-columns: 90px minmax(0,1fr); }
  .packing-checklist { columns: 1; }
  .form-columns.two, .form-columns.three { grid-template-columns: 1fr; }
  .preset-insert { flex-wrap: wrap; }
  .preset-insert select { width: 100%; flex-basis: 100%; }
  .compact-tasks article { grid-template-columns: 1fr; gap: 7px; }
  .compact-tasks .change-notice { grid-column: auto; }
  .task-toolbar > label { margin-left: 0; width: 100%; }
  .library-row { flex-wrap: wrap; }
  .planning-task .task-action { min-width: 0; }
}

@media (max-width: 1200px) {
  .tour-item { grid-template-columns: 115px minmax(170px,1fr) 155px; gap: 16px; }
  .participants { grid-column: 2; }
  .tour-controls { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 600px) {
  .login-card { margin: 18px auto; padding: 24px; }
  .preview-controls { padding: 12px 16px; }
  .topbar { flex-wrap: wrap; }
  #user-controls { width: 100%; justify-content: space-between; }
  .tour-item { display: block; padding: 20px; }
  .tour-when { margin-bottom: 14px; }
  .tour-when strong { color: var(--link); }
  .tour-when small { display: inline; }
  .participants { margin: 18px 0; }
  .tour-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
  .tour-controls label { width: 100%; }
  .tour-controls select { width: 100%; font-size: 13px; }
  .tour-controls button { flex: 1; }
  .task-row { display: grid; grid-template-columns: 20px minmax(0,1fr); }
  .task-action { grid-column: 2; flex-direction: row; justify-content: start; align-items: center; flex-wrap: wrap; }
  .task-action select { max-width: 100%; }
  .form-columns { grid-template-columns: 1fr; }
  .toolbar { align-items: start; }
  .toolbar label { display: grid; gap: 8px; }
  .toolbar select { margin: 0; }
  .request dl { grid-template-columns: 1fr; }
  .account-row { padding: 17px; flex-wrap: wrap; }
  #user-controls { gap: 12px; }
  .team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-card { padding: 19px; }
  .hero { padding: 22px; }
}
@media (max-width: 850px) {
  .sidebar { position: relative; }
  .sidebar .brand { margin-bottom: 0; padding-right: 75px; }
  .mobile-menu { display: block; position: absolute; right: 20px; top: 30px; }
  .sidebar #nav { display: none; }
  .sidebar.menu-open #nav { display: grid; margin-top: 18px; }
}

@media (max-width: 1150px) {
  :root { --sidebar: 215px; }
  .sidebar { padding: 25px 12px; }
  .brand img { width: 100px; height: 100px; }
  .nav-button { font-size: 13px; padding: 12px 8px; }
  .topbar { padding: 15px 25px; }
  main { padding: 25px; }
  .prototype { padding: 10px 25px; flex-wrap: wrap; gap: 2px 12px; }
  .stats article { padding: 17px 13px; gap: 10px; }
  .stats strong { font-size: 21px; }
  .stat-icon { width: 25px; font-size: 22px; }
  .task-row { padding: 17px; }
  .section-head { padding: 22px 17px 9px; }
  .two-col { grid-template-columns: minmax(0, 1.7fr) minmax(215px, 1fr); }
  .level-card { padding: 23px 18px; }
  .tour-body { padding: 17px; }
  .tour-grid { gap: 14px; }
}
@media (max-width: 850px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: 100%; height: auto; padding: 17px 22px; display: block; }
  .brand { margin: 0 0 16px; flex-direction: row; align-items: center; gap: 14px; text-align: left; }
  .brand img { width: 64px; height: 64px; }
  .nav-label, .sidebar-bottom { display: none; }
  nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .nav-button { padding: 10px; min-height: 44px; }
  .nav-button span { font-size: 16px; width: 16px; }
  .topbar { min-height: 64px; }
  .stats { gap: 10px; }
  .stat-icon { display: none; }
  footer { padding: 25px; }
  .skip { left: 10px; }
}
@media (min-width: 851px) and (max-height: 850px) {
  .sidebar-bottom { display: none; }
}
@media (max-width: 600px) {
  main { padding: 20px 16px; }
  .sidebar { padding: 15px 16px; }
  .brand img { width: 58px; height: 58px; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-button { font-size: 12px; }
  .topbar { padding: 12px 16px; font-size: 12px; gap: 10px; }
  .topbar > span { max-width: 40%; line-height: 1.5; }
  .muted { margin: 0 5px; }
  .role-switch { font-size: 11px; gap: 6px; max-width: 60%; }
  select { padding: 8px 5px; font-size: 12px; min-width: 0; }
  .prototype { padding: 10px 16px; font-size: 11px; }
  .hero { padding: 22px; }
  .hero h1 { font-size: 29px; }
  .hero p { font-size: 14px; }
  .stats { grid-template-columns: 1fr; margin-bottom: 25px; gap: 9px; }
  .stats article { padding: 16px; align-items: center; }
  .stat-icon { display: block; }
  .stats article div { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; width: 100%; align-items: center; }
  .stats small { margin: 0; }
  .stats strong { font-size: 21px; grid-column: 2; grid-row: 1 / 3; text-align: right; }
  .stats article div > span { font-size: 10px; margin-top: 3px; }
  .two-col { grid-template-columns: 1fr; gap: 17px; margin-bottom: 28px; }
  .level-symbol { float: right; margin: 10px 0; }
  .level-card p br, .level-card > small br { display: none; }
  .progress { margin: 18px 0; }
  .tour-grid, .source-grid { grid-template-columns: 1fr; }
  .section-head.inline { align-items: flex-start; }
  .section-head.inline .text-button { font-size: 11px; white-space: nowrap; }
  .section-head h2 { font-size: 20px; }
  .task-row { gap: 11px; padding: 17px 14px; }
  .task-action { gap: 12px; }
  .page-title h1 { font-size: 28px; }
  .page-title p { font-size: 14px; }
  .family { flex-wrap: wrap; gap: 10px; padding: 15px; }
  .family label { gap: 8px; }
  .source { padding: 18px; }
  footer { padding: 25px 16px; flex-wrap: wrap; }
  footer > span { display: none; }
  #notice:not(:empty) { font-size: 12px; bottom: 14px; right: 14px; padding: 12px 16px; }
  .note { padding: 16px; font-size: 12px; }
}
.task-context { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; width: fit-content; max-width: 100%; padding: 4px 8px; margin-bottom: 12px; border: 1px solid #c9def2; border-radius: 7px; background: #eef6ff; color: #25618f; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.task-context span { font-size: 10px; font-weight: 400; }
button.task-context:hover { background: #dceefe; }
.category-context { background: #f0f4f8; border-color: #dce4ed; color: #536b82; }
.task-title-link { display: block; border: 0; padding: 8px 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.task-title-link:hover { color: var(--accent); text-decoration: underline; }
.task-body > .text-button { display: block; margin-top: 9px; }
.task-toolbar > label { flex: 1 1 230px; margin-left: 0; align-items: flex-start; flex-direction: column; }
.task-toolbar select { width: 100%; max-width: 100%; }
.compact-tasks article > .button-row { grid-column: 2 / -1; }
.danger-text { color: #b84242; }
.danger-button { border: 1px solid #bd4545; border-radius: 6px; background: #b64040; color: white; font: inherit; font-weight: 600; padding: 11px 18px; cursor: pointer; }
.danger-button:hover { background: #983838; }
.task-comments { max-height: 38vh; overflow-y: auto; margin: 18px 0; }
.task-comment { border-top: 1px solid var(--line); padding: 16px 0; }
.task-comment small { display: block; color: var(--muted); font-size: 12px; }
.task-comment p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.scope-reset { margin: 0 0 16px; }
@media (max-width: 700px) { .compact-tasks article > .button-row { grid-column: auto; } .task-toolbar > label { min-width: 0; flex-basis: 100%; } }

.high-priority { background: #fff7ec; box-shadow: inset 4px 0 #d47a16; }
.high-priority-badge { display: inline-block; background: #fbe1b8; color: #854500; border: 1px solid #e8b66d; border-radius: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; margin: 0 0 0 8px; }
.compact-tasks .high-priority { padding-left: 12px; padding-right: 12px; }
.compact-tasks .high-priority-badge { display: block; width: fit-content; margin: 0 0 6px; }
.tour-item.response-yes { border-left: 5px solid #2a9560; background: #f5fbf7; }
.tour-item.response-no { border-left: 5px solid #c46b6b; background: #fff8f8; }
.response-badge, .tour-status { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 5px; padding: 5px 9px; margin-bottom: 10px; }
.response-badge.yes { background: #dcf2e5; color: #23653e; }
.response-badge.no { background: #fae5e5; color: #954242; }
.response-badge.pending { background: #edf2f7; color: #64748b; }
.response-controls { display: grid; gap: 9px; margin-top: 10px; }
.response-controls button { justify-content: center; text-align: center; padding: 9px 11px; font-size: 12px; }
.response-selected { border: 1px solid; border-radius: 5px; font: inherit; font-weight: 600; }
.response-selected.yes { color: #23653e; border-color: #8cc9a3; background: #dcf2e5; }
.response-selected.no { color: #954242; border-color: #d9a0a0; background: #fae5e5; }
.tour-status { margin-top: 10px; background: #e9eff5; color: #526477; }
.tour-status.completed { background: #e3edf9; color: #34658c; }
.tour-status.cancelled { background: #f4e4e4; color: #954242; }
.tour-cancelled { border-style: dashed; }
.birthday-tour { color: #8a6224 !important; background: #fff4d9; padding: 7px 10px; border-radius: 5px; font-size: 13px; }
.name-chip small { font-size: 10px; opacity: .85; }
.crown { font-family: Georgia, serif; font-size: 23px; line-height: 1; vertical-align: middle; }
.crown-1 { color: #b8850a; }
.crown-2 { color: #8090a2; }
.crown-3 { color: #a76c3e; }
.name-chip .crown { font-size: 17px; }
.year-control { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.year-control select { min-width: 95px; }
.podium-panel { padding: 25px; margin-bottom: 24px; }
.podium { display: flex; flex-wrap: wrap; gap: 15px; }
.podium-place { display: grid; gap: 12px; flex: 1 1 180px; padding: 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.podium-place .crown { font-size: 34px; }
.podium-place span:last-child { font-size: 12px; color: var(--muted); }
.personal-days { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; font-size: 14px; }
.roster-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 20px; }
.roster-group { border-top: 3px solid #d4dde8; padding-top: 8px; }
.roster-group.yes { border-color: #77b990; }
.roster-group.no { border-color: #d79b9b; }
.roster-group h3 { font-size: 14px; }
.roster-group .name-chip { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.attendance-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.completion-issues { color: #936124; font-size: 13px; padding-left: 20px; line-height: 1.8; }
@media(max-width:700px) { .roster-columns { grid-template-columns:1fr; } .year-control { flex-wrap:wrap; } .podium-panel .section-head { display:block; } .podium-panel .year-control { margin:12px 0 18px; } }
.stat-link { display: block; width: fit-content; padding: 0; background: transparent; color: var(--ink); font: inherit; font-size: 28px; font-weight: 600; line-height: 1.25; text-align: left; }
.stat-link:hover { text-decoration: underline; }
.participant-price { display: inline-block; padding: 7px 10px; border-radius: 5px; font-size: 12px; line-height: 1.6; }
.participant-price strong { font-size: 17px; }
.participant-price.estimated { background: #fff6df; color: #8a6422; }
.participant-price.confirmed { background: #e6f5eb; color: #286644; }
.tour-view-filters { margin-bottom: 20px; }
@media(max-width:700px) { .stats .stat-link { font-size:21px; grid-column:2; grid-row:1 / 3; text-align:right; justify-self:end; } }
.event-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: 14px; }
.roster-people { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; align-items: flex-start; }
.registration-row { min-width: 0; max-width: 100%; flex: 0 1 auto; }
.registration-row .name-chip { margin: 0; padding: 4px 7px; text-align: left; line-height: 1.4; }
.registration-draggable { cursor: grab; font-family: inherit; touch-action: none; user-select: none; }
.registration-draggable:hover, .registration-draggable:focus-visible { background: #dbeafb; outline: 2px solid #8eb9df; outline-offset: 1px; }
.registration-draggable:active { cursor: grabbing; }
.registration-draggable.dragging { opacity: .4; }
.roster-hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.roster-dropzone { min-height: 88px; border-radius: 0 0 6px 6px; transition: background .12s, box-shadow .12s; }
.roster-dropzone.drag-over { background: #edf5fe; box-shadow: 0 0 0 2px #8eb9df; }
.roster-dropzone.drag-over.yes { background: #edf8f0; box-shadow: 0 0 0 2px #77b990; }
.roster-dropzone.drag-over.no { background: #fff0f0; box-shadow: 0 0 0 2px #d79b9b; }
.roster-empty { font-size: 12px; margin: 0; }
.roster-saving .registration-draggable { cursor: wait; opacity: .6; }
[data-edit] { white-space: nowrap; }

.source header { display: flex; justify-content: space-between; align-items: start; gap: 12px; min-height: 44px; }
.document-kind { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.source .button-row { margin-top: auto; gap: 12px; flex-wrap: nowrap; }
.source .text-button { font-size: 11px; }
.source-grid { margin-top: 18px; }

.roster-drag-ghost { position: fixed; z-index: 1000; pointer-events: none; box-shadow: 0 3px 12px #57738b33; opacity: .95; }

.name-crown { display: inline-block; width: 12px; height: 12px; margin-left: 4px; vertical-align: -1px; flex-shrink: 0; }

.personal-ranking .name-crown { margin: 0 5px 0 0; }

.highlighted-comment { color:#8a5c10; background:#fff8e9; border-radius:5px; padding:7px 10px; margin:8px 0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.highlighted-comment strong { font-size: 12px; }
.highlighted-comment small { font-size:11px; color:inherit; }
.highlighted-comment-text { white-space:pre-wrap; }
.highlighted-comment.compact { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.highlighted-comment.compact .highlighted-comment-text { white-space:nowrap; }
.planning-progress { display: flex; gap: 8px; align-items: center; max-width: 260px; margin-top: 6px; }
.planning-progress progress { width: 100%; height: 7px; border: 0; border-radius: 5px; overflow: hidden; background: #e6edf5; accent-color: #3187c5; }
.planning-progress progress::-webkit-progress-bar { background: #e6edf5; border-radius: 5px; }
.planning-progress progress::-webkit-progress-value { background: #3187c5; border-radius: 5px; }
.planning-progress progress::-moz-progress-bar { background: #3187c5; border-radius: 5px; }
.planning-progress small { color: var(--muted); font-size: 10px; flex-shrink: 0; }
.tour-status.followup { color: #875d11; background: #fff1cf; }
.tour-followup { border-left: 4px solid #d4a13a; }

.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.tour-status-tabs { flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tour-status-tabs span { opacity: .7; font-size: 11px; }

.danger-button.compact-danger { padding: 9px 13px; font-size: 12px; font-weight: 400; border-radius: 5px; }
.archive-actions { align-items: center; gap: 12px; }

.people-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 15px; margin-bottom: 20px; }
.people-toolbar label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.people-toolbar input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); font: inherit; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 18px; }
.person-card { padding: 22px; min-width: 0; display: flex; flex-direction: column; }
.person-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.person-card h2 { margin: 0; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.person-avatar { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.person-avatar.initials { display: inline-flex; justify-content: center; align-items: center; background: #edf5fe; color: #547ca3; font-size: 23px; }
.person-avatar.large { width: 76px; height: 76px; font-size: 34px; }
.person-details { display: grid; grid-template-columns: minmax(80px,.75fr) minmax(0,1.5fr); gap: 10px 14px; margin: 0; font-size: 12px; line-height: 1.6; }
.person-details dt { color: var(--muted); }
.person-details dd { margin: 0; overflow-wrap: anywhere; }
.person-details a { text-decoration: none; }
.person-details a:hover { text-decoration: underline; }
.preserve-lines { white-space: pre-wrap; }
.person-card-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 20px; }
.person-card-footer small { color: var(--muted); font-size: 12px; }
.person-card-footer strong { color: var(--ink); }
.own-profile { max-width: 720px; }
.user-profile-link small { display: inline-block; color: var(--muted); font-weight: 400; margin-left: 4px; }
@media(max-width:700px){ .people-grid { grid-template-columns: 1fr; } .person-card { padding: 18px; } .people-toolbar>label { flex: 1 1 180px; } }

.header-avatar{width:28px;height:28px;object-fit:cover;border-radius:50%;vertical-align:middle;margin-right:8px}.contact-download{display:inline-flex;align-items:center;text-decoration:none;padding:9px 14px;border-radius:9px;font-weight:600}

.nav-team-icon { width:21px; height:21px; vertical-align:middle; }
.team-order-help { color:var(--muted); font-size:13px; margin:0 0 14px; }
.team-drag-handle { margin-left:auto; flex:0 0 30px; width:30px; height:34px; padding:6px; color:var(--muted); background:transparent; border:0; cursor:grab; touch-action:none; }
.team-drag-handle svg { width:16px; height:20px; pointer-events:none; }
.team-drag-handle:hover,.team-drag-handle:focus-visible { color:var(--accent); background:#eaf3fc; }
.team-drag-handle:active { cursor:grabbing; }
.team-dragging { opacity:.45; outline:2px dashed #8db8d8; }

.header-avatar-placeholder { display:inline-flex; align-items:center; justify-content:center; background:#e4f0fb; color:var(--accent); font-weight:600; }
.contact-map-panel { margin:0 0 22px; padding:22px; }
.contact-map-panel h2 { margin:0 0 6px; }
.contact-map-panel>p { color:var(--muted); font-size:14px; margin:0 0 14px; }
.contact-map { height:340px; border-radius:10px; border:1px solid var(--line); background:#edf3f7; isolation:isolate; z-index:0; }
.contact-map .leaflet-control-attribution { font-size:10px; }
.contact-map .leaflet-popup-content { font-family:Hind,Arial,sans-serif; color:var(--ink); }
.contact-map .leaflet-popup-content p { margin:8px 0; }
.contact-map .leaflet-control-zoom a { color:var(--accent); }
.profile-password-option { border-top:1px solid var(--line); padding-top:16px; margin-top:16px; }
.profile-password-option h3 { font-size:15px; margin:0 0 10px; }
.profile-password-option p { margin:10px 0 0; font-size:12px; }
.profile-password-option h4 { font-size:13px; margin:20px 0 10px; }
.profile-login-form { display:flex; align-items:center; flex-wrap:wrap; gap:10px; max-width:520px; }
.profile-login-form label { flex:1; min-width:200px; }
.profile-login-form small { color:var(--muted); font-size:11px; }
.profile-recovery-option { border-top:1px solid var(--line); margin-top:20px; padding-top:1px; }
.profile-recovery-option .secondary { margin-top:12px; }
.recovery-secret { font-family:monospace; font-size:12px; letter-spacing:.03em; }
.forgot-password { margin-top:12px; }

.contact-map .leaflet-interactive:focus { outline:none; }
.contact-map .leaflet-interactive:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

.user-profile-link { display:inline-flex; align-items:center; gap:10px; line-height:1.2; }
.header-avatar { width:38px; height:38px; margin-right:0; flex:0 0 38px; }
#user-controls { align-items:center; }
.person-card-actions,.account-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.accounts { display:grid; grid-template-columns:minmax(160px,1fr) repeat(3,max-content) minmax(100px,max-content); }
.accounts.accounts-inactive { grid-template-columns:minmax(160px,1fr) repeat(3,max-content); }
.accounts .account-row { display:grid; grid-column:1/-1; grid-template-columns:subgrid; gap:12px; }
.accounts .account-row>div:first-child { min-width:0; overflow-wrap:anywhere; }
.accounts .account-actions { display:contents; }
.account-profile-label { justify-self:center; white-space:nowrap; }
@media(max-width:1100px){
 .accounts,.accounts.accounts-inactive { display:block; }
 .accounts .account-row { grid-template-columns:minmax(0,1fr); }
 .accounts .account-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .accounts .account-actions button { min-width:0; }
}

.user-profile-link>span:last-child { white-space:nowrap; max-width:220px; overflow:hidden; text-overflow:ellipsis; }
#logout { white-space:nowrap; }

.account-tabs { display:flex; gap:8px; margin:0 0 20px; flex-wrap:wrap; }
.account-tabs button { border:1px solid var(--line); background:#fff; color:var(--muted); border-radius:7px; padding:10px 16px; }
.account-tabs button.selected { background:#e7f1fc; color:var(--accent); border-color:#aacdeb; }
.test-profile-badge { display:inline-block; font-size:10px; font-weight:400; margin-left:8px; color:#52687b; background:#eef3f8; border-radius:4px; padding:2px 5px; }
.profile-status-action { border-top:1px solid var(--line); padding-top:15px; }

.map-legend { display:flex; gap:20px; flex-wrap:wrap; margin:0 0 12px; font-size:12px; color:var(--muted); }.map-legend span { display:inline-flex; align-items:center; gap:7px; }.map-legend i { display:inline-block; width:12px; height:12px; border-radius:50%; }.map-legend-area { background:#b2d5ff; border:1px solid #006bc7; }.map-legend .map-legend-leader { width:15px; height:20px; border-radius:0; color:#b6654c; }.map-legend-leader svg,.leader-map-pin svg { display:block; width:100%; height:100%; }.leader-map-pin { color:#b6654c; background:transparent; border:0; }

.task-toolbar { align-items:flex-end; gap:16px; }
.task-toolbar>label { flex:0 1 auto; width:auto; max-width:100%; min-width:0; }
.task-toolbar #task-scope { width:300px; max-width:100%; min-width:0; }
.task-toolbar #task-sort { width:150px; max-width:100%; min-width:0; }


.profile-contact-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:10px; align-items:end; margin-bottom:12px; }
.profile-contact-row label { min-width:0; }
.contact-remove { align-self:end; margin-bottom:7px; }
.contact-entry { display:block; margin-bottom:6px; }
.contact-entry small { display:block; color:var(--muted); }
.swimming-options { border:0; padding:12px 0 0; display:flex; flex-wrap:wrap; gap:12px; }
@media(max-width:550px){.profile-contact-row{grid-template-columns:minmax(0,1fr) auto}.profile-contact-row label{grid-column:1}.contact-remove{grid-column:2;grid-row:1 / span 2;align-self:center}}

.profile-info header { display:flex; align-items:center; gap:16px; margin:20px 0; }
.profile-info h3 { margin:0; font-size:22px; }
.statistics-section { margin-top:24px; padding:24px; }
.statistics-table-scroll { overflow-x:auto; }
.statistics-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
.statistics-table caption { text-align:left; color:var(--muted); padding:8px 0 18px; }
.statistics-table th,.statistics-table td { padding:14px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.statistics-table thead th { font-size:12px; white-space:nowrap; color:var(--muted); }
.statistics-table tbody th { min-width:150px; font-weight:600; }
.statistics-table small { display:block; font-size:11px; font-weight:400; color:var(--muted); white-space:nowrap; }
.statistics-bar { display:block; width:85px; height:5px; border-radius:4px; background:#e7edf3; margin-top:6px; overflow:hidden; }
.statistics-bar::-webkit-meter-bar { background:#e7edf3; border:0; }
.statistics-bar::-webkit-meter-optimum-value { background:var(--accent); }
.statistics-bar::-moz-meter-bar { background:var(--accent); }

.statistics-explanation { margin:22px 0; color:var(--muted); font-size:13px; }
.statistics-explanation summary { cursor:pointer; color:var(--accent); }

#contacts-grid { grid-auto-rows:1fr; }

#person-form small { font-size:11px; color:var(--muted); }

.statistics-table .statistics-position { width:1%; min-width:0; text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }

.mailbox-open .shell>footer { display:none; }
.mailbox-open main { padding:16px 24px; }
.mailbox-open .page-title { padding:0; margin-bottom:12px; }
.mailbox-open .page-title h1 { font-size:25px; margin:0; }
.mailbox-open .page-title p { font-size:12px; margin:4px 0 0; }
.mailbox-layout { display:grid; grid-template-columns:var(--mailbox-contact-width,280px) 16px minmax(0,1fr); gap:0; height:var(--mailbox-height,calc(100dvh - 250px)); min-height:0; align-items:stretch; }
.mailbox-sidebar { min-width:0; overflow:hidden; padding:12px; min-height:0; height:100%; display:flex; flex-direction:column; }
.mailbox-sidebar>.primary { width:100%; padding:8px 10px; font-size:12px; flex-shrink:0; }
.mailbox-group { margin-top:0; padding-bottom:8px; border-bottom:1px solid var(--line); flex-shrink:0; }
.mailbox-thread-list { display:grid; align-content:start; gap:3px; margin-top:8px; flex:1 1 0; min-height:0; overflow-y:auto; scrollbar-gutter:stable; }
.mailbox-thread { min-width:0; padding:8px; border-radius:6px; background:transparent; text-align:left; width:100%; color:var(--ink); font:inherit; }
.mailbox-thread:hover,.mailbox-thread.selected { background:#edf4fb; }
.mailbox-thread>span { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.mailbox-contact-name { display:flex; flex-wrap:wrap; align-items:center; gap:3px 5px; min-width:0; }
.mailbox-thread strong { font-size:12px; overflow-wrap:anywhere; }
.mailbox-thread small { display:block; margin-top:4px; font-size:11px; color:var(--muted); overflow:hidden; line-height:1.4; white-space:nowrap; text-overflow:ellipsis; }
.mailbox-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 5px; border-radius:10px; font-size:11px; background:#b32635; color:#fff; font-weight:600; flex-shrink:0; }
.mailbox-count[hidden] { display:none; }
.nav-button .nav-icon { position:relative; }
.nav-button .nav-icon .mailbox-count { position:absolute; top:-5px; right:-6px; width:auto; min-width:13px; height:13px; padding:0 3px; margin:0; font:600 9px/13px Arial,sans-serif; background:#b32635; color:#fff; border-radius:8px; }
.person-message-button { display:inline-flex; align-items:center; justify-content:center; padding:5px; width:29px; height:29px; border-radius:5px; color:var(--link); background:transparent; }
.person-message-button:hover { background:#edf4fb; }
.person-message-button svg { width:19px; height:19px; }
.mailbox-help { font-size:10px; color:var(--muted); line-height:1.45; margin:10px 0 0; flex-shrink:0; }
.mailbox-conversation { padding:16px; min-width:0; min-height:0; height:100%; display:flex; flex-direction:column; overflow:hidden; }
.mailbox-heading { display:flex; justify-content:space-between; align-items:start; gap:12px; flex-shrink:0; }
.mailbox-heading h2 { margin:0; font-size:20px; }
.mailbox-heading p,.mailbox-context { font-size:11px; color:var(--muted); line-height:1.45; margin:5px 0; flex-shrink:0; }

.mailbox-messages { flex:1 1 0; max-height:none; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:10px 4px; margin:4px -4px 0; overscroll-behavior:contain; overflow-anchor:none; scrollbar-gutter:stable; }
.mailbox-role { display:inline-block; padding:1px 5px; border-radius:4px; font-size:9px; line-height:1.4; font-weight:600; color:#466b8b; background:#e1edf7; vertical-align:middle; }
.mailbox-role-admin { color:#806023; background:#f7edcf; }
.mailbox-message { position:relative; overflow:visible; background:#f2f5f8; border:1px solid #e6ebf1; border-radius:8px; padding:8px 11px; max-width:calc(100% - 38px); margin-left:38px; margin-bottom:17px; align-self:flex-start; min-width:130px; flex-shrink:0; }
.mailbox-message.mine { background:#edf5fc; border-color:#d7e7f6; align-self:flex-end; }
.mailbox-message.highlighted { box-shadow:inset 3px 0 #d7b86b; }
.mailbox-message header { display:flex; flex-wrap:wrap; align-items:center; gap:3px 8px; font-size:11px; }
.mailbox-message time,.mailbox-message header small { font-size:10px; color:var(--muted); }
.mailbox-message p { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.45; }
.mailbox-message-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:4px; }
.mailbox-message-actions button { font-size:10px; line-height:1.25; font-weight:400; padding:1px 0; }
.mailbox-composer { height:130px; min-height:0; margin:0; flex-shrink:0; display:flex; flex-direction:column; }
.mailbox-composer label { display:flex; flex-direction:column; flex:1; min-height:0; gap:4px; font-size:12px; }
.mailbox-composer textarea { flex:1; min-height:0; max-height:none; padding:7px 10px; resize:none; font-size:13px; }
.mailbox-composer>div { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; }
.mailbox-composer small { font-size:10px; color:var(--muted); }
.mailbox-composer .primary { padding:7px 15px; font-size:12px; }
@media(max-width:850px){.mailbox-layout{grid-template-columns:var(--mailbox-contact-width,210px) 12px minmax(0,1fr);gap:0}.mailbox-conversation{padding:12px}.mailbox-help{display:none}}
@media(max-width:600px){.mailbox-open main{padding:12px}.mailbox-open .page-title p{display:none}.mailbox-layout{grid-template-columns:var(--mailbox-contact-width,120px) 10px minmax(0,1fr);gap:0}.mailbox-sidebar{padding:7px}.mailbox-sidebar>.primary{font-size:11px;padding:7px 5px}.mailbox-thread{padding:7px 5px}.mailbox-thread strong{font-size:11px}.mailbox-conversation{padding:9px}.mailbox-heading{gap:5px}.mailbox-heading h2{font-size:16px}.mailbox-heading .text-button{font-size:10px}.mailbox-context{display:none}.mailbox-message{min-width:0;max-width:calc(100% - 38px);padding:7px}.mailbox-composer small{display:none}.mailbox-composer>div{justify-content:flex-end}.mailbox-count{min-width:16px;height:16px;font-size:9px;padding:0 3px}}

.program-year-buttons { margin:0; align-items:center; }
.tour-filter-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:8px 16px; margin:12px 0; color:var(--muted); font-size:12px; }

#mailbox-splitter { flex:0 0 16px; display:flex; align-items:center; justify-content:center; cursor:row-resize; touch-action:none; border-radius:4px; }
#mailbox-splitter span { width:46px; height:3px; background:#b6c7d7; border-radius:3px; }
#mailbox-splitter:hover { background:#f7f9fb; }
#mailbox-splitter:hover span { background:#8fa7bc; }
#mailbox-splitter:focus-visible { outline:2px solid #a8c6e4; outline-offset:-2px; }
.mailbox-resizing,.mailbox-resizing * { cursor:row-resize!important; user-select:none!important; }

#mailbox-contact-splitter { display:flex; align-items:center; justify-content:center; cursor:col-resize; touch-action:none; border-radius:4px; }
#mailbox-contact-splitter span { width:3px; height:46px; background:#b6c7d7; border-radius:3px; }
#mailbox-contact-splitter:hover { background:#f7f9fb; }
#mailbox-contact-splitter:hover span { background:#8fa7bc; }
#mailbox-contact-splitter:focus-visible { outline:2px solid #a8c6e4; outline-offset:-2px; }
.mailbox-resizing-width,.mailbox-resizing-width * { cursor:col-resize!important; user-select:none!important; }

.mailbox-layout { background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.mailbox-layout>.panel { border:0; border-radius:0; }
#mailbox-contact-splitter { background:#fff; border-left:1px solid var(--line); }
.mailbox-thread>.mailbox-preview { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:6px; margin-top:4px; }
.mailbox-preview small { min-width:0; margin-top:0; }
.mailbox-preview time { font-size:10px; line-height:1.5; color:var(--muted); white-space:nowrap; }
.mailbox-emoji-picker { position:relative; flex-shrink:0; }
.mailbox-emoji-picker summary { cursor:pointer; list-style:none; padding:4px 7px; border-radius:5px; font-size:20px; line-height:1.2; }
.mailbox-emoji-picker summary::-webkit-details-marker { display:none; }
.mailbox-emoji-picker summary:hover { background:#edf4fb; }
.mailbox-emoji-grid { position:absolute; bottom:38px; left:0; z-index:5; display:grid; grid-template-columns:repeat(auto-fit,minmax(30px,1fr)); width:280px; max-width:65vw; max-height:180px; overflow:auto; padding:8px; gap:3px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 18px #28446620; }
.mailbox-emoji-grid button { min-width:0; padding:3px; background:transparent; font-size:21px; line-height:1.2; border-radius:4px; }
.mailbox-emoji-grid button:hover { background:#edf4fb; }
.mailbox-composer>div>small { margin-right:auto; }

.mailbox-contact-identity,.mailbox-heading-identity,.mailbox-pinned-author { display:flex; align-items:center; gap:8px; min-width:0; }
.mailbox-avatar { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:28px; height:28px; object-fit:cover; border-radius:50%; }
.mailbox-avatar-placeholder { background:#e7f0f8; color:#4b6b87; font-size:12px; font-weight:600; }
.mailbox-message>.mailbox-avatar { position:absolute; top:0; left:-38px; width:28px; height:28px; font-size:12px; }
.mailbox-pinned-author .mailbox-avatar { width:20px; height:20px; font-size:10px; }
.mailbox-heading .mailbox-avatar { width:36px; height:36px; font-size:15px; }
.mailbox-emoji-picker summary { display:flex; align-items:center; justify-content:center; color:var(--link); }
.mailbox-emoji-picker summary svg { width:22px; height:22px; }

.mailbox-group-avatar { background:#dcebf8; color:#376a96; }
.mailbox-group-avatar svg { width:20px; height:20px; }
.mailbox-heading .mailbox-group-avatar svg { width:25px; height:25px; }
.mailbox-group-members { flex-basis:100%; font-size:10px; color:#53718e; font-weight:400; }

.mailbox-pinned-heading,.mailbox-pinned-navigation { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mailbox-pinned-author { flex-wrap:wrap; gap:4px 6px; }
.mailbox-unpin { padding:2px; display:inline-flex; }
.mailbox-unpin svg { width:17px; height:17px; }
.mailbox-pinned-navigation>.text-button { padding:0 7px; font-size:19px; line-height:1; }
.mailbox-jump-target { outline:2px solid #c5a756; outline-offset:2px; animation:mailbox-jump 3s ease-out; }
@keyframes mailbox-jump { from { background:#fff1bd; } }
@media(prefers-reduced-motion:reduce){.mailbox-jump-target{animation:none}}

.mailbox-menu-toggle { display:inline-flex; align-items:center; justify-content:center; margin-left:auto; padding:1px 3px; color:var(--muted); background:transparent; border-radius:4px; }
.mailbox-menu-toggle svg { width:16px; height:16px; }
.mailbox-menu-toggle:hover { background:#e0eaf3; }
.mailbox-action-popover { inset:auto; margin:0; width:250px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:7px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); box-shadow:0 5px 20px #28446624; }
.mailbox-action-popover:popover-open { display:flex; flex-direction:column; gap:1px; }
.mailbox-action-popover>[role=menuitem] { text-align:left; padding:7px 9px; font-size:12px; background:transparent; color:var(--ink); border-radius:4px; }
.mailbox-action-popover>[role=menuitem]:hover { background:#edf4fb; }
.mailbox-action-popover>.danger-text { color:#b32635; }
.mailbox-quick-reactions { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:1px; padding:3px 0 8px; border-bottom:1px solid var(--line); margin-bottom:3px; }
.mailbox-quick-reactions button,.mailbox-more-reactions button { min-width:0; padding:3px; font-size:18px; line-height:1.25; background:transparent; border-radius:4px; }
.mailbox-quick-reactions button:hover,.mailbox-more-reactions button:hover { background:#edf4fb; }
.mailbox-more-reactions { display:grid; grid-template-columns:repeat(auto-fit,minmax(27px,1fr)); gap:2px; padding:5px 0; max-height:150px; overflow:auto; }
.mailbox-more-reactions[hidden] { display:none; }
.mailbox-reactions { position:absolute; top:calc(100% - 9px); left:8px; z-index:1; display:flex; flex-wrap:nowrap; gap:4px; width:max-content; max-width:calc(100% - 16px); margin:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.mailbox-reactions button { flex-shrink:0; display:inline-flex; align-items:center; gap:4px; padding:2px 5px; background:#fff; border:1px solid #d7e2ec; border-radius:12px; font-size:15px; line-height:1.2; box-shadow:0 1px 3px #28446618; }
.mailbox-reactions button[aria-pressed=true] { background:#deedf9; border-color:#a6c6e1; }
.mailbox-reactions small { color:var(--muted); font-size:10px; }
.mailbox-read-status { display:flex; align-items:center; gap:4px; margin:5px 0 0 auto; padding:0; color:var(--muted); background:transparent; font-size:10px; }
.mailbox-read-status.read { color:var(--link); }
.mailbox-read-status:hover { text-decoration:underline; }
.mailbox-quote { display:flex; flex-direction:column; gap:2px; width:100%; max-width:100%; margin:5px 0; padding:6px 8px; background:#e5edf5; border-left:3px solid #9bb9d2; border-radius:3px; text-align:left; color:#4a6279; font-size:11px; }
.mailbox-quote span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.mailbox-forwarded { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.mailbox-composer { position:relative; }
.mailbox-compose-reference { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 8px; margin-bottom:5px; background:#edf3f8; border-left:3px solid #a2bfd7; border-radius:3px; flex-shrink:0; }
.mailbox-compose-reference>div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.mailbox-compose-reference strong { font-size:11px; }
.mailbox-compose-reference span { font-size:11px; color:var(--muted); white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.mailbox-composer>.mailbox-command-list { position:absolute; display:block; inset:auto 0 100%; margin:0 0 5px; z-index:4; max-height:230px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:7px; padding:5px; box-shadow:0 4px 16px #28446620; }
.mailbox-command-list[hidden] { display:none!important; }
.mailbox-command-list button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:8px; text-align:left; background:transparent; border-radius:4px; font-size:12px; }
.mailbox-command-list button:hover { background:#edf4fb; }
.mailbox-receipt-list>div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); font-size:13px; }
.mailbox-receipt-list small { color:var(--muted); }
.mailbox-forward-preview { white-space:pre-wrap; max-height:180px; overflow:auto; background:#f1f5f9; padding:10px; border-radius:5px; }

.mailbox-pinned { display:flex; align-items:center; gap:4px; min-height:34px; max-height:34px; margin:7px 0; padding:0 6px; background:#fff8e8; border:1px solid #f0dfb5; border-radius:5px; flex-shrink:0; overflow:hidden; }
.mailbox-pinned-jump { display:flex; align-items:center; gap:7px; flex:1; min-width:0; padding:6px 3px; text-align:left; background:transparent; color:#816a37; }
.mailbox-pin-icon { width:16px; height:16px; flex-shrink:0; transform:rotate(35deg); }
.mailbox-pin-line { min-width:0; flex:1; font-size:12px; line-height:20px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mailbox-pin-line strong { font-size:12px; font-weight:600; }
.mailbox-pin-indicators { display:flex; align-items:center; gap:3px; flex-shrink:0; }
.mailbox-pin-indicators i { width:4px; height:4px; border-radius:50%; background:#d9cfb7; }
.mailbox-pin-indicators i.active { background:#947435; }
.pin-changing { animation:mailbox-pin-switch 180ms ease-out; }
@keyframes mailbox-pin-switch { from { opacity:.2; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
.mailbox-info-count { display:flex; align-items:center; gap:10px; font-size:14px; }
.mailbox-info-count strong { color:var(--link); font-variant-numeric:tabular-nums; }
@media(prefers-reduced-motion:reduce){.pin-changing{animation:none}}

.reaction-attached { transform-origin:center top; animation:mailbox-reaction-stick 220ms ease-out both; }
@keyframes mailbox-reaction-stick { from { opacity:0; transform:translateY(-4px) scale(.78) rotate(-4deg); } 75% { opacity:1; transform:translateY(0) scale(1.04) rotate(1deg); } to { opacity:1; transform:translateY(0) scale(1) rotate(0); } }
.mailbox-info-readers { display:grid; gap:6px; list-style:none; padding:0; margin:0 0 18px; }
.mailbox-info-readers li { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:3px 16px; padding:6px 8px; background:#edf3f8; color:#4a6279; border-radius:4px; font-size:12px; }
@media(prefers-reduced-motion:reduce){.reaction-attached{animation:none}}

.mailbox-day-divider { display:flex; align-items:center; gap:12px; align-self:stretch; margin:7px 0; flex-shrink:0; color:var(--muted); font-size:10px; line-height:1.4; }
.mailbox-day-divider::before,.mailbox-day-divider::after { content:""; flex:1; height:1px; background:var(--line); opacity:.65; }
.mailbox-day-divider span { white-space:nowrap; }

.mailbox-info-readers time,.mailbox-info-readers small { color:var(--muted); font-size:11px; }

#mailbox-notifications { position:fixed; right:24px; bottom:24px; z-index:25; display:flex; flex-direction:column; gap:12px; width:min(350px,calc(100vw - 28px)); max-height:calc(100dvh - 40px); overflow-y:auto; }
#mailbox-notifications:empty { display:none; }
.mailbox-toast { position:relative; flex-shrink:0; padding:14px; background:#fff; border:1px solid #c8dbea; border-radius:9px; box-shadow:0 6px 26px #36557325; transform-origin:bottom right; animation:mailbox-toast-arrive 180ms ease-out both; }
.mailbox-toast-open { display:flex; flex-direction:column; gap:4px; width:100%; padding:0 26px 10px 0; text-align:left; background:transparent; color:var(--ink); }
.mailbox-toast-open small { color:var(--muted); font-size:10px; }
.mailbox-toast-open strong { font-size:13px; }
.mailbox-toast-preview { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; white-space:pre-wrap; font-size:12px; font-weight:400; }
.mailbox-toast-close { position:absolute; top:8px; right:8px; display:flex; padding:4px; background:transparent; color:var(--muted); border-radius:4px; }
.mailbox-toast-close:hover { background:#edf3f8; }
.mailbox-toast-close svg { width:16px; height:16px; }
.mailbox-toast form { display:flex; align-items:flex-end; gap:7px; }
.mailbox-toast input { flex:1; min-width:0; height:34px; padding:7px; font-size:12px; }
.mailbox-toast form button { height:34px; padding:7px 10px; font-size:11px; }
@keyframes mailbox-toast-arrive { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:scale(1); } }
@media(max-width:600px){#mailbox-notifications{right:14px;bottom:14px;}}
@media(prefers-reduced-motion:reduce){.mailbox-toast{animation:none;}}

.mailbox-toast-error { display:block; margin-top:6px; color:#a12b3a; font-size:11px; }

.mailbox-receipt-icon { width:20px; height:14px; flex-shrink:0; }

.mailbox-toast-identity { display:flex; align-items:center; gap:8px; min-width:0; }
.mailbox-toast-sender { display:flex; flex-direction:column; gap:2px; min-width:0; }

.mailbox-toast-leaving { animation:mailbox-toast-leave 180ms ease-in both; pointer-events:none; }
@keyframes mailbox-toast-leave { from { opacity:1; transform:scale(1); } to { opacity:0; transform:scale(.97); } }

@media(prefers-reduced-motion:reduce){.mailbox-toast,.mailbox-toast-leaving{animation:none;}}

.mailbox-toast-count { margin-left:auto; min-width:17px; height:17px; padding:0 4px; font-size:10px; }
.mailbox-toast-sender { flex:1; overflow-wrap:anywhere; }

.mailbox-reactions::-webkit-scrollbar { display:none; }

.avatar-crop { display:grid; gap:10px; margin-top:12px; }
.avatar-crop[hidden] { display:none; }
.avatar-crop-stage { position:relative; width:min(260px,100%); aspect-ratio:1; overflow:hidden; border-radius:50%; background:#edf3f8; border:1px solid var(--line); cursor:grab; touch-action:none; justify-self:center; }
.avatar-crop-stage.dragging { cursor:grabbing; }
.avatar-crop-stage:focus-visible { outline:2px solid var(--link); outline-offset:3px; }
.avatar-crop-stage img { position:absolute; max-width:none; user-select:none; pointer-events:none; }
.avatar-crop>small { text-align:center; color:var(--muted); font-size:11px; }
.avatar-crop label { gap:5px; }
.avatar-crop output { color:var(--muted); font-size:11px; }
.avatar-crop input[type=range] { padding:0; accent-color:var(--link); }
.avatar-crop>.text-button { justify-self:start; font-size:12px; }

.mailbox-heading h2 { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }

.source .document-audience { margin:0; color:var(--muted); font-size:11px; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex-shrink:0; }
.source .document-description { min-height:0; flex-shrink:1; }
.document-visibility>small { color:var(--muted); font-size:11px; }

.presence-avatar { position:relative; display:inline-flex; flex-shrink:0; vertical-align:middle; }
.person-avatar,.header-avatar,.mailbox-avatar { border-radius:50%; }
.presence-dot { position:absolute; top:14.6%; left:14.6%; transform:translate(-50%,-50%); width:14px; height:14px; border:2px solid #fff; border-radius:50%; background:#2c9b62; box-shadow:0 0 0 1px #2c9b6220; pointer-events:none; }
.presence-dot[data-presence-status=idle] { background:#e2ac2a; box-shadow:0 0 0 1px #e2ac2a20; }
.presence-dot[data-presence-status=offline] { background:#9aa5b1; box-shadow:0 0 0 1px #9aa5b120; }
.presence-dot[hidden] { display:none; }
.mailbox-message>.presence-avatar { position:absolute; top:0; left:-38px; width:28px; height:28px; }
.mailbox-message>.presence-avatar>.mailbox-avatar { width:28px; height:28px; font-size:12px; }
#notification-stack { position:fixed; right:24px; bottom:24px; z-index:25; display:flex; flex-direction:column; gap:12px; width:min(350px,calc(100vw - 28px)); max-height:calc(100dvh - 40px); overflow-y:auto; }
#notification-stack:has(>aside:empty):not(:has(.mailbox-toast)) { display:none; }
#notification-stack>#mailbox-notifications,#presence-notifications { position:static; display:flex; flex-direction:column; gap:12px; width:100%; max-height:none; overflow:visible; }
#notification-stack>aside:empty { display:none; }
.presence-toast { padding:0; }
.presence-toast-open { display:flex; align-items:center; gap:10px; width:100%; padding:14px 38px 14px 14px; border-radius:inherit; text-align:left; background:transparent; color:var(--ink); }
.presence-toast-open:hover { background:#f1f6fb; }
.presence-toast-open>span:last-child { display:flex; flex-direction:column; min-width:0; }
.presence-toast .mailbox-toast-close { z-index:1; }
.presence-toast strong { font-size:13px; overflow-wrap:anywhere; }
.presence-toast small { font-size:11px; color:var(--muted); }
.mailbox-typing { height:30px; flex:0 0 30px; display:flex; align-items:center; padding:0 2px; pointer-events:none; }
.mailbox-typing-content { display:inline-flex; align-items:center; gap:10px; animation:typing-appear 180ms ease-out both; }
.mailbox-typing-content.typing-leaving { animation:typing-disappear 180ms ease-in both; }
.mailbox-typing-avatars { display:inline-flex; align-items:center; padding-left:2px; }
.mailbox-typing-avatars .mailbox-avatar { width:25px; height:25px; border:2px solid #fff; font-size:10px; }
.mailbox-typing-avatars .mailbox-avatar+.mailbox-avatar { margin-left:-8px; }
.mailbox-typing-more { color:var(--muted); background:#edf3f8; }
.mailbox-typing-dots { display:flex; align-items:center; gap:4px; }
.mailbox-typing-dots i { width:4px; height:4px; border-radius:50%; background:#7994ab; animation:typing-dot 1.1s ease-in-out infinite; }
.mailbox-typing-dots i:nth-child(2) { animation-delay:130ms; }
.mailbox-typing-dots i:nth-child(3) { animation-delay:260ms; }
@keyframes typing-appear { from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)} }
@keyframes typing-disappear { from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(3px)} }
@keyframes typing-dot { 0%,60%,100%{opacity:.45;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)} }
@media(prefers-reduced-motion:reduce){.mailbox-typing-content,.mailbox-typing-content.typing-leaving,.mailbox-typing-dots i{animation:none}}
@media(max-width:600px){#notification-stack{right:14px;bottom:14px;}}
.session-list article {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}
.session-list article>div {min-width:0;overflow-wrap:anywhere}
.session-list .muted-copy {margin:4px 0}
.session-list .secondary {flex-shrink:0}
.accounts {display:grid;grid-template-columns:minmax(120px,1fr) repeat(4,max-content)}
.accounts.accounts-inactive {display:grid;grid-template-columns:minmax(120px,1fr) repeat(3,max-content)}
.accounts .account-row {display:grid;grid-template-columns:subgrid;gap:6px;padding:16px}
.accounts .account-actions {display:contents}
.accounts .account-actions button {min-width:0;min-height:30px;padding:5px 7px;font-size:10.5px;line-height:1.25;white-space:nowrap}
.accounts .account-profile-label {font-size:10px;justify-self:center}
@media(max-width:1200px){
 .accounts,.accounts.accounts-inactive {display:block}
 .accounts .account-row {grid-template-columns:minmax(0,1fr);gap:12px}
 .accounts .account-actions {display:flex;flex-wrap:wrap;gap:6px}
 .accounts .account-action-spacer {display:none}
}
.permission-profile-card {padding:22px}
.permission-profile-card h2 {margin:0 0 10px}
.permission-profile-card p {color:var(--muted);margin-bottom:18px}
/* Permission groups keep the fixed-role editor compact and scannable. */
.permission-group { border: 1px solid var(--line, #dde4e8); border-radius: 10px; background: #fff; }
.permission-group > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; }
.permission-group .form-section { border: 0; margin: 0; padding: 4px 16px 16px; }
.permission-group .inline-check { align-items: start; margin: 3px 0; padding: 5px 0; line-height: 1.4; }
.permission-group .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.role-standard-badge { font-size: 11px; }
.attendance-kind { margin: 0 0 12px 27px !important; font-size: 11px; max-width: 180px; }
.reorder-card { position: relative; }
.card-drag-handle { position: absolute; right: 10px; top: 10px; margin: 0; }
.permission-profile-card h2, .preset-card h2 { padding-right: 32px; }
.source .document-heading { min-width: 0; padding-right: 28px; }
.source .document-heading h2 { margin-bottom: 7px; }
.document-kind { display: inline-flex; align-items: center; }
.document-kind svg { width: 17px; height: 17px; }
.accounts .account-row.reorder-card { padding-right: 52px; }
.accounts .card-drag-handle { width: 26px; min-height: 30px; padding: 5px; }
.device-preview-buttons, .device-preview-toolbar > div { display: flex; gap: 7px; }
.device-preview-buttons button, .device-preview-toolbar button { display: inline-flex; align-items: center; gap: 6px; }
.device-preview-buttons svg, .device-preview-toolbar svg { width: 17px; height: 17px; }
.device-preview-dialog { width: min(1100px, calc(100vw - 32px)); height: calc(100dvh - 32px); max-height: none; padding: 0; }
.device-preview-dialog[open] { display: flex; flex-direction: column; }
.device-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.device-preview-header h2 { margin: 0; font-size: 19px; }
.device-preview-header small { color: var(--muted); }
.device-preview-header button { display: grid; place-items: center; padding: 7px; }
.device-preview-header svg { width: 21px; height: 21px; }
.device-preview-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.device-preview-toolbar label { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.device-preview-toolbar [aria-pressed="true"] { background: #eaf3fd; border-color: #bed9f1; }
.device-preview-toolbar [data-device-size] { margin-left: auto; color: var(--muted); font-size: 12px; }
.device-preview-stage { position: relative; display: flex; flex: 1; min-height: 0; overflow: auto; padding: 20px; background: #edf2f8; }
.device-preview-surface { position: relative; flex: none; margin: auto; background: #fff; border-radius: 14px; box-shadow: 0 0 0 7px #ccd7e5; }
.device-preview-surface iframe { position: absolute; top: 0; left: 0; display: block; border: 0; border-radius: 14px; background: #fff; transform-origin: top left; }
.device-preview-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 20px; color: var(--muted); text-align: center; }
.device-preview-loading[hidden] { display: none; }
.participant-badge { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; padding: 1px 5px; border-radius: 5px; background: #edf4f9; color: #48677d; font-size: 10px; font-weight: 500; white-space: nowrap; }
.participant-badge svg, .participant-switcher svg { width: 15px; height: 15px; flex: none; }
.participant-switcher { display: flex; gap: 3px; margin: 0; flex-wrap: wrap; }
.participant-switcher button { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; min-height: 24px; font-size: 11px; color: var(--muted); border: 1px solid transparent; border-radius: 6px; }
.participant-switcher button[aria-pressed="true"] { background: #eaf3fd; border-color: #c6ddec; color: #006da8; }
.user-identity { display: flex; flex-direction: column; }
.participant-login-choice { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.participant-login-choice legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.participant-login-choice > div { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.participant-login-choice label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.participant-login-choice input { width: auto; margin: 0; }
.participant-login-choice svg { width: 21px; height: 21px; }
.participant-login-choice small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }

#user-controls:has(.participant-switcher) { align-items: center; gap: 14px; }
.participant-presence { display: inline-flex; gap: 3px; margin-top: 3px; }
.participant-presence:empty { display: none; }
.participant-presence-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: #48677d; background: #edf4f9; border-radius: 5px; }
.participant-presence-icon svg { width: 17px; height: 17px; }
.task-rewards { position: fixed; inset: 0; z-index: 2500; pointer-events: none; overflow: clip; contain: layout paint; }
.task-xp-reward { position: absolute; padding: 7px 13px; border: 1px solid #b9dfd4; border-radius: 20px; background: #f1fcf7; color: #18725b; box-shadow: 0 4px 15px #28584818; font-size: 17px; font-weight: 700; white-space: nowrap; animation: task-xp-rise 2s ease-out both; }
.task-level-reward { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 32px); padding: 18px 24px; background: #fffaf0; border: 1px solid #e9d39c; border-radius: 16px; box-shadow: 0 10px 35px #725c3026; color: #865d18; animation: task-level-pop 3.8s ease both; }
.task-level-reward>svg { width: 38px; height: 38px; flex: none; color: #c38b24; }
.task-level-reward small { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.task-level-reward strong { display: block; margin-top: 3px; color: #77551c; font-size: 21px; }
.task-level-reward span { display: block; margin-top: 4px; font-size: 12px; }
.task-level-reward>i { position: absolute; width: 5px; height: 5px; background: #d9ad50; transform: rotate(45deg); border-radius: 1px; animation: task-reward-spark 800ms ease-out both; }
.task-level-reward>i:nth-last-child(3) { left: 13px; top: 10px; }
.task-level-reward>i:nth-last-child(2) { right: 15px; top: 15px; animation-delay: 80ms; }
.task-level-reward>i:last-child { right: 34px; bottom: 10px; animation-delay: 160ms; }
@keyframes task-xp-rise { 0% { opacity: 0; transform: translate(-50%,calc(-100% - 12px)) scale(.94); } 12% { opacity: 1; transform: translate(-50%,calc(-100% - 16px)) scale(1); } 78% { opacity: 1; transform: translate(-50%,calc(-100% - 48px)) scale(1); } 100% { opacity: 0; transform: translate(-50%,calc(-100% - 64px)) scale(.98); } }
@keyframes task-level-pop { 0% { opacity: 0; transform: translate(-50%,-8px) scale(.94); } 12%,85% { opacity: 1; transform: translate(-50%,0) scale(1); } 100% { opacity: 0; transform: translate(-50%,-6px) scale(.98); } }
@keyframes task-reward-spark { 0% { opacity: 0; transform: rotate(45deg) scale(0); } 45% { opacity: 1; transform: rotate(75deg) scale(1.4); } 100% { opacity: 0; transform: rotate(100deg) scale(.5); } }
.task-xp-reward { background: linear-gradient(110deg,#f1fcf7 32%,#ffffff 46%,#f1fcf7 60%); background-size: 250% 100%; animation: task-xp-rise 2s ease-out both, task-xp-glint 1.1s ease-in-out 180ms both; }
.task-xp-reward>i { position: absolute; width: 10px; height: 10px; background: #67ab94; clip-path: polygon(50% 0,60% 38%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 38%); animation: task-reward-spark 1s ease-in-out 2 both; }
.task-xp-reward>i:nth-last-child(3) { left: 5px; top: -5px; }
.task-xp-reward>i:nth-last-child(2) { right: -4px; top: 5px; animation-delay: 80ms; }
.task-xp-reward>i:last-child { right: 17px; bottom: -5px; animation-delay: 160ms; }
.task-level-reward>svg { transform-origin: center; animation: task-level-star 1.2s ease-in-out 180ms 2 both; }
.task-level-reward strong { animation: task-level-title 650ms cubic-bezier(.2,.8,.3,1.2) 100ms both; }
.task-level-reward>i { clip-path: polygon(50% 0,60% 38%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 38%); width: 10px; height: 10px; animation: task-reward-spark 1s ease-in-out 3 both; }
@keyframes task-xp-glint { from { background-position: 120% 0; } to { background-position: -80% 0; } }
@keyframes task-xp-twinkle { 0%,100% { opacity: 0; transform: rotate(-15deg) scale(.2); } 45% { opacity: .9; transform: rotate(20deg) scale(1); } }
@keyframes task-level-star { 0%,100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-12deg) scale(1.16); } 65% { transform: rotate(9deg) scale(.97); } }
@keyframes task-level-title { from { opacity: 0; transform: translateY(5px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .task-xp-reward { animation: none; transform: translate(-50%,calc(-100% - 12px)); } .task-level-reward { animation: none; } .task-level-reward>i { display: none; } }
@media (prefers-reduced-motion: reduce) { .task-xp-reward>i { display: none; } .task-level-reward>svg,.task-level-reward strong { animation: none; } }
@media (max-width: 480px) { #user-controls:has(.participant-switcher) { gap: 7px; flex-wrap: wrap; } .participant-switcher { flex-wrap: nowrap; } #user-controls:has(.participant-switcher) .user-profile-link>span:last-child { max-width: 130px; } }
/* Phone messenger: one full-screen panel at a time; desktop keeps its split view. */
.mailbox-mobile-toolbar,.mailbox-mobile-back{display:none}
@media all{
 body.mailbox-open:has(.mailbox-layout[data-messenger-device=phone]){overflow:hidden}
 .mailbox-open .mailbox-layout[data-messenger-device=phone]{position:fixed;z-index:100;inset:var(--mailbox-mobile-top,0px) 0 auto;height:var(--mailbox-mobile-height,100dvh);width:100%;display:flex;min-height:0;border:0;border-radius:0;background:var(--paper,#fff)}
 .mailbox-layout[data-messenger-device=phone] #mailbox-contact-splitter,.mailbox-layout[data-messenger-device=phone] #mailbox-splitter{display:none}
 .mailbox-layout[data-messenger-device=phone] .mailbox-sidebar,.mailbox-layout[data-messenger-device=phone] .mailbox-conversation{width:100%;height:100%;border:0;border-radius:0;box-sizing:border-box;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));margin:0}
 .mailbox-layout[data-messenger-device=phone][data-mobile-panel=contacts] .mailbox-conversation,.mailbox-layout[data-messenger-device=phone][data-mobile-panel=chat] .mailbox-sidebar{display:none}
 .mailbox-layout[data-messenger-device=phone] .mailbox-mobile-toolbar{display:flex;align-items:center;gap:10px;flex-shrink:0;padding-bottom:12px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-mobile-toolbar h1{font-size:21px;margin:0}
 .mailbox-layout[data-messenger-device=phone] .mailbox-mobile-back{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;padding:8px;border:0;background:transparent;color:inherit;border-radius:50%}
 .mailbox-layout[data-messenger-device=phone] .mailbox-mobile-back svg{width:24px;height:24px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-mobile-back:hover{background:#edf1ee}
 .mailbox-layout[data-messenger-device=phone] .mailbox-heading{align-items:center;justify-content:flex-start;gap:6px;padding-bottom:8px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-heading-identity{min-width:0}
 .mailbox-layout[data-messenger-device=phone] .mailbox-heading h2{font-size:16px;overflow-wrap:anywhere}
 .mailbox-layout[data-messenger-device=phone] .mailbox-heading p{font-size:11px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-thread{padding:12px 8px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-thread strong{font-size:14px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-preview small{font-size:12px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-preview time{font-size:11px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-thread-list{scrollbar-gutter:auto}
 .mailbox-layout[data-messenger-device=phone] .mailbox-composer{height:auto!important;flex:0 0 auto;border-top:1px solid #e2e8e2;padding-top:10px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-composer label{flex:none}
 .mailbox-layout[data-messenger-device=phone] .mailbox-composer textarea{height:60px;min-height:60px;max-height:120px;font-size:16px}
 .mailbox-layout[data-messenger-device=phone] .mailbox-composer>div>small{display:none}
 .mailbox-layout[data-messenger-device=phone] .mailbox-messages{scrollbar-gutter:auto}
}

/* Tablets keep both panes, inside a dedicated full-screen messenger. */
body.mailbox-open:has(.mailbox-layout[data-messenger-device=tablet]){overflow:hidden}
.mailbox-open .mailbox-layout[data-messenger-device=tablet]{position:fixed;z-index:100;inset:var(--mailbox-mobile-top,0px) 0 auto;width:100%;height:var(--mailbox-mobile-height,100dvh);min-height:0;border:0;border-radius:0;grid-template-columns:var(--mailbox-contact-width,280px) 12px minmax(0,1fr);background:#fff}
.mailbox-layout[data-messenger-device=tablet] .mailbox-sidebar,.mailbox-layout[data-messenger-device=tablet] .mailbox-conversation{border:0;border-radius:0;margin:0;box-sizing:border-box;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
.mailbox-layout[data-messenger-device=tablet] .mailbox-mobile-toolbar{display:flex;align-items:center;gap:8px;padding-bottom:12px;flex-shrink:0}
.mailbox-layout[data-messenger-device=tablet] .mailbox-mobile-toolbar h1{margin:0;font-size:20px}
.mailbox-layout[data-messenger-device=tablet] .mailbox-mobile-toolbar .mailbox-mobile-back{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;padding:8px;border:0;border-radius:50%;background:transparent;color:inherit}
.mailbox-layout[data-messenger-device=tablet] .mailbox-mobile-back svg{width:24px;height:24px}
.mailbox-layout[data-messenger-device=tablet] .mailbox-composer textarea{font-size:16px}
