:root {
  --froppy-blue: #0B79C9;
  --froppy-blue-dark: #075F9F;
  --froppy-navy: #132A4A;
  --froppy-green: #2FA86F;
  --froppy-orange: #F59E0B;
  --froppy-sky: #EAF6FD;
  /* compatibility aliases for older component selectors; visually these are Froppy blue */
  --froppy-accent: var(--froppy-blue);
  --froppy-accent-dark: var(--froppy-blue-dark);
  --ink: #142033;
  --muted: #667386;
  --line: #dce5ec;
  --soft: #f4f8fb;
  --white: #fff;
  --success: #0d7a4e;
  --warning: #8a5b00;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(19,42,74,.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--soft); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 10px 11px; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--froppy-accent); box-shadow: 0 0 0 3px rgba(11,121,201,.10); }
textarea { resize: vertical; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: #33465a; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; letter-spacing: -.03em; }
h2 { letter-spacing: -.02em; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--froppy-accent); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 800; }
.stack { display: grid; gap: 14px; }
.stack.compact { gap: 11px; }
.primary, .secondary, .send-button { border: 0; border-radius: 10px; padding: 11px 15px; font-weight: 750; }
.primary { background: var(--froppy-accent); color: var(--white); }
.primary:hover { background: var(--froppy-accent-dark); }
.secondary { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { border-color: #b8c8d6; }
.full { width: 100%; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--froppy-accent); color: #fff; font-weight: 900; letter-spacing: -.05em; box-shadow: 0 8px 24px rgba(11,121,201,.25); }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 13px; background: #eef5ff; color: #274a72; margin: 12px 0; }
.notice.error { background: #fff0ef; color: var(--danger); }
.notice.warning { background: #fff7e6; color: var(--warning); }
.app-shell { display: grid; grid-template-columns: 270px minmax(0,1fr); min-height: 100vh; }
.sidebar { background: #10243e; color: #fff; padding: 20px 16px; display: flex; flex-direction: column; min-height: 100vh; }
.brand-row { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row span { font-size: 12px; color: #c9d7e3; }
.section-label { margin: 24px 8px 8px; color: #8fa9bd; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.conversation-list { display: grid; gap: 5px; overflow-y: auto; }
.conversation-library-footer {
  margin-top: 10px;
  padding: 10px 4px 0;
  border-top: 1px solid #28405a;
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.conversation-library-delete-all {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8fa9bd;
  padding: 7px;
}
.conversation-library-delete-all:hover:not(:disabled) { background: rgba(180,35,24,.18); color: #ff9b94; }
.conversation-library-delete-all:disabled { opacity: .32; cursor: default; }
.conversation-library-delete-all svg { width: 19px; height: 19px; fill: currentColor; }

.conversation-item { width: 100%; border: 0; border-radius: 10px; padding: 10px; background: transparent; color: #eef5fa; text-align: left; display: grid; gap: 3px; }
.conversation-item:hover, .conversation-item.active { background: #1c3653; }
.conversation-item strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.conversation-item span { color: #a9bfd0; font-size: 11px; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 6px 0; border-top: 1px solid #28405a; }
.sidebar-footer a, .text-button { color: #d7e3ec; background: none; border: 0; padding: 0; text-decoration: none; font-size: 12px; }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 96px; background: var(--white); border-bottom: 1px solid var(--line); padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { font-size: 25px; }
.status-pills { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.pill { padding: 7px 10px; border-radius: 999px; background: #E8F5FD; color: #075F9F; font-size: 11px; font-weight: 800; }
.pill.neutral { background: var(--soft); color: #566575; }
.empty-state { margin: auto; text-align: center; width: min(760px, 100%); padding: 60px 28px; }
.empty-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 20px; background: #fff; color: var(--froppy-accent); font-size: 28px; box-shadow: var(--shadow); }
.empty-state h2 { font-size: 31px; margin-bottom: 8px; }
.empty-state > p { color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 28px; }
.quick-grid button { padding: 18px; min-height: 70px; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-align: left; font-weight: 700; color: var(--ink); }
.quick-grid button:hover { border-color: var(--froppy-accent); transform: translateY(-1px); }
.case-workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cycle { display: grid; grid-template-columns: repeat(5,1fr); background: #fff; border-bottom: 1px solid var(--line); padding: 0 28px; }
.cycle button { border: 0; background: transparent; padding: 14px 8px 12px; color: #6d7e8e; font-size: 12px; font-weight: 750; border-bottom: 3px solid transparent; }
.cycle button span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); margin-right: 6px; }
.cycle button.active { color: var(--froppy-accent); border-bottom-color: var(--froppy-accent); }
.cycle button.active span { background: var(--froppy-accent); color: white; }
.content-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 330px; }
.chat-panel { min-width: 0; display: flex; flex-direction: column; background: #f8fbfd; }
.messages { flex: 1; padding: 28px clamp(18px,5vw,70px); overflow-y: auto; display: grid; align-content: start; gap: 18px; }
.message { display: grid; gap: 7px; max-width: 820px; }
.message.user { justify-self: end; justify-items: end; }
.message .bubble { padding: 13px 15px; border-radius: 16px; line-height: 1.55; white-space: pre-wrap; font-size: 14px; }
.message.user .bubble { background: var(--froppy-accent); color: white; border-bottom-right-radius: 4px; }
.message.assistant .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: 0 6px 22px rgba(19,42,74,.04); }
.message-meta { color: var(--muted); font-size: 10px; }
.source-row { display: flex; gap: 6px; flex-wrap: wrap; }
.source-chip { border: 1px solid var(--line); background: var(--soft); color: #536576; font-size: 10px; border-radius: 999px; padding: 4px 7px; }
.composer { margin: 0 clamp(18px,5vw,70px) 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 9px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; box-shadow: 0 12px 30px rgba(19,42,74,.08); }
.composer textarea { border: 0; box-shadow: none; padding: 8px; max-height: 180px; }
.send-button { background: var(--ink); color: #fff; }
.fineprint { margin: 0 clamp(18px,5vw,70px) 18px; text-align: center; color: #718291; font-size: 10px; }
.context-panel { border-left: 1px solid var(--line); background: #fff; padding: 18px; overflow-y: auto; }
details { border: 1px solid var(--line); border-radius: 13px; margin-bottom: 12px; background: #fff; }
summary { cursor: pointer; padding: 13px; font-weight: 800; font-size: 13px; }
details form { padding: 0 13px 13px; }
.check-row { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.check-row input { width: auto; }
.danger-link { width: 100%; border: 0; background: none; color: var(--danger); padding: 10px; font-size: 12px; }
dialog { width: min(560px, calc(100% - 32px)); border: 0; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(14,31,52,.58); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; }
.icon-button { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; }
@media (max-width: 1050px) {
  .content-grid { grid-template-columns: minmax(0,1fr); }
  .context-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding: 12px; }
  .conversation-list { display: flex; overflow-x: auto; }
  .conversation-item { min-width: 180px; }
  .sidebar-footer { margin-top: 12px; }
  .topbar { padding: 16px; align-items: flex-start; }
  .topbar h1 { font-size: 20px; }
  .cycle { padding: 0 6px; overflow-x: auto; }
  .cycle button { min-width: 112px; }
  .quick-grid { grid-template-columns: 1fr; }
  .messages { padding: 20px 14px; }
  .composer { margin-left: 12px; margin-right: 12px; }
  .fineprint { margin-left: 12px; margin-right: 12px; }
}
.sidebar-footer { gap: 14px; align-items: flex-end; }
@media (max-width: 760px) {
}
.pill.success { background:#e7f6ef; color:#116b48; }
.pill.danger { background:#fff0ef; color:#a12620; }
.pill-button { border:1px solid var(--line); background:var(--white); border-radius:999px; padding:7px 11px; font-size:11px; font-weight:800; cursor:pointer; }
.system-notice { padding:10px 28px; font-size:12px; border-bottom:1px solid var(--line); }
.system-notice.success { background:#e7f6ef; color:#116b48; }
.system-notice.danger { background:#fff0ef; color:#a12620; }
.system-notice.neutral { background:#eef5f9; color:#52697c; }


/* 2026-08 UI refresh: Legacy logo, compact LLM indicator and settings area */
.brand-logo { width: 30px; height: 36px; object-fit: contain; display: block; flex: 0 0 auto; }
.brand-row { gap: 12px; }
.topbar { min-height: 82px; padding-top: 16px; padding-bottom: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: #97909a; box-shadow: 0 0 0 4px rgba(151,144,154,.12); flex: 0 0 auto; }
.status-dot.success { background: #16a36a; box-shadow: 0 0 0 4px rgba(22,163,106,.13); }
.status-dot.danger { background: #d92d20; box-shadow: 0 0 0 4px rgba(217,45,32,.12); }
.status-dot.checking { background: #97909a; animation: statusPulse 1.25s ease-in-out infinite; }
@keyframes statusPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.settings-button { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); color: #4d4750; text-decoration: none; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.settings-button:hover { border-color: #cfc7d0; background: var(--soft); transform: translateY(-1px); }
.settings-button svg { width: 20px; height: 20px; fill: currentColor; }

.settings-shell { display: grid; grid-template-columns: 270px minmax(0,1fr); min-height: 100vh; background: #f4f8fb; }
.settings-sidebar { position: sticky; top: 0; height: 100vh; }
.back-link { color: #fff; text-decoration: none; text-align: center; background: #1c3653; border-color: #31485f; }
.back-link:hover { border-color: #5f7282; }
.settings-main { width: min(1120px, 100%); padding: 34px clamp(22px,5vw,64px) 64px; }
.settings-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.settings-header h1 { margin: 0 0 5px; font-size: 34px; }
.settings-header p { margin-bottom: 0; }
.settings-kicker { color: var(--froppy-accent); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px !important; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: #fff; margin-bottom: 20px; }
.tab-button { border: 0; background: transparent; color: #6a636c; font-weight: 760; border-radius: 9px; padding: 10px 18px; }
.tab-button.active { background: var(--ink); color: #fff; }
.tab-panel { display: grid; gap: 18px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 10px 28px rgba(19,42,74,.07), 0 2px 8px rgba(19,42,74,.04); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.card-head h2 { margin: 0 0 5px; font-size: 20px; }
.card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.settings-form > label:nth-child(3) { grid-column: 1 / -1; }
.settings-form .advanced-settings, .settings-form .form-actions, .settings-form .setting-check { grid-column: 1 / -1; }
.field-hint { font-size: 11px; color: var(--muted); font-weight: 500; }
.setting-check { justify-content: flex-start; width: fit-content; }
.advanced-settings { border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.advanced-settings summary { padding: 13px 15px; }
.nested-form { padding: 2px 15px 15px; }
.form-actions { display: flex; justify-content: flex-end; }
.security-note { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.settings-message { border-radius: 10px; padding: 10px 12px; margin: -6px 0 18px; font-size: 12px; }
.settings-message.success { background:#e7f6ef; color:#116b48; }
.settings-message.danger { background:#fff0ef; color:#a12620; }
.settings-message.neutral { background:#eef5f9; color:#52697c; }
.knowledge-list { display: grid; gap: 10px; }
.knowledge-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 22px; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; }
.knowledge-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.knowledge-title-row h3 { margin: 0; font-size: 15px; }
.knowledge-file { color: #718291; background: var(--soft); border-radius: 999px; padding: 3px 7px; font-size: 10px; }
.knowledge-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.knowledge-meta span { color: #697b8a; font-size: 10px; }
.knowledge-info p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.switch { position: relative; width: 46px; height: 26px; display: block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; border-radius: 999px; background: #cbc5cd; transition: .2s; }
.slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + .slider { background: var(--froppy-accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid rgba(11,121,201,.18); }
.upload-form { display: flex; align-items: stretch; gap: 12px; }
.file-drop { flex: 1; display: flex; align-items: center; border: 1px dashed #cfc7d0; border-radius: 12px; padding: 15px; background: #f8fbfd; cursor: pointer; }
.file-drop input { width: auto; max-width: 250px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.file-drop span { font-weight: 500; margin-left: 14px; color: #514a54; }
.file-drop small { color: var(--muted); }
.metadata-example { margin-top: 16px; color: var(--muted); font-size: 11px; }
.metadata-example pre { margin: 8px 0 0; padding: 12px; border-radius: 10px; background: #10243e; color: #f3edf4; overflow-x: auto; line-height: 1.5; }

@media (max-width: 800px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-sidebar { position: static; height: auto; min-height: auto; }
  .settings-main { padding: 24px 16px 48px; }
  .settings-form { grid-template-columns: 1fr; }
  .settings-form > label:nth-child(3) { grid-column: auto; }
  .settings-form .advanced-settings, .settings-form .form-actions, .settings-form .setting-check { grid-column: auto; }
  .upload-form { flex-direction: column; }
  .file-drop { display: grid; gap: 10px; }
  .file-drop span { margin-left: 0; }
}

/* Settings tabs: hidden panels must never be laid out by the grid rule above. */
.tab-panel[hidden] { display: none !important; }
.tab-button:focus-visible { outline: 3px solid rgba(11,121,201,.18); outline-offset: 2px; }

.persona-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.persona-card { position: relative; display: block; cursor: pointer; }
.persona-card input { position: absolute; opacity: 0; pointer-events: none; }
.persona-body { display: grid; gap: 7px; height: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease; }
.persona-body strong { font-size: 14px; color: var(--ink); }
.persona-body small { color: var(--muted); line-height: 1.45; }
.persona-example { display: block; margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--line); color: #68606b; font-size: 11px; line-height: 1.45; }
.persona-card:hover .persona-body { border-color: #c9c0ca; transform: translateY(-1px); }
.persona-card.selected .persona-body { border-color: var(--froppy-accent); background: #F5FBFF; box-shadow: 0 0 0 3px rgba(11,121,201,.08); }
.persona-card.selected .persona-body::after { content: "Ausgew\00E4hlt"; justify-self: start; color: var(--froppy-accent); background: rgba(11,121,201,.08); border-radius: 999px; padding: 3px 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.persona-card input:focus-visible + .persona-body { outline: 3px solid rgba(11,121,201,.18); outline-offset: 2px; }
.communication-rule { margin-top: 18px; padding: 13px 15px; border-radius: 12px; background: #f4f8fb; color: #5d5660; font-size: 12px; line-height: 1.5; }
.persona-actions { margin-top: 18px; }

@media (max-width: 820px) {
  .persona-grid { grid-template-columns: 1fr; }
  .tabs { display: flex; width: 100%; overflow-x: auto; }
  .tab-button { flex: 0 0 auto; }
}

/* LLM provider chain */
.provider-stack { display: grid; gap: 18px; }
.provider-card { position: relative; }
.provider-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provider-title-row h2 { margin: 0; }
.provider-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.provider-badge.primary { background: rgba(11,121,201,.10); color: var(--froppy-accent, #0B79C9); }
.provider-badge.fallback { background: rgba(34,106,199,.10); color: #226ac7; }
.primary-provider { border-top: 3px solid var(--froppy-accent, #0B79C9); }
.fallback-provider { border-top: 3px solid #226ac7; }
.fallback-master-switch { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 16px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 14px; background: #f6f9fb; cursor: pointer; }
.fallback-master-switch > span:first-child { display: grid; gap: 3px; }
.fallback-master-switch small { color: var(--muted); font-size: 11px; }
.fallback-disabled { opacity: .58; }
.external-provider-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff7e8; border: 1px solid #f2d49d; color: #5e461a; font-size: 12px; line-height: 1.5; }
.provider-save-card { display: grid; gap: 16px; }
.provider-chain-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.provider-chain-summary > strong { width: 100%; margin-bottom: 2px; }
.provider-chain-summary span:not(.chain-arrow) { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9fb; }
.provider-chain-summary b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dce5ec; font-size: 10px; }
.provider-chain-summary em { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 999px; }
.provider-chain-summary em.enabled { background: rgba(22,163,106,.11); color: #0d7a4d; }
.provider-chain-summary em.disabled { background: #dce5ec; color: var(--muted); }
.chain-arrow { color: var(--muted); font-size: 18px; }
@media (max-width: 720px) {
  .fallback-master-switch { align-items: flex-start; }
  .provider-chain-summary .chain-arrow { transform: rotate(90deg); }
}

.priority-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.priority-card { display:flex; align-items:flex-start; gap:12px; padding:15px 16px; border:1px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; }
.priority-card:has(input:checked) { border-color:var(--froppy-accent,#0B79C9); box-shadow:0 0 0 2px rgba(11,121,201,.08); }
.priority-card:has(input:disabled) { opacity:.48; cursor:not-allowed; }
.priority-card input { margin-top:3px; accent-color:var(--froppy-accent,#0B79C9); }
.priority-card span { display:grid; gap:4px; }
.priority-card small { color:var(--muted); line-height:1.4; }
.provider-card .form-actions { margin-top:18px; }
@media (max-width:760px){ .priority-options{grid-template-columns:1fr;} }

/* 2026-08 Humanized coaching conversation */
.cycle-area { background: #fff; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.cycle-area .cycle { border-bottom: 0; }
.cycle button { position: relative; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.cycle button.complete { color: #4f4952; }
.cycle button.complete span { background: #ebe7ec; color: #4f4952; }
.cycle button.active { background: linear-gradient(180deg, rgba(11,121,201,0) 0%, rgba(11,121,201,.035) 100%); }
.phase-status { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 28px 10px; color: var(--muted); font-size: 11px; border-top: 1px solid #f1eef2; }
.phase-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--froppy-accent); box-shadow: 0 0 0 4px rgba(11,121,201,.08); flex: 0 0 auto; }
.phase-status-kicker { color: #827a85; text-transform: uppercase; letter-spacing: .06em; font-size: 9px; font-weight: 850; }
.phase-status strong { color: var(--ink); font-size: 11px; }
#phase-status-copy { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-panel { min-height: 0; overflow: hidden; position: relative; }
.messages { min-height: 0; display: flex; flex-direction: column; align-content: initial; gap: 18px; overscroll-behavior: contain; scroll-behavior: smooth; }
.messages::before { content: ""; margin-top: auto; }
.message { flex: 0 0 auto; width: fit-content; max-width: min(820px, 88%); }
.message.user { align-self: flex-end; justify-self: auto; justify-items: end; }
.message.assistant { align-self: flex-start; }
.message .bubble { overflow-wrap: anywhere; }

.composer-zone { position: sticky; bottom: 0; z-index: 5; flex: 0 0 auto; padding: 10px clamp(18px,5vw,70px) 12px; background: linear-gradient(180deg, rgba(251,250,251,.15) 0%, rgba(251,250,251,.96) 18%, #f8fbfd 42%); border-top: 1px solid rgba(231,227,233,.8); }
.composer-zone .notice { margin: 0 0 8px; }
.composer { margin: 0; border-radius: 18px; padding: 8px 9px 8px 12px; align-items: end; box-shadow: 0 10px 34px rgba(19,42,74,.10); }
.composer textarea { resize: none; min-height: 38px; max-height: 150px; line-height: 1.5; padding: 8px 6px; overflow-y: hidden; }
.send-button { min-height: 40px; padding: 9px 16px; align-self: end; }
.composer-hint { margin: 6px 3px 0; text-align: right; color: #8a838d; font-size: 9px; }
.composer-zone .fineprint { margin: 4px 3px 0; text-align: center; }

.typing-message { min-width: 92px; }
.typing-bubble { display: flex; align-items: center; gap: 5px; min-height: 42px; }
.typing-bubble span { width: 6px; height: 6px; border-radius: 50%; background: #8f8791; animation: typingDot 1.1s infinite ease-in-out; }
.typing-bubble span:nth-child(2) { animation-delay: .14s; }
.typing-bubble span:nth-child(3) { animation-delay: .28s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

@media (min-width: 1051px) {
  .app-shell { height: 100vh; height: 100dvh; min-height: 100vh; overflow: hidden; }
  .sidebar { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .workspace { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .topbar { flex: 0 0 auto; }
  .case-workspace { min-height: 0; overflow: hidden; }
  .content-grid { min-height: 0; overflow: hidden; }
  .context-panel { min-height: 0; }
}

@media (max-width: 1050px) {
  .chat-panel { min-height: 68vh; }
  .phase-status { padding-left: 16px; padding-right: 16px; }
  #phase-status-copy { white-space: normal; }
}

@media (max-width: 760px) {
  .phase-status { align-items: flex-start; flex-wrap: wrap; gap: 6px 8px; }
  .phase-status::before { margin-top: 4px; }
  #phase-status-copy { flex-basis: calc(100% - 16px); margin-left: 15px; }
  .messages { padding-bottom: 14px; }
  .composer-zone { padding: 9px 12px 10px; }
  .composer-hint { display: none; }
  .composer-zone .fineprint { font-size: 9px; }
}


/* 2026-08 Conversation library: folders, drag & drop and hover delete */
.folder-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-icon-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c9d7e3;
  padding: 5px;
}
.sidebar-icon-action:hover { background: #1c3653; color: #fff; }
.sidebar-icon-action svg { width: 18px; height: 18px; fill: currentColor; }

.conversation-list {
  display: block;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}
.conversation-folder { margin-bottom: 7px; border-radius: 10px; }
.folder-header {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
  transition: background .12s ease, outline-color .12s ease;
}
.folder-header:hover { background: rgba(255,255,255,.035); }
.folder-toggle {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 14px 18px minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #d7e3ec;
  padding: 6px 6px;
  text-align: left;
}
.folder-toggle svg { display: block; }
.folder-chevron { width: 14px; height: 14px; color: #718291; transition: transform .15s ease; }
.folder-chevron svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.conversation-folder:not(.collapsed) .folder-chevron { transform: rotate(90deg); }
.folder-icon { width: 17px; height: 17px; color: #8fa9bd; }
.folder-icon svg { width: 17px; height: 17px; fill: currentColor; }
.folder-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 780;
}
.folder-count {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #29222c;
  color: #938a97;
  font-size: 9px;
  text-align: center;
}
.folder-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  padding-right: 3px;
}
.folder-header:hover .folder-actions,
.folder-header:focus-within .folder-actions {
  opacity: 1;
  pointer-events: auto;
}
.folder-action {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  padding: 5px;
  background: transparent;
  color: #81909d;
}
.folder-action:hover { background: #20384f; color: #fff; }
.folder-action.danger:hover { color: #ff8b8b; }
.folder-action svg { width: 15px; height: 15px; fill: currentColor; }

.folder-contents {
  display: grid;
  gap: 3px;
  min-height: 7px;
  padding: 2px 0 4px 17px;
  border-radius: 10px;
  transition: background .12s ease, box-shadow .12s ease;
}
.conversation-folder.collapsed .folder-contents { display: none; }
.folder-empty {
  margin: 2px 4px 5px;
  padding: 8px 9px;
  border: 1px dashed #3c3340;
  border-radius: 8px;
  color: #776d7a;
  font-size: 9px;
  line-height: 1.35;
}

.conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) 30px;
  align-items: center;
  border-radius: 10px;
  cursor: grab;
  transition: opacity .12s ease, background .12s ease;
}
.conversation-row:active { cursor: grabbing; }
.conversation-row.dragging { opacity: .38; }
.conversation-row:hover,
.conversation-row.active { background: #1c3653; }
.conversation-row .conversation-item {
  min-width: 0;
  padding: 9px 6px 9px 10px;
  border-radius: 10px 0 0 10px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.conversation-row.dragging .conversation-item { cursor: grabbing; }
.conversation-row .conversation-item:hover,
.conversation-row.active .conversation-item { background: transparent; }
.conversation-delete {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #718291;
  opacity: 0;
  pointer-events: none;
  padding: 6px;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
}
.conversation-row:hover .conversation-delete,
.conversation-row:focus-within .conversation-delete {
  opacity: 1;
  pointer-events: auto;
}
.conversation-delete:hover { color: #ff8b8b; background: #4a2a2a; }
.conversation-delete svg { width: 15px; height: 15px; fill: currentColor; }

.drop-target.drag-over {
  background: rgba(11,121,201,.13);
  box-shadow: inset 0 0 0 1px rgba(11,121,201,.48);
}
.folder-header.drag-over .folder-name { color: #fff; }
.folder-dialog-hint { margin: -3px 0 3px; font-size: 11px; line-height: 1.45; }

@media (max-width: 760px) {
  .conversation-list {
    display: block;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .conversation-item { min-width: 0; }
  .folder-actions,
  .conversation-delete {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 2026-08 Compact coaching workspace: optional detail rail */
.content-grid.context-collapsed { grid-template-columns: minmax(0,1fr); }
.content-grid.context-collapsed .context-panel { display: none; }
.context-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #5d5660;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.context-toggle:hover, .context-toggle[aria-expanded="true"] { border-color: #c8bec9; background: #f3f8fb; color: var(--ink); }
.context-toggle svg { width: 15px; height: 15px; fill: currentColor; }

.boundary-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 9px;
  padding: 10px 12px;
  border: 1px solid #f0cf83;
  border-radius: 12px;
  background: #fff8e8;
  color: #5c4513;
  box-shadow: 0 5px 16px rgba(89, 62, 5, .05);
}
.boundary-banner[hidden] { display: none; }
.boundary-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1b735;
  color: #2e2208;
  font-size: 13px;
  font-weight: 900;
}
.boundary-banner div { display: grid; gap: 2px; }
.boundary-banner strong { font-size: 11px; }
.boundary-banner span:not(.boundary-icon) { font-size: 10px; line-height: 1.45; color: #735a20; }

/* 2026-08 Modular communication profile */
.personality-sliders { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.personality-slider {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.personality-slider .slider-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.personality-slider .slider-head strong { font-size: 13px; color: var(--ink); }
.personality-slider output {
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f7edf3;
  color: var(--froppy-accent);
  text-align: center;
  font-size: 10px;
  font-weight: 850;
}
.personality-slider .slider-copy { min-height: 32px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.personality-slider input[type="range"] { width: 100%; accent-color: var(--froppy-accent); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; color: #8a828d; font-size: 9px; }
.communication-preview {
  margin-top: 16px;
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  border-radius: 14px;
  background: #f3f8fb;
  border: 1px solid #eee8ed;
}
.communication-preview > span { color: var(--froppy-accent); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; font-weight: 850; }
.communication-preview strong { font-size: 14px; }
.communication-preview p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

@media (max-width: 1050px) {
  .content-grid:not(.context-collapsed) { grid-template-columns: minmax(0,1fr); }
  .content-grid:not(.context-collapsed) .context-panel { display: block; }
}
@media (max-width: 760px) {
  .personality-sliders { grid-template-columns: 1fr; }
  .context-toggle span { display: none; }
  .context-toggle { padding: 6px; }
}


/* 2026-08 Phase transitions inside the coaching conversation */
.chat-phase-divider {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 8px 0 2px;
  color: var(--froppy-accent, #0B79C9);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.chat-phase-divider::before,
.chat-phase-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, rgba(11,121,201,.08), rgba(11,121,201,.55));
}
.chat-phase-divider::after {
  background: linear-gradient(90deg, rgba(11,121,201,.55), rgba(11,121,201,.08));
}
.chat-phase-divider span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11,121,201,.065);
  white-space: nowrap;
}

/* Uncategorized conversations are a plain list below a separator, not a folder. */
.unassigned-section { margin-top: 10px; }
.unassigned-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 8px 4px 7px;
  color: #718291;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background .12s ease, color .12s ease;
}
.unassigned-divider::before,
.unassigned-divider::after { content: ""; height: 1px; background: #31485f; }
.unassigned-divider.drag-over { background: rgba(11,121,201,.10); color: #D5EAF7; }
.unassigned-conversations { min-height: 18px; border-radius: 9px; padding: 1px 0; }
.unassigned-conversations.drag-over { outline: 1px dashed rgba(11,121,201,.65); background: rgba(11,121,201,.06); }
.unassigned-empty { padding: 7px 10px 10px; color: #6f6672; font-size: 9px; text-align: center; }

/* 2026-08 Reflection calendar, archive and completion state */
.calendar-button.active { border-color: rgba(11,121,201,.42); color: var(--froppy-accent); background: #F5FBFF; }
.case-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.case-title-row h1 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: #efebef; color: #655e68; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.due-date-hint { margin: -2px 0 3px; font-size: 10px; line-height: 1.45; }
.cycle button:disabled { cursor: default; opacity: .68; }
.composer button:disabled { cursor: default; opacity: .45; }
.sidebar-new-link { display: block; text-align: center; text-decoration: none; }
.brand-link { color: inherit; text-decoration: none; }

.calendar-workspace { min-height: 100vh; background: #f4f8fb; }
.calendar-kicker, .calendar-eyebrow { margin: 0 0 5px; color: var(--froppy-accent); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.calendar-page {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) 360px;
  gap: 18px;
  padding: 22px 24px 28px;
  overflow: hidden;
}
.calendar-main-card,
.calendar-list-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(19,42,74,.045);
}
.calendar-main-card { min-width: 0; display: flex; flex-direction: column; padding: 20px; overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.calendar-toolbar h2 { margin: 0; font-size: 22px; }
.calendar-nav { display: flex; align-items: center; gap: 7px; }
.compact-button { padding: 8px 11px; font-size: 11px; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; background: #f5f9fc; }
.calendar-weekdays span { padding: 9px 8px; text-align: center; color: #817985; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.calendar-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); grid-auto-rows: minmax(94px,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); overflow: auto; }
.calendar-day { min-width: 0; min-height: 94px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-day.outside { background: #f8fbfd; color: #b7b0b9; }
.calendar-day.today { box-shadow: inset 0 0 0 2px rgba(11,121,201,.22); }
.calendar-day-number { width: 25px; height: 25px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.calendar-day.today .calendar-day-number { background: var(--froppy-accent); color: #fff; }
.calendar-events { display: grid; gap: 4px; }
.calendar-event { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 8px; background: rgba(11,121,201,.09); color: #075F9F; text-decoration: none; font-size: 9px; font-weight: 750; line-height: 1.25; }
.calendar-event:hover { background: rgba(11,121,201,.16); }
.calendar-event.overdue { background: #fff0f2; box-shadow: inset 0 0 0 1px rgba(11,121,201,.18); }
.calendar-event > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--froppy-accent); box-shadow: 0 0 0 3px rgba(11,121,201,.10); }
.calendar-footnote { margin: 12px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.calendar-load-error { grid-column: 1 / -1; padding: 24px; color: var(--danger); }

.calendar-side-rail { min-height: 0; display: grid; grid-template-rows: minmax(190px,.75fr) minmax(260px,1.25fr); gap: 18px; overflow: hidden; }
.calendar-list-card { min-height: 0; padding: 18px; display: flex; flex-direction: column; overflow: hidden; }
.calendar-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.calendar-list-head h2 { margin: 0; font-size: 17px; }
.count-badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: rgba(11,121,201,.10); color: var(--froppy-accent); font-size: 10px; font-weight: 850; }
.count-badge.neutral { background: #efebef; color: #655e68; }
.archive-copy { margin: -2px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.calendar-list { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 7px; padding-right: 2px; }
.calendar-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-decoration: none; }
.calendar-list-item:hover { border-color: #d1c7d0; background: #f8fbfd; }
.calendar-list-item.overdue { border-left: 3px solid var(--froppy-accent); }
.calendar-list-item > div { min-width: 0; display: grid; gap: 3px; }
.calendar-list-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.calendar-list-item span { color: var(--muted); font-size: 9px; }
.calendar-list-item time { flex: 0 0 auto; color: #766e79; font-size: 9px; font-weight: 750; }
.calendar-list-empty { padding: 18px 10px; color: #8b838e; text-align: center; font-size: 10px; line-height: 1.5; }

.calendar-sidebar-folder { margin-bottom: 10px; }
.calendar-sidebar-folder-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; color: #a89fab; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.calendar-sidebar-folder-name span { color: #736a76; }
.calendar-sidebar-conversation { display: grid; gap: 3px; margin: 1px 0; padding: 9px 10px; border-radius: 10px; color: #eef5fa; text-decoration: none; }
.calendar-sidebar-conversation:hover { background: #1c3653; }
.calendar-sidebar-conversation strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.calendar-sidebar-conversation span { color: #8fa9bd; font-size: 9px; }
.unassigned-calendar-folder { padding-top: 8px; border-top: 1px solid #28405a; }
.calendar-sidebar-empty { padding: 16px 10px; color: #8f8692; font-size: 10px; line-height: 1.5; text-align: center; }

@media (min-width: 1051px) {
  .calendar-shell { height: 100vh; height: 100dvh; overflow: hidden; }
  .calendar-workspace { height: 100vh; height: 100dvh; overflow: hidden; }
}
@media (max-width: 1180px) {
  .calendar-page { grid-template-columns: minmax(0,1fr) 315px; padding-left: 16px; padding-right: 16px; }
  .calendar-day { padding: 6px; }
  .calendar-event { font-size: 8px; }
}
@media (max-width: 950px) {
  .calendar-page { display: block; overflow-y: auto; }
  .calendar-main-card { min-height: 650px; margin-bottom: 16px; }
  .calendar-side-rail { overflow: visible; grid-template-rows: auto; }
  .calendar-list-card { max-height: 420px; }
}
@media (max-width: 760px) {
  .calendar-main-card { padding: 12px; min-height: 560px; }
  .calendar-toolbar { align-items: flex-start; }
  .calendar-weekdays span { padding: 7px 2px; }
  .calendar-grid { grid-auto-rows: minmax(78px,1fr); }
  .calendar-day { min-height: 78px; padding: 4px; }
  .calendar-event > span:last-child { display: none; }
  .calendar-event { width: 22px; padding: 5px; border-radius: 999px; }
  .calendar-event-dot { margin: auto; }
}

/* 2026-08 Manual completion workflow + persistent top navigation */
.topbar-new-case {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(11,121,201,.28);
  border-radius: 11px;
  background: #F5FBFF;
  color: var(--froppy-accent);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
button.topbar-new-case { cursor: pointer; }
.topbar-new-case:hover { border-color: var(--froppy-accent); background: #F1F9FE; }
.nav-icon.active {
  border-color: var(--froppy-accent) !important;
  color: var(--froppy-accent) !important;
  background: #F5FBFF !important;
  box-shadow: 0 0 0 2px rgba(11,121,201,.10);
}
.settings-header-actions { flex: 0 0 auto; }

/* Calendar uses exactly the same folder tree/collapse state as the chat view. */
.calendar-shell .folder-contents .calendar-sidebar-conversation { margin-left: 0; }
.calendar-shell .unassigned-conversations .calendar-sidebar-conversation { margin-left: 0; }
.calendar-shell .conversation-folder { margin-bottom: 7px; }

@media (max-width: 760px) {
  .topbar-actions { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
  .topbar-new-case { min-height: 34px; padding: 0 10px; }
  .settings-header { align-items: flex-start; flex-direction: column; }
  .settings-header-actions { width: 100%; justify-content: flex-start; }
}

/* 2026-08 Unified application chrome: Settings matches Chat/Calendar. */
.settings-workspace { min-width: 0; }
.settings-workspace .settings-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
  max-width: 1240px;
  padding: 28px clamp(22px,5vw,64px) 64px;
}
.settings-shell .conversation-list { flex: 1 1 auto; min-height: 0; }
.settings-shell .folder-contents .calendar-sidebar-conversation,
.settings-shell .unassigned-conversations .calendar-sidebar-conversation { margin-left: 0; }
.settings-shell .conversation-folder { margin-bottom: 7px; }
.settings-workspace .topbar h1 { margin: 0; }

@media (min-width: 1051px) {
  .settings-shell { height: 100vh; height: 100dvh; overflow: hidden; }
  .settings-workspace { height: 100vh; height: 100dvh; overflow: hidden; }
}
@media (max-width: 760px) {
  .settings-workspace .settings-main { padding: 20px 16px 48px; overflow: visible; }
}

/* 2026-08 Autocase composer, compact unified topbar and push-to-talk */
.topbar {
  height: 64px;
  min-height: 64px;
  padding: 0 22px;
  align-items: center;
  gap: 16px;
}
.topbar h1 {
  margin: 0;
  min-width: 0;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
}
.case-title-row h1 { flex: 1 1 auto; }
.topbar-actions { flex: 0 0 auto; gap: 8px; flex-wrap: nowrap; }
.settings-button { width: 36px; height: 36px; border-radius: 10px; }
.settings-button svg { width: 18px; height: 18px; }
.status-dot { width: 10px; height: 10px; box-shadow: 0 0 0 3px rgba(151,144,154,.12); margin-right: 2px; }
.status-dot.success { box-shadow: 0 0 0 3px rgba(22,163,106,.13); }
.status-dot.danger { box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
.calendar-kicker { display: none !important; }

.composer { grid-template-columns: minmax(0,1fr) auto auto; }
.voice-button {
  width: 40px;
  height: 40px;
  align-self: end;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0;
  background: #fff;
  color: #5d5660;
  touch-action: manipulation;
  user-select: none;
  margin-right: 7px;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.voice-button:hover { border-color: #c9c0ca; color: var(--froppy-accent); }
.voice-button svg { width: 19px; height: 19px; fill: currentColor; }
.voice-button.voice-enabled {
  color: #fff;
  background: var(--froppy-accent);
  border-color: var(--froppy-accent);
  box-shadow: 0 0 0 4px rgba(11,121,201,.10);
}
.voice-button.voice-enabled:hover { color: #fff; border-color: var(--froppy-accent); background: #0B79C9; }
.voice-button.listening {
  animation: voicePulse 1.1s ease-in-out infinite;
}
.voice-button.unsupported,
.voice-button:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }
@keyframes voicePulse { 0%,100% { box-shadow: 0 0 0 4px rgba(11,121,201,.10); } 50% { box-shadow: 0 0 0 8px rgba(11,121,201,.16); } }

.empty-state {
  width: min(820px, 100%);
  padding-top: 44px;
  padding-bottom: 44px;
}
.empty-composer {
  width: min(680px, 100%);
  margin: 26px auto 0;
  text-align: left;
}
.empty-composer textarea { resize: none; min-height: 38px; max-height: 150px; line-height: 1.5; overflow-y: hidden; }
.empty-composer-hint { margin: 8px auto 0 !important; color: #8a838d !important; font-size: 10px; }
.empty-state .quick-grid { margin-top: 22px; }

@media (max-width: 760px) {
  .topbar {
    height: 60px;
    min-height: 60px;
    padding: 0 12px;
    align-items: center;
  }
  .topbar h1 { font-size: 18px; }
  .topbar-actions { gap: 6px; }
  .settings-button { width: 34px; height: 34px; }
  .empty-state { padding: 34px 14px; }
  .empty-composer { margin-left: 0; margin-right: 0; }
  .composer { grid-template-columns: minmax(0,1fr) 38px auto; }
  .voice-button { width: 38px; height: 38px; }
}


/* 2026-08 Composer reset, phase visibility and case title actions */
.case-title-row { min-width: 0; display: flex; align-items: center; gap: 8px; position: relative; }
.case-title-row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-title-menu-wrap { position: relative; flex: 0 0 auto; }
.case-title-menu-button {
  width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: #718291; font-size: 15px; font-weight: 900; letter-spacing: 1px; padding: 0;
}
.case-title-menu-button:hover, .case-title-menu-button[aria-expanded="true"] { background: #f4eff3; color: var(--froppy-accent, #0B79C9); }
.case-title-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 142px; padding: 5px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 34px rgba(19,42,74,.16);
}
.case-title-menu button {
  width: 100%; border: 0; border-radius: 7px; background: transparent; color: var(--ink); padding: 8px 10px;
  text-align: left; font-size: 11px; font-weight: 750;
}
.case-title-menu button:hover { background: rgba(11,121,201,.07); color: var(--froppy-accent, #0B79C9); }
.chat-phase-divider { flex: 0 0 auto; }

/* 2026-08 Coach avatar + reliable case title actions */
/* The title itself owns ellipsis; the surrounding row must stay visible so the action menu can escape it. */
.case-title-row { overflow: visible; }
.case-title-row h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-title-menu-wrap { z-index: 70; }
.case-title-menu[hidden] { display: none !important; }
.case-title-menu:not([hidden]) { display: block; }

.empty-coach-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.empty-coach-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(19,42,74,.13));
}

.message.assistant { max-width: min(880px, 92%); }
.assistant-message-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  min-width: 0;
}
.coach-message-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  display: block;
  margin-bottom: 1px;
}
.assistant-message-content {
  min-width: 0;
  max-width: min(820px, calc(100% - 45px));
  display: grid;
  gap: 7px;
}
.assistant-message-content .bubble { width: fit-content; max-width: 100%; }
.assistant-message-content .source-row { max-width: 100%; }

@media (max-width: 760px) {
  .empty-coach-avatar { width: 82px; height: 82px; margin-bottom: 16px; }
  .coach-message-avatar { width: 31px; height: 31px; flex-basis: 31px; }
  .assistant-message-row { gap: 7px; }
  .assistant-message-content { max-width: calc(100% - 38px); }
}


/* v0.7.2 Nuggets: explicit Gemini metadata upload */
.nugget-upload-card { box-shadow: 0 14px 34px rgba(19,42,74,.08), 0 3px 10px rgba(19,42,74,.05); }
.nugget-analysis-engine { display:flex; align-items:center; gap:11px; padding:12px 14px; margin:2px 0 16px; border:1px solid var(--line); border-radius:12px; background:#f8fbfd; box-shadow:0 7px 18px rgba(19,42,74,.05); }
.nugget-analysis-engine > span:nth-child(2) { min-width:0; display:grid; gap:2px; flex:1; }
.nugget-analysis-engine strong { font-size:11px; color:#43596a; }
.nugget-analysis-engine small { font-size:9.5px; color:var(--muted); line-height:1.4; }
.nugget-configure-link { flex:0 0 auto; text-decoration:none; font-size:10px; padding:8px 11px; }
.nugget-metadata-preview { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:11px 12px; border:1px solid #dce5ec; border-radius:11px; background:#fbfdfe; }
.nugget-metadata-preview strong { width:100%; margin-bottom:2px; font-size:10px; color:#5f7282; }
.nugget-metadata-preview span { padding:4px 7px; border-radius:999px; background:#E8F5FD; color:#075F9F; font-size:9px; font-weight:750; }
.nugget-upload-button { width:auto; min-width:260px; min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:10px 15px; border-radius:10px; cursor:pointer; box-shadow:0 8px 20px rgba(11,121,201,.18); }
.nugget-upload-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nugget-upload-button:disabled { cursor:not-allowed; opacity:.48; box-shadow:none; }
.nugget-upload-button.busy svg { animation:nugget-spin .85s linear infinite; }
@media (max-width:760px) {
  .nugget-analysis-engine { align-items:flex-start; flex-wrap:wrap; }
  .nugget-configure-link { margin-left:23px; }
  .nugget-upload-button { width:100%; min-width:0; }
}

/* 2026-08 Nuggets: compact AI-indexed PDF registry */
.nugget-flow { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:16px 0 2px; }
.nugget-flow span { background:var(--soft); border:1px solid var(--line); border-radius:999px; padding:7px 10px; font-size:11px; font-weight:750; color:#52697c; }
.nugget-flow b { color:var(--froppy-accent); font-size:14px; }
.nugget-upload-form { display:grid; gap:16px; }
.nugget-tags-input { display:grid; gap:7px; font-size:12px; font-weight:720; }
.nugget-upload-actions { justify-content:flex-end; }
.icon-button { width:36px; height:36px; min-width:36px; padding:0; display:inline-grid; place-items:center; border-radius:10px; cursor:pointer; text-decoration:none; }
.icon-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.icon-button.bare { border:1px solid transparent; background:transparent; color:#5f7282; box-shadow:none; }
.icon-button.bare:hover { background:#f7f4f6; border-color:#dce5ec; color:var(--froppy-accent); }
.icon-button.bare.danger:hover { color:#b42318; background:#fff1f0; border-color:#ffd8d4; }
.icon-button.busy svg { animation:nugget-spin .85s linear infinite; }
@keyframes nugget-spin { to { transform:rotate(360deg); } }
.nugget-table-head { display:grid; grid-template-columns:84px minmax(220px,1fr) 112px 140px 112px 192px; gap:10px; align-items:center; padding:0 10px 7px 44px; border-bottom:1px solid var(--line); color:#718291; font-size:9px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.nugget-list.compact { display:grid; gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
.nugget-item.compact-row { display:block; background:#fff; border-bottom:1px solid #dce5ec; transition:opacity .15s ease,background .15s ease; }
.nugget-item.compact-row:last-child { border-bottom:0; }
.nugget-item.compact-row.inactive { opacity:.58; }
.nugget-item.compact-row:hover { background:#f8fbfd; }
.nugget-compact-line { min-height:44px; display:grid; grid-template-columns:28px 84px minmax(220px,1fr) 112px 140px 112px 192px; gap:10px; align-items:center; padding:3px 10px 3px 6px; }
.nugget-expand { width:28px; height:28px; min-width:28px; border-radius:7px; }
.nugget-expand svg { width:15px; height:15px; transition:transform .15s ease; }
.nugget-expand.open svg { transform:rotate(180deg); }
.nugget-number { font-size:10px; color:#697b8a; font-variant-numeric:tabular-nums; white-space:nowrap; }
.nugget-name { min-width:0; display:flex; align-items:center; gap:7px; }
.nugget-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:760; }
.nugget-status-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#7d8c98; }
.nugget-status-dot.ready { background:#198754; }
.nugget-status-dot.review { background:#d9a400; }
.nugget-status-dot.failed { background:#c5372f; }
.nugget-status-dot.processing { background:#7d8c98; }
.nugget-date,.nugget-creator { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#5f7282; font-size:10px; }
.nugget-compact-actions { display:flex; align-items:center; justify-content:flex-end; gap:3px; }
.nugget-compact-actions .icon-button { width:30px; height:30px; min-width:30px; border-radius:8px; }
.nugget-compact-actions .icon-button svg { width:15px; height:15px; }
.compact-switch { transform:scale(.72); transform-origin:center; margin-right:2px; }
.nugget-details { padding:14px 18px 17px 118px; border-top:1px solid #e3ebf1; background:#fbfdfe; }
.nugget-detail-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.nugget-file { display:inline-block; color:#718291; font-size:10px; }
.nugget-status { flex:0 0 auto; border-radius:999px; padding:4px 8px; font-size:10px; font-weight:800; }
.nugget-status.ready { background:#e8f6ef; color:#13704b; }
.nugget-status.review { background:#fff5da; color:#805c00; }
.nugget-status.failed { background:#fff0ef; color:#a12620; }
.nugget-status.processing { background:#f1eef2; color:#5f7282; }
.nugget-summary { color:#52697c; line-height:1.55; margin:9px 0; font-size:11px; max-width:900px; }
.nugget-meta { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:9px; }
.nugget-meta span { background:#f3f8fb; border-radius:999px; padding:4px 7px; color:#697b8a; font-size:9px; }
.nugget-topics { display:flex; flex-wrap:wrap; gap:6px; margin:7px 0 9px; }
.nugget-topics span { color:#5f7282; font-size:9px; border-bottom:1px solid #d2e0e8; padding-bottom:2px; }
.nugget-tag-section { display:grid; grid-template-columns:125px minmax(0,1fr); gap:8px; align-items:start; margin-top:7px; }
.nugget-tag-section > strong { font-size:9px; color:#5f7282; padding-top:4px; }
.nugget-tags { display:flex; flex-wrap:wrap; gap:5px; }
.nugget-tag { display:inline-flex; align-items:center; border-radius:999px; padding:4px 7px; background:#f1f6f9; color:#607384; font-size:9px; }
.nugget-tag.ai { background:#E8F5FD; color:#075F9F; }
.nugget-tag.manual.validated { background:#edf7f2; color:#176d4c; }
.nugget-tag.manual.rejected { text-decoration:line-through; background:#eef4f8; color:#8795a0; }
.nugget-use-cases,.nugget-warnings { margin-top:9px; border-top:1px solid #dce5ec; padding-top:7px; }
.nugget-use-cases summary,.nugget-warnings summary { cursor:pointer; color:#5f7282; font-weight:730; font-size:9px; }
.nugget-use-cases ul,.nugget-warnings ul { margin:7px 0 0 18px; padding:0; color:#607384; font-size:10px; line-height:1.5; }
.nugget-empty { border:1px dashed #cbd8e1; border-radius:12px; padding:24px; text-align:center; color:#5f7282; }
.nugget-empty p { margin:6px auto 0; max-width:570px; color:var(--muted); }

@media (max-width: 1050px) {
  .nugget-table-head { display:none; }
  .nugget-compact-line { grid-template-columns:28px 76px minmax(160px,1fr) 92px 150px; }
  .nugget-compact-line .nugget-creator { display:none; }
  .nugget-compact-line > .nugget-date:nth-of-type(2) { display:none; }
  .nugget-details { padding-left:22px; }
}

@media (max-width: 700px) {
  .nugget-compact-line { grid-template-columns:28px 68px minmax(120px,1fr) 128px; gap:6px; }
  .nugget-compact-line > .nugget-date { display:none; }
  .nugget-compact-actions { gap:1px; }
  .nugget-compact-actions .icon-button { width:27px; height:27px; min-width:27px; }
  .nugget-tag-section { grid-template-columns:1fr; }
}

.chat-nugget-list { display:grid; gap:7px; margin-top:9px; max-width:580px; }
.chat-resource-card { display:grid; grid-template-columns:48px minmax(0,1fr) 22px; align-items:center; gap:11px; padding:9px 11px 9px 9px; border:1px solid rgba(11,121,201,.24); border-radius:13px; color:var(--ink); text-decoration:none; transition:border-color .15s ease,transform .15s ease,background .15s ease,box-shadow .15s ease; box-shadow:0 3px 10px rgba(45,26,39,.035); }
.chat-resource-card:hover { border-color:var(--froppy-accent); transform:translateY(-1px); box-shadow:0 7px 18px rgba(69,28,53,.08); }
.chat-nugget-card { background:#F5FBFF; }
.chat-nugget-card:hover { background:#eef7fd; }
.chat-resource-icon-shell { width:44px; height:44px; display:grid; place-items:center; border-radius:11px; background:transparent; overflow:visible; }
.chat-resource-icon-shell img { width:42px; height:42px; display:block; object-fit:contain; filter:drop-shadow(0 4px 5px rgba(78,18,54,.20)); }
.chat-resource-copy { min-width:0; display:grid; gap:3px; }
.chat-resource-copy strong { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-resource-copy small { color:#766d76; font-size:9px; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-resource-arrow { color:var(--froppy-accent); font-size:17px; font-weight:900; text-align:center; }
.chat-nugget-icon,.chat-nugget-copy,.chat-nugget-arrow { }

@media (max-width: 800px) {
  .nugget-item { grid-template-columns:1fr; }
  .nugget-actions { flex-direction:row; flex-wrap:wrap; }
  .nugget-actions .switch { align-self:center; margin:0 4px 0 0; }
  .nugget-actions button,.nugget-action-link { width:auto; flex:1 1 150px; }
  .nugget-tag-section { grid-template-columns:1fr; }
}

/* 2026-08 Archive-only follow-up flow + Outlook ICS cards */
.archive-workspace { min-height:100vh; background:#f4f8fb; }
.archive-page { flex:1; min-height:0; margin:22px 24px 28px; padding:20px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:0 8px 28px rgba(19,42,74,.045); }
.archive-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.archive-page-head h2 { margin:0 0 5px; font-size:22px; }
.archive-page-head p:not(.archive-eyebrow) { margin:0; color:var(--muted); font-size:11px; line-height:1.5; }
.archive-eyebrow { margin:0 0 5px; color:var(--froppy-accent); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.archive-table { display:grid; }
.archive-row { min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 6px 10px 10px; border-bottom:1px solid #dce5ec; }
.archive-row:last-child { border-bottom:0; }
.archive-row:hover { background:#f8fbfd; }
.archive-row-main { min-width:0; display:grid; gap:4px; }
.archive-row-main strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.archive-row-main span { color:var(--muted); font-size:9px; }
.archive-row-actions { flex:0 0 auto; display:flex; align-items:center; gap:3px; }
.archive-row-actions .icon-button { width:32px; height:32px; min-width:32px; }
.archive-row-actions .icon-button svg { width:16px; height:16px; }
.archive-empty { padding:42px 18px; text-align:center; color:#665f68; }
.archive-empty p { margin:6px auto 0; max-width:520px; color:var(--muted); font-size:10px; }
.archive-shell .folder-contents .calendar-sidebar-conversation,
.archive-shell .unassigned-conversations .calendar-sidebar-conversation { margin-left:0; }
.archive-shell .conversation-folder { margin-bottom:7px; }

.chat-calendar-list { display:grid; gap:7px; margin-top:9px; max-width:580px; }
.chat-calendar-card { background:#fff; border-color:rgba(11,121,201,.20); }
.chat-calendar-card:hover { background:#F5FBFF; }
.chat-calendar-icon img { filter:drop-shadow(0 5px 6px rgba(74,19,52,.24)); }
@media (max-width:560px) {
  .chat-resource-card { grid-template-columns:42px minmax(0,1fr) 20px; gap:8px; padding:8px; }
  .chat-resource-icon-shell { width:38px; height:38px; }
  .chat-resource-icon-shell img { width:37px; height:37px; }
  .chat-resource-copy small { white-space:normal; }
}

.knowledge-empty { padding:22px; border:1px dashed #cbd8e1; border-radius:12px; text-align:center; color:#5f7282; }
.knowledge-empty p { margin:6px auto 0; color:var(--muted); font-size:10px; max-width:560px; }

@media (max-width:760px) {
  .archive-page { margin:12px; padding:14px; }
  .archive-row { align-items:flex-start; }
  .archive-row-actions { gap:1px; }
}

/* 2026-08 Compact phase strip + global action toast */
.persistent-cycle-area {
  flex: 0 0 36px;
  min-height: 36px;
  height: 36px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.cycle-row {
  height: 100%;
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.persistent-cycle-area .cycle {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 10px 0 22px;
  border: 0;
}
.persistent-cycle-area .cycle button {
  min-width: 0;
  padding: 3px 6px 2px;
  font-size: 10px;
  line-height: 1;
  border-bottom-width: 2px;
  white-space: nowrap;
}
.persistent-cycle-area .cycle button span {
  width: 17px;
  height: 17px;
  margin-right: 4px;
  font-size: 9px;
}
.phase-info-button {
  width: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid #e1e9ef;
  background: #fff;
  color: #7d747f;
  padding: 0;
}
.phase-info-button:hover { color: var(--froppy-accent); background: #F5FBFF; }
.phase-info-button svg { width: 16px; height: 16px; fill: currentColor; }
.content-grid.context-collapsed { grid-template-columns: minmax(0, 1fr); }
.context-panel[hidden] { display: none !important; }
.empty-state .quick-grid { display: none !important; }

.app-toast {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, -10px);
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--froppy-accent);
  color: #fff;
  box-shadow: 0 12px 32px rgba(94, 0, 49, .24);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.app-toast[hidden] { display: none !important; }

@media (max-width: 760px) {
  .persistent-cycle-area { flex-basis: 34px; min-height: 34px; height: 34px; }
  .persistent-cycle-area .cycle { padding-left: 4px; padding-right: 2px; overflow: hidden; }
  .persistent-cycle-area .cycle button { min-width: 0; font-size: 9px; padding-left: 2px; padding-right: 2px; }
  .persistent-cycle-area .cycle button span { display: none; }
  .phase-info-button { width: 34px; flex-basis: 34px; }
}
.phase-info-button { position: relative; }
.phase-info-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 5px;
  width: min(330px, 75vw);
  padding: 8px 10px;
  border-radius: 9px;
  background: #132a4a;
  color: #fff;
  box-shadow: 0 10px 28px rgba(19,42,74,.18);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.phase-info-button:hover::after,
.phase-info-button:focus-visible::after { opacity: 1; transform: translateY(0); }

/* 2026-08 visible server knowledge/nugget storage and PDF knowledge creation */
.knowledge-actions { display: flex; align-items: center; gap: 10px; }
.knowledge-actions .icon-button { width: 34px; height: 34px; padding: 7px; }
.knowledge-sources { margin-top: 7px !important; line-height: 1.45; }
.knowledge-pdf-form { display: grid; gap: 15px; }
.knowledge-pdf-drop { min-height: 78px; }
.knowledge-pdf-drop input { max-width: 330px; }
@media (max-width: 720px) {
  .knowledge-item { grid-template-columns: 1fr; gap: 12px; }
  .knowledge-actions { justify-content: flex-end; }
}

/* Single-composer temporary start state */
.chat-panel > .empty-state {
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.chat-panel > .empty-state[hidden] { display: none !important; }

/* 2026-08 Chat knowledge disclosure: keep retrieved sources compact until requested */
.used-knowledge {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid #dce5ec;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  box-shadow: none;
  overflow: hidden;
}
.used-knowledge > summary {
  min-height: 30px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 10px;
  font-weight: 760;
  color: #5f7282;
  user-select: none;
}
.used-knowledge > summary::-webkit-details-marker { display: none; }
.used-knowledge > summary::after {
  content: "⌄";
  margin-left: 1px;
  color: #8b828a;
  font-size: 12px;
  line-height: 1;
  transform-origin: center;
  transition: transform .14s ease;
}
.used-knowledge[open] > summary::after { transform: rotate(180deg); }
.used-knowledge > summary:hover { color: var(--froppy-accent); background: #f5f9fc; }
.used-knowledge-summary-copy { display: inline-flex; align-items: center; gap: 6px; }
.used-knowledge-summary-icon { color: var(--froppy-accent); font-size: 12px; line-height: 1; }
.used-knowledge-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: #6d646c;
  font-size: 9px;
  font-weight: 800;
}
.used-knowledge-list {
  min-width: 260px;
  max-width: min(520px, 72vw);
  padding: 4px 8px 7px;
  border-top: 1px solid #eee8ed;
  display: grid;
  gap: 2px;
}
.used-knowledge-source {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 5px;
  align-items: start;
  padding: 5px 2px;
}
.used-knowledge-source + .used-knowledge-source { border-top: 1px solid #f1edf0; }
.used-knowledge-source-icon { color: var(--froppy-accent); font-size: 12px; line-height: 1.25; }
.used-knowledge-source-copy { min-width: 0; display: grid; gap: 1px; }
.used-knowledge-source-copy strong {
  color: #52697c;
  font-size: 9.5px;
  line-height: 1.35;
  font-weight: 780;
  overflow-wrap: anywhere;
}
.used-knowledge-topics {
  color: #817780;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .used-knowledge-list { min-width: 0; max-width: 72vw; }
}

/* 2026-08 Settings IA + profile + live coach behavior */
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.settings-section-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 6px 22px rgba(19,42,74,.025);
}
.settings-nav-group { display: grid; gap: 5px; }
.settings-nav-label {
  padding: 4px 9px 2px;
  color: #928a94;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.settings-nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #514a54;
  text-align: left;
}
.settings-nav-item > span:last-child { display: grid; gap: 1px; min-width: 0; }
.settings-nav-item strong { color: inherit; font-size: 12px; line-height: 1.3; }
.settings-nav-item small { color: #918993; font-size: 9px; line-height: 1.35; font-weight: 500; }
.settings-nav-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4f8;
  color: #706873;
  font-size: 13px;
  font-weight: 850;
}
.settings-nav-item:hover { background: #f7f4f6; }
.settings-nav-item.active { background: #EEF8FF; color: var(--froppy-accent); }
.settings-nav-item.active .settings-nav-icon { background: rgba(11,121,201,.11); color: var(--froppy-accent); }
.settings-nav-item.active small { color: #536F82; }
.settings-nav-item:focus-visible { outline: 3px solid rgba(11,121,201,.16); outline-offset: 2px; }
.settings-panel-column { min-width: 0; }
.settings-panel-column .settings-card { box-shadow: 0 10px 28px rgba(19,42,74,.07), 0 2px 8px rgba(19,42,74,.04); }
.settings-panel-column .card-head { margin-bottom: 18px; }

.profile-form { display: grid; gap: 16px; }
.profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.profile-span-2 { grid-column: 1 / -1; }
.profile-form label { gap: 7px; }
.profile-form textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.profile-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfd;
  overflow: hidden;
}
.profile-section > summary {
  padding: 13px 15px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #514a54;
  list-style-position: inside;
}
.profile-section[open] > summary { border-bottom: 1px solid var(--line); background: #fff; }
.profile-section-body { padding: 15px; }
.profile-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.profile-footer .compact-note { margin: 0; padding: 0; border: 0; max-width: 680px; line-height: 1.5; }
.autosave-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f0f2;
  color: #756e77;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .02em;
}
.autosave-state.success { background: #e9f7f0; color: #14714d; }
.autosave-state.saving { background: #F5FBFF; color: var(--froppy-accent); }
.autosave-state.danger { background: #fff0ef; color: #a12620; }
.communication-state { margin: -7px 0 14px; }
.behavior-slider-wrap { margin-bottom: 18px; }
.behavior-slider {
  background: linear-gradient(90deg, #f5f9fc 0%, #fff 50%, #F5FBFF 100%);
  border-color: #e7dce3;
  padding: 18px 20px;
}
.behavior-slider .slider-copy { min-height: auto; max-width: 760px; }
.behavior-slider input[type="range"] { height: 24px; }
.settings-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0 10px;
}
.settings-subsection-head strong { font-size: 12px; }
.settings-subsection-head span { color: var(--muted); font-size: 10px; }

@media (max-width: 980px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-section-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px;
  }
  .settings-nav-group { display: contents; }
  .settings-nav-label { display: none; }
  .settings-nav-item { flex: 0 0 auto; width: auto; grid-template-columns: 22px auto; min-width: 132px; }
  .settings-nav-item small { display: none; }
  .settings-nav-icon { width: 22px; height: 22px; }
}
@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-span-2 { grid-column: auto; }
  .profile-footer { align-items: stretch; flex-direction: column; }
  .profile-footer .primary { width: 100%; }
  .settings-subsection-head { align-items: flex-start; flex-direction: column; gap: 2px; }
}

/* 2026-08 Settings navigation: two-level horizontal menu below topbar */
.settings-navigation-shell {
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 12px rgba(19,42,74,.02);
  z-index: 4;
}
.settings-navigation-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(22px,5vw,64px);
}
.settings-primary-nav {
  min-height: 44px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-primary-nav::-webkit-scrollbar,
.settings-secondary-nav::-webkit-scrollbar { display: none; }
.settings-primary-item {
  position: relative;
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6c6570;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .005em;
}
.settings-primary-item:hover { color: var(--ink); background: #f8fbfd; }
.settings-primary-item.active {
  color: var(--froppy-accent);
  border-bottom-color: var(--froppy-accent);
}
.settings-primary-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
  transform: translate(-50%, 50%) rotate(45deg);
}
.settings-primary-item:focus-visible,
.settings-nav-item:focus-visible {
  outline: 3px solid rgba(11,121,201,.14);
  outline-offset: -3px;
}
.settings-secondary-nav {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  border-top: 1px solid #f1edf0;
  overflow-x: auto;
  scrollbar-width: none;
  background: #f8fbfd;
}
.settings-secondary-nav .settings-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #6d6570;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}
.settings-secondary-nav .settings-nav-item:hover {
  border-color: #e3dde2;
  background: #fff;
  color: #4c4650;
}
.settings-secondary-nav .settings-nav-item.active {
  border-color: rgba(11,121,201,.18);
  background: #EEF8FF;
  color: var(--froppy-accent);
}
.settings-secondary-nav .settings-nav-item[hidden] { display: none !important; }
.settings-panel-column { width: 100%; min-width: 0; }
.settings-workspace .settings-main {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
}

@media (max-width: 760px) {
  .settings-navigation-inner { padding: 0 12px; }
  .settings-primary-nav { min-height: 42px; }
  .settings-primary-item { min-height: 42px; min-width: auto; padding: 0 12px; font-size: 11px; }
  .settings-secondary-nav { min-height: 38px; }
  .settings-secondary-nav .settings-nav-item { min-height: 28px; padding: 5px 10px; font-size: 10.5px; }
  .settings-workspace .settings-main { padding-top: 18px; }
}

/* 2026-08 Settings navigation: submenus stay collapsed until a main area is opened. */
.settings-secondary-nav[hidden] { display: none !important; }
.settings-secondary-nav.open {
  position: relative;
  z-index: 2;
  margin: 0 -10px;
  padding: 7px 10px 8px;
  border: 1px solid #dce5ec;
  border-top-color: #f2edf0;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(19,42,74,.10), 0 3px 8px rgba(19,42,74,.06);
}
.settings-primary-item[aria-expanded="true"] { background: #f7fbfd; }
.settings-primary-item[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-right: 1px solid #dce5ec;
  border-bottom: 1px solid #dce5ec;
  background: #fff;
  transform: translate(-50%, 50%) rotate(45deg);
  z-index: 3;
}
.settings-overview {
  min-height: 210px;
  display: grid;
  place-items: start center;
  padding-top: 28px;
}
.settings-overview[hidden] { display: none !important; }
.settings-overview-card {
  width: min(100%, 620px);
  padding: 24px 26px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(19,42,74,.055);
  text-align: center;
}
.settings-overview-card h2 { margin: 5px 0 7px; font-size: 18px; }
.settings-overview-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* 2026-08 local AI Avatar Studio + collapsible coaching sidebar */
.sidebar-brand-row { position: relative; }
.sidebar-collapse-button {
  margin-left: auto;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #2d4660;
  border-radius: 9px;
  background: #17314b;
  color: #dce8f1;
}
.sidebar-collapse-button:hover { background: #23425f; color: #fff; border-color: #3b5c78; }
.sidebar-collapse-button svg { width: 16px; height: 16px; fill: currentColor; transition: transform .18s ease; }

@media (min-width: 761px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 66px minmax(0,1fr); }
  .app-shell.sidebar-collapsed .sidebar { padding: 16px 10px; align-items: center; }
  .sidebar-collapsed .sidebar-brand-row { width: 100%; flex-direction: column; justify-content: center; gap: 10px; margin-bottom: 18px; }
  .sidebar-collapsed .sidebar-brand-copy,
  .sidebar-collapsed .folder-section-label,
  .sidebar-collapsed .conversation-list { display: none !important; }
  .sidebar-collapsed .brand-logo { width: 30px; height: 30px; }
  .sidebar-collapsed .sidebar-collapse-button { margin-left: 0; }
  .sidebar-collapsed .sidebar-collapse-button svg { transform: rotate(180deg); }
  .sidebar-collapsed #new-case {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    font-size: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
  }
  .sidebar-collapsed #new-case::before { content: "+"; font-size: 23px; line-height: 1; font-weight: 500; }
  .sidebar-collapsed #new-folder { display: none; }
}

.content-grid.context-collapsed.avatar-visible {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
}
.liveavatar-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  box-shadow: -14px 0 36px rgba(32,20,29,.045);
}
.liveavatar-panel[hidden] { display: none !important; }
.liveavatar-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.liveavatar-panel-title { min-width: 0; display: flex; align-items: center; gap: 9px; }
.liveavatar-panel-title > div { display: grid; gap: 1px; min-width: 0; }
.liveavatar-panel-title strong { font-size: 12px; }
.liveavatar-panel-title small { color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liveavatar-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #aaa2ac; box-shadow: 0 0 0 3px rgba(121,113,124,.10); }
.liveavatar-dot.connected { background: #1b9b65; box-shadow: 0 0 0 3px rgba(27,155,101,.12); }
.liveavatar-dot.connecting { background: #d99a18; box-shadow: 0 0 0 3px rgba(217,154,24,.13); animation: liveavatarPulse 1.2s ease-in-out infinite; }
.liveavatar-dot.speaking { background: var(--froppy-accent); box-shadow: 0 0 0 4px rgba(11,121,201,.11); animation: liveavatarPulse 1s ease-in-out infinite; }
.liveavatar-dot.error { background: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.11); }
@keyframes liveavatarPulse { 0%,100% { opacity:.55; } 50% { opacity:1; } }
.liveavatar-panel-icon {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #f5f9fc; color: #625a65; display: grid; place-items: center;
}
.liveavatar-panel-icon:hover { background:#f2edf1; color:var(--ink); }
.liveavatar-panel-icon svg { width:15px; height:15px; fill:currentColor; }
.liveavatar-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #d8e4ec;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 28%, #263f58 0%, #172f48 45%, #0f2238 100%);
  box-shadow: 0 16px 34px rgba(11,29,48,.18);
}
.liveavatar-stage video { width:100%; height:100%; min-height:390px; display:block; object-fit:cover; background:#10243e; }
.liveavatar-placeholder { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:8px; padding:28px; text-align:center; color:#f4edf2; }
.liveavatar-placeholder[hidden] { display:none !important; }
.liveavatar-placeholder-mark { width:58px; height:58px; display:grid; place-items:center; border-radius:20px; background:rgba(11,121,201,.92); box-shadow:0 12px 34px rgba(11,121,201,.28); color:#fff; font-size:16px; font-weight:900; letter-spacing:.03em; }
.liveavatar-placeholder strong { font-size:14px; }
.liveavatar-placeholder span { max-width:240px; color:#cfc5cc; font-size:10px; line-height:1.5; }
.liveavatar-speaking { position:absolute; left:12px; bottom:12px; display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border-radius:999px; background:rgba(20,16,21,.78); backdrop-filter:blur(8px); color:#fff; font-size:9px; font-weight:800; }
.liveavatar-speaking[hidden] { display:none !important; }
.liveavatar-speaking span { width:7px; height:7px; border-radius:50%; background:var(--froppy-accent); animation:liveavatarPulse .9s ease-in-out infinite; }
.liveavatar-controls { display:grid; grid-template-columns:1fr auto auto; gap:7px; }
.liveavatar-controls button { min-height:36px; padding:8px 11px; font-size:10px; }
.liveavatar-control-main { min-width:80px; }
.liveavatar-mute[aria-pressed="true"] { border-color:rgba(11,121,201,.25); background:#EEF8FF; color:var(--froppy-accent); }
.liveavatar-panel-note { margin:0; color:#7e7681; font-size:9.5px; line-height:1.45; }
.liveavatar-panel-reopen {
  position: fixed;
  z-index: 12;
  right: 14px;
  top: 132px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid #d8e4ec;
  border-radius:999px;
  background:#fff;
  color:#554e58;
  padding:8px 11px;
  box-shadow:0 10px 28px rgba(31,20,28,.13);
  font-size:10px;
  font-weight:800;
}
.liveavatar-panel-reopen[hidden] { display:none !important; }

/* LiveAvatar settings */
.liveavatar-settings-card { max-width: 980px; }
.liveavatar-head-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.liveavatar-enable-row,
.liveavatar-behavior-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.switch-setting { display:flex; align-items:flex-start; gap:10px; padding:12px 13px; border:1px solid var(--line); border-radius:13px; background:#f8fbfd; cursor:pointer; }
.switch-setting input { width:auto; margin:2px 0 0; accent-color:var(--froppy-accent); }
.switch-setting span { display:grid; gap:2px; }
.switch-setting strong { color:var(--ink); font-size:11px; }
.switch-setting small { color:var(--muted); font-size:9.5px; line-height:1.4; font-weight:500; }
.liveavatar-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.avatar-picker-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; margin-bottom:7px; }
.avatar-picker-row button { white-space:nowrap; }
.liveavatar-form-actions { align-items:center; justify-content:space-between; gap:12px; }
.liveavatar-cost-note { color:#7d7580; font-size:9.5px; }

@media (max-width: 1120px) {
  .content-grid.context-collapsed.avatar-visible { grid-template-columns:minmax(0,1fr) 300px; }
  .liveavatar-stage, .liveavatar-stage video { min-height:330px; }
}
@media (max-width: 900px) {
  .content-grid.context-collapsed.avatar-visible { grid-template-columns:minmax(0,1fr); }
  .liveavatar-panel {
    position:fixed;
    z-index:30;
    top:80px;
    right:12px;
    bottom:12px;
    width:min(360px, calc(100vw - 24px));
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:0 22px 70px rgba(22,14,20,.24);
  }
}
@media (max-width: 760px) {
  .sidebar-collapse-button { display:none; }
  .liveavatar-enable-row,
  .liveavatar-behavior-grid,
  .liveavatar-config-grid { grid-template-columns:1fr; }
  .liveavatar-form-actions { align-items:stretch; flex-direction:column; }
}


/* 2026-08 Live Avatar: full-height right side with overlaid controls */
@media (min-width: 901px) {
  .content-grid.context-collapsed.avatar-visible {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.liveavatar-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #10243e;
  box-shadow: -18px 0 38px rgba(32,20,29,.07);
}
.liveavatar-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 26%, #2e4c67 0%, #19354e 46%, #0f2238 100%);
  box-shadow: none;
}
.liveavatar-stage video {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  object-position: center top;
  background: #10243e;
}
.liveavatar-panel-head {
  position: absolute;
  z-index: 6;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 9px 8px 12px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 34px rgba(20,12,18,.20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.liveavatar-panel-title { gap: 8px; }
.liveavatar-panel-title strong { font-size: 11px; }
.liveavatar-panel-title small { font-size: 9px; }
.liveavatar-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.liveavatar-control-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid rgba(115,103,112,.18);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.74);
  color: #504950;
  box-shadow: 0 3px 10px rgba(31,20,28,.06);
}
.liveavatar-control-icon:hover:not(:disabled) { background: #fff; color: var(--froppy-accent); border-color: rgba(11,121,201,.25); }
.liveavatar-control-icon:disabled { opacity: .38; cursor: default; box-shadow: none; }
.liveavatar-control-icon svg { width: 17px; height: 17px; fill: currentColor; }
.liveavatar-control-icon.is-loading svg { animation: liveavatarControlPulse .8s ease-in-out infinite; }
@keyframes liveavatarControlPulse { 0%,100% { opacity:.35; transform:scale(.92); } 50% { opacity:1; transform:scale(1); } }
.liveavatar-mute[aria-pressed="true"] { background:#EEF8FF; color:var(--froppy-accent); border-color:rgba(11,121,201,.25); }
.liveavatar-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 88px 34px 38px;
  text-align: center;
  color: #f4edf2;
}
.liveavatar-placeholder-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 46px rgba(0,0,0,.28);
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
  overflow: hidden;
}
.liveavatar-placeholder-mark img {
  width: 38px;
  height: 46px;
  display: block;
  object-fit: contain;
}
.liveavatar-placeholder span {
  max-width: 330px;
  color: #d8cfd6;
  font-size: 11px;
  line-height: 1.55;
}
.liveavatar-speaking { left: 16px; bottom: 16px; }
.liveavatar-panel-note { display: none !important; }

@media (max-width: 1120px) and (min-width: 901px) {
  .content-grid.context-collapsed.avatar-visible { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); }
}
@media (max-width: 900px) {
  .liveavatar-panel {
    padding: 0;
    overflow: hidden;
  }
  .liveavatar-stage,
  .liveavatar-stage video { min-height: 100%; height: 100%; }
  .liveavatar-panel-head { top: 10px; left: 10px; right: 10px; }
}

/* Keep icon controls compact despite earlier generic LiveAvatar button rules. */
.liveavatar-controls .liveavatar-control-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
}
@media (max-width: 1120px) and (min-width: 901px) {
  .content-grid.context-collapsed.avatar-visible { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* 2026-08 Live Avatar drawer: status-only chrome and sliding right drawer */
.content-grid.context-collapsed.avatar-available {
  position: relative;
}

@media (min-width: 901px) {
  .content-grid.context-collapsed.avatar-available {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    transition: grid-template-columns .42s cubic-bezier(.22,.8,.22,1);
  }
  .content-grid.context-collapsed.avatar-available.avatar-drawer-closed {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
  }
}

.liveavatar-panel {
  transform: translateX(0);
  opacity: 1;
  will-change: transform, opacity;
  transition: transform .42s cubic-bezier(.22,.8,.22,1), opacity .22s ease, border-color .22s ease;
}
.avatar-drawer-closed .liveavatar-panel {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  border-left-color: transparent;
}

/* No toolbar over the avatar: only the connection indicator remains. */
.liveavatar-panel-head,
.liveavatar-controls,
.liveavatar-panel-title,
.liveavatar-control-icon,
.liveavatar-panel-reopen {
  display: none !important;
}
.liveavatar-status-button {
  position: absolute;
  z-index: 8;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 5px 18px rgba(20,12,18,.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}
.liveavatar-status-button:hover { background: rgba(255,255,255,.96); }
.liveavatar-status-button .liveavatar-dot {
  width: 9px;
  height: 9px;
  box-shadow: none;
  background: #aaa2ac;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.liveavatar-status-button .liveavatar-dot.connected {
  background: #169b62;
  box-shadow: 0 0 0 4px rgba(22,155,98,.13), 0 0 12px rgba(22,155,98,.22);
}
.liveavatar-status-button:hover .liveavatar-dot { transform: scale(1.08); }

.liveavatar-drawer-handle[hidden] { display: none !important; }

.liveavatar-drawer-handle {
  position: absolute;
  z-index: 10;
  top: 50%;
  right: calc(50% - 18px);
  width: 36px;
  height: 60px;
  min-width: 36px;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(190,181,188,.86);
  border-radius: 13px;
  background: rgba(255,255,255,.92);
  color: #5c545d;
  box-shadow: 0 10px 30px rgba(31,20,28,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: right .42s cubic-bezier(.22,.8,.22,1), color .16s ease, background .16s ease, box-shadow .16s ease;
}
.liveavatar-drawer-handle:hover {
  color: var(--froppy-accent);
  background: #fff;
  box-shadow: 0 12px 34px rgba(31,20,28,.23);
}
.liveavatar-drawer-handle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .36s cubic-bezier(.22,.8,.22,1);
}
.avatar-drawer-closed .liveavatar-drawer-handle {
  right: 10px;
}
.avatar-drawer-closed .liveavatar-drawer-handle svg {
  transform: rotate(180deg);
}

/* Without manual mute controls the avatar always uses normal audio output. */
.liveavatar-placeholder { padding-top: 38px; }

@media (max-width: 900px) {
  .content-grid.context-collapsed.avatar-available,
  .content-grid.context-collapsed.avatar-available.avatar-drawer-closed {
    grid-template-columns: minmax(0,1fr);
  }
  .liveavatar-panel {
    display: block;
    transform: translateX(0);
    opacity: 1;
    transition: transform .42s cubic-bezier(.22,.8,.22,1), opacity .22s ease;
  }
  .avatar-drawer-closed .liveavatar-panel {
    transform: translateX(calc(100% + 18px));
    opacity: 0;
  }
  .liveavatar-drawer-handle {
    position: fixed;
    z-index: 31;
    top: 50%;
    right: min(360px, calc(100vw - 24px));
  }
  .avatar-drawer-closed .liveavatar-drawer-handle { right: 8px; }
  .liveavatar-status-button { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .content-grid.context-collapsed.avatar-available,
  .liveavatar-panel,
  .liveavatar-drawer-handle,
  .liveavatar-drawer-handle svg {
    transition-duration: .01ms !important;
  }
}


/* 2026-08 Dual drawer motion: coaching cases left, Live Avatar right */
:root {
  --drawer-duration: .64s;
  --drawer-ease: cubic-bezier(.22,.8,.22,1);
  --drawer-shadow-left: 22px 0 44px rgba(26,16,23,.18);
  --drawer-shadow-right: -22px 0 44px rgba(26,16,23,.18);
}

@media (min-width: 761px) {
  .app-shell {
    position: relative;
    grid-template-columns: 270px minmax(0,1fr);
    overflow-x: clip;
    transition: grid-template-columns var(--drawer-duration) var(--drawer-ease);
  }
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0,1fr);
  }
  .app-shell > .sidebar {
    position: relative;
    z-index: 24;
    width: 270px;
    min-width: 270px;
    transform: translateX(0);
    opacity: 1;
    align-items: stretch;
    padding: 20px 16px;
    box-shadow: var(--drawer-shadow-left);
    will-change: transform;
    transition: transform var(--drawer-duration) var(--drawer-ease), box-shadow .24s ease;
  }
  .app-shell.sidebar-collapsed > .sidebar {
    transform: translateX(-100%);
    pointer-events: none;
    padding: 20px 16px;
    align-items: stretch;
  }

  /* Keep the drawer content intact while it slides out; do not morph it into the old icon rail. */
  .sidebar-collapsed .sidebar-brand-row {
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }
  .sidebar-collapsed .sidebar-brand-copy { display: block !important; }
  .sidebar-collapsed .folder-section-label { display: flex !important; }
  .sidebar-collapsed .conversation-list { display: block !important; }
  .sidebar-collapsed #new-folder { display: grid !important; }
  .sidebar-collapsed #new-case,
  .sidebar-collapsed .sidebar-new-link {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 11px 15px;
    font-size: inherit;
    border-radius: 10px;
    display: block;
  }
  .sidebar-collapsed #new-case::before { content: none; }
  .sidebar-collapsed .brand-logo { width: 30px; height: 36px; }
}

.sidebar-drawer-handle {
  position: fixed;
  z-index: 42;
  top: 50%;
  left: 252px;
  width: 36px;
  height: 60px;
  min-width: 36px;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(190,181,188,.86);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  color: #5c545d;
  box-shadow: 0 10px 30px rgba(31,20,28,.20);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: left var(--drawer-duration) var(--drawer-ease), color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sidebar-drawer-handle:hover {
  color: var(--froppy-accent);
  background: #fff;
  box-shadow: 0 12px 34px rgba(31,20,28,.26);
}
.sidebar-drawer-handle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .44s var(--drawer-ease);
}
.sidebar-collapsed .sidebar-drawer-handle { left: 8px; }
.sidebar-collapsed .sidebar-drawer-handle svg { transform: rotate(180deg); }

/* Make the right drawer slower as well and let it cast a clear shadow onto the chat plane. */
@media (min-width: 901px) {
  .content-grid.context-collapsed.avatar-available {
    transition: grid-template-columns var(--drawer-duration) var(--drawer-ease);
  }
}
.liveavatar-panel {
  z-index: 7;
  box-shadow: var(--drawer-shadow-right);
  transition: transform var(--drawer-duration) var(--drawer-ease), opacity .28s ease, border-color .28s ease, box-shadow .24s ease;
}
.liveavatar-drawer-handle {
  transition: right var(--drawer-duration) var(--drawer-ease), color .18s ease, background .18s ease, box-shadow .18s ease;
}
.liveavatar-drawer-handle svg {
  transition: transform .44s var(--drawer-ease);
}

@media (max-width: 900px) {
  .liveavatar-panel {
    transition: transform var(--drawer-duration) var(--drawer-ease), opacity .28s ease;
  }
}

@media (max-width: 760px) {
  /* Mobile keeps the established compact/top layout instead of covering the whole screen with a side drawer. */
  .sidebar-drawer-handle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .app-shell > .sidebar,
  .sidebar-drawer-handle,
  .sidebar-drawer-handle svg,
  .content-grid.context-collapsed.avatar-available,
  .liveavatar-panel,
  .liveavatar-drawer-handle,
  .liveavatar-drawer-handle svg {
    transition-duration: .01ms !important;
  }
}

/* 2026-08 Drawer handle alignment: both grips share one viewport center line.
   ui.js compensates for the right grip's content-grid containing block. */
:root { --drawer-handle-viewport-y: 50vh; }
.sidebar-drawer-handle { top: var(--drawer-handle-viewport-y); }
.liveavatar-drawer-handle { top: 50%; }
@media (max-width: 900px) {
  .liveavatar-drawer-handle { top: var(--drawer-handle-viewport-y); }
}

/* 2026-08 Voice capture: waveform-first composer */
.composer-input-stack {
  position: relative;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: flex-end;
}
.composer-input-stack > textarea {
  width: 100%;
}
.voice-waveform {
  position: relative;
  width: 100%;
  min-height: 38px;
  display: block;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  cursor: default;
  outline: none;
}
.voice-waveform[hidden] { display: none !important; }
.voice-waveform:focus-visible .voice-waveform-canvas {
  filter: drop-shadow(0 0 2px rgba(11,121,201,.22));
}
.voice-waveform-canvas {
  width: 100%;
  height: 38px;
  display: block;
}
.voice-waveform-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.composer.voice-capture-active #chat-input { display: none; }
.composer.voice-capture-active .voice-waveform { display: block; }
.composer.voice-avatar-muted .voice-waveform-canvas {
  opacity: .52;
}
.voice-button.avatar-muted {
  color: var(--froppy-accent);
  background: #fff;
  border-color: rgba(11,121,201,.32);
  box-shadow: 0 0 0 4px rgba(11,121,201,.06);
  animation: none;
}

/* 2026-08 Chat role swap + user profile avatar */
.message.assistant {
  justify-self: end;
  justify-items: end;
  align-self: flex-end;
}
.message.user {
  justify-self: start;
  justify-items: start;
  align-self: flex-start;
}
.message.assistant .bubble {
  background: var(--froppy-accent);
  color: #fff;
  border: 1px solid var(--froppy-accent);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 8px 24px rgba(11,121,201,.12);
}
.message.user .bubble {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 6px 22px rgba(19,42,74,.04);
}
.assistant-message-row,
.user-message-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  min-width: 0;
}
.assistant-message-row { justify-content: flex-end; }
.user-message-row { justify-content: flex-start; }
.assistant-message-content,
.user-message-content {
  min-width: 0;
  max-width: min(820px, calc(100% - 45px));
  display: grid;
  gap: 7px;
}
.assistant-message-content { justify-items: end; }
.user-message-content { justify-items: start; }
.assistant-message-content .bubble,
.user-message-content .bubble {
  width: fit-content;
  max-width: 100%;
  text-align: left;
}
.assistant-message-content .message-meta { text-align: right; }
.user-message-content .message-meta { text-align: left; }
.coach-message-avatar,
.user-message-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: block;
  margin-bottom: 1px;
}
.coach-message-avatar { object-fit: contain; }
img.user-message-avatar { object-fit: cover; background: #fff; border: 1px solid rgba(11,121,201,.12); }
.user-message-avatar-placeholder {
  display: grid;
  place-items: center;
  background: #fff;
  color: #8b838c;
  border: 1px solid var(--line);
}
.user-message-avatar-placeholder svg { width: 19px; height: 19px; fill: currentColor; }
.message.assistant .typing-bubble span { background: rgba(255,255,255,.82); }

/* Profile image upload: intentionally compact, separate from semantic coaching profile. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.profile-avatar-editor {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.profile-avatar-preview-shell {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  box-shadow: 0 7px 18px rgba(33,22,29,.07);
}
.profile-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #8b838c;
}
.profile-avatar-placeholder[hidden] { display: none !important; }
.profile-avatar-placeholder svg { width: 25px; height: 25px; fill: currentColor; }
.profile-avatar-copy { display: grid; gap: 3px; min-width: 0; }
.profile-avatar-copy strong { font-size: 13px; }
.profile-avatar-copy span { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.profile-avatar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.profile-avatar-upload-button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 760px) {
  .coach-message-avatar,
  .user-message-avatar { width: 31px; height: 31px; flex-basis: 31px; }
  .assistant-message-row,
  .user-message-row { gap: 7px; }
  .assistant-message-content,
  .user-message-content { max-width: calc(100% - 38px); }
  .profile-avatar-editor { grid-template-columns: auto minmax(0,1fr); }
  .profile-avatar-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* 2026-08 LiveAvatar resilience: keep the last good frame visible during
   sandbox rotation or a short WebRTC reconnect instead of exposing black. */
.liveavatar-stage > video {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.liveavatar-freeze-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  background: #10243e;
  pointer-events: none;
}
.liveavatar-freeze-frame[hidden] { display: none !important; }
.liveavatar-placeholder { z-index: 3; }
.liveavatar-speaking { z-index: 7; }
.liveavatar-behavior-grid-single { grid-template-columns: minmax(0, 1fr); }

/* v0.6.5 AI Avatar Studio: audio-reactive CPU motion preview.
   The recorded upper-body idle clip keeps running; Chatterbox energy only adds
   a subtle speaking cue. Real mouth lip-sync is still owned by MuseTalk/GPU. */
.liveavatar-stage.studio-audio-speaking > video {
  transform: translate3d(var(--studio-x, 0px), var(--studio-y, 0px), 0) scale(var(--studio-scale, 1));
  transform-origin: 50% 34%;
  filter: brightness(var(--studio-brightness, 1));
  will-change: transform, filter;
}
.liveavatar-stage.studio-audio-speaking::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(11, 121, 201, .12), inset 0 -48px 90px rgba(11, 121, 201, .045);
  animation: studioSpeakingGlow 1.25s ease-in-out infinite;
}
@keyframes studioSpeakingGlow {
  0%, 100% { opacity: .32; }
  50% { opacity: .72; }
}

/* v0.7.0 AI Avatar Studio motion deck.
   Idle remains alive underneath while a dedicated speaking-motion layer fades
   in/out. This prevents hard cuts at the beginning/end of speech. Both loops
   use ping-pong source material so their own loop boundary is continuous. */
.avatarstudio-speaking-motion {
  position: absolute;
  inset: 0;
  z-index: 1 !important;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  background: transparent !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  will-change: opacity, transform, filter;
}
.avatarstudio-speaking-motion.active { opacity: 1; }
.liveavatar-stage.studio-audio-speaking > .avatarstudio-speaking-motion {
  transform: translate3d(var(--studio-x, 0px), var(--studio-y, 0px), 0) scale(var(--studio-scale, 1));
  transform-origin: 50% 34%;
  filter: brightness(var(--studio-brightness, 1));
}

/* AI Avatar Studio v1.0 client runtime */
.liveavatar-stage { position: relative; overflow: hidden; }
.avatar-client-runtime-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  z-index: 3;
  pointer-events: none;
}
.avatar-client-runtime-source {
  position: absolute !important;
  width: 2px !important;
  height: 2px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
  top: -9999px !important;
}
.liveavatar-stage.avatar-client-runtime-active > #liveavatar-video,
.liveavatar-stage.avatar-client-runtime-active > #liveavatar-freeze-frame,
.liveavatar-stage.avatar-client-runtime-active > .avatarstudio-speaking-motion {
  opacity: 0 !important;
  visibility: hidden !important;
}
.liveavatar-stage.avatar-client-runtime-active .liveavatar-speaking,
.liveavatar-stage.avatar-client-runtime-active .liveavatar-status-button {
  z-index: 8;
}


/* v1.5.8: the live Portrait Rig is the Coach identity; redundant round Coach
   images are intentionally removed from the text chat. */
.assistant-message-row { gap: 0; }
.assistant-message-content { max-width: min(860px, 100%); }
@media (max-width: 760px) {
  .assistant-message-row { gap: 0; }
  .assistant-message-content { max-width: 100%; }
}


/* ===== Lernen mit Froppy v2.1 school theme ===== */
:root{--froppy-accent:#ff7a1a;--school-navy:#0b1d3a;--school-blue:#0d79d8;--school-cyan:#25b7e7;--school-orange:#ff7a1a;--school-lime:#9ad72d;--school-paper:#f6fbff;--school-ink:#10233f;--school-muted:#60738d;}
body.school-shell{background:linear-gradient(135deg,#f7fbff 0%,#fffaf4 52%,#f5fff0 100%);color:var(--school-ink)}
.school-shell .sidebar{background:linear-gradient(180deg,#0c2244,#102e58);border-right:0;box-shadow:10px 0 40px rgba(8,29,58,.12)}
.school-shell .froppy-brand{border:0;background:transparent;color:white;width:100%;text-align:left;cursor:pointer}.school-shell .froppy-logo{width:62px;height:62px;object-fit:contain;border-radius:16px;background:rgba(255,255,255,.08);padding:3px}.school-shell .sidebar-brand-copy strong{font-size:1.05rem;color:#fff}.school-shell .sidebar-brand-copy span{color:#acd9ff}.school-shell .primary{background:linear-gradient(135deg,#ff8b26,#ff6a00);border:0;color:white;box-shadow:0 8px 22px rgba(255,122,26,.25)}
.school-shell .folder-section-label,.school-shell .unassigned-divider span{color:#bcd7f2}.school-shell .conversation-item strong{color:#fff}.school-shell .conversation-item span,.school-shell .folder-name,.school-shell .folder-count{color:#b9d2ea}.school-shell .conversation-row.active{background:rgba(37,183,231,.16)}
.school-shell .topbar{background:rgba(255,255,255,.86);backdrop-filter:blur(16px);border-bottom:1px solid #e4edf6}.school-shell .case-title-row h1{color:#10233f}
.school-shell .persistent-cycle-area{background:rgba(255,255,255,.74);border-bottom:1px solid #e4edf6}.school-shell .cycle button.active{background:#0d79d8;color:#fff;box-shadow:0 6px 16px rgba(13,121,216,.18)}.school-shell .cycle button.complete{color:#0b6b46}.school-shell .cycle button.complete span{background:#9ad72d;color:#183d13}
.school-shell .chat-panel{background:transparent}.school-shell .composer-zone{background:linear-gradient(180deg,rgba(247,251,255,0),rgba(247,251,255,.95) 30%,rgba(247,251,255,1))}.school-shell .composer{background:white;border:1px solid #dbe8f4;box-shadow:0 12px 35px rgba(13,65,112,.10)}.school-shell .send-button{background:#0d79d8}.school-shell .voice-button{color:#0d79d8}.school-shell .message.assistant .bubble{background:#fff;border:1px solid #dbe8f4;box-shadow:0 5px 18px rgba(13,65,112,.06)}.school-shell .message.user .bubble{background:linear-gradient(135deg,#0d79d8,#25a6df);color:#fff}.school-shell .message-meta{color:#71859c}
.school-home{max-width:1180px!important;margin:0 auto!important;padding:24px 32px 120px!important;display:block!important;text-align:left!important}.school-hero{display:grid;grid-template-columns:1fr 260px;gap:32px;align-items:center;padding:28px 32px;border-radius:30px;background:radial-gradient(circle at 85% 15%,rgba(154,215,45,.38),transparent 34%),linear-gradient(135deg,#e9f6ff,#fff7eb);border:1px solid #deebf5;box-shadow:0 18px 55px rgba(20,68,112,.10)}.school-hero img{width:240px;max-height:205px;object-fit:contain}.school-kicker{font-weight:800;color:#ff7416;letter-spacing:.03em;margin:0 0 8px}.school-hero h2{font-size:clamp(2rem,4vw,3.6rem);line-height:1.03;margin:0 0 14px;color:#0b1d3a}.school-hero p{font-size:1.08rem;color:#536a84;max-width:680px}
.grade-picker,.subject-picker{margin-top:26px}.grade-picker>strong,.subject-picker strong{font-size:1.05rem}.grade-grid{display:grid;grid-template-columns:repeat(12,minmax(46px,1fr));gap:9px;margin-top:12px}.grade-chip{border:1px solid #d9e7f3;background:#fff;border-radius:15px;padding:13px 6px;font-weight:800;color:#173a5e;cursor:pointer;transition:.18s ease}.grade-chip:hover{transform:translateY(-2px);border-color:#79bdeb}.grade-chip.active{background:#0d79d8;color:#fff;border-color:#0d79d8;box-shadow:0 7px 18px rgba(13,121,216,.20)}
.subject-picker-head{display:flex;justify-content:space-between;gap:18px;align-items:baseline}.subject-picker-head span{color:#6a7e94;font-size:.92rem}.subject-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:12px}.subject-card{border:1px solid #dce9f4;background:rgba(255,255,255,.94);border-radius:22px;padding:18px;text-align:left;cursor:pointer;display:grid;grid-template-columns:52px 1fr;gap:14px;align-items:center;transition:.18s ease;box-shadow:0 6px 18px rgba(19,67,111,.05)}.subject-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(19,67,111,.11);border-color:#9acbed}.subject-card .subject-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:#edf7ff;color:#0d79d8;font-weight:900;font-size:1.3rem}.subject-card strong{display:block;color:#112b47}.subject-card small{display:block;margin-top:4px;color:#6d8096;line-height:1.35}.subject-card .teacher-hint{display:block;margin-top:7px;color:#ff7416;font-weight:700;font-size:.78rem}.subject-empty{grid-column:1/-1;padding:30px;border:1px dashed #c8d9e8;border-radius:20px;color:#6b8098;text-align:center;background:rgba(255,255,255,.5)}
.school-shell .liveavatar-placeholder{background:linear-gradient(180deg,#eaf7ff,#fff8ed)}.school-shell .liveavatar-placeholder-mark{background:transparent}.school-shell .liveavatar-placeholder-mark img{width:120px;height:120px;object-fit:contain}.school-shell .status-dot.success{background:#62bd28}.school-shell .status-dot.checking{background:#ff9b28}.school-shell .fineprint{color:#7a8da2}.school-shell .used-knowledge{border-color:#dbe8f4}.school-shell .chat-phase-divider span{background:#eef8ff;color:#1b689f;border:1px solid #d5ebfa}
@media(max-width:900px){.school-hero{grid-template-columns:1fr}.school-hero img{display:none}.grade-grid{grid-template-columns:repeat(6,1fr)}.subject-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.school-home{padding:16px 14px 110px!important}.school-hero{padding:22px}.grade-grid{grid-template-columns:repeat(4,1fr)}.subject-grid{grid-template-columns:1fr}.cycle button{font-size:.74rem}}


/* 2026-08 Froppy v2.1.1: subject selection is a real pre-lesson screen. */
.school-shell.school-home-mode .persistent-cycle-area,
.school-shell.school-home-mode .composer-zone,
.school-shell.school-home-mode .liveavatar-panel,
.school-shell.school-home-mode .liveavatar-drawer-handle {
  display: none !important;
}
.school-shell.school-home-mode .content-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}
.school-shell.school-home-mode .chat-panel {
  min-height: 0;
  overflow: hidden;
}
.school-shell.school-home-mode .school-home {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 52px !important;
}
.school-shell.school-home-mode .school-home .grade-picker,
.school-shell.school-home-mode .school-home .subject-picker {
  scroll-margin-top: 18px;
}
.school-shell.school-home-mode .school-home .subject-picker {
  padding-bottom: 18px;
}
@media (max-width: 1050px) {
  .school-shell.school-home-mode .chat-panel { min-height: 0; }
  .school-shell.school-home-mode .school-home { overflow-y: visible; }
  .school-shell.school-home-mode .workspace,
  .school-shell.school-home-mode .case-workspace,
  .school-shell.school-home-mode .content-grid,
  .school-shell.school-home-mode .chat-panel { overflow: visible; }
}


/* v2.1.2: Klassenstufe wird im persoenlichen Profil gespeichert. */
.school-grade-profile-link{color:#0d79d8;font-weight:800;text-decoration:none}.school-grade-profile-link:hover{text-decoration:underline}.school-profile-prompt{display:grid;gap:10px;justify-items:start;text-align:left;padding:28px}.school-profile-prompt strong{font-size:1.05rem;color:#173a5e}.school-profile-prompt span{max-width:680px;line-height:1.5}.school-profile-button{display:inline-flex!important;width:auto!important;text-decoration:none;margin-top:4px}.profile-grid select{width:100%;min-height:44px;border:1px solid var(--border);border-radius:12px;background:#fff;padding:10px 12px;color:var(--text);font:inherit}

/* ===== Lernen mit Froppy v2.1.3 hotfixes ===== */
/* Lehrerantworten: dunkler Text auf heller Sprechblase. Die fruehere Coach-Rollenregel
   setzte hier Weiss; das School-Theme hatte nur den Hintergrund ueberschrieben. */
.school-shell .message.assistant .bubble {
  color: #10233f !important;
}
.school-shell .message.assistant .bubble a,
.school-shell .message.assistant .bubble strong,
.school-shell .message.assistant .bubble code {
  color: inherit;
}

/* Froppy bleibt innerhalb der linken Navigation und kann weder Topbar noch
   den Drawer-Griff ueberlagern. */
.school-shell .sidebar {
  overflow-x: hidden;
}
.school-shell .froppy-brand {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 58px;
  max-height: 66px;
  padding: 4px 2px;
  margin-bottom: 18px;
  overflow: hidden;
  flex: 0 0 auto;
}
.school-shell .froppy-logo {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px;
  max-width: 50px;
  min-height: 50px;
  max-height: 50px;
  flex: 0 0 50px;
  object-fit: contain;
  object-position: center;
  display: block;
}
.school-shell .sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
}
.school-shell .sidebar-brand-copy strong,
.school-shell .sidebar-brand-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.school-shell .school-hero {
  overflow: hidden;
}
.school-shell .school-hero img {
  display: block;
  max-width: 100%;
  position: relative;
  z-index: 0;
}


/* ===== Lernen mit Froppy v2.1.4 voice/avatar/logo polish ===== */
/* Brand: large mascot only. At 96 dpi, 1 cm is about 38 CSS px; the logo is
   intentionally allowed to overlap that far into the top bar. */
.school-shell .sidebar {
  overflow: visible !important;
  position: relative;
  z-index: 30;
  padding-top: 138px;
}
.school-shell .froppy-brand {
  position: absolute !important;
  top: 8px;
  left: 12px;
  width: calc(100% + 26px) !important;
  max-width: none !important;
  height: 122px !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  pointer-events: auto;
  z-index: 60;
}
.school-shell .froppy-logo {
  width: 296px !important;
  height: 122px !important;
  min-width: 296px !important;
  max-width: 296px !important;
  min-height: 122px !important;
  max-height: 122px !important;
  flex: 0 0 296px !important;
  object-fit: contain !important;
  object-position: left center !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  filter: drop-shadow(0 8px 13px rgba(3,24,50,.20));
}
.school-shell .sidebar-brand-copy { display: none !important; }
.school-shell .topbar { position: relative; z-index: 10; }
@media (max-width: 760px) {
  .school-shell .sidebar { padding-top: 20px; overflow: hidden !important; }
  .school-shell .froppy-brand { position: relative !important; top: auto; left: auto; width: 100% !important; height: 76px !important; }
  .school-shell .froppy-logo { width: 180px !important; min-width: 180px !important; max-width: 180px !important; height: 76px !important; min-height: 76px !important; max-height: 76px !important; }
}

/* v2.1.6 - Eigene Unterlagen, Lernpfad und Achievements */
.subject-card.material-subject-card {
  border: 2px dashed rgba(255,116,22,.42);
  background: linear-gradient(135deg, rgba(255,247,235,.98), rgba(239,249,255,.98));
  box-shadow: 0 10px 26px rgba(255,116,22,.10);
}
.subject-card.material-subject-card .subject-icon {
  background: linear-gradient(135deg,#ff8a22,#ffcf44);
  color:#fff;
  font-size:1.45rem;
}
.subject-card.material-subject-card .teacher-hint { color:#df6817; }
.subject-card.material-subject-card:hover { border-color:#ff8a22; }

.learning-progress-strip {
  margin: 0 18px 12px;
  padding: 12px 14px;
  border: 1px solid #dbe9f3;
  border-radius: 16px;
  background: linear-gradient(135deg,rgba(248,252,255,.97),rgba(255,250,241,.97));
  box-shadow: 0 8px 22px rgba(20,68,112,.06);
}
.learning-progress-strip[hidden] { display:none !important; }
.learning-progress-head { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:9px; }
.learning-progress-head > div { min-width:0; display:grid; gap:1px; }
.learning-progress-kicker { color:#ff7416; font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.learning-progress-head strong { color:#17324c; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#learning-progress-count { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#eef7ff; color:#1678c7; font-size:9px; font-weight:850; }
.learning-skill-chips { display:flex; flex-wrap:wrap; gap:7px; }
.learning-skill-chip { display:inline-flex; align-items:center; gap:6px; min-height:27px; padding:5px 9px; border-radius:999px; border:1px solid #e3ebf1; background:#fff; color:#5a6b7c; font-size:9px; font-weight:750; }
.learning-skill-chip::before { content:""; width:7px; height:7px; border-radius:50%; background:#f2a93b; box-shadow:0 0 0 3px rgba(242,169,59,.12); }
.learning-skill-chip.safe { color:#27724e; border-color:#cfe8d9; background:#f4fcf7; }
.learning-skill-chip.safe::before { background:#31a86c; box-shadow:0 0 0 3px rgba(49,168,108,.12); }
.learning-skill-chip.strong { color:#245b9a; border-color:#ccdef3; background:#f2f8ff; }
.learning-skill-chip.strong::before { background:#2d83db; box-shadow:0 0 0 3px rgba(45,131,219,.13); }

.material-dialog { width:min(760px,calc(100vw - 28px)); max-width:760px; border:0; padding:0; border-radius:26px; background:transparent; color:#17324c; }
.material-dialog::backdrop { background:rgba(13,31,49,.52); backdrop-filter:blur(5px); }
.material-dialog-card { max-height:min(820px,calc(100vh - 36px)); overflow:auto; padding:24px; border-radius:26px; background:#fff; box-shadow:0 26px 90px rgba(12,31,48,.28); }
.material-dialog-head { align-items:flex-start; }
.material-dialog-head h2 { margin:2px 0 6px; color:#102a43; font-size:25px; }
.material-dialog-head p:last-child { margin:0; max-width:560px; color:#6c8091; line-height:1.5; font-size:12px; }
.material-upload-form { display:grid; gap:12px; margin-top:18px; }
.material-dropzone { min-height:190px; display:grid; place-items:center; align-content:center; gap:8px; padding:24px; border:2px dashed #bdd7e9; border-radius:22px; background:linear-gradient(135deg,#f4fbff,#fff9ef); text-align:center; cursor:pointer; transition:.18s ease; }
.material-dropzone:hover,.material-dropzone.dragover { transform:translateY(-2px); border-color:#ff8a22; box-shadow:0 14px 30px rgba(20,68,112,.08); }
.material-dropzone input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.material-upload-icon { width:58px; height:58px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(135deg,#1d89d8,#57c7ee); color:#fff; font-size:25px; font-weight:900; box-shadow:0 12px 24px rgba(29,137,216,.20); }
.material-dropzone strong { color:#17324c; font-size:16px; }
.material-dropzone span:last-of-type { color:#7a8b9a; font-size:10px; }
.material-file-name { min-height:30px; padding:8px 10px; border-radius:10px; background:#f5f8fa; color:#64798c; font-size:10px; }
.material-primary { justify-self:end; min-width:190px; }
.material-loading { min-height:280px; display:grid; place-items:center; align-content:center; gap:10px; text-align:center; color:#607487; }
.material-loading[hidden] { display:none !important; }
.material-loading strong { color:#16334d; font-size:16px; }
.material-loading span { max-width:470px; font-size:11px; }
.material-loader { width:56px; height:56px; border-radius:50%; border:5px solid #e4eef5; border-top-color:#ff7b19; animation:materialSpin .9s linear infinite; }
@keyframes materialSpin { to { transform:rotate(360deg); } }
.material-analysis { margin-top:16px; }
.material-analysis[hidden] { display:none !important; }
.material-analysis-title { padding:18px 20px; border-radius:20px; background:linear-gradient(135deg,#eff9ff,#fff7e9); }
.material-subject-badge { display:inline-flex; padding:5px 9px; margin-bottom:7px; border-radius:999px; background:#e7f5ff; color:#1477bd; font-size:9px; font-weight:900; }
.material-analysis-title h3 { margin:0 0 6px; color:#12314b; font-size:21px; }
.material-analysis-title p { margin:0; color:#657a8d; line-height:1.55; font-size:11px; }
.material-path-list { display:grid; gap:8px; margin:15px 0 0; padding:0; list-style:none; counter-reset:materialPath; }
.material-path-list li { counter-increment:materialPath; display:grid; grid-template-columns:34px 1fr; gap:10px; align-items:start; padding:11px 12px; border:1px solid #e2ebf1; border-radius:14px; background:#fff; }
.material-path-list li::before { content:counter(materialPath); width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:#fff0df; color:#e86c13; font-size:11px; font-weight:900; }
.material-path-list strong { display:block; color:#203b54; font-size:11px; }
.material-path-list span { display:block; margin-top:3px; color:#768898; font-size:9.5px; line-height:1.45; }
.material-analysis-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
.material-analysis-actions button { min-width:130px; }
#material-error { margin-top:12px; }

.achievement-layer { position:fixed; inset:0; z-index:120; pointer-events:none; overflow:hidden; }
.achievement-card { position:absolute; left:50%; top:88px; width:min(390px,calc(100vw - 28px)); transform:translate(-50%,-18px) scale(.94); opacity:0; display:grid; grid-template-columns:56px 1fr; gap:13px; align-items:center; padding:15px 17px; border:1px solid rgba(255,193,51,.45); border-radius:20px; background:rgba(255,255,255,.97); box-shadow:0 22px 65px rgba(17,47,72,.22); animation:achievementPop 4.2s ease forwards; }
.achievement-card .achievement-icon { width:56px; height:56px; display:grid; place-items:center; border-radius:18px; background:linear-gradient(135deg,#fff0a8,#ffb53d); font-size:28px; box-shadow:0 9px 20px rgba(255,181,61,.24); }
.achievement-card small { color:#ff7416; font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.achievement-card strong { display:block; margin-top:2px; color:#15314a; font-size:16px; }
.achievement-card p { margin:3px 0 0; color:#6f8292; font-size:10px; line-height:1.4; }
@keyframes achievementPop { 0%{opacity:0;transform:translate(-50%,-18px) scale(.94)} 12%,82%{opacity:1;transform:translate(-50%,0) scale(1)} 100%{opacity:0;transform:translate(-50%,-9px) scale(.98)} }
.confetti-piece { position:absolute; top:-18px; width:9px; height:14px; border-radius:2px; opacity:.95; animation:confettiFall var(--fall,2.5s) linear forwards; transform:rotate(var(--rot,0deg)); }
@keyframes confettiFall { to { transform:translate(var(--drift,0px),calc(100vh + 40px)) rotate(720deg); opacity:.15; } }

@media (max-width:760px) {
  .learning-progress-strip { margin:0 9px 9px; }
  .material-dialog-card { padding:17px; border-radius:20px; }
  .material-dropzone { min-height:160px; }
  .material-analysis-actions { flex-direction:column-reverse; }
  .material-analysis-actions button,.material-primary { width:100%; min-width:0; }
}

/* ===== Lernen mit Froppy v2.2.0: Login, Nutzerprofil, Lehrer-Favorit & Adminpool ===== */
.froppy-login-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,196,63,.26), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(52,184,229,.25), transparent 30%),
    linear-gradient(145deg,#f5fbff 0%,#fffaf1 52%,#f4fff0 100%);
  color: #17324c;
}
.froppy-login-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 36px 34px 32px;
  border: 1px solid rgba(31,99,142,.11);
  border-radius: 30px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 90px rgba(22,66,101,.16);
  text-align: center;
}
.froppy-login-logo { width: min(330px, 86%); max-height: 150px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(16,65,90,.12)); }
.froppy-login-card h1 { margin: 4px 0 0; font-size: clamp(28px,5vw,40px); color:#15344e; }
.froppy-login-card > p { max-width: 420px; margin: 0; color:#687f91; line-height:1.6; font-size:14px; }
.google-login-button {
  width: min(360px,100%);
  min-height: 54px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:8px;
  padding: 0 20px;
  border:1px solid #d7e0e7;
  border-radius:16px;
  background:#fff;
  color:#25384a;
  text-decoration:none;
  box-shadow:0 8px 22px rgba(23,62,92,.08);
  transition:.18s ease;
}
.google-login-button:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(23,62,92,.13); border-color:#becbd5; }
.google-g { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:linear-gradient(135deg,#4285f4,#34a853 48%,#fbbc05 72%,#ea4335); color:#fff; font-weight:900; }
.login-setup-warning { width:100%; display:grid; gap:7px; padding:16px; border-radius:16px; border:1px solid #ffd28a; background:#fff8e9; color:#75511a; text-align:left; }
.login-setup-warning span,.login-setup-warning small { line-height:1.45; }
.login-setup-warning code { word-break:break-all; }
.froppy-login-note { max-width:430px; color:#8796a3; line-height:1.45; }

.profile-page { min-height:100vh; margin:0; background:linear-gradient(150deg,#f6fbff,#fffaf2 55%,#f8fff3); color:#17324c; }
.profile-topbar { min-height:82px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 26px; border-bottom:1px solid #e4edf3; background:rgba(255,255,255,.94); position:sticky; top:0; z-index:20; backdrop-filter:blur(14px); }
.profile-brand { display:flex; align-items:center; text-decoration:none; }
.profile-brand img { width:210px; height:64px; object-fit:contain; object-position:left center; }
.profile-topbar-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.profile-page-main { width:min(980px,calc(100% - 32px)); margin:0 auto; padding:34px 0 58px; display:grid; gap:18px; }
.profile-page-hero { padding:8px 4px 2px; }
.profile-page-hero h1 { margin:3px 0 7px; font-size:clamp(30px,4vw,44px); color:#16364f; }
.profile-page-hero p { margin:0; color:#6b8090; }
.google-profile-card { display:flex; justify-content:space-between; align-items:center; gap:18px; }
.google-profile-identity { display:flex; align-items:center; gap:14px; min-width:0; }
.google-profile-identity > div:last-child { display:grid; gap:2px; min-width:0; }
.google-profile-identity strong,.google-profile-identity small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.google-profile-picture,.google-profile-placeholder { width:58px; height:58px; flex:0 0 58px; border-radius:18px; object-fit:cover; box-shadow:0 7px 18px rgba(20,64,96,.12); }
.google-profile-placeholder { display:grid; place-items:center; background:linear-gradient(135deg,#2e8fd1,#65c8e8); color:white; font-size:22px; font-weight:900; }
.school-user-profile-form { display:grid; gap:20px; }
.school-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }

.topbar-user-pill { display:flex; align-items:center; min-height:34px; padding:6px 11px; border-radius:999px; background:#f1f7fb; border:1px solid #dce8ef; color:#456276; font-size:10px; font-weight:800; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.teacher-identity { display:flex; align-items:center; justify-content:center; gap:8px; min-height:34px; margin:8px auto 0; padding:5px 8px 5px 12px; border:1px solid rgba(212,226,235,.95); border-radius:999px; background:rgba(255,255,255,.94); box-shadow:0 7px 20px rgba(14,51,78,.08); color:#264861; font-size:10px; font-weight:850; width:max-content; max-width:90%; }
.teacher-identity[hidden] { display:none !important; }
.teacher-heart { width:28px; height:28px; display:grid; place-items:center; padding:0; border:0; border-radius:50%; background:#f5f7f9; color:#a4b1ba; cursor:pointer; font-size:16px; line-height:1; transition:.16s ease; }
.teacher-heart:hover { transform:scale(1.08); background:#fff6e8; color:#F59E0B; }
.teacher-heart.liked { color:#F59E0B; background:#FFF3E0; box-shadow:0 0 0 3px rgba(245,158,11,.08); }

.admin-avatar-pool-card { margin-top:18px; }
.admin-avatar-pool-card .card-head { align-items:flex-start; }
.admin-avatar-pool-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:12px; margin-top:14px; }
.admin-avatar-pool-item { display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:center; min-height:86px; padding:11px; border:1px solid #e1eaf0; border-radius:16px; background:#fbfdff; }
.admin-avatar-pool-preview { width:64px; height:64px; border-radius:14px; object-fit:cover; background:linear-gradient(135deg,#eaf5fb,#fff2df); }
.admin-avatar-pool-copy { display:grid; gap:4px; min-width:0; }
.admin-avatar-pool-copy strong { color:#17364f; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-avatar-pool-copy small { color:#728697; line-height:1.35; }
.admin-pool-switch { display:flex; align-items:center; gap:6px; padding:6px 8px; border-radius:999px; background:#f0f5f8; color:#5d7181; font-size:9px; font-weight:850; white-space:nowrap; }
.admin-pool-switch input { accent-color:#35a769; }

@media (max-width:760px) {
  .profile-topbar { padding:8px 14px; min-height:72px; }
  .profile-brand img { width:150px; height:52px; }
  .profile-topbar-actions { gap:6px; }
  .profile-topbar-actions .secondary { padding:8px 10px; font-size:9px; }
  .profile-page-main { width:min(100% - 20px,980px); padding-top:22px; }
  .google-profile-card { align-items:flex-start; flex-direction:column; }
  .school-profile-grid { grid-template-columns:1fr; }
  .topbar-user-pill { display:none; }
  .admin-avatar-pool-grid { grid-template-columns:1fr; }
}


/* v2.4.9 · Aufgaben bleiben vollständig in der Lehrer-Chatblase. */
/* v2.3.0 · family profiles */
.child-settings-main{max-width:1120px}.account-summary-card{align-items:center}.account-summary-note{color:var(--muted);font-size:12px}.children-settings-card{scroll-margin-top:88px}.children-card-head{align-items:flex-start}.child-create-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(170px,.6fr);gap:14px;padding:18px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.68);margin:16px 0}.child-create-form[hidden]{display:none}.child-google-check{grid-column:1/-1;display:flex!important;align-items:center;gap:8px}.child-google-check input{width:auto}.child-create-actions{grid-column:1/-1}.children-profile-grid{display:grid;gap:14px;margin-top:16px}.child-profile-card{display:grid;grid-template-columns:210px minmax(0,1fr) auto;gap:18px;align-items:center;padding:18px;border:1px solid var(--line);border-radius:22px;background:rgba(255,255,255,.82);box-shadow:0 8px 26px rgba(26,48,70,.06)}.child-profile-card.active{border-color:rgba(37,180,132,.5);box-shadow:0 8px 28px rgba(37,180,132,.12)}.child-profile-visual{display:flex;align-items:center;gap:12px}.child-profile-avatar-shell{width:74px;height:74px;flex:0 0 74px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#e4f7ed,#dcefff);border:3px solid #fff;box-shadow:0 5px 16px rgba(30,54,75,.14)}.child-profile-avatar{width:100%;height:100%;object-fit:cover}.child-profile-avatar-placeholder{font-size:26px;font-weight:800;color:#245366}.child-profile-avatar-actions{display:grid;gap:5px;justify-items:start}.child-avatar-upload-label{cursor:pointer}.compact{min-height:30px!important;padding:6px 10px!important;font-size:11px!important}.ghost{border:0;background:transparent;color:var(--muted);cursor:pointer}.danger-text{border:0;background:transparent;color:#b43b43;cursor:pointer}.child-profile-fields{display:grid;grid-template-columns:minmax(180px,1fr) 150px;gap:12px}.child-profile-meta{grid-column:1/-1;display:flex;align-items:center;gap:10px}.child-active-badge{background:#dff8ec;color:#08724c;border-radius:999px;padding:4px 9px;font-size:10px;font-weight:800}.child-save-state{font-size:10px;color:var(--muted)}.child-save-state.success{color:#08724c}.child-save-state.saving{color:#9b6500}.child-save-state.danger{color:#b43b43}.child-profile-actions{display:grid;gap:7px;min-width:118px}.children-empty-state{display:grid;place-items:center;text-align:center;gap:7px;padding:34px;border:1px dashed var(--line);border-radius:20px;color:var(--muted)}.children-empty-state strong{color:var(--text);font-size:16px}@media(max-width:850px){.child-profile-card{grid-template-columns:1fr}.child-profile-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.child-profile-visual{justify-content:flex-start}}@media(max-width:620px){.child-create-form,.child-profile-fields{grid-template-columns:1fr}.child-profile-meta,.child-google-check,.child-create-actions{grid-column:1}.child-profile-actions{grid-template-columns:1fr}}

/* v2.3.0 · cleaned admin navigation */
.admin-sidebar{display:flex;flex-direction:column;gap:10px;padding-top:18px}.admin-brand-link{margin-bottom:8px}.admin-sidebar-label{padding:0 10px;margin-top:8px;font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.46);font-weight:800}.admin-side-nav{display:grid;gap:6px}.admin-side-nav-item{appearance:none;border:1px solid transparent;background:transparent;color:rgba(255,255,255,.75);display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;text-align:left;padding:10px;border-radius:13px;cursor:pointer;width:100%;transition:.16s ease}.admin-side-nav-item:hover{background:rgba(255,255,255,.07);color:#fff}.admin-side-nav-item.active{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.12);color:#fff}.admin-side-nav-item>span:last-child{display:grid;gap:2px;min-width:0}.admin-side-nav-item strong{font-size:12px}.admin-side-nav-item small{font-size:8.5px;line-height:1.25;color:rgba(255,255,255,.5)}.admin-nav-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.08);font-size:14px}.admin-sidebar-spacer{flex:1}.admin-sidebar-link{display:block;color:rgba(255,255,255,.72);font-size:11px;text-decoration:none;padding:8px 10px;border-radius:10px}.admin-sidebar-link:hover{background:rgba(255,255,255,.07);color:#fff}.admin-avatar-pool-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.admin-rebuild-status{margin:10px 0 14px;padding:12px 14px;border-radius:14px;background:#f3f8fb;border:1px solid #dbe8ee;font-size:11px;color:#31515e}.admin-rebuild-status.success{background:#e9f9f1;border-color:#c9ebd9;color:#106642}.admin-rebuild-status.danger{background:#fff0f1;border-color:#f2c9cf;color:#9a303c}.settings-shell.sidebar-collapsed .admin-side-nav-item{grid-template-columns:1fr;padding:8px}.settings-shell.sidebar-collapsed .admin-side-nav-item>span:last-child,.settings-shell.sidebar-collapsed .admin-sidebar-label,.settings-shell.sidebar-collapsed .admin-sidebar-link,.settings-shell.sidebar-collapsed .admin-brand-link div{display:none}.settings-shell.sidebar-collapsed .admin-nav-icon{margin:auto}.settings-shell.sidebar-collapsed .admin-sidebar{align-items:stretch}

/* v2.3.0 · child chooser + per-subject teacher */
.child-switch-button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:4px 9px 4px 5px;cursor:pointer;min-height:34px}.child-switch-button img,.child-switch-button>span{width:25px;height:25px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#e7f5ed;color:#205d49;font-size:10px;font-weight:800}.child-switch-button strong{font-size:10.5px;max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.child-selector-overlay{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:rgba(19,31,38,.27);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.child-selector-overlay[hidden]{display:none}.child-selection-open>.sidebar,.child-selection-open>.workspace,.child-selection-open>.sidebar-drawer-handle{filter:blur(7px);pointer-events:none;user-select:none}.child-selector-card{width:min(760px,94vw);max-height:90vh;overflow:auto;background:rgba(255,255,255,.97);border:1px solid rgba(255,255,255,.7);border-radius:28px;padding:30px;box-shadow:0 28px 90px rgba(25,40,48,.22);text-align:center}.child-selector-logo{width:105px;max-height:90px;object-fit:contain}.child-selector-card h2{font-size:28px;margin:6px 0}.child-selector-card>p{color:var(--muted);max-width:560px;margin:0 auto 20px}.child-selector-list{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:20px 0}.child-selector-option{appearance:none;border:1px solid transparent;background:transparent;display:grid;justify-items:center;gap:7px;padding:10px 12px;border-radius:20px;cursor:pointer;min-width:112px}.child-selector-option:hover,.child-selector-option.active{background:#f2faf6;border-color:#d8ece2}.child-selector-avatar{width:82px;height:82px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#dff5e9,#e4efff);border:4px solid #fff;box-shadow:0 8px 22px rgba(28,55,67,.14)}.child-selector-avatar img{width:100%;height:100%;object-fit:cover}.child-selector-avatar b{font-size:28px;color:#285c51}.child-selector-option strong{font-size:13px}.child-selector-option small{font-size:9px;color:var(--muted)}.child-selector-empty{display:grid;justify-items:center;gap:10px;padding:24px}.child-manage-link{display:inline-flex;margin-top:4px}.subject-card-with-teacher{display:grid!important;grid-template-rows:1fr auto;padding:0!important;overflow:hidden}.subject-card-start{appearance:none;border:0;background:transparent;text-align:left;display:flex;gap:13px;align-items:center;padding:16px;width:100%;cursor:pointer;color:inherit}.subject-card-start:hover{background:rgba(255,255,255,.34)}.subject-teacher-picker{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;padding:9px 12px;border-top:1px solid rgba(43,75,87,.09);background:rgba(255,255,255,.5)}.subject-teacher-picker>span{font-size:9px;font-weight:800;color:#4a6b76}.subject-teacher-picker select,.material-teacher-choice select{min-width:0;width:100%;font-size:10px;padding:7px 26px 7px 8px;border-radius:10px}.material-teacher-choice{display:grid;gap:6px;font-size:11px;font-weight:700;margin:14px 0}.teacher-hint{display:block;margin-top:6px;font-size:9px;color:var(--muted)}@media(max-width:640px){.child-selector-card{padding:22px 14px}.child-selector-avatar{width:68px;height:68px}.child-selector-option{min-width:90px}.child-switch-button strong{display:none}}

/* ===== Froppy v2.3.1 · Rechtschreibung, LaTeX, Lernbilder & Chat-Hintergrund ===== */
.spelling-marker {
  display: inline;
  position: relative;
  z-index: 0;
  padding: 0 .08em;
  border-radius: .16em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 750;
}
.spelling-marker::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.07em;
  right: -.07em;
  bottom: .08em;
  height: .62em;
  border-radius: .18em .24em .15em .22em;
  transform: rotate(-.8deg);
  opacity: .58;
}
.spelling-wrong::before { background: #b98cff; }
.spelling-correct::before { background: #6fe39a; }
.spelling-wrong { text-decoration: underline wavy rgba(100,45,155,.55) 1.2px; text-underline-offset: 3px; }

.has-static-chat-background:not(.school-home-mode) .messages {
  background-image: linear-gradient(rgba(247,251,255,.18), rgba(247,251,255,.18)), var(--froppy-chat-background);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: local;
}
.has-static-chat-background:not(.school-home-mode) .message.assistant .bubble {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(2px);
}
.has-static-chat-background:not(.school-home-mode) .message.user .bubble {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.has-static-chat-background:not(.school-home-mode) .message-meta {
  text-shadow: 0 1px 5px rgba(255,255,255,.95);
}

.learning-image-card {
  width: min(520px, 100%);
  margin: 10px 0 4px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid #d8e7f3;
  box-shadow: 0 10px 28px rgba(21,72,112,.10);
}
.learning-image-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eef5f9;
  cursor: zoom-in;
}
.learning-image-open img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #f6fafc;
}
.learning-image-card figcaption {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px 10px;
  font-size: 12px;
  color: #566d80;
}
.learning-image-card figcaption span { font-weight: 700; color: #243746; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learning-image-card figcaption a { color: #0d79d8; text-decoration: none; white-space: nowrap; }
.learning-image-dialog { border: 0; padding: 0; border-radius: 22px; width: min(94vw, 980px); max-height: 92vh; background: transparent; }
.learning-image-dialog::backdrop { background: rgba(8,23,38,.72); backdrop-filter: blur(5px); }
.learning-image-dialog-card { background: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.learning-image-dialog-card img { display: block; width: 100%; max-height: 76vh; object-fit: contain; border-radius: 14px; background: #f2f6f8; }

@media (max-width: 720px) {
  .learning-image-card { width: 100%; }
  .learning-image-open img { max-height: 260px; }
  .learning-image-card figcaption { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* ===== Froppy v2.3.1 · Admin Hintergruende ===== */
.admin-avatar-pool-grid { grid-template-columns: repeat(auto-fit,minmax(360px,1fr)); }
.admin-avatar-pool-item-expanded { display:block; padding:12px; }
.admin-avatar-pool-main { display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:center; }
.admin-avatar-backgrounds { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid #e2ebf0; }
.admin-avatar-bg-slot { display:grid; grid-template-columns:76px minmax(0,1fr) auto; grid-template-areas:"thumb copy upload" "thumb copy remove"; align-items:center; gap:6px 9px; min-width:0; padding:8px; border-radius:12px; background:#f5f9fb; border:1px solid #e1ebf0; }
.admin-avatar-bg-thumb { grid-area:thumb; width:76px; height:54px; border-radius:9px; overflow:hidden; display:grid; place-items:center; color:#7790a1; background:#e8f0f5; }
.admin-avatar-bg-thumb img { width:100%; height:100%; object-fit:cover; }
.admin-avatar-bg-slot-copy { grid-area:copy; min-width:0; display:grid; gap:3px; }
.admin-avatar-bg-slot-copy strong { font-size:11px; color:#17364f; }
.admin-avatar-bg-slot-copy small { font-size:9px; color:#758a99; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-bg-upload-label { grid-area:upload; cursor:pointer; margin:0; }
.admin-bg-file-input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.admin-avatar-bg-slot [data-avatar-bg-remove] { grid-area:remove; }
.admin-chat-background-grid { display:grid; grid-template-columns:minmax(220px,330px) 1fr; gap:18px; align-items:center; }
.admin-chat-background-preview { aspect-ratio:16/9; overflow:hidden; border-radius:16px; display:grid; place-items:center; background:#eef4f7; border:1px dashed #cbdbe4; color:#718694; }
.admin-chat-background-preview img { width:100%; height:100%; object-fit:cover; }
.admin-chat-background-controls { display:flex; align-items:flex-start; gap:9px; flex-wrap:wrap; }
.admin-chat-background-controls small { flex-basis:100%; color:#708493; line-height:1.5; }
.admin-file-label { cursor:pointer; }
.settings-separator { border:0; border-top:1px solid #e3ebf0; margin:20px 0; }
.visual-learning-settings h3 { margin:0; }
@media (max-width:860px) {
  .admin-avatar-backgrounds { grid-template-columns:1fr; }
  .admin-chat-background-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .admin-avatar-pool-grid { grid-template-columns:1fr; }
  .admin-avatar-pool-main { grid-template-columns:56px 1fr; }
  .admin-avatar-pool-main .admin-pool-switch { grid-column:1/-1; }
  .admin-avatar-bg-slot { grid-template-columns:64px 1fr; grid-template-areas:"thumb copy" "upload remove"; }
  .admin-avatar-bg-thumb { width:64px; height:48px; }
}

/* ===== Froppy v2.3.3 · kompakte Fachkacheln, Lernbild und Eltern-Tagebuch ===== */
.compact-school-subject.subject-card-with-teacher {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-content:start;
  justify-items:stretch;
  min-height:190px;
  padding:16px 14px 13px !important;
  gap:10px;
  overflow:hidden;
  text-align:center;
}
.compact-school-subject .subject-card-start {
  min-height:126px;
  padding:0 !important;
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:92px auto;
  justify-items:center;
  align-items:center;
  align-content:center;
  gap:7px;
  text-align:center;
  border-radius:16px;
}
.compact-school-subject .subject-card-start:hover { background:rgba(255,255,255,.28); }
.compact-school-subject .subject-pack-icon {
  width:92px;
  height:92px;
  display:grid;
  place-items:center;
  font-size:0;
}
.compact-school-subject .subject-pack-icon img {
  display:block;
  width:82px;
  height:82px;
  object-fit:contain;
  filter:drop-shadow(0 5px 10px rgba(39,75,95,.08));
}
.compact-school-subject .subject-card-start strong {
  display:block;
  width:100%;
  color:#17364f;
  font-size:14px;
  line-height:1.2;
  text-align:center;
}
.compact-school-subject .subject-teacher-picker {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  justify-items:stretch;
  width:100%;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
.compact-school-subject .subject-teacher-picker select {
  width:100%;
  min-height:35px;
  padding:7px 28px 7px 10px;
  border-radius:11px;
  font-size:10.5px;
  font-weight:700;
  background-color:rgba(255,255,255,.88);
}

.learning-image-block {
  width:min(520px,100%);
  display:grid;
  gap:8px;
  margin:10px 0 8px;
}
.learning-image-intro-bubble {
  width:max-content;
  max-width:min(470px,92%);
  margin:0;
  padding:10px 13px;
  border:1px solid #dfe9ef;
  border-radius:16px 16px 16px 5px;
  background:rgba(255,255,255,.96);
  color:#243746 !important;
  box-shadow:0 6px 16px rgba(20,57,82,.06);
  font-size:12px;
  line-height:1.45;
}
.learning-image-block .learning-image-card { margin:0; }

.child-weekly-diary {
  grid-column:1/-1;
  display:grid;
  gap:9px;
  margin-top:2px;
  padding:15px 16px;
  border-top:1px solid #e3edf1;
  border-radius:15px;
  background:linear-gradient(145deg,rgba(245,251,248,.95),rgba(247,250,255,.95));
}
.child-weekly-diary-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.child-weekly-diary-head span { font-size:12px; font-weight:900; color:#1f5264; }
.child-weekly-diary-head small { padding:4px 8px; border-radius:999px; background:#e1f3e9; color:#247250; font-size:8.5px; font-weight:850; }
.child-weekly-summary { margin:0; color:#4c6777; font-size:11px; line-height:1.55; }
.child-weekly-days { display:grid; gap:6px; }
.child-diary-day { display:grid; grid-template-columns:88px minmax(0,1fr); gap:9px; align-items:start; padding:7px 9px; border-radius:10px; background:rgba(255,255,255,.72); }
.child-diary-day strong { color:#2c5c6c; font-size:9.5px; }
.child-diary-day span,.child-diary-empty { color:#6d8290; font-size:9.5px; line-height:1.4; }

.admin-side-nav-item .admin-nav-icon {
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(42,120,156,.08);
}
.admin-side-nav-item .admin-nav-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-side-nav-item.active .admin-nav-icon { background:rgba(255,255,255,.72); }
.curriculum-grade-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-top:14px; }
.curriculum-grade-grid span { display:grid; place-items:center; min-height:44px; padding:8px; border:1px solid #dfe9ef; border-radius:12px; background:#f8fbfd; color:#31586b; font-size:10px; font-weight:850; }
@media(max-width:850px){.curriculum-grade-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:560px){.curriculum-grade-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.child-diary-day{grid-template-columns:1fr;gap:2px}.compact-school-subject.subject-card-with-teacher{min-height:175px}.compact-school-subject .subject-pack-icon{width:78px;height:78px}.compact-school-subject .subject-pack-icon img{width:70px;height:70px}.compact-school-subject .subject-card-start{grid-template-rows:78px auto;min-height:112px}}

/* v2.3.4 · Eltern-Lernschwerpunkte */
.child-learning-focus{grid-column:1/-1;display:grid;gap:10px;margin-top:2px;padding:15px 16px;border:1px solid #e1eaf0;border-radius:17px;background:linear-gradient(145deg,rgba(251,248,255,.97),rgba(246,252,250,.97))}.child-learning-focus-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.child-learning-focus-head>div{display:grid;gap:2px}.child-learning-focus-head span{font-size:12px;font-weight:900;color:#513d72}.child-learning-focus-head small{font-size:9px;color:#74828f}.child-learning-focus-list{display:grid;gap:9px}.child-focus-loading,.child-focus-empty{padding:11px 12px;border:1px dashed #d9e2e9;border-radius:12px;color:#728391;font-size:10.5px;line-height:1.45;background:rgba(255,255,255,.58)}.learning-focus-card{display:grid;gap:8px;padding:12px 13px;border:1px solid #dfe7ed;border-radius:14px;background:rgba(255,255,255,.9);box-shadow:0 5px 16px rgba(31,55,74,.04)}.learning-focus-card.active{border-color:rgba(67,171,123,.42)}.learning-focus-card.expired{opacity:.78;background:rgba(248,248,248,.9)}.learning-focus-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.learning-focus-card-top>div{display:grid;gap:2px}.focus-subject{font-size:9px!important;text-transform:uppercase;letter-spacing:.06em;color:#718190!important}.learning-focus-card strong{font-size:12px;color:#263b49}.learning-focus-card>p{margin:0;color:#4d6574;font-size:10.5px;line-height:1.5}.focus-status{white-space:nowrap;font-size:9px;font-weight:850;padding:4px 8px;border-radius:999px;background:#eef2f5;color:#61727f}.focus-status.active{background:#def6e9;color:#13734d}.focus-status.expired{background:#f0ece8;color:#806d5c}.focus-status.inactive{background:#edf0f3;color:#687985}.focus-meta{display:flex;flex-wrap:wrap;gap:6px 10px;color:#7a8994;font-size:8.7px}.focus-source{color:#5b4b8a;font-weight:800}.focus-progress{padding:9px 10px;border-radius:11px;background:#f5f9fb;display:grid;gap:3px}.focus-progress>span{font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:#6d8090}.focus-progress p{margin:0;color:#45606f;font-size:9.5px;line-height:1.45}.focus-progress small{font-size:8.5px;color:#7a6b5b}.focus-actions{display:flex;gap:6px;flex-wrap:wrap}.learning-focus-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 34px);padding:0;border:0;border-radius:24px;background:#fff;box-shadow:0 28px 90px rgba(21,35,48,.28);overflow:auto}.learning-focus-dialog::backdrop{background:rgba(23,38,49,.48);backdrop-filter:blur(3px)}.learning-focus-form{display:grid;gap:16px;padding:22px}.learning-focus-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.learning-focus-dialog-head h2{margin:3px 0 4px;font-size:22px}.learning-focus-dialog-head p{margin:0;color:var(--muted);font-size:11px}.learning-focus-close{font-size:27px!important;line-height:1;min-width:34px;min-height:34px}.learning-focus-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.learning-focus-fields label{display:grid;gap:6px;font-size:10px;font-weight:800;color:#395364}.learning-focus-description-label{grid-column:1/-1}.learning-focus-fields textarea{resize:vertical;min-height:112px}.learning-focus-material-panel{display:grid;gap:10px;padding:14px;border:1px solid #e1e9ef;border-radius:16px;background:#f8fbfd}.learning-focus-material-head>div{display:grid;gap:3px}.learning-focus-material-head strong{font-size:12px;color:#2d4d5f}.learning-focus-material-head span{font-size:9px;color:#738692}.learning-focus-upload-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.learning-focus-upload-row input[type=file]{font-size:10px}.learning-focus-analysis-state{padding:9px 10px;border-radius:10px;background:#edf5f9;color:#466474;font-size:9.5px}.learning-focus-analysis-result{display:grid;gap:7px;padding:11px;border-radius:12px;background:#fff;border:1px solid #e2e9ee;color:#486271;font-size:9.5px;line-height:1.5}.learning-focus-analysis-result strong{font-size:11px;color:#335465}.learning-focus-analysis-result p{margin:0}.learning-focus-analysis-result ul{margin:4px 0 0;padding-left:17px}.learning-focus-analysis-result small{color:#7a8993}.learning-focus-attachments{display:grid;gap:6px}.learning-focus-attachment{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;gap:8px;align-items:center;padding:7px 9px;border:1px solid #e2e9ee;border-radius:10px;background:#fff;font-size:9.5px}.learning-focus-attachment small{color:#768894;font-size:8px}.learning-focus-attachment button{font-size:18px!important}.learning-focus-dialog-actions{display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:-22px;padding:12px 0 0;background:linear-gradient(transparent,#fff 30%)}@media(max-width:700px){.learning-focus-fields{grid-template-columns:1fr}.learning-focus-description-label{grid-column:1}.learning-focus-upload-row{grid-template-columns:1fr}.child-learning-focus-head{align-items:flex-start;flex-direction:column}.learning-focus-dialog-actions{flex-direction:column-reverse}.learning-focus-dialog-actions button{width:100%}}
.learning-focus-attachment a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
.learning-focus-attachment a:hover,
.learning-focus-attachment a:focus-visible {
  text-decoration: underline;
}

/* v2.3.6 · Verbindlicher Eltern-Lernplan */
.focus-status.completed{background:#e5f6ea;color:#176b45}.learning-focus-card.completed{border-color:rgba(35,139,85,.35);background:linear-gradient(145deg,rgba(250,255,251,.98),rgba(246,252,249,.98))}.focus-plan{display:grid;gap:8px;padding:11px 12px;border:1px solid #dce8e2;border-radius:13px;background:#fbfefc}.focus-plan-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.focus-plan-head strong{font-size:10.5px;color:#294f3d}.focus-plan-head span{font-size:8.8px;color:#6d8278;font-weight:750}.focus-plan-steps{display:grid;gap:7px}.focus-plan-step{display:grid;grid-template-columns:27px minmax(0,1fr);gap:9px;align-items:start;padding:8px 9px;border-radius:10px;background:#f3f6f5;border:1px solid transparent}.focus-plan-step.active{background:#F5FBFF;border-color:rgba(11,121,201,.26);box-shadow:0 4px 12px rgba(11,121,201,.05)}.focus-plan-step.completed{background:#eff9f3;border-color:rgba(40,151,92,.18)}.focus-plan-step.locked{opacity:.58}.focus-plan-step-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#dfe7e3;color:#657b70;font-size:10px;font-weight:900}.focus-plan-step.active .focus-plan-step-icon{background:#0B79C9;color:#fff}.focus-plan-step.completed .focus-plan-step-icon{background:#25915c;color:#fff}.focus-plan-step>div{display:grid;gap:2px}.focus-plan-step strong{font-size:10px;color:#2e4654}.focus-plan-step p{margin:0;font-size:9px!important;line-height:1.4;color:#5b6f78}.focus-plan-step small{font-size:8px;color:#60788A;line-height:1.35}.focus-plan-step .completed-note{color:#23724e;font-weight:800}.focus-source.manual{color:#6e7b86}.analysis-plan-preview{display:grid;gap:6px;padding:9px 10px;border-radius:11px;background:#f8fbf9;border:1px solid #deebe4}.analysis-plan-preview>b{font-size:10px;color:#315543}.analysis-plan-preview ol{display:grid;gap:7px;margin:0;padding-left:20px}.analysis-plan-preview li{padding-left:2px}.analysis-plan-preview li strong,.analysis-plan-preview li span,.analysis-plan-preview li small{display:block}.analysis-plan-preview li strong{font-size:9.5px;color:#304c3e}.analysis-plan-preview li span{margin-top:2px;color:#536b60}.analysis-plan-preview li small{margin-top:2px;color:#697b8a}

/* v2.3.8 · admin usage dashboard + account access */
.admin-metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;margin-top:12px}
.admin-metric-card{padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,#fff,#f5f9fc);display:grid;gap:3px;min-height:86px}
.admin-metric-card strong{font-size:24px;line-height:1;font-weight:900;letter-spacing:-.03em}
.admin-metric-card span{font-size:10px;color:var(--muted);font-weight:750}
.admin-analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.admin-analytics-grid>.settings-card{min-width:0}
.admin-daily-chart{display:flex;align-items:end;gap:7px;min-height:190px;padding-top:14px;overflow-x:auto}
.admin-daily-column{display:grid;grid-template-rows:1fr auto;gap:7px;min-width:28px;height:170px;align-items:end;text-align:center}
.admin-daily-bar-shell{height:135px;display:flex;align-items:end;justify-content:center}
.admin-daily-bar{width:18px;min-height:3px;border-radius:7px 7px 3px 3px;background:var(--froppy-accent,#0B79C9);opacity:.88}
.admin-daily-column small{font-size:8px;color:var(--muted);white-space:nowrap}
.admin-heatmap{display:grid;grid-template-columns:46px repeat(24,minmax(13px,1fr));gap:2px;align-items:center;overflow-x:auto;padding-bottom:5px}
.admin-heatmap-label{font-size:8px;color:var(--muted);white-space:nowrap}
.admin-heatmap-hour{font-size:7px;color:var(--muted);text-align:center}
.admin-heatmap-cell{height:16px;border-radius:3px;background:rgba(11,121,201,var(--heat,.06));min-width:13px}
.admin-peak-list,.admin-ranking-list,.admin-access-distribution{display:grid;gap:8px;margin-top:12px}
.admin-peak-item,.admin-ranking-item,.admin-access-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.admin-peak-item strong,.admin-ranking-item strong,.admin-access-item strong{font-size:11px}
.admin-peak-item span,.admin-ranking-item span,.admin-access-item span{font-size:10px;color:var(--muted)}
.admin-user-table-head{display:grid;grid-template-columns:1.8fr 1.1fr .9fr .65fr;gap:12px;padding:8px 12px;color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--line)}
.admin-user-list{display:grid}
.admin-user-row{display:grid;grid-template-columns:1.8fr 1.1fr .9fr .65fr;gap:12px;align-items:center;padding:12px;border-bottom:1px solid var(--line)}
.admin-user-row:last-child{border-bottom:0}
.admin-user-identity{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;min-width:0}
.admin-user-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;background:#eef4f8;display:grid;place-items:center;font-weight:900;color:var(--froppy-accent,#0B79C9);overflow:hidden}
.admin-user-identity-copy{display:grid;gap:2px;min-width:0}.admin-user-identity-copy strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-user-identity-copy small{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-user-usage{display:grid;gap:2px;font-size:9px;color:var(--muted)}.admin-user-usage strong{font-size:10px;color:var(--text)}
.admin-user-access-select{width:100%;min-width:100px;padding:8px 9px;font-size:10px}
.admin-user-status{display:flex;align-items:center;gap:7px;font-size:9px;color:var(--muted)}
.admin-user-status input{accent-color:var(--froppy-accent,#0B79C9)}
.admin-user-row.inactive{opacity:.56;background:#fafafa}
.admin-user-self-note{font-size:8px;color:var(--muted);margin-top:2px}
@media(max-width:980px){.admin-analytics-grid{grid-template-columns:1fr}.admin-user-table-head{display:none}.admin-user-row{grid-template-columns:1fr 1fr}.admin-user-identity{grid-column:1/-1}.admin-user-status{justify-self:start}}
@media(max-width:620px){.admin-user-row{grid-template-columns:1fr}.admin-user-identity{grid-column:auto}.admin-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v2.4.0 Pricing & subscription management */
.pricing-page{min-height:100vh;background:linear-gradient(180deg,#fff 0,#f5fafd 44%,#eef5f9 100%);color:#132A4A}
.pricing-topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid rgba(34,20,35,.08)}
.pricing-main{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:56px 0 72px}
.pricing-hero{text-align:center;max-width:820px;margin:0 auto 36px}
.pricing-hero h1{font-size:clamp(2rem,5vw,3.7rem);line-height:1.03;margin:8px 0 16px;letter-spacing:-.045em}
.pricing-hero p{font-size:1.05rem;line-height:1.65;color:#5f7080;margin:0 auto;max-width:760px}
.pricing-expired-note{margin:22px auto 0;padding:14px 16px;border:1px solid #e7b9c2;background:#fff5f7;border-radius:14px;color:#7d2638;text-align:left;max-width:760px;font-weight:650}
.pricing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch;margin-bottom:28px}
.pricing-card{position:relative;display:flex;flex-direction:column;min-height:520px;padding:28px;border:1px solid rgba(19,42,74,.12);background:#fff;border-radius:24px;box-shadow:0 18px 50px rgba(19,42,74,.07);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.pricing-card:hover{transform:translateY(-3px);box-shadow:0 24px 62px rgba(19,42,74,.11)}
.pricing-card.current{border:2px solid #075F9F;box-shadow:0 20px 60px rgba(11,121,201,.13)}
.pricing-card-featured{background:linear-gradient(180deg,#fff 0,#F5FBFF 100%);border-color:rgba(11,121,201,.28)}
.pricing-popular{position:absolute;right:20px;top:-12px;padding:7px 12px;border-radius:999px;background:#075F9F;color:#fff;font-size:.75rem;font-weight:800;box-shadow:0 8px 22px rgba(11,121,201,.25)}
.pricing-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.pricing-plan-badge{font-size:1.05rem;font-weight:850;letter-spacing:-.02em}
.pricing-plan-note{font-size:.78rem;font-weight:750;color:#52697c;background:#eef5f9;padding:7px 10px;border-radius:999px}
.pricing-price{display:flex;align-items:baseline;gap:8px;margin:28px 0 10px}
.pricing-price strong{font-size:2.55rem;letter-spacing:-.04em}
.pricing-price span{color:#667989;font-weight:650}
.pricing-card>p{color:#5f7080;line-height:1.55;min-height:50px}
.pricing-card ul{list-style:none;padding:0;margin:22px 0 28px;display:grid;gap:13px;flex:1}
.pricing-card li{position:relative;padding-left:27px;line-height:1.42;color:#25394d}
.pricing-card li::before{content:"✓";position:absolute;left:0;top:0;color:#075F9F;font-weight:900}
.pricing-card li.pricing-feature-off{color:#758492}
.pricing-card li.pricing-feature-off::before{content:"–";color:#8493a0}
.pricing-plan-action{width:100%;min-height:46px}
.pricing-subscription-card{margin-top:22px;padding:28px;border-radius:24px}
.subscription-status-badge{display:inline-flex;align-items:center;padding:8px 11px;border-radius:999px;font-size:.78rem;font-weight:850;background:#edf8f0;color:#27633a}
.subscription-status-badge.ending{background:#fff5df;color:#825c00}.subscription-status-badge.expired{background:#fff0f2;color:#8f2b3e}
.subscription-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.subscription-detail-row{display:flex;flex-direction:column;gap:5px;padding:16px;background:#f5f9fc;border:1px solid rgba(19,42,74,.08);border-radius:14px}
.subscription-detail-row span{font-size:.77rem;color:#7b6d78;text-transform:uppercase;letter-spacing:.04em;font-weight:750}.subscription-detail-row strong{font-size:1rem}
.subscription-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:20px}
.subscription-admin-note{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:14px;background:#eef7fd;border:1px solid #d8e7f0}.subscription-admin-note span{font-size:.88rem;color:#5f7282}
.pricing-footnote{max-width:840px;margin:28px auto 0;padding:18px 20px;border-radius:16px;background:#f3f8fb;color:#5f7080}.pricing-footnote strong{display:block;margin-bottom:4px;color:#21364b}.pricing-footnote p{margin:0;line-height:1.55}
.pricing-dialog{border:0;padding:0;background:transparent;max-width:min(540px,calc(100vw - 28px));width:100%}.pricing-dialog::backdrop{background:rgba(22,13,23,.48);backdrop-filter:blur(5px)}
.pricing-dialog-card{position:relative;padding:28px;background:#fff;border-radius:22px;box-shadow:0 32px 90px rgba(28,16,30,.3)}.pricing-dialog-card h2{margin:8px 0 10px}.pricing-dialog-card>p{color:#627687;line-height:1.55}
.pricing-dialog-close{position:absolute;right:16px;top:14px;border:0;background:transparent;font-size:1.8rem;cursor:pointer;color:#667989}
.pricing-google-sim{display:flex;gap:13px;align-items:center;margin:20px 0;padding:14px;border-radius:15px;background:#f8f8f8;border:1px solid #dce5ec}.pricing-google-sim>strong{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#fff;border:1px solid #ddd;font-size:1.2rem}.pricing-google-sim span{display:flex;flex-direction:column;gap:2px}.pricing-google-sim small{color:#667989}
.pricing-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
@media(max-width:900px){.pricing-grid{grid-template-columns:1fr}.pricing-card{min-height:auto}.subscription-details{grid-template-columns:1fr}.pricing-main{padding-top:32px}}
@media(max-width:620px){.pricing-main{width:min(100% - 20px,1180px)}.profile-topbar.pricing-topbar{align-items:flex-start;gap:12px}.pricing-topbar .profile-topbar-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end}.pricing-topbar .secondary{padding:8px 10px;font-size:.78rem}.pricing-card{padding:22px}.pricing-hero{text-align:left}.pricing-dialog-actions{flex-direction:column-reverse}.pricing-dialog-actions>*{width:100%}}
.pricing-card[data-plan-card="basic"],.pricing-card[data-plan-card="premium"]{cursor:pointer}
.pricing-dialog .danger{border:1px solid #c94350;background:#b4232f;color:#fff;border-radius:12px;padding:10px 16px;font-weight:750;cursor:pointer}.pricing-dialog .danger:hover{background:#971c27}.pricing-dialog .danger:disabled{opacity:.55;cursor:wait}

/* ===== Froppy v2.4.1 · unified parent/pricing topbar + polished checkout ===== */
.froppy-page-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 5px 24px rgba(19,42,74,.045);
}
.froppy-page-title { gap: 11px; }
.froppy-topbar-home {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.froppy-topbar-home:hover { background: var(--soft); }
.froppy-topbar-home img { width: 31px; height: 31px; object-fit: contain; display: block; }
.froppy-page-topbar .settings-button.active {
  border-color: rgba(11,121,201,.35);
  color: var(--froppy-accent);
  background: #eef7fd;
  box-shadow: 0 0 0 3px rgba(11,121,201,.06);
}

.pricing-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(52,191,132,.10), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(11,121,201,.09), transparent 30%),
    linear-gradient(180deg,#fff 0,#fff 20%,#f5fafd 65%,#eef5f9 100%);
  color: #132A4A;
}
.pricing-main { width: min(1220px,calc(100% - 36px)); margin: 0 auto; padding: 46px 0 76px; }
.pricing-hero-froppy {
  position: relative;
  overflow: hidden;
  max-width: none;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0,1fr) 210px;
  gap: 36px;
  align-items: center;
  padding: 34px 38px;
  margin: 0 0 30px;
  border: 1px solid rgba(11,121,201,.10);
  border-radius: 30px;
  background: linear-gradient(135deg,rgba(255,255,255,.98),rgba(238,248,253,.97));
  box-shadow: 0 22px 70px rgba(19,42,74,.08);
}
.pricing-hero-froppy::after {
  content:"";
  position:absolute;
  width:240px;
  height:240px;
  border-radius:50%;
  right:-90px;
  top:-100px;
  background:rgba(11,121,201,.07);
  pointer-events:none;
}
.pricing-hero-copy { position: relative; z-index: 1; }
.pricing-hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #eef9f4;
  color: #137451;
  font-size: .78rem;
  font-weight: 850;
  margin-bottom: 14px;
}
.pricing-hero-froppy h1 { font-size: clamp(2rem,4.5vw,3.75rem); line-height: 1.02; margin: 0 0 14px; letter-spacing: -.052em; max-width: 850px; }
.pricing-hero-froppy p { font-size: 1.04rem; line-height: 1.65; color: #5f7080; margin: 0; max-width: 780px; }
.pricing-trust-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.pricing-trust-row span { padding: 8px 11px; border-radius: 999px; background: #fff; border: 1px solid #dce6ed; color: #465c6e; font-size: .76rem; font-weight: 750; }
.pricing-hero-mark { position: relative; z-index: 1; display: grid; place-items: center; }
.pricing-hero-mark img { width: min(180px,100%); max-height: 170px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(19,42,74,.08)); }
.pricing-hero-froppy .pricing-expired-note { grid-column: 1/-1; max-width: none; width: 100%; margin: 0; }

.pricing-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: stretch; margin-bottom: 24px; }
.pricing-card {
  min-height: 550px;
  padding: 26px;
  border-radius: 26px;
  border: 1px solid rgba(19,42,74,.10);
  box-shadow: 0 14px 44px rgba(19,42,74,.065);
  overflow: visible;
}
.pricing-card::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; transition:.18s ease; box-shadow:inset 0 0 0 1px rgba(11,121,201,.16); }
.pricing-card:hover::after { opacity:1; }
.pricing-card-free { background: linear-gradient(180deg,#fff 0,#fbfffd 100%); }
.pricing-card-basic { background: linear-gradient(180deg,#fff 0,#f7fbfd 100%); }
.pricing-card-featured {
  border: 2px solid rgba(11,121,201,.55);
  background: linear-gradient(180deg,#F5FBFF 0,#fff 32%,#f5fafd 100%);
  box-shadow: 0 20px 58px rgba(11,121,201,.13);
}
.pricing-card.current { border-color: var(--froppy-accent); box-shadow: 0 20px 58px rgba(11,121,201,.15); }
.pricing-popular { right: 20px; top: -13px; background: var(--froppy-accent); font-size: .72rem; letter-spacing: .01em; }
.pricing-plan-badge { font-size: 1.15rem; }
.pricing-plan-note { background:#eef5f9; color:#52697c; }
.pricing-card-spotlight {
  display:flex;
  align-items:center;
  gap:11px;
  margin: 18px 0 0;
  padding: 13px 14px;
  border-radius: 17px;
  background: #f4fbf7;
  border: 1px solid #def0e6;
}
.pricing-card-spotlight-premium { background:#F1F9FE; border-color:#D7EBF8; }
.pricing-spotlight-icon { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto; background:#fff; color:var(--froppy-accent); font-weight:900; box-shadow:0 4px 12px rgba(19,42,74,.05); }
.pricing-card-spotlight div { display:grid; gap:2px; min-width:0; }
.pricing-card-spotlight strong { font-size:.88rem; color:#23384d; }
.pricing-card-spotlight small { font-size:.72rem; color:#647687; line-height:1.35; }
.pricing-price { margin: 23px 0 8px; }
.pricing-price strong { font-size: 2.7rem; }
.pricing-card>p { min-height: 52px; }
.pricing-card ul { gap: 11px; margin: 19px 0 25px; }
.pricing-card li { padding-left: 26px; font-size: .91rem; }
.pricing-card li.pricing-feature-highlight { color:#1d3348; }
.pricing-card li.pricing-feature-highlight::before { content:"★"; color:var(--froppy-accent); font-size:.76rem; top:.12rem; }
.pricing-card .pricing-plan-action { min-height: 48px; border-radius: 13px; }

.pricing-payment-preview {
  display:grid;
  grid-template-columns:minmax(280px,.75fr) minmax(0,1.25fr);
  gap:28px;
  align-items:center;
  padding:25px 28px;
  margin: 0 0 24px;
  border-radius:24px;
  border:1px solid #dce6ed;
  background:rgba(255,255,255,.9);
  box-shadow:0 12px 36px rgba(19,42,74,.05);
}
.pricing-payment-preview h2 { margin: 2px 0 7px; font-size:1.35rem; }
.pricing-payment-preview p { margin:0; color:#667989; line-height:1.55; font-size:.9rem; }
.payment-logo-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.payment-logo { min-height:36px; display:inline-flex; align-items:center; justify-content:center; padding:7px 12px; border-radius:11px; border:1px solid #dce5ec; background:#fff; color:#22384b; font-weight:850; font-size:.78rem; box-shadow:0 4px 13px rgba(19,42,74,.035); white-space:nowrap; }
.payment-google { letter-spacing:.01em; }
.payment-apple { color:#111; }
.payment-paypal { color:#173b77; }
.payment-klarna { background:#eef7fd; }
.payment-amazon { letter-spacing:-.02em; }

.pricing-subscription-card { margin-top:0; padding:28px; border-radius:24px; }
.pricing-footnote { background:#f3f8fb; border:1px solid #dce6ed; }

.pricing-dialog.pricing-checkout-dialog { max-width:min(980px,calc(100vw - 28px)); }
.pricing-checkout-card { padding: 28px 30px 26px; max-height:min(880px,calc(100vh - 34px)); overflow:auto; }
.checkout-progress { display:flex; align-items:center; gap:8px; margin:0 36px 20px 0; color:#8a99a6; font-size:.72rem; font-weight:850; }
.checkout-progress i { height:1px; flex:1; background:#dce5ec; }
.checkout-progress span.done { color:#337b60; }
.checkout-progress span.active { color:var(--froppy-accent); }
.checkout-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr); gap:24px; margin-top:20px; align-items:start; }
.checkout-payment-column h3 { font-size:1rem; margin:0 0 12px; }
.checkout-express-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.payment-method-tile,
.payment-method-row { cursor:pointer; }
.payment-method-tile { position:relative; min-height:70px; display:grid; place-items:center; border:1px solid #d9e4eb; border-radius:14px; background:#fff; transition:.15s ease; }
.payment-method-tile:hover,.payment-method-row:hover { border-color:#b9c9d5; }
.payment-method-tile.selected,.payment-method-row.selected { border-color:var(--froppy-accent); box-shadow:0 0 0 3px rgba(11,121,201,.08); background:#F5FBFF; }
.payment-method-tile input,.payment-method-row input { position:absolute; opacity:0; pointer-events:none; width:1px; height:1px; }
.payment-method-tile>span { display:grid; justify-items:center; gap:2px; }
.payment-method-tile b { font-size:.94rem; }
.payment-method-tile small { font-size:.67rem; color:#6b7b89; }
.payment-method-google b { color:#2a2a2a; }
.payment-method-paypal b { color:#173b77; }
.checkout-or { position:relative; display:grid; place-items:center; margin:15px 0; color:#83919d; font-size:.7rem; }
.checkout-or::before { content:""; position:absolute; left:0; right:0; height:1px; background:#dce5ec; }
.checkout-or span { position:relative; z-index:1; background:#fff; padding:0 10px; }
.checkout-payment-list { display:grid; gap:8px; }
.payment-method-row { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:10px; padding:11px 13px; border:1px solid #dce5ec; border-radius:13px; background:#fff; transition:.15s ease; }
.payment-method-row>span:last-child { display:grid; gap:2px; }
.payment-method-row b { font-size:.83rem; }
.payment-method-row small { font-size:.69rem; color:#6b7c8a; line-height:1.3; }
.payment-method-glyph { width:32px; height:32px; border-radius:9px; display:grid; place-items:center; background:#eef4f8; color:#43596a; font-weight:900; font-size:.8rem; }
.payment-method-info { margin-top:11px; padding:10px 12px; border-radius:11px; background:#f5f8fb; color:#5d6974; font-size:.72rem; line-height:1.45; }
.checkout-summary { position:sticky; top:0; padding:18px; border-radius:18px; background:linear-gradient(180deg,#f3f8fb,#fff); border:1px solid #dce6ed; }
.checkout-summary-plan { display:flex; justify-content:space-between; gap:12px; align-items:flex-end; padding:6px 0 15px; border-bottom:1px solid #dce5ec; }
.checkout-summary-plan strong { font-size:1.12rem; }
.checkout-summary-plan span { color:#697b8a; font-size:.68rem; text-align:right; }
.checkout-summary-price,.checkout-summary-line,.checkout-summary-total { display:flex; justify-content:space-between; gap:14px; align-items:center; }
.checkout-summary-price { padding:15px 0 9px; }
.checkout-summary-line { padding:7px 0; font-size:.78rem; color:#5e7181; }
.checkout-summary-total { margin-top:9px; padding-top:13px; border-top:1px solid #dce5ec; }
.checkout-summary-total strong { color:var(--froppy-accent); font-size:1.15rem; }
.checkout-summary>small { display:block; margin-top:13px; color:#6e7e8d; line-height:1.45; font-size:.67rem; }
.checkout-consent-note { display:flex; gap:10px; margin-top:17px; padding:11px 13px; border-radius:12px; background:#f2faf6; color:#426253; }
.checkout-consent-note span { flex:0 0 auto; }
.checkout-consent-note p { margin:0; font-size:.72rem; line-height:1.42; }
.checkout-actions { margin-top:17px; }
.checkout-actions .primary { min-width:220px; }

@media(max-width:900px){
  .pricing-hero-froppy { grid-template-columns:1fr 130px; padding:28px; }
  .pricing-grid { grid-template-columns:1fr; }
  .pricing-card { min-height:auto; }
  .pricing-payment-preview { grid-template-columns:1fr; }
  .payment-logo-row { justify-content:flex-start; }
  .checkout-layout { grid-template-columns:1fr; }
  .checkout-summary { position:static; }
}
@media(max-width:760px){
  .froppy-page-topbar { height:64px; min-height:64px; padding:0 12px; align-items:center; }
  .froppy-page-topbar .case-title-row { flex:1 1 auto; }
  .froppy-page-topbar .topbar-actions { gap:5px; }
  .froppy-page-topbar .settings-button { width:34px; height:34px; }
  .froppy-page-topbar h1 { font-size:16px; }
  .froppy-topbar-home { width:32px; height:32px; }
  .froppy-topbar-home img { width:27px; height:27px; }
  .pricing-main { width:min(100% - 20px,1220px); padding-top:24px; }
  .pricing-hero-froppy { grid-template-columns:1fr; padding:23px; border-radius:23px; }
  .pricing-hero-mark { display:none; }
  .pricing-hero-froppy h1 { font-size:clamp(1.9rem,10vw,2.75rem); }
  .pricing-card { padding:22px; }
  .pricing-payment-preview { padding:21px; }
  .pricing-checkout-card { padding:23px 18px 20px; }
  .checkout-express-grid { grid-template-columns:1fr; }
  .checkout-progress { margin-right:32px; }
  .checkout-actions { flex-direction:column-reverse; }
  .checkout-actions>* { width:100%; }
}
@media(max-width:520px){
  .froppy-page-topbar .topbar-actions .settings-button[title="Administration"] { display:none; }
  .froppy-page-topbar h1 { max-width:135px; }
  .pricing-trust-row { display:grid; grid-template-columns:1fr; }
  .payment-logo-row { gap:6px; }
  .payment-logo { font-size:.7rem; padding:6px 9px; }
}

/* v2.4.2 · Payments & campaign promo codes */
.promo-admin-hero{background:linear-gradient(135deg,rgba(83,190,156,.13),rgba(100,120,255,.08) 55%,rgba(255,255,255,.78));border:1px solid rgba(53,115,100,.14)}
.promo-create-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.promo-create-grid .profile-span-2{grid-column:1/-1}
.promo-code-list{display:grid;gap:12px}.promo-code-row{display:grid;grid-template-columns:minmax(230px,1.25fr) minmax(300px,1.65fr) auto;gap:18px;align-items:center;padding:16px 18px;border:1px solid rgba(31,54,76,.1);border-radius:18px;background:rgba(255,255,255,.78);box-shadow:0 7px 24px rgba(42,70,86,.05)}
.promo-code-main{display:grid;gap:7px;min-width:0}.promo-code-title{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.promo-code-title strong{font-size:1rem}.promo-code-main small{color:var(--muted,#67717c);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.promo-code-token{width:max-content;max-width:100%;border:0;border-radius:10px;padding:7px 10px;background:rgba(80,106,229,.08);color:#3a4ca8;font:700 .82rem ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;cursor:pointer;overflow:hidden;text-overflow:ellipsis}
.promo-state{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:.72rem;font-weight:800;background:#eef1f5;color:#59616a}.promo-state.active{background:#e7f8ef;color:#18764b}.promo-state.scheduled{background:#eef2ff;color:#4056b6}.promo-state.expired,.promo-state.disabled,.promo-state.exhausted{background:#f5eeee;color:#8a4b4b}
.promo-code-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}.promo-code-meta span{display:flex;flex-direction:column;gap:2px;font-size:.83rem;color:#56616b}.promo-code-meta b{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:#8a939c}
.promo-code-switch{display:flex;align-items:center;gap:7px;font-weight:700;font-size:.83rem;white-space:nowrap}.promo-code-switch input{accent-color:#53be9c}
.promo-redemption-head,.promo-redemption-row{display:grid;grid-template-columns:minmax(190px,1.2fr) minmax(160px,1fr) 130px 130px 120px;gap:12px;align-items:center}.promo-redemption-head{padding:0 14px 9px;color:#7d8790;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.promo-redemption-list{display:grid;gap:8px}.promo-redemption-row{padding:13px 14px;border-radius:14px;background:rgba(247,249,250,.92);border:1px solid rgba(31,54,76,.08);font-size:.83rem}.promo-redemption-row>span{min-width:0}.promo-redemption-row strong,.promo-redemption-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.promo-redemption-row small{color:#7a848c;margin-top:2px}.promo-conversion{font-weight:800}.promo-conversion.yes{color:#16764a}.promo-conversion.no{color:#7d8790}
.provider-system-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}.provider-webhook-box{display:grid;gap:5px;padding:12px 14px;border-radius:14px;background:#f4f7f8;border:1px solid rgba(31,54,76,.09)}.provider-webhook-box code{font-size:.75rem;overflow-wrap:anywhere;color:#45535e}
.promo-redeem-card{background:linear-gradient(135deg,rgba(83,190,156,.11),rgba(124,126,240,.08));border-color:rgba(83,190,156,.24)}.promo-redeem-form{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:12px;align-items:end}.promo-redeem-form label{display:grid;gap:7px;font-weight:700}.promo-redeem-form input{text-transform:uppercase;letter-spacing:.04em}
@media(max-width:1000px){.promo-code-row{grid-template-columns:1fr}.promo-code-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.promo-redemption-head{display:none}.promo-redemption-row{grid-template-columns:1fr 1fr}.provider-system-grid{grid-template-columns:1fr}.promo-create-grid{grid-template-columns:1fr}.promo-create-grid .profile-span-2{grid-column:auto}}
@media(max-width:620px){.promo-redemption-row,.promo-code-meta,.promo-redeem-form{grid-template-columns:1fr}}

/* ===== Froppy v2.4.6 · persistent legal footer ===== */
:root { --froppy-legal-footer-height: 38px; }
body { padding-bottom: var(--froppy-legal-footer-height); }
.app-shell,.settings-shell,.archive-workspace,.pricing-page { min-height: calc(100vh - var(--froppy-legal-footer-height)); }
.app-shell > .sidebar,.settings-shell > .sidebar { min-height: calc(100vh - var(--froppy-legal-footer-height)); }
.froppy-login-page { min-height: calc(100vh - var(--froppy-legal-footer-height)); }
.global-legal-footer {
  position: fixed;
  z-index: 12000;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--froppy-legal-footer-height);
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(90deg,#122d3f 0%,#17384a 56%,#163d46 100%);
  box-shadow: 0 -6px 24px rgba(14,37,53,.12);
  color: #fff;
}
.global-legal-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg,#42b883 0%,#7bcf9d 36%,#0B79C9 100%);
  opacity: .9;
}
.global-legal-footer-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px,1.7vw,24px);
  padding: 2px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.global-legal-footer-nav::-webkit-scrollbar { display: none; }
.global-legal-footer button {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.88);
  padding: 6px 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 650;
  cursor: pointer;
  transition: color .16s ease, transform .16s ease;
}
.global-legal-footer button:hover,.global-legal-footer button:focus-visible { color: #fff; transform: translateY(-1px); outline: none; }
.global-legal-footer .global-legal-ai-link { color: #bff0cf; font-weight: 800; }
.global-legal-footer-version {
  position: absolute;
  right: 9px;
  bottom: 4px;
  z-index: 2;
  font-size: 8px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: .02em;
  color: rgba(255,255,255,.48);
  pointer-events: none;
  user-select: none;
}

.global-legal-ai-link span { color: #0B79C9; margin-right: 3px; }
.global-legal-dialog {
  width: min(760px,calc(100vw - 28px));
  max-height: min(82vh,860px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  overflow: visible;
}
.global-legal-dialog::backdrop { background: rgba(14,31,43,.58); backdrop-filter: blur(5px); }
.global-legal-dialog-card {
  max-height: min(82vh,860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(25,73,92,.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(14,31,43,.28);
}
.global-legal-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e6edf0;
  background: linear-gradient(135deg,#f4fff8 0%,#fff 52%,#eef7fd 100%);
}
.global-legal-dialog-head h2 { margin: 3px 0 0; color: #15344e; font-size: 23px; }
.global-legal-kicker { color: #22855a; font-size: 9px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.global-legal-close { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #eef4f5; color: #315466; font-size: 23px; cursor: pointer; }
.global-legal-demo { margin: 16px 26px 0; padding: 11px 13px; display: grid; gap: 2px; border: 1px solid #f0cf87; border-radius: 12px; background: #fff8e8; color: #75521b; font-size: 10px; }
.global-legal-content { padding: 20px 26px 28px; overflow-y: auto; color: #354957; }
.global-legal-intro { padding: 12px 14px; border-left: 3px solid #0B79C9; border-radius: 0 10px 10px 0; background: #eef7fd; color: #31556D; font-size: 11px; line-height: 1.55; }
.global-legal-section + .global-legal-section { margin-top: 21px; padding-top: 18px; border-top: 1px solid #e9eef0; }
.global-legal-section h3 { margin: 0 0 8px; color: #15344e; font-size: 14px; }
.global-legal-section p,.global-legal-section li { font-size: 11px; line-height: 1.62; }
.global-legal-section p { margin: 0 0 7px; }
.global-legal-section ul { margin: 7px 0 0; padding-left: 18px; }
.global-legal-error { color: #a12c34; }
@media (max-width: 760px) {
  :root { --froppy-legal-footer-height: 40px; }
  .global-legal-footer-nav { justify-content: flex-start; padding-inline: 12px; gap: 18px; }
  .global-legal-footer button { font-size: 9.5px; }
  .global-legal-dialog-head { padding: 20px 18px 15px; }
  .global-legal-content { padding: 17px 18px 24px; }
  .global-legal-demo { margin: 14px 18px 0; }
}

/* v2.4.6 admin legal settings */
.legal-admin-hero { background: linear-gradient(135deg,#f3fff8 0%,#fff 50%,#eef7fd 100%); border-color: rgba(37,132,91,.16); }
.legal-admin-warning { display:grid; gap:3px; margin-top:14px; padding:12px 14px; border:1px solid #f0cf87; border-radius:14px; background:#fff8e8; color:#76531e; font-size:10px; line-height:1.45; }
.legal-admin-warning[hidden] { display:none; }
.legal-admin-form { display:grid; gap:18px; }
.legal-admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.legal-admin-wide { grid-column:1/-1; }
.legal-admin-subhead { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding-top:16px; border-top:1px solid var(--line); }
.legal-admin-subhead strong { font-size:13px; color:#263f50; }
.legal-admin-subhead span { color:var(--muted); font-size:9.5px; }
.legal-admin-preview-note { display:grid; grid-template-columns:34px minmax(0,1fr); gap:11px; align-items:start; padding:14px; border:1px solid #cae8d8; border-radius:15px; background:#f2fbf6; color:#315445; }
.legal-admin-preview-note>span { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#fff; color:#0B79C9; font-size:17px; box-shadow:0 4px 12px rgba(28,93,62,.08); }
.legal-admin-preview-note strong { display:block; margin-bottom:3px; color:#1b6a47; font-size:11px; }
.legal-admin-preview-note p { margin:0; font-size:9.5px; line-height:1.5; }
@media(max-width:760px){.legal-admin-grid{grid-template-columns:1fr}.legal-admin-wide{grid-column:auto}.legal-admin-subhead{align-items:flex-start;flex-direction:column;gap:4px}}
@media (min-width:1051px) {
  .app-shell,.app-shell>.sidebar,.app-shell>.workspace,.settings-shell,.settings-workspace,.calendar-shell,.calendar-workspace {
    height: calc(100vh - var(--froppy-legal-footer-height));
    height: calc(100dvh - var(--froppy-legal-footer-height));
  }
  .app-shell,.settings-shell { min-height: calc(100vh - var(--froppy-legal-footer-height)); }
}


/* Froppy v2.4.8 · freie Lernbildquellen */
.open-media-provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.open-media-provider-card{position:relative;padding:16px;border:1px solid #dbe9f3;border-radius:16px;background:linear-gradient(145deg,#fff,#f5fbff);box-shadow:0 8px 24px rgba(23,72,108,.05)}
.open-media-provider-card h3{margin:10px 0 6px;color:#17364f;font-size:14px}.open-media-provider-card p{margin:0;color:#63798a;font-size:11px;line-height:1.55}
@media(max-width:700px){.open-media-provider-grid{grid-template-columns:1fr}}

.learning-image-attribution{display:flex;gap:8px;flex-wrap:wrap}.learning-image-attribution a{font-size:9px;font-weight:800;color:#0B79C9;text-decoration:none}.learning-image-attribution a:hover{text-decoration:underline}

/* ===== Froppy v2.4.8 · fachübergreifende Lernhilfen ===== */
.learning-image-block {
  width: min(300px, 78vw);
  margin: 8px 0 7px;
  gap: 6px;
}
.learning-image-card {
  width: 100%;
  margin: 0;
  border-radius: 15px;
  border-color: #cfe1ec;
  box-shadow: 0 8px 22px rgba(19,42,74,.10);
}
.learning-image-open,
.learning-code-open {
  position: relative;
  overflow: hidden;
}
.learning-image-open img {
  width: 100%;
  height: 168px;
  max-height: 168px;
  object-fit: cover;
  background: #f5fafc;
}
.learning-image-card figcaption {
  display: grid;
  gap: 2px;
  padding: 7px 9px 8px;
  font-size: 10px;
}
.learning-image-card figcaption span { white-space: normal; }
.learning-image-card figcaption small { color: #667386; }
.learning-visual-zoom {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(19,42,74,.84);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  pointer-events: none;
}
.learning-code-block {
  border: 1px solid #cfe1ec;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(19,42,74,.10);
}
.learning-code-open {
  width: 100%;
  min-height: 150px;
  padding: 31px 12px 28px;
  border: 0;
  text-align: left;
  background: #10243e;
  color: #eaf6fd;
  cursor: zoom-in;
}
.learning-code-open pre {
  margin: 0;
  max-height: 106px;
  overflow: hidden;
  white-space: pre;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.learning-visual-kind {
  position: absolute;
  top: 7px;
  left: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(234,246,253,.12);
  color: #a9d7f4;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.learning-code-block .learning-visual-zoom { background: rgba(47,168,111,.92); }
.learning-visual-caption {
  display: grid;
  gap: 2px;
  padding: 7px 9px 8px;
  font-size: 10px;
}
.learning-visual-caption strong { color: #243746; }
.learning-visual-caption small { color: #667386; }
.learning-code-language {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf6fd;
  color: #075f9f;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.learning-code-dialog {
  max-height: 68vh;
  margin: 0;
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #10243e;
  color: #eef8ff;
  white-space: pre;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.learning-image-dialog-card img[hidden],
.learning-code-dialog[hidden],
.learning-code-language[hidden] { display: none !important; }
@media (max-width: 720px) {
  .learning-image-block { width: min(280px, 86vw); }
  .learning-image-open img { height: 150px; max-height: 150px; }
}
.generated-learning-visual .learning-image-open img { object-fit: contain; background: #f7fbfe; }

/* Froppy v2.4.9 · klarer Wechsel zwischen Sprache und Tastatur */
.voice-waveform { position: relative; padding-right: 132px; }
.voice-text-mode-button { position:absolute; right:10px; top:50%; transform:translateY(-50%); border:1px solid rgba(11,121,201,.22); background:#F7FBFE; color:#132A4A; border-radius:999px; padding:7px 11px; font:inherit; font-size:12px; font-weight:750; cursor:pointer; white-space:nowrap; }
.voice-text-mode-button:hover { background:#EAF6FD; border-color:rgba(11,121,201,.42); }
.voice-text-mode-button:focus-visible { outline:3px solid rgba(11,121,201,.22); outline-offset:2px; }
.composer.voice-avatar-muted .voice-waveform-canvas { opacity:.24; }

/* ===== Froppy v2.5.0 · unified global topbar ===== */
.froppy-global-topbar{
  position:sticky;top:0;z-index:80;height:68px;min-height:68px;padding:0 22px;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  background:rgba(255,255,255,.97);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid #dfe9ef;box-shadow:0 4px 20px rgba(19,42,74,.045);
}
.froppy-global-topbar-left{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}
.froppy-global-logo{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;flex:0 0 auto;text-decoration:none}
.froppy-global-logo:hover{background:#edf7f5}.froppy-global-logo img{width:34px;height:34px;display:block;object-fit:contain}
.froppy-global-title-wrap{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto}
.froppy-global-title-wrap h1{margin:0;font-size:19px;line-height:1.2;color:#132a4a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(46vw,620px)}
.froppy-topbar-status{flex:0 0 auto}
.froppy-global-nav{display:grid;grid-auto-flow:column;grid-auto-columns:40px;gap:7px;align-items:center;justify-content:end;flex:0 0 auto}
.froppy-global-nav .settings-button.nav-icon{width:40px;height:40px;min-width:40px;min-height:40px;margin:0;padding:0;border:1px solid #dce7ed;background:#fff;color:#496574;border-radius:12px;box-shadow:none;display:grid;place-items:center;transition:.16s ease}
.froppy-global-nav .settings-button.nav-icon svg{width:19px;height:19px;fill:currentColor;stroke:none}
.froppy-global-nav .settings-button.nav-icon:hover{background:#eef7f5;border-color:#c9ded8;color:#176a59;transform:none}
.froppy-global-nav .settings-button.nav-icon.active{background:#132a4a!important;border-color:#132a4a!important;color:#fff!important;box-shadow:0 6px 15px rgba(19,42,74,.18)!important}
.froppy-global-topbar .child-switch-button{flex:0 0 auto;max-width:150px;background:#f2f8f6;border-color:#d7e8e2}
.pricing-topbar,.froppy-page-topbar,.profile-topbar{height:auto;min-height:0}
@media(max-width:760px){.froppy-global-topbar{padding:0 10px;height:62px;min-height:62px}.froppy-global-logo{width:34px;height:34px}.froppy-global-logo img{width:30px;height:30px}.froppy-global-title-wrap h1{font-size:16px;max-width:26vw}.froppy-global-nav{grid-auto-columns:35px;gap:4px}.froppy-global-nav .settings-button.nav-icon{width:35px;height:35px;min-width:35px;min-height:35px;border-radius:10px}.froppy-global-topbar .child-switch-button strong{display:none}.froppy-global-topbar .child-switch-button{padding-right:5px}}

/* ===== Froppy v2.5.0 · accordion administration ===== */
.admin-accordion-nav{display:grid;gap:8px}.admin-nav-group{display:grid;gap:4px;border-radius:14px}.admin-nav-group-toggle{appearance:none;border:0;background:transparent;color:rgba(255,255,255,.78);display:grid;grid-template-columns:30px minmax(0,1fr) 18px;gap:8px;align-items:center;text-align:left;padding:10px 9px;border-radius:13px;cursor:pointer;width:100%}.admin-nav-group-toggle:hover,.admin-nav-group.open>.admin-nav-group-toggle{background:rgba(255,255,255,.07);color:#fff}.admin-nav-group-toggle>span:nth-child(2){display:grid;gap:2px;min-width:0}.admin-nav-group-toggle strong{font-size:11.5px}.admin-nav-group-toggle small{font-size:8px;color:rgba(255,255,255,.48);line-height:1.2}.admin-nav-group-icon{width:28px;height:28px;border-radius:9px;background:rgba(255,255,255,.08);display:grid;place-items:center;font-size:13px;font-weight:900}.admin-nav-chevron{font-size:15px;transition:transform .16s ease;opacity:.65}.admin-nav-group.open .admin-nav-chevron{transform:rotate(180deg)}.admin-nav-group-items{display:grid;gap:3px;padding:0 0 3px 17px}.admin-nav-group-items[hidden]{display:none}.admin-accordion-nav .admin-side-nav-item{grid-template-columns:25px minmax(0,1fr);padding:8px 9px;border-radius:11px}.admin-accordion-nav .admin-side-nav-item .admin-nav-icon{width:23px;height:23px;border-radius:7px;font-size:9px;font-weight:900}.admin-accordion-nav .admin-side-nav-item strong{font-size:10.5px}.admin-accordion-nav .admin-side-nav-item small{font-size:7.8px}.settings-shell.sidebar-collapsed .admin-nav-group-toggle{grid-template-columns:1fr;padding:8px}.settings-shell.sidebar-collapsed .admin-nav-group-toggle>span:nth-child(2),.settings-shell.sidebar-collapsed .admin-nav-chevron{display:none}.settings-shell.sidebar-collapsed .admin-nav-group-icon{margin:auto}.settings-shell.sidebar-collapsed .admin-nav-group-items{padding-left:0}.settings-shell.sidebar-collapsed .admin-nav-group:not(.open) .admin-nav-group-items{display:none}

/* ===== Froppy v2.5.0 · platform operations ===== */
.admin-ops-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-status-list{display:grid;gap:8px}.admin-status-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #e7eef2}.admin-status-row:last-child{border-bottom:0}.admin-status-row>div{display:grid;gap:2px}.admin-status-row strong{font-size:11px;color:#19344d}.admin-status-row small{font-size:9px;color:#6f8490}.admin-status-row>b{font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:#607985}.admin-status-indicator{width:9px;height:9px;border-radius:50%;background:#d88937;box-shadow:0 0 0 4px rgba(216,137,55,.10)}.admin-status-indicator.ok{background:#2e9c74;box-shadow:0 0 0 4px rgba(46,156,116,.10)}.admin-storage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.admin-storage-item{padding:13px;border:1px solid #e0e9ee;border-radius:14px;background:#f8fbfc;display:grid;gap:5px}.admin-storage-item span{font-size:9px;color:#6b808d}.admin-storage-item strong{font-size:15px;color:#17344e}.admin-backup-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:10px}.admin-backup-card{border:1px solid #dfe9ed;border-radius:17px;padding:16px;background:#f9fcfc;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.admin-backup-card strong{font-size:13px;color:#15334c}.admin-backup-card p{font-size:10px;color:#69808c;line-height:1.5;margin:0;flex:1}.admin-backup-key-note{margin-top:14px}.admin-audit-list{display:grid;gap:0}.admin-audit-row{display:flex;justify-content:space-between;gap:18px;padding:12px 2px;border-bottom:1px solid #e6edf1}.admin-audit-row:last-child{border-bottom:0}.admin-audit-row>div{display:grid;gap:3px;min-width:0}.admin-audit-row strong{font-size:10.5px;color:#17344e}.admin-audit-row small{font-size:8.5px;color:#708692;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:650px}.admin-audit-row time{font-size:8px;color:#82939c;white-space:nowrap}
@media(max-width:900px){.admin-ops-grid,.admin-backup-grid{grid-template-columns:1fr}.admin-storage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v2.5.1 · Froppy Scan mobile transfer */
.material-upload-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.mobile-scan-button{border-color:rgba(25,167,224,.38)!important;background:linear-gradient(145deg,#f7fcff,#f1fbf5)!important;color:#24485b!important;font-weight:850!important}
.mobile-upload-state{display:grid;gap:10px;padding:12px 13px;border:1px solid rgba(25,167,224,.22);border-radius:14px;background:linear-gradient(145deg,rgba(246,252,255,.98),rgba(246,253,249,.98));box-shadow:0 7px 22px rgba(34,74,95,.06)}
.mobile-upload-state-head{display:flex;align-items:center;gap:10px}.mobile-upload-state-head>div{display:grid;gap:2px}.mobile-upload-state-head strong{font-size:11px;color:#24485b}.mobile-upload-state-head span{font-size:9.5px;color:#6f8390;line-height:1.35}
.mobile-upload-pulse{width:10px;height:10px;border-radius:999px;background:#2fa86f;box-shadow:0 0 0 0 rgba(47,168,111,.32);animation:froppyMobilePulse 1.55s infinite}
.mobile-upload-meta{display:flex;gap:10px;flex-wrap:wrap;font-size:9px;font-weight:850;color:#4e6d7e}.mobile-upload-meta span{padding:4px 8px;border-radius:999px;background:#fff;border:1px solid #dce9ef}
.mobile-upload-actions{display:flex;justify-content:flex-end}.mobile-upload-actions .ghost{font-size:9px!important}
.mobile-upload-qr{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:center;padding:12px;border-radius:14px;background:#fff;border:1px solid #dce9ef}.mobile-upload-qr[hidden]{display:none}.mobile-upload-qr img{width:150px;height:150px;object-fit:contain;border-radius:10px;background:#fff}.mobile-upload-qr>div{display:grid;gap:5px}.mobile-upload-qr strong{font-size:11px;color:#24485b}.mobile-upload-qr span{font-size:9.5px;color:#6f8390;line-height:1.45}
@keyframes froppyMobilePulse{0%{box-shadow:0 0 0 0 rgba(47,168,111,.32)}70%{box-shadow:0 0 0 8px rgba(47,168,111,0)}100%{box-shadow:0 0 0 0 rgba(47,168,111,0)}}
@media(max-width:700px){.material-upload-actions{grid-template-columns:1fr}.mobile-upload-state{padding:11px}.mobile-upload-qr{grid-template-columns:110px minmax(0,1fr)}.mobile-upload-qr img{width:110px;height:110px}}

/* ===== Froppy v2.6.6 · platform-neutral Mobile Upload UI ===== */
.material-upload-actions{grid-template-columns:minmax(0,1fr) 46px;align-items:stretch}
.mobile-scan-button{
  position:relative!important;
  width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;
  padding:0!important;border-radius:13px!important;display:grid!important;place-items:center!important;
  border-color:rgba(25,167,224,.38)!important;background:linear-gradient(145deg,#f7fcff,#f1fbf5)!important;
  color:#24485b!important;
}
.mobile-scan-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 7px 18px rgba(31,83,108,.12)}
.mobile-scan-button:disabled{opacity:.48!important;cursor:not-allowed!important}
.mobile-upload-icon{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.mobile-upload-icon .mobile-upload-arrow{stroke-width:2}
.learning-focus-upload-row{grid-template-columns:minmax(0,1fr) auto 46px}
.mobile-upload-qr{grid-template-columns:150px minmax(0,1fr)}
.mobile-upload-qr-visual{width:150px;height:150px;position:relative;display:grid;place-items:center;border-radius:10px;overflow:hidden;background:#fff}
.mobile-upload-qr-visual>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:10px;background:#fff}
.mobile-upload-qr-placeholder{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:8px;padding:13px;border:1px dashed #cbdce5;border-radius:10px;background:linear-gradient(145deg,#f8fbfd,#f3f8fa);color:#7b929e;text-align:center}
.mobile-upload-qr-placeholder[hidden]{display:none}
.mobile-upload-qr-placeholder svg{width:72px;height:72px;fill:#d5e2e8}
.mobile-upload-qr-placeholder span{font-size:8.5px!important;font-weight:800;line-height:1.25!important;color:#78909c!important}
.mobile-upload-qr-copy{display:grid;gap:5px}
.mobile-upload-qr-copy strong{font-size:11px;color:#24485b}
.mobile-upload-qr-copy span{font-size:9.5px;color:#6f8390;line-height:1.45}
@media(max-width:700px){
  .material-upload-actions{grid-template-columns:minmax(0,1fr) 46px}
  .learning-focus-upload-row{grid-template-columns:minmax(0,1fr) 46px}
  .learning-focus-upload-row #learning-focus-files{grid-column:1/-1}
  .mobile-upload-qr{grid-template-columns:110px minmax(0,1fr)}
  .mobile-upload-qr-visual{width:110px;height:110px}
  .mobile-upload-qr-placeholder svg{width:52px;height:52px}
}

/* ===== Froppy v2.6.7 · layout polish, quiet topbar and full-width school home ===== */
/* The logo belongs to the blue learning-library rail, never to the utility topbar. */
.froppy-global-topbar .froppy-global-logo { display:none !important; }
.froppy-global-topbar {
  height: 76px;
  min-height: 76px;
  padding: 0 clamp(16px, 2vw, 28px);
  gap: clamp(12px, 1.5vw, 22px);
  overflow: visible;
}
.froppy-global-topbar-left {
  flex: 1 1 260px;
  max-width: min(43vw, 560px);
}
.froppy-global-title-wrap { gap: 9px; }
.froppy-global-title-wrap h1 {
  max-width: min(31vw, 430px);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -.025em;
}
.froppy-global-topbar .child-switch-button {
  min-height: 32px;
  max-width: 132px;
  padding: 3px 8px 3px 4px;
  box-shadow: none;
}
.froppy-global-topbar .child-switch-button img,
.froppy-global-topbar .child-switch-button > span { width: 24px; height: 24px; }
.froppy-global-topbar .child-switch-button strong { max-width: 76px; font-size: 10px; }
.froppy-topbar-status { width: 9px; height: 9px; }

.topbar-chat-search {
  position: relative;
  flex: 1 1 390px;
  min-width: 210px;
  max-width: 520px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #d6e5e8;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 4px 13px rgba(19,42,74,.04);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.topbar-chat-search:focus-within {
  border-color: rgba(47,168,111,.58);
  box-shadow: 0 0 0 3px rgba(47,168,111,.10), 0 6px 18px rgba(19,42,74,.05);
  background: #fff;
}
.topbar-chat-search > svg { width: 16px; height: 16px; fill: #77909b; flex: 0 0 auto; }
.topbar-chat-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  outline: 0;
  color: #244357;
  font-size: 11.5px;
  font-weight: 580;
}
.topbar-chat-search input::placeholder { color: #91a4ad; }
.topbar-chat-search-results {
  position: absolute;
  z-index: 300;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(390px, 58vh);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #dce7eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(19,42,74,.16);
}
.topbar-chat-search-results[hidden] { display: none !important; }
.topbar-search-result {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 3px 9px;
  padding: 10px 11px;
  border-radius: 10px;
  color: #28475a;
  text-decoration: none;
}
.topbar-search-result:hover,
.topbar-search-result:focus-visible { background: #f1f8f6; outline: none; }
.topbar-search-result strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.topbar-search-result span { align-self: start; padding: 2px 6px; border-radius: 999px; background: #edf5fa; color: #527286; font-size: 8px; font-weight: 800; }
.topbar-search-result small { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #718895; font-size: 9px; }
.topbar-search-empty { padding: 13px; color: #718895; text-align: center; font-size: 10px; }

.froppy-global-nav { grid-auto-columns: 37px; gap: 5px; }
.froppy-global-nav .settings-button.nav-icon {
  width: 37px;
  height: 37px;
  min-width: 37px;
  min-height: 37px;
  border-radius: 11px;
}
.froppy-global-nav .settings-button.nav-icon svg { width: 17px; height: 17px; }

/* Pricing and family/profile pages are real parts of the learning workspace. */
.aux-page-shell {
  grid-template-columns: 270px minmax(0,1fr);
  align-items: stretch;
  background: linear-gradient(135deg,#f7fbff 0%,#fffaf4 52%,#f5fff0 100%);
}
.aux-page-shell > .sidebar { grid-column: 1; grid-row: 1; }
.aux-workspace {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  min-height: calc(100vh - var(--froppy-legal-footer-height));
  background: transparent;
}
.aux-page-shell .conversation-sidebar .conversation-list { min-height: 0; }
.aux-page-shell .conversation-library-footer[hidden],
.aux-page-shell #new-folder[hidden] { display:none !important; }

/* Pricing: more information in less vertical space without shrinking readability. */
.aux-page-shell.pricing-page .pricing-main {
  width: min(1240px, calc(100% - clamp(28px, 5vw, 72px)));
  padding: 28px 0 48px;
}
.aux-page-shell.pricing-page .pricing-hero-froppy {
  grid-template-columns: minmax(0,1fr) 150px;
  gap: 24px;
  padding: 24px 28px;
  margin-bottom: 20px;
  border-radius: 24px;
}
.aux-page-shell.pricing-page .pricing-hero-froppy h1 {
  max-width: 760px;
  margin-bottom: 9px;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.aux-page-shell.pricing-page .pricing-hero-froppy p { max-width: 720px; font-size: .92rem; line-height: 1.5; }
.aux-page-shell.pricing-page .pricing-hero-pill { min-height: 27px; margin-bottom: 10px; padding: 5px 9px; font-size: .69rem; }
.aux-page-shell.pricing-page .pricing-trust-row { margin-top: 13px; gap: 6px; }
.aux-page-shell.pricing-page .pricing-trust-row span { padding: 6px 9px; font-size: .68rem; }
.aux-page-shell.pricing-page .pricing-hero-mark img { width: min(132px,100%); max-height: 122px; }
.aux-page-shell.pricing-page .pricing-grid { gap: 13px; margin-bottom: 18px; }
.aux-page-shell.pricing-page .pricing-card { min-height: 0; padding: 19px 20px; border-radius: 21px; }
.aux-page-shell.pricing-page .pricing-popular { right: 15px; top: -10px; font-size: .64rem; }
.aux-page-shell.pricing-page .pricing-plan-badge { font-size: 1rem; }
.aux-page-shell.pricing-page .pricing-plan-note { font-size: .68rem; }
.aux-page-shell.pricing-page .pricing-card-spotlight { gap: 8px; margin-top: 12px; padding: 9px 10px; border-radius: 13px; }
.aux-page-shell.pricing-page .pricing-spotlight-icon { width: 29px; height: 29px; border-radius: 9px; }
.aux-page-shell.pricing-page .pricing-card-spotlight strong { font-size: .78rem; }
.aux-page-shell.pricing-page .pricing-card-spotlight small { font-size: .64rem; }
.aux-page-shell.pricing-page .pricing-price { margin: 15px 0 6px; }
.aux-page-shell.pricing-page .pricing-price strong { font-size: 2.15rem; }
.aux-page-shell.pricing-page .pricing-card > p { min-height: 0; margin-bottom: 10px; font-size: .82rem; line-height: 1.42; }
.aux-page-shell.pricing-page .pricing-card ul { gap: 7px; margin: 11px 0 16px; }
.aux-page-shell.pricing-page .pricing-card li { padding-left: 22px; font-size: .79rem; line-height: 1.34; }
.aux-page-shell.pricing-page .pricing-card .pricing-plan-action { min-height: 40px; border-radius: 11px; font-size: .8rem; }
.aux-page-shell.pricing-page .pricing-payment-preview { gap: 20px; padding: 19px 22px; margin-bottom: 18px; border-radius: 20px; }
.aux-page-shell.pricing-page .pricing-subscription-card { padding: 22px; border-radius: 20px; }

/* Family/profile page uses the same content rail but may grow naturally. */
.aux-page-shell.profile-page .profile-page-main {
  width: min(1120px, calc(100% - clamp(28px, 5vw, 72px)));
  padding: 28px 0 48px;
}
.aux-page-shell.profile-page .profile-page-hero { margin-bottom: 0; }

/* Subject selection owns the complete workspace; page scrolling sits at the viewport edge. */
.school-shell.school-home-mode,
.school-shell.school-home-mode > .workspace {
  height: auto !important;
  min-height: calc(100vh - var(--froppy-legal-footer-height)) !important;
  overflow: visible !important;
}
.school-shell.school-home-mode .case-workspace,
.school-shell.school-home-mode .content-grid,
.school-shell.school-home-mode .chat-panel {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible !important;
}
.school-shell.school-home-mode .school-home {
  flex: 0 0 auto;
  width: 100% !important;
  max-width: none !important;
  min-height: 0;
  margin: 0 !important;
  padding: clamp(18px,2.2vw,30px) clamp(22px,4.2vw,64px) 24px !important;
  overflow: visible !important;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}
.school-shell.school-home-mode .school-home .school-hero,
.school-shell.school-home-mode .school-home .grade-picker,
.school-shell.school-home-mode .school-home .subject-picker { width: 100%; max-width: none; }
.school-shell.school-home-mode .school-home .subject-picker { padding-bottom: 0; }
.school-shell.school-home-mode .subject-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

@media (min-width: 1051px) {
  .aux-page-shell,
  .aux-page-shell > .sidebar,
  .aux-page-shell > .aux-workspace {
    height: calc(100vh - var(--froppy-legal-footer-height));
    min-height: 0;
  }
  .aux-page-shell > .sidebar { overflow: hidden; }
  .aux-page-shell > .aux-workspace { overflow-y: auto; overflow-x: hidden; }
  .school-shell.school-home-mode > .sidebar {
    height: calc(100vh - var(--froppy-legal-footer-height));
    min-height: 0;
    position: sticky;
    top: 0;
  }
}

@media (max-width: 1180px) {
  .froppy-global-topbar { gap: 10px; }
  .froppy-global-topbar-left { max-width: 37vw; }
  .froppy-global-title-wrap h1 { max-width: 22vw; }
  .topbar-chat-search { flex-basis: 300px; max-width: 390px; }
  .aux-page-shell.pricing-page .pricing-main,
  .aux-page-shell.profile-page .profile-page-main { width: calc(100% - 28px); }
}

@media (max-width: 900px) {
  .froppy-global-topbar { min-height: 70px; height: auto; padding-block: 10px; flex-wrap: wrap; }
  .froppy-global-topbar-left { flex: 1 1 50%; max-width: none; }
  .froppy-global-title-wrap h1 { max-width: 44vw; }
  .topbar-chat-search { order: 3; flex: 1 1 100%; max-width: none; }
  .froppy-global-nav { margin-left: auto; }
  .aux-page-shell.pricing-page .pricing-hero-froppy { grid-template-columns: 1fr 110px; }
}

@media (max-width: 760px) {
  .froppy-global-topbar { min-height: 62px; padding: 8px 10px; }
  .froppy-global-title-wrap h1 { font-size: 15px; max-width: 42vw; }
  .froppy-global-nav { grid-auto-columns: 34px; gap: 3px; }
  .froppy-global-nav .settings-button.nav-icon { width:34px; height:34px; min-width:34px; min-height:34px; }
  .topbar-chat-search { height: 36px; }
  .aux-page-shell.pricing-page .pricing-main,
  .aux-page-shell.profile-page .profile-page-main { width: calc(100% - 20px); padding-top: 18px; }
  .aux-page-shell.pricing-page .pricing-hero-froppy { grid-template-columns: 1fr; padding: 19px; }
  .aux-page-shell.pricing-page .pricing-hero-mark { display:none; }
  .school-shell.school-home-mode .school-home { padding: 14px 12px 18px !important; }
}

@media (max-width: 760px) {
  .aux-page-shell > .sidebar { grid-column: 1; grid-row: 1; }
  .aux-page-shell > .aux-workspace { grid-column: 1; grid-row: 2; min-height: 0; }
}


/* ===== Froppy v2.6.8 · minimal square upload tile ===== */
.subject-grid > .material-subject-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  align-self: start;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
}
.subject-grid > .material-subject-card .subject-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}
.subject-grid > .material-subject-card .material-subject-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}
.subject-grid > .material-subject-card strong {
  margin: 0;
  font-size: 1rem;
  line-height: 1.12;
  text-align: center;
}
.subject-grid > .material-subject-card small {
  margin: 0;
  max-width: 13ch;
  font-size: .78rem;
  line-height: 1.28;
  text-align: center;
}
@media (max-width: 760px) {
  .subject-grid > .material-subject-card { padding: 14px; gap: 9px; }
  .subject-grid > .material-subject-card .subject-icon { width: 52px; height: 52px; }
  .subject-grid > .material-subject-card strong { font-size: .92rem; }
  .subject-grid > .material-subject-card small { font-size: .72rem; }
}


/* ===== Froppy v2.6.9 · lazy subject folders + integrated delete confirmation ===== */
.delete-confirm-dialog{width:min(430px,calc(100vw - 28px));padding:0;border:0;border-radius:22px;background:#fff;box-shadow:0 26px 80px rgba(18,36,52,.28);overflow:hidden}.delete-confirm-dialog::backdrop{background:rgba(13,31,49,.48);backdrop-filter:blur(5px)}.delete-confirm-card{display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;padding:22px}.delete-confirm-icon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#fff1ec;color:#c94b2a}.delete-confirm-icon svg{width:23px;height:23px;fill:currentColor}.delete-confirm-copy{min-width:0}.delete-confirm-copy .eyebrow{margin:0 0 3px;color:#b85a39}.delete-confirm-copy h2{margin:0 0 7px;font-size:20px;color:#183348}.delete-confirm-copy p:last-child{margin:0;color:#667c8b;font-size:12px;line-height:1.5}.delete-confirm-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px;padding-top:4px}.delete-confirm-actions button{min-width:112px}.delete-confirm-submit{border:0;border-radius:11px;padding:10px 14px;background:#c94b2a;color:#fff;font-weight:850;cursor:pointer}.delete-confirm-submit:hover{filter:brightness(.96)}@media(max-width:520px){.delete-confirm-card{grid-template-columns:1fr}.delete-confirm-icon{width:44px;height:44px}.delete-confirm-actions{flex-direction:column-reverse}.delete-confirm-actions button{width:100%}}

/* v2.6.11 backup restore modal */
.admin-backup-modal{width:min(460px,calc(100vw - 28px));padding:0;border:0;border-radius:22px;background:#fff;box-shadow:0 26px 80px rgba(18,36,52,.28);overflow:hidden}.admin-backup-modal::backdrop{background:rgba(13,31,49,.48);backdrop-filter:blur(5px)}.admin-backup-modal-card{display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;padding:22px}.admin-backup-modal-icon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#eef7f3;color:#2d8a67;font-size:24px;font-weight:900}.admin-backup-modal[data-kind="danger"] .admin-backup-modal-icon{background:#fff1ec;color:#c94b2a}.admin-backup-modal[data-kind="warning"] .admin-backup-modal-icon{background:#fff7e8;color:#cc7a13}.admin-backup-modal-copy{min-width:0}.admin-backup-modal-copy .eyebrow{margin:0 0 3px}.admin-backup-modal-copy h2{margin:0 0 7px;font-size:20px;color:#183348}.admin-backup-modal-copy p:last-child{margin:0;color:#667c8b;font-size:12px;line-height:1.5;white-space:pre-line}.admin-backup-modal-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px;padding-top:4px}.admin-backup-modal-actions button{min-width:112px}@media(max-width:520px){.admin-backup-modal-card{grid-template-columns:1fr}.admin-backup-modal-icon{width:44px;height:44px}.admin-backup-modal-actions{flex-direction:column-reverse}.admin-backup-modal-actions button{width:100%}}
