:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2c35;
  background: #f3f6f5;
  line-height: 1.5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #f5a65b; outline-offset: 3px; }

.page { max-width: 1180px; margin: 0 auto; padding: 34px 24px 56px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 155px; padding-top: 7px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #146b6a; color: white; font-size: 1rem; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.workspace-brand { width: fit-content; margin: 0 0 20px; }
.workspace-status:empty { display: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.15; letter-spacing: -.045em; margin-bottom: 8px; }
h2 { font-size: 1.33rem; letter-spacing: -.025em; margin-bottom: 18px; }
h3 { font-size: 1rem; margin: 0; }
.eyebrow { color: #147674; text-transform: uppercase; font-size: .69rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 7px; }
.card { background: #fff; border: 1px solid #e1e9e7; border-radius: 20px; box-shadow: 0 9px 25px rgba(25, 55, 59, .045); padding: 27px; }
.login-card { max-width: 620px; margin: 12vh auto 0; }
.login-card > p:not(.eyebrow) { color: #5c7077; }
.device-form { margin-top: 22px; padding-top: 19px; border-top: 1px solid rgba(106, 181, 210, .2); }
.device-form .button { margin-top: 14px; }
.token-result { max-width: 780px; margin: 16px auto 25px; }
.token-result input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; overflow: auto; }
.token-result > .button { margin-top: 13px; }
.device-manager { margin-top: 20px; }
.device-manager .item .button { margin-top: 10px; }
.login-row { display: flex; gap: 10px; }
.token-field { position: relative; flex: 1; min-width: 0; }
.token-field input { width: 100%; padding-right: 48px; }
.token-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 36px; padding: 0; color: #a9d9e8; border: 0; border-radius: 8px; background: transparent; }
.token-toggle:hover { color: #e4fbff; background: rgba(87, 193, 220, .15); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); gap: 20px; align-items: start; }
.reminders, .upcoming { grid-column: 1; }
.create-card { grid-column: 2; grid-row: 1 / span 2; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-head h2 { margin-bottom: 16px; }
.count { display: inline-grid; place-items: center; min-width: 27px; height: 27px; padding: 0 7px; border-radius: 999px; background: #e1f4f0; color: #146b6a; font-size: .85rem; vertical-align: 2px; }
.item-list { display: grid; gap: 11px; }
.item { border: 1px solid #e5eeeb; border-radius: 14px; padding: 15px 17px; background: #fbfdfc; }
.item.due { border-color: #f3d3a5; background: #fffbf4; }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.item-title { font-weight: 720; overflow-wrap: anywhere; }
.item-time, .item-description { color: #60747a; font-size: .88rem; margin: 4px 0 0; overflow-wrap: anywhere; }
.item-description { white-space: pre-wrap; }
.item-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.item-actions select { width: auto; max-width: 100%; }
.empty { padding: 20px; border: 1px dashed #cedbd7; border-radius: 14px; color: #62757c; background: #fafcfb; }
.notification-controls { border-top: 1px solid #e8eeec; margin-top: 19px; padding-top: 17px; }
.help, .footer-note { color: #65787e; font-size: .85rem; margin: 10px 0 0; }
.footer-note { margin: 21px 0 0; }
.status { min-height: 1.2em; margin: 12px 0; color: #146b6a; font-size: .91rem; }
.status.error { color: #a63f31; }
label { display: block; font-weight: 670; font-size: .87rem; margin: 15px 0 6px; }
input, textarea, select { width: 100%; border: 1px solid #cbd8d5; border-radius: 10px; padding: 10px 11px; color: #1d2c35; background: white; }
textarea { resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optional { color: #819096; font-weight: 400; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 41px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; white-space: nowrap; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { background: #146b6a; color: white; }
.button.primary:hover:not(:disabled) { background: #0f5554; }
.button.secondary { background: #e8f4f1; color: #146b6a; }
.button.secondary:hover:not(:disabled) { background: #d6ebe6; }
.button.ghost { border-color: #d2dfdb; background: white; color: #305b5a; }
.button.ghost:hover:not(:disabled) { background: #f4faf8; }
.button.danger { border-color: #eac4bd; background: #fff; color: #a83e31; }
.button.danger:hover:not(:disabled) { background: #fff4f1; }
.button.small { min-height: 34px; padding: 5px 12px; font-size: .82rem; }
.button.wide { width: 100%; margin-top: 20px; }
.edit-form { border-top: 1px solid #e5eeeb; margin-top: 15px; padding-top: 4px; }
.edit-form .status { margin-bottom: 0; }
.tabs { display: flex; gap: 8px; margin: 0 0 20px; border-bottom: 1px solid #d6e3df; overflow-x: auto; }
.documents-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.documents-tree { margin-top: 16px; max-height: 600px; overflow: auto; }
.documents-tree details { margin: 6px 0 6px 12px; border-left: 1px solid #d6e3df; padding-left: 10px; }
.documents-tree summary { cursor: pointer; font-weight: 700; padding: 5px; }
.documents-file { display: block; width: 100%; margin: 3px 0 3px 12px; padding: 7px; text-align: left; color: #1d2c35; background: #f5faf8; border: 1px solid #d6e3df; border-radius: 7px; white-space: normal; overflow-wrap: anywhere; }
.documents-file:hover { background: #e4f4ef; }
.documents-content { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 570px; overflow: auto; margin-top: 18px; }
#documents-import { margin-top: 12px; }
@media (max-width: 760px) { .documents-layout { grid-template-columns: 1fr; } }
.tab { flex: 0 0 auto; padding: 11px 19px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #526e70; font-weight: 750; }
.tab:hover, .tab.active { color: #146b6a; }
.tab.active { border-bottom-color: #146b6a; }
.mail-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.mail-compose { grid-column: 1 / -1; }
.mail-folders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mail-row { display: grid; width: 100%; text-align: left; gap: 3px; border: 1px solid #e5eeeb; border-radius: 12px; padding: 13px 15px; background: #fbfdfc; color: inherit; }
.mail-row:hover, .mail-row:focus-visible { border-color: #88bdb4; background: #f2faf7; }
.mail-row-subject, .mail-row-from, .mail-row-date { overflow-wrap: anywhere; }
.mail-row-from, .mail-row-date { color: #60747a; font-size: .85rem; }
.mail-message { overflow-wrap: anywhere; }
.mail-message p { margin: 0 0 9px; }
.selected-mail { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; padding: 11px 14px; border: 1px solid #c9e5dc; border-radius: 12px; background: #f0faf6; overflow-wrap: anywhere; }
.selected-mail[hidden] { display: none; }
#mail-discuss { margin-top: 12px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.5; padding: 17px; border: 1px solid #e5eeeb; border-radius: 12px; background: #fbfdfc; max-height: 460px; overflow: auto; }
.mail-review { margin-top: 25px; padding-top: 22px; border-top: 1px solid #e5eeeb; }
.mail-review h3 { font-size: 1.1rem; }
.mail-review .mail-message { margin-top: 18px; }
.chat-shell { max-width: 880px; margin: 0 auto; }
.chat-shell { max-width: none; display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); gap: 14px; align-items: start; }
.chat-shell.history-hidden { grid-template-columns: minmax(0, 1fr); }
.chat-shell.document-open { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(300px, .8fr); }
.chat-shell.history-hidden.document-open { grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); }
.research-history, .research-conversation, .research-document { min-width: 0; }
.research-history { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.research-history h2, .research-document h2 { font-size: 1.18rem; margin: 0; }
.research-thread-list { display: grid; gap: 5px; max-height: 55vh; overflow-y: auto; margin: 12px 0; }
.research-thread { display: block; width: 100%; border: 1px solid transparent; border-radius: 9px; padding: 10px 12px; background: transparent; color: inherit; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.research-thread:hover, .research-thread.active { border-color: #52a5b4; background: rgba(62, 160, 193, .19); }
.research-thread small { display: block; opacity: .7; margin-top: 3px; }
.research-thread-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.research-thread-rename { width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 9px; }
.research-conversation { display: flex; flex-direction: column; min-height: min(74vh, 900px); }
.research-conversation .chat-thread-controls { display: none; }
.research-conversation .chat-messages { flex: 1; min-height: 260px; max-height: min(60vh, 720px); }
.research-conversation #chat-form { margin-top: auto; }
.research-mode-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.research-mode-row label { margin: 0; }
.research-mode-row select { width: auto; max-width: 100%; }
.research-document { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.research-document[hidden], .research-history[hidden] { display: none; }
.research-document textarea { min-height: 360px; }
.research-documents-list { display: flex; flex-wrap: wrap; gap: 6px; }
.research-footer { grid-column: 1 / -1; }
.chat-message .research-sources { margin-top: 12px; font-size: .85rem; }
.chat-message .research-sources a { display: block; color: #77dcec; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .chat-shell.document-open { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); } .chat-shell.document-open .research-history { grid-column: 1 / -1; position: static; max-height: 240px; } }
@media (max-width: 760px) { .chat-shell, .chat-shell.document-open, .chat-shell.history-hidden.document-open { grid-template-columns: minmax(0, 1fr); } .research-history, .research-document { position: static; max-height: none; } .research-conversation .chat-messages { max-height: 55vh; } }
.chat-thread-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chat-thread-controls label { margin: 0 6px 8px 0; }
.chat-thread-controls select { width: auto; min-width: 190px; max-width: 100%; }
.chat-messages { display: grid; gap: 12px; min-height: 180px; max-height: 580px; overflow-y: auto; padding: 8px 4px 18px; }
.chat-message { max-width: 88%; padding: 15px 18px; border: 1px solid #e3ece9; border-radius: 15px; background: #f7faf9; overflow-wrap: anywhere; }
.chat-message.user { justify-self: end; background: #e8f4f1; border-color: #d1e9e3; }
.chat-message.assistant { justify-self: start; }
.chat-message h3 { color: #146b6a; font-size: .82rem; margin-bottom: 6px; }
.chat-content { white-space: pre-wrap; margin: 0; }
.chat-content p { margin: 0 0 .65rem; }
.chat-content h3, .chat-content h4, .chat-content h5, .chat-content h6 { margin: .9rem 0 .35rem; color: inherit; font-size: 1.05rem; }
.chat-content ul, .chat-content ol { margin: .45rem 0 .8rem; padding-left: 1.5rem; }
.research-code { max-width: 100%; overflow-x: auto; padding: 12px; border-radius: 8px; background: rgba(0, 0, 0, .18); }
.research-table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; white-space: nowrap; margin: .7rem 0; }
.research-table td { border: 1px solid rgba(120, 175, 185, .4); padding: 6px 9px; }
#chat-form { border-top: 1px solid #e5eeeb; padding-top: 8px; }
#chat-form .button { margin-top: 12px; }
.chat-calendar-review { margin-top: 20px; padding: 18px; border: 1px solid #c9e5dc; border-radius: 12px; background: #f0faf6; }
.chat-calendar-review .mail-message { margin-top: 14px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.checkbox-row input { width: auto; flex: none; margin-top: 4px; }
.checkbox-row select { margin-left: auto; max-width: min(55%, 250px); }

@media (max-width: 850px) {
  .dashboard { grid-template-columns: 1fr; }
  .reminders, .upcoming, .create-card { grid-column: 1; grid-row: auto; }
  .create-card { order: 2; }
  .upcoming { order: 3; }
  .mail-grid { grid-template-columns: 1fr; }
  .mail-compose { grid-column: 1; }
}

@media (max-width: 560px) {
  .page { padding: 20px 13px 40px; }
  .card { padding: 19px; border-radius: 16px; }
  .login-row, .field-pair, .section-head { display: block; }
  .project-card-head { align-items: flex-start; flex-direction: column; }
  .login-row .button { width: 100%; margin-top: 10px; }
  .section-head .button { margin-bottom: 12px; }
}

/* Jarvis console */
:root { color-scheme: dark; color: #dce9f3; background: #06101c; }
body {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(27, 114, 158, .29), transparent 53%),
    radial-gradient(ellipse at 100% 50%, rgba(17, 76, 99, .19), transparent 52%),
    linear-gradient(135deg, #07121e, #06101c 55%, #091928);
  color: #dce9f3;
  min-height: 100vh;
}
.page { max-width: 1320px; }
.brand { color: #a9efff; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { background: linear-gradient(145deg, #1cb6d1, #18537f); color: #effcff; border: 1px solid #8cecff; box-shadow: 0 0 25px rgba(58, 210, 248, .3); }
.help, .footer-note { color: #9fb2c4; }
.eyebrow { color: #55cfe8; }
.card { background: linear-gradient(145deg, rgba(16, 36, 54, .93), rgba(12, 28, 44, .9)); border: 1px solid rgba(106, 181, 210, .2); box-shadow: 0 18px 45px rgba(0, 0, 0, .22); }
.login-card > p:not(.eyebrow) { color: #a9becb; }
.tabs { border-bottom-color: rgba(113, 184, 213, .18); gap: 4px; }
.tab { color: #a8bcca; border-radius: 9px 9px 0 0; }
.tab:hover, .tab.active { background: rgba(37, 139, 172, .13); color: #95e8f7; }
.tab.active { border-bottom-color: #4dd0e8; }
.item, .mail-row, .mail-body, .empty, .chat-message, .selected-mail, .chat-calendar-review {
  background: rgba(9, 27, 43, .68); border-color: rgba(109, 180, 209, .18); color: #dce9f3;
}
.item.due { background: rgba(114, 71, 30, .25); border-color: rgba(240, 174, 94, .4); }
.item-time, .item-description, .mail-row-from, .mail-row-date { color: #9bb4c5; }
.item details > summary { cursor: pointer; list-style: none; }
.item details > summary::-webkit-details-marker { display: none; }
.item details > summary::before { content: "▸"; display: inline-block; margin-right: .45rem; color: #75d9ed; }
.item details[open] > summary::before { content: "▾"; }
.item details[open] > summary { margin-bottom: .65rem; }
.item details .help { white-space: pre-wrap; }
.item details > summary strong { font-size: 1.08rem; line-height: 1.4; }
.item details .help { font-size: 1rem; line-height: 1.55; }
.item details .item-time { font-size: .95rem; }
.project-card > details { margin-top: 1rem; }
.project-card > details > .item-list { margin-top: .8rem; }
.project-card > h3 { font-size: 1.2rem; margin: 0 0 .6rem; }
.project-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: .65rem; }
.project-card-head h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.project-health { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 5px 10px; border: 1px solid rgba(141, 172, 193, .25); border-radius: 999px; background: rgba(119, 146, 165, .1); color: #afc1ce; font-size: .78rem; font-weight: 720; }
.project-health-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #8296a6; box-shadow: 0 0 0 3px rgba(130, 150, 166, .13); }
.project-health.is-working { color: #8fe4b0; border-color: rgba(75, 195, 122, .32); background: rgba(50, 160, 95, .1); }
.project-health.is-working .project-health-dot { background: #49d17d; box-shadow: 0 0 0 3px rgba(73, 209, 125, .16), 0 0 12px rgba(73, 209, 125, .35); }
.project-health.is-question { color: #ffd08b; border-color: rgba(242, 169, 70, .36); background: rgba(190, 124, 32, .13); }
.project-health.is-question .project-health-dot { background: #ffad42; box-shadow: 0 0 0 3px rgba(255, 173, 66, .17); }
.project-health.is-error { color: #ff9f9b; border-color: rgba(230, 92, 86, .36); background: rgba(184, 59, 55, .13); }
.project-health.is-error .project-health-dot { background: #ff625f; box-shadow: 0 0 0 3px rgba(255, 98, 95, .17); }
.project-live-run { margin-top: .7rem; border-left: 3px solid #49d17d; }
.project-live-run.is-working { border-color: #49d17d; }
.project-live-run.is-question { border-color: #ffad42; }
.project-live-run.is-paused { border-color: #8fb4e8; }
.project-health.is-paused { color: #b9d2f5; border-color: rgba(143, 180, 232, .36); background: rgba(80, 120, 190, .13); }
.project-health.is-paused .project-health-dot { background: #8fb4e8; }
.run-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.project-run-controls { margin: .4rem 0 .8rem; }
.project-live-run > summary { cursor: pointer; list-style: none; }
.project-live-run > summary::-webkit-details-marker { display: none; }
.project-live-run > summary::before { content: "▸"; display: inline-block; margin-right: .45rem; color: #75d9ed; }
.project-live-run[open] > summary::before { content: "▾"; }
.project-live-run[open] > summary { margin-bottom: .65rem; }
.project-live-run .project-answer-form { display: grid; gap: 8px; margin-top: .8rem; }
.project-live-run .project-answer-form label { margin: 0; }
.project-live-run .project-answer-form .button { justify-self: start; }
.project-team-item { margin-top: .6rem; }
.project-team-editor { display: grid; gap: 8px; margin-top: .8rem; }
.project-team-editor textarea { min-height: 180px; font: .88rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.team-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.team-skill { border: 1px solid rgba(105, 195, 214, .22); border-radius: 999px; padding: 2px 9px; color: #a9e4ef; background: rgba(44, 141, 162, .12); font-size: .75rem; }
.project-answer-form { padding-top: 10px; }
.project-answer-form label { margin-top: 5px; }
.project-order-form { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(106, 181, 210, .2); }
.mail-row:hover, .mail-row:focus-visible { background: rgba(39, 126, 151, .22); border-color: #68cfe5; }
.chat-message.user { background: rgba(28, 116, 144, .25); border-color: rgba(75, 197, 226, .36); }
.chat-message h3 { color: #75d9ed; }
.count { background: rgba(38, 164, 181, .19); color: #91e4f4; }
.status { color: #7edbd8; }
.status.error { color: #ff9f8e; }
input, textarea, select { color: #edf8ff; background: #0a1c2d; border-color: #335268; }
input:focus, textarea:focus, select:focus { border-color: #5ed3ea; }
input::placeholder, textarea::placeholder { color: #7997a8; }
.button.primary, .button.live-primary { color: #071c2a; background: linear-gradient(135deg, #8cecf1, #42b6dc); box-shadow: 0 8px 20px rgba(24, 135, 167, .2); }
.button.primary:hover:not(:disabled), .button.live-primary:hover:not(:disabled) { background: linear-gradient(135deg, #aff7f9, #65cfec); }
.button.secondary, .button.live-secondary { color: #99e4f1; background: rgba(50, 137, 163, .2); border-color: rgba(95, 204, 231, .23); }
.button.secondary:hover:not(:disabled), .button.live-secondary:hover:not(:disabled) { background: rgba(65, 160, 183, .3); }
.button.ghost { color: #b9d4df; background: rgba(255, 255, 255, .035); border-color: rgba(146, 194, 212, .24); }
.button.ghost:hover:not(:disabled) { background: rgba(103, 174, 199, .14); }
.button.danger { color: #ffb1a2; background: rgba(112, 36, 30, .15); border-color: rgba(229, 124, 102, .35); }
.button.danger:hover:not(:disabled) { background: rgba(148, 52, 40, .25); }
.notification-controls, #chat-form, .edit-form, .mail-review { border-color: rgba(109, 180, 209, .18); }

.voice-stage { position: relative; overflow: hidden; min-height: 620px; padding: 28px 36px 30px; text-align: center; border: 1px solid rgba(94, 202, 236, .27); border-radius: 24px; background: radial-gradient(circle at 50% 47%, rgba(19, 91, 130, .3), transparent 38%), linear-gradient(145deg, #0c2437, #081725 65%, #0d2234); box-shadow: inset 0 0 80px rgba(54, 177, 215, .06), 0 22px 60px rgba(0,0,0,.28); }
.voice-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .21; background-image: linear-gradient(rgba(95, 201, 233, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 201, 233, .12) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, transparent, black 30%, black 75%, transparent); }
.voice-stage-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: left; }
.voice-overline { color: #73d5ef; font-size: .72rem; font-weight: 800; letter-spacing: .19em; }
.voice-connection { color: #75d5bd; font-size: .78rem; font-weight: 700; }
.voice-orb-wrap { position: relative; width: 280px; height: 280px; margin: 20px auto 4px; display: grid; place-items: center; }
.voice-orb-ring { position: absolute; border: 1px solid rgba(115, 209, 240, .3); border-radius: 50%; }
.voice-orb-ring.outer { width: 252px; height: 252px; border-style: dashed; animation: jarvis-spin 32s linear infinite; }
.voice-orb-ring.inner { width: 204px; height: 204px; border-width: 2px; box-shadow: 0 0 20px rgba(72, 206, 238, .13); }
.voice-orb { display: grid; place-items: center; width: 160px; height: 160px; border-radius: 50%; color: #e7fcff; font-size: 4.7rem; font-weight: 300; font-family: Georgia, serif; border: 1px solid rgba(160, 241, 255, .75); background: radial-gradient(circle at 35% 25%, #3babc7 0%, #145273 30%, #0a2942 65%, #051726 100%); box-shadow: inset 0 0 35px rgba(142, 232, 250, .25), 0 0 40px rgba(42, 186, 226, .3), 0 0 90px rgba(24, 142, 187, .16); transition: transform .3s, box-shadow .3s; }
.voice-orb { overflow: hidden; }
.voice-orb { padding: 0; cursor: pointer; box-sizing: border-box; touch-action: manipulation; }
.voice-orb:focus-visible { outline: 3px solid #b3f4ff; outline-offset: 8px; }
.voice-orb img, .voice-orb-ring { pointer-events: none; }
/* The supplied artwork's circle sits above the canvas centre. Compensate in
   percentages so its centre follows the surrounding rings at every orb size. */
.voice-orb img { display: block; width: 100%; height: 100%; object-fit: cover; transform: none; }
.voice-stage[data-state="listening"] .voice-orb, .voice-stage[data-state="speaking"] .voice-orb { animation: jarvis-breathe 2.3s ease-in-out infinite; }
.voice-stage[data-state="speaking"] .voice-orb { box-shadow: inset 0 0 40px rgba(178, 246, 255, .38), 0 0 52px rgba(66, 218, 248, .5), 0 0 110px rgba(24, 156, 210, .35); }
.voice-stage[data-state="thinking"] .voice-orb-ring.inner { animation: jarvis-breathe 1.2s ease-in-out infinite; }
.voice-stage[data-state="muted"] .voice-orb { filter: saturate(.25); }
.voice-state-text { position: relative; margin: 0; color: #e6f8ff; font-size: 1.42rem; font-weight: 680; letter-spacing: -.02em; }
.voice-caption { position: relative; max-width: 650px; min-height: 56px; margin: 8px auto 0; color: #a8cad7; font-size: 1rem; overflow-wrap: anywhere; }
.voice-controls { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 14px auto 0; }
.voice-controls .button { min-width: 155px; }
.voice-options { position: relative; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 19px; }
.voice-options label { margin: 0; color: #b5ceda; }
.voice-options select { width: auto; min-width: 125px; }
.voice-options .checkbox-row input { margin: 0; }
.voice-option-hint { position: relative; margin: 9px 0 0; color: #94b8c8; font-size: .79rem; }
.voice-memory-status { position: relative; min-height: 1.1em; margin: 7px 0 0; color: #92e7ca; font-size: .82rem; }
.voice-memory-status.error { color: #ffae9f; }
.voice-disclosure { position: relative; max-width: 760px; margin: 22px auto 0; color: #819eaf; font-size: .76rem; }
.voice-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr); gap: 18px; margin-top: 18px; align-items: start; }
.voice-log { display: grid; gap: 9px; max-height: 360px; overflow-y: auto; }
.voice-line { padding: 12px 15px; border-left: 2px solid #50c4dd; border-radius: 6px 12px 12px 6px; background: rgba(35, 108, 133, .17); }
.voice-line.user { border-left-color: #b0abfa; background: rgba(99, 89, 155, .14); }
.voice-line strong { display: block; color: #8fe0ed; font-size: .74rem; margin-bottom: 3px; }
.voice-line.user strong { color: #c4bfff; }
.voice-line p { margin: 0; white-space: pre-wrap; }
.voice-action-card { border-color: rgba(241, 194, 109, .4); }
.voice-action-card .eyebrow { color: #f5c990; }
.voice-action-card .mail-message { margin-top: 15px; }
.voice-confirm-hint { margin: 14px 0 0; color: #d8edfa; font-size: .9rem; }
.voice-confirm-hint strong { color: #90eff2; }
@keyframes jarvis-spin { to { transform: rotate(360deg); } }
@keyframes jarvis-breathe { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .voice-orb, .voice-orb-ring { animation: none !important; } }
@media (max-width: 850px) { .voice-lower { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .voice-stage { padding: 20px 13px; min-height: 0; } .voice-orb-wrap { width: 235px; height: 235px; } .voice-orb-ring.outer { width: 218px; height: 218px; } .voice-orb-ring.inner { width: 180px; height: 180px; } .voice-orb { width: 145px; height: 145px; } .voice-controls .button { width: 100%; } .voice-stage-top { flex-direction: column; align-items: flex-start; } }

.usage-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
.usage-total { display: grid; gap: 3px; padding: 16px 18px; border: 1px solid rgba(109, 180, 209, .2); border-radius: 14px; background: rgba(9, 27, 43, .55); }
.usage-total span { color: #9fb2c4; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.usage-total strong { color: #eefaff; font-size: 1.7rem; font-weight: 650; }
.usage-total small { color: #8ea9ba; font-size: .78rem; }
.usage-budget { position: relative; height: 10px; margin: 20px 0 8px; border-radius: 99px; background: rgba(109, 180, 209, .14); overflow: hidden; }
.usage-budget-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #42b6dc, #8cecf1); transition: width .4s; }
.usage-budget-bar.over-target { background: linear-gradient(90deg, #d8a24c, #f0c46e); }
.usage-budget-mark.target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #f5c990; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.usage-daily-card { grid-column: 1 / -1; }
.usage-list { display: grid; gap: 8px; }
.usage-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 12px 13px; border-radius: 10px; background: rgba(9, 27, 43, .5); }
.usage-row-name { color: #dce9f3; overflow-wrap: anywhere; }
.usage-row-calls { color: #8ea9ba; font-size: .82rem; }
.usage-row-cost { color: #95e8f7; font-weight: 700; font-variant-numeric: tabular-nums; }
.usage-row-bar { position: absolute; left: 12px; bottom: 5px; height: 3px; max-width: calc(100% - 24px); border-radius: 3px; background: rgba(77, 208, 232, .55); }
.usage-daily { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; border-bottom: 1px solid rgba(109, 180, 209, .25); }
.usage-day { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.usage-day-fill { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #8cecf1, #2a8fb3); }
.model-settings { display: grid; gap: 18px; margin-top: 12px; }
.notify-kinds { border: 0; padding: 0; margin: 14px 0 6px; display: grid; gap: 6px; }
.notify-kinds legend { font-weight: 600; margin-bottom: 6px; }
.notify-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.notify-quiet select { width: auto; min-width: 7.5em; }
.model-group { display: grid; gap: 8px; }
.model-group-title { margin: 0; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: #8ea9ba; }
.model-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 4px 14px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(9, 27, 43, .5); }
.model-row-name { color: #dce9f3; overflow-wrap: anywhere; }
.model-row-select { width: 100%; min-width: 0; }
.model-row-hint { grid-column: 1 / -1; margin: 0; color: #8ea9ba; font-size: .82rem; }
.model-row.expensive .model-row-hint { color: #f0c46e; }
@media (max-width: 760px) { .model-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .usage-totals, .usage-grid { grid-template-columns: 1fr; }
  .usage-total strong { font-size: 1.35rem; }
}
.documents-reminders { margin: 1rem 0; }
.documents-reminder-item { border-top: 1px solid var(--line, #d9dfe4); padding: .7rem 0; }
.documents-reminder-item p { margin: .2rem 0 .5rem; }
.documents-reminder-item label { display: inline-grid; gap: .2rem; margin: .2rem .6rem .5rem 0; }
.documents-reminder-item input { max-width: 12rem; }
.documents-reminder-item button { margin: .2rem .4rem .2rem 0; }

.scanner { border: 1px solid #d6e3df; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; background: #f5faf8; }
.scanner h3 { margin-top: 0; }
.scanner-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.scanner-pick { display: inline-flex; align-items: center; cursor: pointer; }
.scanner-option { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.scanner-pages { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.scanner-page { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 170px; }
.scanner-thumb { max-width: 160px; max-height: 160px; border: 1px solid #d6e3df; border-radius: 6px; background: #fff; }

/* ---- Tarvi Live neural net (live-graph.js) ------------------------------------------- */
.live-graph { position: absolute; inset: 0; pointer-events: none; }
.live-graph-links { position: absolute; inset: 0; z-index: 2; overflow: visible; }
.live-graph-nodes { position: absolute; inset: 0; z-index: 4; }
.voice-orb-wrap { z-index: 3; }
.live-link { stroke: rgba(126, 232, 255, .85); stroke-width: 1.6; stroke-linecap: round; }
.live-link-glow { stroke: rgba(64, 214, 255, .45); stroke-width: 7; stroke-linecap: round; filter: blur(4px); }
.live-link[data-state="searching"] { stroke: #b8f6ff; }
.live-link-glow[data-state="searching"] { stroke: rgba(80, 225, 255, .75); animation: live-link-pulse 1s ease-in-out infinite; }
.live-link[data-state="error"], .live-link-glow[data-state="error"] { stroke: rgba(255, 138, 110, .7); }
.live-packet { fill: #c9f5ff; opacity: .55; filter: drop-shadow(0 0 3px #6fe3ff); }
.live-packet.return { fill: #b9ffe6; opacity: .65; filter: drop-shadow(0 0 3px #54f0c0); }

.live-node { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; display: grid; place-items: center; opacity: 0; transform: scale(.3); transition: opacity .35s ease, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.live-node.visible { opacity: 1; transform: scale(1); }
.live-node.leaving { opacity: 0; transform: scale(.6); }
.live-node-core { position: relative; z-index: 1; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #e8fdff; font: 700 .7rem/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .12em; border: 1.5px solid rgba(150, 240, 255, .9); background: radial-gradient(circle at 35% 30%, rgba(80, 200, 235, .55), rgba(9, 44, 68, .92) 70%); box-shadow: 0 0 18px rgba(70, 215, 255, .6), inset 0 0 14px rgba(160, 245, 255, .35); text-shadow: 0 0 8px rgba(150, 245, 255, .9); }
.live-node::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(120, 230, 255, .55); opacity: 0; }
.live-node[data-state="searching"]::before { opacity: 1; animation: jarvis-spin 2.4s linear infinite; }
.live-node[data-state="searching"] .live-node-core { animation: live-node-pulse .9s ease-in-out infinite; }
.live-node[data-state="done"] .live-node-core { box-shadow: 0 0 26px rgba(90, 240, 200, .6), inset 0 0 16px rgba(160, 255, 230, .35); border-color: rgba(150, 255, 220, .95); }
.live-node[data-state="error"] .live-node-core { border-color: rgba(255, 150, 120, .9); box-shadow: 0 0 20px rgba(255, 120, 90, .5); }
.live-node-label { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); white-space: nowrap; color: #bdf4ff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 8px rgba(80, 220, 255, .8); }
.live-node-count { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); white-space: nowrap; color: #8fffd9; font: 700 .68rem/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-shadow: 0 0 8px rgba(80, 255, 200, .8); }
.live-node[data-state="searching"] .live-node-count { color: #9eefff; animation: live-blink 1s steps(2) infinite; }
.live-node-scan { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.live-node[data-state="searching"] .live-node-scan { opacity: 1; }
.live-node-scan span { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #c9f8ff; box-shadow: 0 0 8px #58dcff; transform: rotate(var(--a)) translateX(var(--r)); animation: live-flicker 1.2s ease-in-out infinite; }

.live-cards { position: absolute; display: flex; flex-direction: column; gap: 8px; width: 230px; }
.live-cards.left { transform: translateX(-100%); }
.live-cards.leaving, .live-strip.leaving { opacity: 0; transition: opacity .4s; }
.live-card { display: grid; gap: 2px; width: 100%; padding: 8px 10px 9px; text-align: left; color: #e9fbff; border: 1px solid rgba(110, 225, 255, .55); border-radius: 10px; background: linear-gradient(135deg, rgba(20, 70, 98, .82), rgba(7, 28, 44, .9)); box-shadow: 0 0 16px rgba(50, 190, 235, .28), inset 0 0 12px rgba(120, 230, 255, .08); backdrop-filter: blur(6px); pointer-events: auto; opacity: 0; transform: translateX(-12px) scale(.96); animation: live-card-in .5s cubic-bezier(.2, .9, .3, 1.2) forwards; position: relative; overflow: hidden; }
.live-cards.left .live-card { transform: translateX(12px) scale(.96); }
button.live-card { cursor: pointer; font: inherit; }
button.live-card:hover, button.live-card:focus-visible { border-color: #b8f7ff; box-shadow: 0 0 24px rgba(90, 225, 255, .55); outline: none; }
.live-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(170, 245, 255, .22) 50%, transparent 70%); transform: translateX(-120%); animation: live-sweep 1.4s .3s ease-out 1; pointer-events: none; }
.live-card strong { font-size: .84rem; line-height: 1.25; overflow-wrap: anywhere; }
.live-card-code { color: #7fe6ff; font: 700 .6rem/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; }
.live-card-meta { color: #9cc4d3; font-size: .72rem; }
.live-card.settled { animation: none; opacity: 1; transform: none; }
.live-card.settled::after { animation: none; }
.live-cards { transition: top .5s ease, left .5s ease; }
.live-card.more { color: #9cdcef; font-size: .74rem; text-align: center; pointer-events: none; }

.live-strip { position: relative; z-index: 4; display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 auto 6px; scroll-snap-type: x mandatory; }
.live-strip .live-card { flex: 0 0 210px; scroll-snap-align: start; }

.voice-stage.graph-active .voice-orb-ring.outer { animation-duration: 6s; border-color: rgba(140, 235, 255, .6); }
.voice-stage.graph-active .voice-orb-ring.inner { box-shadow: 0 0 32px rgba(72, 216, 248, .45); }
.voice-stage.graph-active .voice-orb { box-shadow: inset 0 0 44px rgba(178, 246, 255, .42), 0 0 60px rgba(66, 218, 248, .6), 0 0 130px rgba(24, 156, 210, .4); }

.live-pill { position: fixed; top: 12px; left: 50%; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; color: #dff9ff; border: 1px solid rgba(110, 225, 255, .6); border-radius: 999px; background: rgba(8, 30, 46, .94); box-shadow: 0 0 22px rgba(60, 200, 240, .4); transform: translateX(-50%); font-weight: 700; font-size: .86rem; }
.live-pill-dot { width: 9px; height: 9px; border-radius: 50%; background: #5ff0c4; box-shadow: 0 0 10px #5ff0c4; animation: live-blink 1.2s ease-in-out infinite; }

@keyframes live-link-pulse { 50% { opacity: .35; } }
@keyframes live-node-pulse { 50% { box-shadow: 0 0 34px rgba(110, 230, 255, .9), inset 0 0 20px rgba(180, 250, 255, .5); } }
@keyframes live-flicker { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes live-blink { 50% { opacity: .35; } }
@keyframes live-card-in { to { opacity: 1; transform: none; } }
@keyframes live-sweep { to { transform: translateX(120%); } }

@media (max-width: 820px) {
  .live-cards { display: none; }
  .live-node { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
  .live-node-core { width: 44px; height: 44px; font-size: .6rem; }
  .live-node-label { font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  .live-node, .live-card, .live-cards { transition: none; animation: none; opacity: 1; transform: none; }
  .live-cards.left { transform: translateX(-100%); }
  .live-card::after, .live-node::before, .live-node-scan span, .live-link-glow, .live-pill-dot { animation: none; }
}

/* ---- Tarvi Live full-screen HUD (28.09.2026) --------------------------------------------
   The stage spans the whole window width and height; settings live below it. */
html { overflow-x: clip; }
#voice-panel .voice-stage { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; border-left: 0; border-right: 0; min-height: max(640px, calc(100vh - 150px)); display: flex; flex-direction: column; box-sizing: border-box; padding: 22px 40px 26px; }
#voice-panel .voice-orb-wrap { margin: 0 auto; flex: 1 1 0; min-height: 180px; }
#voice-panel .voice-controls { margin-top: auto; padding-top: 18px; }
#voice-panel .voice-caption:empty { margin-top: 8px; }
.voice-settings { margin-top: 18px; }
.voice-settings summary { cursor: pointer; color: #9fdcf0; font-weight: 700; letter-spacing: .04em; }
.voice-settings[open] summary { margin-bottom: 12px; }
.voice-settings .voice-options { justify-content: flex-start; margin-top: 4px; }
.voice-settings .voice-option-hint, .voice-settings .voice-disclosure { text-align: left; margin-left: 0; }
@media (max-width: 820px) {
  #voice-panel .voice-stage { padding: 18px 14px 20px; min-height: max(560px, calc(100vh - 170px)); }
}

/* ---- page-wide neural net (net.js) and glass surfaces (28.09.2026) ---------------------- */
#tarvi-net { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }
.card { background: linear-gradient(145deg, rgba(16, 36, 54, .72), rgba(10, 26, 42, .66)); backdrop-filter: blur(10px) saturate(1.2); transition: border-color .3s, box-shadow .3s; }
.card:hover { border-color: rgba(110, 214, 244, .34); box-shadow: 0 18px 45px rgba(0, 0, 0, .22), 0 0 26px rgba(60, 196, 238, .12); }
.item, .mail-row, .chat-message { transition: border-color .25s, box-shadow .25s, background .25s; }
.item:hover, .mail-row:hover, .chat-message:hover { box-shadow: 0 0 18px rgba(64, 200, 240, .14); }
/* the Live stage is a window onto the page-wide net */
#voice-panel .voice-stage { background: radial-gradient(circle at 50% 42%, rgba(19, 91, 130, .34), transparent 42%), linear-gradient(180deg, rgba(8, 23, 37, .35), rgba(8, 23, 37, .5)); backdrop-filter: none; }
/* views glide in when switching tabs */
main > section:not([hidden]) { animation: tarvi-view-in .45s cubic-bezier(.2, .8, .2, 1); }
.tab { transition: color .25s, background .25s, box-shadow .25s; }
.tab.active { box-shadow: inset 0 -2px 0 #4dd0e8, 0 6px 18px -10px rgba(77, 208, 232, .8); }
.brand-mark { animation: tarvi-mark-glow 4s ease-in-out infinite; }
@keyframes tarvi-view-in { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tarvi-mark-glow { 50% { box-shadow: 0 0 34px rgba(58, 210, 248, .55); } }
@media (prefers-reduced-motion: reduce) {
  main > section:not([hidden]), .brand-mark { animation: none; }
}

/* ---- Tarvi Live without a frame; links as wandering light (28.09.2026) ------------------ */
#voice-panel .voice-stage { background: none; border: 0; box-shadow: none; }
/* only the grid stays visible (no frame, no background) */
#voice-panel .voice-stage::before { display: block; }
.live-link { stroke: rgba(126, 232, 255, .26); stroke-width: 1; transition: stroke .8s ease; }
.live-link[data-state="searching"] { stroke: rgba(184, 246, 255, .42); }
/* A steady halo adds depth without a visible pulse. */
.live-link-glow { stroke: rgba(64, 214, 255, .13); stroke-width: 6; filter: blur(5px); animation: none; transition: stroke .8s ease; }
.live-link-glow[data-state="searching"] { stroke: rgba(90, 228, 255, .24); animation: none; }
.live-link-glow[data-state="done"] { stroke: rgba(84, 240, 192, .13); }
/* One faint light segment moves at a constant speed along each link. */
.live-link-flow { stroke: rgba(210, 249, 255, .48); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 54 386; filter: drop-shadow(0 0 3px rgba(111, 227, 255, .55)); animation: live-flow 5.2s linear infinite; transition: stroke .8s ease; }
.live-link-flow[data-state="searching"] { stroke: rgba(224, 251, 255, .7); }
.live-link-flow[data-state="done"] { stroke: rgba(207, 255, 242, .46); }
.live-link-flow[data-state="error"] { display: none; }
.live-link-glow[data-state="error"], .live-link[data-state="error"] { stroke: rgba(255, 138, 110, .5); }
@keyframes live-flow { from { stroke-dashoffset: 440; } to { stroke-dashoffset: 0; } }   /* one 440 px period: seamless */
@media (prefers-reduced-motion: reduce) {
  .live-link-flow { display: none; }
}

.live-item-preview { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 24px; background: rgba(4, 17, 29, .68); backdrop-filter: blur(5px); pointer-events: auto; }
.live-item-preview[hidden] { display: none; }
.live-item-sheet { width: min(760px, 100%); max-height: min(78vh, 720px); display: flex; flex-direction: column; padding: clamp(18px, 3vw, 28px); border: 1px solid rgba(130, 220, 240, .45); border-radius: 18px; color: #e9fbff; background: #0c2335; box-shadow: 0 20px 70px rgba(0, 0, 0, .5); }
.live-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.live-item-head h2 { margin: 4px 0 0; overflow-wrap: anywhere; }
.live-item-meta { color: #a9d8e5; margin: 12px 0; overflow-wrap: anywhere; }
.live-item-body { overflow: auto; min-height: 0; white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.live-item-body img { display: block; max-width: 100%; max-height: 48vh; width: auto; height: auto; margin: 0 auto 16px; object-fit: contain; background: white; }
.live-item-body pre { margin: 0; white-space: pre-wrap; font: inherit; }
@media (max-width: 820px) { .live-item-preview { padding: 12px; } .live-item-sheet { max-height: 82vh; } }

/* ---- Nachrichten (28.09.2026) ----------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
.news-add { margin-top: 4px; }
.news-add input { min-width: 0; }
.news-feed .item-time { word-break: break-all; }
.news-list { display: grid; gap: 12px; }
.news-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px; color: inherit; text-decoration: none; border: 1px solid rgba(106, 181, 210, .22); border-radius: 14px; background: rgba(8, 24, 38, .55); transition: border-color .2s, box-shadow .2s; }
a.news-item:hover, a.news-item:focus-visible { border-color: #7fe6ff; box-shadow: 0 0 18px rgba(80, 215, 255, .25); outline: none; }
.news-thumb { flex: 0 0 auto; width: 132px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: #0a1c2d; }
.news-item-body { display: grid; gap: 4px; min-width: 0; }
.news-item-body strong { line-height: 1.3; overflow-wrap: anywhere; }
.news-item-body p { margin: 0; color: #b5cad8; font-size: .9rem; line-height: 1.45; }
.news-item-meta { color: #7fe6ff; font-size: .75rem; letter-spacing: .04em; }
@media (max-width: 820px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-thumb { width: 96px; }
}
/* Tarvi Live: NEWS cards carry a small thumbnail */
.live-card.has-thumb { grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; }
.live-card.has-thumb > :not(.live-card-thumb) { grid-column: 2; }
.live-card-thumb { grid-column: 1; grid-row: 1 / span 3; align-self: center; width: 64px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(127, 230, 255, .35); background: #0a1c2d; }

/* ---- Tarvi Live on one screen, centred tabs, burger menu on phones (28.09.2026) ----------- */
/* logo and tabs share one row; the tabs stay centred on the page */
.tabs-bar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; margin: 22px 0 18px; border-bottom: 1px solid rgba(113, 184, 213, .18); }
.tabs-bar .workspace-brand { grid-column: 1; justify-self: start; margin: 0; }
.tabs-bar .tabs { grid-column: 2; margin: 0; border-bottom: 0; scrollbar-width: none; }
.tabs-bar .tab { padding: 11px 13px; }
.tabs-menu { display: none; }

/* no page scrolling while Tarvi Live is open: everything fits the window */
html:has(#workspace:not([hidden]) > #voice-panel:not([hidden])),
html:has(#workspace:not([hidden]) > #voice-panel:not([hidden])) body { height: 100%; overflow: hidden; }
.page:has(> #workspace:not([hidden]) > #voice-panel:not([hidden])) { height: 100dvh; box-sizing: border-box; padding-bottom: 0; display: flex; flex-direction: column; }
#workspace:has(> #voice-panel:not([hidden])) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#workspace:has(> #voice-panel:not([hidden])) .tabs-bar { margin-bottom: 4px; }
#workspace:has(> #voice-panel:not([hidden])) .workspace-status:empty { min-height: 0; margin: 0; }
#voice-panel:not([hidden]) { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
#voice-panel .voice-stage { flex: 1; min-height: 0; padding: 12px 40px 18px; }
#voice-panel .voice-orb-wrap { flex: 1 1 0; }
@media (max-height: 820px) {
  .voice-actions { bottom: 96px; max-height: calc(100% - 96px); }
  #voice-panel .voice-orb-wrap { width: 220px; height: auto; }
  #voice-panel .voice-orb-ring.outer { width: 204px; height: 204px; }
  #voice-panel .voice-orb-ring.inner { width: 168px; height: 168px; }
  #voice-panel .voice-orb { width: 130px; height: 130px; font-size: 3.8rem; }
  #voice-panel .voice-caption { min-height: 0; }
}

/* top bar: connection state and the transcript switch; settings have their own tab */
.voice-stage-top { z-index: 15; }
.voice-stage-tools { position: relative; display: flex; align-items: center; gap: 10px; }
#settings-panel .voice-settings { max-width: 720px; margin: 0 auto; }
#settings-panel .voice-options { justify-content: flex-start; }
#settings-panel .voice-option-hint, #settings-panel .voice-disclosure { text-align: left; margin-left: 0; }
.live-transcript-toggle { font-size: .8rem; }

/* overlays: approval cards bottom left, live transcript bottom right */
/* they end above the start/stop buttons, which stay free at every width */
#voice-panel .voice-lower { position: absolute; z-index: 6; top: 64px; bottom: 0; left: calc(50% - 50vw); width: 100vw; margin: 0; padding: 0 16px 14px; box-sizing: border-box; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; pointer-events: none; }
#voice-panel .voice-lower > * { pointer-events: auto; }
/* the transcript sits in the bottom right corner */
#voice-panel .voice-transcript-card { order: 2; margin-left: auto; width: min(360px, calc(50vw - 350px)); min-width: 250px; max-height: 44%; display: flex; flex-direction: column; box-sizing: border-box; padding: 12px 16px; }
#voice-panel .voice-transcript-card h2 { margin: 0 0 8px; font-size: 1rem; }
#voice-panel .voice-transcript-card .voice-log { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
#voice-panel.transcript-hidden .voice-transcript-card { display: none; }
/* approvals: bottom centre, above the start/stop buttons, so no node column is covered */
.voice-actions { position: absolute; left: 50%; bottom: 132px; max-height: calc(100% - 132px); transform: translateX(-50%); width: min(560px, 44vw); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: rgba(127, 230, 255, .4) transparent; }
/* as an overlay, approval cards are opaque sheets */
#voice-panel .voice-action-card { padding: 16px 20px; background: #0c2335; backdrop-filter: none; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
#voice-panel .voice-action-card h2 { margin: 2px 0 0; font-size: 1.15rem; }
#voice-panel .voice-action-card .mail-message { margin-top: 8px; }
#voice-panel .voice-action-card .voice-confirm-hint { margin: 8px 0 0; font-size: .86rem; }
#voice-panel .voice-log { scrollbar-width: thin; scrollbar-color: rgba(127, 230, 255, .4) transparent; }
.voice-actions:not(:has(> :not([hidden]))) { display: none; }
/* possible reminders appear as the "Mögliche Erinnerungen" node with a save button */
#live-document-offers { display: none !important; }
.voice-action-card.flash { border-color: #f5c990; box-shadow: 0 0 0 2px rgba(245, 201, 144, .7), 0 0 30px rgba(245, 201, 144, .35); }

/* notice cards: save button; the card Tarvi talks about grows */
.live-card-action { justify-self: start; margin-top: 6px; padding: 4px 12px; font: 700 .74rem/1.4 inherit; color: #06202e; border: 0; border-radius: 999px; background: #7fe6ff; cursor: pointer; }
.live-card-action:hover, .live-card-action:focus-visible { background: #c4f6ff; outline: none; }
.live-card-detail { display: none; color: #cfe8f2; font-size: .8rem; line-height: 1.4; }
.live-node[data-category="suggestions"] .live-node-core, .live-node[data-category="approval"] .live-node-core { border-color: rgba(245, 201, 144, .9); box-shadow: 0 0 18px rgba(245, 190, 110, .45), inset 0 0 14px rgba(255, 225, 170, .25); }
.live-card { transition: box-shadow .35s ease, border-color .35s ease; }
/* it grows in height only (large image, full summary), so it never leaves the screen */
.live-card.spotlight { z-index: 5; border-color: #c4f6ff; background: linear-gradient(135deg, #14465f, #0a2233); box-shadow: 0 0 34px rgba(110, 230, 255, .55); }
.live-cards:has(.spotlight) { z-index: 8; }
.live-card.spotlight strong { font-size: .95rem; }
.live-card.spotlight .live-card-detail { display: block; }
.live-card.spotlight.has-thumb { grid-template-columns: minmax(0, 1fr); }
.live-card.spotlight.has-thumb > :not(.live-card-thumb) { grid-column: 1; }
.live-card.spotlight .live-card-thumb { grid-column: 1; grid-row: auto; width: 100%; height: 100px; margin-bottom: 6px; }
.live-card.spotlight .live-card-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.live-strip .live-card.spotlight { flex-basis: 280px; width: auto; }

@media (max-width: 820px) {
  /* phones: keep the stage compact */
  #voice-panel .voice-stage { padding: 10px 14px 12px; }
  /* phones: no transcript, so Tarvi Live fits the screen here too */
  #voice-panel .voice-transcript-card, .live-transcript-toggle { display: none; }
  #voice-panel .voice-lower { top: 56px; padding: 0 12px 12px; }
  .voice-actions { width: calc(100% - 24px); bottom: 150px; max-height: calc(100% - 150px); }
  .live-strip { flex: 0 0 auto; }
}
@media (max-width: 560px) {
  .voice-stage-top { flex-direction: row; align-items: center; }
  .voice-overline { display: none; }
  #voice-panel .voice-controls .button { width: auto; flex: 1 1 40%; white-space: normal; line-height: 1.2; }
  .live-strip { scrollbar-width: none; }
}
@media (min-width: 821px) and (max-width: 1250px) {
  /* too narrow for the corner next to the buttons: the transcript sits above them */
  #voice-panel .voice-transcript-card { margin-bottom: 118px; }
}

/* the ten tabs and the logo fit one row from 1300 px; below that: burger menu */
@media (max-width: 1300px) {
  .tabs-menu { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px; color: #dff7ff; font-weight: 700; border: 1px solid rgba(127, 230, 255, .35); border-radius: 12px; background: rgba(10, 28, 44, .85); }
  .tabs-menu-icon, .tabs-menu-icon::before, .tabs-menu-icon::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: #7fe6ff; }
  .tabs-menu-icon { position: relative; }
  .tabs-menu-icon::before, .tabs-menu-icon::after { content: ""; position: absolute; left: 0; }
  .tabs-menu-icon::before { top: -6px; }
  .tabs-menu-icon::after { top: 6px; }
  .tabs-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-bottom: 10px; }
  .tabs { display: none; }
  .tabs.open { position: absolute; z-index: 40; top: calc(100% - 2px); left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 2px; padding: 8px; overflow: visible; border: 1px solid rgba(127, 230, 255, .3); border-radius: 14px; background: #0b2032; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
  .tabs.open > .tab { margin: 0; text-align: left; border-radius: 8px; }
}

/* ---- Tarvi Live: cards use all free room (28.09.2026) ------------------------------------
   Status text, caption and buttons are only as wide as their content, so the free room
   beside them can hold cards; the buttons sit at the bottom, hints only appear on events. */
#voice-panel .voice-stage { padding-bottom: 10px; }
#voice-panel .voice-state-text, #voice-panel .voice-caption { width: fit-content; max-width: min(650px, 90%); margin-left: auto; margin-right: auto; }
#voice-panel .voice-controls { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; padding-top: 12px; }
#voice-panel .voice-controls .button { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
#voice-panel .voice-memory-status { width: fit-content; margin: 6px auto 0; }
#voice-panel .voice-memory-status:empty { display: none; }
/* Keep the visual centre independent of changing speech text and notices.
   Reserve the same space even for empty captions and the audio-unlock button. */
#voice-panel .voice-stage-top { flex: 0 0 40px; }
#voice-panel .voice-state-text { flex: 0 0 2.8rem; height: 2.8rem; overflow: auto; }
#voice-panel .voice-caption, #voice-panel .voice-caption:empty { flex: 0 0 3rem; height: 3rem; min-height: 3rem; overflow: auto; margin: 8px auto 0; }
#voice-panel .voice-controls { flex: 0 0 44px; height: 44px; margin-top: 0; padding-top: 0; align-content: center; align-items: center; }
#voice-panel .voice-controls .button { flex: 0 0 auto; }
#voice-panel .voice-memory-status, #voice-panel .voice-memory-status:empty { display: block; flex: 0 0 1.1rem; height: 1.1rem; min-height: 1.1rem; max-width: 90%; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-mute-toggle { position: fixed; z-index: 45; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 36px; height: 36px; padding: 7px; border-radius: 50%; border: 1px solid rgba(127,230,255,.4); background: #0b2032; color: #cceff8; }
.live-mute-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.live-mute-toggle .mute-slash { display: none; }
.live-mute-toggle.is-muted { color: #ffd3ac; border-color: #e7a56c; }
.live-mute-toggle.is-muted .mute-slash { display: block; }
.live-mute-toggle:focus-visible { outline: 2px solid #b3f4ff; outline-offset: 3px; }
/* node labels wrap under the node instead of running into the cards */
.live-node-label { width: 108px; white-space: normal; text-align: center; line-height: 1.15; }
/* live transcript: wider and flatter, bottom right */
#voice-panel .voice-transcript-card { width: clamp(300px, calc(50vw - 335px), 520px); max-height: 190px; padding: 10px 14px; }
#voice-panel .voice-transcript-card .section-head h2 { display: none; }
#voice-panel .voice-transcript-card .eyebrow { margin-bottom: 6px; }
@media (min-width: 821px) and (max-width: 1250px) {
  #voice-panel .voice-transcript-card { margin-bottom: 64px; }
}
/* desktop nodes: compact enough that a source with two notices fits one column */
.live-node { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.live-node-core { width: 50px; height: 50px; font-size: .64rem; }
.live-node-label { line-height: 1.05; }
.live-card-action { margin-top: 4px; padding: 3px 11px; font-size: .7rem; }
@media (max-width: 820px) {
  /* phones: only the nodes (no cards), a bit smaller so more fit around the core */
  .live-strip, .live-cards { display: none !important; }
  .live-node { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .live-node-core { width: 46px; height: 46px; font-size: .58rem; }
  .live-node-label { width: 84px; font-size: .6rem; letter-spacing: .05em; }
}
@media (max-width: 820px) {
  /* A compact core from the start: adding graph nodes cannot resize or move it. */
  #voice-panel .voice-orb-wrap { width: 168px; min-height: 132px; }
  #voice-panel .voice-orb-ring.outer { width: 156px; height: 156px; }
  #voice-panel .voice-orb-ring.inner { width: 128px; height: 128px; }
  #voice-panel .voice-orb { width: 100px; height: 100px; font-size: 2.9rem; }
  #voice-panel .voice-controls { width: 100%; }
  #voice-panel .voice-controls .button { flex: 0 0 calc(50% - 5px); min-width: 0; }
}

/* Compact, transparent conversation trail. Its fixed slot keeps the orb still. */
#voice-panel .voice-transcript-card { order: 0; flex: 0 0 216px; height: 216px; max-height: 216px; width: min(620px, 90%); min-width: 0; margin: 0 auto; padding: 0; display: flex; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
#voice-panel.transcript-hidden .voice-transcript-card { display: flex; visibility: hidden; pointer-events: none; }
#voice-panel .voice-transcript-card .voice-log { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 12px 0 4px; box-sizing: border-box; overflow-y: auto; overflow-anchor: none; scroll-behavior: auto; scrollbar-width: none; mask-image: linear-gradient(to bottom, transparent, #000 28%, #000); }
#voice-panel .voice-transcript-card .voice-log::-webkit-scrollbar { display: none; }
#voice-panel .voice-log::before { content: ""; flex: 1 0 0; }
#voice-panel .voice-line { flex: 0 0 auto; padding: 0 8px; border: 0; border-radius: 0; background: none; text-align: center; opacity: .22; transform: scale(.72); transform-origin: center bottom; transition: transform .35s ease, opacity .35s ease; }
#voice-panel .voice-line:nth-last-child(3) { opacity: .42; transform: scale(.82); }
#voice-panel .voice-line:nth-last-child(2) { opacity: .68; transform: scale(.91); }
#voice-panel .voice-line:last-child { opacity: 1; transform: scale(1); }
#voice-panel .voice-line strong { font-size: .66rem; letter-spacing: .06em; margin-bottom: 3px; }
#voice-panel .voice-line p { font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; display: block; overflow: visible; }
#voice-panel .voice-log .empty { margin: 0; padding: 8px; border: 0; background: none; text-align: center; color: #8fb3c4; font-size: .85rem; }
/* Only errors use these labels, outside the flow so they cannot move the orb. */
#voice-panel .voice-state-text { position: absolute; z-index: 16; top: 52px; left: 5%; right: 5%; width: auto; height: auto; max-width: none; margin: 0; font-size: .9rem; }
#voice-panel .voice-caption { position: absolute; z-index: 16; top: 86px; left: 5%; right: 5%; width: auto; height: auto; min-height: 0; max-width: none; margin: 0; font-size: .8rem; }
@media (max-width: 820px) {
  #voice-panel .voice-transcript-card { flex-basis: 170px; height: 170px; max-height: 170px; width: min(560px, 94%); }
  #voice-panel .voice-line p { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  #voice-panel .voice-line { transition: none; }
}

/* Zuhause: a command whose outcome is unclear waits for the user's answer */
.home-uncertain { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(245, 201, 144, .45); border-radius: 12px; background: rgba(60, 40, 10, .25); }
.home-uncertain p { margin: 0; color: #f5dcb4; }
/* Project lead conversation */
.project-chat { margin: 1rem 0; }
.project-chat-messages { display: grid; gap: .7rem; max-height: 24rem; overflow-y: auto; padding: .5rem 0; }
.project-chat-message { max-width: min(90%, 46rem); padding: .8rem 1rem; border-radius: 1rem;
  background: rgba(255,255,255,.07); white-space: pre-wrap; overflow-wrap: anywhere; }
.project-chat-message.from-user { justify-self: end; background: rgba(76,145,230,.2); }
.project-chat-message p { margin: .4rem 0; }
.project-chat-message time { display: block; font-size: .78rem; opacity: .7; }
#tab-projects.has-project-chat::after { content: ""; display: inline-block; width: .55rem;
  height: .55rem; margin-left: .45rem; border-radius: 50%; background: #ffb544; vertical-align: middle; }
/* Projekte → OpenCode (opencode.js) */
.opencode-switch { display: flex; gap: .5rem; margin: 0 0 1rem; }
.opencode-count { display: inline-block; min-width: 1.3rem; margin-left: .35rem; padding: 0 .35rem;
  border-radius: 999px; background: #ffb544; color: #1d2c35; font-size: .75rem; font-weight: 800; }
#tab-projects.has-opencode { box-shadow: inset 0 -3px 0 #ffb544; }
.opencode-requests { margin: 0 0 1.2rem; padding: 1rem; border: 1px solid rgba(255, 181, 68, .45);
  border-radius: 14px; background: rgba(255, 181, 68, .08); }
.opencode-requests h3 { margin-bottom: .6rem; }
.opencode-resource { display: block; margin: .2rem 0; overflow-wrap: anywhere; font-size: .85rem; }
.opencode-field { margin: .6rem 0; border: 0; padding: 0; }
.opencode-field legend { font-weight: 700; }
.opencode-layout { display: grid; grid-template-columns: minmax(14rem, 1fr) 2fr; gap: 1.2rem; align-items: start; }
.opencode-group { margin-bottom: 1rem; }
.opencode-group h3 { margin-bottom: .4rem; }
.opencode-session { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; width: 100%;
  margin: .25rem 0; padding: .55rem .7rem; text-align: left; color: inherit; border: 1px solid transparent;
  border-radius: 10px; background: rgba(255, 255, 255, .05); }
.opencode-session.is-current { border-color: rgba(76, 145, 230, .7); }
.opencode-session-title { font-weight: 600; overflow-wrap: anywhere; }
.opencode-session-meta { grid-column: 2; font-size: .8rem; opacity: .8; }
.opencode-new-mark { color: #ffb544; }
.opencode-dot { width: .6rem; height: .6rem; margin-top: .45rem; border-radius: 50%; background: #7d8c93; }
.opencode-session[data-status="busy"] .opencode-dot { background: #4c91e6; }
.opencode-session[data-status="queued"] .opencode-dot { background: #b5a1e8; }
.opencode-session[data-status="waiting_for_user"] .opencode-dot { background: #ffb544; }
.opencode-session[data-status="idle"] .opencode-dot { background: #3fb47c; }
.opencode-session[data-outcome="error"] .opencode-dot { background: #e5645b; }
.opencode-new, .opencode-unassigned { margin-top: 1rem; }
.opencode-messages { display: grid; gap: .7rem; max-height: 32rem; overflow-y: auto; padding: .5rem 0; }
.opencode-tools { font-size: .78rem; opacity: .75; }
.opencode-send textarea { width: 100%; }
.opencode-state { font-size: .85rem; opacity: .85; }
@media (max-width: 760px) {
  .opencode-layout { grid-template-columns: 1fr; }
}

/* ---- Agentenzentrale (hub.js) ----------------------------------------------------------- */
.segments { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 4px; border: 1px solid rgba(141, 172, 193, .22); border-radius: 12px; background: rgba(9, 24, 38, .7); }
.segment { min-height: 38px; padding: 0 18px; border: 0; border-radius: 9px; background: transparent; color: #afc1ce; font: inherit; font-weight: 700; cursor: pointer; }
.segment:hover { color: #e9fbff; }
.segment[aria-selected="true"] { background: #14465f; color: #e9fbff; box-shadow: inset 0 0 0 1px rgba(111, 220, 237, .4); }
.segment:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 2px; }
.hub-status { margin: -8px 0 12px; }
.hub-status.error { color: #ff9f9b; }
.hub-section { margin: 0 0 18px; padding: 16px 18px; border: 1px solid rgba(141, 172, 193, .14); border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 34, 52, .62), rgba(8, 22, 36, .42)); display: grid; gap: 10px; }
.hub-section > .item { margin: 0; }
.hub-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; }
.hub-section-head h3 { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 1.04rem; letter-spacing: .01em; }
.hub-section-dot { width: 9px; height: 9px; border-radius: 50%; background: #6d8496; flex: none; align-self: center; }
.hub-hint { color: #8fa7b6; font-size: .8rem; }
.hub-section.is-attention > .hub-section-head h3 { color: #ffd08b; }
.hub-section.is-attention { border-color: rgba(242, 169, 70, .22); background: linear-gradient(180deg, rgba(46, 34, 18, .38), rgba(8, 22, 36, .42)); }
.hub-section.is-attention .hub-section-dot { background: #ffad42; }
.hub-section.is-now { border-color: rgba(73, 209, 125, .2); }
.hub-section.is-now.is-live { border-color: rgba(73, 209, 125, .38); box-shadow: 0 0 0 1px rgba(73, 209, 125, .08), 0 12px 32px -18px rgba(73, 209, 125, .45);
  background: linear-gradient(180deg, rgba(14, 48, 40, .55), rgba(8, 22, 36, .42)); }
.hub-section.is-now .hub-section-dot { background: #5d7a6c; }
.hub-section.is-now.is-live .hub-section-dot { background: #49d17d; box-shadow: 0 0 0 4px rgba(73, 209, 125, .18); animation: hub-pulse 1.6s ease-in-out infinite; }
.hub-section.is-queue .hub-section-dot { background: #6fdced; }
.hub-section.is-recent { background: rgba(8, 22, 36, .32); }
.hub-section-toggle { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; cursor: pointer; text-align: left; }
.hub-section-toggle::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .7; transition: transform .18s ease; }
.hub-section-toggle[aria-expanded="false"]::after { transform: rotate(-45deg); }
.hub-section-toggle:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 4px; border-radius: 6px; }
.hub-section-body { display: grid; gap: 10px; }
.hub-section-body[hidden], .hub-section-sum[hidden] { display: none; }
.hub-section-sum { display: grid; gap: 8px; cursor: pointer; }
.hub-sum-line, .hub-sum-last { margin: 0; color: #bcd0dc; font-size: .9rem; overflow-wrap: anywhere; }
.hub-sum-last { color: #8fa7b6; font-size: .84rem; }
.hub-sum-count.is-good { color: #7fd3c2; }
.hub-sum-count.is-error { color: #ff9f9b; }
.hub-sum-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hub-sum-chips li { max-width: 100%; padding: 4px 10px; border: 1px solid rgba(242, 169, 70, .26); border-radius: 999px; background: rgba(242, 169, 70, .08);
  color: #f0dcbc; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-sum-chips li.is-more { border-style: dashed; color: #a9becb; background: none; }
@media (prefers-reduced-motion: reduce) { .hub-section-toggle::after { transition: none; } }
.hub-empty, .hub-quiet { margin: 4px 0; color: #8fa7b6; font-size: .9rem; }
.hub-error { color: #ff9f9b; }
.hub-notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid rgba(242, 169, 70, .36); border-radius: 10px; background: rgba(190, 124, 32, .12); color: #ffd08b; }
.hub-run { display: grid; gap: 10px; }
.hub-run > .button { justify-self: start; }
.hub-needs { border-color: rgba(242, 169, 70, .4); }
.hub-proposal { border-color: rgba(242, 169, 70, .28); }
.hub-proposal-count { margin: 0; color: #a9becb; font-size: .86rem; }
.hub-proposal-details > summary { cursor: pointer; color: #bdf4ff; font-size: .88rem; }
.hub-proposal-details[open] { display: grid; gap: 6px; }
.hub-proposal-details .help { margin: 0; overflow-wrap: anywhere; }
.hub-proposal-order { margin: 0; padding: 10px 12px; border-left: 3px solid rgba(111, 220, 237, .5); background: rgba(8, 26, 42, .6);
  color: #dce9f3; font-size: .86rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-proposal-note { margin: 0; }
.hub-proposal-list { margin: 0; padding-left: 20px; color: #dce9f3; font-size: .9rem; display: grid; gap: 2px; overflow-wrap: anywhere; }
.hub-proposal-hint { margin: 0; font-size: .8rem; }
.hub-proposal-note:empty { display: none; }
.hub-proposal { gap: 12px; }
.hub-proposal-details { display: grid; gap: 8px; }
.hub-proposal-details > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.hub-proposal-details > summary::-webkit-details-marker { display: none; }
.hub-task-edit { width: 100%; box-sizing: border-box; min-height: 180px; resize: vertical; padding: 12px 14px; border: 1px solid rgba(111, 220, 237, .26);
  border-radius: 12px; background: rgba(5, 18, 30, .75); color: #dce9f3; font: .86rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hub-task-edit:focus { outline: none; border-color: rgba(111, 220, 237, .7); box-shadow: 0 0 0 3px rgba(111, 220, 237, .16); }
.hub-edit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hub-edit-count { margin-left: auto; color: #8fa7b6; font-size: .78rem; font-variant-numeric: tabular-nums; }
.hub-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; box-sizing: border-box; max-width: 100%; padding: 12px 14px; border: 1px solid rgba(141, 172, 193, .14);
  border-radius: 14px; background: rgba(5, 18, 30, .45); }
/* switches: one size for all, the state readable without colour (knob position) */
.hub-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 32px; margin: 0; max-width: 100%; font-weight: 600; color: #dce9f3; font-size: .88rem;
  cursor: pointer; user-select: none; }
.hub-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.hub-switch-track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: rgba(141, 172, 193, .28);
  box-shadow: inset 0 0 0 1px rgba(141, 172, 193, .3); transition: background .18s ease, box-shadow .18s ease; }
.hub-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #dce9f3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.hub-switch input:checked + .hub-switch-track { background: #2fb6d2; box-shadow: inset 0 0 0 1px rgba(111, 220, 237, .6); }
.hub-switch input:checked + .hub-switch-track::after { transform: translateX(16px); background: #fff; }
.hub-switch input:focus-visible + .hub-switch-track { outline: 2px solid #8fe4f5; outline-offset: 2px; }
.hub-switch:hover .hub-switch-track { box-shadow: inset 0 0 0 1px rgba(111, 220, 237, .55); }
.hub-switch-label { line-height: 1.3; }
/* "Bei Unklarheiten": two segments */
.hub-ask { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; color: #8fa7b6; font-size: .84rem; }
.hub-segment { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(141, 172, 193, .14); box-shadow: inset 0 0 0 1px rgba(141, 172, 193, .2); }
.hub-segment-item { position: relative; display: block; margin: 0; cursor: pointer; }
.hub-segment-item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.hub-segment-item span { display: inline-flex; align-items: center; min-height: 26px; padding: 0 14px; border-radius: 999px; color: #a9becb;
  font-size: .84rem; font-weight: 600; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.hub-segment-item input:checked + span { background: #2fb6d2; color: #04141f; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.hub-segment-item input:focus-visible + span { outline: 2px solid #8fe4f5; outline-offset: 1px; }
.hub-segment-item:hover input:not(:checked) + span { color: #e9fbff; }
@media (prefers-reduced-motion: reduce) { .hub-switch-track, .hub-switch-track::after, .hub-segment-item span { transition: none; } }
/* the fold arrow sits at the far right of the panel */
.hub-section.is-foldable > .hub-section-head { position: relative; padding-right: 34px; box-sizing: border-box; }
.hub-section > *, .hub-section-body > * { min-width: 0; }
.hub-section { grid-template-columns: minmax(0, 1fr); }
.hub-section-body { grid-template-columns: minmax(0, 1fr); }
.hub-run { grid-template-columns: minmax(0, 1fr); }
.hub-run > * { min-width: 0; }
.hub-section.is-foldable .hub-section-toggle::after { position: absolute; right: 6px; top: 50%; margin: -6px 0 0; }
.hub-section.is-foldable .hub-section-toggle::before { content: ""; position: absolute; inset: -6px 0; }
.hub-proposal.is-picked { border-color: rgba(111, 220, 237, .55); box-shadow: 0 0 0 1px rgba(111, 220, 237, .25) inset; }
.hub-pick { margin: 0; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: #a9becb; font-size: .84rem; cursor: pointer; white-space: nowrap; }
.hub-pick input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: none; width: 18px; height: 18px; margin: 0;
  border-radius: 6px; background: rgba(141, 172, 193, .14); box-shadow: inset 0 0 0 1.5px rgba(141, 172, 193, .55); cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease; }
.hub-pick input::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border-right: 2px solid #04141f; border-bottom: 2px solid #04141f;
  transform: rotate(45deg) scale(0); transition: transform .15s ease; }
.hub-pick input:checked { background: #2fb6d2; box-shadow: inset 0 0 0 1.5px #6fdced; }
.hub-pick input:checked::after { transform: rotate(45deg) scale(1); }
.hub-pick input:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 2px; }
.hub-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.hub-bulk-account { display: inline-flex; align-items: center; gap: 6px; color: #a9becb; font-size: .86rem; }
.hub-bulk-account select { min-width: 0; max-width: 260px; }
.hub-bulk-note { margin: 0 0 10px; }
.hub-bulk-note:empty { display: none; }
.hub-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hub-queue-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid rgba(111, 220, 237, .2); border-radius: 10px; background: rgba(8, 26, 42, .45); }
.hub-queue-row.is-stuck { border-color: rgba(255, 159, 155, .45); }
.hub-queue-place { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(111, 220, 237, .14);
  color: #bdf4ff; font-weight: 600; font-variant-numeric: tabular-nums; }
.hub-queue-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.hub-queue-stuck { color: #ff9f9b; font-size: .84rem; }
.hub-queue-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#hub-queue-note:empty { display: none; }
@media (max-width: 640px) {
  .hub-queue-row { grid-template-columns: auto minmax(0, 1fr); }
  .hub-queue-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.hub-run-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hub-run-title { min-width: 0; display: grid; gap: 2px; }
.hub-run-title h4 { margin: 0; font-size: 1rem; }
.hub-task { color: #a9becb; font-size: .86rem; overflow-wrap: anywhere; }
.hub-run-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; color: #8fa7b6; font-size: .84rem; }
.hub-elapsed { color: #dce9f3; font-variant-numeric: tabular-nums; font-weight: 700; }
.hub-doing { color: #bdf4ff; }
.hub-question { margin: 0; padding: 10px 12px; border-left: 3px solid #ffad42; background: rgba(190, 124, 32, .08); color: #e6d4b8; overflow-wrap: anywhere; }
.hub-steps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hub-step { display: grid; grid-template-columns: 138px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(8, 26, 42, .6); border: 1px solid rgba(141, 172, 193, .16); }
.hub-step-state { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 750; color: #afc1ce; }
.hub-step-icon { display: inline-block; width: 1.1em; text-align: center; }
.hub-step.is-running .hub-step-state { color: #8fe4b0; }
.hub-step.is-running .hub-step-icon { animation: hub-pulse 1.4s ease-in-out infinite; }
.hub-step.is-done .hub-step-state { color: #7fd3c2; }
.hub-step.is-failed .hub-step-state { color: #ff9f9b; }
.hub-step.is-cancelled { opacity: .72; }
.hub-step-name { min-width: 0; display: grid; gap: 1px; }
.hub-step-name strong { font-size: .92rem; }
.hub-step-name span { color: #8fa7b6; font-size: .8rem; overflow-wrap: anywhere; }
.hub-step-numbers { color: #8fa7b6; font-size: .78rem; text-align: right; font-variant-numeric: tabular-nums; }
.hub-recent { border: 1px solid rgba(141, 172, 193, .16); border-radius: 10px; background: rgba(8, 26, 42, .45); }
.hub-recent + .hub-recent { margin-top: 6px; }
.hub-recent[open] { border-color: rgba(111, 220, 237, .3); }
.hub-recent-summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; list-style: none; }
.hub-recent-summary::-webkit-details-marker { display: none; }
.hub-recent-summary:focus-visible { outline: 2px solid #8fe4f5; outline-offset: -2px; border-radius: 10px; }
.hub-recent-state { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 750; color: #7fd3c2; }
.hub-recent-state.is-error { color: #ff9f9b; }
.hub-recent-state.is-question { color: #ffd08b; }
.hub-recent-text { min-width: 0; display: grid; gap: 1px; }
.hub-recent-text span { color: #8fa7b6; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-recent-numbers { color: #8fa7b6; font-size: .78rem; text-align: right; font-variant-numeric: tabular-nums; }
.hub-recent-body { display: grid; gap: 12px; padding: 4px 12px 14px; }
.hub-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: .86rem; }
.hub-facts dt { color: #8fa7b6; }
.hub-facts dd { margin: 0; color: #dce9f3; overflow-wrap: anywhere; }
.hub-bars { display: grid; gap: 5px; }
.hub-bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; align-items: center; gap: 10px; font-size: .8rem; }
.hub-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bcd0dc; }
.hub-bar-track { position: relative; height: 14px; border-radius: 7px; background: rgba(141, 172, 193, .12); }
.hub-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; background: #49b8d6; }
.hub-bar-row.is-running .hub-bar { background: #49d17d; }
.hub-bar-row.is-failed .hub-bar { background: #ff625f; }
.hub-bar-row.is-cancelled .hub-bar { background: #8296a6; }
.hub-bar-time { color: #8fa7b6; text-align: right; font-variant-numeric: tabular-nums; }
.hub-summary summary { cursor: pointer; color: #afc1ce; }
.hub-summary p { margin: 8px 0 0; color: #bcd0dc; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes hub-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hub-step.is-running .hub-step-icon, .hub-section.is-now.is-live .hub-section-dot { animation: none; } }
@media (max-width: 720px) {
  .hub-section { padding: 12px; border-radius: 14px; }
  .hub-edit-count { margin-left: 0; width: 100%; }
  .hub-options { flex-direction: column; align-items: stretch; gap: 10px; }
  .hub-ask { margin-left: 0; flex-wrap: wrap; }
  .hub-segment { width: 100%; }
  .hub-segment-item { flex: 1; }
  .hub-ask { flex-direction: column; align-items: stretch; gap: 6px; }
  .hub-segment-item { min-width: 0; }
  .hub-segment-item span { justify-content: center; width: 100%; box-sizing: border-box; padding: 4px 8px; white-space: normal; text-align: center; line-height: 1.2; }
  .segments { display: flex; width: 100%; }
  .segment { flex: 1; }
  .hub-run-head { flex-direction: column; }
  .hub-step { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hub-step-numbers { text-align: left; }
  .hub-recent-summary { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .hub-recent-numbers { text-align: left; }
  .hub-bar-row { grid-template-columns: 90px minmax(0, 1fr) 56px; }
}

/* ---- Agentenzentrale: Agenten (agents.js) and ratings ------------------------------------- */
.agents-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.agents-controls select { min-height: 40px; }
.agents-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 0 0 22px; }
.agents-tile { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid rgba(141, 172, 193, .18); border-radius: 12px; background: rgba(8, 26, 42, .55); }
.agents-tile-label { color: #8fa7b6; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.agents-tile-value { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.agents-tile-detail { color: #8fa7b6; font-size: .78rem; }
.agents-section { margin: 0 0 22px; }
.agents-chart { width: 100%; max-width: 760px; height: auto; display: block; border: 1px solid rgba(141, 172, 193, .16); border-radius: 12px; background: rgba(8, 26, 42, .45); }
.agents-zone { fill: rgba(73, 209, 125, .1); stroke: rgba(73, 209, 125, .35); stroke-dasharray: 4 4; }
.agents-zone-label { fill: #7fd3a0; font-size: 11px; }
.agents-grid { stroke: rgba(141, 172, 193, .14); }
.agents-axis { fill: #8fa7b6; font-size: 11px; }
.agents-axis-title { fill: #a9becb; font-size: 12px; }
.agents-point circle { fill: rgba(73, 184, 214, .55); stroke: #8fe4f5; stroke-width: 1.5; }
.agents-point:hover circle, .agents-point:focus circle { fill: rgba(73, 184, 214, .85); }
.agents-point-label { fill: #dce9f3; font-size: 11px; }
.agents-table-wrap { overflow-x: auto; border: 1px solid rgba(141, 172, 193, .16); border-radius: 12px; }
.agents-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.agents-table th, .agents-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid rgba(141, 172, 193, .1); font-variant-numeric: tabular-nums; }
.agents-table tbody tr:last-child > * { border-bottom: 0; }
.agents-table thead th { background: rgba(8, 26, 42, .7); }
.agents-table tbody th { font-weight: 700; color: #e9fbff; }
.agents-sort { padding: 0; border: 0; background: none; color: #afc1ce; font: inherit; font-weight: 750; cursor: pointer; }
.agents-sort:hover { color: #e9fbff; }
.agents-sort:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 3px; border-radius: 4px; }
th[aria-sort="ascending"] .agents-sort::after { content: " ▲"; font-size: .7em; }
th[aria-sort="descending"] .agents-sort::after { content: " ▼"; font-size: .7em; }
.agents-table .is-thin { opacity: .7; }
.agents-muted { color: #8fa7b6; }
.agents-flag { color: #ffd08b; font-weight: 700; }
.hub-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.hub-rate[aria-pressed="true"] { background: #14465f; color: #e9fbff; box-shadow: inset 0 0 0 1px rgba(111, 220, 237, .5); }
.hub-feedback select { min-height: 36px; }
.hub-feedback-note { color: #8fa7b6; font-size: .8rem; }
@media (max-width: 720px) { .agents-controls { width: 100%; } .agents-controls select { flex: 1; } }
.agents-open { padding: 0; border: 0; background: none; color: #e9fbff; font: inherit; font-weight: 750; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(143, 228, 245, .4); text-underline-offset: 3px; }
.agents-open:hover { text-decoration-color: #8fe4f5; }
.agents-open:focus-visible, .agents-tabs .segment:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 3px; border-radius: 4px; }
.agents-detail { padding: 16px; border: 1px solid rgba(111, 220, 237, .28); border-radius: 14px; background: rgba(8, 26, 42, .6); }
.agents-detail h3:focus { outline: none; }
.agents-tabs { margin: 0 0 12px; }
.agents-tab-panel { display: grid; gap: 12px; }
.agents-text { margin: 0; padding: 12px 14px; max-height: 480px; overflow: auto; border-radius: 10px; background: rgba(2, 10, 18, .7); color: #d6e6f0; font: .82rem/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.agents-pick { white-space: nowrap; }
.agents-radio { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-size: .82rem; color: #afc1ce; cursor: pointer; }
.agents-diff { display: grid; gap: 8px; }
.agents-diff:focus { outline: none; }
.agents-diff-lines { max-height: 480px; overflow: auto; border-radius: 10px; background: rgba(2, 10, 18, .7); font: .8rem/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace; }
.agents-diff-line { padding: 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.agents-diff-line.is-add { background: rgba(73, 209, 125, .14); color: #a8efc4; }
.agents-diff-line.is-del { background: rgba(255, 98, 95, .14); color: #ffb3b0; }
.agents-diff-line.is-hunk { color: #8fa7b6; }
.agents-editor { display: grid; gap: 10px; }
.agents-editor input[type="text"] { max-width: 420px; }
.agents-editor-text { width: 100%; min-height: 260px; padding: 12px 14px; border: 1px solid rgba(141, 172, 193, .3); border-radius: 10px; background: rgba(2, 10, 18, .75); color: #e3f0f7; font: .85rem/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace; resize: vertical; }
.agents-editor-text:focus-visible { outline: 2px solid #8fe4f5; outline-offset: 2px; }
.agents-findings { display: grid; gap: 8px; }
.agents-findings-list { margin: 0; padding: 8px 12px 8px 28px; border-radius: 10px; font-size: .86rem; }
.agents-findings-list.is-error { background: rgba(255, 98, 95, .12); color: #ffb3b0; }
.agents-findings-list.is-warning { background: rgba(190, 124, 32, .13); color: #ffd08b; }
.agents-findings-list.is-hint { background: rgba(73, 184, 214, .1); color: #a9e3f2; }

/* ---- Workflows (workflow.js, hub.js) ------------------------------------------------------- */
.hub-flow { display: grid; gap: 8px; }
.hub-flow-head { margin: 0; color: #bcd0dc; font-size: .88rem; }
.hub-flow-head strong { color: #e9fbff; }
.hub-step.is-flow-running .hub-step-state { color: #8fe4b0; }
.hub-step.is-flow-running .hub-step-icon { animation: hub-pulse 1.4s ease-in-out infinite; }
.hub-step.is-flow-done .hub-step-state { color: #7fd3c2; }
.hub-step.is-flow-failed .hub-step-state { color: #ff9f9b; }
.hub-step.is-flow-skipped, .hub-step.is-flow-planned { opacity: .8; }
.hub-step.is-flow-unreported .hub-step-state { color: #ffd08b; }
#code-workflow-hint.error { color: #ff9f9b; }
.agents-flow-list, .agents-skill-list, .agents-hint-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.agents-skill-list li, .agents-hint-list li { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); overflow-wrap: anywhere; }
.agents-skill-list li.is-stale { border-left: 3px solid #ffd08b; }
.agents-skill-list .hub-notice { margin-top: 6px; }
.agents-draft { display: grid; gap: 6px; margin-bottom: 10px; }
.agents-draft-text { width: 100%; box-sizing: border-box; }

.hub-progress { list-style: none; padding: 0; color: #bdf4ff; overflow-wrap: anywhere; }
.hub-progress time { font-variant-numeric: tabular-nums; }

/* Account quotas in Settings. Keep management controls behind each card's editor. */
.account-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.account-summary-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid rgba(126, 175, 199, .22); border-radius: 12px; background: rgba(13, 28, 45, .4); }
.account-summary-item strong { font-size: 1.6rem; color: #dceef8; }
.account-summary-item span { font-size: .8rem; color: #a5bdcf; }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.account-card > strong { display: block; overflow-wrap: anywhere; margin-bottom: 6px; }
.account-usage { margin-top: 16px; padding: 14px; border: 1px solid rgba(126, 175, 199, .2); border-radius: 12px; background: rgba(7, 19, 33, .4); }
.account-usage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.account-state { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 650; border-radius: 20px; padding: 5px 9px; background: rgba(135, 158, 180, .13); color: #b5c8d8; }
.account-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.account-state.ready { color: #8de3b8; background: rgba(66, 184, 124, .14); }
.account-state.limited { color: #ffb9a4; background: rgba(230, 102, 69, .15); }
.account-state.stale { color: #efcd91; background: rgba(201, 157, 71, .13); }
.account-quota + .account-quota { margin-top: 18px; }
.account-quota-label, .account-quota-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.account-quota-label { font-size: .82rem; color: #c7dbe9; margin-bottom: 8px; }
.account-quota-label span { color: #a7bccd; }
.account-quota-foot { color: #9fb8ca; font-size: .75rem; margin-top: 5px; }
.account-quota-bar { display: block; width: 100%; height: 8px; border: 0; border-radius: 6px; overflow: hidden; appearance: none; background: #263d51; accent-color: #72d9bb; }
.account-quota-bar::-webkit-progress-bar { background: #263d51; border-radius: 6px; }
.account-quota-bar::-webkit-progress-value { background: #72d9bb; border-radius: 6px; }
.account-quota-bar::-moz-progress-bar { background: #72d9bb; border-radius: 6px; }
.account-quota-bar.warning { accent-color: #e8bc71; }
.account-quota-bar.warning::-webkit-progress-value { background: #e8bc71; }
.account-quota-bar.warning::-moz-progress-bar { background: #e8bc71; }
.account-quota-bar.limited { accent-color: #f1a287; }
.account-quota-bar.limited::-webkit-progress-value { background: #f1a287; }
.account-quota-bar.limited::-moz-progress-bar { background: #f1a287; }
.account-quota-bar.stale { opacity: .5; }
.account-usage-updated { color: #91aabd; font-size: .72rem; margin: 14px 0 0; }
.account-usage-hint { font-size: .82rem; margin: 8px 0; }
.account-editor { margin-top: 16px; }
.account-editor > summary, .account-add > summary { cursor: pointer; color: #aed6e9; font-size: .88rem; }
.account-editor .device-form { margin-top: 10px; padding-top: 10px; }
.account-card .item-actions { gap: 6px; }
.account-card .item-actions .button { font-size: .75rem; padding: 7px 10px; }
.account-add { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(126, 175, 199, .22); }
@media (max-width: 600px) {
  .account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-usage { padding: 11px; }
}

/* Session controls belong only to the settings panel. */
#connection-settings { margin-bottom: 18px; }
.settings-connection-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.settings-connection-controls .status { margin: 0; }

/* The K stays still; light, ring rhythm and a pause mark communicate the state. */
#voice-panel .voice-stage { --orb-light: 80 137 193; --orb-image: saturate(1.05) brightness(.84); }
#voice-panel .voice-orb { position: relative; animation: none; transform: none; filter: none; opacity: 1; border-color: rgb(var(--orb-light) / .6); box-shadow: inset 0 0 24px rgb(var(--orb-light) / .12), 0 0 26px rgb(var(--orb-light) / .13); transition: opacity .6s ease, border-color .5s ease, box-shadow .5s ease; }
#voice-panel .voice-orb img { filter: var(--orb-image); transition: filter .6s ease; }
#voice-panel .voice-orb-ring { border-color: rgb(var(--orb-light) / .35); pointer-events: none; transform-origin: center; }
#voice-panel .voice-orb-ring.outer { border-style: solid; animation: none; opacity: .38; box-shadow: none; }
#voice-panel .voice-orb-ring.inner { animation: none; opacity: .5; box-shadow: 0 0 16px rgb(var(--orb-light) / .1); }
#voice-panel .voice-stage[data-orb-state="idle"] .voice-orb { opacity: .35; box-shadow: none; }
#voice-panel .voice-stage[data-orb-state="idle"] .voice-orb-ring.outer { opacity: .12; }
#voice-panel .voice-stage[data-orb-state="idle"] .voice-orb-ring.inner { opacity: .18; box-shadow: none; }
#voice-panel .voice-orb-ring.outer::after { content: ""; position: absolute; inset: -2px; border: 3px solid transparent; border-top-color: rgb(var(--orb-light) / .95); border-right-color: rgb(var(--orb-light) / .3); border-radius: 50%; opacity: 0; }
#voice-panel .voice-orb::after { content: ""; position: absolute; z-index: 2; bottom: 12%; left: calc(50% - 7px); width: 14px; height: 13px; border-radius: 2px; background: linear-gradient(to right, #b4d5eb 0 30%, transparent 30% 70%, #b4d5eb 70%); filter: drop-shadow(0 0 5px #426683); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
#voice-panel .voice-stage[data-orb-state="listening"] { --orb-light: 103 186 220; --orb-image: saturate(.92) brightness(1); }
#voice-panel .voice-stage[data-orb-state="listening"] .voice-orb { box-shadow: inset 0 0 30px rgb(var(--orb-light) / .15), 0 0 34px rgb(var(--orb-light) / .3); }
#voice-panel .voice-stage[data-orb-state="listening"] .voice-orb-ring.outer { animation: tarvi-orb-listen 3s ease-out infinite; }
#voice-panel .voice-stage[data-orb-state="listening"] .voice-orb-ring.inner { opacity: .75; animation: tarvi-orb-listen-inner 3s ease-in-out infinite; }
#voice-panel .voice-stage[data-orb-state="speaking"] { --orb-light: 113 192 240; --orb-image: saturate(1.08) brightness(1.04); }
#voice-panel .voice-stage[data-orb-state="speaking"] .voice-orb { box-shadow: inset 0 0 38px rgb(var(--orb-light) / .3), 0 0 48px rgb(var(--orb-light) / .5), 0 0 95px rgb(var(--orb-light) / .2); }
#voice-panel .voice-stage[data-orb-state="speaking"] .voice-orb-ring.outer { opacity: .7; animation: tarvi-orb-soft-pulse 1.8s ease-in-out infinite; }
#voice-panel .voice-stage[data-orb-state="speaking"] .voice-orb-ring.outer::after { opacity: 0; }
#voice-panel .voice-stage[data-orb-state="speaking"] .voice-orb-ring.inner { opacity: .85; animation: tarvi-orb-speak 1.8s ease-in-out infinite; }
#voice-panel .voice-stage:is([data-orb-state="thinking"], [data-orb-state="connecting"], [data-orb-state="ending"]) { --orb-light: 117 164 213; --orb-image: saturate(.95) brightness(.93); }
#voice-panel .voice-stage:is([data-orb-state="thinking"], [data-orb-state="connecting"]) .voice-orb-ring.outer { opacity: .65; animation: tarvi-orb-soft-pulse 4s ease-in-out infinite; }
#voice-panel .voice-stage:is([data-orb-state="thinking"], [data-orb-state="connecting"]) .voice-orb-ring.outer::after { opacity: 0; }
#voice-panel .voice-stage[data-orb-state="ending"] .voice-orb-ring.inner { animation: tarvi-orb-listen-inner 2s ease-in-out infinite; }
#voice-panel .voice-stage[data-orb-state="muted"] { --orb-light: 137 164 190; --orb-image: saturate(.75) brightness(.87); }
#voice-panel .voice-stage[data-orb-state="muted"] .voice-orb-ring.inner { border-style: dashed; opacity: .7; }
#voice-panel .voice-stage:is([data-orb-state="muted"], [data-mic-muted="true"]) .voice-orb::after { opacity: 1; }
#voice-panel .voice-stage[data-orb-state="error"] { --orb-light: 154 168 195; --orb-image: saturate(.8) brightness(.88); }
#voice-panel .voice-stage[data-orb-state="error"] .voice-orb-ring.inner { border-style: dashed; opacity: .85; }
@keyframes tarvi-orb-listen { 0% { transform: scale(.97); opacity: .75; } 100% { transform: scale(1.12); opacity: .08; } }
@keyframes tarvi-orb-listen-inner { 0%, 100% { box-shadow: 0 0 12px rgb(var(--orb-light) / .12); } 50% { box-shadow: 0 0 28px rgb(var(--orb-light) / .42); } }
@keyframes tarvi-orb-speak { 0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgb(var(--orb-light) / .2); } 50% { transform: scale(1.03); box-shadow: 0 0 29px rgb(var(--orb-light) / .4); } }
@keyframes tarvi-orb-soft-pulse { 0%, 100% { opacity: .45; box-shadow: 0 0 12px rgb(var(--orb-light) / .1); } 50% { opacity: .8; box-shadow: 0 0 24px rgb(var(--orb-light) / .28); } }
@media (prefers-reduced-motion: reduce) {
  #voice-panel .voice-orb, #voice-panel .voice-orb img, #voice-panel .voice-orb-ring, #voice-panel .voice-orb::after { animation: none !important; transition: none; }
}

/* All views use the same exported orb: no per-view cropping or square frame. */
.personal-settings { margin-bottom: 18px; }
.personal-entry { padding: 14px; border: 1px solid #4d779133; border-radius: 14px; }
.personal-entry[hidden] { display: none; }
.character-section[hidden], .character-editor[hidden], .character-entry-text[hidden], .character-empty[hidden] { display: none; }
#character-panel { max-width: 1000px; margin: 0 auto; }
.character-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; }
.character-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 4px 0 8px; }
.character-header .help { margin: 0; }
.character-header > button { flex-shrink: 0; }
.character-nav { display: flex; gap: 8px; padding: 6px; border: 1px solid #53819e33; border-radius: 16px; background: #0e243c66; }
.character-nav button { flex: 1; border-radius: 11px; white-space: nowrap; }
.character-nav span { display: inline-block; padding: 1px 7px; margin-left: 4px; border-radius: 20px; background: #78b8df1f; font-size: .75rem; font-variant-numeric: tabular-nums; }
#character-panel .personal-settings > input, #character-panel .personal-settings > select { width: 100%; box-sizing: border-box; margin: 6px 0 14px; }
#character-panel .item-list { display: grid; gap: 10px; max-height: 58vh; max-height: 58dvh; overflow-y: auto; padding: 4px; margin: 14px 0; scrollbar-width: thin; }
#character-panel .personal-entry { display: block; padding: 16px; background: #0b203455; }
.character-entry-category { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: #87b8d2; }
.character-entry-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; line-height: 1.6; margin: 9px 0 12px; color: #d9e8f4; }
.character-editor { margin-top: 14px; }
.settings-subnav { margin: 12px 0 22px; }
#settings-general[hidden], #character-panel[hidden], #devices-panel[hidden] { display: none; }
.character-budget { padding: 10px 12px; border: 1px solid #6995b044; border-radius: 10px; background: #28506d22; font-size: .82rem; font-variant-numeric: tabular-nums; color: #b6d6e8; }
.character-counter { margin: 2px 0 10px; color: #8cb1c9; font-size: .78rem; font-variant-numeric: tabular-nums; }
.character-counter.capacity-full { color: #efb78c; }
.character-add { border: 1px dashed #5d97bb66; border-radius: 12px; padding: 14px; margin-top: 18px; }
.character-add > summary { cursor: pointer; color: #a9d8ee; font-weight: 600; }
.character-add[open] > summary { margin-bottom: 16px; }
#character-panel .status:empty { display: none; }
@media (max-width: 560px) {
  .character-header { align-items: flex-start; gap: 10px; }
  .character-header > button { padding: 8px 10px; font-size: .75rem; }
  .character-nav { gap: 3px; padding: 4px; }
  .character-nav button { padding: 10px 6px; font-size: .8rem; }
  .character-nav span { padding: 1px 4px; margin-left: 2px; }
}
.personal-settings textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 80px; font: inherit; line-height: 1.5; }
#speech-speed, .voice-slider { width: 100%; accent-color: #8bdfeb; }
#speech-speed-value, .voice-slider-value { float: right; font-variant-numeric: tabular-nums; }
.agents-voice-field { display: grid; gap: .4rem; margin: .8rem 0; color: var(--text, #dceaf6); }
.agents-voice-field input, .agents-voice-field textarea { width: 100%; box-sizing: border-box; }
.voice-dictation-indicator { position: fixed; z-index: 220; left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .75rem; max-width: calc(100vw - 2rem); padding: .55rem .7rem; border: 1px solid #53708c; border-radius: .8rem; color: #e5f2ff; background: #14283deF; box-shadow: 0 8px 25px #06182766; font-size: .8rem; }
.voice-dictation-indicator[hidden] { display: none; }
.voice-dictation-indicator button { border: 1px solid #6e99bb; border-radius: .5rem; color: inherit; background: #233d55; padding: .25rem .5rem; cursor: pointer; }
.voice-field-marker { z-index: 200; transform: translate(-35%, -45%); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; color: #0c2334; background: #b8e5ff; box-shadow: 0 2px 8px #06182788; font-weight: 700; font-size: .75rem; pointer-events: none; }
.voice-button-marker { position: fixed; z-index: 200; transform: translate(-25%, -35%); display: grid; place-items: center; min-width: 2.8rem; height: 2.8rem; padding: 0 .2rem; border: 2px solid #e9f8ff; border-radius: .85rem; color: #071a2b; background: #b8e5ff; box-shadow: 0 3px 12px #061827aa; font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; pointer-events: none; }
@media (max-width: 600px) { .voice-button-marker { min-width: 3rem; height: 3rem; font-size: 1.45rem; } }
.brand-mark { border-radius: 50%; border: 0; background: transparent; box-shadow: 0 0 16px rgba(75, 159, 220, .22); animation: none; }
.brand-mark img { object-fit: contain; transform: none; }
.login-brand { margin-bottom: 22px; }

/* Reviewed memory summaries keep source comparison close to the draft. */
#memory-proposals-list textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 140px; margin-top: 14px; }
#memory-proposals-list details { border: 1px solid #53819e33; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
#memory-proposals-list details p { white-space: pre-wrap; line-height: 1.55; border-top: 1px solid #53819e22; padding-top: 10px; font-size: .88rem; }
#memory-proposals-list ul { color: #b9cdda; padding-left: 22px; line-height: 1.5; font-size: .88rem; }
#memory-proposals-list .checkbox-row { margin: 14px 0; font-size: .86rem; }
[data-memory-tier] { font-size: .82rem; }
@media (max-width: 560px) { [data-memory-tier] { padding: 9px 6px; font-size: .72rem; } [data-memory-tier] span { padding: 1px 4px; margin-left: 1px; } }

/* The neural volume stays inside the existing fixed Live click target. */
#voice-panel .voice-orb { background: radial-gradient(circle at 45% 38%, #122e49 0%, #0a2037 54%, #06182a 100%); }
#voice-panel .live-neural { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
#voice-panel .voice-stage[data-orb-state="muted"] .live-neural { opacity: .55; }
#voice-panel .voice-stage[data-orb-state="idle"] .voice-orb { background: radial-gradient(circle at 45% 38%, #0b2037, #061427 80%); }

/* A translucent neural lens with a restrained specular reflection. */
#voice-panel .voice-orb { background: radial-gradient(ellipse at 36% 24%, #193a56 0%, #0c263e 32%, #071c32 68%, #041327 100%); }
#voice-panel .voice-orb::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 32% 16%, #c4eaff15 0%, #90c8ed06 25%, transparent 53%); border-top: 1px solid #c5e9ff25; border-left: 1px solid #91c8ec12; }

#voice-panel .live-monogram { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; fill: #d2ebfa; opacity: .32; pointer-events: none; }
#voice-panel .voice-stage[data-orb-state="idle"] .live-monogram { opacity: .4; }

/* Visible only while voice-driven movement is active; independent of the current tab. */
.voice-scroll-stop { position: fixed; z-index: 10000; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); min-height: 44px; padding: 8px 16px; border: 1px solid #60899f; border-radius: 24px; background: #102b3e; color: #e2f2ff; box-shadow: 0 4px 20px #0005; cursor: pointer; }
.voice-scroll-stop[hidden] { display: none; }
.voice-scroll-stop:focus-visible { outline: 2px solid #a6dbff; outline-offset: 3px; }

.voice-scroll-feedback { position: fixed; z-index: 10001; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: min(380px, calc(100vw - 36px)); padding: 10px 14px; border-radius: 12px; background: #102b3ef2; color: #e2f2ff; font-size: .85rem; box-shadow: 0 4px 20px #0005; }
.voice-scroll-feedback[hidden] { display: none; }
.voice-zoom-controls { position: fixed; z-index: 10002; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }
.voice-zoom-controls:has(.voice-zoom-stop:not([hidden])) { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 54px); }
.voice-zoom-controls button { min-height: 44px; padding: 8px 14px; border: 1px solid #60899f; border-radius: 24px; background: #102b3e; color: #e2f2ff; box-shadow: 0 4px 20px #0005; }
.voice-zoom-controls button[hidden] { display: none; }
.voice-zoom-controls button:focus-visible { outline: 2px solid #a6dbff; outline-offset: 3px; }
body.tarvi-zoomed { overflow-x: hidden; }

/* Medien (MEDIEN_PLAN.md M1): one embedded player, in the tab or in Tarvi Live */
#media-panel[hidden], #media-panel :is(.media-top, .media-card)[hidden] { display: none; }
.media-player-site iframe.media-site { aspect-ratio: auto; height: 75vh; height: 75dvh; background: #fff; }
#media-quick[hidden], #media-channel-row[hidden] { display: none; }
.media-player-host:empty { display: none; }
.media-player-host { margin: 14px 0; }
.media-player { width: 100%; }
.media-player iframe, .media-player video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; background: #000; object-fit: contain; }
.media-player-bar { justify-content: flex-end; margin-top: 8px; }
.live-item-body .media-player { white-space: normal; }
.media-player.media-player-full { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: center; padding: 0; background: #000; }
.media-player.media-player-full :is(iframe, video) { flex: 1; min-height: 0; aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 0; }
/* Over the video but top right and compact: YouTube's and <video>'s own controls (timeline,
   fullscreen, settings) sit at the bottom edge and stay free; clicks beside the buttons pass through */
.media-player.media-player-full .media-player-bar { position: absolute; top: 0; right: 0; left: auto; bottom: auto; z-index: 1; justify-content: flex-end; margin: 0; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px 8px; background: none; pointer-events: none; }
.media-player.media-player-full .media-player-bar > * { pointer-events: auto; background: rgba(0, 0, 0, .6); }
body.media-full-open, html:has(> body.media-full-open) { overflow: hidden; }
.media-screen-button[hidden] { display: none !important; }
.media-player-full .media-screen-button { font-size: 1.05rem; padding: 10px 18px; }
.media-player:fullscreen { width: 100%; height: 100%; padding: 0; background: #000; }
.media-player:fullscreen :is(iframe, video) { max-height: none; }
/* backdrop-filter/transform make an ancestor the box of position: fixed; lift them while full */
body.media-full-open :has(> * .media-player-full), body.media-full-open :has(> .media-player-full) {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transform: none !important;
  filter: none !important; contain: none !important; animation: none !important; }
.media-description { margin: 0 0 10px; color: #b9cfdf; font-size: .92rem; }
.media-hit h3 { margin: 0 0 4px; overflow-wrap: anywhere; }
.media-hit .help { margin: 0 0 10px; }
.media-player.media-player-full iframe.media-site { height: auto; max-height: none; }
.media-site-origin { margin-right: auto; align-self: center; font-size: .85rem; color: #b9cfdf; overflow-wrap: anywhere; }

/* Medien, M5: a streaming-style surface – picture cards, a featured first hit, live tiles */
#media-panel { --m-bg: #070d16; --m-surface: rgba(255, 255, 255, .045); --m-line: rgba(255, 255, 255, .09);
  --m-text: #f3f6fb; --m-muted: #9aa7b8; --m-hot: #ff4d6d; --m-warm: #ff9a3c; --m-accent: #61d5e8;
  --m-play: linear-gradient(135deg, #ff4d6d, #ff9a3c); }
#media-panel .media-card { max-width: 1180px; margin: 0 auto; padding: 28px 30px 22px; overflow: hidden;
  color: var(--m-text); border-color: rgba(255, 255, 255, .08); border-radius: 24px;
  background: radial-gradient(1200px 380px at 0% -10%, rgba(255, 77, 109, .16), transparent 60%),
              radial-gradient(900px 360px at 100% -20%, rgba(97, 213, 232, .14), transparent 55%),
              linear-gradient(180deg, #0b1422, var(--m-bg) 420px); }
#media-panel .media-card:hover { border-color: rgba(255, 255, 255, .12); box-shadow: 0 18px 45px rgba(0, 0, 0, .3); }
#media-panel .eyebrow { color: var(--m-warm); }
.media-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.media-heading h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.035em; line-height: 1.1; }
/* view switch: one pill bar */
#media-panel .media-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--m-line); border-radius: 999px; background: rgba(0, 0, 0, .35); }
#media-panel .media-views .button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; color: var(--m-muted); background: transparent; font-size: .86rem; gap: 7px; }
#media-panel .media-views .button:hover { color: var(--m-text); background: rgba(255, 255, 255, .06); }
#media-panel .media-views .button[aria-pressed="true"] { color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.media-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--m-hot); box-shadow: 0 0 0 3px rgba(255, 77, 109, .25); }
/* search: source, query and button in one bar */
#media-panel .media-search { display: flex; align-items: center; gap: 0; padding: 5px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(0, 0, 0, .4); transition: border-color .2s, box-shadow .2s; }
#media-panel .media-search:focus-within { border-color: rgba(255, 154, 60, .6); box-shadow: 0 0 0 4px rgba(255, 154, 60, .12); }
#media-panel .media-search select { width: auto; flex: none; max-width: 40%; padding: 9px 30px 9px 16px; border: 0; border-right: 1px solid var(--m-line); border-radius: 999px 0 0 999px; background-color: transparent; color: var(--m-text); font-weight: 700; }
#media-panel .media-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--m-text); padding: 9px 14px; box-shadow: none; outline: none; }
#media-panel .media-search .button { min-height: 40px; padding: 8px 22px; border: 0; border-radius: 999px; color: #fff; background: var(--m-play); box-shadow: 0 6px 18px rgba(255, 77, 109, .3); }
#media-panel .media-search .button:hover { filter: brightness(1.08); }
.media-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 4px 0; }
.media-filters:not(:has(> :not([hidden]):not(.media-newest))) .media-newest { margin-left: 0; }
#media-panel .media-filters select { width: auto; max-width: 100%; min-height: 34px; padding: 5px 12px; border-radius: 999px; font-size: .85rem; }
#media-panel .media-newest { align-items: center; gap: 8px; color: var(--m-muted); font-size: .86rem; }
#media-panel .media-newest input { margin: 0; accent-color: var(--m-warm); }
.media-quick { display: flex; flex-wrap: wrap; gap: 6px; }
#media-panel .status { margin: 12px 4px 0; color: var(--m-muted); font-size: .86rem; }
#media-panel .status:empty { display: none; }
#media-panel .status.error { color: #ff9f8e; }
#media-panel .media-player-host { margin: 18px 0 6px; }
#media-panel .media-player :is(iframe, video) { border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
/* pills: tools of a view, follow chips, playlists, quick searches, per-card actions */
#media-panel :is(.media-view-tools, .media-list-actions, .media-quick, .media-hit-actions, .media-chip-list) .button.ghost,
#media-panel :is(.media-view-tools, .media-list-actions, .media-hit-actions) .button.secondary {
  min-height: 32px; padding: 4px 14px; border: 1px solid var(--m-line); border-radius: 999px; color: #dbe3ee; background: var(--m-surface); font-size: .8rem; }
#media-panel :is(.media-view-tools, .media-list-actions, .media-quick, .media-hit-actions, .media-chip-list) .button.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
#media-panel :is(.media-view-tools, .media-list-actions, .media-hit-actions) .button.primary {
  min-height: 34px; padding: 5px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--m-play); box-shadow: 0 6px 18px rgba(255, 77, 109, .28); }
.media-view-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0 0; }
.media-view-tools:empty { display: none; }
#media-panel .media-view-tools :is(select, input) { width: auto; min-width: 0; max-width: 100%; min-height: 34px; padding: 5px 14px; border-radius: 999px; font-size: .85rem; }
#media-panel .media-view-tools input { flex: 1 1 180px; max-width: 260px; }
.media-list-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 26px 0 14px; }
.media-list-head:has(#media-list-title[hidden]):has(.media-list-actions:empty) { display: none; }
.media-list-head h3 { margin: 0 8px 0 0; font-size: 1.25rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.media-list-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#media-panel .media-list-actions select { width: auto; max-width: 100%; min-height: 34px; padding: 5px 14px; border-radius: 999px; font-size: .85rem; }
#media-panel .media-list-actions .help { margin: 0; color: var(--m-muted); }
.media-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.media-follow-chip { display: inline-flex; }
#media-panel .media-follow-chip .button:first-child:not(:last-child) { border-radius: 999px 0 0 999px; }
#media-panel .media-follow-chip .button:last-child:not(:first-child) { border-left: 0; border-radius: 0 999px 999px 0; padding-inline: 10px; color: var(--m-muted); }
/* the grid of picture cards */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 26px 18px; }
.media-grid:empty { display: none; }
.media-hit { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.media-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; border-radius: 14px; color: #fff; text-align: left;
  background: linear-gradient(135deg, var(--art-from, #1b2a44), var(--art-to, #3c5a8a)); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease; }
.media-thumb-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; color: rgba(255, 255, 255, .28); text-align: center; overflow-wrap: anywhere; transition: opacity .3s; }
.media-thumb-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease, transform .5s ease; }
.media-thumb.has-image .media-thumb-image { opacity: 1; }
.media-thumb.has-image .media-thumb-art { opacity: 0; }
.media-thumb-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 35%, transparent 60%, rgba(0, 0, 0, .55)); }
.media-badge { position: absolute; z-index: 2; padding: 2px 8px; border-radius: 7px; font-size: .74rem; font-weight: 800; line-height: 1.5; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.media-badge-number { top: 8px; left: 8px; min-width: 26px; text-align: center; }
.media-badge-time { right: 8px; bottom: 8px; font-weight: 700; }
.media-thumb-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: var(--m-play); box-shadow: 0 8px 26px rgba(255, 77, 109, .5); opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .2s, transform .2s; }
.media-thumb-play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.media-thumb:hover, .media-thumb:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 154, 60, .55); }
.media-thumb:hover .media-thumb-image, .media-thumb:focus-visible .media-thumb-image { transform: scale(1.05); }
.media-thumb:hover .media-thumb-play, .media-thumb:focus-visible .media-thumb-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .media-thumb-play { opacity: .92; transform: translate(-50%, -50%) scale(.85); } }
.media-hit-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 0 2px; }
.media-kicker { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0; font-size: .76rem; color: var(--m-muted); }
.media-kicker-channel { color: var(--m-warm); font-weight: 800; letter-spacing: .02em; }
.media-hit-title { margin: 0; font-size: .98rem; line-height: 1.35; font-weight: 750; color: var(--m-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#media-panel .media-description { margin: 0; color: var(--m-muted); font-size: .84rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-hit-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#media-panel .media-hit:not(.media-hit-featured) .media-hit-actions { gap: 2px; margin: 0 0 0 -8px; }
#media-panel .media-hit:not(.media-hit-featured) .media-hit-actions .button.ghost { min-height: 28px; padding: 2px 8px; border-color: transparent; background: transparent; color: var(--m-muted); font-size: .76rem; }
#media-panel .media-hit:not(.media-hit-featured) .media-hit-actions .button.ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); }
/* featured first hit: big picture, text beside it */
.media-hit-featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: center; gap: 18px 30px;
  padding: 14px; border: 1px solid var(--m-line); border-radius: 22px; background: linear-gradient(120deg, rgba(255, 77, 109, .1), rgba(97, 213, 232, .06)); }
.media-hit-featured .media-thumb { border-radius: 16px; }
.media-hit-featured .media-thumb-play { width: 74px; height: 74px; opacity: .95; transform: translate(-50%, -50%) scale(1); }
.media-hit-featured .media-thumb-play::after { left: 29px; top: 22px; border-width: 15px 0 15px 23px; }
.media-hit-featured .media-thumb-art { font-size: clamp(1.6rem, 5vw, 3.2rem); }
.media-hit-featured .media-hit-body { gap: 10px; padding-right: 10px; }
.media-hit-featured .media-hit-title { font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; -webkit-line-clamp: 3; }
.media-hit-featured .media-kicker { font-size: .82rem; }
#media-panel .media-hit-featured .media-description { font-size: .92rem; -webkit-line-clamp: 4; }
.media-hit-featured .media-hit-actions { margin-top: 8px; }
/* live TV tiles */
.media-tv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 6px; }
.media-tv-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; aspect-ratio: 16 / 9; padding: 10px 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; color: #fff; text-align: left;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(135deg, var(--tile-from), var(--tile-to));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: transform .2s, box-shadow .2s; }
.media-tv-tile:hover, .media-tv-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 0 2px rgba(255, 255, 255, .5); }
.media-tv-live { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(0, 0, 0, .45); font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.media-tv-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--m-hot); box-shadow: 0 0 0 3px rgba(255, 77, 109, .35); }
.media-tv-name { max-width: 100%; font-size: clamp(.98rem, 1.6vw, 1.2rem); font-weight: 900; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); overflow-wrap: break-word; line-height: 1.1; }
#media-panel .media-footnote { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--m-line); color: #6f7c8e; font-size: .78rem; }
@media (max-width: 760px) {
  #media-panel .media-card { padding: 20px 14px 16px; border-radius: 18px; }
  .media-top { align-items: stretch; }
  #media-panel .media-views { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  #media-panel .media-views .button { min-width: 0; padding: 6px 2px; font-size: .76rem; gap: 4px; }
  #media-panel .media-search select { width: 7.4em; max-width: none; padding: 8px 4px 8px 12px; font-size: .85rem; }
  #media-panel .media-search input { padding-inline: 10px; }
  #media-panel .media-search .button { padding-inline: 14px; }
  .media-grid { grid-template-columns: 1fr; gap: 22px; }
  .media-hit-featured { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
  .media-hit-featured .media-hit-body { padding: 0 4px 4px; }
  .media-tv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1000px) { .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .media-thumb, .media-thumb-image, .media-thumb-play, .media-tv-tile { transition: none; }
  .media-thumb:hover .media-thumb-image { transform: none; }
}

/* Workflows: compact overview, gallery without inner scrolling on large screens, the list
   uses the full width while nothing is open; same pill/card language as "Medien" */
#workflows-panel { --w-line: rgba(255, 255, 255, .09); --w-muted: #9aa7b8; --w-accent: #61d5e8; --w-warm: #ff9a3c; }
#workflows-panel > p:not(.status) { max-width: 760px; color: #b4c3d1; }
#workflows-panel .wf-overview { gap: 12px; margin: 18px 0; }
#workflows-panel .wf-overview > div { position: relative; flex-direction: row; align-items: baseline; gap: 10px; padding: 14px 18px; overflow: hidden; border-color: var(--w-line); border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); }
#workflows-panel .wf-overview > div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tile, var(--w-accent)); }
#workflows-panel .wf-overview > div:nth-child(2) { --tile: #52d39a; }
#workflows-panel .wf-overview > div:nth-child(3) { --tile: #b39dff; }
#workflows-panel .wf-overview > div:nth-child(4) { --tile: var(--w-warm); }
#workflows-panel .wf-overview strong { font-size: 1.6rem; line-height: 1; letter-spacing: -.03em; }
#workflows-panel .wf-overview span { color: var(--w-muted); font-size: .88rem; }
/* collapsible sections: slim header rows */
#workflows-panel details.card { padding: 0; border-radius: 18px; }
#workflows-panel details.card > summary { display: flex; align-items: center; gap: 10px; padding: 16px 22px; list-style: none; font-size: 1rem; font-weight: 750; border: 0; }
#workflows-panel details.card > summary::-webkit-details-marker { display: none; }
#workflows-panel details.card > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border: solid var(--w-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
#workflows-panel details.card[open] > summary::after { transform: rotate(-135deg); }
#workflows-panel details.card[open] > summary { border-bottom: 1px solid var(--w-line); }
#workflows-panel details.card > :not(summary) { margin: 16px 22px 20px; }
#workflows-panel details.card > h2 { margin-bottom: 8px; font-size: 1rem; }
#workflows-panel > .card, #workflows-panel > details.card { margin-top: 12px; }
/* template gallery */
#workflows-panel .wf-template-gallery { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
@media (min-width: 761px) { #workflows-panel .wf-template-gallery { max-height: none; overflow: visible; } }
#workflows-panel .wf-template-card { position: relative; gap: 6px; padding: 16px 16px 14px; border-color: var(--w-line); border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, rgba(97, 213, 232, .07), rgba(255, 255, 255, .02) 55%); transition: transform .2s, border-color .2s, box-shadow .2s; }
#workflows-panel .wf-template-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--w-accent), var(--w-warm)); opacity: .7; }
#workflows-panel .wf-template-card:hover { transform: translateY(-2px); border-color: rgba(97, 213, 232, .35); box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
#workflows-panel .wf-template-card h3 { margin: 0; font-size: .95rem; line-height: 1.3; }
#workflows-panel .wf-template-card p { flex: 0 1 auto; margin: 0 0 6px; color: var(--w-muted); font-size: .82rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#workflows-panel .wf-template-card .button { margin-top: auto; min-height: 30px; padding: 3px 14px; border-radius: 999px; font-size: .78rem; }
#workflows-panel #wf-template-choice { width: auto; max-width: 100%; min-height: 34px; padding: 5px 14px; border-radius: 999px; font-size: .88rem; }
#workflows-panel > .item-actions { align-items: center; margin-top: 12px; }
/* "Meine Workflows": full width with cards while no workflow is open */
#workflows-panel .wf-list-item { border-radius: 12px; }
#workflows-panel .wf-list-item span { align-self: flex-start; padding: 1px 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: .74rem; font-weight: 700; }
#workflows-panel .wf-wizard button { border-radius: 999px; min-height: 40px; }
#workflows-panel .wf-layout fieldset { border-color: var(--w-line); border-radius: 14px; }
@media (min-width: 900px) {
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) { grid-template-columns: 1fr; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) minmax(140px, 190px); column-gap: 12px; align-items: end; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > h2 { grid-row: 1 / 3; align-self: center; margin: 0; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > label[for="wf-search"] { grid-column: 2; grid-row: 1; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > #wf-search { grid-column: 2; grid-row: 2; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > label[for="wf-filter"] { grid-column: 3; grid-row: 1; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > #wf-filter { grid-column: 3; grid-row: 2; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) aside > :is(#wf-list-count, #wf-list) { grid-column: 1 / -1; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) #wf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
  #workflows-panel .wf-layout:not(:has(#wf-editor:not([hidden]), #wf-controls:not([hidden]), #wf-extra-samples:not([hidden]))) #wf-list .wf-list-item { margin: 0; }
}
#workflows-panel :is(#wf-status, #wf-health):empty { display: none; }
#workflows-panel #wf-health { margin: 10px 0 0; font-size: .86rem; }
#workflows-panel > section.card { padding: 18px 22px; border-radius: 18px; }
#workflows-panel > section.card > h2 { margin-bottom: 8px; font-size: 1rem; }
#workflows-panel > section.card > div > p { margin: 0; color: var(--w-muted); }
@media (prefers-reduced-motion: reduce) { #workflows-panel .wf-template-card { transition: none; } }

/* Subtle app-wide polish in the language of "Medien"/"Workflows" (Tarvi Live stays as is):
   pill sub-navigation, pill small buttons, softer cards, clearer input focus */
#workspace .card:not(#media-panel *, #voice-panel *) { border-color: rgba(255, 255, 255, .08); border-radius: 18px; }
#workspace .card:not(#media-panel *, #voice-panel *):hover { border-color: rgba(110, 214, 244, .26); }
#workspace :is(.character-nav, .segments) { gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 999px; background: rgba(0, 0, 0, .3); }
#workspace .character-nav .button, #workspace .segments .segment { min-height: 38px; border: 0; border-radius: 999px; color: #9aa7b8; background: transparent; box-shadow: none; }
#workspace .character-nav .button:hover, #workspace .segments .segment:hover { color: #f3f6fb; background: rgba(255, 255, 255, .06); }
#workspace .character-nav .button[aria-pressed="true"], #workspace .segments .segment[aria-selected="true"] {
  color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
#workspace .mail-folders .button { border-radius: 999px; }
#workspace .button.small:not(#voice-panel *) { border-radius: 999px; }
#workspace :is(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select):not(#voice-panel *) { border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
#workspace :is(input, textarea, select):not(#voice-panel *):focus { box-shadow: 0 0 0 4px rgba(97, 213, 232, .12); }
#workspace .eyebrow:not(#voice-panel *, #media-panel *) { letter-spacing: .14em; }
@media (max-width: 560px) {
  #workspace :is(.character-nav, .segments) { border-radius: 18px; }
  #workspace .character-nav .button, #workspace .segments .segment { min-width: 0; border-radius: 14px; }
  #workspace .character-nav:has(> :nth-child(4)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #workspace .character-nav:has(> :nth-child(4)) .button { white-space: normal; line-height: 1.2; }
}
/* Einstellungen › Allgemein: even gaps between the cards (Verbrauch lives here since 08.10.2026) */
#settings-general > * + * { margin-top: 18px; }
#usage-settings > .usage-grid { margin-top: 18px; }
#usage-settings > .footer-note { margin: 12px 4px 0; }
/* Reiterleiste: alle Bereiche passen auf die Seitenbreite, ohne dass "Einstellungen" abgeschnitten wird */
.tabs-bar { grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; }
.tabs-bar .workspace-brand { font-size: 1.1rem; min-width: 0; }
.tabs-bar .tabs { gap: 0; }
.tabs-bar .tab { padding: 11px 8px; font-size: .88rem; }

/* Mikrofon-Pegel und Hinweis in Tarvi Live */
.live-level { position: relative; width: min(220px, 60%); height: 5px; margin: 8px auto 2px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; --level: 0; }
.live-level span { position: absolute; inset: 0 auto 0 0; width: calc(var(--level) * 100%); border-radius: inherit; background: linear-gradient(90deg, #1b8cff, #7fe3ff); box-shadow: 0 0 10px rgba(42, 168, 255, .8); transition: width .09s linear; }
.live-level[hidden], .live-mic-hint[hidden] { display: none; }
.live-mic-hint { color: #ffd59a !important; text-align: center; max-width: 34ch; }

/* A non-modal draft keeps Live voice controls available. */

/* Tarvi Charakter › Persona: character sliders (PERSONA_PLAN.md P4) */
.persona-sliders { display: grid; gap: .9rem; margin: .5rem 0 1.5rem; }
.persona-sliders h3 { margin: 0; }
.persona-presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.persona-slider-groups { display: grid; gap: 1rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.persona-slider-group { border: 1px solid var(--k-line, rgba(255, 255, 255, .08)); border-radius: 14px; padding: .4rem 1rem .6rem; margin: 0; min-width: 0; }
.persona-slider-group legend { padding: 0 .4rem; color: var(--k-muted, #93a4b5); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.persona-slider { display: grid; gap: .35rem; padding: .7rem 0; }
.persona-slider + .persona-slider { border-top: 1px solid var(--k-line, rgba(255, 255, 255, .06)); }
.persona-slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.persona-slider-head label { font-weight: 600; }
.persona-slider-level { min-width: 2.2em; text-align: center; padding: .05rem .5rem; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--k-accent-ink, #03121c); background: var(--k-accent, #62d2f0); }
.persona-slider input[type=range] { width: 100%; margin: .2rem 0 0; }
.persona-slider-ends { display: flex; justify-content: space-between; color: var(--k-faint, #6b7d8f); font-size: .76rem; }
.persona-slider output { color: var(--k-muted, #93a4b5); font-size: .88rem; line-height: 1.35; }
.persona-converted { display: grid; gap: .4rem; }
.persona-converted-entry { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; color: var(--k-muted, #93a4b5); font-size: .9rem; }
.persona-sample-output { display: grid; gap: .8rem; margin-top: .8rem; }
.persona-sample-item { border-left: 3px solid var(--k-accent, #62d2f0); padding-left: .8rem; }
.persona-sample-question { color: var(--k-muted, #93a4b5); font-size: .85rem; margin: 0 0 .2rem; }
.persona-sample-item p { margin: 0 0 .4rem; }

/* Colours per slider (--p-hue, --p-light set by personal-settings.js): a rainbow band per group, dark to light inside it.
   Two ids plus a class beat the global blue range style in layout-modern.css (its :not(#voice-panel *) counts as an id). */
.persona-slider-group { border-color: hsl(var(--p-hue) 70% 50% / .35); }
.persona-slider-group legend { color: hsl(var(--p-hue) 80% 70%); }
.persona-slider .persona-slider-level { color: #0b0f14; background: hsl(var(--p-hue) 85% var(--p-light)); }
#workspace #persona-slider-groups .persona-slider input[type=range] { --blue-soft: hsl(var(--p-hue) 90% 55% / .5); }
#workspace #persona-slider-groups .persona-slider input[type=range]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, hsl(var(--p-hue) 85% calc(var(--p-light) - 18%)), hsl(var(--p-hue) 85% var(--p-light)) var(--fill),
              rgba(255, 255, 255, .1) var(--fill));
}
#workspace #persona-slider-groups .persona-slider input[type=range]::-moz-range-progress {
  background: linear-gradient(90deg, hsl(var(--p-hue) 85% calc(var(--p-light) - 18%)), hsl(var(--p-hue) 85% var(--p-light)));
}
#workspace #persona-slider-groups .persona-slider input[type=range]::-webkit-slider-thumb {
  border-color: hsl(var(--p-hue) 90% 92%);
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, hsl(var(--p-hue) 90% calc(var(--p-light) + 12%)) 40%, hsl(var(--p-hue) 85% var(--p-light)) 100%);
  box-shadow: 0 0 0 5px hsl(var(--p-hue) 90% 55% / .22), 0 0 22px 4px var(--blue-soft), 0 3px 8px rgba(0, 0, 0, .5);
}
#workspace #persona-slider-groups .persona-slider input[type=range]::-moz-range-thumb {
  border-color: hsl(var(--p-hue) 90% 92%);
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, hsl(var(--p-hue) 90% calc(var(--p-light) + 12%)) 40%, hsl(var(--p-hue) 85% var(--p-light)) 100%);
}

/* Equalizer graph above the sliders */
.persona-eq { border: 1px solid var(--k-line, rgba(255, 255, 255, .08)); border-radius: 16px; padding: .6rem .4rem .2rem;
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, .05), rgba(0, 0, 0, .25)); }
.persona-eq-chart { display: block; width: 100%; height: auto; overflow: visible; }
.persona-eq-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.persona-eq-grid.edge { stroke: rgba(255, 255, 255, .14); }
.persona-eq-line { fill: none; stroke-width: 2.5; stroke-opacity: .9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .18)); }
.persona-eq-area { stroke: none; }
.persona-eq-point { stroke: rgba(11, 15, 20, .6); stroke-width: 1.2; pointer-events: none; transition: r .15s; filter: drop-shadow(0 0 3px currentColor); }
/* Invisible grab area of each point: drag up or down, arrow keys when focused; no page scroll while dragging. */
.persona-eq-hit { fill: transparent; cursor: ns-resize; touch-action: none; outline: none; }
.persona-eq-hit:hover + .persona-eq-point { r: 6; }
.persona-eq-hit:focus-visible + .persona-eq-point, .persona-eq-point.dragging { r: 7; stroke: rgba(255, 255, 255, .9); stroke-width: 1.5; }
.persona-eq-legend { fill: var(--k-muted, #93a4b5); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; text-anchor: middle; }
/* On a phone the graph keeps a readable size and can be swiped sideways. */
@media (max-width: 560px) { .persona-eq { overflow-x: auto; -webkit-overflow-scrolling: touch; } .persona-eq-chart { min-width: 640px; } }
@media (prefers-reduced-motion: reduce) { .persona-eq-point { transition: none; } }

/* ---- Tarvi Live carousel (23.10.2026, live-graph.js): the nodes circle the Tarvi circle in 3D;
   the one Tarvi talks about turns to the front and grows, the far ones shrink, blur and pass
   behind the circle. Slightly bent links with drifting sparks; the lead's link shines. */
.live-graph-links path { fill: none; }
.live-link-spark { stroke: rgba(190, 246, 255, .5); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 0 140; filter: drop-shadow(0 0 4px rgba(111, 227, 255, .85)); animation: live-spark 12s linear infinite; transition: stroke .8s ease; }
.live-link-spark[data-state="error"] { display: none; }
.live-link[data-lead] { stroke: rgba(176, 245, 255, .6); stroke-width: 1.4; }
.live-link-glow[data-lead] { stroke: rgba(84, 226, 255, .26); stroke-width: 11; filter: blur(7px); }
.live-link-flow[data-lead] { stroke: rgba(232, 253, 255, .85); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(120, 232, 255, .9)); }
.live-link-spark[data-lead] { stroke: rgba(225, 252, 255, .95); stroke-width: 3.2; }
@keyframes live-spark { from { stroke-dashoffset: 560; } to { stroke-dashoffset: 0; } }   /* 4 × 140 px: seamless */

/* Carousel: nodes and card columns share the stage's stacking order with the Tarvi circle
   (z-index 3), so the back of the ring passes behind it; the graph sets each z-index by depth. */
.live-graph-nodes { z-index: auto; }
.live-cards { opacity: var(--fade, 1); }
.live-cards[data-away] .live-card { pointer-events: none; }

/* Nodes as small calm versions of the Tarvi circle: a glass sphere with a softly breathing light
   core and a fine ring of ticks; searching lets the ring turn slowly, the node in front glows. */
.live-node-core, .live-node[data-state] .live-node-core {
  color: rgba(238, 252, 255, .94); font-size: .56rem; letter-spacing: .16em; text-shadow: 0 0 6px rgba(150, 236, 255, .9);
  border: 1px solid rgba(170, 236, 255, .32);
  background: radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .26), transparent 24%),
    radial-gradient(circle, rgba(98, 210, 240, .3) 0, rgba(58, 138, 255, .14) 42%, rgba(6, 22, 38, .94) 74%);
  box-shadow: 0 0 16px rgba(80, 200, 255, .3), inset 0 0 10px rgba(150, 235, 255, .22), inset 0 -7px 14px rgba(0, 0, 0, .38);
  animation: none;
}
.live-node-core::before { content: ""; position: absolute; inset: 20%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(226, 248, 255, .8), rgba(98, 210, 240, .3) 46%, transparent 72%); filter: blur(3px); animation: live-node-breathe 6s ease-in-out infinite; }
.live-node::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; opacity: .45;
  background: repeating-conic-gradient(rgba(160, 234, 255, .9) 0 1.4deg, transparent 1.4deg 7.5deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 80%, #000 81%, #000 92%, transparent 93%);
  mask: radial-gradient(circle closest-side, transparent 80%, #000 81%, #000 92%, transparent 93%); transition: opacity .6s ease; }
.live-node[data-state="searching"]::after { opacity: .85; animation: jarvis-spin 14s linear infinite; }
.live-node[data-state="searching"] .live-node-core::before { animation-duration: 2.4s; }
.live-node[data-state="error"] .live-node-core { border-color: rgba(255, 170, 130, .6); box-shadow: 0 0 16px rgba(255, 140, 100, .35), inset 0 -7px 14px rgba(0, 0, 0, .38); }
.live-node[data-state="error"]::after { background: repeating-conic-gradient(rgba(255, 190, 150, .9) 0 1.4deg, transparent 1.4deg 7.5deg); }
.live-node[data-category="suggestions"] .live-node-core, .live-node[data-category="approval"] .live-node-core { border-color: rgba(245, 201, 144, .55); }
.live-node.lead .live-node-core { border-color: rgba(200, 248, 255, .7); box-shadow: 0 0 26px rgba(110, 236, 255, .6), 0 0 64px rgba(52, 196, 255, .26), inset 0 0 12px rgba(170, 248, 255, .35), inset 0 -7px 14px rgba(0, 0, 0, .3); }
.live-node.lead::after { opacity: .8; }
.live-node.lead .live-node-label { color: #e6fcff; }
/* the turning tick ring replaces the fast dashed ring; the scan dots stay faint */
.live-node[data-state="searching"]::before { opacity: 0; animation: none; }
.live-node[data-state="searching"] .live-node-scan { opacity: .5; }
@keyframes live-node-breathe { 0%, 100% { opacity: .55; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .live-link-spark, .live-node-core::before, .live-node[data-state="searching"]::after { animation: none; }
}

/* ---- "Mach mal Party" (23.10.2026): music in a small player in the corner, the carousel
   turns (live-graph.js) and blinks; every node core flashes in turn, links change colour. --- */
/* the party video fills the stage behind carousel and circle, see-through and soft at the edges; a tap on the
   empty background reaches the player (blocked autoplay), only "Video schließen" stays as a button */
.live-item-preview.is-background { inset: 0; z-index: 1; display: block; padding: 0; background: none; backdrop-filter: none; pointer-events: none; }
.live-item-preview.is-background .live-item-sheet { position: absolute; inset: 0; width: auto; max-height: none; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: hidden; }
.live-item-preview.is-background :is(.live-item-head, .live-item-meta) { display: none; }
.live-item-preview.is-background :is(.live-item-body, .media-player) { position: absolute; inset: 0; overflow: hidden; }
.live-item-preview.is-background .media-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: none; opacity: .28; transform: scale(1.3); pointer-events: auto;
  filter: saturate(1.4); -webkit-mask-image: radial-gradient(ellipse 60% 62% at center, #000 0%, rgba(0, 0, 0, .7) 35%, rgba(0, 0, 0, .25) 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 62% at center, #000 0%, rgba(0, 0, 0, .7) 35%, rgba(0, 0, 0, .25) 65%, transparent 100%); }
.live-item-preview.is-background .media-player-bar { position: absolute; left: 16px; bottom: 16px; z-index: 13; margin: 0; pointer-events: auto; }
.live-item-preview.is-background .media-player-bar .button:not(:last-child):not(.media-sound-button) { display: none; }   /* "Ton an" and "Video schließen" */
/* DJ TARVI (live-dj.js): both decks' pictures cross-fade behind TARVI (--deck 1 → 0); in front a slim DJ console
   (deck A, mixer, deck B) low on the stage, so TARVI's dancing ring keeps its room; the search opens above it */
.live-item-preview.is-background .dj-set, .live-item-preview.is-background .dj-decks { position: absolute; inset: 0; }
.live-item-preview.is-background .media-player iframe.dj-deck { opacity: calc(.28 * var(--deck, 1)); pointer-events: none; }
/* an Audius set's pictures: muted club visuals, a new one fades in after every mix */
.live-item-preview.is-background .media-player iframe.dj-visual { opacity: 0; pointer-events: none; transition: opacity 3.5s ease; }
.live-item-preview.is-background .media-player iframe.dj-visual.is-on { opacity: .34; }
/* The console like Serato DJ: charcoal panels, deck A blue, deck B orange, the waveforms in red/green/blue, square
   buttons with lights. Both songs' waveforms on top, then deck A | mixer | deck B; the library opens above it. */
.dj-console { --dj-a: #3ea6ff; --dj-b: #ff9a2e; --dj-panel: #1d1e21; --dj-panel-2: #26282c; --dj-line: #34373d; --dj-ink: #e9e9ea; --dj-dim: #8d9097;
  --dj-play: #34d17a; --dj-cue: #ffb21c; --dj-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  position: absolute; left: 50%; bottom: 58px; z-index: 13; transform: translateX(-50%); pointer-events: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 384px) minmax(0, 1fr); gap: 6px; width: min(1240px, calc(100% - 32px));
  padding: 6px; border: 1px solid #000; border-radius: 10px; color: var(--dj-ink); font: 12px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: left;
  background: rgba(17, 18, 20, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .07); }
.dj-console button { font-family: inherit; }
/* the main waveforms: deck A above deck B, the play head in the middle */
.dj-waves { grid-column: 1 / -1; position: relative; display: grid; gap: 1px; border-radius: 6px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px var(--dj-line); }
.dj-waves::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ff3b3b; box-shadow: 0 0 6px rgba(255, 59, 59, .8); pointer-events: none; }
.dj-lane-box { position: relative; background: linear-gradient(180deg, #08090b, #0d0e11); }
.dj-lane { display: block; width: 100%; height: 30px; }
.dj-lane-name { position: absolute; left: 0; top: 0; bottom: 0; display: grid; place-items: center; width: 18px; font: 800 11px var(--dj-mono); color: #0b0b0c; background: var(--dj-a); }
.dj-lane-box[data-deck="1"] .dj-lane-name { background: var(--dj-b); }
.dj-lane-box:is([data-state="empty"], [data-state="load"]) { opacity: .45; }
/* a deck */
.dj-card { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) 12px; gap: 8px; align-items: center; min-width: 0; cursor: default;
  padding: 7px 8px; border-radius: 7px; background: linear-gradient(180deg, var(--dj-panel-2), var(--dj-panel)); box-shadow: inset 0 0 0 1px var(--dj-line), inset 0 2px 0 var(--deck, var(--dj-a));
  transition: box-shadow .3s, opacity .3s; }
.dj-card[data-deck="1"] { --deck: var(--dj-b); grid-template-columns: 12px minmax(0, 1fr) 84px; cursor: pointer; }
.dj-card[data-deck="1"] .dj-cover-box { grid-column: 3; grid-row: 1; }
.dj-card[data-deck="1"] .dj-deck-main { grid-column: 2; grid-row: 1; }
.dj-card[data-deck="1"] .dj-pitchfader { grid-column: 1; grid-row: 1; }
.dj-card[data-state="air"], .dj-card[data-state="in"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck, var(--dj-a)) 55%, transparent), inset 0 2px 0 var(--deck, var(--dj-a)), 0 0 22px color-mix(in srgb, var(--deck, var(--dj-a)) 18%, transparent); }
.dj-card:is([data-state="empty"], [data-state="load"]) { opacity: .62; }
.dj-deck-main { display: grid; gap: 3px; min-width: 0; }
.dj-head { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.dj-meta { display: grid; flex: 1; gap: 0; min-width: 0; }
.dj-badge { font: 800 9px/1.3 var(--dj-mono); letter-spacing: .14em; color: var(--dj-dim); }
.dj-card[data-state="air"] .dj-badge, .dj-card[data-state="in"] .dj-badge { color: var(--deck, var(--dj-a)); }
.dj-card[data-state="out"] .dj-badge { color: var(--dj-cue); }
.dj-song { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-artist { font-size: 11.5px; color: var(--dj-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-tempo { display: grid; justify-items: end; flex: none; }
.dj-bpm { font: 700 22px/1 var(--dj-mono); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.dj-bpm-unit { font: 700 8.5px/1.4 var(--dj-mono); letter-spacing: .14em; color: var(--dj-dim); }
.dj-stats { display: flex; gap: 6px; align-items: center; min-width: 0; font: 600 11px/1.2 var(--dj-mono); font-variant-numeric: tabular-nums; color: var(--dj-dim); }
.dj-key { padding: 1px 5px; border-radius: 3px; font-weight: 800; color: #0b0b0c; background: hsl(var(--hue, 200) 80% 60%); }
.dj-key.is-empty { color: var(--dj-dim); background: rgba(255, 255, 255, .06); }
.dj-pitch { color: #9be7c0; }
.dj-elapsed { margin-left: auto; color: var(--dj-ink); }
.dj-left { color: var(--dj-ink); font-weight: 700; }
.dj-card[data-deck="0"] .dj-left { color: var(--dj-a); } .dj-card[data-deck="1"] .dj-left { color: var(--dj-b); }
.dj-wave { display: block; width: 100%; height: 20px; border-radius: 3px; background: #08090b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.dj-lamps { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; }
.dj-lamp { flex: none; padding: 2px 6px; border-radius: 3px; font: 800 8.5px/1.3 var(--dj-mono); letter-spacing: .08em; color: #5d6067; background: #141518; box-shadow: inset 0 0 0 1px #2b2d32; transition: color .2s, background .2s, box-shadow .2s; }
.dj-lamp[hidden] { display: none; }
.dj-lamp-sync { margin-left: auto; }
.dj-console[data-manual="true"] .dj-lamp-cue { animation: none; }
.dj-lamp-master { display: none; }                                  /* the deck's badge says ON AIR */
@media (min-width: 1500px) { .dj-lamp-master { display: inline-block; } }
/* the transport: CUE, Play/Pause, hot cues 1–4 and SYNC are buttons */
.dj-btn { min-width: 26px; border: 0; cursor: pointer; text-align: center; }
.dj-btn:hover { color: var(--dj-ink); background: #24262a; }
.dj-btn:active { transform: translateY(1px); }
.dj-btn:focus-visible { outline: 2px solid var(--deck, var(--dj-a)); outline-offset: 1px; }
.dj-btn:disabled { cursor: not-allowed; opacity: .45; }
.dj-lamp-play { min-width: 34px; font-size: 10px; }
.dj-lamp-hot { min-width: 20px; padding: 2px 0; color: var(--hot); background: color-mix(in srgb, var(--hot) 12%, #141518); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 45%, transparent); }
.dj-lamp-hot[data-set="true"] { color: #0b0b0c; background: var(--hot); box-shadow: 0 0 8px color-mix(in srgb, var(--hot) 55%, transparent); }
.dj-lamp-hot:hover { color: #fff; background: color-mix(in srgb, var(--hot) 35%, #141518); }
.dj-lamp-hot[data-set="true"]:hover { color: #0b0b0c; filter: brightness(1.15); background: var(--hot); }
/* everything that can be dragged */
.dj-grab { cursor: grab; touch-action: none; }
.dj-grab.is-dragging { cursor: grabbing; }
.dj-grab:focus-visible { outline: 2px solid var(--dj-a); outline-offset: 2px; border-radius: 3px; }
.dj-knob.dj-grab:hover i, .dj-knob.is-dragging i { box-shadow: 0 0 0 2px var(--deck), 0 2px 3px rgba(0, 0, 0, .6); }
.dj-fader.dj-grab:hover i, .dj-rail.dj-grab:hover i, .dj-pitchfader.dj-grab:hover i, .dj-grab.is-dragging i { filter: brightness(1.15); }
.dj-pitchfader i, .dj-fader i, .dj-rail i { pointer-events: none; }
.dj-wave { cursor: pointer; }
.dj-hit-actions .button.dj-load-a { border-color: var(--dj-a); color: #fff; background: color-mix(in srgb, var(--dj-a) 45%, #1a1b1e); }
.dj-hit-actions .button.dj-load-b { border-color: var(--dj-b); color: #fff; background: color-mix(in srgb, var(--dj-b) 45%, #1a1b1e); }
.dj-lamp-play[data-on="true"] { color: #062512; background: var(--dj-play); box-shadow: 0 0 10px color-mix(in srgb, var(--dj-play) 60%, transparent); }
.dj-lamp-cue[data-on="true"] { color: #2a1a00; background: var(--dj-cue); box-shadow: 0 0 10px color-mix(in srgb, var(--dj-cue) 60%, transparent); animation: dj-blink 1s steps(2, jump-none) infinite; }
.dj-lamp:is(.dj-lamp-sync, .dj-lamp-master)[data-on="true"] { color: #fff; background: color-mix(in srgb, var(--deck, var(--dj-a)) 70%, #000); box-shadow: inset 0 0 0 1px var(--deck, var(--dj-a)); }
.dj-lamp-lock[data-on="true"] { color: var(--dj-ink); box-shadow: inset 0 0 0 1px #4a4d55; }
@keyframes dj-blink { 50% { filter: brightness(.55); } }
.dj-progress { position: relative; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.dj-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--deck, var(--dj-a)); }
.dj-progress b { position: absolute; right: 0; bottom: 0; height: 1px; width: 0; background: var(--dj-play); }       /* the deck's level */
/* the virtual deck: black platter, a ring in the deck's colour for the progress, the white marker turns */
.dj-cover-box { position: relative; width: 84px; height: 84px; }
.dj-platter { --ring: var(--dj-a); position: absolute; left: 0; top: 0; width: 84px; height: 84px; border-radius: 50%; background: #0b0c0e; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #2a2c31; }
.dj-card[data-deck="1"] .dj-platter { --ring: var(--dj-b); }
.dj-platter::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--ring) calc(var(--p, 0) * 360deg), #26282d 0);
  -webkit-mask: radial-gradient(circle, transparent 84%, #000 86%); mask: radial-gradient(circle, transparent 84%, #000 86%); }
.dj-platter::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; opacity: .5;
  background: repeating-conic-gradient(rgba(255, 255, 255, .5) 0 1.5deg, transparent 1.5deg 12deg);
  -webkit-mask: radial-gradient(circle, transparent 90%, #000 92%); mask: radial-gradient(circle, transparent 90%, #000 92%); }
.dj-vinyl { position: absolute; inset: 9px; border-radius: 50%; overflow: hidden; will-change: transform;
  background: repeating-radial-gradient(circle, #101113 0 1.3px, #18191c 1.5px 2.5px), #111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.dj-vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 30deg, transparent 0 8%, rgba(255, 255, 255, .12) 12%, transparent 18% 50%, rgba(255, 255, 255, .07) 62%, transparent 68%); }
.dj-marker { position: absolute; left: 50%; top: 1px; width: 3px; height: 26%; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }
.dj-cover { position: absolute; inset: 29%; width: 42%; height: 42%; border-radius: 50%; object-fit: cover; background: radial-gradient(circle, #3a3c42, #1b1c20); }
.dj-cover:not([src]) { visibility: visible; content: ""; }
.dj-spindle { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #d6d7da; box-shadow: 0 0 3px #000; }
/* the pitch fader beside the deck: ±12 %, the cap moves with the tempo TARVI sets */
.dj-pitchfader { position: relative; align-self: stretch; width: 12px; min-height: 70px; }
.dj-pitchfader::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: #0a0b0c; box-shadow: inset 0 0 0 1px #2d2f34; }
.dj-pitchfader::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #5d6067; }
.dj-pitchfader i { position: absolute; left: 0; top: calc(50% - 4px + var(--p, 0) * (50% - 8px)); width: 12px; height: 8px; border-radius: 2px;
  background: linear-gradient(180deg, #d7d8db, #8d9097); box-shadow: 0 1px 3px rgba(0, 0, 0, .7); transition: top .2s linear; }
.dj-pitchfader i::after { content: ""; position: absolute; left: 1px; right: 1px; top: 3.5px; height: 1px; background: var(--deck, var(--dj-a)); }
/* the mixer: two channel strips, the display, the pads and the crossfader */
.dj-mixer { display: grid; grid-template-columns: 68px minmax(0, 1fr) 68px; gap: 6px; min-width: 0; padding: 6px; border-radius: 7px;
  background: linear-gradient(180deg, #2a2c30, #1c1d20); box-shadow: inset 0 0 0 1px var(--dj-line), inset 0 1px 0 rgba(255, 255, 255, .06); }
.dj-strip { --deck: var(--dj-a); position: relative; display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto 1fr; gap: 2px 3px; padding: 3px; border-radius: 5px; background: #17181b; box-shadow: inset 0 0 0 1px #2b2d32; }
.dj-strip[data-deck="1"] { --deck: var(--dj-b); }
.dj-strip-name { grid-column: 1 / -1; justify-self: center; padding: 0 6px; border-radius: 2px; font: 800 9px/1.4 var(--dj-mono); color: #0b0b0c; background: var(--deck); }
.dj-knobs { display: grid; gap: 1px; }
.dj-knob { display: grid; justify-items: center; font: 700 7px/1.2 var(--dj-mono); letter-spacing: 0; color: var(--dj-dim); }
.dj-knob i { position: relative; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a4c52, #222327 65%, #151618);
  box-shadow: 0 0 0 2px #0e0f11, 0 2px 3px rgba(0, 0, 0, .6); transform: rotate(calc(var(--v, 0) * 135deg)); transition: transform .15s linear; }
.dj-knob i::after { content: ""; position: absolute; left: 50%; top: 2px; width: 2px; height: 7px; margin-left: -1px; border-radius: 1px; background: #f2f2f2; }
.dj-knob:last-child i::after { background: var(--deck); box-shadow: 0 0 4px var(--deck); }
.dj-channel { display: flex; gap: 4px; justify-content: center; align-items: stretch; min-height: 60px; }
.dj-vu { display: flex; flex-direction: column-reverse; gap: 1.5px; width: 6px; padding: 1px; border-radius: 2px; background: #050506; }
.dj-vu i { flex: 1; border-radius: 1px; background: #1a2a20; transition: background .06s, box-shadow .06s; }
.dj-vu i.on { background: var(--dj-play); box-shadow: 0 0 4px var(--dj-play); }
.dj-vu i:nth-child(n+8).on { background: var(--dj-cue); box-shadow: 0 0 4px var(--dj-cue); }
.dj-vu i:nth-child(n+11).on { background: #ff3b3b; box-shadow: 0 0 5px #ff3b3b; }
.dj-fader { position: relative; width: 18px; background: repeating-linear-gradient(180deg, transparent 0 9px, #3a3c42 9px 10px) center / 100% calc(100% - 8px) no-repeat; }
.dj-fader::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: #050506; box-shadow: inset 0 0 0 1px #2d2f34; }
.dj-fader i { position: absolute; left: 0; bottom: calc(var(--y, 0) * (100% - 12px)); width: 18px; height: 12px; border-radius: 2px;
  background: linear-gradient(180deg, #e4e5e7, #9b9ea4 48%, #2b2c30 50%, #b8bbc0 52%, #7f828a); box-shadow: 0 2px 4px rgba(0, 0, 0, .7); }
.dj-center { display: grid; gap: 5px; align-content: space-between; min-width: 0; }
/* the display: beat of the bar, the phase of the two songs, what happens next, what comes after */
.dj-display { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 5px 7px; border-radius: 4px;
  background: #0a0b0c; box-shadow: inset 0 0 0 1px #2b2d32, inset 0 6px 14px rgba(0, 0, 0, .6); }
.dj-beats { display: flex; gap: 3px; align-items: center; grid-row: 1 / 3; flex-direction: column; }
.dj-beats > i { width: 14px; height: 4px; border-radius: 1px; background-color: rgba(255, 255, 255, calc(.08 + var(--on, 0) * .9)); box-shadow: 0 0 calc(var(--on, 0) * 8px) rgba(255, 255, 255, var(--on, 0)); }
.dj-beats > i:first-child { background-color: rgba(255, 59, 59, calc(.18 + var(--on, 0) * .82)); box-shadow: 0 0 calc(var(--on, 0) * 10px) rgba(255, 59, 59, var(--on, 0)); }
.dj-phase { position: relative; width: 14px; height: 18px; margin-top: 1px; border-radius: 2px; background: #000; box-shadow: inset 0 0 0 1px #2b2d32; }
.dj-phase::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .3); }
.dj-phase i { position: absolute; left: 2px; top: calc(50% - 2px + var(--e, 0) * 7px); width: 10px; height: 4px; border-radius: 1px; background: rgba(255, 255, 255, .2); transition: top .15s linear, background .3s; }
.dj-phase[data-on="sync"] i { background: var(--dj-play); box-shadow: 0 0 6px var(--dj-play); }
.dj-phase[data-on="off"] i { background: var(--dj-cue); box-shadow: 0 0 6px var(--dj-cue); }
.dj-status { min-width: 0; font: 700 11px/1.35 var(--dj-mono); color: #f1f1f1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-queue { min-width: 0; min-height: 1.3em; font: 500 10.5px/1.3 var(--dj-mono); color: var(--dj-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dj-pad { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 4px 2px 3px; border: 0; border-radius: 4px; cursor: pointer;
  color: var(--dj-ink); background: linear-gradient(180deg, #34363b, #26272b); box-shadow: inset 0 0 0 1px #3d4046, 0 2px 0 #0b0b0c; transition: transform .08s, box-shadow .08s, background .2s; font: inherit; }
.dj-pad:hover { background: linear-gradient(180deg, #3d4046, #2c2e32); }
.dj-pad:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px #3d4046, 0 1px 0 #0b0b0c; }
.dj-pad:focus-visible { outline: 2px solid var(--dj-a); outline-offset: 1px; }
.dj-pad svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dj-pad-cut svg { fill: currentColor; stroke: none; }
.dj-pad-label { max-width: 100%; overflow: hidden; font: 800 8.5px/1.3 var(--dj-mono); letter-spacing: .06em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; color: #c8c9cc; }
.dj-pad-blend { color: #fff; background: linear-gradient(180deg, #2f7fd1, #1f5fa3); box-shadow: inset 0 0 0 1px #4aa3ff, 0 2px 0 #0b0b0c; }
.dj-pad-blend .dj-pad-label { color: #fff; }
.dj-pad-blend:is([data-state="cue"], [data-state="mix"]) { color: #1d1200; background: linear-gradient(180deg, #ffc24a, #f59a0b); box-shadow: inset 0 0 0 1px #ffd27a, 0 0 16px rgba(255, 178, 28, .5); }
.dj-pad-blend:is([data-state="cue"], [data-state="mix"]) .dj-pad-label { color: #1d1200; }
.dj-pad-blend[data-state="cue"] { animation: dj-blink .7s steps(2, jump-none) infinite; }
.dj-pad-cut { color: #ffd166; }
.dj-options { display: flex; gap: 5px; align-items: center; justify-content: space-between; }
.dj-style { display: flex; gap: 1px; padding: 1px; border-radius: 4px; background: #0a0b0c; box-shadow: inset 0 0 0 1px #2b2d32; }
.dj-led { min-width: 28px; padding: 2px 5px; border: 0; border-radius: 3px; cursor: pointer; font: 800 9px/1.3 var(--dj-mono); letter-spacing: .04em; white-space: nowrap; color: var(--dj-dim); background: transparent; }
.dj-led:hover { color: var(--dj-ink); }
.dj-led[aria-pressed="true"] { color: #0b0b0c; background: var(--dj-ink); }
.dj-console .dj-auto { display: inline-flex; gap: 5px; align-items: center; margin: 0; padding: 2px 7px 2px 5px; border-radius: 4px; cursor: pointer;
  font: 800 9px/1.3 var(--dj-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dj-dim); background: #0a0b0c; box-shadow: inset 0 0 0 1px #2b2d32; }
.dj-console .dj-auto input { appearance: none; -webkit-appearance: none; flex: none; width: 8px !important; height: 8px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; margin: 0; border-radius: 50%; background: #2b2d32; cursor: pointer; }
.dj-console .dj-auto input:checked { background: var(--dj-play); box-shadow: 0 0 6px var(--dj-play); }
.dj-console .dj-auto:has(input:checked) { color: var(--dj-ink); }
.dj-console .dj-auto input:focus-visible { outline: 2px solid var(--dj-a); outline-offset: 2px; }
.dj-xfader { display: flex; gap: 6px; align-items: center; font: 800 9px var(--dj-mono); color: var(--dj-dim); }
.dj-xfader span:first-child { color: var(--dj-a); } .dj-xfader span:last-child { color: var(--dj-b); }
.dj-rail { position: relative; flex: 1; height: 16px; background: repeating-linear-gradient(90deg, #3a3c42 0 1px, transparent 1px 10%) 0 0 / 100% 3px no-repeat, repeating-linear-gradient(90deg, #3a3c42 0 1px, transparent 1px 10%) 0 100% / 100% 3px no-repeat; }
.dj-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 4px; border-radius: 2px; background: #050506; box-shadow: inset 0 0 0 1px #2d2f34; }
.dj-rail i { position: absolute; top: 0; left: calc(var(--x, 0) * (100% - 14px)); width: 14px; height: 16px; border-radius: 2px; will-change: left;
  background: linear-gradient(90deg, #7f828a, #e4e5e7 40%, #2b2c30 48% 52%, #e4e5e7 60%, #7f828a); box-shadow: 0 2px 5px rgba(0, 0, 0, .7); }
/* the library, like Serato's: search on top, crates on the left, the songs as a table */
.dj-library { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 14; pointer-events: auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(450px, calc(100vh - 440px), 60vh); min-height: 240px; border: 1px solid #000; border-radius: 10px; overflow: hidden;
  background: rgba(20, 21, 23, .97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--dj-ink); font-size: 12.5px; text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); animation: dj-pop .2s cubic-bezier(.2, .9, .3, 1.1); }
.dj-library[hidden] { display: none; }
@keyframes dj-pop { from { opacity: 0; transform: translateY(8px); } }
.dj-search-head { display: flex; gap: 8px; align-items: center; padding: 7px 8px; background: linear-gradient(180deg, #2a2c30, #222326); border-bottom: 1px solid #000; }
.dj-load { display: flex; flex: 1; gap: 6px; align-items: center; min-width: 0; }
.dj-field { position: relative; display: flex; flex: 1; align-items: center; min-width: 0; margin: 0; }
.dj-field svg { position: absolute; left: 9px; width: 15px; height: 15px; fill: none; stroke: var(--dj-dim); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.dj-console .dj-field input { flex: 1; width: auto !important; min-width: 0; height: 30px; min-height: 0; padding: 0 10px 0 30px; border: 1px solid #3a3c42; border-radius: 5px;
  color: var(--dj-ink); background: #101113; font: 500 13px system-ui, sans-serif; box-shadow: none; }
.dj-console .dj-field input:focus { border-color: var(--dj-a); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--dj-a) 30%, transparent); }
.dj-where { display: flex; flex: none; gap: 1px; padding: 1px; border-radius: 5px; background: #101113; box-shadow: inset 0 0 0 1px #3a3c42; }
.dj-where-option { padding: 5px 9px; border: 0; border-radius: 4px; cursor: pointer; font: 700 11px system-ui, sans-serif; color: var(--dj-dim); background: transparent; }
.dj-where-option[aria-checked="true"] { color: #fff; background: #3a3c42; }
.dj-count { flex: none; font: 600 11px var(--dj-mono); color: var(--dj-dim); white-space: nowrap; }
.dj-library .dj-search-head .button { min-height: 30px; border-radius: 5px; }
.dj-library .button.primary { border-color: #2f7fd1; color: #fff; background: linear-gradient(180deg, #3586d8, #2468b0); box-shadow: none; }
.dj-close { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #3a3c42; border-radius: 5px; cursor: pointer; font-size: 14px; color: #c3c4c7; background: #1a1b1e; }
.dj-close:hover { color: #fff; background: #2f3237; }
.dj-lib-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 0; }
.dj-crates { display: grid; align-content: start; gap: 1px; padding: 6px 4px; overflow-y: auto; background: #18191b; border-right: 1px solid #000; }
.dj-crate { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 6px 8px; border: 0; border-radius: 4px; cursor: pointer;
  font: 600 12px system-ui, sans-serif; text-align: left; color: #c3c4c7; background: transparent; }
.dj-crate::before { content: ""; flex: none; width: 10px; height: 8px; border: 1.5px solid currentColor; border-top-width: 3px; border-radius: 1px; opacity: .55; }
.dj-crate[data-crate="genre"] { margin-top: 8px; }
.dj-crate[data-crate="genre"]::before { width: 9px; height: 9px; border-width: 1.5px; border-radius: 50%; }
.dj-crate:hover { background: #24262a; }
.dj-crate[aria-selected="true"] { color: #fff; background: #2f3237; box-shadow: inset 2px 0 0 var(--dj-a); }
.dj-crate-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-crate-count { flex: none; font: 600 10.5px var(--dj-mono); color: var(--dj-dim); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-lib-view { position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.dj-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.dj-table[hidden] { display: none; }
.dj-table thead th { position: sticky; top: 0; z-index: 1; height: 26px; padding: 0 6px; font: 700 10px/1 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; text-align: left;
  color: var(--dj-dim); background: #222326; border-bottom: 1px solid #000; white-space: nowrap; }
.dj-sort { padding: 0; border: 0; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; }
.dj-sort:hover { color: var(--dj-ink); }
.dj-table th[aria-sort="ascending"] .dj-sort::after { content: " ▲"; color: var(--dj-a); }
.dj-table th[aria-sort="descending"] .dj-sort::after { content: " ▼"; color: var(--dj-a); }
.dj-col-index { width: 52px; } .dj-col-cover { width: 40px; } .dj-col-bpm { width: 58px; } .dj-col-key { width: 50px; } .dj-col-seconds { width: 54px; }
.dj-col-fit { width: 72px; } .dj-col-actions { width: 206px; } .dj-col-artist { width: 24%; }
.dj-table td { height: 38px; padding: 0 6px; border-bottom: 1px solid #1d1e21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-hit { cursor: default; outline: none; }
.dj-hit:nth-child(even) td { background: rgba(255, 255, 255, .018); }
.dj-hit:hover td { background: #24262a; }
.dj-hit[aria-selected="true"] td { background: #2b4256; }
.dj-hit[aria-selected="true"]:focus td { background: #33506a; }
.dj-hit[data-tag="deck"] td:first-child { box-shadow: inset 3px 0 0 var(--dj-b); }
.dj-hit[data-tag="air"] td:first-child { box-shadow: inset 3px 0 0 var(--dj-a); }
.dj-col-index { font: 600 11px var(--dj-mono); color: var(--dj-dim); }
.dj-tag { display: inline-block; max-width: 100%; padding: 1px 4px; border-radius: 3px; font: 800 9px/1.3 var(--dj-mono); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.dj-tag-deck { color: #1d1200; background: var(--dj-b); } .dj-tag-air { color: #04121f; background: var(--dj-a); } .dj-tag-wish { color: #e9e9ea; background: #4a3a72; }
.dj-hit-cover { display: block; width: 30px; height: 30px; border-radius: 3px; object-fit: cover; background: #2a2c30; }
.dj-hit-cover:not([src]) { visibility: visible; }
.dj-hit-meta { display: grid; min-width: 0; line-height: 1.25; }
.dj-hit-meta :is(b, span) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-hit-meta b { font-weight: 600; color: #f2f2f3; }
.dj-hit-sub { display: none; font-size: 11px; color: var(--dj-dim); }
.dj-col-artist { color: #c3c4c7; }
.dj-src { display: inline-block; margin-right: 6px; padding: 0 3px; border-radius: 2px; font: 800 8.5px/1.4 var(--dj-mono); vertical-align: 1px; color: #0b0b0c; background: #b18cff; }
.dj-src-youtube { background: #ff5c5c; }
.dj-hit-bpm, .dj-hit-len { font: 600 12px var(--dj-mono); font-variant-numeric: tabular-nums; color: #f2f2f3; }
.dj-hit-key { display: inline-block; padding: 1px 5px; border-radius: 3px; font: 800 11px/1.3 var(--dj-mono); color: #0b0b0c; background: hsl(var(--hue, 210) 80% 60%); }
.dj-hit-key:not([style]) { color: var(--dj-dim); background: rgba(255, 255, 255, .06); }
.dj-fit { font: 700 11.5px var(--dj-mono); color: var(--dj-dim); }
.dj-fit[data-fit="good"] { color: var(--dj-play); } .dj-fit[data-fit="ok"] { color: var(--dj-cue); } .dj-fit[data-fit="far"] { color: #ff6b6b; }
.dj-hit-actions { text-align: right; }
.dj-table td.dj-hit-actions { overflow: visible; text-overflow: clip; }
.dj-hit-actions .button { min-height: 24px; margin-left: 4px; padding: 1px 9px; border-radius: 4px; font-size: 11.5px; }
.dj-hit-actions .button.ghost { border-color: #3a3c42; color: #d7d8db; background: #26282c; }
.dj-hit-actions .button.primary { border-color: #2f7fd1; background: #2a6db5; color: #fff; }
.dj-empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--dj-dim); }
.dj-empty[hidden] { display: none; }
.dj-genres { display: grid; gap: 10px; padding: 12px; }
.dj-genres[hidden] { display: none; }
.dj-own { display: flex; gap: 6px; max-width: 420px; }
.dj-console .dj-own input { flex: 1; width: auto !important; min-width: 0; height: 30px; min-height: 0; padding: 0 10px; border: 1px solid #3a3c42; border-radius: 5px; color: var(--dj-ink); background: #101113; }
.dj-lib-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 26px; padding: 4px 10px; border-top: 1px solid #000; background: #1b1c1f; }
.dj-note { min-width: 0; font-size: 12px; color: #c3c4c7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-keys { flex: none; font: 600 10px var(--dj-mono); color: #6b6e75; }
/* the genre tiles (also on Zuhause › Party, party.js) */
.dj-genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 7px; overflow-y: auto; min-height: 0; }
.dj-genre { --hue: calc(var(--i, 0) * 37deg + 180deg); position: relative; min-height: 50px; padding: 8px 10px; border: 0; border-radius: 6px; cursor: pointer; overflow: hidden;
  font-family: inherit; font-size: 12.5px; font-weight: 800; line-height: 1.2; text-align: left; color: #fff; letter-spacing: .01em;
  background: linear-gradient(135deg, hsl(var(--hue) 55% 32%), hsl(calc(var(--hue) + 40deg) 60% 16%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .35);
  transition: transform .15s, box-shadow .2s, filter .2s; }
.dj-genre::after { content: ""; position: absolute; right: -14px; bottom: -14px; width: 46px; height: 46px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(0, 0, 0, .55) 0 1.5px, rgba(255, 255, 255, .06) 1.5px 3px); opacity: .7; }
.dj-genre:hover { transform: translateY(-2px); filter: brightness(1.15); }
.dj-genre[aria-pressed="true"] { box-shadow: 0 0 0 2px #ffb21c, 0 0 18px rgba(255, 178, 28, .45); }
#voice-stage.dj-browsing .live-graph { opacity: .12; filter: blur(3px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dj-console *, .dj-library { animation: none !important; transition: none !important; } }
@media (max-width: 1100px) {
  .dj-col-fit, .dj-col-seconds { display: none; }
  .dj-col-actions { width: 168px; }
  .dj-lamp-lock, .dj-lamp-master { display: none; }
}
@media (max-width: 760px) {
  .dj-console { grid-template-columns: 1fr 1fr; gap: 5px; bottom: 54px; width: calc(100% - 16px); padding: 5px; }
  .dj-mixer { grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr); padding: 5px; }
  .dj-strip { display: none; }
  .dj-center { gap: 5px; }
  .dj-waves { display: none; }               /* on the phone the overview waveform in each deck */
  .dj-card, .dj-card[data-deck="1"] { grid-template-columns: 34px minmax(0, 1fr); padding: 6px; gap: 6px; }
  .dj-cover-box, .dj-card[data-deck="1"] .dj-cover-box { grid-column: 1; grid-row: 1; width: 34px; height: 34px; align-self: start; }
  .dj-platter, .dj-card[data-deck="1"] .dj-platter { width: 34px; height: 34px; }
  .dj-vinyl { inset: 4px; }
  .dj-card[data-deck="1"] .dj-deck-main { grid-column: 2; }
  .dj-lamp-hot, .dj-lamp-lock, .dj-lamp-master { display: none; }
  .dj-pitchfader, .dj-meta .dj-artist, .dj-bpm-unit, .dj-stats :is(.dj-pitch, .dj-elapsed) { display: none; }
  .dj-bpm { font-size: 13px; }
  .dj-song { font-size: 12px; }
  .dj-wave { height: 14px; }
  .dj-display { grid-template-columns: minmax(0, 1fr); padding: 4px 6px; }
  .dj-beats { display: none; }
  .dj-queue { display: none; }
  .dj-pad { padding: 4px 2px 3px; } .dj-pad svg { width: 16px; height: 16px; }
  .dj-led { min-width: 0; padding: 2px 4px; }
  .dj-library { height: min(56vh, 460px); }
  .dj-search-head { align-items: flex-start; }
  .dj-load { flex-wrap: wrap; }
  .dj-field { flex-basis: 100%; }
  .dj-crates { scrollbar-width: none; } .dj-crates::-webkit-scrollbar { display: none; }
  .dj-progress { display: none; }
  .dj-card, .dj-card[data-deck="1"] { padding: 5px 6px; }
  .dj-count { display: none; }
  .dj-lib-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dj-crates { display: flex; gap: 4px; padding: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid #000; }
  .dj-crate { flex: none; padding: 5px 9px; }
  .dj-crate[data-crate="genre"] { margin-top: 0; }
  .dj-crate::before { display: none; }
  .dj-table thead { display: none; }
  .dj-col-index, .dj-col-artist, .dj-col-key, .dj-col-seconds, .dj-col-fit { display: none; }
  .dj-hit-sub { display: block; }
  .dj-col-actions { width: 98px; }
  .dj-col-bpm { width: 40px; }
  .dj-hit-actions .button { display: block; width: 100%; margin: 2px 0; padding: 1px 4px; }
  .dj-table td { height: 52px; }
  .dj-keys { display: none; }
  .dj-genre-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
/* garish colours on the beat: live-graph.js sets --party-kick (1 on the beat → 0) and --party-hue (a new hue every beat) */
.live-party .live-node > :is(.live-node-core, .live-node-label, .live-node-count) {
  filter: hue-rotate(calc(var(--party-hue, 0deg) + var(--hue-off, 0deg))) saturate(2.6) brightness(calc(1.1 + var(--party-kick, 0) * .9 + var(--party-high, 0) * .35)); }
.live-party .live-node[data-state] .live-node-core { box-shadow: 0 0 calc(18px + var(--party-kick, 0) * 30px) rgba(255, 90, 200, .7), 0 0 60px rgba(90, 200, 255, .45); border-color: rgba(255, 255, 255, .75); }
.live-party .live-node::after { opacity: .9; animation: jarvis-spin 4s linear infinite; }
/* the move "arms up" (live-graph.js .live-arms): the nodes are beads on two arms, their labels step aside */
.live-party .live-node :is(.live-node-label, .live-node-count) { transition: opacity .3s ease; }
.live-arms .live-node :is(.live-node-label, .live-node-count) { opacity: 0; }
.live-party .live-graph-links { filter: hue-rotate(var(--party-hue, 0deg)) saturate(2.4) brightness(calc(1 + var(--party-kick, 0) * .7)); }
.live-party .voice-orb { animation: live-party-orb .48s ease-in-out infinite alternate; }
/* the greeting whirl (live-intro), restrained: silver and ice instead of colour. One soft light travels once round the
   ring (live-graph.js sets --intro-delay per node); each node brightens as it passes and settles; links nearly colourless. */
.live-intro .live-node > .live-node-core { animation: live-intro-shine 1.2s cubic-bezier(.4, 0, .2, 1) both; animation-delay: var(--intro-delay, 0s); }
.live-intro .live-node[data-state] .live-node-core { border-color: rgba(232, 246, 255, .55); }
.live-intro .live-graph-links { filter: saturate(.3) brightness(1.15); }
@keyframes live-intro-shine {
  0% { filter: saturate(.45) brightness(.85); }
  45% { filter: saturate(.55) brightness(1.6); box-shadow: 0 0 24px rgba(236, 248, 255, .55), 0 0 64px rgba(170, 214, 255, .22), inset 0 0 14px rgba(255, 255, 255, .35); }
  100% { filter: saturate(.85) brightness(1); }
}
/* the screen frame (live-neural.js): flashes on every beat (--kick 1 → 0) and shakes, magenta and cyan */
.live-frame.party { opacity: calc(.2 + var(--kick, 0) * .8); transition: none; }
.live-frame.party i { animation: none; opacity: 1; filter: hue-rotate(var(--hue, 0deg)); box-shadow: inset 0 0 90px 16px rgba(255, 60, 200, .8), inset 0 0 220px 30px rgba(80, 200, 255, .45); }
.live-frame.party i.accent { filter: hue-rotate(calc(var(--hue, 0deg) + 150deg)); box-shadow: inset 0 0 30px 6px rgba(120, 255, 230, .9), inset 0 0 140px 14px rgba(255, 210, 80, .35); }
@keyframes live-party-orb { to { box-shadow: 0 0 60px rgba(255, 110, 220, .55), 0 0 120px rgba(90, 210, 255, .45); } }
@media (prefers-reduced-motion: reduce) {
  .live-party .live-node-core, .live-party .live-node::after, .live-party .live-graph-links, .live-party .voice-orb { animation: none; }
  .live-intro .live-node > *, .live-intro .live-graph-links { animation: none; }
}

/* Tools › Reisen (travel.js) and Netflix under Medien */
#travel-view .tr-layout { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 18px; align-items: start; }
#travel-view .tr-side { display: grid; gap: 12px; }
#travel-view .tr-list { display: grid; gap: 6px; }
#travel-view .tr-trip { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--k-radius-sm); border: 1px solid var(--k-line); background: var(--k-surface); color: var(--k-text); cursor: pointer; }
#travel-view .tr-trip span { color: var(--k-muted); font-size: .86rem; }
#travel-view .tr-trip.active { border-color: var(--k-accent); background: var(--k-accent-soft); }
#travel-view .tr-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
#travel-view .tr-detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
#travel-view .tr-detail-head h3 { margin: 0; }
#travel-view .tr-totals { display: flex; flex-wrap: wrap; gap: 8px; align-items: start; }
#travel-view .tr-totals span { padding: 4px 10px; border-radius: 999px; background: var(--k-surface-2); font-size: .86rem; }
#travel-view .tr-totals .over { color: var(--k-danger); }
#travel-view .tr-weather { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--k-muted); }
#travel-view .tr-weather strong { color: var(--k-text); width: 100%; }
#travel-view .tr-weather .warn, #travel-view .tr-chip.warn, #travel-view .tr-chip.unclear { color: var(--k-warn); }
#travel-view .tr-parts { display: grid; gap: 8px; }
#travel-view .tr-parts h4 { margin: 0; }
#travel-view .tr-part { padding: 10px 12px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); display: grid; gap: 6px; }
#travel-view .tr-part.booked { border-color: var(--k-accent); }
#travel-view .tr-part.cancelled { opacity: .6; }
#travel-view .tr-part .help, #travel-view .tr-part .item-actions { margin: 0; }
#travel-view .tr-part-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#travel-view .tr-kind { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); }
#travel-view .tr-chip, .tr-confirm .tr-chip { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--k-surface-3); font-size: .78rem; }
#travel-view .tr-chip.booked { background: var(--k-accent-soft); color: var(--k-accent-ink); }
.tr-confirm { display: grid; gap: 6px; padding: 12px; border-radius: var(--k-radius-sm); border: 1px solid var(--k-accent); background: var(--k-accent-soft); }
.tr-confirm .tr-chip { margin-left: 0; justify-self: start; }
#travel-view .tr-inline, #travel-view .tr-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
#travel-view .tr-field { display: grid; gap: 2px; font-size: .85rem; color: var(--k-muted); }
#travel-view .tr-field input { min-width: 0; width: 100%; }
#travel-view .tr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#travel-view .tr-tabs [aria-pressed="true"] { background: var(--k-accent-soft); }
#travel-view .tr-results { display: grid; gap: 6px; margin-top: 10px; }
#travel-view .tr-result { display: grid; gap: 4px; padding: 8px 10px; border-radius: var(--k-radius-sm); background: var(--k-surface-2); }
#travel-view .tr-result > button { justify-self: start; }
#travel-view .tr-rooms { display: grid; gap: 4px; }
#travel-view .tr-room { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: .9rem; }
#travel-settings-box > summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
@media (max-width: 760px) { #travel-view .tr-layout { grid-template-columns: minmax(0, 1fr); } }

/* Quiet separators belong to the wordmark, not ordinary product text. */
.brand-wordmark { display:inline-flex; align-items:center; gap:.13em; letter-spacing:.035em; white-space:nowrap; }
.brand-letter-dot { display:inline-block; width:.105em; height:.105em; flex:0 0 .105em; border-radius:50%; background:var(--k-accent,#72d8e9); opacity:.55; }
/* Keep the Live wordmark visible in the compact app header too. */
#voice-panel .voice-overline { display:inline-flex; align-items:center; gap:.65em; }
@media(max-width:700px) {
  #voice-panel .voice-overline {font-size:14px;flex-shrink:0;}
  #voice-panel .voice-overline > span:last-child {display:none;}
}

/* Kalender › Termine importieren */
.calendar-import .calendar-import-sources{display:grid;gap:.5rem;margin:.6rem 0}
.calendar-import .calendar-import-file{cursor:pointer;justify-self:start}
.calendar-import .calendar-import-row{display:flex;gap:.5rem;flex-wrap:wrap}
.calendar-import .calendar-import-row input{flex:1 1 14rem;min-width:0}
.calendar-import .calendar-import-how ul{margin:.4rem 0 0;padding-left:1.1rem;display:grid;gap:.35rem}
.calendar-import .calendar-import-device{margin:.7rem 0 .4rem;padding:.8rem .9rem;border-radius:14px;border:1px solid var(--k-line,rgba(127,127,127,.2));background:color-mix(in srgb,var(--k-accent,#22d3ee) 5%,transparent)}
.calendar-import .calendar-import-devices{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.5rem}
#calendar-import .calendar-import-devices button.button[aria-pressed="true"]{border-color:var(--k-accent,#22d3ee)!important;background:color-mix(in srgb,var(--k-accent,#22d3ee) 24%,transparent)!important;color:var(--k-text,inherit)!important}
#calendar-import{scroll-margin-top:calc(var(--tarvi-head,0px) + 72px)}
.calendar-import .calendar-import-steps{margin:0;padding-left:1.2rem;display:grid;gap:.35rem}
.calendar-import.is-flash{animation:calendar-import-flash 1.6s ease-out}
@keyframes calendar-import-flash{0%{box-shadow:0 0 0 3px var(--k-accent,#22d3ee)}100%{box-shadow:0 0 0 0 transparent}}
@media (prefers-reduced-motion:reduce){.calendar-import.is-flash{animation:none}}
.calendar-import .calendar-import-bar{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;margin-top:.8rem}
.calendar-import .calendar-import-bar input[type=search]{flex:1 1 12rem;min-width:0}
.calendar-import .calendar-import-check{display:flex;align-items:center;gap:.45rem;margin:0}
.calendar-import .calendar-import-check input{width:auto}
.calendar-import .calendar-import-list{display:grid;gap:.1rem;max-height:min(55vh,28rem);overflow:auto;border:1px solid var(--k-line,rgba(255,255,255,.12));border-radius:12px;padding:.3rem;margin-bottom:.7rem}
.calendar-import .calendar-import-item{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.7rem;align-items:start;padding:.45rem .5rem;border-radius:9px;margin:0;cursor:pointer}
.calendar-import .calendar-import-item:hover{background:var(--k-hover,rgba(255,255,255,.05))}
.calendar-import .calendar-import-item input{width:1.15rem;height:1.15rem;margin:.15rem 0 0}
.calendar-import .calendar-import-item span{display:grid;gap:.1rem;min-width:0}
.calendar-import .calendar-import-item strong{overflow-wrap:anywhere}
.calendar-import .calendar-import-item .help{margin:0}
.calendar-import .calendar-import-item.is-known{opacity:.55;cursor:default}

/* Spotify (SPOTIFY_PLAN.md): Medien › Spotify in the look of the Spotify app – sidebar, big headers, song table,
   player bar with shuffle/repeat state, progress and volume; plus the setup form and the small bar in other tabs. */
#spotify-panel { --sp-bg: #000; --sp-surface: #121212; --sp-raise: #1f1f1f; --sp-hover: #2a2a2a; --sp-text: #fff; --sp-muted: #b3b3b3;
  --sp-green: #1ed760; --sp-green-dark: #1db954; color: var(--sp-text); }
.spotify-app { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas: "side main panel" "on on on" "player player player"; gap: 8px; padding: 8px; border-radius: 16px; background: var(--sp-bg);
  height: calc(100dvh - var(--tarvi-head, 72px) - 40px); min-height: 560px; font-family: inherit; }
.spotify-app.is-empty { display: grid; place-items: center; grid-template: none; min-height: 420px; }
.spotify-connect { text-align: center; max-width: 420px; display: grid; gap: 14px; justify-items: center; }
.spotify-connect h2 { margin: 0; font-size: 2rem; }
.spotify-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--sp-green); -webkit-mask: none; }
.spotify-sidebar { grid-area: side; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; min-height: 0; }
.spotify-side-box { background: var(--sp-surface); border-radius: 10px; padding: 8px 12px; display: grid; gap: 2px; align-content: start; }
.spotify-side-box.is-library { min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); }
.spotify-nav { display: flex; align-items: center; gap: 16px; padding: 10px 8px; border: 0; background: none; color: var(--sp-muted);
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border-radius: 6px; text-align: left; }
.spotify-nav:hover, .spotify-nav.is-current { color: var(--sp-text); }
.spotify-nav .spotify-icon { width: 24px; height: 24px; }
#spotify-playlist-filter { margin: 6px 0 8px; background: var(--sp-raise); border: 1px solid transparent; color: var(--sp-text);
  border-radius: 6px; padding: 7px 10px; font: inherit; font-size: .9rem; width: 100%; }
#spotify-playlist-filter:focus, #spotify-track-filter:focus, .spotify-search input:focus { outline: none; border-color: var(--sp-muted); }
.spotify-sidebar-list { overflow-y: auto; min-height: 0; display: grid; align-content: start; gap: 2px; margin: 0 -4px; }
.spotify-side-item { display: flex; align-items: center; gap: 12px; padding: 6px; border: 0; border-radius: 6px; background: none; color: var(--sp-text);
  font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.spotify-side-item:hover { background: var(--sp-raise); }
.spotify-side-item.is-current { background: var(--sp-hover); }
.spotify-side-item.is-playing strong { color: var(--sp-green); }
.spotify-side-item .spotify-icon.is-eq { color: var(--sp-green); width: 14px; height: 14px; flex: none; }
.spotify-main { grid-area: main; background: linear-gradient(180deg, #2a2a2a 0, var(--sp-surface) 320px); border-radius: 10px; overflow-y: auto; min-height: 0; outline: none; }
.spotify-pad { padding: 20px 24px 28px; }
.spotify-pad.is-tight { padding-top: 0; }
.spotify-greeting { font-size: 2rem; margin: 6px 0 18px; }
.spotify-main h3 { font-size: 1.4rem; margin: 26px 0 14px; }
.spotify-muted { color: var(--sp-muted); margin: 0; }
.spotify-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.spotify-quick { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 0; border: 0; border-radius: 6px; overflow: hidden;
  background: rgba(255, 255, 255, .08); color: var(--sp-text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; min-height: 56px; }
.spotify-quick:hover { background: rgba(255, 255, 255, .16); }
.spotify-quick strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-quick .spotify-cover { border-radius: 0; }
.spotify-quick-play { width: 34px; height: 34px; border-radius: 50%; background: var(--sp-green); color: #000; display: grid; place-items: center; opacity: 0;
  transition: opacity .15s ease; flex: none; }
.spotify-quick:hover .spotify-quick-play, .spotify-quick:focus-visible .spotify-quick-play { opacity: 1; }
.spotify-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.spotify-card-tile { display: grid; gap: 4px; padding: 12px; border-radius: 8px; cursor: pointer; min-width: 0; }
.spotify-card-tile:hover { background: var(--sp-raise); }
.spotify-card-tile strong, .spotify-card-tile > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-card-tile > span { color: var(--sp-muted); font-size: .9rem; }
.spotify-tile-cover { position: relative; margin-bottom: 6px; }
.spotify-tile-cover .spotify-cover { width: 100%; height: auto; aspect-ratio: 1; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.spotify-tile-play { position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--sp-green);
  color: #000; display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .3); }
.spotify-card-tile:hover .spotify-tile-play, .spotify-tile-play:focus-visible { opacity: 1; transform: none; }
.spotify-cover { border-radius: 4px; object-fit: cover; flex: none; background: #333; display: block; }
.spotify-cover.is-round { border-radius: 50%; }
.spotify-liked-cover { width: 40px; height: 40px; border-radius: 4px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #450af5, #c4efd9); }
.spotify-liked-cover.is-big { width: 100%; height: auto; aspect-ratio: 1; }
.spotify-liked-cover.is-hero { width: 200px; height: 200px; }
.spotify-liked-cover.is-big .spotify-icon, .spotify-liked-cover.is-hero .spotify-icon { width: 30%; height: 30%; }
.spotify-quick .spotify-liked-cover { width: 56px; height: 56px; border-radius: 0; }
.spotify-hero { display: flex; align-items: flex-end; gap: 24px; padding: 32px 24px 24px; background: linear-gradient(180deg, rgba(83, 83, 83, .8), rgba(18, 18, 18, 0)); }
.spotify-hero.is-liked { background: linear-gradient(180deg, rgba(80, 56, 160, .9), rgba(18, 18, 18, 0)); }
.spotify-hero .spotify-cover { width: 200px; height: 200px; box-shadow: 0 4px 60px rgba(0, 0, 0, .5); }
.spotify-hero-text { display: grid; gap: 8px; min-width: 0; }
.spotify-hero-text h2 { margin: 0; font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.spotify-kind { font-size: .85rem; font-weight: 600; }
.spotify-actions { display: flex; align-items: center; gap: 22px; padding: 20px 24px; flex-wrap: wrap; }
.spotify-big-play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--sp-green); color: #000; display: grid; place-items: center; cursor: pointer;
  transition: transform .1s ease, background .1s ease; }
.spotify-big-play:hover { transform: scale(1.04); background: #3be477; }
.spotify-big-play .spotify-icon { width: 26px; height: 26px; }
#spotify-track-filter { margin-left: auto; background: rgba(255, 255, 255, .1); border: 1px solid transparent; color: var(--sp-text); border-radius: 4px; padding: 8px 12px; font: inherit; min-width: 220px; }
.spotify-icon { display: inline-block; width: 18px; height: 18px; background: currentColor; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; flex: none; }
.spotify-icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none;
  color: var(--sp-muted); cursor: pointer; padding: 0; }
.spotify-icon-button:hover { color: var(--sp-text); }
.spotify-icon-button.is-on { color: var(--sp-green); }
.spotify-icon-button.is-on::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sp-green); }
.spotify-icon-button.is-one::before { content: "1"; position: absolute; top: 4px; right: 3px; font-size: 9px; font-weight: 800; line-height: 1;
  background: var(--sp-bg); color: var(--sp-green); border-radius: 50%; padding: 1px 2px; }
.spotify-icon-button.is-large { width: 44px; height: 44px; }
.spotify-icon-button.is-large .spotify-icon { width: 28px; height: 28px; }
.spotify-icon-button.is-main { width: 36px; height: 36px; background: var(--sp-text); color: #000; }
.spotify-icon-button.is-main:hover { transform: scale(1.06); color: #000; }
.spotify-table { display: grid; }
.spotify-table-head, .spotify-track { display: grid; grid-template-columns: 40px minmax(0, 4fr) minmax(0, 3fr) 64px 36px; align-items: center; gap: 16px; padding: 0 12px; }
.spotify-table.is-album .spotify-table-head, .spotify-table.is-album .spotify-track { grid-template-columns: 40px minmax(0, 1fr) 0 64px 36px; }
.spotify-table-head { height: 36px; color: var(--sp-muted); font-size: .85rem; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 8px; position: sticky; top: 0;
  background: var(--sp-surface); z-index: 1; }
.spotify-track { min-height: 56px; border-radius: 4px; color: var(--sp-muted); }
.spotify-track:hover, .spotify-track:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.spotify-track.is-current strong, .spotify-track.is-current .spotify-num { color: var(--sp-green); }
.spotify-track-number { position: relative; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.spotify-track-number .spotify-icon.is-eq { color: var(--sp-green); width: 14px; height: 14px; position: absolute; }
.spotify-track.is-current.is-current .spotify-track-number .spotify-icon.is-eq ~ * { display: none; }
.spotify-row-play { display: none; width: 28px; height: 28px; border: 0; background: none; color: var(--sp-text); cursor: pointer; place-items: center; padding: 0; }
.spotify-track:hover .spotify-row-play, .spotify-track:focus-within .spotify-row-play { display: grid; }
.spotify-track:hover .spotify-num, .spotify-track:focus-within .spotify-num, .spotify-track:hover .spotify-track-number .is-eq { display: none; }
.spotify-track-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.spotify-row-text { display: grid; min-width: 0; }
.spotify-row-text strong { color: var(--sp-text); font-weight: 500; }
.spotify-row-text strong, .spotify-row-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-row-text > span { color: var(--sp-muted); font-size: .9rem; }
.spotify-track-album { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-track-time { text-align: right; font-variant-numeric: tabular-nums; }
.spotify-row-queue { width: 32px; height: 32px; border: 0; background: none; color: var(--sp-muted); cursor: pointer; opacity: 0; display: grid; place-items: center; padding: 0; }
.spotify-track:hover .spotify-row-queue, .spotify-row-queue:focus-visible { opacity: 1; }
.spotify-row-queue:hover { color: var(--sp-text); }
.spotify-explicit { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 2px; background: var(--sp-muted); color: #000;
  font-size: 10px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.spotify-link { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.spotify-link:hover { text-decoration: underline; color: var(--sp-text); }
.spotify-link.is-strong { color: var(--sp-text); font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-search { display: flex; align-items: center; gap: 10px; background: var(--sp-raise); border-radius: 500px; padding: 0 16px; max-width: 480px; height: 48px;
  border: 1px solid transparent; color: var(--sp-muted); }
.spotify-search:focus-within { border-color: var(--sp-text); }
.spotify-search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--sp-text); font: inherit; font-size: 1rem; outline: none; }
.spotify-results section { margin-top: 8px; }
.spotify-side-panel { grid-area: panel; width: 320px; background: var(--sp-surface); border-radius: 10px; padding: 14px 16px; overflow-y: auto; min-height: 0;
  display: grid; align-content: start; gap: 10px; }
.spotify-side-panel[hidden] { display: none; }
.spotify-side-panel-head { display: flex; align-items: center; justify-content: space-between; }
.spotify-side-panel h3 { margin: 0; font-size: 1rem; }
.spotify-side-panel h4 { margin: 10px 0 4px; font-size: .95rem; }
.spotify-queue-line { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 4px; }
.spotify-queue-line:hover { background: var(--sp-raise); }
.spotify-devices { display: grid; gap: 8px; }
.spotify-device { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--sp-text); font: inherit;
  background: var(--sp-raise); border: 1px solid transparent; }
.spotify-device:hover { background: var(--sp-hover); }
.spotify-device:disabled { opacity: .5; cursor: not-allowed; }
.spotify-device strong { overflow-wrap: anywhere; }
.spotify-device.is-playing strong { color: var(--sp-green); }
.spotify-device.is-chosen { border-color: var(--sp-green); }
.spotify-device-kind { color: var(--sp-muted); font-size: .85rem; }
.spotify-device-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.spotify-badge { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.spotify-badge.is-playing { background: rgba(30, 215, 96, .18); color: var(--sp-green); }
.spotify-badge.is-chosen { background: rgba(255, 255, 255, .12); color: var(--sp-text); }
.spotify-pill { border: 0; border-radius: 500px; background: var(--sp-green); color: #000; font: inherit; font-weight: 700; padding: 12px 28px; cursor: pointer; }
.spotify-pill:hover { background: #3be477; transform: scale(1.03); }
.spotify-pill.is-outline { background: none; color: var(--sp-text); border: 1px solid #727272; padding: 8px 18px; justify-self: start; }
.spotify-playing-on { grid-area: on; margin: -8px 0 0; padding: 4px 16px; border-radius: 0 0 8px 8px; background: var(--sp-green-dark); color: #000; font-size: .85rem;
  font-weight: 700; text-align: right; }
.spotify-playing-on[hidden] { display: none; }
.spotify-player { grid-area: player; display: grid; grid-template-columns: minmax(180px, 30%) minmax(0, 40%) minmax(180px, 30%); align-items: center; gap: 8px;
  padding: 6px 8px; min-height: 72px; }
.spotify-player-now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.spotify-player-now .spotify-artists { color: var(--sp-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-player-center { display: grid; gap: 6px; justify-items: center; }
.spotify-controls { display: flex; align-items: center; gap: 14px; }
.spotify-progress { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 620px; color: var(--sp-muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.spotify-progress span { min-width: 36px; text-align: center; }
.spotify-player-side { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.spotify-device-button { display: flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--sp-muted); font: inherit; font-size: .8rem; cursor: pointer;
  max-width: 180px; padding: 6px; border-radius: 4px; }
.spotify-device-button:hover { color: var(--sp-text); }
.spotify-device-button.is-on, .spotify-device-button[aria-expanded="true"] { color: var(--sp-green); }
.spotify-device-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* sliders like Spotify (thin, white, green on hover); two ids beat the global blue sliders of layout-modern.css */
#workspace #spotify-panel input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; width: auto; height: 16px; margin: 0; padding: 0; border: 0;
  background: transparent; cursor: pointer; accent-color: var(--sp-green); }
#workspace #spotify-panel input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; box-shadow: none;
  background: linear-gradient(90deg, var(--sp-text) var(--fill, 0%), #4d4d4d var(--fill, 0%)); }
#workspace #spotify-panel input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--sp-green) var(--fill, 0%), #4d4d4d var(--fill, 0%)); }
#workspace #spotify-panel input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%;
  background: var(--sp-text); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); opacity: 0; transform: none; transition: none; }
#workspace #spotify-panel input[type=range]:is(:hover, :focus-visible, :active)::-webkit-slider-thumb { opacity: 1; transform: none; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
#workspace #spotify-panel input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #4d4d4d; box-shadow: none; }
#workspace #spotify-panel input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--sp-text); box-shadow: none; }
#workspace #spotify-panel input[type=range]:hover::-moz-range-progress { background: var(--sp-green); }
#workspace #spotify-panel input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--sp-text); box-shadow: none; }
#workspace #spotify-panel #spotify-volume { flex: 0 1 100px; min-width: 60px; }
.spotify-toast { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); background: #2e77d0; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 5; margin: 0; max-width: 80%; }
.spotify-toast.error { background: #b3261e; }
.spotify-toast[hidden] { display: none; }
/* setup form in Konten & Dienste */
.spotify-steps { margin: 8px 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.spotify-redirect { display: inline-block; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow-wrap: anywhere; user-select: all; margin: 0 6px; }
/* the small bar in other tabs */
.spotify-bar { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; max-width: min(560px, calc(100vw - 32px)); padding: 8px 10px; border-radius: 12px;
  background: rgba(18, 18, 18, .95); color: #fff; border: 1px solid rgba(30, 215, 96, .35); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(12px);
  --sp-text: #fff; --sp-muted: #b3b3b3; }
.spotify-bar .spotify-icon-button { color: #b3b3b3; flex: none; box-sizing: border-box; }
.spotify-bar.has-error { flex-wrap: wrap; }
.spotify-bar-error { flex: 0 0 100%; margin: 2px 0 0; font-size: 12px; line-height: 1.4; color: #ffb4a9; }
.spotify-bar .spotify-icon-button.is-main { background: #fff; color: #000; }
.spotify-bar-text { display: grid; min-width: 0; flex: 1; font-size: .85rem; }
.spotify-bar-text strong, .spotify-bar-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotify-bar-text span { color: #b3b3b3; }
@media (max-width: 1100px) {
  .spotify-app { grid-template-columns: 240px minmax(0, 1fr) auto; }
  .spotify-table-head, .spotify-track { grid-template-columns: 34px minmax(0, 1fr) 0 56px 32px; }
  .spotify-track-album { display: none; }
  .spotify-side-panel { position: absolute; right: 8px; top: 8px; bottom: 100px; z-index: 4; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
}
@media (max-width: 760px) {
  .spotify-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "side" "main" "on" "player";
    height: calc(100dvh - var(--tarvi-head, 64px) - 24px); padding: 6px; gap: 6px; min-height: 480px; }
  .spotify-sidebar { display: flex; gap: 6px; min-width: 0; }
  .spotify-side-box, .spotify-side-box.is-library { display: flex; gap: 2px; padding: 2px 4px; min-width: 0; }
  .spotify-side-box.is-library :is(#spotify-playlist-filter, .spotify-sidebar-list) { display: none; }
  .spotify-nav { padding: 8px 7px; font-size: .85rem; gap: 6px; }
  .spotify-nav .spotify-icon { width: 18px; height: 18px; }
  .spotify-sidebar .spotify-side-box:first-child::after { content: none; }
  .spotify-pad { padding: 14px; }
  .spotify-hero { flex-direction: column; align-items: flex-start; padding: 18px 14px; gap: 14px; }
  .spotify-hero .spotify-cover, .spotify-liked-cover.is-hero { width: 150px; height: 150px; }
  .spotify-actions { padding: 12px 14px; gap: 14px; }
  #spotify-track-filter { margin-left: 0; min-width: 0; width: 100%; }
  .spotify-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotify-quick { min-height: 48px; font-size: .85rem; }
  .spotify-quick .spotify-cover, .spotify-quick .spotify-liked-cover { width: 48px; height: 48px; }
  .spotify-quick-play { display: none; }
  .spotify-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotify-table-head { display: none; }
  .spotify-track { grid-template-columns: 0 minmax(0, 1fr) 0 0 36px; gap: 8px; padding: 0 4px; }
  .spotify-track-number, .spotify-track-time { visibility: hidden; }
  .spotify-row-queue { opacity: 1; }
  .spotify-player { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "now side" "center center"; gap: 4px; }
  .spotify-player-now { grid-area: now; } .spotify-player-side { grid-area: side; } .spotify-player-center { grid-area: center; }
  #spotify-volume, #spotify-mute, .spotify-device-button span:last-child { display: none; }
  .spotify-side-panel { position: absolute; inset: 60px 6px 130px; width: auto; }
  .spotify-bar { bottom: max(76px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .spotify-tile-play, .spotify-quick-play, .spotify-big-play, .spotify-pill { transition: none; } }
/* icons (simple shapes drawn for TARVI) */
.spotify-icon.is-play { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E"); }
.spotify-icon.is-pause { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4v16H6zM14 4h4v16h-4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h4v16H6zM14 4h4v16h-4z'/%3E%3C/svg%3E"); }
.spotify-icon.is-next { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4.5v15l10-7.5zM17 4h2.5v16H17z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4.5v15l10-7.5zM17 4h2.5v16H17z'/%3E%3C/svg%3E"); }
.spotify-icon.is-previous { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4.5v15L9 12zM4.5 4H7v16H4.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4.5v15L9 12zM4.5 4H7v16H4.5z'/%3E%3C/svg%3E"); }
.spotify-icon.is-shuffle { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 3l4 4-4 4V8h-2.2c-1 0-1.9.5-2.5 1.3L8.6 15c-1 1.4-2.6 2.2-4.3 2.2H2v-2h2.3c1 0 1.9-.5 2.5-1.3l3.7-5.6C11.5 6.9 13 6 14.8 6H17zm0 10l4 4-4 4v-3h-2.2c-1.6 0-3.1-.8-4-2.1l-.6-.9 1.2-1.8 1.1 1.6c.5.8 1.4 1.2 2.3 1.2H17zM2 6.8h2.3c1.7 0 3.3.8 4.3 2.2l.3.5-1.2 1.8-.7-1.1C6.4 9.4 5.4 8.8 4.3 8.8H2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 3l4 4-4 4V8h-2.2c-1 0-1.9.5-2.5 1.3L8.6 15c-1 1.4-2.6 2.2-4.3 2.2H2v-2h2.3c1 0 1.9-.5 2.5-1.3l3.7-5.6C11.5 6.9 13 6 14.8 6H17zm0 10l4 4-4 4v-3h-2.2c-1.6 0-3.1-.8-4-2.1l-.6-.9 1.2-1.8 1.1 1.6c.5.8 1.4 1.2 2.3 1.2H17zM2 6.8h2.3c1.7 0 3.3.8 4.3 2.2l.3.5-1.2 1.8-.7-1.1C6.4 9.4 5.4 8.8 4.3 8.8H2z'/%3E%3C/svg%3E"); }
.spotify-icon.is-repeat { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2l4 4-4 4V7H7a2 2 0 0 0-2 2v3H3V9a4 4 0 0 1 4-4h10zM7 22l-4-4 4-4v3h10a2 2 0 0 0 2-2v-3h2v3a4 4 0 0 1-4 4H7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2l4 4-4 4V7H7a2 2 0 0 0-2 2v3H3V9a4 4 0 0 1 4-4h10zM7 22l-4-4 4-4v3h10a2 2 0 0 0 2-2v-3h2v3a4 4 0 0 1-4 4H7z'/%3E%3C/svg%3E"); }
.spotify-icon.is-queue { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h13v2H3zm0 6h13v2H3zm0 6h8v2H3zm15-4v6l5-3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h13v2H3zm0 6h13v2H3zm0 6h8v2H3zm15-4v6l5-3z'/%3E%3C/svg%3E"); }
.spotify-icon.is-device { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 2v8h14V6zM8 18h8v2H8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 2v8h14V6zM8 18h8v2H8z'/%3E%3C/svg%3E"); }
.spotify-icon.is-volume { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E"); }
.spotify-icon.is-muted { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.6 3l2.7-2.7 1.4 1.4-2.7 2.7 2.7 2.7-1.4 1.4-2.7-2.7-2.7 2.7-1.4-1.4 2.7-2.7-2.7-2.7 1.4-1.4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zm13.6 3l2.7-2.7 1.4 1.4-2.7 2.7 2.7 2.7-1.4 1.4-2.7-2.7-2.7 2.7-1.4-1.4 2.7-2.7-2.7-2.7 1.4-1.4z'/%3E%3C/svg%3E"); }
.spotify-icon.is-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6h-2v6H6v-9H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l9 8h-3v9h-5v-6h-2v6H6v-9H3z'/%3E%3C/svg%3E"); }
.spotify-icon.is-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 6 12l4.8 4.8-1.5 1.5-4.8-4.8A7.5 7.5 0 1 1 10.5 3zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 0 1 6 12l4.8 4.8-1.5 1.5-4.8-4.8A7.5 7.5 0 1 1 10.5 3zm0 2a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11z'/%3E%3C/svg%3E"); }
.spotify-icon.is-library { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h2v18H4zm5 0h2v18H9zm4.5.6l1.9-.6 5.6 17.3-1.9.6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h2v18H4zm5 0h2v18H9zm4.5.6l1.9-.6 5.6 17.3-1.9.6z'/%3E%3C/svg%3E"); }
.spotify-icon.is-heart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1.4-1.3C5.4 15 2 11.9 2 8.1 2 5 4.4 2.6 7.5 2.6c1.7 0 3.4.8 4.5 2.1 1.1-1.3 2.8-2.1 4.5-2.1C19.6 2.6 22 5 22 8.1c0 3.8-3.4 6.9-8.6 11.6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1.4-1.3C5.4 15 2 11.9 2 8.1 2 5 4.4 2.6 7.5 2.6c1.7 0 3.4.8 4.5 2.1 1.1-1.3 2.8-2.1 4.5-2.1C19.6 2.6 22 5 22 8.1c0 3.8-3.4 6.9-8.6 11.6z'/%3E%3C/svg%3E"); }
.spotify-icon.is-close { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5L12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6 10.6 12 5 6.4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5L12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6 10.6 12 5 6.4z'/%3E%3C/svg%3E"); }
.spotify-icon.is-open { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14zM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14zM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.spotify-icon.is-eq { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10h3v10H4zm6.5-6h3v16h-3zM17 13h3v7h-3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10h3v10H4zm6.5-6h3v16h-3zM17 13h3v7h-3z'/%3E%3C/svg%3E"); }


.spotify-playlist-dialog { background: #181818; color: #fff; border: 1px solid #444; border-radius: 12px; padding: 24px; width: min(440px, 90vw); max-height: 80dvh; overflow: auto; }
.spotify-playlist-dialog::backdrop { background: #000a; }
.spotify-playlist-choices { display: grid; gap: 10px; margin-block: 16px; }
.spotify-add-track { display: block; margin-left: auto; min-width: 28px; min-height: 28px; font-size: 22px; }
@media (max-width: 700px) { .spotify-track .spotify-track-time { display: block; } .spotify-track-time > span { display: none; } .spotify-track { grid-template-columns: 0 minmax(0, 1fr) 0 32px 36px; } }

/* Playback glyphs stay visible without SVG mask loading and retain contrast under the app theme. */
.spotify-icon.is-play { -webkit-mask: none; mask: none; clip-path: polygon(27% 12%, 90% 50%, 27% 88%); }
.spotify-icon.is-pause { -webkit-mask: none; mask: none; clip-path: polygon(20% 10%, 40% 10%, 40% 90%, 20% 90%, 20% 10%, 60% 10%, 80% 10%, 80% 90%, 60% 90%, 60% 10%); }
#spotify-panel .spotify-icon-button.is-main .spotify-icon, #spotify-bar .spotify-icon-button.is-main .spotify-icon { background-color: #000; color: #000; opacity: 1; visibility: visible; }
#spotify-panel .spotify-icon-button.is-main, #spotify-bar .spotify-icon-button.is-main { background-color: #fff; }

.spotify-main-shell { grid-area: main; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.spotify-main-shell .spotify-main { grid-area: auto; }
.spotify-history { display: flex; gap: 8px; padding: 8px 12px; background: var(--sp-surface); border-radius: 10px; }
.spotify-history button:disabled { opacity: .35; cursor: default; }
.spotify-editor { display: grid; gap: 14px; }
.spotify-editor label { display: grid; gap: 6px; }
.spotify-editor input:not([type=checkbox]), .spotify-editor textarea, .spotify-playlist-dialog input[type=number] { width: 100%; box-sizing: border-box; background: #282828; color: #fff; border: 1px solid #777; border-radius: 6px; padding: 10px; font: inherit; font-size: 16px; }
.spotify-playlist-dialog > button { margin: 8px 8px 8px 0; }
.spotify-like, .spotify-song-menu { min-width: 32px; min-height: 32px; font-size: 22px; }
.spotify-like.is-saved { color: #1ed760; }
.spotify-track-time { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.spotify-table-head, .spotify-track { grid-template-columns: 40px minmax(0, 4fr) minmax(0, 3fr) 168px 36px; }
.spotify-table.is-album .spotify-table-head, .spotify-table.is-album .spotify-track { grid-template-columns: 40px minmax(0, 1fr) 0 132px 36px; }
.spotify-more { margin: 16px 0; }
@media (max-width: 1100px) {
  .spotify-table-head, .spotify-track, .spotify-table.is-album .spotify-table-head, .spotify-table.is-album .spotify-track { grid-template-columns: 34px minmax(0, 1fr) 0 148px 32px; }
}
@media (max-width: 700px) {
  .spotify-table-head { display: none; }
  .spotify-track, .spotify-table.is-album .spotify-track { grid-template-columns: 0 minmax(0, 1fr) 0 100px 28px; gap: 4px; padding: 0 2px; }
  .spotify-track .spotify-track-time { display: flex; flex-wrap: wrap; }
  .spotify-track-time > span { display: none; }
  .spotify-track-time button { min-width: 28px; min-height: 36px; }
  .spotify-history { padding: 8px; }
}

/* Calendar, mail and document workspaces: a focused business UI layer. */
.business-calendar { --cal-line: rgba(113,184,213,.18); --cal-panel: rgba(10,27,43,.78); --cal-muted: #91aabd; --cal-accent: #61d5e8; }
.calendar-hero { position:relative; overflow:hidden; display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:18px; padding:26px 28px; border:1px solid var(--cal-line); border-radius:22px; background:linear-gradient(120deg,rgba(18,57,79,.92),rgba(10,29,46,.92)); box-shadow:0 18px 45px rgba(0,0,0,.18); }
.calendar-hero::after { content:""; position:absolute; width:250px; height:250px; right:-75px; top:-145px; border-radius:50%; border:1px solid rgba(102,218,239,.17); box-shadow:0 0 0 38px rgba(102,218,239,.025),0 0 0 78px rgba(102,218,239,.018); pointer-events:none; }
.calendar-hero-copy,.calendar-hero-actions { position:relative; z-index:1; }
.calendar-hero h1 { margin:0; font-size:clamp(1.75rem,3vw,2.45rem); color:#effbff; }
.calendar-hero-subtitle { margin:7px 0 0; color:#a9c0cf; }
.calendar-hero-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.calendar-hero-actions .button { min-height:43px; }
.business-calendar .dashboard { grid-template-columns:minmax(0,1.7fr) minmax(300px,.78fr); gap:18px; align-items:start; }
.business-calendar .upcoming { grid-column:1; grid-row:1 / span 2; min-width:0; padding:0; overflow:hidden; }
.business-calendar .upcoming>.section-head { padding:24px 25px 4px; }
.business-calendar .reminders { grid-column:2; grid-row:1; }
.business-calendar .create-card { grid-column:2; grid-row:2; position:sticky; top:18px; }
.business-calendar .create-card::before { content:""; display:block; width:38px; height:3px; margin:-10px 0 20px; border-radius:4px; background:linear-gradient(90deg,#66d9e8,#4d91c0); }
.calendar-tools { border-bottom:1px solid var(--cal-line); }
.calendar-tools-top { display:grid; grid-template-columns:auto auto minmax(180px,1fr); align-items:center; gap:12px; padding:10px 25px 16px; }
.calendar-navigation { display:flex; align-items:center; gap:8px; }
.calendar-nav-button { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--cal-line); border-radius:9px; color:#bfe8f2; background:rgba(4,18,30,.45); font-size:1.45rem; }
.calendar-period-title { min-width:190px; margin:0; color:#edfaff; text-align:center; font-size:1rem; }
.calendar-view-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--cal-line); border-radius:10px; background:rgba(4,18,30,.38); }
.calendar-view-switch button { min-height:32px; padding:4px 12px; border:0; border-radius:7px; color:#91aabd; background:transparent; font-size:.8rem; font-weight:750; }
.calendar-view-switch button[aria-pressed="true"] { color:#dffaff; background:rgba(74,175,202,.25); }
.calendar-search-wrap { position:relative; min-width:0; }
.calendar-search-wrap::before { content:"⌕"; position:absolute; left:12px; top:50%; transform:translateY(-53%); color:#73d5e8; font-size:1.2rem; pointer-events:none; }
.calendar-search { min-height:39px; padding:8px 12px 8px 37px; border-radius:999px; background:rgba(4,18,30,.55); }
.calendar-board { min-height:390px; background:rgba(4,17,28,.25); }
.calendar-month-grid { display:grid; grid-template-columns:repeat(7,minmax(82px,1fr)); }
.calendar-weekday { padding:8px 10px; color:#7fa3b5; border-top:1px solid var(--cal-line); border-bottom:1px solid var(--cal-line); font-size:.69rem; font-weight:800; letter-spacing:.1em; text-align:right; text-transform:uppercase; }
.calendar-month-day { min-height:112px; padding:7px; border-right:1px solid var(--cal-line); border-bottom:1px solid var(--cal-line); background:rgba(12,31,47,.28); }
.calendar-month-day:nth-child(7n+7) { border-right:0; }
.calendar-month-day.is-outside { opacity:.42; background:rgba(2,12,21,.2); }
.calendar-month-number { display:grid; place-items:center; width:28px; height:28px; margin:0 0 5px auto; padding:0; border:0; border-radius:50%; color:#c6dbe5; background:transparent; font-size:.78rem; }
.calendar-month-day.is-today .calendar-month-number { color:#061a28; background:#78dfeb; font-weight:800; box-shadow:0 0 15px rgba(97,213,232,.3); }
.calendar-event-pill { display:flex; align-items:center; gap:5px; width:100%; min-width:0; margin:3px 0; padding:5px 7px; border:0; border-left:3px solid #63d6e8; border-radius:5px; color:#dff8fd; background:rgba(39,139,169,.22); text-align:left; font-size:.7rem; }
.calendar-event-pill:hover { background:rgba(53,161,192,.34); }
.calendar-event-time { flex:none; color:#79dcea; font-variant-numeric:tabular-nums; }
.calendar-event-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-more { display:block; padding:2px 7px; color:#84abba; font-size:.69rem; }
.calendar-week-grid { display:grid; grid-template-columns:repeat(7,minmax(100px,1fr)); min-height:390px; overflow-x:auto; }
.calendar-week-column { min-width:100px; padding:8px; border-right:1px solid var(--cal-line); }
.calendar-week-column:last-child { border-right:0; }
.calendar-week-column.is-today { background:rgba(42,145,174,.09); }
.calendar-week-head { display:flex; align-items:center; justify-content:center; gap:7px; width:100%; padding:8px; border:0; color:#93b2c1; background:transparent; text-transform:uppercase; }
.calendar-week-head strong { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; color:#eefbff; font-size:.9rem; }
.calendar-week-column.is-today .calendar-week-head strong { color:#061a28; background:#78dfeb; }
.calendar-day-empty { display:block; padding:15px 3px; color:#668798; font-size:.7rem; text-align:center; }
.calendar-day-view { max-height:560px; overflow:auto; }
.calendar-hour-row { display:grid; grid-template-columns:60px 1fr; min-height:54px; }
.calendar-hour-label { padding:5px 10px 0 0; color:#6f94a6; border-right:1px solid var(--cal-line); font-size:.7rem; text-align:right; }
.calendar-hour-slot { padding:2px 12px; border-bottom:1px solid var(--cal-line); }
.calendar-hour-slot .calendar-event-pill { max-width:520px; padding:8px 10px; font-size:.78rem; }
.calendar-results { margin:0; padding:9px 25px; color:#8faabd; border-top:1px solid var(--cal-line); border-bottom:1px solid var(--cal-line); font-size:.78rem; }
.business-calendar #event-list { gap:0; padding:4px 25px 24px; }
.business-calendar #event-list>.item { position:relative; margin-left:88px; padding:16px 17px 16px 20px; border:0; border-bottom:1px solid var(--cal-line); border-radius:0; background:transparent; }
.business-calendar #event-list>.item::after { content:""; position:absolute; left:-18px; top:21px; width:8px; height:8px; border-radius:50%; background:#62d3e5; box-shadow:0 0 0 4px rgba(98,211,229,.1); }
.business-calendar #event-list>.item::before { content:attr(data-day-label); position:absolute; right:calc(100% + 28px); top:16px; width:70px; color:#87a8ba; font-size:.72rem; font-weight:780; text-align:right; text-transform:uppercase; letter-spacing:.06em; }
.business-calendar #event-list>.item:not(.calendar-day-start)::before { content:""; }
.calendar-form-close { display:none; float:right; margin-top:-5px; }

/* Business mail: compact navigation/list, focused reading pane and compose workspace. */
#mail-panel .mail-grid { grid-template-columns:minmax(275px,.78fr) minmax(360px,1.25fr) minmax(300px,.9fr); gap:14px; align-items:stretch; }
#mail-panel .card { border-radius:16px; }
#mail-panel .mail-inbox,#mail-panel .mail-detail,#mail-panel .mail-compose { min-width:0; min-height:650px; padding:22px; }
#mail-panel .mail-compose { grid-column:auto; }
#mail-panel .mail-folders { margin:-5px -5px 18px; padding:5px 5px 15px; border-bottom:1px solid rgba(109,180,209,.18); }
#mail-panel .mail-folders .button { flex:1; justify-content:flex-start; }
#mail-panel .mail-inbox .section-head h2 { font-size:1.15rem; }
#mail-panel #mail-list { gap:5px; max-height:520px; overflow:auto; padding-right:3px; }
#mail-panel .mail-row { position:relative; gap:4px; padding:13px 12px 13px 15px; border:0; border-left:3px solid transparent; border-radius:8px; background:transparent; }
#mail-panel .mail-row:hover,#mail-panel .mail-row:focus-visible { border-left-color:#61d5e8; background:rgba(39,126,151,.2); }
#mail-panel .mail-row-subject { color:#effaff; font-weight:750; }
#mail-panel .mail-row-from { order:-1; color:#a9c5d2; font-weight:650; }
#mail-panel .mail-row-date { font-size:.72rem; }
#mail-panel .mail-detail { background:linear-gradient(145deg,rgba(17,40,59,.96),rgba(10,27,43,.94)); }
#mail-panel #mail-message { margin-top:18px; }
#mail-panel .mail-body { max-height:500px; padding:22px; border:0; border-radius:10px; background:rgba(4,17,28,.55); line-height:1.7; }
#mail-panel .mail-compose form { display:grid; }
#mail-panel .mail-compose textarea { min-height:245px; line-height:1.6; }

/* Document management keeps the explorer tree while improving hierarchy and reading. */
#documents-panel>.section-head { margin-bottom:16px; }
#documents-panel .documents-layout { grid-template-columns:minmax(310px,.72fr) minmax(0,1.45fr); gap:14px; }
#documents-panel .documents-layout>.card { min-height:650px; border-radius:16px; }
#documents-panel .documents-layout>.card:first-child { padding:20px; background:linear-gradient(145deg,rgba(12,31,47,.96),rgba(8,24,39,.94)); }
#documents-panel .documents-layout>.card:last-child { padding:26px 30px; }
#documents-panel #documents-search { padding-left:14px; border-radius:999px; }
#documents-panel .documents-tree { max-height:430px; margin:14px -6px 0; padding:5px 6px 20px; }
#documents-panel .documents-tree details { position:relative; margin:2px 0 2px 10px; padding-left:13px; border-left:1px solid rgba(108,188,213,.25); }
#documents-panel .documents-tree summary { position:relative; padding:7px 7px 7px 23px; border-radius:7px; color:#c7e0e9; list-style:none; }
#documents-panel .documents-tree summary::-webkit-details-marker { display:none; }
#documents-panel .documents-tree summary::before { content:"▸"; position:absolute; left:5px; color:#6ed6e8; }
#documents-panel .documents-tree details[open]>summary::before { content:"▾"; }
#documents-panel .documents-tree summary::after { content:""; display:inline-block; width:13px; height:9px; margin-left:7px; border:1px solid #d0b464; border-top:4px solid #d0b464; border-radius:2px; opacity:.8; }
#documents-panel .documents-file { position:relative; margin:2px 0 2px 12px; padding:8px 9px 8px 30px; border:0; border-radius:7px; color:#bcd2dd; background:transparent; }
#documents-panel .documents-file::before { content:""; position:absolute; left:10px; top:10px; width:11px; height:14px; border:1px solid #75cddd; border-radius:2px; background:rgba(70,170,197,.1); }
#documents-panel .documents-file:hover,#documents-panel .documents-file[aria-current="true"] { color:#edfbff; background:rgba(46,139,167,.24); }
#documents-panel .documents-file[aria-current="true"] { box-shadow:inset 3px 0 #61d5e8; }
#documents-panel .documents-content { max-height:470px; padding:24px; border:1px solid rgba(109,180,209,.16); border-radius:10px; color:#d6e6ed; background:rgba(4,16,27,.5); font: .92rem/1.72 ui-sans-serif,system-ui,sans-serif; }
#documents-panel #documents-detail-meta { padding-bottom:13px; border-bottom:1px solid rgba(109,180,209,.16); }

@media (max-width:1100px) {
  #mail-panel .mail-grid { grid-template-columns:minmax(260px,.75fr) minmax(0,1.25fr); }
  #mail-panel .mail-compose { grid-column:1 / -1; min-height:0; }
  .calendar-tools-top { grid-template-columns:1fr auto; }
  .calendar-search-wrap { grid-column:1 / -1; }
}
@media (max-width:960px) {
  .business-calendar .dashboard { grid-template-columns:1fr; }
  .business-calendar .upcoming,.business-calendar .reminders,.business-calendar .create-card { grid-column:1; grid-row:auto; }
  .business-calendar .upcoming { order:1; }
  .business-calendar .reminders { order:2; }
  .business-calendar .create-card { order:3; position:static; }
  #documents-panel .documents-layout { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .calendar-hero { display:block; padding:21px 18px; }
  .calendar-hero-actions { justify-content:flex-start; margin-top:18px; }
  .calendar-hero-actions .button { flex:1; }
  .calendar-tools-top { display:flex; align-items:stretch; flex-direction:column; padding:10px 15px 15px; }
  .calendar-navigation { justify-content:space-between; }
  .calendar-period-title { min-width:0; flex:1; }
  .calendar-view-switch { align-self:stretch; }
  .calendar-view-switch button { flex:1; }
  .calendar-month-grid { min-width:630px; }
  .calendar-board { overflow-x:auto; }
  .calendar-month-day { min-height:92px; }
  .calendar-event-pill { display:block; height:8px; padding:0; border:0; border-radius:5px; font-size:0; background:#57cce1; }
  .calendar-week-grid .calendar-event-pill,.calendar-day-view .calendar-event-pill { display:flex; height:auto; padding:6px; font-size:.68rem; }
  .business-calendar #event-list { padding-left:15px; padding-right:15px; }
  .business-calendar #event-list>.item { margin-left:52px; padding-left:15px; }
  .business-calendar #event-list>.item::before { right:calc(100% + 24px); width:37px; font-size:.61rem; }
  .calendar-form-close { display:inline-flex; }
  .business-calendar .create-card:not(.calendar-form-open) { display:none; }
  #mail-panel .mail-grid { grid-template-columns:1fr; }
  #mail-panel .mail-inbox,#mail-panel .mail-detail,#mail-panel .mail-compose { min-height:0; }
  #mail-panel .mail-compose { grid-column:1; }
  #documents-panel .documents-layout>.card:last-child { padding:20px; }
}

/* Progressive focus/fullscreen modes for live nodes. Kept separate from graph geometry. */
.live-focus-toolbar{position:absolute;z-index:34;left:50%;top:58px;display:flex;align-items:center;gap:10px;max-width:calc(100% - 28px);padding:7px 9px 7px 14px;border:1px solid rgba(111,220,237,.4);border-radius:999px;background:rgba(5,20,32,.94);box-shadow:0 14px 40px rgba(0,0,0,.42)}
.live-focus-toolbar[hidden]{display:none}.live-focus-toolbar strong{color:#e9fbff;white-space:nowrap}.live-focus-toolbar .button{min-height:32px}
/* Enlarge, don't zoom: the graph (live-graph.js, TarviLiveGraph.emphasize) scales and shifts the
   nodes and card columns inside their inline transform, in the same frame as the links. CSS only
   dims, glows and stacks, and never transitions `transform`, which the graph animates itself. */
.live-node,.live-cards{will-change:transform;transition:opacity 300ms ease-out}
.live-cards{transform-origin:left center}.live-cards.left{transform-origin:right center}
.live-node-enlarged .live-node,.live-node-enlarged .live-cards{opacity:.6}
.live-node-enlarged .live-node.is-focused{opacity:1;z-index:31!important;filter:drop-shadow(0 0 20px rgba(91,220,238,.5))}
.live-node-enlarged .live-cards.is-focused{opacity:1;z-index:32!important;border-radius:14px;filter:drop-shadow(0 18px 30px rgba(0,0,0,.42))}
.live-node-focused .live-node:not(.is-focused),.live-node-focused .live-cards:not(.is-focused),.live-node-focused .live-graph-links,.live-node-focused .live-strip{visibility:hidden!important;pointer-events:none!important}
.live-node-focused .voice-orb-wrap{visibility:hidden;pointer-events:none}
.live-node.is-focused{z-index:31!important;opacity:1;filter:drop-shadow(0 0 20px rgba(91,220,238,.5))}
.live-cards.is-focused{z-index:32!important;border-radius:14px;filter:drop-shadow(0 18px 30px rgba(0,0,0,.42))}
.live-focus-toolbar{transform:translateX(-50%)}
.live-node.voice-closed,.live-cards.voice-closed{display:none!important}
.live-view-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.live-area-overlay{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;padding:14px;background:rgba(2,10,18,.9);backdrop-filter:blur(14px)}
.live-area-overlay[hidden]{display:none}.live-area-overlay-head{display:flex;align-items:center;gap:16px;min-height:58px;padding:8px 14px;border:1px solid rgba(110,202,225,.23);border-bottom:0;border-radius:18px 18px 0 0;background:#0b2031}
.live-area-overlay-head h2{margin:0;color:#eefcff}.live-area-overlay-head span{flex:1;color:#88a9b9;font-size:.78rem;text-align:right}.live-area-overlay-body{flex:1;min-height:0;overflow:auto;padding:18px;border:1px solid rgba(110,202,225,.23);border-radius:0 0 18px 18px;background:linear-gradient(145deg,#081a2a,#061521)}
.live-area-overlay-body>section{display:block!important;max-width:1500px;margin:0 auto}.live-overlay-open{overflow:hidden}
.live-node-overlay-snapshot{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:24px;min-height:100%;padding:38px 16px}
.live-node-overlay-snapshot .live-node{position:relative!important;left:auto!important;top:auto!important;opacity:1!important;transform:scale(1.35)!important;pointer-events:none}
.live-node-overlay-snapshot .live-cards{position:relative!important;left:auto!important;top:auto!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px;width:min(100%,1000px);max-height:none!important;opacity:1!important;transform:none!important}
@media(max-width:720px){.live-focus-toolbar{top:52px;gap:5px;padding-left:10px}.live-focus-toolbar .button{padding-inline:9px}.live-area-overlay{padding:0}.live-area-overlay-head{border-radius:0;padding:7px 10px}.live-area-overlay-head span{display:none}.live-area-overlay-body{padding:10px;border-radius:0}.live-node-overlay-snapshot{padding-top:28px}}
@media(prefers-reduced-motion:reduce){.live-node,.live-cards{transition:none!important}}
/* The selected cards remain readable on phones, where overview cards are hidden. */
@media(max-width:820px){.live-node-focused .live-cards.is-focused{display:flex!important;width:180px}.live-focus-toolbar strong{overflow:hidden;text-overflow:ellipsis}.live-focus-toolbar .button{min-height:44px;flex-shrink:0}}
/* Tarvi's mind movie (live.js showThought): short silent clips, large and soft behind the circle as if she had them in
   her head; dark parts and black bars vanish into the stage (screen), the edges fade out far, no frame */
.live-thought{position:absolute;z-index:1;width:min(1120px,82%);aspect-ratio:16/9;transform:translate(-50%,-50%);pointer-events:none;transition:opacity 1.6s ease}
.live-thought.crowded,.live-thought.leaving{opacity:0}
.live-thought-clip{position:absolute;inset:0;opacity:0;transition:opacity 2.6s ease;mix-blend-mode:screen;filter:blur(.6px) saturate(1.2);
  -webkit-mask-image:radial-gradient(ellipse 50% 50% at 50% 50%,#000 6%,rgba(0,0,0,.8) 24%,rgba(0,0,0,.4) 46%,rgba(0,0,0,.12) 62%,transparent 76%);
  mask-image:radial-gradient(ellipse 50% 50% at 50% 50%,#000 6%,rgba(0,0,0,.8) 24%,rgba(0,0,0,.4) 46%,rgba(0,0,0,.12) 62%,transparent 76%)}
.live-thought-clip.shown{opacity:.5}
.live-thought-clip iframe{position:absolute;left:-6%;top:-8%;width:112%;height:116%;border:0}
.live-thought-label{position:absolute;left:50%;bottom:9%;transform:translateX(-50%);color:rgba(189,244,255,.38);font:700 .62rem/1 ui-monospace,Menlo,monospace;letter-spacing:.34em;text-transform:uppercase;white-space:nowrap;opacity:0;transition:opacity 2s ease}
.live-thought:has(.live-thought-clip.shown) .live-thought-label{opacity:1}
@media(max-width:820px){.live-thought{width:180%}.live-thought-label{bottom:19%}}
@media(prefers-reduced-motion:reduce){.live-thought,.live-thought-clip,.live-thought-label{transition:none}}

/* Workflows: overview, graph editor (canvas, list, side panel), dialogs. Tokens from ui-system.css (--k-*). */
#workflows-panel { --wf-canvas: rgba(0, 0, 0, .22); --wf-grid: rgba(147, 164, 181, .13); --wf-node: #0f1b28; --wf-line: rgba(255, 255, 255, .16);
  --g-trigger: #f5b25b; --g-tarvi: var(--k-accent, #62d2f0); --g-notify: #7fc8ff; --g-logic: #a9b6ff; --g-data: #8fd6b4; --g-ai: #d6a8ff; --g-ext: #f2a08e; }
#workflows-panel .wf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#workflows-panel .wf-segments { margin: 4px 0 12px; }
#workflows-panel .wf-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--k-accent); color: var(--k-accent-ink); font-size: .7rem; font-weight: 700; }
#workflows-panel .wf-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
#workflows-panel .wf-overview > div { display: flex; }
#workflows-panel .wf-template-gallery { display: grid; }
#workflows-panel .wf-sub { margin: 28px 0 10px; font-size: 1.05rem; }
#workflows-panel .wf-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 16px 0 10px; }
#workflows-panel .wf-filters input, #workflows-panel .wf-filters select { width: auto; min-width: 180px; }
#workflows-panel .wf-filters .help { margin: 0; }
#workflows-panel .wf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
#workflows-panel .wf-card { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px 16px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); background: var(--k-surface); color: var(--k-text); cursor: pointer; transition: border-color 160ms ease, transform 160ms var(--k-ease-out); }
#workflows-panel .wf-card:active { transform: scale(.98); }
#workflows-panel .wf-card[aria-pressed="true"], #workflows-panel .wf-card:hover { border-color: var(--k-accent); }
#workflows-panel .wf-card small { color: var(--k-muted); }
#workflows-panel .wf-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--k-line-strong); color: var(--k-muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
#workflows-panel .wf-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#workflows-panel .wf-pill[data-state="active"] { color: #6fdc9c; }
#workflows-panel .wf-pill[data-state="draft"] { color: var(--k-warn); }
#workflows-panel .wf-pill[data-state="paused"], #workflows-panel .wf-pill[data-state="disabled"] { color: var(--k-faint); }

/* editor bar */
#workflows-panel .wf-editor { display: flex; flex-direction: column; gap: 10px; }
#workflows-panel .wf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 0; border-top: 1px solid var(--k-line); }
#workflows-panel .wf-title { flex: 1 1 220px; min-width: 0; max-width: 420px; margin: 0; padding: 5px 8px; border: 1px solid transparent; background: transparent; font-size: 1.05rem; font-weight: 650; }
#workflows-panel .wf-title:hover, #workflows-panel .wf-title:focus { border-color: var(--k-line-strong); background: rgba(0, 0, 0, .28); }
#workflows-panel #wf-dirty { margin: 0; color: var(--k-warn); font-size: .8rem; }
#workflows-panel .wf-bar-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
#workflows-panel .wf-menu { display: grid; gap: 6px; max-width: 360px; margin-left: auto; padding: 14px; }
#workflows-panel .wf-menu .button { justify-content: flex-start; }
#workflows-panel .wf-menu[hidden] { display: none; }

/* work area */
#workflows-panel .wf-work { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; height: clamp(460px, calc(100vh - 290px), 900px); }
#workflows-panel .wf-stage { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--k-line); border-radius: var(--k-radius); background-color: var(--wf-canvas); background-image: radial-gradient(var(--wf-grid) 1.1px, transparent 1.2px); background-size: 22px 22px; touch-action: none; cursor: grab; user-select: none; }
#workflows-panel .wf-stage.panning { cursor: grabbing; }
#workflows-panel .wf-stage.linking { cursor: crosshair; }
#workflows-panel .wf-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#workflows-panel .wf-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#workflows-panel .wf-edge { fill: none; stroke: var(--wf-line); stroke-width: 2; transition: stroke 200ms ease; }
#workflows-panel .wf-edge.hot { stroke: var(--k-accent); }
#workflows-panel .wf-edge.skip { stroke-dasharray: 4 5; opacity: .6; }
#workflows-panel .wf-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#workflows-panel .wf-tile { --g: var(--g-tarvi); width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--g); background: color-mix(in srgb, var(--g) 16%, transparent); }
#workflows-panel .g-trigger { --g: var(--g-trigger); } #workflows-panel .g-tarvi { --g: var(--g-tarvi); } #workflows-panel .g-notify { --g: var(--g-notify); }
#workflows-panel .g-logic { --g: var(--g-logic); } #workflows-panel .g-data { --g: var(--g-data); } #workflows-panel .g-ai { --g: var(--g-ai); } #workflows-panel .g-ext { --g: var(--g-ext); }
#workflows-panel .g-trigger .wf-tile, #workflows-panel .wf-tile.g-trigger { --g: var(--g-trigger); }
#workflows-panel .wf-node { position: absolute; box-sizing: border-box; width: 232px; display: grid; grid-template-rows: auto 1fr auto; gap: 5px; padding: 10px 12px 9px; border: 1px solid var(--k-line-strong); border-radius: 14px; background: var(--wf-node); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); cursor: pointer; transition: border-color 160ms ease, box-shadow 200ms ease, opacity 200ms ease; }
#workflows-panel :is(.wf-node, .wf-li, .wf-opt) .wf-tile { --g: inherit; }
#workflows-panel .wf-node.trigger { border-radius: 26px 14px 14px 26px; }
#workflows-panel .wf-node.sel { border-color: var(--k-accent); box-shadow: 0 0 0 3px var(--k-accent-soft), 0 10px 28px rgba(0, 0, 0, .3); }
#workflows-panel .wf-node.off { opacity: .5; }
#workflows-panel .wf-node.loose { border-style: dashed; }
#workflows-panel .wf-node.s-skip { opacity: .45; }
#workflows-panel .wf-node.s-run::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--k-accent); border-radius: inherit; pointer-events: none; animation: wf-pulse 900ms var(--k-ease-out) infinite; }
@keyframes wf-pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.04); } }
#workflows-panel .wf-node-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
#workflows-panel .wf-node-name { overflow: hidden; font-weight: 640; font-size: .85rem; white-space: nowrap; text-overflow: ellipsis; }
#workflows-panel .wf-say { display: -webkit-box; overflow: hidden; padding-right: 44px; color: var(--k-muted); font-size: .78rem; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#workflows-panel .wf-node-foot { display: flex; align-items: center; gap: 6px; min-height: 18px; color: var(--k-faint); font-size: .72rem; }
#workflows-panel .wf-node-state { margin-left: auto; font-weight: 600; white-space: nowrap; }
#workflows-panel .s-ok .wf-node-state, #workflows-panel .s-ok .wf-li-state { color: #6fdc9c; }
#workflows-panel .s-ask .wf-node-state, #workflows-panel .s-ask .wf-li-state { color: var(--k-warn); }
#workflows-panel .s-error { border-color: var(--k-danger); }
#workflows-panel .s-error .wf-node-state, #workflows-panel .s-error .wf-li-state { color: var(--k-danger); }
#workflows-panel .wf-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--k-muted); }
#workflows-panel .wf-badge .wf-icon { width: 13px; height: 13px; }
#workflows-panel .wf-badge.lock { color: var(--k-warn); }
#workflows-panel .wf-badge.auto { color: var(--k-accent); }
#workflows-panel .wf-port { position: absolute; right: -7px; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--k-line-strong); border-radius: 50%; background: var(--wf-node); transform: translateY(-50%); }
#workflows-panel .wf-port.out { cursor: crosshair; }
#workflows-panel .wf-port.out:hover { border-color: var(--k-accent); }
#workflows-panel .wf-port.in { right: auto; left: -7px; }
#workflows-panel .wf-port-label { position: absolute; right: 10px; padding-left: 4px; background: var(--wf-node); color: var(--k-muted); font-size: .7rem; font-weight: 600; transform: translateY(-50%); }
#workflows-panel .wf-plus { position: absolute; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px dashed var(--k-line-strong); border-radius: 50%; background: var(--k-surface); color: var(--k-muted); transform: translate(-50%, -50%); cursor: pointer; transition: transform 140ms var(--k-ease-out), color 140ms ease, border-color 140ms ease, opacity 140ms ease; }
#workflows-panel .wf-plus .wf-icon { width: 14px; height: 14px; }
#workflows-panel .wf-plus:hover, #workflows-panel .wf-plus:focus-visible { border-color: var(--k-accent); border-style: solid; color: var(--k-accent); transform: translate(-50%, -50%) scale(1.12); }
#workflows-panel .wf-plus.mid { opacity: 0; }
#workflows-panel .wf-plus.cut:hover { border-color: var(--k-danger); color: var(--k-danger); }
#workflows-panel .wf-stage:hover .wf-plus.mid, #workflows-panel .wf-plus.mid:focus-visible { opacity: .85; }
#workflows-panel .wf-sticky { position: absolute; width: 240px; box-sizing: border-box; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--k-warn) 30%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--k-warn) 12%, var(--wf-node)); font-size: .8rem; cursor: move; }
#workflows-panel .wf-sticky strong { display: block; margin-bottom: 3px; color: var(--k-warn); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
#workflows-panel .wf-sticky p { margin: 0; outline: none; cursor: text; }
#workflows-panel .wf-sticky-x { position: absolute; top: 6px; right: 6px; padding: 2px; border: 0; background: transparent; color: var(--k-faint); cursor: pointer; }
#workflows-panel .wf-sticky-x .wf-icon { width: 13px; height: 13px; }
#workflows-panel .wf-tools { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 2px; padding: 4px; border: 1px solid var(--k-line); border-radius: 11px; background: var(--k-surface); }
#workflows-panel .wf-tools button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--k-muted); font-size: 1rem; cursor: pointer; }
#workflows-panel .wf-tools button:hover { background: rgba(255, 255, 255, .07); color: var(--k-text); }
#workflows-panel .wf-zoom { align-self: center; min-width: 44px; color: var(--k-faint); font: 500 .75rem ui-monospace, SFMono-Regular, monospace; text-align: center; font-variant-numeric: tabular-nums; }
#workflows-panel .wf-legend { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 12px; padding: 7px 11px; border: 1px solid var(--k-line); border-radius: 11px; background: var(--k-surface); color: var(--k-muted); font-size: .75rem; }
#workflows-panel .wf-legend > span { display: inline-flex; align-items: center; gap: 5px; }

/* list view */
#workflows-panel .wf-outline { min-height: 0; overflow: auto; padding: 6px 0; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workflows-panel .wf-li { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 14px 10px calc(14px + var(--depth, 0) * 18px); border: 0; border-bottom: 1px solid var(--k-line); background: transparent; color: var(--k-text); text-align: left; cursor: pointer; }
#workflows-panel .wf-li.sel { background: var(--k-accent-soft); }
#workflows-panel .wf-li.s-skip { opacity: .5; }
#workflows-panel .wf-li-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
#workflows-panel .wf-li-text span { color: var(--k-muted); font-size: .82rem; overflow-wrap: anywhere; }
#workflows-panel .wf-li-state { color: var(--k-faint); font-size: .75rem; font-weight: 600; white-space: nowrap; }
#workflows-panel .wf-branch { display: flex; align-items: center; gap: 8px; padding: 8px 14px 4px calc(14px + var(--depth, 0) * 18px); color: var(--k-faint); font-size: .75rem; font-weight: 650; }
#workflows-panel .wf-branch::after { content: ""; flex: 1; height: 1px; background: var(--k-line); }
#workflows-panel .wf-li-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px 10px calc(14px + var(--depth, 0) * 18px); border: 0; background: transparent; color: var(--k-muted); text-align: left; cursor: pointer; }
#workflows-panel .wf-li-add:hover { color: var(--k-accent); }

/* side panel */
#workflows-panel .wf-panel { display: flex; flex-direction: column; width: 400px; min-height: 0; overflow: hidden; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workflows-panel .wf-panel[hidden] { display: none; }
#workflows-panel .wf-phead { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; }
#workflows-panel .wf-ptitle { display: grid; flex: 1; min-width: 0; }
#workflows-panel .wf-ptitle strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#workflows-panel .wf-ptitle span { color: var(--k-faint); font-size: .75rem; }
#workflows-panel .wf-ptabs { margin: 0 14px; }
#workflows-panel .wf-ptabs button { flex: 1; }
#workflows-panel .wf-pbody { display: grid; flex: 1; align-content: start; gap: 12px; overflow: auto; padding: 14px; }
#workflows-panel .wf-pfoot { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--k-line); }
#workflows-panel .wf-say-big { margin: 0; padding: 10px 12px; border: 1px solid var(--k-line); border-radius: 10px; background: rgba(0, 0, 0, .22); }
#workflows-panel .wf-fld { display: grid; gap: 5px; min-width: 0; }
#workflows-panel .wf-fld label, #workflows-panel .wf-label { margin: 0; color: var(--k-muted); font-size: .8rem; font-weight: 600; }
#workflows-panel .wf-fld input, #workflows-panel .wf-fld select, #workflows-panel .wf-fld textarea, #workflows-panel .wf-pbody textarea { box-sizing: border-box; width: 100%; margin: 0; }
#workflows-panel .wf-formula { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; }
#workflows-panel .wf-preview { margin: 0; color: var(--k-faint); font-size: .75rem; overflow-wrap: anywhere; }
#workflows-panel .wf-preview strong { color: #6fdc9c; font-weight: 500; }
#workflows-panel .wf-days { display: flex; flex-wrap: wrap; gap: 6px; }
#workflows-panel .wf-days label { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
#workflows-panel .wf-cond { display: grid; gap: 8px; }
#workflows-panel .wf-rule { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--k-line); border-radius: 10px; }
#workflows-panel .wf-rule-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
#workflows-panel .wf-rule select, #workflows-panel .wf-rule input, #workflows-panel .wf-cond > select { width: 100%; margin: 0; box-sizing: border-box; }
#workflows-panel .wf-adv summary { color: var(--k-muted); font-size: .85rem; font-weight: 600; cursor: pointer; }
#workflows-panel .wf-adv[open] summary { margin-bottom: 10px; }
#workflows-panel .wf-note { margin: 0; padding: 9px 11px; border: 1px dashed var(--k-line-strong); border-radius: 9px; color: var(--k-muted); font-size: .8rem; }
#workflows-panel .wf-note.warn { border-color: color-mix(in srgb, var(--k-warn) 40%, transparent); color: var(--k-warn); }
#workflows-panel .wf-note.error { border-color: color-mix(in srgb, var(--k-danger) 45%, transparent); color: var(--k-danger); }
#workflows-panel .wf-note .wf-icon { width: 14px; height: 14px; vertical-align: -2px; }
#workflows-panel .wf-src h4, #workflows-panel .wf-pbody h4 { margin: 4px 0 6px; color: var(--k-faint); font-size: .75rem; font-weight: 600; letter-spacing: .03em; }
#workflows-panel .wf-chip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; width: 100%; margin: 0 0 4px; padding: 6px 9px; border: 1px solid var(--k-line); border-radius: 8px; background: rgba(0, 0, 0, .2); color: var(--k-text); text-align: left; cursor: grab; }
#workflows-panel .wf-chip:hover { border-color: var(--k-accent); }
#workflows-panel .wf-chip strong { color: var(--k-accent); font-size: .8rem; white-space: nowrap; }
#workflows-panel .wf-chip span { overflow: hidden; color: var(--k-muted); font: .75rem ui-monospace, SFMono-Regular, monospace; white-space: nowrap; text-overflow: ellipsis; }
#workflows-panel .wf-table { width: 100%; border-collapse: collapse; font-size: .8rem; table-layout: fixed; }
#workflows-panel .wf-table th, #workflows-panel .wf-table td { padding: 6px 4px; border-bottom: 1px solid var(--k-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
#workflows-panel .wf-table th { width: 38%; color: var(--k-muted); font-weight: 600; }
#workflows-panel .wf-table td { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .75rem; }
#workflows-panel .wf-tax-review .wf-table th { width: auto; }
#workflows-panel .wf-tax-file-info { min-width: 0; overflow-wrap: anywhere; }
#workflows-panel .wf-empty { display: grid; gap: 10px; justify-items: center; padding: 18px 6px; color: var(--k-muted); text-align: center; }

/* dialogs */
#workflows-panel .wf-scrim { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px 16px; background: rgba(2, 8, 14, .6); }
#workflows-panel .wf-scrim[hidden] { display: none; }
#workflows-panel .wf-dialog { display: grid; gap: 10px; width: min(640px, 100%); max-height: min(84vh, 780px); overflow: auto; box-sizing: border-box; animation: wf-pop 220ms var(--k-ease-out); }
@keyframes wf-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#workflows-panel .wf-dialog h2 { margin: 0; }
#workflows-panel .wf-dialog h3 { margin: 6px 0 2px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--k-faint); }
#workflows-panel .wf-dialog > input[type="search"] { width: 100%; box-sizing: border-box; }
#workflows-panel .wf-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
#workflows-panel .wf-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--k-line); border-radius: 10px; background: rgba(0, 0, 0, .2); color: var(--k-text); text-align: left; cursor: pointer; }
#workflows-panel .wf-opt:hover, #workflows-panel .wf-opt:focus-visible { border-color: var(--k-accent); }
#workflows-panel .wf-opt-text { display: grid; flex: 1; min-width: 0; }
#workflows-panel .wf-opt-text strong { font-size: .85rem; }
#workflows-panel .wf-opt-text span { color: var(--k-muted); font-size: .75rem; }
#workflows-panel .wf-review-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
#workflows-panel .wf-runs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#workflows-panel .wf-result { padding: 12px; border-bottom: 1px solid var(--k-line); overflow-wrap: anywhere; }
#workflows-panel .wf-result pre, #workflows-panel #wf-run-detail pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#workflows-panel #wf-run-detail:empty { display: none; }
#workflows-panel .wf-proposal-form input, #workflows-panel .wf-proposal-form textarea { display: block; box-sizing: border-box; width: 100%; max-width: 100%; margin: 8px 0; }
#workflows-panel .wf-proposal-form input[type=checkbox] { display: inline; width: auto; }
#workflows-panel .wf-proposal-form pre { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  #workflows-panel .wf-bar-actions { margin-left: 0; }
  #workflows-panel .wf-work { grid-template-columns: 1fr; height: auto; min-height: 420px; }
  #workflows-panel .wf-stage { height: 62vh; }
  #workflows-panel .wf-legend { display: none; }
  #workflows-panel .wf-outline { max-height: none; }
  #workflows-panel .wf-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; width: auto; height: min(78vh, 680px); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); border-radius: 18px 18px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, .4); animation: wf-up 260ms var(--k-ease-out); }
  @keyframes wf-up { from { opacity: .4; transform: translateY(30px); } }
  #workflows-panel .wf-filters input, #workflows-panel .wf-filters select { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #workflows-panel .wf-node, #workflows-panel .wf-dialog, #workflows-panel .wf-panel, #workflows-panel .wf-node.s-run::after, #workflows-panel .wf-plus, #workflows-panel .wf-card { animation: none; transition: none; }
}
#workflows-panel .wf-preview.error { color: var(--k-danger); }
#workflows-panel .wf-port.out[data-out="error"] { border-color: var(--k-danger); }
#workflows-panel .wf-cred-form { display: grid; gap: 6px; max-width: 520px; margin-top: 16px; }
#workflows-panel .wf-cred-form input, #workflows-panel .wf-cred-form select { width: 100%; box-sizing: border-box; margin: 0; }
#workflows-panel .wf-scroll { overflow-x: auto; }
#workflows-panel .wf-data-table { table-layout: auto; min-width: 100%; }
#workflows-panel .wf-data-table th { width: auto; }
#workflows-panel .wf-tools-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
#workflows-panel .wf-draft { display: grid; gap: 8px; margin: 14px 0; }
#workflows-panel .wf-draft textarea { width: 100%; box-sizing: border-box; min-height: 70px; margin: 0; }
#workflows-panel .wf-node.diff-added { box-shadow: 0 0 0 3px rgba(111, 220, 156, .55), 0 10px 28px rgba(0, 0, 0, .3); }
#workflows-panel .wf-node.diff-changed { box-shadow: 0 0 0 3px rgba(245, 178, 91, .55), 0 10px 28px rgba(0, 0, 0, .3); }

#workflows-panel .wf-conn { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; }
#workflows-panel .wf-conn span { min-width: 0; overflow-wrap: anywhere; }
#workflows-panel .wf-li-add.between { opacity: .75; min-height: 32px; }
/* Touch screens have no hover: the in-line buttons on connections stay visible instead of invisible-but-tappable. */
@media (hover: none) { #workflows-panel .wf-plus.mid { opacity: 1; } }
#workflows-panel .wf-diff-tag { margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: .7rem; font-weight: 600; }
#workflows-panel .wf-diff-tag.added { background: rgba(80, 200, 120, .18); color: var(--k-ok, #50c878); }
#workflows-panel .wf-diff-tag.changed { background: rgba(240, 190, 80, .18); color: var(--k-warn); }
#workflows-panel .wf-diff-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
#workflows-panel .wf-rule-group { margin: 8px 0; padding: 8px; border-left: 2px solid var(--k-accent); border-radius: 6px; background: rgba(255, 255, 255, .03); }
#workflows-panel .wf-minimap { position: absolute; right: 12px; bottom: 56px; width: 160px; max-height: 110px; padding: 6px; border-radius: 10px; background: var(--k-surface, rgba(10, 20, 30, .85)); border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; z-index: 3; }
#workflows-panel .wf-mm-node { fill: rgba(255, 255, 255, .28); }
#workflows-panel .wf-mm-node.sel { fill: var(--k-accent); }
#workflows-panel .wf-mm-view { fill: rgba(98, 210, 240, .08); stroke: var(--k-accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@media (max-width: 760px) { #workflows-panel .wf-minimap { display: none; } }
#workflows-panel .wf-menu-head { margin: 10px 0 2px; color: var(--k-faint); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
#workflows-panel .wf-menu-head:first-child { margin-top: 0; }

#workflows-panel .wf-tax-batch-choices .checkbox-row { display:flex; align-items:flex-start; gap:.5rem; min-width:0; white-space:normal; }
#workflows-panel .wf-tax-batch-choices input[type=checkbox] { flex:0 0 1.1rem; width:1.1rem; height:1.1rem; margin-top:.15rem; }
#workflows-panel .wf-tax-batch-choices .checkbox-row span { flex:1; min-width:0; overflow-wrap:anywhere; }
#workflows-panel .wf-orders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 14px 0 4px; }
#workflows-panel .wf-orders:empty { display: none; }
#workflows-panel .wf-order-col { border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); background: var(--k-surface); padding: 12px 14px; min-width: 0; }
#workflows-panel .wf-order-col h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: .95rem; }
#workflows-panel .wf-order-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
#workflows-panel .wf-order-item { display: grid; gap: 2px; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--k-text); cursor: pointer; }
#workflows-panel .wf-order-item:hover, #workflows-panel .wf-order-item:focus-visible { background: var(--k-surface-2, rgba(255, 255, 255, .05)); }
#workflows-panel .wf-order-item small { color: var(--k-muted); overflow-wrap: anywhere; }
#workflows-panel .wf-order-paused { grid-column: 1 / -1; margin: 0; }

.voice-command-layout { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.voice-command-catalog input, .voice-command-catalog select { width: 100%; margin: 8px 0 16px; }
.voice-command-catalog details { border-top: 1px solid var(--border, #354356); padding: 14px 0; }
.voice-command-catalog summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.voice-command-choice { display: block; width: 100%; text-align: left; margin: 7px 0; white-space: normal; }
.voice-command-choice[aria-pressed="true"] { border-color: var(--accent, #6fc7ed); background: rgba(111, 199, 237, .12); }
.voice-command-choice small { display: block; opacity: .7; margin-top: 4px; font-weight: normal; }
.voice-command-detail h2 { margin-top: 0; }
.voice-command-standard { font-size: 1.1rem; line-height: 1.6; padding: 12px 16px; border-left: 3px solid var(--accent, #6fc7ed); background: rgba(111, 199, 237, .06); border-radius: 0 8px 8px 0; }
.voice-profile-example { border-top: 1px solid var(--border, #354356); padding: 16px 0; }
.voice-profile-example p { overflow-wrap: anywhere; }
.voice-profile-example audio { width: 100%; max-width: 100%; margin-top: 8px; }
.voice-profile-result { padding: 12px; border-radius: 8px; background: rgba(111, 199, 237, .08); white-space: pre-line; overflow-wrap: anywhere; }
.voice-profile-privacy { margin-bottom: 20px; }
.voice-profile-privacy summary { cursor: pointer; font-weight: 600; }
.voice-profile-privacy .checkbox-row { margin: 16px 0; }
.voice-recording-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.voice-recording-controls audio { width: 100%; }
.voice-command-detail input, .voice-command-detail textarea { max-width: 100%; }
.voice-command-detail .device-form { margin: 20px 0; }
.voice-profile-test { border-top: 1px solid var(--border, #354356); padding-top: 20px; }
.voice-learning-dialog { max-width: min(560px, calc(100vw - 40px)); border: 1px solid var(--border, #354356); border-radius: 16px; background: var(--surface, #172133); color: var(--text, #eef3fa); padding: 24px; }
.voice-learning-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.voice-learning-dialog button { margin: 8px 8px 0 0; }
.voice-practice-panel { position: relative; overflow: hidden; margin: 24px 0; padding: 28px; border: 1px solid rgba(119, 176, 255, .35); border-radius: 24px; background: radial-gradient(ellipse at 50% 0%, rgba(101, 76, 190, .24), transparent 65%), linear-gradient(145deg, rgba(29, 43, 70, .9), rgba(12, 22, 36, .85)); box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 18px 50px rgba(0, 0, 0, .2); }
.voice-practice-orb { width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%; background: radial-gradient(circle at 28% 22%, #e0fcff, #7fd5ff 24%, #8068ef 56%, #292b66 86%); box-shadow: inset -8px -12px 22px rgba(7, 13, 42, .5), 0 0 30px rgba(134, 129, 255, .35); }
.voice-practice-panel[data-state=recording] .voice-practice-orb { animation: voice-practice-pulse 1.5s ease-in-out infinite; }
.voice-practice-panel[data-state=ready] .voice-practice-orb { background: radial-gradient(circle at 28% 22%, #e4ffed, #78edce 30%, #337d91 70%, #172e52); }
.voice-practice-panel progress { appearance: none; display: block; width: 100%; height: 14px; border: 0; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.voice-practice-panel progress::-webkit-progress-bar { background: rgba(255, 255, 255, .08); border-radius: 20px; }
.voice-practice-panel progress::-webkit-progress-value { background: linear-gradient(90deg, #7b79ee, #70d7ff, #88ead1); border-radius: 20px; transition: width .45s ease; }
.voice-practice-panel progress::-moz-progress-bar { background: linear-gradient(90deg, #7b79ee, #70d7ff, #88ead1); border-radius: 20px; }
.voice-practice-phrase { font-size: 1.25rem; text-align: center; overflow-wrap: anywhere; }
.voice-practice-count { text-align: center; font-variant-numeric: tabular-nums; }
.voice-practice-complete { color: #88ead1; }
@keyframes voice-practice-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 48px rgba(134, 129, 255, .65); } }
@media (prefers-reduced-motion: reduce) { .voice-practice-panel[data-state=recording] .voice-practice-orb { animation: none; } }
@media (max-width: 760px) { .voice-command-layout { grid-template-columns: 1fr; } .voice-command-catalog { max-height: 360px; overflow-y: auto; } .voice-command-detail { scroll-margin-top: 90px; } }

/* Tools navigation gives the main tabs the complete row. */
.tabs-bar { grid-template-columns: minmax(0, 1fr); margin-bottom: 26px; }
.tabs-bar .tabs { grid-column: 1; width: 100%; }
.tabs-bar .workspace-brand { position: absolute; right: 3px; top: calc(100% + 4px); bottom: auto; padding-top: 0; gap: 5px; font-size: 10px; opacity: .55; }
.tabs-bar .workspace-brand .brand-mark { width: 12px; height: 12px; }
.tabs-bar .workspace-brand img { width: 12px; height: 12px; }
.tools-menu-brand { display: none; }
.tabs-bar .tab { padding-inline: 11px; }
.vs-subtabs { display: flex; margin-bottom: 20px; }
.vs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.vs-library { position: sticky; top: 12px; }
.vs-library button { display: block; width: 100%; text-align: left; margin: 7px 0; overflow-wrap: anywhere; white-space: normal; }
.vs-library button[aria-current] { border-color: #7fe6ff; background: #143d50; }
.vs-empty { text-align: center; padding: 55px 25px; }
.vs-empty p { max-width: 480px; margin: 15px auto 25px; color: #b9cbd8; }
.vs-play { font-size: 4rem; color: #7fe6ff; }
.vs-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
#vs-editor .card { margin-bottom: 18px; }
#vs-editor label { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; color: #cce2ed; font-size: .9rem; }
#vs-editor input:not([type=checkbox]), #vs-editor select, #vs-editor textarea { width: 100%; box-sizing: border-box; }
#vs-editor textarea { resize: vertical; }
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
#vs-editor .checkbox-row { flex-direction: row; align-items: center; }
.vs-scene { padding: 18px 0; border-top: 1px solid rgba(127,230,255,.15); }
.vs-scene-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vs-scene-head .item-actions { margin: 0; }
.vs-scene-grid { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; }
.vs-scene-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: #071622; margin-top: 15px; }
.vs-scene audio { width: 100%; height: 36px; margin: 8px 0; }
.vs-scene input[type=file] { font-size: .75rem; }
.vs-quote { padding: 14px 18px; border: 1px solid #79c5dd; border-radius: 12px; background: #123143; margin-top: 16px; }
#vs-player { width: 100%; max-height: 580px; background: #000; border-radius: 12px; margin-top: 15px; }
.vs-exports > div { padding: 12px 0; border-top: 1px solid rgba(127,230,255,.15); }
.vs-exports .item-actions { flex-wrap: wrap; }
#vs-progress { color: #8ae2ee; }
@media (max-width: 1300px) {
  .tabs-bar { justify-content: flex-start; }
  .tabs-bar .workspace-brand { display: none; }
  .tabs-bar .tabs { width: min(320px, calc(100vw - 32px)); }
  .tabs.open .tools-menu-brand { display: block; padding: 9px 14px; font-size: .75rem; color: #83a6b6; }
}
@media (max-width: 900px) {
  .vs-layout { grid-template-columns: 1fr; }
  .vs-library { position: static; }
  #vs-projects { display: flex; gap: 8px; overflow-x: auto; }
  .vs-library button { flex: 0 0 170px; }
}
@media (max-width: 600px) {
  .vs-grid, .vs-scene-grid { grid-template-columns: 1fr; gap: 5px; }
  .vs-scene-image { max-height: 210px; }
  .vs-scene-head { flex-wrap: wrap; }
  #tools-panel .section-head { flex-wrap: wrap; gap: 12px; }
}

@media (min-width: 1301px) { .tabs > .tab:first-of-type { margin-left: auto; } }

#vs-music-player { width:100%; margin-top: .5rem; }
#vs-music-library { display:grid; gap:.4rem; max-height:20rem; overflow:auto; }
#vs-music-upload { width:100%; min-width:0; }
.vs-overlays { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(127,230,255,.2); }
.vs-overlay { padding: 10px 12px; margin: 10px 0; border: 1px solid rgba(127,230,255,.18); border-radius: 12px; }
.vs-overlay .vs-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.vs-overlay [hidden] { display: none; }
.vs-music-pool { border: 1px solid rgba(127,230,255,.18); border-radius: 12px; margin: 12px 0; }
#vs-music-pool label { margin: 6px 0; }
.vs-track { padding: 6px 0; border-top: 1px solid rgba(127,230,255,.12); }
.vs-track input { margin: 4px 0; }
.vs-room { margin: 14px 0; padding: 4px 0; }
.vs-room h4 { margin: 8px 0 0; }
#vs-editor .vs-room label { flex-direction: row; justify-content: space-between; margin: 10px 0 2px; }

/* Gruppen und Szenen zum Ein- und Ausklappen */
.vs-group { border: 1px solid rgba(127,230,255,.18); border-radius: 14px; margin: 12px 0; background: rgba(7,22,34,.35); }
.vs-group > summary, .vs-scene-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 24px; }
.vs-group > summary::-webkit-details-marker, .vs-scene-summary::-webkit-details-marker { display: none; }
.vs-group > summary::before, .vs-scene-summary::before { content: "▸"; color: #7fe6ff; transition: transform .15s; flex: none; }
.vs-group[open] > summary::before, .vs-scene[open] > .vs-scene-summary::before { transform: rotate(90deg); }
.vs-group-title { font-weight: 700; font-size: 1.02rem; }
.vs-group-hint { color: #9db8c8; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-group-body { padding: 0 16px 14px; }
.vs-group > summary:focus-visible, .vs-scene-summary:focus-visible { outline: 2px solid #7fe6ff; outline-offset: 2px; border-radius: 12px; }
.vs-subhead { margin: 22px 0 4px; padding-top: 14px; border-top: 1px dashed rgba(127,230,255,.2); }
.vs-scene { padding: 0; margin: 10px 0; border: 1px solid rgba(127,230,255,.18); border-radius: 14px; background: rgba(7,22,34,.35); }
.vs-scene > :not(summary) { margin-left: 16px; margin-right: 16px; }
.vs-scene > :last-child { margin-bottom: 16px; }
.vs-scene-summary span:nth-child(2) { flex: 1; min-width: 0; color: #b9cbd8; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-badges { display: flex; gap: 6px; flex: none; }
.vs-badge { font-size: .74rem; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(127,230,255,.25); color: #9db8c8; }
.vs-badge.done { color: #8ff0b8; border-color: rgba(143,240,184,.5); }
.vs-scene-head { justify-content: flex-end; margin-top: 4px; margin-bottom: 8px; }
@media (max-width: 760px) {
  .vs-group-hint { display: none; }
  .vs-scene-summary { flex-wrap: wrap; }
  .vs-scene-summary span:nth-child(2) { flex-basis: 100%; order: 3; white-space: normal; }
}

/* Breite Arbeitsfläche im Look der Medienseite: Bibliothek | Einstellungen und Szenen | Ausgabe */
.page:has(> #workspace:not([hidden]) > #tools-panel:not([hidden])) { max-width: none; padding-left: clamp(16px, 2.6vw, 44px); padding-right: clamp(16px, 2.6vw, 44px); }
#tools-panel { --m-line: rgba(255, 255, 255, .09); --m-text: #f3f6fb; --m-muted: #9aa7b8; --m-hot: #ff4d6d; --m-warm: #ff9a3c; --m-accent: #61d5e8;
  --m-play: linear-gradient(135deg, #ff4d6d, #ff9a3c); }
#tools-panel .eyebrow { color: var(--m-warm); }
#tools-panel .section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.035em; line-height: 1.1; }
@media (min-width: 900px) { .vs-layout { grid-template-columns: clamp(260px, 21vw, 340px) minmax(0, 1fr); gap: 24px; } }
#tools-panel .card { color: var(--m-text); border-color: rgba(255, 255, 255, .08); border-radius: 24px; padding: 22px 24px;
  background: radial-gradient(900px 300px at 0% -10%, rgba(255, 77, 109, .12), transparent 60%),
              radial-gradient(700px 280px at 100% -20%, rgba(97, 213, 232, .1), transparent 55%),
              linear-gradient(180deg, #0b1422, #070d16 420px); }
#tools-panel .card:hover { border-color: rgba(255, 255, 255, .12); box-shadow: 0 18px 45px rgba(0, 0, 0, .3); }
#tools-panel .button { border-radius: 999px; }
#tools-panel .button.primary, #tools-panel .vs-quote .button.primary { border: 0; color: #fff; background: var(--m-play); box-shadow: 0 6px 18px rgba(255, 77, 109, .3); }
#tools-panel .button.primary:hover { filter: brightness(1.08); }
#tools-panel .button.secondary, #tools-panel .button.ghost, #tools-panel .button:not(.primary) { border-color: var(--m-line); background: rgba(255, 255, 255, .05); color: var(--m-text); }
#tools-panel .button:not(.primary):hover { background: rgba(255, 255, 255, .1); }
.vs-library button[aria-current] { border-color: rgba(255, 154, 60, .6); background: rgba(255, 154, 60, .12); }
#vs-editor :is(input:not([type=checkbox]), select, textarea) { border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .35); color: var(--m-text); }
#vs-editor :is(input, select, textarea):focus { outline: none; border-color: rgba(255, 154, 60, .6); box-shadow: 0 0 0 4px rgba(255, 154, 60, .12); }
#vs-editor input[type=checkbox], #vs-editor input[type=range] { accent-color: var(--m-warm); }
.vs-group, .vs-scene { border-color: var(--m-line); background: rgba(255, 255, 255, .03); border-radius: 18px; }
.vs-group > summary::before, .vs-scene-summary::before { color: var(--m-warm); }
.vs-group > summary:focus-visible, .vs-scene-summary:focus-visible { outline-color: var(--m-warm); }
.vs-group-hint, .vs-scene-summary span:nth-child(2) { color: var(--m-muted); }
.vs-badge { border-color: var(--m-line); color: var(--m-muted); }
.vs-badge.done { color: #8ff0b8; border-color: rgba(143, 240, 184, .5); }
.vs-quote { border-color: rgba(255, 154, 60, .5); background: rgba(255, 154, 60, .1); border-radius: 16px; }
#vs-player { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
#vs-editor[hidden] { display: none; }
#vs-editor .vs-output { margin-bottom: 0; }
@media (min-width: 1280px) {
  #vs-editor { display: grid; grid-template-columns: minmax(0, 1fr) clamp(400px, 34vw, 640px); gap: 24px; align-items: start; }
  #vs-editor > .card { grid-column: 1; margin-bottom: 0; }
  #vs-editor > .vs-output { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 12px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
}
@media (max-width: 1279px) { #vs-editor > .card { margin-bottom: 18px; } }

/* Doppelt so breite Bibliothek, übersichtliche Musikverwaltung */
@media (min-width: 900px) { .vs-layout { grid-template-columns: clamp(300px, 34vw, 440px) minmax(0, 1fr); } }
@media (min-width: 1560px) {
  .vs-layout { grid-template-columns: clamp(480px, 31vw, 680px) minmax(0, 1fr); }
  #vs-editor { grid-template-columns: minmax(0, 1fr) clamp(380px, 28vw, 560px); }
}
@media (max-width: 1559px) { #vs-editor { display: block; } #vs-editor > .vs-output { position: static; max-height: none; overflow: visible; margin-top: 18px; } }
.vs-library { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.vs-music-count { color: var(--m-muted, #9aa7b8); font-weight: 400; font-size: .85rem; }
.vs-music-library { display: grid; gap: 10px; max-height: none; overflow: visible; margin: 10px 0; }
.vs-track { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "play head head" ". tags save"; gap: 8px 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 16px; background: rgba(255, 255, 255, .035); }
.vs-library .vs-track button { margin: 0; width: auto; }
.vs-track-play { grid-area: play; width: 40px !important; height: 40px; padding: 0 !important; border-radius: 50% !important; text-align: center !important; }
.vs-track-head { grid-area: head; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.vs-track-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-track-time { color: var(--m-muted, #9aa7b8); font-size: .82rem; font-variant-numeric: tabular-nums; flex: none; }
.vs-track input { grid-area: tags; margin: 0; min-width: 0; font-size: .86rem; }
.vs-track .button { grid-area: save; }
.vs-music-add { margin-top: 14px; }
.vs-library .vs-music-add summary { display: flex; }
.vs-music-pool { border-color: var(--m-line, rgba(255,255,255,.09)); border-radius: 16px; padding: 6px 14px 10px; }
.vs-music-pool legend { padding: 0 8px; color: var(--m-muted, #9aa7b8); font-size: .85rem; }
#vs-music-pool label { padding: 8px 10px; margin: 4px 0; border-radius: 12px; background: rgba(255, 255, 255, .03); }
#vs-music-pool label:has(input:checked) { background: rgba(255, 154, 60, .1); }
.vs-head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }

.vs-advisor-history p, .vs-advisor-idea p { white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-advisor-history details, .vs-advisor-idea { padding: 12px; margin: 12px 0; border: 1px solid var(--border, #374151); border-radius: 12px; }
.vs-advisor-idea h4 { margin: 0 0 8px; }
.vs-advisor-evidence { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; font: inherit; font-size: .85em; }
.vs-quote { margin: 0 0 16px; border-width: 2px; }
.vs-quote p { margin: 0 0 12px; }
.vs-layout > * { min-width: 0; }
#vs-projects { max-width: 100%; }
#vs-fields .vs-group-body > .button, .vs-advisor-idea .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#vs-fields .vs-grid > * { min-width: 0; }
#vs-fields .item-actions { flex-wrap: wrap; }
.vs-advisor-idea h4, .vs-advisor-history summary { overflow-wrap: anywhere; }
#vs-editor .item-actions { flex-wrap: wrap; }
#vs-editor .item-actions .button { white-space: normal; max-width: 100%; }
.vs-guidelines { margin: 14px 0; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .15); }
.vs-guideline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: 8px 0; border: 1px solid rgba(255, 255, 255, .09); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.vs-guideline strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vs-guideline details { flex-basis: 100%; }

/* YouTube-Planer: Gespräch links, Plan und Kalender rechts */
#vp-view { --vp-video: #61d5e8; --vp-short: #ff9a3c; --vp-review: #c3b0ff; --vp-done: #8ff0b8; --vp-warn: #ff8f7c; }
@keyframes vp-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes vp-pop { 0% { opacity: 0; transform: scale(.96); } 60% { opacity: 1; transform: scale(1.01); } 100% { transform: none; } }
@keyframes vp-slide-l { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes vp-slide-r { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes vp-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 154, 60, .45); } 50% { box-shadow: 0 0 0 6px rgba(255, 154, 60, 0); } }
@keyframes vp-shimmer { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes vp-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes vp-glow { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(97, 213, 232, .55), 0 0 18px rgba(97, 213, 232, .12); } 50% { box-shadow: inset 0 0 0 1px rgba(97, 213, 232, .9), 0 0 26px rgba(97, 213, 232, .28); } }
@keyframes vp-land { 0% { transform: scale(.9); filter: brightness(1.8); } 60% { transform: scale(1.04); } 100% { transform: none; filter: none; } }
@keyframes vp-spark { 0%, 100% { transform: rotate(0) scale(1); opacity: .9; } 50% { transform: rotate(90deg) scale(1.2); opacity: 1; } }
.vp-hero h2 { background: linear-gradient(90deg, #fff, #9be7f3 55%, #ffc08a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vp-head-actions { align-items: flex-end; }
.vp-channel { display: flex; flex-direction: column; gap: 4px; min-width: 190px; font-size: .85rem; color: var(--m-muted, #9aa7b8); }
.vp-channel select { border-radius: 999px; }
.vp-add { position: relative; }
.vp-add-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 2px; min-width: 270px; padding: 6px; border-radius: 16px;
  background: rgba(16, 24, 36, .97); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); animation: vp-pop .18s ease-out; }
.vp-add-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--m-text, #f3f6fb); text-align: left; font: inherit; cursor: pointer; }
.vp-add-menu button:hover, .vp-add-menu button:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.vp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.vp-stat { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--m-line, rgba(255,255,255,.09));
  background: linear-gradient(140deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); animation: vp-rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.vp-stat::after { content: ""; position: absolute; inset: auto -20% -60% auto; width: 120px; height: 120px; border-radius: 50%; background: var(--tone, #61d5e8); opacity: .12; filter: blur(18px); }
.vp-stat.planned { --tone: var(--vp-video); } .vp-stat.live { --tone: var(--vp-short); } .vp-stat.review { --tone: var(--vp-review); } .vp-stat.done { --tone: var(--vp-done); }
.vp-stat strong { font-size: 1.9rem; line-height: 1.1; letter-spacing: -.03em; color: var(--tone); font-variant-numeric: tabular-nums; }
.vp-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--m-muted, #9aa7b8); }
.vp-stat-hint { font-size: .8rem; color: var(--m-muted, #9aa7b8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 1100px) { .vp-layout { grid-template-columns: minmax(340px, .85fr) minmax(0, 1.25fr); } .vp-talk { position: sticky; top: calc(var(--tarvi-head, 0px) + 12px); } }
.vp-talk { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vp-talk-head, .vp-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vp-talk-head h3, .vp-editor-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.vp-spark { width: 14px; height: 14px; background: linear-gradient(135deg, #61d5e8, #ff9a3c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: vp-spark 3.2s ease-in-out infinite; }
.vp-talk-log { display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: min(58vh, 620px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; scroll-behavior: smooth; }
.vp-talk-empty p { color: var(--m-muted, #9aa7b8); margin: 4px 0 12px; }
.vp-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-starters .button { white-space: normal; text-align: left; animation: vp-rise .4s ease-out both; animation-delay: calc(var(--i, 0) * 80ms); }
.vp-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; animation: vp-pop .3s ease-out both; }
.vp-msg p { margin: 0; }
.vp-msg.me { align-self: flex-end; background: linear-gradient(135deg, rgba(97, 213, 232, .22), rgba(97, 213, 232, .1)); border-bottom-right-radius: 6px; }
.vp-msg.ai { align-self: flex-start; background: rgba(255, 255, 255, .05); border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-bottom-left-radius: 6px; }
.vp-msg.thinking { display: flex; gap: 5px; padding: 14px 16px; }
.vp-msg.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--vp-video); animation: vp-dot 1.2s infinite ease-in-out; }
.vp-msg.thinking span:nth-child(2) { animation-delay: .15s; } .vp-msg.thinking span:nth-child(3) { animation-delay: .3s; }
.vp-ideas { display: grid; gap: 8px; margin-top: 10px; white-space: normal; }
.vp-idea { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid var(--m-line, rgba(255,255,255,.08));
  animation: vp-rise .4s ease-out both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); transition: border-color .2s, transform .2s; }
.vp-idea:hover { border-color: rgba(97, 213, 232, .45); transform: translateY(-1px); }
.vp-idea-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-idea-head strong { min-width: 0; overflow-wrap: anywhere; }
.vp-idea-when { color: var(--m-muted, #9aa7b8); font-size: .82rem; margin: 0; }
.vp-idea details summary { cursor: pointer; color: var(--m-muted, #9aa7b8); font-size: .85rem; }
.vp-idea details p { margin: 6px 0 0; font-size: .9rem; }
.vp-idea .button { justify-self: start; }
.vp-talk-form { display: grid; gap: 8px; }
.vp-talk-form textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; font: inherit; transition: box-shadow .2s; }
.vp-talk-form textarea:focus { box-shadow: 0 0 0 3px rgba(97, 213, 232, .2); }
.vp-talk-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vp-plan { display: grid; gap: 14px; min-width: 0; }
.vp-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.vp-views { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 999px; background: rgba(0, 0, 0, .35); justify-self: start; }
.vp-views .button { min-height: 34px; padding: 5px 18px; border: 0; background: transparent; font-size: .88rem; transition: background .2s, color .2s; }
.vp-views .button[aria-pressed="true"] { background: rgba(255, 255, 255, .15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.vp-filter [data-filter="video"][aria-pressed="true"] { color: #9be7f3; } .vp-filter [data-filter="short"][aria-pressed="true"] { color: #ffc08a; }
.vp-main { display: grid; gap: 12px; min-width: 0; }
.vp-plan-view, .vp-calendar { display: grid; gap: 14px; min-width: 0; }
.vp-calendar.slide-next { animation: vp-slide-l .35s ease-out; } .vp-calendar.slide-prev { animation: vp-slide-r .35s ease-out; }
.vp-section { border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 20px; background: rgba(255, 255, 255, .025); padding: 12px 14px 14px; min-width: 0; }
.vp-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; }
.vp-count { padding: 1px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--m-muted, #9aa7b8); font-size: .78rem; font-weight: 500; }
.vp-empty { margin: 6px 2px; }
.vp-section.timeline > .vp-row { position: relative; margin-left: 12px; }
.vp-section.timeline > .vp-row::before { content: ""; position: absolute; left: -12px; top: -8px; bottom: -8px; width: 2px; background: linear-gradient(var(--vp-video), rgba(97, 213, 232, .1)); }
.vp-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: rgba(255, 255, 255, .035); cursor: pointer; min-width: 0;
  animation: vp-rise .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); transition: border-color .2s, transform .2s, background .2s; }
.vp-row:hover, .vp-row:focus-visible { border-color: rgba(97, 213, 232, .45); background: rgba(255, 255, 255, .055); transform: translateX(2px); outline: none; }
.vp-row.active { border-color: rgba(97, 213, 232, .8); }
.vp-row.dragging, .vp-chip.dragging { opacity: .45; }
.vp-row.landed, .vp-chip.landed { animation: vp-land .5s ease-out; }
.vp-date { flex: none; display: grid; justify-items: center; width: 50px; padding: 4px 0; border-radius: 12px; background: rgba(97, 213, 232, .1); border: 1px solid rgba(97, 213, 232, .25); line-height: 1.05; }
.vp-date strong { font-size: 1.25rem; }
.vp-date-day, .vp-date-month { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--m-muted, #9aa7b8); }
.vp-date.today { background: rgba(255, 154, 60, .16); border-color: rgba(255, 154, 60, .5); animation: vp-pulse 2.4s infinite; }
.vp-row-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.vp-row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-row-top strong { overflow-wrap: anywhere; }
.vp-row-meta { color: var(--m-muted, #9aa7b8); font-size: .8rem; overflow-wrap: anywhere; }
.vp-progress { position: relative; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(255, 154, 60, .18); margin-top: 3px; }
.vp-progress span { position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--vp-short), transparent); animation: vp-shimmer 1.6s infinite linear; }
.vp-kind { flex: none; padding: 2px 8px; border-radius: 8px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.vp-kind.video { background: rgba(97, 213, 232, .16); color: #9be7f3; }
.vp-kind.short { background: rgba(255, 154, 60, .18); color: #ffc08a; }
.vp-kind.studio { background: rgba(195, 176, 255, .18); color: #d2c2ff; }
.vp-state { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .76rem; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; background: rgba(255, 255, 255, .07); color: var(--m-muted, #9aa7b8); }
.vp-state.planned { background: rgba(97, 213, 232, .14); color: #9be7f3; }
.vp-state.live { background: rgba(255, 154, 60, .18); color: #ffc08a; animation: vp-pulse 1.8s infinite; }
.vp-state.review { background: rgba(195, 176, 255, .18); color: #d2c2ff; }
.vp-state.done { background: rgba(143, 240, 184, .16); color: #a6f2c6; }
.vp-state.warn { background: rgba(255, 120, 100, .18); color: #ffb0a2; }
.vp-poster { position: relative; flex: none; overflow: hidden; display: grid; place-items: center; border-radius: 12px; aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 30% 20%, rgba(97, 213, 232, .35), transparent 60%), linear-gradient(135deg, #1b2a3c, #0e1621); }
.vp-poster.short { aspect-ratio: 9 / 16; background: radial-gradient(circle at 70% 20%, rgba(255, 154, 60, .4), transparent 60%), linear-gradient(135deg, #2a1f1a, #12161f); }
.vp-poster.small { width: 64px; } .vp-poster.small.short { width: 36px; }
.vp-poster.wide { width: 100%; max-height: 220px; } .vp-poster.wide.short { width: 120px; justify-self: center; }
.vp-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .5s; }
.vp-poster.loaded img { opacity: 1; } .vp-poster.loaded .vp-poster-icon { opacity: 0; }
.vp-poster-icon { font-size: 1.1rem; color: rgba(255, 255, 255, .7); transition: opacity .3s; }
.vp-poster-time { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .7); font-size: .72rem; }
.vp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.vp-tile { display: grid; gap: 8px; align-content: start; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; cursor: pointer;
  animation: vp-rise .45s ease-out both; animation-delay: calc(var(--i, 0) * 50ms); transition: transform .25s, border-color .25s, box-shadow .25s; }
.vp-tile:hover, .vp-tile:focus-visible { transform: translateY(-3px); border-color: rgba(255, 255, 255, .16); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); outline: none; }
.vp-tile:hover img { transform: scale(1.05); }
.vp-tile .vp-poster { width: 100%; } .vp-tile .vp-poster.short { aspect-ratio: 16 / 9; }
.vp-tile-info { display: grid; gap: 3px; min-width: 0; }
.vp-tile-info strong { font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vp-tile-meta { font-size: .76rem; color: var(--m-muted, #9aa7b8); } .vp-tile-meta.done { color: #a6f2c6; }
.vp-cal-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.vp-cal-bar strong { min-width: 150px; text-align: center; font-size: 1.05rem; }
.vp-legend { display: flex; gap: 10px; margin-left: auto; font-size: .78rem; color: var(--m-muted, #9aa7b8); }
.vp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.vp-cal-head { text-align: center; color: var(--m-muted, #9aa7b8); font-size: .76rem; padding: 4px 0; }
.vp-cal-day { min-height: 104px; min-width: 0; padding: 6px; border: 1px solid var(--m-line, rgba(255,255,255,.08)); border-radius: 12px; background: rgba(255, 255, 255, .025);
  display: flex; flex-direction: column; gap: 4px; animation: vp-rise .35s ease-out both; animation-delay: calc(var(--i, 0) * 40ms); transition: background .2s, border-color .2s; }
.vp-calendar.settled .vp-cal-day, .vp-plan-view.settled .vp-row, .vp-plan-view.settled .vp-tile { animation: none; }
.vp-cal-day:hover { background: rgba(255, 255, 255, .045); }
.vp-cal-day.past { opacity: .55; }
.vp-cal-day.today { animation: vp-glow 3s ease-in-out infinite; }
.vp-cal-day.over { border-color: rgba(255, 154, 60, .8); background: rgba(255, 154, 60, .1); transform: scale(1.02); }
.vp-cal-top { display: flex; align-items: center; justify-content: space-between; }
.vp-cal-num { font-size: .78rem; color: var(--m-muted, #9aa7b8); }
.vp-cal-day.today .vp-cal-num { color: #fff; font-weight: 700; }
.vp-cal-add { min-height: 0; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--m-text, #f3f6fb); line-height: 1; opacity: 0; transition: opacity .2s, transform .2s; }
.vp-cal-day:hover .vp-cal-add, .vp-cal-add:focus-visible { opacity: 1; }
.vp-cal-add:hover { transform: rotate(90deg); background: rgba(97, 213, 232, .3); }
@media (hover: none) { .vp-cal-add { opacity: .6; } }
.vp-chip { display: flex; align-items: center; gap: 4px; min-width: 0; text-align: left; padding: 3px 6px; border: 0; border-left: 3px solid var(--c); border-radius: 7px; background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--m-text, #f3f6fb); font-size: .72rem; cursor: grab; transition: transform .15s, filter .15s; }
.vp-chip:hover { transform: translateY(-1px); filter: brightness(1.2); }
.vp-chip.video { --c: var(--vp-video); } .vp-chip.short { --c: var(--vp-short); }
.vp-chip.publish { border-left-style: dashed; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.vp-chip.review, .vp-chip.ready, .vp-chip.published { opacity: .8; }
.vp-chip-icon { flex: none; color: var(--c); }
.vp-chip-time { flex: none; color: var(--m-muted, #9aa7b8); }
.vp-chip-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-unscheduled h3 { font-size: .95rem; margin: 6px 0 2px; }
.vp-editor { display: grid; gap: 12px; }
.vp-editor.pop { animation: vp-pop .3s ease-out; }
.vp-editor label { display: grid; gap: 6px; }
.vp-editor .checkbox-row { display: flex; }
.vp-editor input:not([type=checkbox]), .vp-editor textarea, .vp-editor select { width: 100%; box-sizing: border-box; font: inherit; }
.vp-more { border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 14px; padding: 8px 12px; }
.vp-more summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.vp-more[open] { display: grid; gap: 10px; }
.vp-checks { border: 1px solid var(--m-line, rgba(255,255,255,.1)); border-radius: 12px; }
.vp-checks legend { padding: 0 8px; color: var(--m-muted, #9aa7b8); font-size: .85rem; }
.vp-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--m-line, rgba(255,255,255,.09)); justify-self: start; }
.vp-switch .button { min-height: 32px; padding: 4px 16px; border: 0; background: transparent; }
.vp-switch .button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); }
.vp-switch [data-kind="short"][aria-pressed="true"] { color: #ffc08a; } .vp-switch [data-kind="video"][aria-pressed="true"] { color: #9be7f3; }
.vp-picker { display: grid; gap: 6px; }
.vp-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .035); animation: vp-rise .35s ease-out both; animation-delay: calc(var(--i, 0) * 40ms); }
.vp-pick strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .vp-talk-log { max-height: 55vh; } .vp-row { align-items: flex-start; }
  .vp-cal-grid { gap: 3px; } .vp-cal-day { min-height: 64px; padding: 3px; } .vp-chip-time, .vp-chip-title { display: none; } .vp-chip { justify-content: center; padding: 2px; }
  .vp-legend { margin-left: 0; } .vp-add-menu { right: auto; left: 0; }
  .vp-talk-form textarea, .vp-editor input, .vp-editor textarea, .vp-editor select { font-size: 16px; }
}
.vp-channels { display: grid; gap: 14px; min-width: 0; }
.vp-chan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 8px; white-space: normal; }
.vp-chan { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--m-line, rgba(255,255,255,.09));
  animation: vp-rise .4s ease-out both; animation-delay: calc(var(--i, 0) * 60ms); transition: transform .2s, border-color .2s; }
.vp-chan:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .18); }
.vp-chan.current { border-color: rgba(97, 213, 232, .6); box-shadow: 0 0 0 3px rgba(97, 213, 232, .1); }
.vp-chan.idea { background: linear-gradient(150deg, rgba(195, 176, 255, .1), rgba(255, 255, 255, .02)); }
.vp-chan-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vp-chan-head strong { min-width: 0; overflow-wrap: anywhere; }
.vp-chan-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; background: linear-gradient(135deg, var(--vp-video), var(--vp-short)); color: #0b1220; }
.vp-chan-niche { margin: 0; font-size: .86rem; color: var(--m-muted, #9aa7b8); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vp-chan details summary { cursor: pointer; color: var(--m-muted, #9aa7b8); font-size: .85rem; }
.vp-chan details h4 { margin: 8px 0 2px; font-size: .8rem; color: var(--m-muted, #9aa7b8); }
.vp-chan details p { margin: 0; font-size: .86rem; }
.vp-chan .vp-checks label { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.vp-chan .button { justify-self: start; }
.vp-section-title .button { margin-left: auto; }
.vp-ideas-log { max-height: none; min-height: 0; }
.vp-lab .vp-talk-form { margin-top: 10px; }
#workspace #vp-view :is(.vp-views, .vp-switch) .button[aria-pressed="true"] { background: linear-gradient(135deg, rgba(97, 213, 232, .32), rgba(97, 213, 232, .16)); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(155, 231, 243, .55), 0 4px 14px rgba(97, 213, 232, .18); }
#workspace #vp-view :is(.vp-filter [data-filter="short"], .vp-switch [data-kind="short"])[aria-pressed="true"] { background: linear-gradient(135deg, rgba(255, 154, 60, .34), rgba(255, 154, 60, .16)); box-shadow: inset 0 0 0 1px rgba(255, 192, 138, .55); }
.vp-link { display: grid; gap: 12px; }
.vp-link-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.vp-link-top .button { margin-left: auto; }
.vp-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.vp-link label { display: grid; gap: 6px; } .vp-link .checkbox-row { display: flex; }
.vp-link input:not([type=checkbox]), .vp-link textarea, .vp-link select { width: 100%; box-sizing: border-box; font: inherit; }
.vp-link-saved { min-height: 1.2em; }
.vp-shared { padding: 8px 12px; border-radius: 12px; background: rgba(97, 213, 232, .08); border: 1px solid rgba(97, 213, 232, .2); }
.vp-steps-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-width: 160px; margin-top: 4px; }
.vp-steps-mini span { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.vp-steps-mini span.done { background: var(--vp-done); }
.vp-steps-mini span.live { background: var(--vp-short); animation: vp-blink 1.2s ease-in-out infinite; }
@keyframes vp-blink { 50% { opacity: .35; } }
.vp-production { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: linear-gradient(150deg, rgba(97, 213, 232, .07), rgba(255, 255, 255, .02)); border: 1px solid rgba(97, 213, 232, .2); }
.vp-production-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.vp-production-head h4 { margin: 0; font-size: 1rem; }
.vp-auto-note { margin: 0; font-size: .8rem; }
.vp-stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; }
.vp-step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 4px; }
.vp-step:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 34px; bottom: -8px; width: 2px; background: rgba(255, 255, 255, .1); }
.vp-step.done:not(:last-child)::after { background: color-mix(in srgb, var(--vp-done) 60%, transparent); }
.vp-step-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .8rem; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--m-muted, #9aa7b8); border: 1px solid rgba(255, 255, 255, .14); }
.vp-step.done .vp-step-dot { background: color-mix(in srgb, var(--vp-done) 22%, transparent); color: var(--vp-done); border-color: color-mix(in srgb, var(--vp-done) 55%, transparent); }
.vp-step.live .vp-step-dot { background: color-mix(in srgb, var(--vp-short) 25%, transparent); color: #ffc08a; border-color: var(--vp-short); animation: vp-pulse 1.6s infinite; }
.vp-step-info { display: grid; min-width: 0; } .vp-step-text { font-size: .8rem; color: var(--m-muted, #9aa7b8); overflow-wrap: anywhere; }
.vp-step.live .vp-step-text { color: #ffc08a; }
.vp-step-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.vp-live { display: grid; gap: 8px; } .vp-live:empty { display: none; }
.vp-live-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .86rem; }
.vp-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 154, 60, .1); border: 1px solid rgba(255, 154, 60, .35); animation: vp-pop .25s ease-out; }
.vp-confirm[hidden] { display: none; }
@media (max-width: 760px) { .vp-step { grid-template-columns: 30px minmax(0, 1fr); } .vp-step-actions { grid-column: 2; justify-content: flex-start; } }
#workspace #vp-view .vp-stat { text-align: left; font: inherit; color: var(--m-text, #f3f6fb); cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
#workspace #vp-view .vp-stat:hover, #workspace #vp-view .vp-stat:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 55%, transparent); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); outline: none; }
.vp-stat.work { --tone: #f5d36b; }
.vp-section[data-group] { scroll-margin-top: calc(var(--tarvi-head, 0px) + 16px); }
.vp-section.live, .vp-section.work, .vp-section.review { border-left: 3px solid var(--tone); }
.vp-section.live { --tone: var(--vp-short); } .vp-section.work { --tone: #f5d36b; } .vp-section.review { --tone: var(--vp-review); }
.vp-section.live .vp-section-title span:first-child, .vp-section.work .vp-section-title span:first-child, .vp-section.review .vp-section-title span:first-child { color: var(--tone); }
.vp-state.work { background: rgba(245, 211, 107, .16); color: #f5d36b; }
@media (prefers-reduced-motion: reduce) { #vp-view *, #vp-view *::before, #vp-view *::after { animation: none !important; transition: none !important; } }

/* Browser (Tarvi-Browser) */
.bw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.bw-address { display: flex; flex: 1 1 280px; gap: 8px; min-width: 0; }
.bw-address input { flex: 1; min-width: 0; border-radius: 999px; }
.bw-mode { padding: 4px 12px; border: 1px solid var(--m-line, rgba(255,255,255,.12)); border-radius: 999px; font-size: .82rem; color: var(--m-muted, #9aa7b8); white-space: nowrap; }
.bw-mode:empty { display: none; }
.bw-mode.user { color: #ffb878; border-color: rgba(255, 154, 60, .6); }
.bw-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.bw-tab { display: inline-flex; align-items: center; border: 1px solid var(--m-line, rgba(255,255,255,.12)); border-radius: 999px; background: rgba(255, 255, 255, .04); max-width: 240px; }
.bw-tab.active { border-color: rgba(255, 154, 60, .7); background: rgba(255, 154, 60, .1); }
.bw-tab button, .bw-tab-new { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 6px 10px; }
.bw-tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.bw-tab-new { border: 1px dashed var(--m-line, rgba(255,255,255,.2)); border-radius: 999px; }
.bw-stage { position: relative; min-height: 220px; border: 1px solid var(--m-line, rgba(255,255,255,.12)); border-radius: 18px; background: #05080e; overflow: hidden; outline: none; }
.bw-stage.user { border-color: rgba(255, 154, 60, .8); box-shadow: 0 0 0 3px rgba(255, 154, 60, .18); }
.bw-stage img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.bw-stage.user img { cursor: crosshair; touch-action: manipulation; }
.bw-empty { margin: 0; padding: 70px 24px; text-align: center; color: var(--m-muted, #9aa7b8); }
.bw-empty[hidden] { display: none; }
.bw-type { margin: 12px 0; padding: 12px 14px; border: 1px solid rgba(255, 154, 60, .5); border-radius: 16px; background: rgba(255, 154, 60, .06); }
.bw-type[hidden] { display: none; }
.bw-type label { display: block; margin: 0 0 6px; font-size: .84rem; color: var(--m-muted, #9aa7b8); }
.bw-type-row { display: flex; gap: 8px; }
.bw-type-row input { flex: 1; min-width: 0; }
.bw-log-card { margin-top: 16px; }
.bw-log { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.bw-log li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: .88rem; }
.bw-log li.failed span { color: #ff9f8e; }
.bw-log li.empty { color: var(--m-muted, #9aa7b8); }
.bw-log time { color: var(--m-muted, #9aa7b8); font-variant-numeric: tabular-nums; }
.bw-log em { color: var(--m-muted, #9aa7b8); font-style: normal; }
@media (max-width: 760px) { .bw-bar .button { flex: 1 1 auto; } .bw-address { flex-basis: 100%; order: 5; } }
.vs-subtabs { flex-wrap: wrap; gap: 8px; }

/* Schieberegler: leuchtendes Blau */
#vs-editor input[type=range] {
  --blue: #2aa8ff; --blue-soft: rgba(42, 168, 255, .55); --fill: 0%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 4px 0; padding: 0; border: 0; background: transparent; cursor: pointer; accent-color: var(--blue);
}
#vs-editor input[type=range]:focus { outline: none; }
#vs-editor input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #1b6dff, var(--blue) calc(var(--fill) * .7), #7fe3ff var(--fill), rgba(255, 255, 255, .1) var(--fill));
  box-shadow: 0 0 16px -2px var(--blue-soft), inset 0 1px 2px rgba(0, 0, 0, .5);
}
#vs-editor input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
#vs-editor input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #1b6dff, #7fe3ff); box-shadow: 0 0 16px -2px var(--blue-soft); }
#vs-editor input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 3px solid #eaf8ff;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, #7fe3ff 40%, #1b8cff 100%);
  box-shadow: 0 0 0 5px rgba(42, 168, 255, .22), 0 0 22px 4px var(--blue-soft), 0 3px 8px rgba(0, 0, 0, .5);
  transition: box-shadow .15s, transform .15s;
}
#vs-editor input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid #eaf8ff;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, #7fe3ff 40%, #1b8cff 100%);
  box-shadow: 0 0 0 5px rgba(42, 168, 255, .22), 0 0 22px 4px var(--blue-soft);
}
#vs-editor input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.08); }
#vs-editor input[type=range]:focus-visible::-webkit-slider-thumb, #vs-editor input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(42, 168, 255, .3), 0 0 30px 8px rgba(42, 168, 255, .8), 0 3px 8px rgba(0, 0, 0, .5); transform: scale(1.12); }
#vs-editor input[type=range]:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.4); }
.vs-slider-field { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.vs-slider-head { display: flex !important; flex-direction: row !important; justify-content: space-between; align-items: baseline; margin-bottom: 0 !important; }
.vs-slider-head output, #vs-editor .vs-room output { color: #7fe3ff; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(42, 168, 255, .7); font-size: 1.05rem; }
.vs-slider-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--m-muted, #9aa7b8); margin-top: -2px; }

/* Beobachtung */
.wt-form label, .wt-notify label { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: .9rem; color: #cce2ed; }
.wt-form input, .wt-form select, .wt-notify select { width: 100%; box-sizing: border-box; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .35); color: var(--m-text, #f3f6fb); }
.wt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.wt-notify, .wt-add, .wt-events-card { margin: 14px 0; }
.wt-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 14px 0; }
.wt-item { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 20px; background: rgba(255, 255, 255, .04); min-width: 0; }
.wt-item.paused, .wt-item.blocked { opacity: .75; }
.wt-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wt-name { font-weight: 700; color: var(--m-text, #f3f6fb); text-decoration: none; overflow-wrap: anywhere; }
.wt-name:hover { text-decoration: underline; }
.wt-state { flex: none; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--m-line, rgba(255,255,255,.14)); font-size: .74rem; color: var(--m-muted, #9aa7b8); }
.wt-state.active { color: #8ff0b8; border-color: rgba(143, 240, 184, .45); }
.wt-state.error, .wt-state.blocked { color: #ff9f8e; border-color: rgba(255, 120, 100, .5); }
.wt-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wt-price strong { font-size: 1.7rem; letter-spacing: -.02em; }
.wt-price span { color: var(--m-muted, #9aa7b8); font-size: .85rem; }
.wt-price span.reached { color: #8ff0b8; font-weight: 700; }
.wt-spark { width: 100%; height: 44px; overflow: visible; }
.wt-spark .line { fill: none; stroke: #2aa8ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(42, 168, 255, .8)); }
.wt-spark circle { fill: #7fe3ff; filter: drop-shadow(0 0 6px rgba(42, 168, 255, .9)); }
.wt-spark line { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 3 4; }
.wt-meta { margin: 0; color: var(--m-muted, #9aa7b8); font-size: .8rem; }
.wt-error { margin: 0; color: #ff9f8e; font-size: .85rem; }
.wt-events { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.wt-events li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: .9rem; }
.wt-events li.unread strong { color: #7fe3ff; }
.wt-events li.empty { color: var(--m-muted, #9aa7b8); }
.wt-events time { color: var(--m-muted, #9aa7b8); font-variant-numeric: tabular-nums; }

/* Fortschrittsbalken: je Arbeitsschritt einer, im Blau der Regler */
.vs-bars { display: grid; gap: 12px; margin: 14px 0 6px; padding: 14px 16px; border: 1px solid var(--m-line, rgba(255,255,255,.09)); border-radius: 18px; background: rgba(255, 255, 255, .03); }
.vs-bars[hidden] { display: none; }
.vs-bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; color: #cce2ed; margin-bottom: 6px; }
.vs-bar-count { color: var(--m-muted, #9aa7b8); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-bar-track { position: relative; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); overflow: hidden; }
.vs-bar-track span { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, #1b6dff, #2aa8ff 55%, #7fe3ff); box-shadow: 0 0 14px 1px rgba(42, 168, 255, .65); transition: width .5s ease; }
.vs-bar.waiting { opacity: .55; }
.vs-bar.waiting .vs-bar-head { color: var(--m-muted, #9aa7b8); }
.vs-bar.done .vs-bar-head > span:first-child { color: #7fe3ff; }
.vs-bar.stopped .vs-bar-track span { background: linear-gradient(90deg, #8a5a2b, #ff9a3c); box-shadow: 0 0 12px rgba(255, 154, 60, .5); }
.vs-bar.running .vs-bar-track span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%); background-size: 200% 100%; animation: vs-shimmer 1.4s linear infinite; }
.vs-bar.running[aria-valuenow="0"] .vs-bar-track span { width: 100%; opacity: .35; }
@keyframes vs-shimmer { from { background-position: 200% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .vs-bar.running .vs-bar-track span::after { animation: none; } }

/* Erzeugte Videos: Miniaturen wie in der Leiste von YouTube */
.vs-videos-title { margin: 18px 0 6px; font-size: .95rem; letter-spacing: .02em; color: var(--m-muted, #9aa7b8); text-transform: uppercase; }
.vs-videos-title[hidden] { display: none; }
#vs-exports.vs-exports { display: grid; gap: 14px; }
#vs-exports .vs-video { display: grid; grid-template-columns: minmax(150px, 46%) minmax(0, 1fr); gap: 12px; padding: 0; border: 0; align-items: start; }
#vs-exports .vs-video > div { padding: 0; border: 0; }
.vs-video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--m-line, rgba(255,255,255,.12)); border-radius: 12px; overflow: hidden; background: #070d16 linear-gradient(135deg, rgba(42, 168, 255, .2), rgba(255, 77, 109, .15)); cursor: pointer; }
.vs-video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-video-thumb img:not([src]) { visibility: hidden; }
.vs-video-time { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-video-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s; }
.vs-video-thumb:hover .vs-video-play, .vs-video-thumb:focus-visible .vs-video-play { opacity: 1; }
.vs-video.playing .vs-video-thumb { border-color: #2aa8ff; box-shadow: 0 0 0 3px rgba(42, 168, 255, .25), 0 0 18px rgba(42, 168, 255, .5); }
.vs-video-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vs-video-info strong { font-size: .92rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vs-video-meta { color: var(--m-muted, #9aa7b8); font-size: .78rem; }
.vs-video-more summary { cursor: pointer; font-size: .78rem; color: #7fe3ff; list-style: none; margin-top: 4px; }
.vs-video-more summary::-webkit-details-marker { display: none; }
.vs-video-menu { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; align-items: flex-start; }
@media (max-width: 520px) { #vs-exports .vs-video { grid-template-columns: 140px minmax(0, 1fr); } }

.vs-atmospheres { margin: 12px 0; padding: 12px 14px; border: 1px solid #ffffff20; border-radius: 14px; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.vs-atmospheres legend { padding: 0 6px; font-weight: 700; }
.vs-atmospheres .help { flex-basis: 100%; margin: 4px 0 0; }
.vs-title-picker { margin: 18px 0; padding: 14px; border: 1px solid #ffffff20; border-radius: 14px; min-width: 0; }
.vs-title-picker legend { padding: 0 6px; font-weight: 700; }
.vs-title-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
#vs-editor .vs-title-option { display: block; margin: 0; padding: 0 0 10px; border: 2px solid #ffffff18; border-radius: 12px; overflow: hidden; background: #091421; cursor: pointer; }
.vs-title-option:has(input:checked) { border-color: #75d9ed; box-shadow: 0 0 0 2px #75d9ed25; }
.vs-title-option:focus-within { outline: 2px solid #ffa34c; outline-offset: 3px; }
.vs-title-option img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; }
.vs-title-option span { display: flex; align-items: center; gap: 8px; padding: 9px 10px 0; font-size: .84rem; color: #e6f3fb; }
#vs-editor .vs-title-option input[type=radio] { width: auto; flex: 0 0 auto; margin: 0; accent-color: #75d9ed; }
.vs-title-picker:disabled .vs-title-option { opacity: .6; cursor: default; }
#vs-title-preview-details { margin-top: 12px; }
#vs-title-preview-details > summary { cursor: pointer; padding: 8px 0; color: #9fe8f2; }
#vs-title-size-value { color: #9fe8f2; font-variant-numeric: tabular-nums; }

/* KI-Clips */
.vc-form { display: grid; gap: 10px; max-width: 640px; }
.vc-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.vc-previews img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; }
.vc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.vc-item img, .vc-item video { width: 100%; border-radius: 10px; background: #000; display: block; margin: 8px 0; }
.vc-item .vc-prompt { font-weight: 600; overflow-wrap: anywhere; }
.vc-item textarea { width: 100%; }
.vc-speech { margin: 12px 0; }
.vc-speech > label { display: grid; gap: 4px; margin-top: 10px; }
.vc-speech input, .vc-speech select { max-width: 100%; min-width: 0; }
.vc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Tools › Notizen: a notepad. A blank sheet to write on, notes as paper slips grouped by day.
   Prefixed with #workspace #notes-view to win over the generic form/button rules of ui-system.css. */
#notes-view { --nt-paper: #f6e7a8; --nt-paper-work: #bfe9f5; --nt-ink: #2a2414; --nt-ink-soft: rgba(42, 36, 20, .62); --nt-rule: rgba(42, 36, 20, .11); max-width: 1180px; }
#workspace #notes-view .nt-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 24px; margin-bottom: 14px; }
#workspace #notes-view .nt-head h2 { margin: 0; }
#workspace #notes-view .nt-head .help { margin: 0; max-width: 520px; }
#workspace #notes-view .nt-composer {
  position: relative; display: grid; gap: 10px; padding: 18px 18px 14px 26px; border-radius: 14px;
  color: var(--nt-ink); background: var(--nt-paper); box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 14px 30px -18px rgba(0,0,0,.7);
}
#workspace #notes-view .nt-composer::before { content: ""; position: absolute; inset: 0 auto 0 14px; width: 1px; background: rgba(205, 80, 70, .35); }
#workspace #notes-view #notes-form textarea {
  min-height: 84px; padding: 0; border: 0; border-radius: 0; resize: vertical; background-color: transparent; color: var(--nt-ink); font-size: 1.05rem; line-height: 28px;
  background: repeating-linear-gradient(transparent 0 27px, var(--nt-rule) 27px 28px); box-shadow: none;
}
#workspace #notes-view #notes-form textarea::placeholder { color: var(--nt-ink-soft); }
#workspace #notes-view #notes-form textarea:focus-visible { box-shadow: none; outline: none; }
#workspace #notes-view .nt-composer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#workspace #notes-view .nt-chips, #workspace #notes-view .nt-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#workspace #notes-view .nt-chip {
  min-height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: .8125rem; cursor: pointer;
  color: inherit; background: transparent; transition: background-color 160ms ease, border-color 160ms ease;
}
#workspace #notes-view #notes-form .nt-chip { border-color: rgba(42, 36, 20, .22); color: var(--nt-ink); background: transparent; }
#workspace #notes-view #notes-form .nt-chip[aria-pressed="true"] { color: #fffbea; background: var(--nt-ink); border-color: var(--nt-ink); }
#workspace #notes-view #notes-form .nt-date input { min-height: 32px; padding: 0 10px; border-radius: 999px; color: var(--nt-ink); background: rgba(255,255,255,.55); border: 1px solid var(--nt-rule); }
#workspace #notes-view .nt-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
#workspace #notes-view .nt-toggle input { width: 18px; height: 18px; accent-color: #1e6f86; }
#workspace #notes-view .nt-save {
  margin-left: auto; min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  color: #fffbea; background: var(--nt-ink); transition: transform 120ms var(--k-ease-out);
}
#workspace #notes-view .nt-save:active { transform: scale(.97); }
#workspace #notes-view .nt-filter { margin: 18px 0 4px; }
#workspace #notes-view .nt-filter .nt-chip { color: var(--k-muted); border-color: var(--k-line); }
#workspace #notes-view .nt-filter .nt-chip[aria-pressed="true"] { color: var(--k-text); background: var(--k-surface-3); border-color: var(--k-line-strong); }
#workspace #notes-view .nt-section { margin-top: 22px; }
#workspace #notes-view .nt-day { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 1.05rem; }
#workspace #notes-view .nt-day small { color: var(--k-muted); font-weight: 400; font-size: .85rem; }
#workspace #notes-view .nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
#workspace #notes-view .nt-note {
  position: relative; display: grid; gap: 10px; padding: 18px 16px 12px; border-radius: 4px 4px 14px 4px; color: var(--nt-ink);
  background: var(--nt-paper); box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 12px 24px -16px rgba(0,0,0,.75);
}
#workspace #notes-view .nt-note.work { background: var(--nt-paper-work); }
#workspace #notes-view .nt-note::before { content: ""; position: absolute; top: -6px; left: 50%; width: 46px; height: 14px; transform: translateX(-50%) rotate(-2deg); background: rgba(255,255,255,.38); border-radius: 2px; }
#workspace #notes-view .nt-text { display: grid; gap: 6px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
#workspace #notes-view .nt-text p { margin: 0; }
#workspace #notes-view .nt-text.folded { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
#workspace #notes-view .nt-more { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: .8125rem; font-weight: 600; color: #0d4b5c; cursor: pointer; text-decoration: underline; }
#workspace #notes-view .nt-note.work .nt-text p:not(:only-child) { padding-left: 14px; position: relative; }
#workspace #notes-view .nt-note.work .nt-text p:not(:only-child)::before { content: "–"; position: absolute; left: 0; color: var(--nt-ink-soft); }
#workspace #notes-view .nt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 8px; border-top: 1px dashed var(--nt-rule); font-size: .75rem; color: var(--nt-ink-soft); }
#workspace #notes-view .nt-tag { padding: 1px 8px; border-radius: 999px; color: #0d4b5c; background: rgba(255,255,255,.55); font-weight: 600; }
#workspace #notes-view .nt-delete {
  position: absolute; top: 6px; right: 6px; min-width: 28px; height: 28px; padding: 0 8px; border: 0; border-radius: 999px; font: inherit; font-size: 1rem; line-height: 1;
  cursor: pointer; color: var(--nt-ink-soft); background: transparent; transition: background-color 160ms ease, color 160ms ease;
}
#workspace #notes-view .nt-delete.armed { font-size: .75rem; font-weight: 600; color: #fff; background: #b3372f; }
@media (hover: hover) and (pointer: fine) {
  #workspace #notes-view .nt-delete:not(.armed) { opacity: 0; }
  #workspace #notes-view .nt-note:hover .nt-delete, #workspace #notes-view .nt-delete:focus-visible { opacity: 1; }
  #workspace #notes-view .nt-delete:not(.armed):hover { color: var(--nt-ink); background: rgba(0,0,0,.08); }
  #workspace #notes-view .nt-chip:hover { border-color: var(--k-line-strong); }
}
#workspace #notes-view .nt-empty { margin-top: 26px; padding: 34px 20px; text-align: center; border: 1px dashed var(--k-line-strong); border-radius: 14px; color: var(--k-muted); }
#workspace #notes-view .nt-empty p { margin: 4px 0; }
@media (max-width: 560px) {
  #workspace #notes-view .nt-save { width: 100%; margin-left: 0; }
  #workspace #notes-view .nt-grid { grid-template-columns: 1fr; }
}

/* Tools › Meetings (meetings.js) */
#meetings-view { display: grid; gap: 20px; --mt-ease: var(--k-ease-out, cubic-bezier(.23, 1, .32, 1)); }
#meetings-view[hidden] { display: none; }
#meetings-view .mt-head .help { max-width: 62ch; margin-top: 6px; }
#meetings-view .mt-head q { color: var(--k-text, #eef4f9); quotes: "„" "“"; white-space: nowrap; }
#meetings-view .status:empty { display: none; }
#meetings-view .card { margin: 0; }
#meetings-view h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.005em; }
#meetings-view svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* two columns from 1000px: recording/detail left, archive right */
.mt-layout { display: grid; gap: 20px; align-items: start; }
.mt-main, .mt-side { display: grid; gap: 20px; min-width: 0; }
@media (min-width: 1000px) {
  .mt-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
  .mt-side { position: sticky; top: 16px; }
}

/* form */
.mt-start { display: grid; gap: 18px; }
.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mt-side .mt-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 599px) { .mt-grid, .mt-devices, .mt-choices { grid-template-columns: minmax(0, 1fr) !important; } }
.mt-wide { grid-column: 1 / -1; }
#meetings-view label.mt-field, #meetings-view .mt-label { display: grid; gap: 7px; margin: 0; font-size: .8rem; font-weight: 600; color: var(--k-muted, #b0bfce); letter-spacing: .01em; }
#meetings-view .mt-field :is(input, select, textarea) { font-size: .95rem; font-weight: 450; color: var(--k-text, #eef4f9); }
#meetings-view textarea { resize: vertical; min-height: 72px; }
.mt-where { border: 0; padding: 0; margin: 0; min-width: 0; }
.mt-where legend { padding: 0; margin-bottom: 7px; }
.mt-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#meetings-view label.mt-choice { position: relative; display: flex; gap: 12px; align-items: center; margin: 0; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--k-line-strong, rgba(255,255,255,.13)); border-radius: 14px; background: var(--k-surface-2, rgba(255,255,255,.045));
  font-weight: 500; color: var(--k-muted, #b0bfce);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms var(--mt-ease); }
.mt-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mt-choice span { display: grid; gap: 2px; min-width: 0; }
.mt-choice strong { color: var(--k-text, #eef4f9); font-size: .95rem; font-weight: 650; }
.mt-choice small { font-size: .8rem; font-weight: 450; line-height: 1.35; }
#meetings-view .mt-choice:active { transform: scale(.98); }
#meetings-view .mt-choice:has(input:checked) { border-color: var(--k-accent, #62d2f0); background: var(--k-accent-soft, rgba(98,210,240,.14)); color: var(--k-accent, #62d2f0); }
.mt-choice:has(input:focus-visible) { outline: 2px solid var(--k-accent, #62d2f0); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  #meetings-view .mt-choice:not(:has(input:checked)):hover { border-color: rgba(255,255,255,.22); background: var(--k-surface-3, rgba(255,255,255,.08)); }
}
.mt-devices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px;
  border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px solid var(--k-line, rgba(255,255,255,.075)); }
.mt-devices[hidden] { display: none; }
.mt-devices .help { margin: 0; font-size: .8rem; }
.mt-devices-foot { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.mt-link { border: 0; padding: 2px 0; background: none; color: var(--k-accent, #62d2f0); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.mt-link:active { opacity: .7; }
@media (hover: hover) and (pointer: fine) { .mt-link:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* folds (details) */
.mt-fold > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; width: fit-content;
  font-size: .86rem; font-weight: 600; color: var(--k-muted, #b0bfce); padding: 4px 0; transition: color 160ms ease; }
.mt-fold > summary::-webkit-details-marker { display: none; }
.mt-fold > summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: rotate(-45deg); transition: transform 200ms var(--mt-ease); margin-right: 2px; }
.mt-fold[open] > summary::before { transform: rotate(45deg) translate(-2px, -1px); }
.mt-fold[open] > summary { color: var(--k-text, #eef4f9); margin-bottom: 10px; }
@media (hover: hover) and (pointer: fine) { .mt-fold > summary:hover { color: var(--k-text, #eef4f9); } }
.mt-extra textarea { width: 100%; }

/* consent and submit */
#meetings-view label.mt-consent { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; cursor: pointer;
  border-radius: 14px; border: 1px solid var(--k-line, rgba(255,255,255,.075)); background: var(--k-surface-2, rgba(255,255,255,.045));
  font-size: .9rem; font-weight: 550; color: var(--k-text, #eef4f9); line-height: 1.4; transition: border-color 160ms ease; }
#meetings-view label.mt-consent input { width: 18px; height: 18px; margin: 1px 0 0; padding: 0; flex: none; }
.mt-consent span { display: grid; gap: 3px; }
.mt-consent small { font-size: .78rem; font-weight: 450; color: var(--k-muted, #b0bfce); }
#meetings-view .mt-consent:has(input:checked) { border-color: rgba(98, 210, 240, .45); }
#meetings-view label.mt-plain { padding: 0; border: 0; background: none; font-weight: 500; }
.mt-submit { display: flex; justify-content: flex-end; }
.mt-submit .button { display: inline-flex; align-items: center; gap: 10px; min-width: 200px; justify-content: center; }
.mt-rec { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
@media (max-width: 599px) { .mt-submit .button { width: 100%; } }

/* buttons in this view: press feedback */
#meetings-view .button { transition: transform 160ms var(--mt-ease), background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease; }
#meetings-view .button:active:not(:disabled) { transform: scale(.97); }
.mt-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--k-muted, #b0bfce);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--mt-ease); }
.mt-icon-button:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .mt-icon-button:hover { background: var(--k-surface-3, rgba(255,255,255,.08)); color: var(--k-text, #eef4f9); } }

/* running recording */
.mt-active { display: grid; gap: 16px; border-color: rgba(255, 138, 138, .28); background:
  radial-gradient(120% 140% at 0% 0%, rgba(255, 138, 138, .09), transparent 55%), var(--k-surface, rgba(12,22,34,.86)); }
.mt-active[hidden] { display: none; }
.mt-live { display: flex; gap: 14px; align-items: center; }
.mt-live-text { flex: 1 1 auto; min-width: 0; }
.mt-live h3 { font-size: 1.25rem; overflow-wrap: anywhere; }
.mt-kicker { margin: 0 0 3px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted, #b0bfce); }
.mt-active .mt-kicker { color: var(--k-danger, #ff8a8a); }
.mt-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--k-danger, #ff8a8a); flex: none; margin: 0 4px; }
.mt-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: mt-ping 2s var(--mt-ease) infinite; }
@keyframes mt-ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.mt-active.stopping .mt-dot::after { animation: none; }
.mt-active.stopping .mt-dot, .mt-active.stopping { border-color: var(--k-line-strong, rgba(255,255,255,.13)); }
.mt-active.stopping .mt-kicker { color: var(--k-warn, #f5b25b); }
.mt-active.stopping .mt-dot { background: var(--k-warn, #f5b25b); }
.mt-stop-icon { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.mt-live-actions { display: flex; gap: 8px; flex: none; }
#meetings-stop, #meetings-pause { display: inline-flex; align-items: center; gap: 9px; }
#meetings-pause { min-width: 136px; justify-content: center; }
.mt-pause-icon { width: 10px; height: 11px; flex: none; border-inline: 3.5px solid currentColor; }
#meetings-pause[aria-pressed="true"] { border-color: var(--k-accent, #62d2f0); color: var(--k-accent, #62d2f0); }
/* resume: a play triangle instead of the two bars */
#meetings-pause[aria-pressed="true"] .mt-pause-icon { width: 0; height: 0; border: solid transparent; border-width: 6px 0 6px 10px;
  border-left-color: currentColor; }
.mt-active.paused { border-color: var(--k-line-strong, rgba(255,255,255,.13)); background: var(--k-surface, rgba(12,22,34,.86)); }
.mt-active.paused .mt-kicker { color: var(--k-muted, #b0bfce); }
.mt-active.paused .mt-dot { background: var(--k-faint, #6b7d8f); }
.mt-active.paused .mt-dot::after { animation: none; opacity: 0; }
@media (max-width: 599px) {
  .mt-live { flex-wrap: wrap; }
  .mt-live-actions { width: 100%; }
  .mt-live-actions .button { flex: 1; justify-content: center; }
}
.mt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: 12px; overflow: hidden;
  background: var(--k-line, rgba(255,255,255,.075)); border: 1px solid var(--k-line, rgba(255,255,255,.075)); }
.mt-stats div { padding: 10px 14px; background: rgba(8, 16, 26, .72); }
.mt-stats dt { font-size: .72rem; color: var(--k-muted, #b0bfce); font-weight: 600; }
.mt-stats dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--k-text, #eef4f9); }
.mt-active > .help { margin: 0; font-size: .82rem; }
.mt-local { display: grid; gap: 8px; }
.mt-local[hidden] { display: none; }
.mt-local .help { margin: 0; }
.mt-meter { height: 6px; border-radius: 999px; background: var(--k-surface-3, rgba(255,255,255,.08)); overflow: hidden; }
.mt-meter span { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0); border-radius: inherit;
  background: linear-gradient(90deg, var(--k-accent, #62d2f0), #9be8ff); transition: transform 120ms linear; }

/* detail */
.mt-detail { display: grid; gap: 16px; }
.mt-detail[hidden] { display: none; }
.mt-detail-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.mt-detail-head h3 { font-size: 1.3rem; overflow-wrap: anywhere; }
.mt-detail-head .mt-kicker { color: var(--k-accent, #62d2f0); }
.mt-summary { line-height: 1.6; overflow-wrap: anywhere; color: var(--k-text, #eef4f9); font-size: .95rem; max-width: 72ch; }
.mt-summary > :first-child { margin-top: 0; }
.mt-summary h4 { margin: 20px 0 6px; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--k-muted, #b0bfce); }
.mt-summary p { margin: 6px 0; }
.mt-summary ul { margin: 6px 0; padding-left: 20px; }
.mt-summary li { margin: 4px 0; }
.mt-summary li::marker { color: var(--k-accent, #62d2f0); }
.mt-detail > .mt-fold { border-top: 1px solid var(--k-line, rgba(255,255,255,.075)); padding-top: 12px; }
.mt-transcript { white-space: pre-wrap; line-height: 1.6; max-height: 360px; overflow: auto; padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, .2); color: var(--k-muted, #b0bfce); font-size: .88rem; overflow-wrap: anywhere; }

/* archive */
.mt-archive, .mt-templates { display: grid; gap: 12px; }
.mt-list { display: grid; gap: 2px; }
.mt-list > .help { margin: 4px 0; }
.mt-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; margin: 0 -12px; width: calc(100% + 24px);
  text-align: left; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer;
  transition: background-color 140ms ease, transform 160ms var(--mt-ease); }
.mt-row > div { display: grid; gap: 2px; min-width: 0; }
.mt-row strong { font-size: .93rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-row small { color: var(--k-muted, #b0bfce); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-row:active { transform: scale(.985); }
.mt-row[aria-current="true"] { background: var(--k-accent-soft, rgba(98,210,240,.14)); }
.mt-row[aria-current="true"] strong { color: var(--k-accent, #62d2f0); }
@media (hover: hover) and (pointer: fine) { .mt-row:not([aria-current]):hover { background: var(--k-surface-2, rgba(255,255,255,.045)); } }
.mt-badge { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex: none;
  background: var(--k-surface-3, rgba(255,255,255,.08)); color: var(--k-muted, #b0bfce); }
.mt-badge.summarizing { background: var(--k-accent-soft, rgba(98,210,240,.14)); color: var(--k-accent, #62d2f0); }
.mt-badge.failed { background: rgba(255, 138, 138, .14); color: var(--k-danger, #ff8a8a); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mt-chips .mt-row { width: auto; margin: 0; padding: 6px 12px; border: 1px solid var(--k-line-strong, rgba(255,255,255,.13)); border-radius: 999px; gap: 8px; }
.mt-chips .mt-row strong { font-size: .84rem; }
.mt-chips .mt-badge { padding: 1px 7px; }
.mt-templates .help { margin: 0 0 12px; font-size: .82rem; }

/* gentle entrance for panels that appear on demand */
.mt-active:not([hidden]), .mt-detail:not([hidden]) { animation: mt-in 220ms var(--mt-ease); }
@keyframes mt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .mt-dot::after { animation: none; }
  .mt-meter span { transition: none; }
  .mt-active:not([hidden]), .mt-detail:not([hidden]) { animation: mt-fade 160ms ease; }
  @keyframes mt-fade { from { opacity: 0; } }
}

/* Shorts shares the studio's typography, controls and surfaces. */
.sh-panel {padding-block:12px}.sh-header,.sh-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.sh-header{justify-content:space-between;margin-bottom:16px}.sh-header h2,.sh-header h3{margin:0}.sh-layout{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:18px;align-items:start}.sh-layout>*{min-width:0}.sh-projects{display:grid;gap:8px}.sh-projects button{text-align:left;white-space:normal;overflow-wrap:anywhere}.sh-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.sh-grid label,.sh-scene label{display:grid;gap:6px;min-width:0}.sh-wide{grid-column:1/-1}.sh-check{display:flex!important;align-items:center;gap:8px!important}.sh-check input{width:auto}.sh-section{margin-block:16px}.sh-section summary{cursor:pointer;font-weight:600;padding-block:10px}.sh-actions{margin-block:12px}.sh-actions select{max-width:100%;min-width:0}.sh-cast-card{padding:12px;border:1px solid var(--border,#334155);border-radius:12px;margin-block:12px}.sh-refs{display:flex;gap:10px;flex-wrap:wrap;margin-block:10px}.sh-refs img{width:88px;height:110px;object-fit:cover;border-radius:8px}.sh-scenes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}.sh-scene{min-width:0;border:1px solid var(--border,#334155);border-radius:12px;padding:14px}.sh-scene label{margin-block:10px}.sh-scene textarea{min-height:82px;resize:vertical}.sh-scene img,.sh-scene video{width:100%;max-height:340px;object-fit:contain;border-radius:8px;background:#111827;aspect-ratio:9/16}.sh-quote{padding:16px;margin-block:16px;border:1px solid var(--accent,#80aaff);border-radius:12px}.sh-output{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-top:16px}.sh-output video{width:min(100%,300px);max-height:520px;border-radius:12px}.sh-panel fieldset{border:0;padding:0;min-width:0}.sh-panel input:not([type=checkbox]),.sh-panel textarea,.sh-panel select{width:100%;box-sizing:border-box;font:inherit}.sh-panel textarea{resize:vertical}.sh-production{padding-block:12px;border-block:1px solid var(--border,#334155)}
@media(max-width:760px){.sh-layout{grid-template-columns:1fr}.sh-projects{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.sh-grid{grid-template-columns:1fr}.sh-wide{grid-column:auto}.sh-actions>button{flex:1 1 auto}.sh-panel input,.sh-panel textarea,.sh-panel select{font-size:16px}}

/* Project library: spacious cards and an intentional cover before the first image exists. */
#vs-studio-view .vs-layout, #shorts-view .sh-layout { grid-template-columns:minmax(0,1fr); }
#vs-studio-view .vs-library { position:static; }
#vs-projects.vm-gallery, #sh-projects.vm-gallery { display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px;overflow:visible; }
#vs-studio-view .vm-card { position:relative;min-width:0;border:1px solid rgba(154,177,211,.16);border-radius:16px;background:#111a28;overflow:hidden; }
#vs-studio-view .vm-open { display:block;width:100%;padding:0;margin:0;border:0;border-radius:0;background:transparent;text-align:left;color:inherit;white-space:normal;cursor:pointer; }
#vs-studio-view .vm-open[aria-current] { background:#192b43;box-shadow:inset 0 0 0 2px #8baeff; }
#vs-studio-view .vm-open:focus-visible { outline:3px solid #9cb9ff;outline-offset:-3px; }
.vm-art { position:relative;aspect-ratio:16/10;overflow:hidden;background:linear-gradient(135deg,#244964,#14213b); }
.vm-tone-1 { background:linear-gradient(135deg,#493858,#20253f); }.vm-tone-2 { background:linear-gradient(135deg,#24534e,#172e40); }.vm-tone-3 { background:linear-gradient(135deg,#65482f,#302b42); }.vm-tone-4 { background:linear-gradient(135deg,#354f75,#29263f); }
.vm-fallback { position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 80% 10%,#ffffff15,transparent 60%);color:#dce9ff; }
.vm-monogram { font-size:clamp(36px,5vw,62px);font-weight:650;letter-spacing:-.06em;opacity:.75; }
.vm-format,.vm-type { position:absolute;font-size:11px;font-weight:650;letter-spacing:.12em;opacity:.7; }.vm-format{top:16px;left:18px}.vm-type{bottom:16px;right:18px}
.vm-art img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.vm-art img[hidden] { display:none; }
.vm-caption { display:grid;gap:9px;padding:17px 18px 8px; }
.vm-title { font-size:15px;line-height:1.45;font-weight:650;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em; }
.vm-meta { font-size:12px;color:#a6b4ca;line-height:1.5; }
.vm-actions { display:flex;justify-content:flex-end;padding:0 10px 8px; }
#vs-studio-view .vm-delete { display:inline-flex;width:auto;min-height:40px;margin:0;padding:8px 10px;border:0;background:transparent;color:#b9c6da;font-size:12px;cursor:pointer; }
#vs-studio-view .vm-delete:focus-visible { outline:2px solid #9cb9ff; }
.vm-confirm { padding:0 16px 16px;font-size:13px;line-height:1.5; }.vm-confirm button { min-height:42px!important;width:auto!important;display:inline-flex!important;margin:4px!important; }
.vm-music { margin-top:22px;border-top:1px solid #ffffff14;padding-top:16px; }.vm-music>summary{cursor:pointer;font-size:14px;color:#b8c7dd;}
.vm-empty { padding:24px;color:#a6b4ca;grid-column:1/-1; }
#shorts-view .sh-import-card { display:grid;grid-template-columns:minmax(220px,1fr) minmax(280px,1.3fr);gap:24px;align-items:center;margin:12px 0 26px;padding:24px;background:linear-gradient(110deg,#182b43,#101925);border:1px solid #8aafff40;border-radius:18px; }
.sh-import-card h3 { margin:4px 0 8px;font-size:23px;letter-spacing:-.02em; }.sh-import-card .help{line-height:1.6;margin-bottom:0;}.sh-import-card .sh-actions { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;margin:0; }.sh-import-card #sh-import{grid-column:1/-1;min-height:44px;}.sh-import-card select{min-height:44px;}
@media(hover:hover) and (pointer:fine){#vs-studio-view .vm-open:hover{background:#ffffff05}#vs-studio-view .vm-delete:hover{color:#ffb3ad;background:#ffb3ad0a;border-radius:8px}}
@media(max-width:640px){#vs-projects.vm-gallery,#sh-projects.vm-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.vm-caption{padding:12px 12px 6px}.vm-title{font-size:13px}.vm-meta{font-size:11px}#shorts-view .sh-import-card{grid-template-columns:minmax(0,1fr);padding:18px;gap:16px}.vm-art{aspect-ratio:4/3}.vm-format{top:10px;left:12px}.vm-type{bottom:10px;right:12px}.vm-confirm{padding:0 10px 12px}}
.sh-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:20px 0}.sh-steps>div{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:14px;border:1px solid #ffffff18;border-radius:12px;background:#142033}.sh-steps>div>span{font-size:12px;font-weight:650;color:#b4c7e4;margin-bottom:4px}.sh-scene-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.sh-scene-head h4{margin:0}.sh-scene-head .sh-actions{margin:0}.sh-scene audio{width:100%;margin:12px 0}.sh-scene-delete{padding:12px;border:1px solid #e1979760;border-radius:10px;margin:12px 0}.sh-scene-delete button{margin-right:8px}.sh-track-files{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.sh-track-files h4{width:100%;margin:8px 0}.sh-scenes{grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr))}#sh-seconds[readonly]{opacity:.65}

.vt-editor{margin-top:24px;padding:20px;border:1px solid #34465e;border-radius:18px;background:#0d1520}.vt-stage{position:relative;background:#05080c;height:280px;margin:16px auto;border-radius:12px;overflow:hidden}.vt-stage img,.vt-stage video{width:100%;height:100%;object-fit:contain}.vt-editor>input[type=range]{width:100%;margin:20px 0}.vt-lanes{overflow-x:auto;padding-bottom:12px}.vt-track{display:grid;grid-template-columns:130px minmax(420px,1fr);min-width:560px;gap:12px;margin:10px 0}.vt-track-label{display:flex;flex-direction:column;gap:6px;align-items:start}.vt-track-bar{position:relative;height:72px;background:#080e18;border:1px solid #273447;border-radius:8px}.vt-clip{position:absolute;top:6px;height:58px;display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:8px;overflow:hidden;border:1px solid #668db1;border-radius:6px;color:#f2f7ff;background:#294b6c;padding:0;touch-action:none;user-select:none}.vt-audio{background:#254c42;border-color:#67a08e}.vt-clip.is-selected{outline:2px solid #dce9ff;outline-offset:1px}.vt-clip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.vt-handle{display:flex;align-items:center;justify-content:center;min-width:12px;height:100%;background:#ffffff16;cursor:ew-resize}.vt-playhead{position:absolute;top:0;bottom:0;width:2px;background:#f7c766;z-index:2;pointer-events:none}.vt-editor .sh-grid{margin:12px 0}.vt-exports{display:grid;gap:8px;margin-top:12px}@media(max-width:600px){.vt-editor{padding:12px}.vt-stage{height:220px}.vt-track{grid-template-columns:100px minmax(320px,1fr);min-width:440px}.vt-editor .button{font-size:12px}}

.vt-wave{position:absolute;inset:6px 0;width:100%;height:44px;opacity:.55;pointer-events:none}.vt-clip-name,.vt-handle{position:relative;z-index:1}.vt-clip-name{text-shadow:0 1px 3px #000}

/* Volle Breite und ein gemeinsamer, moderner Look für alle Seiten außer Tarvi Live (Kalender, E-Mail, Dokumente, Zuhause,
   Nachrichten, Medien, Projekte, Workflows, Recherche, Einstellungen). Geladen nach allen anderen Stilen. */

/* 1. Die ganze Bildschirmbreite, mit Rand */
.page:has(> #workspace:not([hidden])):not(:has(> #workspace > #voice-panel:not([hidden]))) {
  max-width: none; padding-left: clamp(16px, 2.6vw, 44px); padding-right: clamp(16px, 2.6vw, 44px);
}

/* 2. Gemeinsame Gestaltung */
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel, #media-panel) {
  --m-line: rgba(255, 255, 255, .09); --m-text: #f3f6fb; --m-muted: #9aa7b8; --m-hot: #ff4d6d; --m-warm: #ff9a3c; --m-accent: #61d5e8;
  --m-play: linear-gradient(135deg, #ff4d6d, #ff9a3c);
}
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) .card {
  border-radius: 22px; padding: 24px 26px; border-color: rgba(255, 255, 255, .08); color: var(--m-text);
  background: radial-gradient(900px 300px at 0% -10%, rgba(255, 77, 109, .09), transparent 60%),
              radial-gradient(700px 280px at 100% -20%, rgba(97, 213, 232, .09), transparent 55%),
              linear-gradient(180deg, #0b1422, #070d16 420px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) .card:hover { border-color: rgba(255, 255, 255, .13); }
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) :is(.eyebrow) { color: var(--m-warm); }
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) .section-head h2 { letter-spacing: -.02em; }
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel, #media-panel) .button { border-radius: 999px; }
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) .button.primary {
  border: 0; color: #fff; background: var(--m-play); box-shadow: 0 6px 18px rgba(255, 77, 109, .28);
}
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) .button.primary:hover { filter: brightness(1.08); }
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) {
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .32); color: var(--m-text);
}
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) :is(input, select, textarea):focus-visible {
  outline: none; border-color: rgba(255, 154, 60, .65); box-shadow: 0 0 0 4px rgba(255, 154, 60, .13);
}
:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel) input[type=checkbox] { accent-color: var(--m-warm); }
.item, .mail-row { border-radius: 16px; }

/* 3. Anordnung auf breiten Bildschirmen */
@media (min-width: 1100px) {
  /* Kalender: links Erinnerungen und neuer Termin, rechts die Termine in voller Höhe */
  #calendar-panel .dashboard { grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 22px; }
  #calendar-panel .reminders { grid-column: 1; grid-row: 1; }
  #calendar-panel .create-card { grid-column: 1; grid-row: 2; }
  #calendar-panel .upcoming { grid-column: 2; grid-row: 1 / span 2; min-height: 60vh; }
  /* E-Mail: Liste | Lesen | Schreiben nebeneinander, Liste und Text scrollen für sich */
  #mail-panel .mail-grid { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(340px, 430px); gap: 20px; }
  #mail-panel .mail-compose { grid-column: auto; }
  #mail-panel #mail-list { max-height: calc(100dvh - 360px); overflow-y: auto; padding-right: 4px; }
  /* Dokumente: Baum und Inhalt */
  #documents-panel .documents-layout { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.5fr); gap: 22px; }
  #documents-panel .documents-tree { max-height: calc(100dvh - 330px); }
  #documents-panel .documents-content { max-height: calc(100dvh - 330px); }
  /* Nachrichten: schmale Feedliste, breite Meldungen */
  #news-panel .news-grid { grid-template-columns: minmax(320px, .75fr) minmax(0, 1.5fr); gap: 22px; }
  #news-panel #news-headlines { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
  /* Zuhause: Geräte als Kacheln */
  #home-panel #home-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
  #home-panel #home-devices > * { margin: 0; }
  /* Recherche: Verlauf | Gespräch | Dokument */
  #chat-panel .chat-shell { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; }
  #chat-panel .chat-shell.document-open { grid-template-columns: minmax(240px, 300px) minmax(0, 1.2fr) minmax(360px, 1fr); }
  #chat-panel .chat-shell.history-hidden.document-open { grid-template-columns: minmax(0, 1.2fr) minmax(360px, 1fr); }
  /* Medien */
  #media-panel .media-card { max-width: none; }
  /* Workflows */
  #workflows-panel .wf-layout { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 22px; }
}
@media (min-width: 1400px) {
  #calendar-panel #event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
  /* Einstellungen: Karten in zwei Spalten statt eine lange Reihe */
  #settings-panel #character-panel {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start;
  }
  #settings-panel #character-panel > :not(.card) { grid-column: 1 / -1; }
}
@media (min-width: 1900px) {
  #mail-panel .mail-grid { grid-template-columns: minmax(340px, 440px) minmax(0, 1fr) minmax(380px, 480px); }
  #news-panel #news-headlines { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}

/* Eingabefelder dürfen schmale Karten nie sprengen (datetime-local hat sonst eine feste Mindestbreite). */
:is(#calendar-panel,#mail-panel,#documents-panel,#home-panel,#news-panel,#projects-panel,#workflows-panel,#chat-panel,#settings-panel) :is(.field-pair > *, label, input, select, textarea) { min-width: 0; }
:is(#calendar-panel,#mail-panel,#documents-panel,#settings-panel) input:is([type=datetime-local],[type=date],[type=time],[type=text],[type=email],[type=search],[type=number],:not([type])), :is(#calendar-panel,#mail-panel,#documents-panel,#settings-panel) :is(select,textarea) { max-width: 100%; }

/* Schmal: einspaltig, aber nie breiter als der Bildschirm (1fr hätte eine Mindestbreite aus dem Inhalt). */
@media (max-width: 760px) {
  #workflows-panel .wf-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Schieberegler: leuchtendes Blau */
#workspace input[type=range]:not(#voice-panel *) {
  --blue: #2aa8ff; --blue-soft: rgba(42, 168, 255, .55); --fill: 0%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 4px 0; padding: 0; border: 0; background: transparent; cursor: pointer; accent-color: var(--blue);
}
#workspace input[type=range]:not(#voice-panel *):focus { outline: none; }
#workspace input[type=range]:not(#voice-panel *)::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #1b6dff, var(--blue) calc(var(--fill) * .7), #7fe3ff var(--fill), rgba(255, 255, 255, .1) var(--fill));
  box-shadow: 0 0 16px -2px var(--blue-soft), inset 0 1px 2px rgba(0, 0, 0, .5);
}
#workspace input[type=range]:not(#voice-panel *)::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
#workspace input[type=range]:not(#voice-panel *)::-moz-range-progress { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #1b6dff, #7fe3ff); box-shadow: 0 0 16px -2px var(--blue-soft); }
#workspace input[type=range]:not(#voice-panel *)::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 3px solid #eaf8ff;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, #7fe3ff 40%, #1b8cff 100%);
  box-shadow: 0 0 0 5px rgba(42, 168, 255, .22), 0 0 22px 4px var(--blue-soft), 0 3px 8px rgba(0, 0, 0, .5);
  transition: box-shadow .15s, transform .15s;
}
#workspace input[type=range]:not(#voice-panel *)::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid #eaf8ff;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, #7fe3ff 40%, #1b8cff 100%);
  box-shadow: 0 0 0 5px rgba(42, 168, 255, .22), 0 0 22px 4px var(--blue-soft);
}
#workspace input[type=range]:not(#voice-panel *):hover::-webkit-slider-thumb { transform: scale(1.08); }
#workspace input[type=range]:not(#voice-panel *):focus-visible::-webkit-slider-thumb, #workspace input[type=range]:not(#voice-panel *):active::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(42, 168, 255, .3), 0 0 30px 8px rgba(42, 168, 255, .8), 0 3px 8px rgba(0, 0, 0, .5); transform: scale(1.12); }
#workspace input[type=range]:not(#voice-panel *):disabled { opacity: .45; cursor: not-allowed; filter: saturate(.4); }

/* Einstellungen: volle Breite, Stimme zweispaltig, Listen als Raster */
#character-panel { max-width: none; margin: 0; }
@media (min-width: 1100px) {
  #settings-panel #character-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
  #settings-panel #character-panel > * { grid-column: 1 / -1; }
  #character-panel .character-header { padding: 6px 0 0; }
  #character-panel .character-nav { max-width: 760px; }
  #voice-settings { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px 48px; align-items: start; padding: 28px 34px; }
  #voice-settings > .eyebrow, #voice-settings > h2 { grid-column: 1 / -1; margin: 0; }
  #voice-settings .voice-options { grid-column: 1; grid-row: 3 / 6; }
  #voice-settings .voice-option-hint, #voice-settings .voice-disclosure { grid-column: 2; margin: 0; }
  #voice-settings .voice-disclosure { grid-row: 4; }
  #voice-settings .voice-options select { width: 100%; max-width: 460px; }
  #character-panel .personal-settings { padding: 26px 32px; }
  #character-panel .personal-settings > input, #character-panel .personal-settings > select { max-width: 560px; }
  #character-panel .item-list { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); max-height: 62vh; }
  #character-panel .item-list > .personal-entry, #character-panel .item-list > .character-empty { margin: 0; }
}
@media (min-width: 2000px) {
  #character-panel .item-list { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); }
}
#settings-panel .voice-settings { max-width: none; margin: 0; }
@media (min-width: 1100px) {
  #voice-settings .voice-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
  #voice-settings .voice-options > * { margin: 0; }
  #voice-settings .voice-options > label:not(.checkbox-row) { display: flex; justify-content: space-between; align-items: baseline; }
  #voice-settings .voice-options > label:not(.checkbox-row) output { color: #7fe3ff; font-weight: 800; }
  #voice-settings .voice-options > .help { margin-bottom: 8px; }
}

/* Einstellungen › Allgemein und Geräte: Karten fließen in zwei Spalten nach ihrer Höhe (keine Lücken wie im Raster),
   breite Bereiche (Dashboard, KI-Modelle, Verbrauch, Geräteliste) gehen über die volle Breite. */
@media (min-width: 1100px) {
  #settings-panel #settings-general:not([hidden]), #settings-panel #devices-panel:not([hidden]) { display: block; columns: 2; column-gap: 22px; }
  #settings-panel :is(#settings-general, #devices-panel) > * { break-inside: avoid; margin: 0 0 22px; }
  #settings-panel :is(#dashboard-settings, #model-settings, #usage-settings, #device-manager) { column-span: all; }
}
#device-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
#device-list > .device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
#device-list > .device-row > div:first-child { min-width: 0; }
#device-list > .device-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#device-list .device-row-actions { display: flex; gap: 8px; flex: none; }

#of-archive-panel > summary { min-height:44px;padding:10px 0;cursor:pointer; }
#office-view { --of-accent:#71d1db; }
.of-export-row { min-width:0;padding:14px;margin:12px 0;border:1px solid #395065;border-radius:12px;overflow-wrap:anywhere; }
.of-export-row strong,.of-export-row code { overflow-wrap:anywhere; }
.of-export-row code { display:block;white-space:pre-wrap; }
#workspace #office-view .of-export-panel :is(input,select) { font-size:16px;min-height:44px; }
#workspace #office-view .of-export-panel button { min-height:44px;touch-action:manipulation; }
/* A 16px field prevents iOS input zoom; controls remain easy to tap in the narrow library. */
#workspace #office-view .of-template-fields input,
#workspace #office-view .of-template-fields select { font-size:16px;min-height:44px;min-width:0; }
#workspace #office-view .of-template-fields button { min-height:44px;touch-action:manipulation; }
.of-layout { display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px;align-items:start; }
.of-layout>* { min-width:0; }
.of-library { position:sticky;top:12px; }
.of-library button { white-space:normal;text-align:left; }
#of-library { display:grid;gap:8px;max-height:45vh;overflow:auto;margin:14px 0; }
#office-view label { display:flex;flex-direction:column;gap:6px;margin:10px 0; }
#office-view input,#office-view textarea,#office-view select { max-width:100%;box-sizing:border-box; }
#office-view input[type=checkbox] { width:auto; }
#office-view button { border:1px solid #456477;border-radius:12px;background:#183143;color:#eefaff;padding:9px 12px;cursor:pointer;max-width:100%;overflow-wrap:anywhere; }
#office-view button:disabled { opacity:.45;cursor:default; }
#office-view button[aria-current],#office-view .selected { outline:2px solid var(--of-accent); }
#of-editor[hidden],#of-empty[hidden] { display:none; }
.of-actions { display:flex;gap:8px;flex-wrap:wrap;align-items:center; }
.of-title { flex:1;min-width:140px; }
.of-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px; }
.of-workspace { display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:start;margin:16px 0; }
.of-workspace>* { min-width:0; }
#of-content { border:0;margin:0;padding:0;min-width:0; }
.of-block { border:1px solid #395065;border-radius:10px;padding:12px;margin:10px 0;overflow-wrap:anywhere; }
.of-block textarea { width:100%;min-height:90px;resize:vertical; }
.of-block img { max-width:100%;max-height:260px;object-fit:contain; }
.of-sheet { max-height:65vh;overflow:auto;border:1px solid #506475; }
.of-sheet table { border-collapse:collapse;table-layout:fixed; }
.of-sheet td,.of-sheet th { border:1px solid #405063;min-width:95px;padding:0; }
.of-sheet input { width:110px;border:0;border-radius:0; }
.of-sheet th { padding:5px;background:#183143;position:sticky;top:0;z-index:1; }
.of-formula-bar { display:flex; align-items:center; gap:8px; margin:6px 0; padding:4px 8px; border:1px solid #405063; border-radius:6px; background:#0f2433; }
.of-formula-ref { min-width:52px; font:600 .85rem ui-monospace,monospace; color:#a9d9e8; }
.of-formula-fx { font-style:italic; font-weight:700; color:#7fb8cc; padding-right:8px; border-right:1px solid #405063; }
.of-formula-bar input { flex:1; min-width:0; border:0; background:transparent; font:0.95rem ui-monospace,monospace; }
.of-formula-bar input:disabled { opacity:.6; }
.of-slide-title { font-size:1.4rem;width:100%; }
.of-assistant { position:sticky;top:12px; }
#of-proposal pre { white-space:pre-wrap;max-height:280px;overflow:auto;overflow-wrap:anywhere;font-size:.85rem; }
.of-recording { background:#9e2543!important; }
.of-chart { padding:12px 0; }
.of-chart-row { display:flex;align-items:center;gap:8px;margin:5px 0; }
.of-chart-row span { min-width:70px;overflow-wrap:anywhere; }
.of-chart-row meter { flex:1;min-width:0; }
@media(max-width:1200px) { .of-workspace { grid-template-columns:1fr; }.of-assistant { position:static; } }
@media(max-width:700px) { .of-layout { grid-template-columns:1fr; }.of-library { position:static; }#of-library { max-height:180px; }#office-view .card { padding:14px; }.vs-subtabs { flex-wrap:wrap;gap:6px; } }

/* ---- Office-Studio: großer Arbeitsbereich, Papieransicht, Folienbühne, Vorlagen ---- */
#office-view { width:100%; }
.of-layout { grid-template-columns:260px minmax(0,1fr); gap:20px; }
.of-library { top:8px; max-height:calc(100vh - 24px); overflow:auto; }
#of-library { max-height:none; gap:6px; }
#of-library .of-file { display:flex; flex-direction:column; gap:2px; border-left:4px solid #71d1db; }
#of-library .of-file.xlsx { border-left-color:#5fd08a; }
#of-library .of-file.pptx { border-left-color:#ff9a62; }
#of-library .of-file small { opacity:.7; font-size:.75rem; }
#of-library .of-file[aria-current] { background:#24465d; }
.of-primary { font-weight:700; width:100%; }
.of-workspace { grid-template-columns:minmax(0,1fr) 320px; gap:20px; }
@media(min-width:1700px) { .of-workspace { grid-template-columns:minmax(0,1fr) 360px; } }
.of-paper { min-height:calc(100vh - 260px); }
.of-paper[data-kind=docx] { background:transparent; border:0; box-shadow:none; padding:0; }
.of-paper[data-kind=docx] #of-content { background:#fff; color:#20364d; border-radius:6px; box-shadow:0 10px 40px rgba(0,0,0,.45); width:100%; max-width:980px; margin:8px auto 14px; padding:56px 64px; min-height:calc(100vh - 330px); box-sizing:border-box; }
.of-paper[data-kind=docx] #of-add { max-width:980px; margin:0 auto; }
.of-paper[data-kind=docx] .of-block { border:1px solid transparent; border-radius:6px; padding:2px 4px; margin:2px 0; position:relative; }
.of-paper[data-kind=docx] .of-block:hover,.of-paper[data-kind=docx] .of-block:focus-within { border-color:#bcd3e4; background:#f7fbff; }
.of-paper[data-kind=docx] .of-block>.of-actions { display:none; position:absolute; right:6px; top:-18px; background:#183143; border-radius:10px; padding:4px; z-index:3; }
.of-paper[data-kind=docx] .of-block:hover>.of-actions,.of-paper[data-kind=docx] .of-block:focus-within>.of-actions { display:flex; }
.of-paper[data-kind=docx] .of-block>details { display:none; }
.of-paper[data-kind=docx] .of-block:focus-within>details { display:block; color:#20364d; }
.of-paper[data-kind=docx] .of-block textarea { border:0; outline:0; background:transparent!important; resize:none; overflow:hidden; min-height:28px; padding:4px 0; line-height:1.55; width:100%; }
.of-paper[data-kind=docx] .of-block textarea.of-bullet { padding-left:22px; background:radial-gradient(circle at 7px 16px,#205b80 3px,transparent 4px)!important; }
.of-paper[data-kind=docx] .of-sheet { border-color:#bcd3e4; max-height:none; }
.of-paper[data-kind=docx] .of-sheet input { background:#fff; color:#20364d; width:100%; }
.of-paper[data-kind=docx] .of-sheet td { min-width:120px; }
.of-paper[data-kind=docx] label { color:#20364d; }
/* Tabelle: möglichst viel Platz */
.of-paper[data-kind=xlsx] .of-sheet { max-height:calc(100vh - 380px); min-height:420px; }
.of-paper[data-kind=xlsx] .of-sheet td,.of-paper[data-kind=xlsx] .of-sheet th { min-width:120px; }
.of-paper[data-kind=xlsx] .of-sheet input { width:100%; padding:7px 9px; }
.of-paper[data-kind=xlsx] .of-sheet th:first-child { min-width:44px; width:44px; text-align:center; }
/* Excel look: white cells, thin grey grid, grey row/column headers; the cell colours from the document stay readable */
.of-paper[data-kind=xlsx] .of-sheet { background:#fff; border-color:#c8ced6; }
.of-paper[data-kind=xlsx] .of-sheet td { border-color:#dde2e8; background:#fff; }
.of-paper[data-kind=xlsx] .of-sheet th { background:#f1f3f5; color:#4a5560; border-color:#c8ced6; font-weight:600; }
/* two ids: beats the app-wide form field style (#workspace … :not(#voice-panel *)) */
#workspace #office-view .of-paper[data-kind=xlsx] .of-sheet input { background:#fff; color:#20364d; border:0; border-radius:0; min-height:0; }
#workspace #office-view .of-paper[data-kind=xlsx] .of-sheet input:focus { outline:2px solid #1f7a4d; outline-offset:-2px; box-shadow:none; }
.of-paper[data-kind=xlsx] .of-formula-bar { background:#fff; border-color:#c8ced6; }
#workspace #office-view .of-paper[data-kind=xlsx] .of-formula-bar input { background:transparent; color:#20364d; border:0; min-height:32px; box-shadow:none; }
.of-paper[data-kind=xlsx] .of-formula-ref { color:#4a5560; }
.of-paper[data-kind=xlsx] .of-formula-fx { color:#1f7a4d; border-color:#dde2e8; }
/* Präsentation: Folienleiste links, 16:9-Bühne rechts */
.of-paper[data-kind=pptx] { display:grid; grid-template-columns:200px minmax(0,1fr); grid-template-areas:'tabs hint' 'tabs stage' 'tabs add'; gap:10px 18px; align-content:start; }
.of-paper[data-kind=pptx] #of-tabs { grid-area:tabs; flex-direction:column; flex-wrap:nowrap; align-items:stretch; max-height:calc(100vh - 300px); overflow:auto; }
.of-paper[data-kind=pptx] #of-tabs button { text-align:left; aspect-ratio:16/9; display:flex; align-items:flex-end; background:#fff; color:#20364d; font-size:.8rem; font-weight:600; border-radius:8px; padding:6px 8px; flex:none; }
.of-paper[data-kind=pptx] #of-tabs button[aria-current] { outline:3px solid #2aa8ff; }
.of-paper[data-kind=pptx] #of-selection { grid-area:hint; margin:0; }
.of-paper[data-kind=pptx] #of-content { grid-area:stage; }
.of-paper[data-kind=pptx] #of-add { grid-area:add; }
.of-slide-canvas { aspect-ratio:16/9; width:100%; max-width:1200px; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.45); padding:4% 5%; box-sizing:border-box; overflow:auto; color:#20364d; margin-bottom:14px; }
.of-slide-canvas.title { display:flex; flex-direction:column; justify-content:center; text-align:center; }
.of-slide-canvas.title .of-slide-title { font-size:2.6rem; text-align:center; }
.of-slide-canvas.two_columns>div { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; }
.of-slide-canvas .of-slide-title { background:transparent; border:0; outline:0; color:#205b80; font-size:2rem; font-weight:700; padding:4px 0 10px; margin-bottom:6px; border-bottom:2px solid rgba(32,91,128,.18); border-radius:0; }
.of-slide-canvas .of-block { border:1px solid transparent; padding:2px 4px; margin:2px 0; }
.of-slide-canvas .of-block:hover,.of-slide-canvas .of-block:focus-within { border-color:#9fc3dd; background:rgba(255,255,255,.6); }
.of-slide-canvas .of-block>.of-actions,.of-slide-canvas .of-block>details { display:none; }
.of-slide-canvas .of-block:focus-within>.of-actions { display:flex; }
.of-slide-canvas .of-block textarea { border:0; outline:0; background:transparent!important; resize:none; overflow:hidden; font-size:1.25rem; line-height:1.5; min-height:30px; }
.of-slide-canvas .of-block textarea.of-bullet { padding-left:24px; background:radial-gradient(circle at 8px 17px,#205b80 3.5px,transparent 4.5px)!important; }
.of-slide-canvas input { color:#20364d; }
/* Vorlagen-Galerie */
#of-gallery { display:grid; gap:22px; margin-top:12px; }
.of-gallery-group h4 { margin:0 0 10px; font-size:1rem; }
.of-gallery-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.of-template-card { display:flex!important; flex-direction:column; align-items:flex-start; gap:6px; text-align:left; padding:16px!important; min-height:130px; border-radius:16px!important; background:linear-gradient(160deg,#1b3a52,#142a3b)!important; transition:transform .12s,box-shadow .12s; }
.of-template-card:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 24px rgba(42,168,255,.25); }
.of-template-card small { font-weight:400; opacity:.75; line-height:1.4; }
.of-template-card.blank { border:2px dashed #456477!important; background:transparent!important; }
.of-template-icon { font-size:1.8rem; line-height:1; }
@media(max-width:1000px) { .of-layout { grid-template-columns:1fr; } .of-library { position:static; max-height:none; } .of-paper[data-kind=docx] #of-content { padding:28px 20px; } .of-paper[data-kind=pptx] { grid-template-columns:1fr; grid-template-areas:'tabs' 'hint' 'stage' 'add'; } .of-paper[data-kind=pptx] #of-tabs { flex-direction:row; overflow-x:auto; max-height:none; } .of-paper[data-kind=pptx] #of-tabs button { width:150px; } }
#office-view .section-head .help { display:none; }
#office-view .section-head { margin-bottom:6px; }
#office-view>.status:empty { display:none; }
.of-paper[data-kind=docx] .of-block>label { display:none; }
.of-paper[data-kind=docx] .of-block:focus-within>label { display:flex; color:#20364d; }
#of-editor>.card:first-child { padding:14px 18px; }
#of-editor>.card:first-child .of-actions { margin:4px 0; }
#of-editor .of-title { flex-direction:row; align-items:center; gap:10px; margin:0; }
#of-editor .of-title input { flex:1; }
.of-slide-canvas .of-slide-title { font-size:clamp(1.3rem,2.2vw,2.1rem); width:100%; box-sizing:border-box; text-overflow:ellipsis; }
.of-slide-canvas.title .of-slide-title { font-size:clamp(1.6rem,3vw,2.6rem); }
.of-slide-canvas .of-block>label { display:none; }

.of-voice-help { margin:10px 0; } .of-voice-help summary { cursor:pointer; font-weight:700; color:#7fe3ff; }
.of-voice-help dl { margin:8px 0 0; } .of-voice-help dt { font-weight:700; margin-top:10px; color:#ff9a62; font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; }
.of-voice-help dd { margin:2px 0 0; font-size:.85rem; line-height:1.5; opacity:.9; }

.of-rich-preview { white-space: pre-wrap; overflow-wrap: anywhere; background: white; color: #20364d; padding: 16px; border: 1px solid #c7d4df; border-radius: 8px; margin: 8px 0; }
.of-text-selected { background: #b9dbff !important; outline: 1px solid #2580d8; }

.of-layout-preview { margin-bottom: 18px; padding: 12px; background: #dce4ec; border-radius: 10px; color: #20364d; }
.of-preview-viewport { overflow: hidden; margin-top: 12px; }
.of-preview-paper { position: relative; box-sizing: border-box; transform-origin: top left; color: #20364d; box-shadow: 0 3px 12px #0002; }
.of-preview-paper table { border-collapse: collapse; }
.of-preview-paper td { border: 1px solid #aaa; padding: 2mm; }
/* Keep the later desktop rules from overriding the narrow workspace layout. */
@media(max-width:1200px) {
  .of-workspace { grid-template-columns:minmax(0,1fr); }
  .of-assistant { position:static; }
}
@media(max-width:700px) {
  .of-layout { grid-template-columns:minmax(0,1fr); }
  .of-paper[data-kind=docx] #of-content { padding:16px 10px; }
  .of-layout-preview { padding:8px; }
  .of-grid { grid-template-columns:minmax(0,1fr); }
}

#of-content .of-live-updated { outline:3px solid #2aa8ff; outline-offset:2px; }

/* ---- Word: eine durchgehend bearbeitbare Seite mit Werkzeugleiste ---- */
.of-paper[data-kind=docx] #of-tabs { position:sticky; top:0; z-index:5; display:block; max-width:980px; margin:0 auto; }
.of-word-bar { display:flex; flex-wrap:wrap; gap:4px; align-items:center; padding:6px 8px; background:#183143; border:1px solid #2f4b60; border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,.35); color:#eefaff; font-size:.85rem; }
#office-view .of-word-bar button { padding:4px 8px; border-radius:7px; min-width:30px; font-size:.85rem; line-height:1.3; }
#office-view .of-word-bar button[aria-pressed=true] { background:#2a6f93; border-color:#71d1db; }
#office-view .of-word-bar select { padding:4px 6px; border-radius:7px; width:auto; max-width:140px; font-size:.85rem; }
#office-view .of-word-bar select[aria-label="Schriftgröße"] { width:64px; }
#office-view .of-word-bar input[type=color] { width:30px; height:28px; padding:1px; border-radius:7px; }
.of-word-bar .of-mark-bold { font-weight:800; } .of-word-bar .of-mark-italic { font-style:italic; } .of-word-bar .of-mark-underline { text-decoration:underline; }
.of-word-more { position:relative; } .of-word-more>summary { cursor:pointer; padding:4px 8px; border:1px solid #456477; border-radius:7px; list-style:none; }
.of-word-more[open]>.of-word-grid { position:absolute; top:calc(100% + 6px); left:0; z-index:6; width:min(520px,86vw); background:#183143; border:1px solid #456477; border-radius:12px; padding:10px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 12px; }
#office-view .of-word-grid label { margin:4px 0; color:#eefaff; }
#office-view .of-word-grid label:has(input[type=checkbox]) { flex-direction:row; align-items:center; gap:6px; }
.of-paper[data-kind=docx] .of-page { outline:0; caret-color:#205b80; }
.of-paper[data-kind=docx] .of-page .of-block { padding:0 4px; margin:0; }
#workspace #office-view .of-paper[data-kind=docx] .of-block>.of-actions:not(#voice-panel *) { display:none; }
#workspace #office-view .of-paper[data-kind=docx] .of-block:not(:has(.of-text)):hover>.of-actions:not(#voice-panel *),#workspace #office-view .of-paper[data-kind=docx] .of-block:not(:has(.of-text)):focus-within>.of-actions:not(#voice-panel *) { display:flex; gap:4px; }
#workspace #office-view .of-paper[data-kind=docx] .of-block>.of-actions:not(#voice-panel *)>button { padding:4px 8px; font-size:.8rem; }
.of-paper[data-kind=docx] .of-block>.of-actions select { color:#eefaff; }
.of-page .of-text { white-space:pre-wrap; overflow-wrap:anywhere; min-height:1.4em; position:relative; }
.of-page .of-text[data-marker]:not([data-marker=""])::before { content:attr(data-marker); position:absolute; margin-left:-6mm; width:5mm; text-align:right; text-indent:0; color:#205b80; font-weight:600; }
.of-page .of-text.of-break-before { border-top:1px dashed #9fb4c5; padding-top:4px; }
.of-page .of-fn { color:#205b80; font-weight:700; font-size:.7em; padding:0 1px; cursor:default; user-select:none; }
.of-page .of-comment { background:#fff3b0; border-bottom:2px solid #f2c200; }
.of-paper[data-kind=docx] .of-page .of-block[data-label]::before { content:attr(data-label); display:block; text-align:center; color:#7c8fa0; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; border-top:2px dashed #b7c7d4; padding-top:4px; margin:10px 0 4px; }
.of-paper[data-kind=docx] .of-section-props { color:#20364d; }
.of-paper[data-kind=docx] .of-block:has(.of-text):hover,.of-paper[data-kind=docx] .of-block:has(.of-text):focus-within { background:transparent; border-color:transparent; }
.of-word-panels { margin:24px 0 14px; display:grid; gap:12px; color:#20364d; }
.of-word-panels section { border-top:1px solid #c9d6e1; padding:10px 0 0; }
.of-word-panels h4 { margin:0 0 6px; font-size:.8rem; letter-spacing:.06em; text-transform:uppercase; color:#5d7385; }
.of-note-actions { display:flex; gap:6px; }
.of-note-row,.of-comment-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:6px 8px; align-items:start; margin:6px 0; }
.of-comment-row { grid-template-columns:minmax(0,1fr) auto auto; padding:8px; border-left:4px solid #f2c200; background:#fffbe6; border-radius:6px; }
.of-comment-row .of-comment-quote { grid-column:1/-1; text-align:left; background:transparent!important; color:#20364d!important; border:0!important; padding:0!important; font-style:italic; }
.of-comment-row textarea { grid-column:1/-1; }
.of-comment-row small { align-self:center; color:#5d7385; }
.of-comment-row.done { opacity:.6; }
.of-note-number { font-weight:700; padding-top:8px; color:#205b80; }
#workspace #office-view .of-word-panels textarea { width:100%; resize:vertical; background:#fff!important; color:#20364d!important; border:1px solid #c9d6e1; border-radius:6px; padding:6px 8px; font:inherit; }
#workspace #office-view .of-word-panels button { background:#eef4f9; color:#20364d; border-color:#c9d6e1; padding:5px 10px; font-size:.85rem; }
#office-view .of-word-bar button svg { display:block; }
@media(max-width:700px) { .of-word-bar { gap:3px; padding:4px; } #office-view .of-word-bar select { max-width:112px; } .of-note-row { grid-template-columns:auto minmax(0,1fr); } .of-note-actions { grid-column:2; justify-content:flex-end; } }

/* ---- Präsentation: 16:9-Bühne mit frei platzierbaren Objekten ---- */
.of-slide-bar { margin:0 0 10px; }
.of-stage { --mm:3px; position:relative; width:100%; max-width:1200px; aspect-ratio:338.67/190.5; margin:0 auto 12px; border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,.45); overflow:hidden; color:#20364d; outline:0; touch-action:none; user-select:none; }
.of-stage:focus-visible { box-shadow:0 0 0 3px #71d1db,0 10px 40px rgba(0,0,0,.45); }
.of-stage .of-obj { position:absolute; box-sizing:border-box; display:flex; align-items:flex-start; border:1px dashed transparent; }
.of-stage .of-obj:hover { border-color:rgba(32,91,128,.35); }
.of-stage .of-obj.of-selected { border:1.5px solid #2aa8ff; box-shadow:0 0 0 1px rgba(255,255,255,.7); }
.of-stage .of-obj textarea { width:100%; height:100%; border:0!important; outline:0!important; resize:none; background:transparent!important; padding:2px 4px!important; margin:0; line-height:1.2; overflow:hidden; box-shadow:none!important; min-height:0!important; border-radius:0!important; user-select:text; }
.of-stage .of-obj-shape { align-items:center; }
.of-stage .of-obj-shape textarea { height:auto; max-height:100%; }
.of-stage .of-obj-list[data-marker]::before { content:attr(data-marker); color:#205b80; font-weight:700; padding:2px 0 0 2px; font-size:calc(var(--mm) * 6); }
.of-stage .of-obj img { width:100%; height:100%; object-fit:contain; pointer-events:none; }
.of-stage .of-obj img.of-auto-img { height:100%; }
.of-stage .of-obj table { border-collapse:collapse; width:100%; font-size:calc(var(--mm) * 4.2); }
.of-stage .of-obj td { border:1px solid #9fb4c5; padding:calc(var(--mm) * 1); }
.of-stage .of-obj-rich { position:absolute; inset:0; padding:2px 4px; line-height:1.2; white-space:pre-wrap; overflow:hidden; pointer-events:none; background:inherit; }
.of-stage .of-has-rich textarea { color:transparent!important; caret-color:#20364d; }
.of-stage .of-has-rich.of-editing textarea { color:inherit!important; }
.of-stage .of-has-rich.of-editing .of-obj-rich { display:none; }
.of-stage .of-title-obj textarea { font-weight:600; }
.of-stage .of-handle { position:absolute; width:12px; height:12px; background:#fff; border:2px solid #2aa8ff; border-radius:3px; display:none; z-index:2; touch-action:none; }
.of-stage .of-selected:not(.of-title-obj) .of-handle { display:block; }
.of-stage .of-multi .of-handle { display:none!important; }
.of-handle-nw { left:-7px; top:-7px; cursor:nwse-resize; } .of-handle-se { right:-7px; bottom:-7px; cursor:nwse-resize; }
.of-handle-ne { right:-7px; top:-7px; cursor:nesw-resize; } .of-handle-sw { left:-7px; bottom:-7px; cursor:nesw-resize; }
.of-stage .of-grip { position:absolute; left:-2px; top:-22px; padding:0 6px; height:20px; line-height:20px; font-size:14px; background:#2aa8ff; color:#fff; border-radius:6px 6px 0 0; cursor:move; display:none; touch-action:none; z-index:3; }
.of-stage .of-obj.of-selected .of-grip,.of-stage .of-obj:hover .of-grip { display:block; }
.of-stage .of-obj-hint { margin:auto; color:#7c8fa0; font-size:calc(var(--mm) * 4); }
.of-stage .of-guide { position:absolute; background:#ff3d8b; z-index:50; pointer-events:none; }
.of-stage .of-guide-x { top:0; bottom:0; width:1px; } .of-stage .of-guide-y { left:0; right:0; height:1px; }
.of-stage .of-master { position:absolute; color:#5d7385; pointer-events:none; z-index:1; }
.of-stage .of-master-footer { left:4.5%; bottom:2%; } .of-stage .of-master-number { right:4.5%; bottom:2%; }
.of-stage .of-master-logo[data-corner=top_right] { right:2.4%; top:3.1%; } .of-stage .of-master-logo[data-corner=top_left] { left:2.4%; top:3.1%; }
.of-stage .of-master-logo[data-corner=bottom_right] { right:2.4%; bottom:3.1%; } .of-stage .of-master-logo[data-corner=bottom_left] { left:2.4%; bottom:3.1%; }
.of-slide-props { max-width:1200px; margin:0 auto 12px; padding:10px 12px; border:1px solid #2f4b60; border-radius:12px; background:#122838; }
.of-slide-props .help { margin:0; }
.of-slide-props .of-props>textarea,.of-slide-props .of-rich-preview { display:none; }
.of-slide-props .of-props>.of-actions { display:flex!important; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.of-master-panel { max-width:1200px; margin:12px auto; }
#workspace #office-view .of-paper[data-kind=pptx] #of-tabs>button.of-thumb-button { aspect-ratio:auto; display:flex; flex-direction:column; align-items:stretch; gap:4px; padding:6px; background:transparent; text-align:left; }
.of-thumb { position:relative; width:100%; aspect-ratio:338.67/190.5; border-radius:4px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.4); color:#20364d; pointer-events:none; }
.of-thumb-title { position:absolute; font-size:9px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.of-thumb-obj { position:absolute; font-size:5px; line-height:1.2; overflow:hidden; color:#20364d; }
.of-thumb-obj img { width:100%; height:100%; object-fit:contain; }
.of-thumb-table { background:repeating-linear-gradient(#c9d6e1 0 1px,transparent 1px 6px); }
#workspace #office-view .of-paper[data-kind=pptx] #of-tabs:not(#voice-panel *) { display:flex; flex-direction:column; gap:8px; align-items:stretch; }
#workspace #office-view .of-paper[data-kind=pptx] #of-tabs:not(#voice-panel *)>button { flex:none; height:auto; min-height:0; }
#workspace #office-view .of-paper[data-kind=pptx] #of-tabs:not(#voice-panel *)>button:not(.of-thumb-button) { aspect-ratio:auto; padding:10px; }
#workspace #office-view .of-paper input[type=color] { height:38px; min-width:48px; padding:3px; border-radius:8px; border:1px solid #456477; background:#183143; cursor:pointer; }
#workspace #office-view .of-word-bar input[type=color] { height:28px; min-width:30px; width:30px; padding:1px; }
.of-sheet-tools { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:8px 0; }
#workspace #office-view .of-sheet-tools button { padding:6px 10px; font-size:.85rem; }
#workspace #office-view .of-sheet-tools label { flex-direction:row; align-items:center; gap:6px; margin:0 0 0 6px; font-weight:400; font-size:.85rem; }
.of-word-link { display: inline-flex; gap: 4px; align-items: center; }
.of-word-link input { width: 14rem; max-width: 50vw; }
.of-text .of-link { cursor: text; }
.of-word-bar button[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: -2px; }
.of-paper[data-kind=docx] #of-content { container-type:inline-size; }
.of-paper[data-kind=docx] .of-page { position:relative; z-index:1; }
.of-hf { position:absolute; left:8%; right:8%; color:#7c8fa0; font-size:.78rem; pointer-events:none; white-space:pre-wrap; }
.of-watermark { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; z-index:0; overflow:hidden; color:rgba(160,174,190,.28); font:700 clamp(2rem,11cqw,7rem)/1 "DejaVu Sans",sans-serif; transform:rotate(-45deg); }
.of-word-table table { border-collapse:collapse; width:100%; table-layout:fixed; }
.of-word-table td,.of-word-table th { border:0; padding:0; font-weight:inherit; }
.of-word-table table[data-borders=all] :is(td,th) { border:1px solid var(--tb); }
.of-word-table table[data-borders=outer] { border:1px solid var(--tb); }
.of-word-table table[data-borders=horizontal] { border-top:1px solid var(--tb); border-bottom:1px solid var(--tb); }
.of-word-table table[data-borders=horizontal] tr+tr :is(td,th) { border-top:1px solid var(--tb); }
.of-word-table table[data-borders=inner] tr+tr :is(td,th) { border-top:1px solid var(--tb); }
.of-word-table table[data-borders=inner] :is(td,th)+:is(td,th) { border-left:1px solid var(--tb); }
.of-word-table textarea { width:100%; box-sizing:border-box; border:0; resize:vertical; padding:4px 6px; min-height:1.8em; color:inherit; }
.of-word-table .of-table-cell-image { display:block; max-width:100%; max-height:180mm; width:auto; height:auto; margin:2mm auto; object-fit:contain; }
.of-word-table .of-cell-selected { outline:2px solid #4a90c2; outline-offset:-2px; }
.of-table-bar { flex-wrap:wrap; gap:4px; margin:4px 0; }
.of-page .of-text.of-drop-cap::first-letter { float:left; font-size:3.3em; line-height:.85; padding:.06em .08em 0 0; font-weight:inherit; }
.of-toc { border-left:3px solid #b7c7d4; padding:4px 10px !important; }
.of-toc-title { font-weight:700; font-size:1.15em; margin-bottom:4px; }
.of-toc-entry { display:block; background:none; border:0; color:#20364d; text-align:left; padding:1px 0; cursor:pointer; font:inherit; }
.of-toc-entry:hover { text-decoration:underline; }
.of-rule hr { border:0; border-top:1.5px solid; margin:8px 0; }
.of-wrap-square::after { content:""; display:block; clear:both; }
.of-symbols { grid-template-columns:repeat(auto-fill,minmax(2.2rem,1fr)) !important; }
.of-cell-bar { flex-wrap:wrap; gap:4px; align-items:center; margin:4px 0; }
.of-cell-bar input[type=number] { width:5.5rem; }
.of-cell-bar .of-rules { flex-basis:100%; }
.of-sheet table.of-no-grid td { border-color:transparent; }
.of-sheet .of-frozen { background:#eef4f9; }
.of-sheet td textarea { width:100%; box-sizing:border-box; border:0; background:transparent; font:inherit; }
.of-shape-svg { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; z-index:0; }
.of-obj-shape textarea,.of-obj-shape .of-obj-rich { position:relative; z-index:1; }
.of-rotate { position:absolute; left:50%; top:-26px; transform:translateX(-50%); width:20px; height:20px; border-radius:50%; background:#fff; color:#205b80; border:1px solid #205b80; display:none; place-items:center; font-size:13px; cursor:grab; z-index:5; }
.of-obj.of-selected>.of-rotate { display:grid; }
.of-show { position:fixed; inset:0; z-index:10000; background:#000; display:grid; grid-template-columns:1fr; outline:0; }
.of-show.of-presenter { grid-template-columns:minmax(0,3fr) minmax(260px,1fr); background:#111a22; }
.of-show-screen { position:relative; display:grid; place-items:center; overflow:hidden; cursor:pointer; }
.of-show-slide { position:relative; overflow:hidden; box-shadow:0 0 0 1px rgba(255,255,255,.08); }
.of-show-obj { position:absolute; box-sizing:border-box; }
.of-show-text { white-space:pre-wrap; overflow-wrap:anywhere; width:100%; height:100%; }
.of-show-text[data-marker]::before { content:attr(data-marker) " "; }
.of-show-obj img { max-width:100%; max-height:100%; display:block; }
.of-show-obj table { width:100%; height:100%; border-collapse:collapse; font-size:calc(var(--mm) * 4); }
.of-show-obj td { border:1px solid #8fa3b5; padding:.3em; }
.of-show-side { color:#e6eef5; padding:16px; overflow:auto; display:flex; flex-direction:column; gap:8px; }
.of-show-side h4 { margin:8px 0 0; color:#8fb3cc; font-size:.8rem; letter-spacing:.05em; text-transform:uppercase; }
.of-show-clock { font:700 2rem/1 "DejaVu Sans Mono",monospace; }
.of-show-notes { white-space:pre-wrap; font-size:1.05rem; line-height:1.5; }
.of-show-next .of-thumb { width:100%; }
.of-show-close { position:absolute; top:10px; right:10px; z-index:2; background:rgba(0,0,0,.4); color:#fff; border:0; border-radius:50%; width:34px; height:34px; cursor:pointer; }
.of-anim-hidden { visibility:hidden; }
.of-anim-appear { animation:none; }
.of-anim-fade { animation:of-fade .5s ease both; }
.of-anim-fly_in { animation:of-fly .5s ease-out both; }
.of-anim-wipe { animation:of-wipe .5s ease both; }
@keyframes of-fade { from { opacity:0; } to { opacity:1; } }
@keyframes of-fly { from { transform:translateY(120vh); } to { transform:none; } }
@keyframes of-wipe { from { clip-path:inset(0 0 100% 0); } to { clip-path:inset(0 0 0 0); } }
.of-tr-slow { --tr:1s; } .of-tr-med { --tr:.6s; } .of-tr-fast { --tr:.3s; }
.of-tr-fade { animation:of-fade var(--tr) ease both; }
.of-tr-push { animation:of-push var(--tr) ease both; }
.of-tr-wipe { animation:of-wipe-r var(--tr) ease both; }
.of-tr-split { animation:of-split var(--tr) ease both; }
.of-tr-cover { animation:of-cover var(--tr) ease both; }
.of-tr-zoom { animation:of-zoom var(--tr) ease both; }
@keyframes of-push { from { transform:translateY(100%); } to { transform:none; } }
@keyframes of-wipe-r { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
@keyframes of-split { from { clip-path:inset(50% 0 50% 0); } to { clip-path:inset(0 0 0 0); } }
@keyframes of-cover { from { transform:translateX(100%); } to { transform:none; } }
@keyframes of-zoom { from { transform:scale(.3); opacity:0; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .of-show [class*="of-tr-"],.of-show [class*="of-anim-"] { animation:none !important; } }
@media (max-width: 760px) { .of-show.of-presenter { grid-template-columns:1fr; grid-template-rows:minmax(0,2fr) minmax(0,1fr); } }
.of-find { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px; margin-bottom:8px; position:sticky; top:0; z-index:6; }
.of-find input:not([type=checkbox]) { min-width:10rem; flex:1 1 10rem; }
.of-find-count { color:#7c8fa0; font-size:.85rem; min-width:6rem; }
.of-page .of-ins { color:#1565c0; text-decoration:underline; text-decoration-color:#1565c0; }
.of-page .of-del { color:#c62828; text-decoration:line-through; user-select:none; cursor:default; }
.of-revisions .of-revision-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:4px 0; }
.of-rev-ins .of-comment-quote { color:#1565c0; } .of-rev-del .of-comment-quote { color:#c62828; text-decoration:line-through; }
.of-filter-btn { position:absolute; right:1px; top:1px; padding:0 3px; font-size:.7rem; line-height:1.2; border:1px solid #b7c7d4; background:#fff; border-radius:3px; cursor:pointer; z-index:2; }
.of-filter-btn.on { background:#205b80; color:#fff; }
.of-filter-menu { position:absolute; z-index:20; top:100%; left:0; min-width:12rem; max-height:16rem; overflow:auto; padding:8px; display:flex; flex-direction:column; gap:4px; }
.of-filter-list { display:flex; flex-direction:column; gap:2px; }
.of-sheet input.of-invalid,.of-sheet textarea.of-invalid { outline:2px solid #c62828; outline-offset:-2px; }
.of-word-stats { color:#7c8fa0; font-size:.8rem; margin-left:auto; white-space:nowrap; }
.of-caption-label { user-select:none; }
.of-sheet td.of-has-note { position:relative; }
.of-sheet td.of-has-note::after { content:""; position:absolute; top:0; right:0; border-style:solid; border-width:0 7px 7px 0; border-color:transparent #c62828 transparent transparent; }
/* Diagramme (Tabellen, Word, Folien): SVG aus TarviOfficeEditing.chartSvg */
.of-chart-figure { margin:8px 0;background:#fff;border-radius:6px;max-width:100%; }
.of-chart-figure svg, .of-obj-chart svg, .of-show-chart svg { display:block;width:100%;height:100%; }
#of-chart-preview { display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px; }
.of-obj-chart { width:100%;height:100%;background:transparent;pointer-events:none; }
.of-thumb-chart .of-obj-chart { pointer-events:none; }
.of-chart-options { margin:6px 0; }
.of-chart-data { border-collapse:collapse;margin:6px 0;max-width:100%;overflow-x:auto;display:block; }
.of-chart-data td { padding:1px; }
.of-chart-data input { width:7.5em;min-width:0; }
.of-chart-data tr:first-child input, .of-chart-data td:first-child input { font-weight:600; }
.of-thumb-hidden { opacity:.45; }
.of-thumb-hidden::after { content:'ausgeblendet';position:absolute;right:4px;bottom:3px;font-size:10px;background:#20364D;color:#fff;padding:0 4px;border-radius:3px; }
.of-xref { background:rgba(32,91,128,.12);border-radius:2px;padding:0 1px;cursor:default; }
.of-sheet input.of-spill { color:#1F5E8C; background:rgba(32,91,128,.06); }
.of-toc-entry { display:flex;gap:4px;align-items:baseline;width:100%; }
.of-toc-entry > span:first-child { flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.of-toc-entry::after { content:'';flex:1;border-bottom:1px dotted currentColor;opacity:.45;order:1;margin:0 2px; }
.of-toc-page { order:2;font-variant-numeric:tabular-nums; }
.of-tab { display:inline-block; white-space:pre; overflow:hidden; vertical-align:baseline; color:transparent; }
.of-tab-dot { background-image:radial-gradient(circle,#20364d 0.6px,transparent 0.9px); background-size:4px 4px; background-repeat:repeat-x; background-position:0 80%; }
.of-tab-dash { background-image:linear-gradient(to right,#20364d 60%,transparent 60%); background-size:6px 1px; background-repeat:repeat-x; background-position:0 80%; }
.of-tab-line { border-bottom:1px solid #20364d; }
.of-equation { text-align:center;font-size:1.25em;padding:2mm 0; }
.of-equation math { font-family:'STIX Two Math','Cambria Math','Latin Modern Math',serif; }
.of-equation .of-caption-label { font-size:.7em;margin-top:1mm; }
.of-equation-error { font-style:italic;color:#a94747; }
.of-equation-input { width:100%;font-family:ui-monospace,monospace; }
.of-word-bar .of-mark-shadow { text-shadow:1px 1px 2px rgba(0,0,0,.55); font-weight:700; }
.of-word-bar .of-mark-outline { color:transparent; -webkit-text-stroke:0.8px currentColor; -webkit-text-stroke-color:#20364d; font-weight:800; }
.of-spark { position:absolute; inset:3px 4px; pointer-events:none; }
.of-spark svg { width:100%; height:100%; display:block; }
.of-show-link { cursor:pointer; }
.of-sheet th.of-grouped { box-shadow:inset 3px 0 0 #8FA3B5; }
.of-group-toggle { min-width:0;width:1.4em;height:1.4em;padding:0;margin-right:2px;font-size:.8em;line-height:1; }
.of-slide-section { font-size:.75em;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#5D7385;padding:6px 2px 2px;border-bottom:1px solid #D5DDE5;width:100%; }
.of-sheet td.of-locked input { cursor:default; }
.of-sheet td.of-unlocked { box-shadow:inset 0 0 0 2px rgba(0,131,143,.45); }
.of-formula-hints { position:fixed; z-index:50; background:#fff; color:#20364d; border:1px solid #c9d3dd; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,.18); max-width:min(560px,92vw); font-size:13px; padding:3px; }
.of-formula-hint, .of-formula-current { padding:4px 8px; border-radius:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.of-formula-hint { cursor:pointer; }
.of-formula-hint.of-picked, .of-formula-hint:hover { background:#e3f2fd; }
.of-formula-current { color:#5d7385; font-style:italic; }
.of-page img.of-hf-logo { position:absolute; height:auto; max-width:60%; pointer-events:none; }
#of-content > .of-page-mark { position:absolute; left:0; right:0; height:0; border-top:1px dashed #9fb0c0; pointer-events:none; z-index:2; }
#of-content > .of-page-mark::after { content:attr(data-label); position:absolute; right:4px; top:-9px; font-size:10px; line-height:16px; padding:0 6px; background:#fff; color:#7c8fa0; border-radius:8px; border:1px solid #d5dde5; }
.of-sheet th { position:relative; }
.of-resize { position:absolute; z-index:3; }
.of-resize-col { top:0; right:-3px; width:7px; height:100%; cursor:col-resize; }
.of-resize-row { left:0; bottom:-3px; height:7px; width:100%; cursor:row-resize; }
.of-resize:hover { background:rgba(0,131,143,.35); }
.of-sheet th { cursor:pointer; user-select:none; }
.of-video { position:relative; width:100%; height:100%; background:#20364d; border-radius:4px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.of-video img { width:100%; height:100%; object-fit:cover; display:block; }
.of-video-play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:2.4em; height:2.4em; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; display:flex; align-items:center; justify-content:center; font-size:clamp(12px, calc(var(--mm, 3px) * 7), 42px); pointer-events:none; }
.of-video-player { width:100%; height:100%; background:#000; }
.of-video-preview img, .of-video-preview video { max-width:100%; max-height:220px; display:block; margin-bottom:6px; }
.of-stage.of-drop { outline:3px dashed #00838f; outline-offset:-6px; }
.of-sheet { position:relative; }
.of-fill-handle { position:absolute; width:8px; height:8px; background:#00838f; border:1px solid #fff; cursor:crosshair; z-index:4; touch-action:none; }
.of-sheet td.of-fill-preview { outline:1px dashed #00838f; outline-offset:-2px; }
.of-context-menu { position:fixed; z-index:60; min-width:220px; background:#fff; color:#20364d; border:1px solid #c9d3dd; border-radius:8px; box-shadow:0 10px 28px rgba(0,0,0,.2); padding:4px; font-size:14px; }
.of-context-item { display:flex; justify-content:space-between; gap:18px; width:100%; background:none; border:0; border-radius:5px; padding:7px 10px; text-align:left; color:inherit; font:inherit; cursor:pointer; }
.of-context-item:hover, .of-context-item:focus { background:#e3f2fd; outline:none; }
.of-context-item:disabled { color:#a5b2bf; cursor:default; background:none; }
.of-context-hint { color:#7c8fa0; font-size:12px; }
.of-context-sep { height:1px; background:#e2e8ee; margin:4px 6px; }
.of-stage .of-marquee { position:absolute; border:1px dashed #00838f; background:rgba(0,131,143,.08); pointer-events:none; z-index:999; }
.of-sheet-status { text-align:right; font-size:12px; color:#5d7385; padding:4px 8px; min-height:1.4em; font-variant-numeric:tabular-nums; }

.of-show-ink { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:5; }
.of-show-tool .of-show-screen { cursor:crosshair; }
.of-show-tool:has(.of-show-laser:not([hidden])) .of-show-screen { cursor:none; }
.of-show-laser { position:absolute; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%; background:#ff1744; box-shadow:0 0 12px 4px rgba(255,23,68,.7); pointer-events:none; z-index:6; }
.of-show-cover { position:absolute; inset:0; z-index:8; cursor:pointer; }
.of-show-bar { position:absolute; left:12px; bottom:12px; z-index:9; display:flex; gap:4px; opacity:.15; transition:opacity .2s; }
.of-show-bar:hover, .of-show-bar:focus-within, .of-show-tool .of-show-bar { opacity:1; }
.of-show-bar button { background:rgba(20,30,40,.75); color:#fff; border:0; border-radius:6px; min-width:34px; height:34px; cursor:pointer; font-size:15px; }
.of-show-bar button[aria-pressed="true"] { background:#00838f; }
.of-show-grid { position:absolute; inset:0; z-index:10; background:rgba(10,16,22,.96); overflow:auto; padding:24px; display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; align-content:start; }
.of-show-grid-item { background:none; border:2px solid transparent; border-radius:6px; padding:4px; color:#cfdbe5; cursor:pointer; display:flex; flex-direction:column; gap:4px; }
.of-show-grid-item.of-current, .of-show-grid-item:focus-visible { border-color:#4dd0e1; }
.of-show-grid-item .of-thumb { width:100%; }
@media (hover: none) { .of-show-bar { opacity:.6; } }

.of-ruler { position:absolute; top:10px; height:22px; background:#f3f6f9; border:1px solid #d5dee6; border-radius:3px; z-index:4; user-select:none; touch-action:none; cursor:copy; }
.of-ruler.of-ruler-off { opacity:.45; }
.of-ruler-scale { position:absolute; top:0; bottom:0; background:repeating-linear-gradient(90deg,transparent 0 calc(5mm - 1px),#b3c2cf calc(5mm - 1px) 5mm) bottom/100% 5px no-repeat; pointer-events:none; }
.of-ruler-scale span { position:absolute; top:3px; transform:translateX(-50%); font:10px/1 "DejaVu Sans",sans-serif; color:#6a7f91; }
#of-content .of-ruler-kind { position:absolute; left:-30px; top:0; width:22px; min-width:0; height:22px; min-height:0; padding:0; border:1px solid #d5dee6; border-radius:3px; background:#fff; color:#205b80; font:700 13px/1 "DejaVu Sans",sans-serif; box-shadow:none; transform:none; cursor:pointer; }
.of-ruler-mark { position:absolute; width:0; height:0; cursor:ew-resize; z-index:2; }
.of-ruler-first { top:0; border:6px solid transparent; border-top:7px solid #205b80; border-bottom:0; margin-left:-6px; }
.of-ruler-hanging { bottom:5px; border:6px solid transparent; border-bottom:7px solid #205b80; border-top:0; margin-left:-6px; }
.of-ruler-left { bottom:0; width:10px; height:5px; background:#205b80; margin-left:-5px; }
.of-ruler-right { bottom:0; border:6px solid transparent; border-bottom:8px solid #205b80; border-top:0; margin-left:-6px; }
.of-ruler-tab { bottom:2px; width:auto; height:auto; transform:translateX(-50%); font:700 12px/1 "DejaVu Sans",sans-serif; color:#111; cursor:ew-resize; }
.of-ruler-away { opacity:.3; }
.of-ruler-tip { position:absolute; top:24px; transform:translateX(-50%); background:#183143; color:#fff; font-size:11px; padding:2px 5px; border-radius:3px; white-space:nowrap; pointer-events:none; }
@media (max-width: 760px) { .of-ruler { display:none; } }

dialog.of-keys { max-width:min(560px,calc(100vw - 32px)); border:0; border-radius:10px; padding:18px 20px; background:#fff; color:#20364d; box-shadow:0 20px 60px rgba(0,0,0,.5); }
dialog.of-original-dialog { width:min(1100px,calc(100vw - 24px)); height:min(90dvh,900px); max-width:none; max-height:none; padding:12px; box-sizing:border-box; border:0; border-radius:12px; background:#fff; color:#20364d; }
dialog.of-original-dialog[open] { display:flex; flex-direction:column; gap:10px; }
dialog.of-original-dialog::backdrop { background:rgba(5,12,18,.7); }
.of-original-dialog-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.of-original-dialog-bar strong { margin-right:auto; }
dialog.of-original-dialog iframe { display:block; width:100%; flex:1; min-height:0; border:0; background:#f2f4f7; }
dialog.of-keys::backdrop { background:rgba(5,12,18,.55); }
dialog.of-keys h3 { margin:0 0 10px; }
dialog.of-keys table { border-collapse:collapse; width:100%; font-size:14px; margin-bottom:12px; }
dialog.of-keys th { text-align:left; white-space:nowrap; padding:4px 14px 4px 0; vertical-align:top; font-weight:600; color:#205b80; }
dialog.of-keys td { padding:4px 0; }
.of-keys-button { margin-top:6px; }

.of-sheet th.of-after-hidden { box-shadow:inset 3px 0 0 #00838f; cursor:pointer; }
.of-sheet th.of-before-hidden { box-shadow:inset -3px 0 0 #00838f; cursor:pointer; }
.of-sheet th.of-after-hidden-row { box-shadow:inset 0 3px 0 #00838f; cursor:pointer; }
.of-sheet table.of-show-formulas input { font-family:"DejaVu Sans Mono",monospace; font-size:12px; }

.of-thumb-button.of-dragging { opacity:.45; }
.of-thumb-button.of-drop-before { box-shadow:0 -3px 0 #4dd0e1, -3px 0 0 #4dd0e1; }
.of-thumb-button.of-drop-after { box-shadow:0 3px 0 #4dd0e1, 3px 0 0 #4dd0e1; }
#of-tabs .of-thumb-button { touch-action:pan-y; }

#of-tabs [data-sheet].of-dragging { opacity:.45; }
#of-tabs [data-sheet].of-drop-before { box-shadow:-3px 0 0 #4dd0e1 !important; }
#of-tabs [data-sheet].of-drop-after { box-shadow:3px 0 0 #4dd0e1 !important; }
#of-tabs .of-tab-rename { width:12ch; }

.of-hf[data-hf] { pointer-events:auto; cursor:text; }
.of-hf-edit { position:absolute; left:8%; right:8%; z-index:6; font-size:.85rem; padding:3px 6px; border:1px dashed #00838f; border-radius:4px; background:#fff; color:#20364d; }
.of-word-image-grip { position:absolute; width:12px; height:12px; background:#fff; border:2px solid #00838f; border-radius:2px; cursor:nwse-resize; z-index:4; touch-action:none; }
@media (max-width: 760px) { .of-word-stats { white-space:normal; min-width:0; } }

.of-sheet.of-painting td input { cursor:copy; }
.of-cell-link { position:absolute; z-index:20; display:flex; gap:4px; background:#fff; border:1px solid #bcd3e4; border-radius:6px; padding:6px; box-shadow:0 6px 20px rgba(0,0,0,.25); }
.of-cell-link input { width:min(320px,60vw); }
.of-paper[data-kind=xlsx] #of-content { position:relative; }
.of-rule-icon { position:absolute; left:3px; top:50%; transform:translateY(-50%); font-size:12px; pointer-events:none; }
.of-stage.of-grid-on::after { content:''; position:absolute; inset:0; pointer-events:none; z-index:50; background-image:linear-gradient(rgba(0,131,143,.2) 1px,transparent 1px),linear-gradient(90deg,rgba(0,131,143,.2) 1px,transparent 1px); background-size:calc(var(--mm) * 10) calc(var(--mm) * 10); }
.of-stage.of-painting, .of-stage.of-painting .of-obj { cursor:copy; }
#office-view.of-focus .of-library, #office-view.of-focus .of-assistant, #office-view.of-focus > .section-head { display:none !important; }
#office-view.of-focus .of-layout, #office-view.of-focus .of-workspace { grid-template-columns:minmax(0,1fr) !important; }
#office-view.of-focus .of-paper[data-kind=docx] #of-content { max-width:1100px; }
.of-sheet td.of-ref-mark { box-shadow:inset 0 0 0 2px var(--ref); }
.of-sheet td.of-ref-mark input, .of-sheet td.of-ref-mark textarea { background:color-mix(in srgb, var(--ref) 10%, transparent) !important; }
.of-comment-replies { display:flex; flex-direction:column; gap:3px; margin:4px 0 4px 12px; border-left:2px solid #bcd3e4; padding-left:8px; font-size:.85rem; }
.of-comment-reply button { padding:0 4px; min-height:0; font-size:.75rem; margin-left:4px; }
.of-name-box { width:7ch; font-family:"DejaVu Sans Mono",monospace; font-size:13px; padding:4px 6px; }
.of-formula-bar .of-formula-ref { display:none; }
button.of-formula-fx { font-style:italic; font-weight:700; min-width:34px; }
.of-fx-panel { display:flex; flex-direction:column; gap:6px; margin:6px 0; padding:10px; border:1px solid #bcd3e4; border-radius:8px; background:#f7fbff; color:#20364d; max-width:640px; }
.of-fx-list { max-height:260px; overflow:auto; display:flex; flex-direction:column; gap:2px; }
.of-fx-item { display:flex; gap:10px; text-align:left; background:#fff; color:#20364d; border:1px solid #e2e8ee; border-radius:5px; padding:5px 8px; }
.of-fx-item strong { min-width:11ch; color:#205b80; }
#workspace #office-view .of-formula-bar input.of-name-box { flex:0 0 8ch; width:8ch; border-right:1px solid #dde2e8; border-radius:0; padding-right:6px; }
#office-view .of-fx-panel .of-fx-item, #of-content .of-fx-panel .of-fx-item { background:#fff; color:#20364d; border:1px solid #e2e8ee; box-shadow:none; justify-content:flex-start; min-height:0; font-weight:400; }
#office-view .of-fx-panel .of-fx-item:hover, #office-view .of-fx-panel .of-fx-item:focus-visible { background:#e3f2fd; }
#office-view .of-fx-panel input { background:#fff; color:#20364d; border:1px solid #bcd3e4; }
#office-view .of-fx-panel .of-fx-item { flex-shrink:0; padding:6px 10px; line-height:1.35; height:auto; }
#workspace #office-view .of-fx-panel input { background:#fff; color:#20364d; }
iframe.of-print { position:fixed; width:1px; height:1px; right:0; bottom:0; border:0; opacity:0; pointer-events:none; }
.of-sorter { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; padding:8px 0; }
#office-view .of-sorter-item { display:flex; flex-direction:column; gap:6px; padding:6px; background:transparent; border:2px solid transparent; border-radius:8px; color:inherit; box-shadow:none; min-height:0; }
#office-view .of-sorter-item.of-current { border-color:#4dd0e1; }
.of-sorter-item .of-thumb { width:100%; }
.of-sorter-hidden .of-thumb { opacity:.45; }
.of-sorter-item.of-dragging { opacity:.45; }
.of-sorter-item.of-drop-before { box-shadow:-4px 0 0 #4dd0e1 !important; }
.of-sorter-item.of-drop-after { box-shadow:4px 0 0 #4dd0e1 !important; }
.of-ribbon { display:flex; gap:2px; width:100%; flex-wrap:wrap; border-bottom:1px solid rgba(143,179,204,.35); margin-bottom:4px; }
#office-view .of-ribbon-tab { background:transparent; border:0; border-bottom:3px solid transparent; border-radius:0; box-shadow:none; padding:6px 12px; min-height:0; color:inherit; font-weight:600; }
#office-view .of-ribbon-tab[aria-selected="true"] { border-bottom-color:#4dd0e1; }
.of-rb-off { display:none !important; }
/* compact tool rows (the general office card rule stacks .of-actions in one column) */
#workspace #office-view .of-actions.of-cell-bar:not(#voice-panel *), #workspace #office-view .of-actions.of-table-bar:not(#voice-panel *), #workspace #office-view .of-sheet-tools:not(#voice-panel *) { display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
#workspace #office-view .of-actions.of-cell-bar:not(#voice-panel *) > button, #workspace #office-view .of-actions.of-table-bar:not(#voice-panel *) > button { width:auto; min-height:32px; padding:4px 10px; }
#workspace #office-view .of-actions.of-cell-bar:not(#voice-panel *) > select, #workspace #office-view .of-actions.of-table-bar:not(#voice-panel *) > select { width:auto; max-width:14rem; }
#workspace #office-view .of-cell-bar:not(#voice-panel *) > .of-ribbon, #workspace #office-view .of-cell-bar:not(#voice-panel *) > .of-rules, #workspace #office-view .of-cell-bar:not(#voice-panel *) > details { flex-basis:100%; }
#office-view .of-slide-options { align-items:end; }
#office-view .of-slide-options > button { height:auto; min-height:38px; align-self:end; }
#office-view .of-slide-options > label:has(> input[type=checkbox]) { display:flex; flex-direction:row; align-items:center; gap:8px; align-self:end; padding-bottom:8px; }
#office-view .of-slide-bar .of-present-quick { font-weight:700; }

/* The embedded editor has its own toolbar, independent of the studio's forms. */
.of-engine-dialog::backdrop{background:rgb(0 12 22 / .75)}
.of-engine-dialog .of-engine-bar button,.of-engine-dialog .of-engine-voice button{width:auto;flex:0 0 auto;margin:0}
.of-engine-dialog .of-engine-voice input{width:auto;margin:0}
.of-engine-dialog .of-engine-bar [role=status]{flex:1;min-width:180px}
@media(max-width:600px){.of-engine-dialog .of-engine-bar strong{width:100%}.of-engine-dialog .of-engine-bar [role=status]{font-size:.85rem;min-width:0}.of-engine-dialog .of-engine-voice input{flex-basis:100%!important}.of-engine-dialog .of-engine-voice button{font-size:.85rem}}

/* ── Dateien (22.10.2026): Ablagestatus in Dokumente auf einen Blick, Aktionen je Datei ─────────────────── */
@media (min-width:1001px) { .of-layout { grid-template-columns:280px minmax(0,1fr); } }
#office-view { --of-filed:#5fd08a; --of-outdated:#f5b25b; --of-busy:#71d1db; --of-error:#ff8a8a; }
#workspace #office-view aside.of-library .of-actions:not(#voice-panel *) { grid-template-columns:repeat(3,minmax(0,1fr)); }
#workspace #office-view aside.of-library .of-actions:not(#voice-panel *) > button { justify-content:center; text-align:center; padding:0 4px; white-space:nowrap; overflow-wrap:normal; font-size:.8125rem; }
#workspace #office-view aside.of-library .of-actions:not(#voice-panel *) > button.of-primary { grid-column:1 / -1; justify-content:flex-start; text-align:left; padding:0 14px; }
#office-view .of-file-filter { display:flex; flex-wrap:wrap; gap:6px; margin:14px 0 0; }
#workspace #office-view .of-chip { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:0 10px; border-radius:999px; border:1px solid var(--k-line, #456477);
  background:transparent; color:var(--k-muted, #b8c7d3); font-size:.8125rem; transition:background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
#workspace #office-view .of-chip[aria-pressed="true"] { color:var(--k-text, #fff); background:var(--k-surface-3, #24465d); border-color:var(--k-line-strong, #71d1db); }
#office-view .of-chip-count { font-variant-numeric:tabular-nums; opacity:.7; }
#office-view #of-library { gap:4px; max-height:none; }
#office-view #of-library .of-file { display:flex; flex-direction:row; align-items:center; gap:2px; border:0; border-radius:12px; transition:background-color 160ms ease; }
#office-view #of-library .of-file:has([aria-current]) { background:var(--k-surface-3, #24465d); }
#workspace #office-view .of-file-open { flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:8px 8px; border:0; border-radius:12px;
  background:transparent; text-align:left; white-space:normal; transition:transform 160ms var(--k-ease-out, ease-out); }
#workspace #office-view .of-file-open:active { transform:scale(.98); }
#workspace #office-view .of-file-open[aria-current] { outline:none; }
#office-view .of-file-kind { flex:none; display:grid; place-items:center; width:30px; height:36px; border-radius:6px; font-weight:800; font-size:.8rem; color:#03121c; background:#71d1db; }
#office-view .of-file.xlsx .of-file-kind { background:#5fd08a; }
#office-view .of-file.pptx .of-file-kind { background:#ff9a62; }
#office-view .of-file-text { min-width:0; display:grid; gap:3px; }
#office-view .of-file-title { overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.3; font-weight:600; font-size:.9rem; }
#office-view .of-file-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:.75rem; color:var(--k-muted, #93a4b5); }
#office-view .of-file-state { display:inline-flex; align-items:center; gap:5px; }
#office-view .of-file-state::before, #office-view .of-filing-label::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; flex:none; }
#office-view .of-file-state.none { color:var(--k-faint, #6b7d8f); }
#office-view .of-file-state.none::before { background:transparent; box-shadow:inset 0 0 0 1.5px currentColor; }
#office-view .of-file-state.filed { color:var(--of-filed); }
#office-view .of-file-state.outdated { color:var(--of-outdated); }
#office-view .of-file-state.busy { color:var(--of-busy); }
#office-view .of-file-state.error { color:var(--of-error); }
#workspace #office-view .of-file-more { flex:none; width:34px; padding:0; border:0; border-radius:10px; background:transparent; color:var(--k-muted, #93a4b5); font-size:1.1rem; letter-spacing:1px; }
@media (hover:hover) and (pointer:fine) {
  #office-view #of-library .of-file:hover { background:var(--k-surface-2, rgba(255,255,255,.045)); }
  #workspace #office-view .of-file-more:hover { color:var(--k-text, #fff); background:var(--k-surface-3, #24465d); }
}
#office-view .of-file-empty { margin:8px 4px; font-size:.85rem; color:var(--k-muted, #93a4b5); }
/* open document: filing state beside „Gespeichert · Version …“ */
#office-view .of-filing { display:inline-flex; flex-wrap:wrap; align-items:center; gap:8px; margin-left:12px; font-size:.85rem; }
#office-view .of-filing[hidden] { display:none; }
#office-view .of-filing-label { display:inline-flex; align-items:center; gap:6px; }
#office-view .of-filing[data-filing="none"] .of-filing-label { color:var(--k-faint, #6b7d8f); }
#office-view .of-filing[data-filing="none"] .of-filing-label::before { background:transparent; box-shadow:inset 0 0 0 1.5px currentColor; }
#office-view .of-filing[data-filing="filed"] .of-filing-label { color:var(--of-filed); }
#office-view .of-filing[data-filing="outdated"] .of-filing-label { color:var(--of-outdated); }
#office-view .of-filing[data-filing="busy"] .of-filing-label { color:var(--of-busy); }
#office-view .of-filing[data-filing="error"] .of-filing-label { color:var(--of-error); }
#workspace #office-view .of-filing-action { min-height:28px; padding:0 10px; border-radius:999px; font-size:.8rem; }
#workspace #office-view .of-filing[data-filing="outdated"] .of-filing-action { color:#1d1405; background:var(--of-outdated); border-color:transparent; }

.of-research-panel{margin-top:16px;padding:14px;border:1px solid var(--line,#dce2e8);border-radius:12px;min-width:0}
.of-research-panel input:not([type=checkbox]),.of-research-panel select{font-size:16px;max-width:100%;min-height:44px}
.of-research-panel button{min-height:44px;white-space:normal}
.of-research-panel pre{max-height:240px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.5 inherit;padding:12px;background:var(--surface,#f4f6f8)}
.of-research-source{border-top:1px solid var(--line,#dce2e8);padding:10px 0;overflow-wrap:anywhere}

.of-mail-panel{min-width:0;margin-top:16px;overflow-wrap:anywhere}
.of-mail-panel>summary{min-height:44px;padding:10px 0;cursor:pointer}
.of-mail-panel button,.of-mail-dialog button{min-height:44px;white-space:normal}
.of-mail-dialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;color:var(--text,#e7eef5);background:var(--surface,#0c1d29);border:1px solid var(--line,#395065);padding:20px}
.of-mail-dialog::backdrop{background:rgb(0 12 22 / .75)}
.of-mail-dialog input,.of-mail-dialog textarea,.of-mail-dialog select{font-size:16px;min-height:44px;max-width:100%}
.of-mail-dialog textarea{min-height:160px}
.of-mail-dialog .of-grid{grid-template-columns:1fr}
@media(max-width:600px){.of-mail-dialog{padding:14px;max-height:calc(100dvh - 20px)}.of-mail-dialog .of-actions{display:grid;grid-template-columns:1fr}}

.of-mail-dialog button{font:inherit;border:1px solid #34566c;border-radius:10px;padding:10px 14px;background:#163348;color:#e7eef5;cursor:pointer}
.of-mail-dialog button:disabled{opacity:.5;cursor:default}
.of-mail-dialog #of-mail-prepare{background:#b7e5eb;color:#08232d;border-color:#b7e5eb;font-weight:650}
.of-mail-dialog button:focus-visible{outline:2px solid #4dd0e1;outline-offset:2px}

.of-comparison-dialog{width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;color:var(--text,#e7eef5);background:var(--surface,#0c1d29);border:1px solid var(--line,#395065);border-radius:12px;padding:20px}
.of-comparison-dialog::backdrop{background:rgb(0 12 22 / .75)}
.of-comparison-dialog input,.of-comparison-dialog select{font-size:16px;min-height:44px;width:100%;box-sizing:border-box}
.of-comparison-dialog button{min-height:44px;font:inherit;border:1px solid #34566c;border-radius:10px;padding:10px 14px;background:#163348;color:#e7eef5;cursor:pointer}
.of-comparison-dialog button:disabled{opacity:.5;cursor:default}
.of-comparison-dialog button:focus-visible{outline:2px solid #4dd0e1;outline-offset:2px}
.of-comparison-dialog #of-comparison-run{background:#b7e5eb;color:#08232d;border-color:#b7e5eb;font-weight:650}
.of-comparison-dialog .of-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.of-comparison-item{border-top:1px solid var(--line,#395065);padding:12px 0;min-width:0}
.of-comparison-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.of-comparison-pair section{min-width:0}
.of-comparison-pair pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:rgb(127 160 180 / .08);border-radius:8px}
.of-comparison-warning{border-left:3px solid #e5ba73;padding-left:12px}
@media(max-width:600px){.of-comparison-dialog{padding:14px;max-height:calc(100dvh - 20px)}.of-comparison-dialog .of-grid,.of-comparison-pair{grid-template-columns:1fr}.of-comparison-dialog .of-actions{display:grid;grid-template-columns:1fr}}
.of-comparison-dialog code{overflow-wrap:anywhere;font-size:.85em}
.of-comparison-dialog details{margin:12px 0}
.of-comparison-dialog summary{min-height:44px;display:list-item;cursor:pointer}
.of-comparison-dialog #of-comparison-footer{border-top:1px solid var(--line,#395065);padding-top:12px}
.of-comparison-dialog #of-comparison-footer[hidden]{display:none}
.of-comparison-pair section{padding-left:10px;border-left:2px solid #658da2}
.of-comparison-pair section:first-child{border-left-color:#ae946d}
.of-comparison-dialog #of-comparison-parts{overflow-wrap:anywhere}
.of-template-rule-editor{display:grid;gap:12px;margin:12px 0;min-width:0}
.of-template-rule-editor fieldset{border:1px solid var(--line,#395065);border-radius:10px;min-width:0;padding:12px;display:grid;gap:10px}
.of-template-rule-editor input,.of-template-rule-editor select,.of-template-rule-editor textarea{font-size:16px;min-height:44px;max-width:100%;box-sizing:border-box}

:is(#calls-view, #contacts-view) .calls-tabs{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
:is(#calls-view, #contacts-view) .calls-tabs [aria-current=page]{background:var(--accent,#55d9ce);color:#071923}
:is(#calls-view, #contacts-view) .calls-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1rem 0}
:is(#calls-view, #contacts-view) label{display:flex;flex-direction:column;gap:.4rem;font-size:.9rem}
:is(#calls-view, #contacts-view) input,:is(#calls-view, #contacts-view) select,:is(#calls-view, #contacts-view) textarea{width:100%;box-sizing:border-box}
:is(#calls-view, #contacts-view) .calls-wide{grid-column:1/-1}
:is(#calls-view, #contacts-view) .calls-check{flex-direction:row;align-items:center}
:is(#calls-view, #contacts-view) .calls-check input{width:auto}
:is(#calls-view, #contacts-view) .calls-list{display:grid;gap:.8rem;margin:1rem 0}
:is(#calls-view, #contacts-view) .calls-item,:is(#calls-view, #contacts-view) .calls-active{border:1px solid rgba(85,217,206,.22);border-radius:16px;padding:1rem;background:rgba(22,48,63,.32)}
:is(#calls-view, #contacts-view) .calls-item h4{margin:0 0 .4rem}
:is(#calls-view, #contacts-view) .calls-summary{margin:.6rem 0;padding:.6rem .8rem;border-left:3px solid var(--k-accent,#55d9ce);border-radius:8px;background:rgba(85,217,206,.08)}
:is(#calls-view, #contacts-view) .calls-summary strong{display:block;font-size:.85em;letter-spacing:.02em;margin-bottom:.2rem}
:is(#calls-view, #contacts-view) .calls-summary p{margin:0}
:is(#calls-view, #contacts-view) .calls-active{margin-top:1.5rem}
:is(#calls-view, #contacts-view) #calls-offer{border-left:3px solid #eabb71;padding:1rem;margin-top:1rem;background:rgba(234,187,113,.07)}
:is(#calls-view, #contacts-view) #calls-message-form{display:flex;align-items:end;gap:.75rem;margin-top:1rem}
:is(#calls-view, #contacts-view) #calls-message-form label{flex:1}
:is(#calls-view, #contacts-view) #calls-search-results{white-space:pre-wrap;overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .error{color:#ffaaaa}
:is(#calls-view, #contacts-view) details{margin-top:1rem}
:is(#calls-view, #contacts-view) summary{cursor:pointer;padding:.5rem 0}
:is(#calls-view, #contacts-view) .calls-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;max-width:300px;margin:1rem 0}
:is(#calls-view, #contacts-view) .item-actions{display:flex;flex-wrap:wrap;gap:.5rem}
@media(max-width:650px){:is(#calls-view, #contacts-view) .calls-grid{grid-template-columns:1fr}:is(#calls-view, #contacts-view) #calls-message-form{align-items:stretch;flex-direction:column}}
:is(#calls-view, #contacts-view) .calls-voice-draft{margin:0 0 1.25rem;border-color:rgba(85,217,206,.55)}
:is(#calls-view, #contacts-view) .calls-draft-facts{display:grid;grid-template-columns:max-content 1fr;gap:.35rem 1rem;margin:.5rem 0}
:is(#calls-view, #contacts-view) .calls-draft-facts dt{opacity:.7}
:is(#calls-view, #contacts-view) .calls-draft-facts dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-categories{border:0;padding:0;margin:0}
:is(#calls-view, #contacts-view) .calls-categories div{display:flex;flex-wrap:wrap;gap:.4rem 1rem}
:is(#calls-view, #contacts-view) .calls-categories label{display:inline-flex;gap:.35rem;align-items:center}
:is(#calls-view, #contacts-view) #calls-import{margin:.8rem 0}
:is(#calls-view, #contacts-view) #calls-import>summary{cursor:pointer;font-weight:600}
:is(#calls-view, #contacts-view) .calls-import{display:grid;gap:.7rem;margin-top:.7rem}
:is(#calls-view, #contacts-view) .calls-import-file{cursor:pointer}
:is(#calls-view, #contacts-view) .calls-import-bar{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:end}
:is(#calls-view, #contacts-view) .calls-import-bar input[type=search]{flex:1 1 12rem;min-width:0}
:is(#calls-view, #contacts-view) .calls-import-list{display:grid;gap:.15rem;max-height:min(60vh,32rem);overflow:auto;border:1px solid var(--k-line,rgba(255,255,255,.12));border-radius:12px;padding:.3rem}
:is(#calls-view, #contacts-view) .calls-import-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.3rem .7rem;align-items:center;padding:.45rem .5rem;border-radius:9px}
:is(#calls-view, #contacts-view) .calls-import-row:hover{background:var(--k-hover,rgba(255,255,255,.05))}
:is(#calls-view, #contacts-view) .calls-import-row input[type=checkbox]{width:1.15rem;height:1.15rem;margin:0}
:is(#calls-view, #contacts-view) .calls-import-row strong{overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-import-row .help{margin:0;grid-column:2/-1}
:is(#calls-view, #contacts-view) .calls-import-row select{max-width:14rem;font-size:.85rem}
:is(#calls-view, #contacts-view) .calls-import-row.is-known{opacity:.55}
@media (max-width:640px){:is(#calls-view, #contacts-view) .calls-import-row{grid-template-columns:auto minmax(0,1fr)}:is(#calls-view, #contacts-view) .calls-import-row select{grid-column:2;max-width:none}}
/* Kontakte: Karten mit Avatar, gruppiert nach Anfangsbuchstaben */
:is(#calls-view, #contacts-view) .calls-contact-searchbar{display:flex;align-items:end;gap:1rem;flex-wrap:wrap}
:is(#calls-view, #contacts-view) .calls-contact-searchbar label{flex:1 1 16rem}
:is(#calls-view, #contacts-view) .calls-contact-searchbar .help{margin:0 0 .55rem;white-space:nowrap}
:is(#calls-view, #contacts-view) .calls-contact-letter{margin:1.2rem 0 .5rem;font-size:.78rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--k-muted,rgba(255,255,255,.6));display:flex;align-items:center;gap:.7rem}
:is(#calls-view, #contacts-view) .calls-contact-letter::after{content:"";flex:1;height:1px;background:var(--k-line,rgba(255,255,255,.1))}
:is(#calls-view, #contacts-view) .calls-list>.calls-contact-letter:first-child{margin-top:0}
:is(#calls-view, #contacts-view) .calls-contact-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,21.5rem),1fr));gap:.8rem}
:is(#calls-view, #contacts-view) .calls-contact-card{display:grid;gap:.75rem;align-content:start;padding:1rem 1.05rem;border-radius:18px;border:1px solid var(--k-line,rgba(255,255,255,.1));
  background:linear-gradient(160deg,var(--k-surface-2,rgba(255,255,255,.06)),var(--k-surface,rgba(255,255,255,.025)));box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
  transition:border-color .18s ease,transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease}
@media (hover:hover){:is(#calls-view, #contacts-view) .calls-contact-card:hover{border-color:color-mix(in srgb,var(--k-accent,#55d9ce) 45%,transparent);transform:translateY(-1px);box-shadow:0 10px 28px -18px rgba(0,0,0,.7)}}
:is(#calls-view, #contacts-view) .calls-contact-head{display:flex;gap:.8rem;align-items:center;min-width:0}
:is(#calls-view, #contacts-view) .calls-avatar{flex:none;width:2.8rem;height:2.8rem;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:1rem;letter-spacing:.02em;
  color:#fff;background:linear-gradient(140deg,hsl(var(--hue) 55% 52%),hsl(calc(var(--hue) + 40) 60% 38%));box-shadow:0 0 0 2px rgba(255,255,255,.08)}
:is(#calls-view, #contacts-view) .is-business .calls-avatar{border-radius:12px}
:is(#calls-view, #contacts-view) .calls-contact-who{min-width:0;display:grid;gap:.3rem}
:is(#calls-view, #contacts-view) .calls-contact-who h5{margin:0;font-size:1.05rem;font-weight:650;line-height:1.25;overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-contact-title{font-weight:500;color:var(--k-muted,rgba(255,255,255,.65))}
:is(#calls-view, #contacts-view) .calls-contact-star{color:#f3c75f}
:is(#calls-view, #contacts-view) .calls-contact-tags{display:flex;flex-wrap:wrap;gap:.3rem}
:is(#calls-view, #contacts-view) .calls-chip{font-size:.72rem;line-height:1;padding:.28rem .55rem;border-radius:999px;background:var(--k-surface-3,rgba(255,255,255,.07));color:var(--k-muted,rgba(255,255,255,.7))}
:is(#calls-view, #contacts-view) .calls-chip.is-category{background:color-mix(in srgb,var(--k-accent,#55d9ce) 18%,transparent);color:var(--k-accent,#55d9ce)}
:is(#calls-view, #contacts-view) .calls-chip.is-ok{color:#7fd6a1}
:is(#calls-view, #contacts-view) .calls-chip.is-warn{color:#e8c172}
:is(#calls-view, #contacts-view) .calls-contact-facts{display:grid;gap:.25rem;font-size:.9rem;min-width:0}
:is(#calls-view, #contacts-view) .calls-contact-phone{font-variant-numeric:tabular-nums;font-weight:600;color:inherit;text-decoration:none;justify-self:start}
:is(#calls-view, #contacts-view) .calls-contact-phone:hover{color:var(--k-accent,#55d9ce)}
:is(#calls-view, #contacts-view) .calls-contact-address,:is(#calls-view, #contacts-view) .calls-contact-alias{color:var(--k-muted,rgba(255,255,255,.62));overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-contact-actions{padding-top:.15rem;gap:.4rem}
:is(#calls-view, #contacts-view) .calls-contact-actions .button{flex:0 1 auto}
:is(#calls-view, #contacts-view) .calls-contact-actions .button.ghost{margin-left:auto}
:is(#calls-view, #contacts-view) .calls-person-name{display:grid;grid-template-columns:minmax(8rem,.7fr) 1fr 1fr;gap:1rem}
:is(#calls-view, #contacts-view) .calls-person-name[hidden]{display:none}
@media (max-width:650px){:is(#calls-view, #contacts-view) .calls-person-name{grid-template-columns:1fr 1fr}:is(#calls-view, #contacts-view) .calls-person-name label:first-child{grid-column:1/-1}}
@media (prefers-reduced-motion:reduce){:is(#calls-view, #contacts-view) .calls-contact-card{transition:none}:is(#calls-view, #contacts-view) .calls-contact-card:hover{transform:none}}
:is(#calls-view, #contacts-view) .calls-contact-actions{flex-wrap:nowrap}
:is(#calls-view, #contacts-view) .calls-contact-card{min-width:0}
@media (max-width:460px){:is(#calls-view, #contacts-view) .calls-contact-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}:is(#calls-view, #contacts-view) .calls-contact-actions .button{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding-inline:.4rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:is(#calls-view, #contacts-view) .calls-contact-actions .button.ghost{margin-left:0}}
:is(#calls-view, #contacts-view) #calls-import:not([open]){display:none}
:is(#calls-view, #contacts-view) .calls-chip.is-relation{--tone:#c79bff;background:color-mix(in srgb,var(--tone) 26%,transparent);color:color-mix(in srgb,var(--tone) 65%,#fff);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tone) 50%,transparent);font-weight:600}
:is(#calls-view, #contacts-view) .calls-chip.is-relation[data-tone=partner]{--tone:#ff5c8a}
:is(#calls-view, #contacts-view) .calls-chip.is-relation[data-tone=family]{--tone:#ff9640}
:is(#calls-view, #contacts-view) .calls-chip.is-relation[data-tone=friends]{--tone:#4fd17f}
:is(#calls-view, #contacts-view) .calls-chip.is-relation[data-tone=known]{--tone:#b48cff}
:is(#calls-view, #contacts-view) .calls-chip.is-relation[data-tone=work]{--tone:#4ea3ff}
:root[data-theme=light] :is(#calls-view, #contacts-view) .calls-chip.is-relation{color:color-mix(in srgb,var(--tone) 70%,#000)}
@media (prefers-color-scheme:light){:root:not([data-theme=dark]) :is(#calls-view, #contacts-view) .calls-chip.is-relation{color:color-mix(in srgb,var(--tone) 70%,#000)}}
:is(#calls-view, #contacts-view) .calls-contact-filters{display:flex;flex-wrap:wrap;gap:.4rem;margin:.8rem 0 .2rem}
:is(#calls-view, #contacts-view) .calls-contact-filters[hidden]{display:none}
:is(#calls-view, #contacts-view) .calls-filter{--tone:var(--k-accent,#55d9ce);display:inline-flex;align-items:center;gap:.45rem;padding:.38rem .75rem;border-radius:999px;font:inherit;font-size:.85rem;cursor:pointer;
  border:1px solid var(--k-line,rgba(255,255,255,.12));background:transparent;color:inherit;transition:background .15s ease,border-color .15s ease}
:is(#calls-view, #contacts-view) .calls-filter[data-tone=partner]{--tone:#ff5c8a}:is(#calls-view, #contacts-view) .calls-filter[data-tone=family]{--tone:#ff9640}
:is(#calls-view, #contacts-view) .calls-filter[data-tone=friends]{--tone:#4fd17f}:is(#calls-view, #contacts-view) .calls-filter[data-tone=known]{--tone:#b48cff}
:is(#calls-view, #contacts-view) .calls-filter[data-tone=work]{--tone:#4ea3ff}:is(#calls-view, #contacts-view) .calls-filter[data-tone=favorite]{--tone:#f3c75f}
:is(#calls-view, #contacts-view) .calls-filter::before{content:"";width:.5rem;height:.5rem;border-radius:50%;background:var(--tone)}
:is(#calls-view, #contacts-view) .calls-filter[data-tone=all]::before,:is(#calls-view, #contacts-view) .calls-filter[data-tone=business]::before{display:none}
@media (hover:hover){:is(#calls-view, #contacts-view) .calls-filter:hover{border-color:color-mix(in srgb,var(--tone) 55%,transparent)}}
:is(#calls-view, #contacts-view) .calls-filter[aria-pressed=true]{background:color-mix(in srgb,var(--tone) 20%,transparent);border-color:color-mix(in srgb,var(--tone) 60%,transparent)}
:is(#calls-view, #contacts-view) .calls-filter-count{font-size:.75rem;opacity:.65;font-variant-numeric:tabular-nums}
/* more numbers, e-mails, collected notes about a contact */
:is(#calls-view, #contacts-view) .calls-multi{display:grid;gap:8px}
:is(#calls-view, #contacts-view) .calls-multi-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,170px) auto;gap:8px;align-items:end}
:is(#calls-view, #contacts-view) .calls-multi-row:first-child:not(:has(.calls-multi-remove)){grid-template-columns:minmax(0,1fr) minmax(120px,170px)}
:is(#calls-view, #contacts-view) .calls-multi-remove{min-width:36px;align-self:end}
:is(#calls-view, #contacts-view) .calls-multi > .button{justify-self:start}
:is(#calls-view, #contacts-view) .calls-contact-phone.is-extra{font-weight:500}
:is(#calls-view, #contacts-view) .calls-contact-mail{color:inherit;text-decoration:none;overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-contact-mail:hover{color:var(--k-accent,#55d9ce)}
:is(#calls-view, #contacts-view) .calls-contact-company,:is(#calls-view, #contacts-view) .calls-contact-birthday,:is(#calls-view, #contacts-view) .calls-contact-notes-count{color:var(--k-muted,rgba(255,255,255,.62))}
:is(#calls-view, #contacts-view) .calls-notebook{margin-top:18px;padding-top:16px;border-top:1px solid var(--k-line,rgba(255,255,255,.1));display:grid;gap:10px}
:is(#calls-view, #contacts-view) .calls-notebook h4{margin:0}
:is(#calls-view, #contacts-view) .calls-note-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
:is(#calls-view, #contacts-view) .calls-note-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
:is(#calls-view, #contacts-view) .calls-note{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:10px 12px;border-radius:12px;background:var(--k-surface-2,rgba(255,255,255,.04))}
:is(#calls-view, #contacts-view) .calls-note time{grid-column:1;font-size:.82em;color:var(--k-muted,rgba(255,255,255,.62))}
:is(#calls-view, #contacts-view) .calls-note p{grid-column:1;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
:is(#calls-view, #contacts-view) .calls-note .button{grid-column:2;grid-row:1 / span 2;align-self:center}
@media (max-width:640px){
  :is(#calls-view, #contacts-view) .calls-multi-row{grid-template-columns:minmax(0,1fr) auto}
  :is(#calls-view, #contacts-view) .calls-multi-row > label:nth-child(2){grid-column:1}
  :is(#calls-view, #contacts-view) .calls-multi-row:first-child:not(:has(.calls-multi-remove)){grid-template-columns:minmax(0,1fr)}
  :is(#calls-view, #contacts-view) .calls-note-add{grid-template-columns:minmax(0,1fr)}
}
:is(#calls-view, #contacts-view) .calls-chip.is-role{background:color-mix(in srgb,var(--k-accent,#55d9ce) 18%,transparent);color:var(--k-accent,#55d9ce)}
:is(#calls-view, #contacts-view) .calls-contact-phone.is-missing{font-weight:400;color:var(--k-muted,rgba(255,255,255,.62))}

#tax-view .tax-tabs,#tax-view .tax-chips{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}
#tax-view .tax-tabs [aria-current=page],#tax-view .tax-chips [aria-current=page]{background:var(--accent,#55d9ce);color:#071923}
#tax-view .tax-finder{display:grid;gap:.8rem}
#tax-view .tax-run{display:grid;grid-template-columns:8rem 1fr auto;gap:.8rem;align-items:center;padding:.6rem 0;border-top:1px solid rgba(85,217,206,.16)}
#tax-view .tax-run-info{overflow-wrap:anywhere}
#tax-view .tax-list{display:grid;gap:.9rem;margin:1rem 0}
#tax-view .tax-item{border:1px solid rgba(85,217,206,.22);border-radius:16px;padding:1rem;background:rgba(22,48,63,.32)}
#tax-view .tax-item.confirmed{border-color:rgba(120,220,150,.5)}
#tax-view .tax-item.rejected{opacity:.7}
#tax-view .tax-item h4{margin:0 0 .2rem}
#tax-view .tax-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr));gap:.7rem;margin:.8rem 0}
#tax-view label{display:flex;flex-direction:column;gap:.35rem;font-size:.9rem}
#tax-view input,#tax-view select{width:100%;box-sizing:border-box}
#tax-view input[type=checkbox]{width:1.25rem;height:1.25rem;align-self:flex-start}
#tax-view .tax-right,#tax-view .tax-grid>*{min-width:0}
#tax-view .tax-evidence{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.82rem;max-height:14rem;overflow:auto}
#tax-view .item-actions{display:flex;flex-wrap:wrap;gap:.5rem}
#tax-view .error{color:#ffaaaa}
#tax-view .tax-forms{display:grid;grid-template-columns:minmax(14rem,22rem) 1fr;gap:1.2rem;margin-top:1rem}
#tax-view .tax-tree{display:grid;gap:.3rem;align-content:start;min-width:0}
#tax-view .tax-tree h4{margin:.9rem 0 .2rem;font-size:.85rem;opacity:.75}
#tax-view .tax-form-button{display:flex;justify-content:space-between;gap:.6rem;text-align:left;padding:.55rem .7rem;border:1px solid rgba(85,217,206,.2);border-radius:10px;background:transparent;color:inherit;cursor:pointer}
#tax-view .tax-form-button>span{min-width:0;overflow-wrap:anywhere}
#tax-view .tax-form-button[aria-current=page]{background:rgba(85,217,206,.16);border-color:var(--accent,#55d9ce)}
#tax-view .maturity{font-size:.75rem;white-space:nowrap;opacity:.85}
#tax-view .maturity.unterstützt{color:#8fe0a8}
#tax-view .maturity.nicht-unterstützt{color:#d8a8a8}
#tax-view .tax-form-row{display:flex;justify-content:space-between;gap:1rem;padding:.55rem 0;border-top:1px solid rgba(85,217,206,.14)}
#tax-view .tax-snapshot-row{flex-wrap:wrap}
#tax-view .tax-elster-handoff{flex-basis:100%;min-width:0}
@media(max-width:760px){#tax-view .tax-run{grid-template-columns:1fr}#tax-view .tax-forms{grid-template-columns:minmax(0,1fr)}}
#tax-view .tax-right{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-content:start}
#tax-view .tax-right>.card{min-width:0;overflow-wrap:anywhere}
#tax-view .tax-estimate .tax-refund{font-size:1.25rem;margin:.2rem 0 .8rem}
#tax-view .tax-step{display:flex;justify-content:space-between;gap:1rem;padding:.35rem 0;border-top:1px solid rgba(85,217,206,.12)}
#tax-view .tax-step.total{font-weight:700;border-top-color:rgba(85,217,206,.4)}
#tax-view label small{opacity:.7;font-weight:400}
#tax-view .tax-hint{border-top:1px solid rgba(85,217,206,.14);padding:.7rem 0}
#tax-view .tax-hint.fehlt strong{color:#eabb71}
#tax-view .tax-hint p{margin:.25rem 0}
#tax-view .tax-rule{border-top:1px solid rgba(85,217,206,.14);padding:.7rem 0}

#tax-view .tax-trip-editor { min-width:0; }
#tax-view .tax-trip-editor fieldset { min-width:0; margin:1rem 0; border:1px solid rgba(85,217,206,.2); }
#tax-view .tax-trip-editor pre { white-space:pre-wrap; overflow-wrap:anywhere; }
#tax-view .tax-trip-editor input:not([type=checkbox]), #tax-view .tax-trip-editor select, #tax-view .tax-trip-editor textarea { min-width:0; max-width:100%; box-sizing:border-box; }
/* Keep iOS from zooming when travel amounts or dates receive focus. */
@media (pointer:coarse) { #tax-view .tax-trip-editor input, #tax-view .tax-trip-editor select, #tax-view .tax-trip-editor textarea { font-size:16px; } }
#tax-view .tax-form-detail, #tax-view .tax-trips { min-width:0; overflow-wrap:anywhere; }
/* Energetic records contain long proof notes and select labels inside narrow form cards. */
#tax-view .tax-energy-object { min-width:0; overflow-wrap:anywhere; }
#tax-view .tax-energy-object form, #tax-view .tax-energy-object fieldset { display:grid; gap:.8rem; min-width:0; }
#tax-view .tax-energy-object form { margin:1rem 0; }
#tax-view .tax-energy-object fieldset { margin:0; padding:1rem; border:1px solid rgba(85,217,206,.2); border-radius:12px; }
#tax-view .tax-energy-object :is(input:not([type=checkbox]),select,textarea) { min-width:0; width:100%; max-width:100%; box-sizing:border-box; }
#tax-view .tax-energy-object textarea { resize:vertical; }
#tax-view .tax-energy-object .button { max-width:100%; white-space:normal; }
/* A 16px control font prevents iOS focus zoom while entering proof and amount fields. */
@media (pointer:coarse) { #tax-view .tax-energy-object :is(input,select,textarea), #tax-view [data-field=energie_quelle] { font-size:16px; } }
#tax-view .tax-trip-editor .button { max-width:100%; white-space:normal; }
#tax-view .tax-trip-editor .tax-grid { grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr)); }
/* Original actions and native file inputs must fit inside narrow receipt cards. */
#tax-view [data-certificate-original] { min-width:0; overflow-wrap:anywhere; }
#tax-view [data-certificate-original] .button { max-width:100%; white-space:normal; }
#tax-view [data-certificate-original] input { min-width:0; max-width:100%; }
#tax-view [data-certificate-correction] { min-width:0; overflow-wrap:anywhere; }
#tax-view [data-certificate-correction] .button { max-width:100%; white-space:normal; }
#tax-view [data-certificate-correction] textarea { box-sizing:border-box; width:100%; min-height:5rem; }
/* Keep iOS from zooming when editing the new pension records or choosing an original. */
@media (pointer:coarse) {
  #tax-view [data-tax-record-panel=pension] input,
  #tax-view [data-tax-record-panel=pension] select,
  #tax-view [data-certificate-original] input,
  #tax-view [data-certificate-correction] textarea,
  #tax-view [data-certificate-correction] select { font-size:16px; }
}

#tax-view .tax-snapshot-panel { min-width:0; overflow-wrap:anywhere; }
#tax-view .tax-snapshot-panel input, #tax-view .tax-snapshot-panel select { min-width:0; max-width:100%; }
#tax-view .tax-snapshot-panel .button { max-width:100%; white-space:normal; }
@media (pointer:coarse) { #tax-view .tax-snapshot-panel input, #tax-view .tax-snapshot-panel select { font-size:16px; } }

#tax-view [data-certificate-inbox], #tax-view .tax-certificate-batch-card { min-width:0; overflow-wrap:anywhere; }
#tax-view [data-certificate-inbox] input, #tax-view [data-certificate-inbox] select { min-width:0; max-width:100%; }
#tax-view [data-certificate-inbox] .button { max-width:100%; white-space:normal; }
@media (pointer:coarse) { #tax-view [data-certificate-inbox] input, #tax-view [data-certificate-inbox] select { font-size:16px; } }

/* Keep the review usable inside narrow form cards; 16px avoids focus zoom on touch devices. */
#tax-view [data-certificate-review] { min-width:0; overflow-wrap:anywhere; }
#tax-view [data-certificate-review] .tax-grid { grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr)); }
#tax-view [data-certificate-review] .button { max-width:100%; white-space:normal; }
@media (pointer:coarse) { #tax-view [data-certificate-review] select { font-size:16px; } }

/* ===== Steuer: neue Oberfläche (30.10.2026) – ruhig, hochwertig, übersichtlich ===== */
#tax-view {
  --tx-good: #5fd3a2; --tx-warn: #f0b860; --tx-bad: #ff8f8f;
  --tx-card: var(--k-surface, rgba(14,22,34,.84)); --tx-line: var(--k-line, rgba(255,255,255,.07));
  --tx-soft: color-mix(in srgb, var(--k-accent, #8fb2ff) 14%, transparent);
  --tx-ease: cubic-bezier(.22,1,.36,1);
}
:root[data-theme="light"] #tax-view { --tx-good: #12875a; --tx-warn: #a86400; --tx-bad: #b42318; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) #tax-view { --tx-good: #12875a; --tx-warn: #a86400; --tx-bad: #b42318; } }
#tax-view .tax-icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Kopf: Titel links, Erstattung mit Fortschrittsring rechts */
#tax-view .tax-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2rem; align-items: center;
  padding: clamp(1.2rem, 3vw, 2rem); margin: .4rem 0 1rem; border: 1px solid var(--tx-line); border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, var(--tx-soft), transparent 55%), var(--tx-card); }
#tax-view .tax-hero::after { content: ''; position: absolute; inset: auto -10% -60% 45%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tx-good) 12%, transparent), transparent); filter: blur(10px); }
#tax-view .tax-hero-text { position: relative; z-index: 1; min-width: 0; }
#tax-view .tax-hero-text h2 { margin: .15rem 0 .5rem; font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -.02em; }
#tax-view .tax-hero-text > .help { max-width: 46rem; margin: 0; }
#tax-view .tax-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
#tax-view .tax-live-start { display: inline-flex; align-items: center; gap: .55rem; padding-inline: 1.15rem; }
#tax-view .tax-live-start .tax-icon { width: 1.25em; height: 1.25em; }
#tax-view .tax-score { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.3rem; }
#tax-view .tax-ring-wrap { position: relative; width: 132px; height: 132px; flex: none; }
#tax-view .tax-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
#tax-view .tax-ring circle { fill: none; stroke-width: 9; }
#tax-view .tax-ring-track { stroke: var(--tx-line); }
#tax-view .tax-ring-bar { stroke: var(--k-accent, #8fb2ff); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--tx-ease);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--k-accent, #8fb2ff) 45%, transparent)); }
#tax-view .tax-ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
#tax-view .tax-ring-center strong { font-size: 1.55rem; letter-spacing: -.02em; }
#tax-view .tax-ring-center span { font-size: .78rem; color: var(--k-muted); }
#tax-view .tax-score-figures { display: grid; gap: .2rem; min-width: 12rem; }
#tax-view .tax-score-label { font-size: .85rem; color: var(--k-muted); }
#tax-view .tax-score-amount { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--tx-good); }
#tax-view .tax-score[data-direction=payment] .tax-score-amount { color: var(--tx-warn); }
#tax-view .tax-score-note { font-size: .75rem; color: var(--k-muted); opacity: .8; }
#tax-view .tax-chip { justify-self: start; margin: .35rem 0 .15rem; padding: .22rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: color-mix(in srgb, var(--tx-warn) 16%, transparent); color: var(--tx-warn); }
#tax-view .tax-chip:empty { display: none; }
#tax-view .tax-chip[data-state=ok] { background: color-mix(in srgb, var(--tx-good) 16%, transparent); color: var(--tx-good); }

/* Reiter als ruhige Segmente */
#tax-view .tax-tabs { display: inline-flex; gap: .25rem; padding: .3rem; margin: .2rem 0 1.2rem; border: 1px solid var(--tx-line); border-radius: 14px; background: var(--tx-card); scroll-margin-top: calc(var(--tarvi-head, 0px) + 1rem); }
#tax-view .tax-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border: 0; border-radius: 10px; background: transparent; color: var(--k-muted); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .25s var(--tx-ease), color .25s var(--tx-ease); }
#tax-view .tax-tab:hover { color: var(--k-text); }
#tax-view .tax-tab[aria-current=page] { background: var(--tx-soft); color: var(--k-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent, #8fb2ff) 30%, transparent); }
#tax-view .tax-tabs [aria-current=page] { color: var(--k-text); }

/* Übersicht */
#tax-view .tax-ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 1rem; }
#tax-view .tax-ov-card { grid-column: span 6; min-width: 0; padding: 1.25rem 1.35rem; border: 1px solid var(--tx-line); border-radius: 18px; background: var(--tx-card);
  animation: tax-rise .55s var(--tx-ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
#tax-view .tax-ov-next, #tax-view .tax-ov-ideas { grid-column: span 6; }
#tax-view .tax-ov-life { grid-column: span 12; }
#tax-view .tax-ov-path { grid-column: span 7; }
#tax-view .tax-ov-receipts { grid-column: span 5; }
#tax-view .tax-ov-submit { grid-column: span 12; }
#tax-view .tax-ov-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
#tax-view .tax-ov-head h3 { margin: 0; font-size: 1.05rem; flex: 1; }
#tax-view .tax-ov-mark { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 11px; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-ask { display: inline-flex; align-items: center; gap: .45rem; }
#tax-view .tax-ov-next .tax-interview-panel { padding: 0; border: 0; background: none; box-shadow: none; }
#tax-view .tax-ov-next .tax-interview-panel label { font-weight: 600; font-size: 1rem; }
#tax-view .tax-ov-next .tax-interview-panel .button { margin: .4rem .4rem 0 0; }

#tax-view .tax-life-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: .65rem; }
#tax-view .tax-life { display: flex; align-items: center; gap: .85rem; min-width: 0; padding: .85rem .95rem; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--tx-line); border-radius: 14px; background: color-mix(in srgb, var(--k-text, #fff) 2%, transparent);
  transition: transform .3s var(--tx-ease), border-color .3s var(--tx-ease), background .3s var(--tx-ease); animation: tax-rise .5s var(--tx-ease) both; animation-delay: calc(120ms + var(--i, 0) * 35ms); }
#tax-view .tax-life:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 45%, transparent); background: var(--tx-soft); }
#tax-view .tax-life:focus-visible { outline: 2px solid var(--k-accent, #8fb2ff); outline-offset: 2px; }
#tax-view .tax-life-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 12px; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-life-icon .tax-icon { width: 1.3rem; height: 1.3rem; }
#tax-view .tax-life-text { display: grid; gap: .15rem; min-width: 0; }
#tax-view .tax-life-text strong { font-size: .95rem; }
#tax-view .tax-life-text small { color: var(--k-muted); font-size: .8rem; overflow-wrap: anywhere; }
#tax-view .tax-life[data-state=active] .tax-life-icon { background: color-mix(in srgb, var(--tx-good) 16%, transparent); color: var(--tx-good); }
#tax-view .tax-life[data-state=open] { border-style: dashed; border-color: color-mix(in srgb, var(--tx-warn) 45%, transparent); }
#tax-view .tax-life[data-state=open] .tax-life-icon { background: color-mix(in srgb, var(--tx-warn) 14%, transparent); color: var(--tx-warn); }
#tax-view .tax-life[data-state=no] { opacity: .55; }

#tax-view .tax-idea { display: grid; grid-template-columns: 5.6rem minmax(0,1fr) auto; gap: .9rem; align-items: start; padding: .85rem 0; border-top: 1px solid var(--tx-line); }
#tax-view .tax-idea:first-of-type { border-top: 0; padding-top: .2rem; }
#tax-view .tax-idea-value { justify-self: start; padding: .3rem .6rem; border-radius: 9px; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: color-mix(in srgb, var(--tx-good) 15%, transparent); color: var(--tx-good); }
#tax-view .tax-idea[data-kind=fehlt] .tax-idea-value { background: color-mix(in srgb, var(--tx-warn) 15%, transparent); color: var(--tx-warn); }
#tax-view .tax-idea-body strong { display: block; margin-bottom: .15rem; }
#tax-view .tax-idea-body p { margin: .2rem 0 0; }
#tax-view .tax-idea-action { font-size: .85rem; color: var(--k-text); opacity: .85; }
#tax-view .tax-link { padding: 0; border: 0; background: none; color: var(--k-accent, #8fb2ff); font: inherit; font-weight: 600; cursor: pointer; }
#tax-view .tax-link:hover { text-decoration: underline; }

#tax-view .tax-bars { display: grid; gap: .45rem; }
#tax-view .tax-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(4rem, 1fr) auto; gap: .8rem; align-items: center; font-size: .86rem; }
#tax-view .tax-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--k-muted); }
#tax-view .tax-bar-track { height: .5rem; border-radius: 999px; background: color-mix(in srgb, var(--k-text, #fff) 5%, transparent); overflow: hidden; }
#tax-view .tax-bar-fill { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--k-accent, #8fb2ff); transform-origin: left;
  animation: tax-grow .9s var(--tx-ease) both; animation-delay: calc(200ms + var(--i, 0) * 45ms); }
#tax-view .tax-bar.minus .tax-bar-fill { background: var(--tx-good); }
#tax-view .tax-bar.total .tax-bar-label, #tax-view .tax-bar.total .tax-bar-value { color: var(--k-text); font-weight: 700; }
#tax-view .tax-bar.total .tax-bar-fill { background: linear-gradient(90deg, var(--k-accent, #8fb2ff), color-mix(in srgb, var(--k-accent, #8fb2ff) 50%, var(--tx-good))); }
#tax-view .tax-bar-value { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
#tax-view .tax-bar-result { display: flex; justify-content: space-between; align-items: baseline; margin-top: .9rem; padding: .8rem 1rem; border-radius: 12px;
  background: color-mix(in srgb, var(--tx-good) 12%, transparent); color: var(--tx-good); }
#tax-view .tax-bar-result[data-direction=payment] { background: color-mix(in srgb, var(--tx-warn) 12%, transparent); color: var(--tx-warn); }
#tax-view .tax-bar-result strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

#tax-view .tax-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; margin-bottom: .6rem; }
#tax-view .tax-stat { display: grid; gap: .1rem; padding: .8rem; border-radius: 12px; background: color-mix(in srgb, var(--k-text, #fff) 3%, transparent); text-align: center; }
#tax-view .tax-stat strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
#tax-view .tax-stat span { font-size: .78rem; color: var(--k-muted); }
#tax-view .tax-stat[data-state=open] strong { color: var(--tx-warn); }
#tax-view .tax-stat[data-state=ok] strong { color: var(--tx-good); }
#tax-view .tax-submit-state { font-weight: 600; margin: 0 0 .6rem; }
#tax-view .tax-submit-state[data-state=ok] { color: var(--tx-good); }
#tax-view .tax-checklist { margin: 0 0 .8rem; padding: 0; list-style: none; display: grid; gap: .45rem; }
#tax-view .tax-checklist li { position: relative; padding-left: 1.4rem; font-size: .9rem; overflow-wrap: anywhere; }
#tax-view .tax-checklist li::before { content: ''; position: absolute; left: .2rem; top: .45em; width: .55rem; height: .55rem; border-radius: 50%; border: 2px solid var(--tx-warn); }

/* Gespräch mit Tarvi */
#tax-view .tax-dock { position: sticky; top: .6rem; z-index: 5; margin: 0 0 1rem; padding: .9rem 1.1rem; border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--k-accent, #8fb2ff) 35%, transparent);
  background: color-mix(in srgb, var(--k-bg, #060f19) 70%, var(--tx-card)); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.6); animation: tax-rise .45s var(--tx-ease) both; }
#tax-view .tax-dock-head { display: flex; align-items: center; gap: .9rem; }
#tax-view .tax-dock-orb { position: relative; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, color-mix(in srgb, var(--k-accent, #8fb2ff) 80%, #fff) 25%, var(--k-accent, #8fb2ff) 60%, transparent 72%); }
#tax-view .tax-dock-orb::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--k-accent, #8fb2ff) 50%, transparent); opacity: 0; }
#tax-view .tax-dock-orb[data-state=listening]::after { animation: tax-listen 1.8s ease-out infinite; }
#tax-view .tax-dock-orb[data-state=speaking] { animation: tax-speak .9s ease-in-out infinite; }
#tax-view .tax-dock-orb[data-state=thinking], #tax-view .tax-dock-orb[data-state=connecting] { animation: tax-think 1.4s ease-in-out infinite; }
#tax-view .tax-dock-orb:is([data-state=idle],[data-state=error]) { filter: grayscale(1); opacity: .5; }
#tax-view .tax-dock-who { display: grid; gap: .15rem; flex: 1; min-width: 0; }
#tax-view .tax-dock-line { color: var(--k-muted); font-size: .9rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#tax-view .tax-dock-close { border: 0; background: none; color: var(--k-muted); font-size: 1.4rem; cursor: pointer; }
#tax-view .tax-dock-heard { margin: .6rem 0 0 3.3rem; font-size: .85rem; color: var(--k-muted); font-style: italic; overflow-wrap: anywhere; }
#tax-view .tax-feed { list-style: none; margin: .8rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--tx-line); display: grid; gap: .5rem; max-height: 14rem; overflow: auto; }
#tax-view .tax-feed-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: .7rem; align-items: center; animation: tax-rise .4s var(--tx-ease) both; }
#tax-view .tax-feed-row > div { display: grid; min-width: 0; }
#tax-view .tax-feed-row strong { font-size: .9rem; overflow-wrap: anywhere; }
#tax-view .tax-feed-row .help { font-size: .8rem; overflow-wrap: anywhere; }
#tax-view .tax-feed-mark { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: color-mix(in srgb, var(--tx-good) 16%, transparent); color: var(--tx-good); }
#tax-view .tax-feed-row.undone { opacity: .5; }
#tax-view .tax-feed-row.undone .tax-feed-mark { background: var(--tx-line); color: var(--k-muted); }
#tax-view .tax-feed-delta { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tax-view .tax-feed-delta.up { color: var(--tx-good); }
#tax-view .tax-feed-delta.down { color: var(--tx-warn); }
#tax-view label.tax-flash { animation: tax-flash 1.8s var(--tx-ease); border-radius: 10px; }

/* Belege und Formulare im gleichen Stil */
#tax-view .tax-item { border-color: var(--tx-line); border-radius: 16px; background: var(--tx-card); transition: border-color .3s var(--tx-ease), transform .3s var(--tx-ease); }
#tax-view .tax-item:hover { border-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 35%, transparent); }
#tax-view .tax-item.confirmed { border-color: color-mix(in srgb, var(--tx-good) 45%, transparent); }
#tax-view .tax-finder, #tax-view .tax-form-detail, #tax-view .tax-right > .card, #tax-view .tax-list + details.card, #tax-view section > details.card { border-color: var(--tx-line); border-radius: 18px; }
#tax-view .tax-run { border-top-color: var(--tx-line); }
#tax-view .tax-chips [aria-current=page] { background: var(--tx-soft); color: var(--k-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k-accent, #8fb2ff) 30%, transparent); }
#tax-view .tax-forms { grid-template-columns: minmax(14rem, 19rem) minmax(0,1fr); gap: 1.4rem; }
#tax-view .tax-tree { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; padding-right: .3rem; }
#tax-view .tax-tree h4 { margin: 1rem 0 .3rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted); opacity: 1; }
#tax-view .tax-form-button { border: 1px solid transparent; border-radius: 10px; padding: .5rem .65rem; transition: background .2s var(--tx-ease), border-color .2s var(--tx-ease); }
#tax-view .tax-form-button:hover { background: color-mix(in srgb, var(--k-text, #fff) 4%, transparent); }
#tax-view .tax-form-button[aria-current=page] { background: var(--tx-soft); border-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 35%, transparent); }
#tax-view .maturity { padding: .05rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--k-text, #fff) 6%, transparent); color: var(--k-muted); font-size: .7rem; }
#tax-view .maturity.unterstützt { color: var(--tx-good); background: color-mix(in srgb, var(--tx-good) 12%, transparent); }
#tax-view .maturity.nicht-unterstützt { color: var(--tx-bad); background: color-mix(in srgb, var(--tx-bad) 10%, transparent); }
#tax-view .tax-form-detail > h3 { font-size: 1.35rem; letter-spacing: -.01em; }
#tax-view .tax-form-detail > h4 { margin: 1.4rem 0 .3rem; padding-top: 1rem; border-top: 1px solid var(--tx-line); }
#tax-view .tax-grid { gap: .9rem 1rem; }
#tax-view .tax-grid > label { padding: .2rem; }
#tax-view .tax-form-row, #tax-view .tax-step, #tax-view .tax-hint, #tax-view .tax-rule { border-top-color: var(--tx-line); }
#tax-view .tax-step.total { border-top-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 40%, transparent); }
#tax-view .tax-estimate .tax-refund strong { color: var(--tx-good); }

@keyframes tax-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tax-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tax-listen { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.45); } }
@keyframes tax-speak { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes tax-think { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes tax-flash { 0% { background: color-mix(in srgb, var(--tx-good) 30%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx-good) 35%, transparent); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
  #tax-view .tax-ov-card, #tax-view .tax-life, #tax-view .tax-bar-fill, #tax-view .tax-dock, #tax-view .tax-feed-row, #tax-view .tax-dock-orb, #tax-view .tax-dock-orb::after { animation: none !important; }
  #tax-view .tax-ring-bar, #tax-view .tax-life { transition: none; }
}
@media (max-width: 1100px) {
  #tax-view .tax-ov-next, #tax-view .tax-ov-ideas, #tax-view .tax-ov-path, #tax-view .tax-ov-receipts { grid-column: span 12; }
}
@media (max-width: 760px) {
  #tax-view .tax-hero { grid-template-columns: minmax(0,1fr); gap: 1.2rem; }
  #tax-view .tax-score { order: -1; gap: 1rem; }
  #tax-view .tax-ring-wrap { width: 96px; height: 96px; }
  #tax-view .tax-ring-center strong { font-size: 1.15rem; }
  #tax-view .tax-score-figures { min-width: 0; }
  #tax-view .tax-hero-actions > .button { flex: 1 1 auto; justify-content: center; }
  #tax-view .tax-tabs { display: flex; width: 100%; box-sizing: border-box; }
  #tax-view .tax-tab { flex: 1; justify-content: center; padding: .55rem .4rem; }
  #tax-view .tax-idea { grid-template-columns: minmax(0,1fr); gap: .45rem; }
  #tax-view .tax-idea > .button { justify-self: start; }
  #tax-view .tax-bar { grid-template-columns: minmax(0,1fr) auto; }
  #tax-view .tax-bar-track { grid-column: 1 / -1; order: 3; }
  #tax-view .tax-tree { position: static; max-height: none; }
  #tax-view .tax-dock-heard { margin-left: 0; }
  #tax-view .tax-feed-row { grid-template-columns: auto minmax(0,1fr) auto; }
  #tax-view .tax-feed-row .tax-link { grid-column: 2 / -1; justify-self: start; }
}
#tax-view #tax-status { margin: 0 0 .6rem; }
#tax-view #tax-status:empty { margin: 0; }
#tax-view .tax-form-button .maturity { align-self: flex-start; line-height: 1.5; }
@media (max-width: 760px) {
  #tax-view .tax-ov-head { flex-wrap: wrap; }
  #tax-view .tax-ov-head .tax-ask { flex-basis: 100%; justify-content: center; }
  #tax-view .tax-dock-head { flex-wrap: wrap; }
  #tax-view .tax-dock-who { flex-basis: calc(100% - 3.4rem); }
  #tax-view .tax-dock-head > .button { flex: 1; }
}
#tax-view .tax-tabs { flex-wrap: nowrap; }
@media (max-width: 760px) {
  #tax-view .tax-forms { grid-template-columns: minmax(0,1fr); }
  #tax-view .tax-tab { min-width: 0; font-size: .9rem; gap: .35rem; }
}
@media (max-width: 380px) { #tax-view .tax-tab .tax-icon { display: none; } }
#tax-view .tax-form-detail .button, #tax-view .tax-ov-card .button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* ===== Formulare und Belege, zweite Runde (30.10.2026) ===== */
/* gemeinsame Bausteine */
#tax-view label:has(> input[type=checkbox]) { flex-direction: row-reverse; justify-content: flex-end; align-items: flex-start; gap: .65rem; line-height: 1.4; }
#tax-view input[type=checkbox] { accent-color: var(--k-accent, #8fb2ff); margin-top: .1rem; }
#tax-view details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .55rem; font-weight: 600; }
#tax-view details > summary::-webkit-details-marker { display: none; }
#tax-view details > summary::before { content: ''; width: .45rem; height: .45rem; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .25s var(--tx-ease); opacity: .7; }
#tax-view details[open] > summary::before { transform: rotate(45deg); }
#tax-view .tax-form-detail details, #tax-view .tax-tools > *, #tax-view [data-receipt-search], #tax-view section > details.card {
  border: 1px solid var(--tx-line); border-radius: 14px; background: color-mix(in srgb, var(--k-text, #fff) 2%, transparent); }
#tax-view .tax-form-detail details { padding: .7rem 1rem; margin: .5rem 0; }
#tax-view .tax-form-detail details[open] { padding-bottom: 1rem; }
#tax-view .error { color: var(--tx-bad); }

/* Formulare: Navigation | Anlage | Ergebnis */
#tax-view .tax-forms { grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr) minmax(16rem, 21rem); align-items: start; }
#tax-view .tax-right { gap: 1rem; }
#tax-view .tax-aside { display: grid; gap: 1rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; min-width: 0; }
#tax-view .tax-aside > .card { border-radius: 18px; border-color: var(--tx-line); padding: 1.1rem 1.2rem; }
#tax-view .tax-aside h3 { font-size: 1rem; margin: 0 0 .4rem; }
#tax-view .tax-aside .tax-step { font-size: .85rem; }
#tax-view .tax-aside .tax-step > span:first-child { color: var(--k-muted); }
#tax-view .tax-estimate .error { position: relative; margin: .5rem 0; padding: .55rem .7rem .55rem 2.1rem; border-radius: 10px; font-size: .85rem;
  background: color-mix(in srgb, var(--tx-warn) 10%, transparent); color: var(--k-text); }
#tax-view .tax-estimate .error::before { content: '!'; position: absolute; left: .6rem; top: .5rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .75rem; background: var(--tx-warn); color: #1b1200; }
#tax-view .tax-optimization .tax-hint strong { display: block; }

#tax-view .tax-tree h4 { display: flex; align-items: center; gap: .45rem; }
#tax-view .tax-tree h4 .tax-icon { width: .95rem; height: .95rem; opacity: .8; }
#tax-view .tax-form-button { align-items: flex-start; font-size: .92rem; }
#tax-view .tax-form-name { display: grid; gap: .35rem; min-width: 0; flex: 1; }
#tax-view .tax-form-progress { display: block; height: 3px; border-radius: 99px; background: var(--tx-line); overflow: hidden; }
#tax-view .tax-form-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--tx-good); transition: width .8s var(--tx-ease); }
#tax-view .tax-form-button[data-progress=none] .tax-form-progress { opacity: .5; }
#tax-view .tax-form-button .maturity { font-size: .66rem; padding: .05rem .4rem; }

#tax-view .tax-form-detail { padding: 1.4rem 1.5rem; border-radius: 20px; }
#tax-view .tax-form-head { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.1rem; margin-bottom: .8rem; border-bottom: 1px solid var(--tx-line); }
#tax-view .tax-form-badge { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border-radius: 14px; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-form-badge .tax-icon { width: 1.5rem; height: 1.5rem; }
#tax-view .tax-form-heading { flex: 1; min-width: 0; }
#tax-view .tax-form-heading h3 { margin: .1rem 0 .2rem; font-size: 1.3rem; }
#tax-view .tax-form-heading .help { margin: 0; }
#tax-view .tax-form-meter { display: grid; gap: .2rem; justify-items: end; min-width: 6.5rem; }
#tax-view .tax-form-meter strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
#tax-view .tax-form-meter span:not(.tax-form-progress) { font-size: .75rem; color: var(--k-muted); }
#tax-view .tax-form-meter .tax-form-progress { width: 100%; height: 5px; }
#tax-view .tax-form-detail > h4 { border-top: 0; padding-top: 0; }

#tax-view .tax-fieldset { margin: 1.4rem 0 0; }
#tax-view .tax-fieldset-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
#tax-view .tax-fieldset-head h4 { margin: 0; font-size: .95rem; flex: 1; }
#tax-view .tax-fieldset-mark { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 9px; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); font-weight: 800; font-family: Georgia, serif; }
#tax-view .tax-fieldset-count { font-size: .78rem; color: var(--k-muted); font-variant-numeric: tabular-nums; }
#tax-view .tax-fieldset[data-section=check] .tax-fieldset-mark { background: color-mix(in srgb, var(--tx-warn) 14%, transparent); color: var(--tx-warn); }
#tax-view .tax-fieldset > .help { margin: .5rem 0 0; font-size: .82rem; }
#tax-view .tax-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--tx-line); border-radius: 14px; overflow: hidden; }
#tax-view .tax-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem); column-gap: 1.2rem; row-gap: .2rem; align-items: start;
  padding: .75rem 1rem; border-top: 1px solid var(--tx-line); font-size: .92rem; transition: background .25s var(--tx-ease); }
#tax-view .tax-fields > .tax-field:first-child { border-top: 0; }
#tax-view .tax-fields > .tax-field[hidden] { display: none; }
#tax-view .tax-field:focus-within { background: var(--tx-soft); }
#tax-view .tax-field > .tax-field-name { grid-column: 1; font-weight: 600; display: flex; gap: .5rem; align-items: baseline; }
#tax-view .tax-field > .tax-field-name::before { content: ''; flex: none; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid var(--k-muted); opacity: .6; transform: translateY(-.05rem); }
#tax-view .tax-field[data-filled=true] > .tax-field-name::before { background: var(--tx-good); border-color: var(--tx-good); opacity: 1; }
#tax-view .tax-field > :is(input, select) { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
#tax-view .tax-field > small { grid-column: 1; font-size: .8rem; }
#tax-view .tax-grid:not(.tax-fields) > .tax-field { display: flex; flex-direction: column; padding: .2rem; border: 0; }

/* Belege */
#tax-view .tax-finder { padding: 1.3rem 1.4rem; border-radius: 20px; }
#tax-view .tax-finder > .help { margin: 0 0 .4rem; }
#tax-view .tax-run { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; padding: .9rem 1rem; margin-top: .6rem; border: 1px solid var(--tx-line); border-radius: 14px;
  background: color-mix(in srgb, var(--k-text, #fff) 2%, transparent); }
#tax-view .tax-run-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-run-icon .tax-icon { width: 1.3rem; height: 1.3rem; }
#tax-view .tax-run[data-stage=survey] .tax-run-icon, #tax-view .tax-run[data-stage=extracting] .tax-run-icon { animation: tax-think 1.4s ease-in-out infinite; }
#tax-view .tax-run[data-stage=ready] { border-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 40%, transparent); }
#tax-view .tax-run[data-stage=done] .tax-run-icon { background: color-mix(in srgb, var(--tx-good) 15%, transparent); color: var(--tx-good); }
#tax-view .tax-run-text { display: grid; gap: .2rem; min-width: 0; }
#tax-view .tax-run-info { color: var(--k-muted); font-size: .88rem; }
#tax-view .tax-run-progress { display: block; height: 4px; margin-top: .35rem; border-radius: 99px; background: var(--tx-line); overflow: hidden; }
#tax-view .tax-run-progress > i { display: block; height: 100%; background: var(--k-accent, #8fb2ff); transition: width .6s var(--tx-ease); }
#tax-view .tax-run .item-actions { justify-content: flex-end; align-items: center; }
#tax-view [data-receipt-search] { padding: .8rem 1.1rem; margin: 1rem 0; }
#tax-view .tax-chips { display: inline-flex; gap: .25rem; padding: .3rem; margin: .8rem 0 .3rem; border: 1px solid var(--tx-line); border-radius: 12px; background: var(--tx-card); }
#tax-view .tax-chips .button { border: 0; background: transparent; color: var(--k-muted); }
#tax-view .tax-chips .button[aria-current=page] { color: var(--k-text); }

#tax-view .tax-list { gap: 1rem; }
#tax-view .tax-item { position: relative; padding: 0; overflow: hidden; animation: tax-rise .45s var(--tx-ease) both; }
#tax-view .tax-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tx-warn); opacity: .85; }
#tax-view .tax-item.confirmed::before { background: var(--tx-good); }
#tax-view .tax-item.rejected::before { background: var(--k-muted); opacity: .4; }
#tax-view .tax-item-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1.1rem 1.25rem .9rem 1.4rem; }
#tax-view .tax-item-clip { display: grid; place-items: center; width: 2.6rem; height: 3.1rem; border-radius: 8px; color: var(--k-muted);
  background: linear-gradient(180deg, color-mix(in srgb, var(--k-text, #fff) 9%, transparent), color-mix(in srgb, var(--k-text, #fff) 3%, transparent));
  box-shadow: inset 0 0 0 1px var(--tx-line); transform-origin: 50% 0; transition: transform .4s var(--tx-ease), color .3s; }
#tax-view .tax-item-clip .tax-icon { width: 1.35rem; height: 1.35rem; transform: rotate(-12deg); }
#tax-view .tax-item:hover .tax-item-clip { transform: rotate(-6deg); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-item-title { display: grid; gap: .2rem; min-width: 0; }
#tax-view .tax-item-title h4 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
#tax-view .tax-item-title .item-time { margin: 0; font-size: .82rem; color: var(--k-muted); overflow-wrap: anywhere; }
#tax-view .tax-item-category { justify-self: start; margin-top: .25rem; padding: .15rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--tx-soft); color: var(--k-accent, #8fb2ff); }
#tax-view .tax-item-figure { display: grid; justify-items: end; gap: .3rem; }
#tax-view .tax-item-amount { font-size: 1.35rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
#tax-view .tax-item-status { padding: .12rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, var(--tx-warn) 15%, transparent); color: var(--tx-warn); }
#tax-view .tax-item.confirmed .tax-item-status { background: color-mix(in srgb, var(--tx-good) 15%, transparent); color: var(--tx-good); animation: tax-stamp .5s var(--tx-ease) both; }
#tax-view .tax-item.rejected .tax-item-status { background: var(--tx-line); color: var(--k-muted); }
#tax-view .tax-item-trust { display: inline-flex; gap: 2px; align-items: flex-end; height: .8rem; }
#tax-view .tax-item-trust > i { width: 4px; border-radius: 1px; background: var(--tx-line); }
#tax-view .tax-item-trust > i:nth-child(1) { height: 40%; } #tax-view .tax-item-trust > i:nth-child(2) { height: 70%; } #tax-view .tax-item-trust > i:nth-child(3) { height: 100%; }
#tax-view .tax-item-trust[data-level="1"] > i:nth-child(-n+1), #tax-view .tax-item-trust[data-level="2"] > i:nth-child(-n+2), #tax-view .tax-item-trust[data-level="3"] > i { background: var(--tx-good); }
#tax-view .tax-item-trust[data-level="1"] > i:nth-child(1) { background: var(--tx-warn); }
#tax-view .tax-item-body { padding: 0 1.25rem .4rem 1.4rem; }
#tax-view .tax-item-body > .tax-grid { grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: .8rem 1rem; margin: 0 0 .6rem; padding-top: .9rem; border-top: 1px dashed var(--tx-line); }
#tax-view .tax-item-body > .help { font-size: .84rem; margin: .4rem 0; }
#tax-view .tax-item > .item-actions { padding: .8rem 1.25rem .9rem 1.4rem; border-top: 1px solid var(--tx-line); background: color-mix(in srgb, var(--k-text, #fff) 2%, transparent); }
#tax-view .tax-item > .tax-source-options { padding: 0 1.25rem 1rem 1.4rem; }
#tax-view .tax-empty { display: grid; place-items: center; padding: 1.5rem 0 .2rem; }
#tax-view .tax-empty svg { width: 7.5rem; height: 7.5rem; animation: tax-float 4s ease-in-out infinite; }
#tax-view .tax-empty .paper { fill: color-mix(in srgb, var(--k-text, #fff) 6%, transparent); stroke: var(--tx-line); stroke-width: 2; }
#tax-view .tax-empty .lines { stroke: color-mix(in srgb, var(--k-text, #fff) 22%, transparent); stroke-width: 3; stroke-linecap: round; }
#tax-view .tax-empty .sum { stroke: var(--tx-good); stroke-width: 4; stroke-linecap: round; }
#tax-view .tax-empty .clip { fill: none; stroke: var(--k-accent, #8fb2ff); stroke-width: 3.5; stroke-linecap: round; }
#tax-view .tax-empty + p { text-align: center; }

@keyframes tax-stamp { 0% { transform: scale(1.6) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes tax-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) {
  #tax-view .tax-item, #tax-view .tax-item-status, #tax-view .tax-empty svg, #tax-view .tax-run-icon { animation: none !important; }
  #tax-view .tax-item-clip { transition: none; }
}
@media (max-width: 1280px) {
  #tax-view .tax-forms { grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr); }
  #tax-view .tax-aside { grid-column: 2; position: static; max-height: none; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }
}
@media (max-width: 760px) {
  #tax-view .tax-forms { grid-template-columns: minmax(0, 1fr); }
  #tax-view .tax-aside { grid-column: 1; }
  #tax-view .tax-field { grid-template-columns: minmax(0, 1fr); }
  #tax-view .tax-field > :is(input, select) { grid-column: 1; grid-row: auto; }
  #tax-view .tax-form-head { flex-wrap: wrap; }
  #tax-view .tax-form-meter { justify-items: start; width: 100%; }
  #tax-view .tax-run { grid-template-columns: auto minmax(0, 1fr); }
  #tax-view .tax-run .item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  #tax-view .tax-item-head { grid-template-columns: auto minmax(0, 1fr); }
  #tax-view .tax-item-figure { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; justify-items: start; }
  #tax-view .tax-chips { display: flex; }
  #tax-view .tax-chips .button { flex: 1; padding-inline: .3rem; }
  #tax-view .tax-form-detail { padding: 1.1rem; }
}
#tax-view .tax-form-button { flex-direction: column; gap: .3rem; }
#tax-view .tax-form-button .tax-form-name > span:first-child { overflow-wrap: break-word; hyphens: auto; }
#tax-view .tax-form-button .maturity { align-self: flex-start; }
#tax-view .tax-right > .tax-interview-panel { position: relative; padding: 1.1rem 1.3rem 1.1rem 1.5rem; border-radius: 18px; border-color: color-mix(in srgb, var(--k-accent, #8fb2ff) 30%, transparent);
  background: linear-gradient(100deg, var(--tx-soft), transparent 70%), var(--tx-card); }
#tax-view .tax-right > .tax-interview-panel::before { content: ''; position: absolute; left: 0; top: 1rem; bottom: 1rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--k-accent, #8fb2ff); }
#tax-view .tax-right > .tax-interview-panel h3 { margin-top: 0; font-size: 1rem; }
#tax-view .tax-interview-panel form > label { max-width: 32rem; }
#tax-view .tax-interview-panel form > .help { margin: 0; }
#tax-view .tax-interview-panel form > .button { justify-self: start; }
#tax-view .tax-interview-panel form { display: flex; flex-wrap: wrap; gap: .45rem; }
#tax-view .tax-interview-panel form > :not(.button) { flex: 1 1 100%; min-width: 0; }
#tax-view .tax-tools { display: grid; gap: .8rem; }
#tax-view .tax-tools > .card { padding: 1rem 1.2rem; border-radius: 16px; }
@media (max-width: 760px) {
  #tax-view .tax-tree { display: flex; gap: .4rem; overflow-x: auto; padding: 0 0 .4rem; scroll-snap-type: x proximity; max-height: none; }
  #tax-view .tax-tree h4 { display: none; }
  #tax-view .tax-tree .tax-form-button { flex: 0 0 13.5rem; scroll-snap-align: start; border-color: var(--tx-line); }
}
@media (max-width: 760px) { #tax-view .tax-form-badge { display: none; } }

/* Einheitliche Feldzeilen überall: Beschriftung und Hilfe links, Eingabe rechts in einer Flucht (Rückmeldung 30.10.2026) */
#tax-view .tax-grid { grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr)); gap: 0 2rem; align-items: start; }
#tax-view .tax-grid > label:not(:has(> input[type=checkbox])),
#tax-view .tax-grid:not(.tax-fields) > .tax-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 12.5rem); column-gap: 1rem; row-gap: .15rem;
  align-items: start; padding: .65rem 0; border-top: 1px solid var(--tx-line); font-size: .9rem; font-weight: 600; flex-direction: initial; }
#tax-view .tax-grid > label:not(:has(> input[type=checkbox])) > :is(input, select),
#tax-view .tax-grid > .tax-field > :is(input, select) { grid-column: 2; grid-row: 1 / span 2; align-self: start; width: 100%; }
#tax-view .tax-grid > label > :is(small, .help, .tax-field-name) { grid-column: 1; font-weight: 400; }
#tax-view .tax-grid > label > .tax-field-name { font-weight: 600; }
#tax-view .tax-grid > label > :is(textarea, input[type=file], .button, button, div, pre) { grid-column: 1 / -1; }
#tax-view .tax-grid > label:has(> input[type=checkbox]) { padding: .65rem 0; border-top: 1px solid var(--tx-line); font-size: .9rem; }
#tax-view .tax-grid > :is(.button, button, p, div:not(.tax-field)) { grid-column: 1 / -1; }
#tax-view .tax-grid > .button, #tax-view .tax-grid > button { justify-self: start; margin-top: .6rem; }
#tax-view .tax-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
#tax-view .tax-fields > .tax-field { padding: .75rem 1rem; }
#tax-view .tax-field > :is(input, select) { grid-row: 1 / span 2; align-self: start; }
#tax-view .tax-item-body > .tax-grid { grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr)); gap: 0 2rem; }
@media (max-width: 760px) {
  #tax-view .tax-grid > label:not(:has(> input[type=checkbox])), #tax-view .tax-grid > .tax-field { grid-template-columns: minmax(0, 1fr); }
  #tax-view .tax-grid > label > :is(input, select), #tax-view .tax-grid > .tax-field > :is(input, select) { grid-column: 1; grid-row: auto; }
}
#tax-view :is([data-certificate-review], [data-certificate-inbox], .tax-trip-editor, .tax-energy-object, .tax-snapshot-panel, [data-tax-record-panel]) .tax-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr)); gap: 0 2rem; }
/* Beschriftung auf Höhe der Eingabe; Hilfetexte darunter */
#tax-view .tax-grid > label:not(:has(> input[type=checkbox])), #tax-view .tax-grid > .tax-field { align-items: center; }
#tax-view .tax-grid > label > :is(input, select), #tax-view .tax-field > :is(input, select) { grid-row: 1; align-self: center; }
#tax-view .tax-grid > label > small, #tax-view .tax-field > small { align-self: start; }
@media (max-width: 760px) {
  #tax-view .tax-grid > label, #tax-view .tax-grid > .tax-field, #tax-view .tax-field { grid-template-columns: minmax(0, 1fr) !important; }
  #tax-view .tax-grid > label > :is(input, select), #tax-view .tax-field > :is(input, select) { grid-column: 1 !important; grid-row: auto !important; }
}
#tax-view .tax-grid > label > :is(input, select), #tax-view .tax-field > :is(input, select) { margin: 0; }
#tax-view .tax-grid > label > .tax-field-name, #tax-view .tax-field > .tax-field-name { grid-row: 1; align-self: center; }
#tax-view .tax-grid > label:not(:has(> input[type=checkbox])) > :is(input, select), #tax-view .tax-grid > .tax-field > :is(input, select) { grid-row: 1 / 2; }
#tax-view .tax-fields > label.tax-field:not(:has(> input[type=checkbox])) { padding: .6rem 1rem; margin: 0; min-height: 0; }

/* Erklärungen und zeilenweise Erfassung (30.10.2026) */
#tax-view .tax-guide { margin: 0 0 1rem; padding: 0; border: 1px solid color-mix(in srgb, #f5c86b 28%, transparent) !important; border-radius: 16px;
  background: linear-gradient(110deg, color-mix(in srgb, #f5c86b 9%, transparent), transparent 65%) !important; overflow: hidden; }
#tax-view .tax-guide > summary { padding: .8rem 1rem; gap: .6rem; }
#tax-view .tax-guide > summary::before { order: 3; margin-left: auto; }
#tax-view .tax-guide-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #f5c86b;
  background: color-mix(in srgb, #f5c86b 16%, transparent); box-shadow: 0 0 0 0 color-mix(in srgb, #f5c86b 40%, transparent); }
#tax-view .tax-guide[open] .tax-guide-mark { animation: tax-glow 2.6s ease-in-out 1; }
#tax-view .tax-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: .7rem; padding: 0 1rem 1rem; }
#tax-view .tax-guide-item { padding: .75rem .85rem; border-radius: 12px; background: color-mix(in srgb, var(--k-text, #fff) 3%, transparent); animation: tax-rise .45s var(--tx-ease) both; }
#tax-view .tax-guide-item:nth-child(2) { animation-delay: 60ms; } #tax-view .tax-guide-item:nth-child(3) { animation-delay: 120ms; } #tax-view .tax-guide-item:nth-child(4) { animation-delay: 180ms; }
#tax-view .tax-guide-item strong { display: flex; align-items: center; gap: .45rem; font-size: .84rem; margin-bottom: .3rem; }
#tax-view .tax-guide-item strong .tax-icon { color: var(--k-accent, #8fb2ff); }
#tax-view .tax-guide-item[data-kind=tip] { background: color-mix(in srgb, var(--tx-good) 9%, transparent); }
#tax-view .tax-guide-item[data-kind=tip] strong .tax-icon { color: var(--tx-good); }
#tax-view .tax-guide-item p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--k-muted); }

#tax-view .tax-info { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; margin-left: .15rem; padding: 0; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--k-muted); cursor: pointer; transition: color .2s, background .2s; }
#tax-view .tax-info:hover, #tax-view .tax-info[aria-expanded=true] { color: var(--k-accent, #8fb2ff); background: var(--tx-soft); }
#tax-view .tax-info .tax-icon { width: 1rem; height: 1rem; }
#tax-view .tax-field-help { padding: .45rem .6rem; border-radius: 8px; background: var(--tx-soft); color: var(--k-text) !important; animation: tax-rise .3s var(--tx-ease) both; }

#tax-view .tax-lines { margin: 0 0 1.2rem; }
#tax-view .tax-lines-note { display: flex; gap: .6rem; align-items: flex-start; margin: .2rem 0 .8rem; padding: .65rem .8rem; border-radius: 12px; font-size: .86rem;
  background: color-mix(in srgb, var(--tx-warn) 9%, transparent); }
#tax-view .tax-lines-bang { display: grid; place-items: center; flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%; font-weight: 800; font-size: .8rem; background: var(--tx-warn); color: #1b1200; }
#tax-view .tax-lines-list { border: 1px solid var(--tx-line); border-radius: 14px; overflow: hidden; margin-bottom: .8rem; }
#tax-view .tax-lines-list > .help { margin: 0; padding: .8rem 1rem; }
#tax-view .tax-line-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto auto auto; gap: .9rem; align-items: center; padding: .6rem 1rem; border-top: 1px solid var(--tx-line); animation: tax-rise .35s var(--tx-ease) both; }
#tax-view .tax-line-row:first-child { border-top: 0; }
#tax-view .tax-line-where { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--k-accent, #8fb2ff); font-weight: 700; }
#tax-view .tax-line-label { overflow-wrap: anywhere; }
#tax-view .tax-line-value { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
#tax-view .tax-icon-button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 8px; background: transparent; color: var(--k-muted); cursor: pointer; }
#tax-view .tax-icon-button:hover { color: var(--tx-bad); background: color-mix(in srgb, var(--tx-bad) 10%, transparent); }
#tax-view .tax-icon-button[data-armed=true] { color: #fff; background: var(--tx-bad); }
#tax-view .tax-lines-form { display: grid; grid-template-columns: 5rem 5rem minmax(0, 2fr) minmax(0, 1fr) auto auto auto; gap: .5rem; align-items: center; }
#tax-view .tax-lines-form > [hidden] { display: none; }
#tax-view .maturity.nur-erfassen { color: var(--tx-warn); background: color-mix(in srgb, var(--tx-warn) 12%, transparent); }
@keyframes tax-glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 8px color-mix(in srgb, #f5c86b 18%, transparent); } }
@media (prefers-reduced-motion: reduce) { #tax-view .tax-guide-item, #tax-view .tax-guide-mark, #tax-view .tax-line-row, #tax-view .tax-field-help { animation: none !important; } }
@media (max-width: 760px) {
  #tax-view .tax-lines-form { grid-template-columns: 1fr 1fr; }
  #tax-view .tax-lines-form > :is([name=label], [name=value], select, .button) { grid-column: 1 / -1; }
  #tax-view .tax-line-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  #tax-view .tax-line-where, #tax-view .tax-line-label { grid-column: 1 / -1; }
}
#tax-view .tax-form-detail details.tax-guide { padding: 0; margin: 0 0 1rem; }
#tax-view .tax-line-row .tax-link { font-size: .85rem; }
#tax-view .tax-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } @media (max-width: 760px) { #tax-view .tax-guide-grid { grid-template-columns: minmax(0, 1fr); } }

/* Tarvi UI system (13.10.2026): one look for every area. Loaded last in /ui/calendar.css.
   Selectors carry ":not(#voice-panel *)" on purpose: it keeps Tarvi Live's full-screen stage out and gives these rules
   the weight to win over the older layers (calendar.css, layout-modern.css, video-studio.css) without !important. */

:root {
  --k-bg: #060f19;
  --k-surface: rgba(12, 22, 34, .86);
  --k-surface-2: rgba(255, 255, 255, .045);
  --k-surface-3: rgba(255, 255, 255, .08);
  --k-line: rgba(255, 255, 255, .075);
  --k-line-strong: rgba(255, 255, 255, .13);
  --k-text: #eef4f9;
  --k-muted: #b0bfce;
  --k-faint: #6b7d8f;
  --k-accent: #62d2f0;
  --k-accent-hover: #86def5;
  --k-accent-ink: #03121c;
  --k-accent-soft: rgba(98, 210, 240, .14);
  --k-warn: #f5b25b;
  --k-danger: #ff8a8a;
  --k-radius: 16px;
  --k-radius-sm: 10px;
  --k-ease-out: cubic-bezier(.23, 1, .32, 1);
  --k-ease-in-out: cubic-bezier(.77, 0, .175, 1);
  /* the older layers read these: one accent everywhere instead of coral/orange */
  --m-warm: var(--k-accent);
  --m-hot: #ff6b81;
  --m-play: var(--k-accent);
}

/* Daylight only changes the page backdrop; translucent cards pick up a little of it.
   Blend two static layers instead of repainting gradients on every animation frame. */
:root { background: #040910; }
body {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(27, 91, 130, .06), transparent 53%),
    linear-gradient(135deg, #040910, #03080f 55%, #060d17);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(96, 164, 191, .10), transparent 53%),
    radial-gradient(ellipse at 100% 50%, rgba(64, 128, 151, .08), transparent 52%),
    linear-gradient(135deg, #29465d, #223c52 55%, #29485d);
  opacity: var(--tarvi-daylight, .35);
  transition: opacity 30s linear;
}
@media (prefers-reduced-motion: reduce) {
  body::before { transition: none; }
}
@media print {
  body::before { display: none; }
}

:is(#calendar-panel, #mail-panel, #documents-panel, #home-panel, #news-panel, #projects-panel, #workflows-panel, #chat-panel, #settings-panel, #media-panel, #tools-panel) {
  --m-warm: var(--k-accent); --m-play: var(--k-accent); --m-accent: var(--k-accent); --m-line: var(--k-line); --m-text: var(--k-text); --m-muted: var(--k-muted);
}

:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
#workspace input[type="checkbox"], #workspace input[type="radio"] { accent-color: var(--k-accent); }

/* ── Main navigation: one signal for the active area ─────────────────────────────── */
#workspace .tabs-bar { border-bottom-color: var(--k-line); }
#workspace .tabs-bar .tab {
  position: relative; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  color: var(--k-muted); font-weight: 600; letter-spacing: -.005em; transition: color 160ms ease;
}
#workspace .tabs-bar .tab.active { color: var(--k-text); background: transparent; box-shadow: none; }
#workspace .tabs-bar .tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--k-accent); }
#workspace .tabs-bar .tab:focus-visible { outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) { #workspace .tabs-bar .tab:hover { color: var(--k-text); background: transparent; } }
/* the 10px logo label below the bar was noise; all twelve areas need the full row (Tarvi Live has its own K) */
#workspace .tabs-bar .workspace-brand { display: none; }

/* ── Kicker above titles ─────────────────────────────────────────────────────────── */
#workspace .eyebrow:not(#voice-panel *) {
  margin-bottom: 6px; color: var(--k-accent); opacity: .85; font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
}

/* ── Cards ───────────────────────────────────────────────────────────────────────── */
#workspace .card:not(#voice-panel *) {
  padding: 22px 24px; border: 1px solid var(--k-line); border-radius: var(--k-radius); color: var(--k-text);
  background: var(--k-surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .18);
}
#workspace .card:not(#voice-panel *):hover { border-color: var(--k-line); }
#workspace .card:not(#voice-panel *) h2 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.015em; }
#workspace .card:not(#voice-panel *) h3 { font-weight: 650; }
#workspace .card:not(#voice-panel *) .section-head { align-items: flex-start; gap: 12px; }
#workspace .card:not(#voice-panel *) .section-head h2 { margin-bottom: 14px; }
/* buttons beside a card title stay small, so the title never wraps */
#workspace .card:not(#voice-panel *) > .section-head > .button,
#workspace .card:not(#voice-panel *) > .section-head > .item-actions > .button { min-height: 32px; padding: 0 12px; font-size: .8125rem; flex: none; }
#workspace .help:not(#voice-panel *), #workspace .footer-note:not(#voice-panel *) { color: var(--k-muted); }

/* ── Page header: same size and place in every area ──────────────────────────────── */
#workspace :is(section, div)[id$="-panel"]:not(#voice-panel) > .section-head h1,
#workspace :is(section, div)[id$="-panel"]:not(#voice-panel) > .section-head h2,
#workspace #tools-panel [id$="-view"] > .section-head h2,
#workspace .calendar-hero h1,
#workspace #media-panel .media-top h2:not(#voice-panel *) {
  margin: 0; color: var(--k-text); font-size: clamp(1.5rem, 2.2vw, 1.85rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em;
}
#workspace #tools-panel [id$="-view"] > .section-head,
#workspace :is(section, div)[id$="-panel"]:not(#voice-panel) > .section-head { align-items: flex-end; margin-bottom: 20px; gap: 16px; }
#workspace #tools-panel [id$="-view"] > .section-head .help { max-width: 70ch; margin: 6px 0 0; }
#workspace .calendar-hero:not(#voice-panel *) {
  padding: 0; margin-bottom: 20px; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
}
#workspace .calendar-hero::after { display: none; }
#workspace .calendar-hero-subtitle { margin-top: 6px; color: var(--k-muted); }

/* ── Buttons: two sizes, one shape, press feedback ───────────────────────────────── */
#workspace .button:not(#voice-panel *) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid var(--k-line-strong); border-radius: var(--k-radius-sm);
  color: var(--k-text); background: var(--k-surface-2); box-shadow: none; filter: none;
  font-size: .875rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.2;
  transition: transform 160ms var(--k-ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
#workspace .button.small:not(#voice-panel *) { min-height: 32px; padding: 0 12px; border-radius: 8px; font-size: .8125rem; }
#workspace .button.primary:not(#voice-panel *) { border-color: transparent; color: var(--k-accent-ink); background: var(--k-accent); box-shadow: none; }
#workspace .button.ghost:not(#voice-panel *) { color: var(--k-muted); background: transparent; }
#workspace .button.danger:not(#voice-panel *) { color: var(--k-danger); border-color: rgba(255, 138, 138, .32); background: rgba(255, 90, 90, .07); }
#workspace .button:not(#voice-panel *):active:not(:disabled) { transform: scale(.97); }
#workspace .button:not(#voice-panel *):disabled { opacity: .45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  #workspace .button:not(#voice-panel *):hover:not(:disabled) { color: var(--k-text); background: var(--k-surface-3); border-color: var(--k-line-strong); filter: none; }
  #workspace .button.primary:not(#voice-panel *):hover:not(:disabled) { color: var(--k-accent-ink); background: var(--k-accent-hover); border-color: transparent; }
  #workspace .button.danger:not(#voice-panel *):hover:not(:disabled) { color: #ffb0b0; background: rgba(255, 90, 90, .13); }
}

/* ── Sub-navigation: one segmented control for every area ────────────────────────── */
#workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .mail-folders, .media-views, .calendar-view-switch, .calls-tabs):not(#voice-panel *) {
  display: inline-flex; flex-wrap: nowrap; gap: 2px; width: auto; max-width: 100%; padding: 3px; margin-bottom: 20px;
  border: 1px solid var(--k-line); border-radius: 12px; background: rgba(0, 0, 0, .25);
  overflow-x: auto; scrollbar-width: none; grid-template-columns: none;
}
#workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .mail-folders, .media-views, .calendar-view-switch, .calls-tabs)::-webkit-scrollbar { display: none; }
#workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .mail-folders, .media-views, .calendar-view-switch, .calls-tabs):not(#voice-panel *) > :is(button, .button, .segment) {
  flex: 0 0 auto; min-width: 0; min-height: 32px; padding: 0 14px; border: 0; border-radius: 9px;
  color: var(--k-muted); background: transparent; box-shadow: none; white-space: nowrap;
  font-size: .8125rem; font-weight: 600; line-height: 1.2;
}
#workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .mail-folders, .media-views, .calendar-view-switch, .calls-tabs):not(#voice-panel *) > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"], .active) {
  color: var(--k-text); background: var(--k-surface-3); box-shadow: inset 0 0 0 1px var(--k-line);
}
/* Projekte › OpenCode marks the open view by a plain (non-ghost) button */
#workspace .opencode-switch:not(#voice-panel *) > .button:not(.ghost) { color: var(--k-text); background: var(--k-surface-3); box-shadow: inset 0 0 0 1px var(--k-line); }
@media (hover: hover) and (pointer: fine) {
  #workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .mail-folders, .media-views, .calendar-view-switch, .calls-tabs):not(#voice-panel *) > :is(button, .button, .segment):hover { color: var(--k-text); background: rgba(255, 255, 255, .05); }
}
#workspace .mail-folders:not(#voice-panel *) { display: flex; margin: 0 0 16px; }
#workspace .mail-folders:not(#voice-panel *) > .button { flex: 1 1 0; justify-content: center; }
#workspace .calendar-view-switch:not(#voice-panel *) { margin-bottom: 0; }
#workspace .settings-subnav:not(#voice-panel *) { margin-top: 0; }

/* ── Form fields ─────────────────────────────────────────────────────────────────── */
#workspace :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"]), select, textarea):not(#voice-panel *, #image-studio-view *, #cut-studio-view *, #cad-view *) {
  border: 1px solid var(--k-line-strong); border-radius: var(--k-radius-sm); color: var(--k-text); background: rgba(0, 0, 0, .28);
  font-weight: 400; transition: border-color 160ms ease, box-shadow 160ms ease;
}
#workspace :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"]), select):not(#voice-panel *, #image-studio-view *, #cut-studio-view *, #cad-view *) { min-height: 42px; }
#workspace :is(input, select, textarea):not(#voice-panel *)::placeholder { color: var(--k-faint); font-weight: 400; }
#workspace :is(input, select, textarea):not(#voice-panel *):focus-visible { outline: none; border-color: rgba(98, 210, 240, .6); box-shadow: 0 0 0 3px var(--k-accent-soft); }
#workspace label:not(#voice-panel *) { font-weight: 600; }

@media (max-width: 760px) {
  #workspace .card:not(#voice-panel *) { padding: 18px; }
  #workspace :is(.vs-subtabs, .settings-subnav, .opencode-switch, .segments, .media-views):not(#voice-panel *) { display: flex; width: 100%; }
  #workspace .settings-subnav:not(#voice-panel *) > .button { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  #workspace .button:not(#voice-panel *) { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
  #workspace .button:not(#voice-panel *):active { transform: none; }
}

/* ── Tarvi Live circle: pulsing light core inside a voice ring, drawn by live-neural.js ──── */
#workspace #voice-panel .voice-orb-ring { display: none; }
#workspace #voice-panel .voice-orb {
  opacity: 1; filter: none; background: none; border: 0; box-shadow: none; overflow: visible;
  transition: transform 160ms var(--k-ease-out);
  -webkit-tap-highlight-color: transparent;
}
#workspace #voice-panel .voice-orb:active { transform: scale(.97); }
/* the canvas is larger than the button: the voice ring reaches beyond the core */
#workspace #voice-panel .live-neural {
  position: absolute; left: 50%; top: 50%; width: 190%; height: 190%;
  transform: translate(-50%, -50%); pointer-events: none;
}
#workspace #voice-panel .voice-stage[data-orb-state="muted"] .live-neural { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #workspace #voice-panel .voice-orb { transition: none; } #workspace #voice-panel .voice-orb:active { transform: none; } }
/* a file or text dragged over the circle: Tarvi takes it */
#workspace #voice-panel .voice-orb-wrap.drop-ready .voice-orb { transform: scale(1.06); }
#workspace #voice-panel .voice-orb-wrap.drop-ready::after {
  content: attr(data-drop-label); position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%);
  white-space: nowrap; padding: 4px 12px; border-radius: 999px; font-size: .8125rem; color: var(--k-accent-ink); background: var(--k-accent);
  pointer-events: none;
}
#workspace #voice-panel .voice-orb-wrap.drop-ready { outline: 2px dashed var(--k-accent); outline-offset: 18px; border-radius: 50%; }

/* Dokumente: the Office card is inserted by script before the page header; the header stays on top */
#workspace #documents-panel:not([hidden]) { display: flex; flex-direction: column; }
#workspace #documents-panel > .section-head { order: -1; }

/* Office-Studio: the library actions follow the button system (first = primary); the editor bar stays a row */
#workspace #office-view .of-library .of-actions:not(#voice-panel *) { display: grid; gap: 6px; }
#workspace #office-view .of-library .of-actions:not(#voice-panel *) > button {
  min-height: 38px; padding: 0 14px; justify-content: flex-start; text-align: left; white-space: normal;
  border: 1px solid var(--k-line-strong); border-radius: var(--k-radius-sm); color: var(--k-text); background: var(--k-surface-2);
  box-shadow: none; font-size: .875rem; font-weight: 600; transition: transform 160ms var(--k-ease-out), background-color 160ms ease;
}
#workspace #office-view .of-library .of-actions:not(#voice-panel *) > button.of-primary { border-color: transparent; color: var(--k-accent-ink); background: var(--k-accent); }
#workspace #office-view .of-library .of-actions:not(#voice-panel *) > button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  #workspace #office-view .of-library .of-actions:not(#voice-panel *) > button:hover { background: var(--k-surface-3); }
  #workspace #office-view .of-library .of-actions:not(#voice-panel *) > button.of-primary:hover { background: var(--k-accent-hover); }
}

/* Tarvi Live: a faint pulsing frame around the whole screen while Tarvi speaks (live-neural.js sets --frame) */
.live-frame {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  opacity: calc(var(--frame, 0) * .55); transition: opacity 900ms ease;
}
.live-frame[data-on="0"] { opacity: 0; }
.live-frame i {
  position: absolute; inset: 0; display: block;
  box-shadow: inset 0 0 40px 2px rgba(98, 210, 240, .2), inset 0 0 130px 4px rgba(58, 138, 255, .12);
  animation: live-frame-pulse 5s ease-in-out infinite;
}
.live-frame[data-on="0"] i { animation: none; }
/* a touch of aqua beside the cyan, breathing half a beat later */
.live-frame i.accent {
  box-shadow: inset 0 0 70px 2px rgba(110, 232, 214, .16), inset 0 0 150px 4px rgba(110, 232, 214, .08);
  animation-delay: -2.5s;
}
@keyframes live-frame-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .live-frame i { animation: none; opacity: .6; } }

/* Mobile navigation: a single borderless control at the safe top-right edge. */
@media (max-width: 640px) {
  #workspace #tabs-menu { position: fixed; top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); z-index: 120; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  #workspace #tabs-menu-label { display: none; }
  #workspace #tarvi-tabs.open { position: fixed; top: calc(48px + env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); left: auto; transform: none; z-index: 121; max-height: calc(100dvh - 64px - env(safe-area-inset-top)); overflow-y: auto; overscroll-behavior: contain; }
  body:has(#workspace:not([hidden]) #tools-panel:not([hidden]) #fieldwork-view:not([hidden]) .fw-app[data-open="job"]) #tabs-menu { display: none; }
}


/* ── Phone app header (30.10.2026): app icon + wordmark left, menu right, on one line ─────────
   A fixed glass bar under the safe area; the burger keeps its fixed place and now sits centred in it. */
@media (max-width: 640px) {
  #workspace { --tarvi-phone-head: 56px; padding-top: calc(var(--tarvi-phone-head) + env(safe-area-inset-top, 0px)); }
  #workspace > .tabs-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 119; display: flex; align-items: center; justify-content: space-between;
    height: calc(var(--tarvi-phone-head) + env(safe-area-inset-top, 0px)); margin: 0; padding: env(safe-area-inset-top, 0px) 64px 0 max(16px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: linear-gradient(180deg, rgba(6, 13, 22, .92), rgba(6, 13, 22, .78));
    -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  }
  #workspace > .tabs-bar #brand-live:not([hidden]) {
    display: inline-flex; align-items: center; gap: 11px; height: 44px; margin: 0; padding: 0 6px 0 0; color: #eef7fc;
  }
  #workspace > .tabs-bar #brand-live .brand-mark {
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; animation: none;
    box-shadow: 0 0 0 1px rgba(140, 200, 255, .16), 0 6px 18px -4px rgba(40, 140, 255, .55);
  }
  #workspace > .tabs-bar #brand-live .brand-mark img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
  #workspace > .tabs-bar #brand-live .brand-wordmark {
    font-size: 17px; font-weight: 700; letter-spacing: .2em; color: #f2f8fc;
    background: linear-gradient(180deg, #ffffff, #b9d6ea); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  #workspace #tabs-menu {
    top: env(safe-area-inset-top, 0px); right: max(8px, env(safe-area-inset-right, 0px)); width: 48px; height: var(--tarvi-phone-head);
  }
  #workspace #tabs-menu .tabs-menu-icon, #workspace #tabs-menu .tabs-menu-icon::before, #workspace #tabs-menu .tabs-menu-icon::after {
    width: 20px; height: 1.75px; border-radius: 2px; background: #e8f3fa; transition: transform 220ms cubic-bezier(.2, .8, .2, 1), opacity 160ms ease;
  }
  #workspace #tabs-menu .tabs-menu-icon::before { top: -6.5px; }
  #workspace #tabs-menu .tabs-menu-icon::after { top: 6.5px; width: 13px; }
  #workspace #tabs-menu[aria-expanded="true"] .tabs-menu-icon { background: transparent; }
  #workspace #tabs-menu[aria-expanded="true"] .tabs-menu-icon::before { transform: translateY(6.5px) rotate(45deg); }
  #workspace #tabs-menu[aria-expanded="true"] .tabs-menu-icon::after { width: 20px; transform: translateY(-6.5px) rotate(-45deg); }
  @media (prefers-reduced-motion: reduce) { #workspace #tabs-menu .tabs-menu-icon::before, #workspace #tabs-menu .tabs-menu-icon::after { transition: none; } }

  /* the menu: a glass sheet under the header, quiet rows, the current area marked by a small accent bar */
  #workspace #tarvi-tabs.open {
    top: calc(var(--tarvi-phone-head) + env(safe-area-inset-top, 0px) + 6px); right: max(10px, env(safe-area-inset-right, 0px));
    width: min(286px, calc(100vw - 20px)); padding: 8px; gap: 1px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px;
    background: rgba(10, 18, 28, .9); -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
    animation: tarvi-menu-in 180ms cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes tarvi-menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
  @media (prefers-reduced-motion: reduce) { #workspace #tarvi-tabs.open { animation: none; } }
  #workspace #tarvi-tabs.open .tools-menu-brand { display: none; }
  #workspace #tarvi-tabs.open > .tab { padding: 11px 14px 11px 18px; font-size: 15px; font-weight: 550; color: #b8c8d4; }
  #workspace #tarvi-tabs.open > .tab.active { color: #fff; background: rgba(255, 255, 255, .05); }
  #workspace #tarvi-tabs.open > .tab.active::after { left: 6px; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  /* the Live screen does not repeat the wordmark under the header */
  #voice-panel .voice-overline { display: none; }
}
@media (max-width: 640px) {
  html[data-theme="light"] #workspace > .tabs-bar { border-bottom-color: rgba(10, 30, 50, .08); background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(250, 252, 254, .82)); }
  html[data-theme="light"] #workspace > .tabs-bar #brand-live .brand-wordmark { background: linear-gradient(180deg, #0c1d2c, #2c4a63); -webkit-background-clip: text; background-clip: text; }
  html[data-theme="light"] #workspace #tabs-menu .tabs-menu-icon, html[data-theme="light"] #workspace #tabs-menu .tabs-menu-icon::before,
  html[data-theme="light"] #workspace #tabs-menu .tabs-menu-icon::after { background: #10202d; }
  html[data-theme="light"] #workspace #tabs-menu[aria-expanded="true"] .tabs-menu-icon { background: transparent; }
  html[data-theme="light"] #workspace #tarvi-tabs.open { border-color: rgba(10, 30, 50, .08); background: rgba(255, 255, 255, .92); box-shadow: 0 24px 60px rgba(10, 30, 50, .18); }
  html[data-theme="light"] #workspace #tarvi-tabs.open > .tab { color: #4a5d6c; }
  html[data-theme="light"] #workspace #tarvi-tabs.open > .tab.active { color: #0c1d2c; background: rgba(10, 30, 50, .05); }
  html[data-theme="light"] #workspace #tarvi-tabs.open > .tab.tab-quick { color: #0c1d2c; }
}

/* Open dropdown lists of every <select>: the fields themselves are transparent, so without these colours the browser
   drew the light field text on its own white list (hard to read). */
select { color-scheme: dark; }
select option, select optgroup { background-color: #0f1d2b; color: #e9f2f9; }
select option:checked { background-color: #1e4258; color: #ffffff; }
select option:disabled { color: #7d90a3; }
html[data-theme="light"] select { color-scheme: light; }
html[data-theme="light"] select option, html[data-theme="light"] select optgroup { background-color: #ffffff; color: #152e46; }
html[data-theme="light"] select option:checked { background-color: #dbeefa; color: #0c1d2c; }

/* Tarvi am Rechner (DESKTOP_PLAN.md): open approvals, status view, desktop control. */
.tv-approvals { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 20px; border: 1px solid var(--k-line-strong);
  border-radius: var(--k-radius); background: var(--k-surface); color: var(--k-text); box-shadow: 0 24px 80px rgba(0, 0, 0, .45); overflow: auto; }
.tv-approvals::backdrop { background: rgba(2, 6, 12, .66); }
.tv-approvals-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tv-approvals-head h2 { margin: 0; font-size: 1.3rem; }
.tv-approvals-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.tv-approval { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--k-line);
  border-radius: var(--k-radius-sm); background: var(--k-surface-2); }
.tv-approval-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tv-approval-source { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--k-accent); }
.tv-approval-detail, .tv-approval time { font-size: .85rem; color: var(--k-muted); }
.tv-approval-empty { color: var(--k-muted); padding: 8px 2px; }

/* Tools › Rechner */
#dk-view .section-head .item-actions { align-items: center; flex-wrap: wrap; }
.dk-cards { display: grid; gap: 12px; margin: 12px 0; }
.dk-cards:empty { display: none; }
.dk-card { border: 1px solid var(--k-warn); }
.dk-card h3 { margin: 0 0 8px; }
.dk-facts { display: grid; grid-template-columns: minmax(70px, 110px) minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; }
.dk-facts dt { color: var(--k-muted); }
.dk-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dk-task-card { margin: 12px 0; }
.dk-task-form { display: grid; gap: 8px; }
.dk-task-form textarea { width: 100%; box-sizing: border-box; }
.dk-tasks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.dk-task { padding: 10px 12px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); background: var(--k-surface-2); }
.dk-task-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; overflow-wrap: anywhere; }
.dk-task-state { color: var(--k-muted); font-size: .85rem; white-space: nowrap; }
.dk-task.running .dk-task-state, .dk-task.waiting .dk-task-state { color: var(--k-accent); }
.dk-task.failed .dk-task-state { color: var(--k-danger); }
.dk-task-steps { margin: 6px 0 8px; padding-left: 18px; color: var(--k-muted); font-size: .85rem; }
.dk-stage img { width: 100%; height: auto; display: block; }

/* Statusanzeige */
.tv-board { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: max(20px, env(safe-area-inset-top)) 20px 20px;
  box-sizing: border-box; border: 0; background: var(--k-bg); color: var(--k-text); }
.tv-board[open] { display: flex; flex-direction: column; gap: 16px; }
.tv-board::backdrop { background: var(--k-bg); }
.tv-board-head { display: flex; align-items: center; justify-content: space-between; }
.tv-board-clock { font-size: clamp(2.4rem, 9vw, 5rem); font-weight: 300; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.tv-board-list { flex: 1; overflow: auto; display: grid; gap: 14px; align-content: start; }
.tv-board-card { padding: 16px 18px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); overflow-wrap: anywhere; }
.tv-board-card h2 { margin: 0 0 4px; font-size: 1.25rem; }
.tv-board-card.desktop, .tv-board-card.desktop_task { border-color: var(--k-accent); }
.tv-board-detail { margin: 0 0 8px; color: var(--k-muted); }
.tv-board-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tv-board-steps li { display: flex; gap: 10px; font-size: .95rem; }
.tv-board-steps time { color: var(--k-muted); font-variant-numeric: tabular-nums; flex: none; }
.tv-board-steps li:first-child span { color: var(--k-text); font-weight: 600; }
.tv-board-idle { display: grid; justify-items: center; gap: 18px; padding: 8vh 0; color: var(--k-muted); text-align: center; }
.tv-board-orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--k-accent-soft), transparent 70%);
  box-shadow: 0 0 60px var(--k-accent-soft); animation: tv-breathe 6s var(--k-ease-in-out) infinite; }
@keyframes tv-breathe { 50% { transform: scale(1.08); opacity: .75; } }
.tv-board-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-board-stop { min-width: 160px; min-height: 64px; border: 0; border-radius: 999px; background: var(--k-danger); color: #fff; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.tv-board-stop.quiet { background: var(--k-surface-2); color: var(--k-muted); font-size: 1rem; min-height: 48px; }
.tv-board-note { margin: 0; color: var(--k-muted); }
@media (prefers-reduced-motion: reduce) { .tv-board-orb { animation: none; } }
.dk-programs { margin: 12px 0; }
.dk-programs summary { cursor: pointer; font-weight: 600; }
.dk-program-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.dk-program.fixed { color: var(--k-muted); }
.dk-program small { margin-left: 6px; color: var(--k-muted); }

/* Projekte (23.10.2026): one frame for Übersicht, Projekte, Team, Agenten and OpenCode.
   Loaded after ui-system.css. Motion: only transform and opacity, ease-out for things that appear, 160–280 ms,
   press feedback on everything pressable, hover only for fine pointers, reduced motion keeps fades only. */

#projects-panel {
  --pj-ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --pj-row: rgba(255, 255, 255, .035);
}

/* ── Header ─────────────────────────────────────────────────────────────────────── */
#workspace #projects-panel .pj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
#workspace #projects-panel .pj-title h2 { margin: 0; color: var(--k-text); font-size: clamp(1.5rem, 2.2vw, 1.85rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
#workspace #projects-panel .pj-summary { min-height: 1.3em; margin: 6px 0 0; color: var(--k-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pj-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── One navigation for the whole area ─────────────────────────────────────────── */
#workspace #projects-panel .pj-nav { margin-bottom: 18px; }
#workspace #projects-panel .pj-nav > .segment { transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--k-ease-out); }
#workspace #projects-panel .pj-nav > .segment:active { transform: scale(.97); }
#workspace #projects-panel .opencode-count { min-width: 1.25rem; margin-left: 6px; padding: 0 6px; border-radius: 999px; color: var(--k-accent-ink); background: var(--k-warn); font-size: .7rem; font-weight: 700; line-height: 1.25rem; }

/* a view fades in when it is switched to (not on data refreshes: those rebuild content without moving it) */
#workspace #projects-panel [role="tabpanel"]:not([hidden]) {
  animation: pj-in 180ms var(--k-ease-out);
}
@keyframes pj-in { from { opacity: 0; transform: translateY(4px); } }

/* ── Projekte: list on the left, one project on the right ──────────────────────── */
#workspace #projects-panel .pj-split { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
#workspace #projects-panel .pj-rail {
  position: sticky; top: 12px; display: grid; gap: 12px; padding: 14px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface);
}
#workspace #projects-panel .pj-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#workspace #projects-panel .pj-rail-head h2 { margin: 0; font-size: .95rem; font-weight: 650; }
#workspace #projects-panel .pj-rail-list { display: grid; gap: 4px; }
#workspace #projects-panel .pj-rail-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 12px; color: var(--k-text); background: transparent; font: inherit; text-align: left; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--k-ease-out);
}
#workspace #projects-panel .pj-rail-item:active { transform: scale(.98); }
#workspace #projects-panel .pj-rail-item[aria-current="true"] { border-color: rgba(98, 210, 240, .32); background: var(--k-accent-soft); }
#workspace #projects-panel .pj-rail-item:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
#workspace #projects-panel .pj-rail-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
#workspace #projects-panel .pj-rail-meta { grid-column: 1 / -1; color: var(--k-faint); font-size: .78rem; }
#workspace #projects-panel .project-health.is-compact { padding: 2px 8px; font-size: .7rem; }
#workspace #projects-panel .project-health.is-compact .project-health-dot { width: 7px; height: 7px; flex-basis: 7px; }
#workspace #projects-panel .pj-access { padding-top: 10px; border-top: 1px solid var(--k-line); font-size: .875rem; }
#workspace #projects-panel .pj-access > summary { color: var(--k-muted); cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  #workspace #projects-panel .pj-rail-item:hover:not([aria-current="true"]) { background: var(--pj-row); }
}

#workspace #projects-panel .pj-detail { min-width: 0; }
#workspace #projects-panel .pj-cards > .project-card,
#workspace #projects-panel .pj-cards > details.item {
  padding: 20px 22px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface);
}
#workspace #projects-panel .project-card-head { margin-bottom: 14px; }
#workspace #projects-panel .project-card-head h3 { font-size: 1.3rem; letter-spacing: -.02em; }
#workspace #projects-panel .project-card > .button { margin: 0 8px 4px 0; }
/* sections of a project read as one list of rows, not a stack of boxes */
#workspace #projects-panel .project-card > details { margin: 0; border-top: 1px solid var(--k-line); }
#workspace #projects-panel .project-card > details:first-of-type { margin-top: 12px; }
#workspace #projects-panel .project-card > details > summary {
  display: flex; align-items: center; gap: 10px; padding: 13px 2px; list-style: none; font-weight: 600; cursor: pointer;
}
#workspace #projects-panel .project-card > details > summary::-webkit-details-marker { display: none; }
#workspace #projects-panel .project-card > details > summary::before { content: none; }
#workspace #projects-panel .project-card > details > summary,
#workspace #projects-panel .project-card > details > summary strong { font-size: .95rem; line-height: 1.35; }
#workspace #projects-panel .project-card > details[open] > summary { margin-bottom: 0; }
#workspace #projects-panel .project-card > details > summary::after {
  content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--k-faint); border-bottom: 1.5px solid var(--k-faint);
  transform: rotate(-45deg); transition: transform 180ms var(--k-ease-out);
}
#workspace #projects-panel .project-card > details[open] > summary::after { transform: rotate(45deg); }
#workspace #projects-panel .project-card > details > .item-list { margin: 0 0 14px; }
#workspace #projects-panel .project-card > details > summary:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; border-radius: 6px; }

/* ── Side sheets: new order and project lead chat ──────────────────────────────── */
#workspace #projects-panel .pj-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(2, 6, 12, .55); opacity: 0; transition: opacity 200ms ease;
}
#workspace #projects-panel .pj-backdrop.is-open { opacity: 1; }
#workspace #projects-panel .pj-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; display: flex; flex-direction: column; gap: 12px;
  width: min(480px, 100vw); padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--k-line-strong); background: #0b1622; box-shadow: -24px 0 60px rgba(0, 0, 0, .35);
  transform: translateX(100%); visibility: hidden;
  /* closing is quicker than opening */
  transition: transform 200ms var(--k-ease-out), visibility 0s linear 200ms;
}
#workspace #projects-panel .pj-sheet[data-open="true"] {
  transform: none; visibility: visible; transition: transform 280ms var(--pj-ease-drawer), visibility 0s;
}
#workspace #projects-panel .pj-sheet-head,
#workspace #projects-panel .pj-sheet .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#workspace #projects-panel .pj-sheet h2 { margin: 0; font-size: 1.2rem; }
#workspace #projects-panel .pj-sheet-tools { display: flex; gap: 6px; }
#workspace #projects-panel .pj-sheet .device-form { display: grid; gap: 8px; }
#workspace #projects-panel .pj-sheet .device-form > .button.primary { margin-top: 8px; }
#workspace #projects-panel .pj-sheet > #code-refresh { align-self: flex-start; }
#workspace #projects-panel .pj-sheet :is(#code-deploy-label, #code-commit-label):not([hidden]) {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; color: var(--k-muted); font-weight: 500; line-height: 1.4;
}
#workspace #projects-panel .pj-sheet :is(#code-deploy, #code-commit) { flex: none; margin: 3px 0 0; }
/* the chat card lives inside its sheet without a second frame */
#workspace #projects-panel .pj-sheet > .project-chat { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#workspace #projects-panel .project-chat-messages { max-height: none; }

/* ── Team ───────────────────────────────────────────────────────────────────────── */
#workspace #projects-panel .tm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
#workspace #projects-panel .tm-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--k-line); border-radius: 10px; background: rgba(0, 0, 0, .2); }
#workspace #projects-panel .tm-tab {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--k-muted); background: transparent; font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--k-ease-out);
}
#workspace #projects-panel .tm-tab:active { transform: scale(.97); }
#workspace #projects-panel .tm-tab[aria-pressed="true"] { color: var(--k-text); background: var(--k-surface-3); box-shadow: inset 0 0 0 1px var(--k-line); }
#workspace #projects-panel .tm-tab:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 1px; }
#workspace #projects-panel .tm-status:empty { display: none; }
#workspace #projects-panel .tm-status { margin: -4px 0 12px; }

#workspace #projects-panel .tm-split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
#workspace #projects-panel .tm-people { display: grid; gap: 6px; }
#workspace #projects-panel .tm-person {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; width: 100%; padding: 12px;
  border: 1px solid var(--k-line); border-radius: 14px; color: var(--k-text); background: var(--k-surface); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--k-ease-out);
}
#workspace #projects-panel .tm-person:active { transform: scale(.98); }
#workspace #projects-panel .tm-person[aria-current="true"] { border-color: rgba(98, 210, 240, .4); background: linear-gradient(var(--k-accent-soft), var(--k-accent-soft)), var(--k-surface); }
#workspace #projects-panel .tm-person:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
#workspace #projects-panel .tm-person.is-inactive { opacity: .6; }
@media (hover: hover) and (pointer: fine) {
  #workspace #projects-panel .tm-person:hover:not([aria-current="true"]) { border-color: var(--k-line-strong); }
}
#workspace #projects-panel .tm-avatar {
  grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: hsl(var(--tm-hue) 70% 86%); background: hsl(var(--tm-hue) 45% 26%); font-size: .8rem; font-weight: 700; letter-spacing: .02em;
}
#workspace #projects-panel .tm-person-text { display: grid; min-width: 0; }
#workspace #projects-panel .tm-person-name { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
#workspace #projects-panel .tm-person-title { overflow: hidden; color: var(--k-muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
#workspace #projects-panel .tm-person-facts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
#workspace #projects-panel .tm-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--k-line); border-radius: 999px; color: var(--k-muted);
  font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
#workspace #projects-panel .tm-weeks { grid-column: 2; display: flex; align-items: flex-end; gap: 3px; height: 18px; margin-top: 4px; }
#workspace #projects-panel .tm-week {
  flex: 1; height: 100%; border-radius: 2px; background: var(--k-accent); opacity: .55;
  transform: scaleY(var(--tm-fill)); transform-origin: bottom;
}

#workspace #projects-panel .tm-detail { display: grid; gap: 14px; min-width: 0; padding: 20px 22px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workspace #projects-panel .tm-empty-detail { color: var(--k-muted); }
#workspace #projects-panel .tm-detail-head { display: flex; align-items: center; gap: 10px; }
#workspace #projects-panel .tm-detail-head h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
#workspace #projects-panel .tm-sec { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--k-line); }
#workspace #projects-panel .tm-sec:first-of-type { padding-top: 0; border-top: 0; }
#workspace #projects-panel .tm-sec-head h3 { margin: 0; font-size: 1rem; }
#workspace #projects-panel .tm-sec-head .help { margin: 4px 0 0; font-size: .82rem; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 12px; align-items: end; }
#workspace #projects-panel .tm-grid .is-wide { grid-column: 1 / -1; }
#workspace #projects-panel .tm-field { display: grid; gap: 5px; margin: 0; font-size: .78rem; color: var(--k-muted); }
#workspace #projects-panel .tm-field > :is(input, select, textarea) { width: 100%; min-width: 0; font-size: .9rem; }
#workspace #projects-panel .tm-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; font-weight: 500; color: var(--k-muted); }
#workspace #projects-panel .tm-check > input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--k-accent); }
#workspace #projects-panel .tm-grid > .tm-check { grid-column: 1 / -1; justify-self: start; }
#workspace #projects-panel .tm-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
#workspace #projects-panel .tm-actions .tm-field { min-width: 150px; }

#workspace #projects-panel .tm-days { display: grid; grid-template-columns: repeat(7, minmax(52px, 1fr)) auto; gap: 6px; align-items: end; }
#workspace #projects-panel .tm-day { display: grid; gap: 4px; margin: 0; color: var(--k-muted); font-size: .72rem; text-align: center; }
#workspace #projects-panel .tm-day input { min-height: 38px; padding: 0 4px; text-align: center; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .tm-total { align-self: center; padding: 0 4px 0 8px; color: var(--k-text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

#workspace #projects-panel :is(.tm-history, .tm-skills, .tm-absences, .tm-catalog) { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
#workspace #projects-panel :is(.tm-history, .tm-skills, .tm-absences, .tm-catalog) > li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 44px; padding: 6px 10px; border-radius: 10px; background: var(--pj-row);
}
#workspace #projects-panel :is(.tm-history, .tm-absences, .tm-catalog) > li > :last-child { margin-left: auto; }
#workspace #projects-panel .tm-absences > li.is-past { opacity: .55; }
#workspace #projects-panel .tm-when { min-width: 7em; color: var(--k-muted); font-variant-numeric: tabular-nums; }
#workspace #projects-panel .tm-skill-name { min-width: 8em; font-weight: 600; }
#workspace #projects-panel .tm-skills .tm-remove { margin-left: auto; min-width: 32px; }
#workspace #projects-panel .tm-levels { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
#workspace #projects-panel .tm-level {
  width: 30px; height: 28px; border: 0; border-radius: 6px; color: var(--k-muted); background: transparent; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms var(--k-ease-out);
}
#workspace #projects-panel .tm-level:active { transform: scale(.94); }
#workspace #projects-panel .tm-level[aria-checked="true"] { color: var(--k-accent-ink); background: var(--k-accent); }
#workspace #projects-panel .tm-level:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 1px; }
#workspace #projects-panel .tm-kind { min-width: 6.5em; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 650; text-align: center; color: var(--k-text); background: var(--k-surface-3); }
#workspace #projects-panel .tm-kind.is-vacation { color: #bfe9ff; background: rgba(98, 180, 240, .18); }
#workspace #projects-panel .tm-kind.is-training { color: #d6ccff; background: rgba(150, 130, 240, .18); }
#workspace #projects-panel .tm-kind.is-sick { color: #ffd0b8; background: rgba(240, 150, 100, .16); }
#workspace #projects-panel .button.is-armed { color: var(--k-danger); border-color: rgba(255, 138, 138, .4); }
#workspace #projects-panel .tm-danger { color: var(--k-danger); }

#workspace #projects-panel .tm-stack { display: grid; gap: 16px; }
#workspace #projects-panel .tm-card { display: grid; align-content: start; gap: 12px; padding: 20px 22px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workspace #projects-panel .tm-card > h3 { margin: 0; font-size: 1.05rem; }
#workspace #projects-panel .tm-card > .button { justify-self: start; }
#workspace #projects-panel .tm-card > .help { margin: -6px 0 0; font-size: .85rem; }
#workspace #projects-panel .tm-empty { padding: 24px; border: 1px dashed var(--k-line-strong); border-radius: var(--k-radius); }

#workspace #projects-panel :is(.tm-matrix-scroll, .tm-cal-scroll) { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 -4px; padding: 0 4px; }
#workspace #projects-panel .tm-matrix { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
#workspace #projects-panel .tm-matrix :is(th, td) { padding: 8px 12px; border-bottom: 1px solid var(--k-line); text-align: center; white-space: nowrap; }
#workspace #projects-panel .tm-matrix th[scope="row"], #workspace #projects-panel .tm-cal th[scope="row"] {
  position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 600; background: #0c1824;
}
#workspace #projects-panel .tm-matrix thead th { color: var(--k-muted); font-weight: 600; vertical-align: bottom; }
#workspace #projects-panel .tm-matrix thead th > span { display: block; }
#workspace #projects-panel .tm-bottleneck { margin-top: 4px; color: var(--k-warn); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
#workspace #projects-panel .tm-dots { display: inline-flex; gap: 3px; }
#workspace #projects-panel .tm-dots > span { width: 7px; height: 7px; border-radius: 50%; background: var(--k-surface-3); }
#workspace #projects-panel .tm-dots > .is-on { background: var(--k-accent); }
#workspace #projects-panel .tm-grow { margin-left: 4px; color: var(--k-warn); font-weight: 700; }
#workspace #projects-panel .tm-none { color: var(--k-faint); }
#workspace #projects-panel .tm-role-skills { display: flex; flex-wrap: wrap; gap: 6px; }
#workspace #projects-panel .tm-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--k-line); border-radius: 999px; font-size: .8rem; transition: border-color 160ms ease; }
#workspace #projects-panel .tm-pick.is-on { border-color: rgba(98, 210, 240, .45); }
#workspace #projects-panel .tm-pick select { min-height: 28px; padding: 0 6px; border-radius: 999px; font-size: .8rem; }

#workspace #projects-panel .tm-cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
#workspace #projects-panel .tm-cal-head h3 { margin: 0; font-size: 1.05rem; }
#workspace #projects-panel .tm-cal-nav { display: flex; gap: 4px; }
#workspace #projects-panel .tm-cal { border-collapse: separate; border-spacing: 2px; font-size: .74rem; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .tm-cal thead th { min-width: 30px; padding: 2px 0 6px; color: var(--k-faint); font-weight: 600; }
#workspace #projects-panel .tm-cal thead th > span { display: block; }
#workspace #projects-panel .tm-cal thead th.is-monday { box-shadow: inset 1px 0 0 var(--k-line-strong); }
#workspace #projects-panel .tm-cal thead th.is-today { color: var(--k-accent); }
#workspace #projects-panel .tm-cal th[scope="row"] { padding-right: 12px; font-size: .82rem; }
#workspace #projects-panel .tm-cal td { height: 30px; min-width: 30px; border-radius: 6px; text-align: center; color: var(--k-muted); }
#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-free { color: #c9f1ff; background: rgba(98, 210, 240, .16); }
#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-partial { color: #c9f1ff; background: repeating-linear-gradient(135deg, rgba(98, 210, 240, .18) 0 4px, rgba(98, 210, 240, .07) 4px 8px); }
#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-away { color: #ffd9a8; background: rgba(245, 178, 91, .2); }
#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-holiday { color: #d6ccff; background: rgba(150, 130, 240, .2); }
#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-off { background: rgba(255, 255, 255, .025); }
#workspace #projects-panel .tm-cal td.is-today { box-shadow: inset 0 0 0 1.5px var(--k-accent); }
#workspace #projects-panel .tm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--k-muted); font-size: .78rem; }
#workspace #projects-panel .tm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
#workspace #projects-panel .tm-swatch { width: 14px; height: 14px; border-radius: 4px; }

/* ── Planung ─────────────────────────────────────────────────────────────────── */
#workspace #projects-panel .pl-main { display: grid; gap: 12px; min-width: 0; }
/* while Tarvi plans or saves, buttons wait visibly instead of swallowing clicks */
#workspace #projects-panel #plan-view[aria-busy="true"] :is(.button, .tm-tab, .pl-bar) { opacity: .6; cursor: progress; transition: opacity 160ms ease; }
#workspace #projects-panel .pl-project { display: grid; gap: 14px; }
#workspace #projects-panel .pl-portfolio-button[aria-pressed="true"] { color: var(--k-text); background: var(--k-accent-soft); }
#workspace #projects-panel .pl-state.is-active { color: #8fe4b0; border-color: rgba(75, 195, 122, .32); }
#workspace #projects-panel .pl-state.is-active .project-health-dot { background: #49d17d; }
#workspace #projects-panel .pl-state.is-done .project-health-dot { background: var(--k-accent); }
#workspace #projects-panel .pl-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: start; padding: 18px 20px;
  border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workspace #projects-panel .pl-title h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
#workspace #projects-panel .pl-title .help { margin: 4px 0 0; font-size: .85rem; }
#workspace #projects-panel .pl-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
#workspace #projects-panel :is(.pl-kpis, .pl-cost-cards) { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; }
#workspace #projects-panel .pl-kpi { padding: 10px 12px; border-radius: 12px; background: var(--pj-row); }
#workspace #projects-panel .pl-kpi dt { color: var(--k-faint); font-size: .72rem; font-weight: 600; }
#workspace #projects-panel .pl-kpi dd { margin: 2px 0 0; color: var(--k-text); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-kpi.is-good dd { color: #8fe4b0; }
#workspace #projects-panel .pl-kpi.is-warn dd { color: var(--k-warn); }
#workspace #projects-panel .pl-kpi.is-bad dd { color: var(--k-danger); }
#workspace #projects-panel .pl-tabs { justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

#workspace #projects-panel .pl-warnings { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid rgba(245, 178, 91, .3); border-radius: 12px; background: rgba(245, 178, 91, .07); }
#workspace #projects-panel .pl-warnings p { margin: 0; color: #f6cf98; font-size: .85rem; }
#workspace #projects-panel .pl-questions { margin: 0; padding-left: 1.2em; color: var(--k-muted); }
#workspace #projects-panel .pl-wbs { display: grid; gap: 2px; }
#workspace #projects-panel .pl-row { border-radius: 10px; }
#workspace #projects-panel .pl-row.is-open { background: var(--pj-row); }
#workspace #projects-panel .pl-row-line {
  display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 2px 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
  color: var(--k-text); background: transparent; font: inherit; text-align: left; cursor: pointer;
  transition: background-color 140ms ease, transform 140ms var(--k-ease-out);
}
#workspace #projects-panel .pl-row-line:active { transform: scale(.99); }
#workspace #projects-panel .pl-row-line:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  #workspace #projects-panel .pl-row-line:hover { background: var(--pj-row); }
}
#workspace #projects-panel .pl-code { color: var(--k-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-row-title { font-weight: 600; }
#workspace #projects-panel .pl-row-meta { grid-column: 2; color: var(--k-muted); font-size: .78rem; }
#workspace #projects-panel .pl-row.is-phase > .pl-row-line { margin-top: 6px; }
#workspace #projects-panel .pl-row.is-phase .pl-row-title { font-size: 1rem; font-weight: 700; }
#workspace #projects-panel .pl-row.is-milestone .pl-row-title::before { content: "◆ "; color: var(--k-accent); }
#workspace #projects-panel .pl-editor { padding: 6px 10px 14px; }
#workspace #projects-panel .pl-skills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#workspace #projects-panel .pl-skills > select { min-height: 30px; width: auto; padding: 0 8px; border-radius: 999px; font-size: .8rem; }
#workspace #projects-panel .pl-label { color: var(--k-muted); font-size: .78rem; font-weight: 600; }
#workspace #projects-panel .tm-pick.is-missing { border-color: rgba(245, 178, 91, .5); color: #f6cf98; }
#workspace #projects-panel .pl-chip-x { width: 24px; height: 24px; border: 0; border-radius: 50%; color: var(--k-muted); background: transparent; cursor: pointer; }
#workspace #projects-panel .pl-score { min-width: 2.2em; padding: 2px 6px; border-radius: 6px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-score.is-good { color: #8fe4b0; background: rgba(73, 209, 125, .12); }
#workspace #projects-panel .pl-score.is-warn { color: var(--k-warn); background: rgba(245, 178, 91, .12); }
#workspace #projects-panel .pl-score.is-bad { color: var(--k-danger); background: rgba(255, 138, 138, .12); }

#workspace #projects-panel .pl-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
#workspace #projects-panel .pl-variant { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#workspace #projects-panel .pl-variant.is-current { border-color: rgba(98, 210, 240, .45); }
#workspace #projects-panel .pl-variant h4 { margin: 0; font-size: 1rem; }
#workspace #projects-panel .pl-variant .eyebrow { margin: 0; }
#workspace #projects-panel .pl-variant-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
#workspace #projects-panel .pl-variant-kpis dt { color: var(--k-faint); font-size: .72rem; }
#workspace #projects-panel .pl-variant-kpis dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-conflicts { display: grid; gap: 4px; margin: 0; padding-left: 1.1em; color: #f6cf98; font-size: .82rem; }
#workspace #projects-panel .pl-conflicts strong { font-weight: 600; }

/* Gantt: one column of names, one lane per package; widths in days × --pl-px */
#workspace #projects-panel .pl-gantt-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 -6px; padding: 0 6px 6px; }
#workspace #projects-panel .pl-gantt { --pl-label: 260px; position: relative; width: max-content; min-width: 100%; }
#workspace #projects-panel :is(.pl-scale, .pl-grow) { display: grid; grid-template-columns: var(--pl-label) calc(var(--pl-days) * var(--pl-px)); }
#workspace #projects-panel .pl-label-col { position: sticky; left: 0; z-index: 2; display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; gap: 0 6px;
  padding: 4px 10px 4px 0; background: #0c1824; }
#workspace #projects-panel .pl-glabel { overflow: hidden; font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#workspace #projects-panel .pl-gwho { grid-column: 2; overflow: hidden; color: var(--k-faint); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
#workspace #projects-panel .pl-grow.is-phase .pl-glabel { color: var(--k-muted); font-weight: 700; }
#workspace #projects-panel .pl-ticks { display: grid; grid-template-columns: repeat(var(--pl-days), var(--pl-px)); }
#workspace #projects-panel .pl-tick { position: relative; overflow: visible; padding-top: 18px; color: var(--k-faint); font-size: .66rem; text-align: center; white-space: nowrap; line-height: 24px; }
#workspace #projects-panel .pl-month { position: absolute; top: 0; left: 2px; color: var(--k-muted); font-size: .72rem; font-weight: 650; line-height: 16px; }
#workspace #projects-panel .tm-cal-head > select { width: auto; max-width: 100%; min-height: 36px; font-size: .85rem; }
#workspace #projects-panel .pl-tick.is-weekend { color: rgba(255, 255, 255, .22); }
#workspace #projects-panel .pl-tick.is-monday { box-shadow: inset 1px 0 0 var(--k-line-strong); }
#workspace #projects-panel .pl-lane { position: relative; height: 36px; border-top: 1px solid var(--k-line);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: calc(var(--pl-px) * 7) 100%; }
#workspace #projects-panel .pl-bar {
  position: absolute; top: 9px; height: 18px; min-width: 4px; padding: 0; border: 0; border-radius: 5px; cursor: pointer;
  background: linear-gradient(90deg, rgba(255, 255, 255, .28) var(--pl-progress, 0%), transparent var(--pl-progress, 0%)), var(--pl-bar, var(--k-accent));
  transition: transform 140ms var(--k-ease-out), box-shadow 140ms ease;
}
#workspace #projects-panel .pl-bar:active { transform: scale(.97); }
#workspace #projects-panel .pl-bar:focus-visible, #workspace #projects-panel .pl-bar.is-picked { box-shadow: 0 0 0 2px #0c1824, 0 0 0 4px var(--k-text); }
#workspace #projects-panel :is(.pl-bar, .pl-swatch).is-normal { --pl-bar: #4fb7d6; background-color: #4fb7d6; }
#workspace #projects-panel :is(.pl-bar, .pl-swatch).is-critical { --pl-bar: #f08a5d; background-color: #f08a5d; }
#workspace #projects-panel :is(.pl-bar, .pl-swatch).is-placeholder { --pl-bar: transparent; background-color: transparent; box-shadow: inset 0 0 0 1.5px #c9a2ff; }
#workspace #projects-panel .pl-bar.is-placeholder { background-image: repeating-linear-gradient(135deg, rgba(201, 162, 255, .35) 0 5px, transparent 5px 10px); }
#workspace #projects-panel :is(.pl-bar, .pl-swatch).is-baseline { --pl-bar: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .22); }
#workspace #projects-panel .pl-bar.is-baseline { top: 29px; height: 4px; pointer-events: none; }
#workspace #projects-panel .pl-bar.is-phase { top: 15px; height: 6px; --pl-bar: rgba(255, 255, 255, .35); border-radius: 3px; }
#workspace #projects-panel .pl-bar.is-milestone { width: 14px; height: 14px; top: 11px; margin-left: -1px; border-radius: 2px; --pl-bar: var(--k-accent); transform: rotate(45deg); }
#workspace #projects-panel .pl-bar.is-milestone:active { transform: rotate(45deg) scale(.92); }
#workspace #projects-panel .pl-today { position: absolute; top: 42px; bottom: 0; width: 2px; margin-left: -1px; background: var(--k-accent); opacity: .7; pointer-events: none; }
#workspace #projects-panel .pl-swatch { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
#workspace #projects-panel .pl-pick-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--pj-row); }
#workspace #projects-panel .pl-pick-card h4 { margin: 0; }
#workspace #projects-panel .pl-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin: 0; }
#workspace #projects-panel .pl-facts dt { color: var(--k-faint); font-size: .72rem; }
#workspace #projects-panel .pl-facts dd { margin: 0; font-size: .88rem; }
#workspace #projects-panel .pl-alternatives { margin: 0; padding-left: 1.1em; color: var(--k-muted); font-size: .84rem; }

#workspace #projects-panel .pl-heat-cell { min-width: 58px; border-radius: 6px; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-heat-cell.is-some { color: #c9f1ff; background: rgba(98, 210, 240, .14); }
#workspace #projects-panel .pl-heat-cell.is-full { color: #ffe1b5; background: rgba(245, 178, 91, .2); }
#workspace #projects-panel .pl-heat-cell.is-over { color: #ffd0d0; background: rgba(255, 110, 110, .26); }
#workspace #projects-panel .pl-cost-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#workspace #projects-panel .pl-cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
#workspace #projects-panel .pl-cost-table td { text-align: right; font-variant-numeric: tabular-nums; }
#workspace #projects-panel .pl-curve { width: 100%; height: auto; max-height: 220px; }
#workspace #projects-panel .pl-curve-line { fill: none; stroke: var(--k-accent); stroke-width: 2.5; stroke-linejoin: round; }
#workspace #projects-panel .pl-curve-budget { stroke: var(--k-warn); stroke-width: 1.5; stroke-dasharray: 6 5; }
#workspace #projects-panel .pl-curve-dot { fill: var(--k-accent); }
#workspace #projects-panel .pl-curve-label { fill: var(--k-faint); font-size: 11px; }
#workspace #projects-panel .pl-output:empty { display: none; }
#workspace #projects-panel .pl-progress-value { min-width: 3.5em; color: var(--k-muted); font-variant-numeric: tabular-nums; text-align: right; }
#workspace #projects-panel .tm-catalog input[type="range"] { flex: 1 1 140px; accent-color: var(--k-accent); }
#workspace #projects-panel .pl-settings { display: grid; gap: 10px; margin-top: 10px; }

/* ── Phone and narrow windows ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #workspace #projects-panel :is(.pj-split, .tm-split) { grid-template-columns: minmax(0, 1fr); }
  #workspace #projects-panel .pl-gantt { --pl-label: 150px; }
  #workspace #projects-panel .pl-head { grid-template-columns: minmax(0, 1fr); }
  #workspace #projects-panel .pl-actions { justify-content: flex-start; }
  #workspace #projects-panel .pj-rail { position: static; }
  /* projects become a row of chips above the open project */
  #workspace #projects-panel .pj-rail-list { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  #workspace #projects-panel .pj-rail-list::-webkit-scrollbar { display: none; }
  #workspace #projects-panel .pj-rail-item { flex: 0 0 auto; width: auto; max-width: 70vw; border-color: var(--k-line); }
  #workspace #projects-panel .pj-rail-meta { display: none; }
}
@media (max-width: 760px) {
  #workspace #projects-panel .pj-head { flex-direction: column; align-items: stretch; }
  #workspace #projects-panel .pj-actions > .button { flex: 1; }
  #workspace #projects-panel :is(.pj-cards > .project-card, .tm-detail, .tm-card) { padding: 16px; }
  #workspace #projects-panel .tm-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #workspace #projects-panel .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #workspace #projects-panel .tm-total { grid-column: 1 / -1; text-align: right; }
  /* the sheet comes up from the bottom, where the thumb is */
  #workspace #projects-panel .project-card-head { flex-direction: column; align-items: flex-start; text-align: left; }
  #workspace #projects-panel .pj-sheet {
    top: auto; left: 0; width: auto; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--k-line-strong); border-radius: 20px 20px 0 0;
    transform: translateY(100%); box-shadow: 0 -24px 60px rgba(0, 0, 0, .35);
  }
}

@media (prefers-reduced-motion: reduce) {
  #workspace #projects-panel [role="tabpanel"]:not([hidden]) { animation: pj-fade 160ms ease; }
  #workspace #projects-panel :is(.pj-rail-item, .tm-person, .tm-tab, .tm-level, .pj-nav > .segment, .pl-row-line, .pl-bar):active { transform: none; }
  #workspace #projects-panel .pl-bar.is-milestone:active { transform: rotate(45deg); }
  #workspace #projects-panel .pj-sheet,
  #workspace #projects-panel .pj-sheet[data-open="true"] { transform: none; opacity: 0; transition: opacity 160ms ease, visibility 0s linear 160ms; }
  #workspace #projects-panel .pj-sheet[data-open="true"] { opacity: 1; transition: opacity 160ms ease, visibility 0s; }
}
@keyframes pj-fade { from { opacity: 0; } }

/* Gantt manipulation follows the pointer directly; only a new draft is written. */
#workspace #projects-panel .pl-bar.is-movable { cursor: grab; user-select: none; }
#workspace #projects-panel .pl-bar.is-dragging { cursor: grabbing; transition: none; z-index: 4; will-change: transform; }

#workspace #projects-panel :is(.tm-cal td, .tm-swatch).is-booked { color: #e7d1ff; background: rgba(174, 136, 235, .22); }

.wf-office-editor { min-width: 0; display: grid; gap: 12px; }
#workflows-panel .wf-panel:has(.wf-office-editor) { background: #0b1b28; }
.wf-office-editor fieldset { min-width: 0; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line, #31465a); border-radius: 12px; }
.wf-office-editor legend { padding: 0 5px; font-weight: 600; }
.wf-office-editor label { display: grid; gap: 5px; min-width: 0; margin: 0 0 10px; }
.wf-office-editor label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
.wf-office-editor input:not([type="checkbox"]), .wf-office-editor select, .wf-office-editor textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 16px; }
.wf-office-editor textarea { resize: vertical; min-height: 70px; }
.wf-office-editor input[type="checkbox"] { flex: 0 0 18px; width: 18px; min-width: 18px; height: 18px; padding: 0; margin: 0; }
.wf-office-editor input:disabled, .wf-office-editor textarea:disabled { opacity: .55; }
.wf-office-editor details { margin: 10px 0; }
.wf-office-editor details[open] > summary { margin-bottom: 10px; }
.wf-office-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.wf-office-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-office-editor button, .wf-office-actions button { min-height: 44px; }
#workspace #workflows-panel .wf-office-editor button.button,
#workspace #workflows-panel .card:has(.wf-office-review) button.button { min-height: 44px; }
.wf-office-editor button:active, .wf-office-actions button:active { transform: scale(.98); }
.wf-office-editor :focus-visible { outline: 2px solid var(--accent, #73c9ff); outline-offset: 3px; }
.wf-office-review { min-width: 0; margin-block: 12px; }
.wf-office-review h4 { margin-bottom: 4px; overflow-wrap: anywhere; }
.wf-office-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; margin-block: 12px; padding: 12px; border: 1px solid var(--line, #31465a); border-radius: 10px; }
.wf-office-diff > strong, .wf-office-diff > p { grid-column: 1 / -1; overflow-wrap: anywhere; }
.wf-office-diff > div { min-width: 0; }
.wf-office-diff pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16em; overflow: auto; margin: 5px 0 0; font: inherit; }
@media (max-width: 560px) {
  .wf-office-grid, .wf-office-diff { grid-template-columns: minmax(0, 1fr); }
  .wf-office-actions > button { flex: 1 1 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .wf-office-editor button:active, .wf-office-actions button:active { transform: none; }
}

/* Tarvi Büro (books.js): invoices, receipts, bank, journal, reports. Uses the --k-* tokens of ui-system.css. */
#books-panel { --bk-gap: 14px; }
#workspace #books-panel .bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
#workspace #books-panel .bk-head h2 { margin: 0; color: var(--k-text); font-size: clamp(1.5rem, 2.2vw, 1.85rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
#workspace #books-panel .bk-summary { min-height: 1.3em; margin: 6px 0 0; color: var(--k-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
#workspace #books-panel .bk-actions, #workspace #books-panel .bk-actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#workspace #books-panel .bk-actions-row { margin: 14px 0 4px; }
#workspace #books-panel .bk-nav { margin-bottom: 14px; }
#workspace #books-panel .bk-status { min-height: 1.3em; margin: 0 0 10px; }
#workspace #books-panel .bk-status.error, #workspace #books-panel .help.error { color: var(--k-danger); }
#books-panel .bk-armed { color: var(--k-accent-ink) !important; background: var(--k-warn) !important; border-color: var(--k-warn) !important; }

#books-panel .bk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: var(--bk-gap); margin-bottom: var(--bk-gap); }
#books-panel .bk-tile { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-surface); }
#books-panel .bk-tile-label { color: var(--k-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
#books-panel .bk-tile strong { color: var(--k-text); font-size: clamp(1.1rem, 4vw, 1.45rem); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
#books-panel .bk-tile small { color: var(--k-faint); font-size: .78rem; line-height: 1.35; }
#books-panel .bk-tile-warn { border-color: color-mix(in srgb, var(--k-warn) 45%, transparent); }
#books-panel .bk-tile-warn strong { color: var(--k-warn); }
#books-panel .bk-tile-accent { border-color: color-mix(in srgb, var(--k-accent) 40%, transparent); }

#books-panel .bk-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--bk-gap); align-items: start; margin-bottom: var(--bk-gap); }
#books-panel .bk-card { padding: 16px 18px; }
#books-panel .bk-card h3 { margin: 0 0 12px; font-size: 1rem; }
#books-panel .bk-card > summary { cursor: pointer; font-weight: 600; color: var(--k-text); }
#books-panel .bk-card[open] > summary { margin-bottom: 12px; }
#books-panel .bk-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
#books-panel .bk-card-head h3 { margin: 0; }
#books-panel .bk-card-head input, #books-panel .bk-card-head select { max-width: 170px; }

#books-panel .bk-list { display: grid; gap: 6px; }
#books-panel .bk-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm);
  color: var(--k-text); background: rgba(255, 255, 255, .02); text-align: left; font: inherit; flex-wrap: wrap; }
#books-panel button.bk-row { cursor: pointer; }
#books-panel button.bk-row:hover { border-color: var(--k-line-strong); background: rgba(255, 255, 255, .04); }
#books-panel .bk-row-main { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
#books-panel .bk-row-main small { color: var(--k-muted); overflow-wrap: anywhere; }
#books-panel .bk-amount { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
#books-panel .bk-amount.neg { color: var(--k-warn); }
#books-panel .bk-sum { border-style: dashed; }
#books-panel .bk-grand { border-color: var(--k-line-strong); background: var(--k-accent-soft); }
#books-panel .bk-kz { min-width: 52px; color: var(--k-accent); font-size: .8rem; font-weight: 600; }

#books-panel .bk-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; color: var(--k-muted); background: rgba(255, 255, 255, .06);
  font-size: .72rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
#books-panel .bk-tag-paid, #books-panel .bk-tag-booked, #books-panel .bk-tag-accepted { color: #8be3a5; background: rgba(139, 227, 165, .12); }
#books-panel .bk-tag-warn, #books-panel .bk-tag-inbox { color: var(--k-warn); background: rgba(245, 178, 91, .13); }
#books-panel .bk-tag-accent, #books-panel .bk-tag-ready, #books-panel .bk-tag-issued, #books-panel .bk-tag-sent { color: var(--k-accent); background: var(--k-accent-soft); }
#books-panel .bk-tag-cancelled, #books-panel .bk-tag-declined, #books-panel .bk-tag-ignored { color: var(--k-faint); text-decoration: line-through; }

#books-panel .bk-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
#books-panel .bk-search { flex: 1 1 220px; min-width: 0; }
#books-panel .bk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#books-panel .bk-chip { min-height: 32px; padding: 0 12px; border: 1px solid var(--k-line-strong); border-radius: 999px; color: var(--k-muted); background: transparent; font: inherit; font-size: .82rem; cursor: pointer; }
#books-panel .bk-chip[aria-pressed="true"] { color: var(--k-accent-ink); background: var(--k-accent); border-color: var(--k-accent); }

#books-panel .bk-table { display: grid; gap: 4px; overflow-x: auto; }
#books-panel .bk-tr { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(140px, 1.6fr) 100px 100px 120px 120px; gap: 10px; align-items: center;
  min-width: 680px; padding: 9px 12px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); color: var(--k-text); background: rgba(255, 255, 255, .02); font: inherit; text-align: left; }
#books-panel button.bk-tr { cursor: pointer; }
#books-panel button.bk-tr:hover { border-color: var(--k-line-strong); background: rgba(255, 255, 255, .04); }
#books-panel .bk-th { border: 0; background: transparent; color: var(--k-faint); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
#books-panel .bk-journal .bk-tr { grid-template-columns: 50px 92px minmax(180px, 2fr) 64px 64px 110px 130px 120px; min-width: 860px; }
#books-panel .bk-balances .bk-tr { grid-template-columns: 70px minmax(160px, 2fr) 120px 120px 120px; min-width: 600px; }

#books-panel .bk-field { display: grid; gap: 5px; min-width: 0; }
#books-panel .bk-field > span { color: var(--k-muted); font-size: .78rem; }
#books-panel .bk-field :is(input, select, textarea), #books-panel .bk-line :is(input, select, textarea), #books-panel .bk-inline :is(input, select) { width: 100%; min-width: 0; box-sizing: border-box; }
#books-panel .bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-bottom: 12px; }
#books-panel .bk-grid-tight { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
#books-panel .bk-wide, #books-panel .bk-wide2 { grid-column: 1 / -1; }
@media (min-width: 761px) { #books-panel .bk-wide2 { grid-column: span 2; } }
#books-panel .bk-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#books-panel .bk-inline > :is(input, select) { width: auto; flex: 1 1 120px; }
#books-panel .bk-editor { display: grid; gap: 12px; }
#books-panel .bk-editor > .button.ghost { justify-self: start; }
#books-panel .bk-editor h3 { margin: 0; font-size: 1.2rem; }
#books-panel .bk-editor h3 small { color: var(--k-muted); font-weight: 400; }
#books-panel .bk-facts > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); }
#books-panel .bk-facts span { color: var(--k-muted); font-size: .78rem; }

#books-panel .bk-lines { display: grid; gap: 6px; }
#books-panel .bk-line { display: grid; grid-template-columns: minmax(200px, 3fr) 70px 100px 110px 92px 70px 110px 32px; gap: 8px; align-items: start; }
#books-panel .bk-line textarea { resize: vertical; min-height: 38px; }
#books-panel .bk-line-head { color: var(--k-faint); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
#books-panel .bk-line .bk-amount { padding-top: 9px; }
#books-panel .bk-x { width: 32px; height: 36px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); color: var(--k-muted); background: transparent; font-size: 1.1rem; cursor: pointer; }
#books-panel .bk-x:hover { color: var(--k-danger); border-color: var(--k-danger); }
#books-panel .bk-totals { display: grid; gap: 4px; justify-self: end; width: min(100%, 320px); }
#books-panel .bk-totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
#books-panel .bk-totals .bk-grand { border-radius: var(--k-radius-sm); font-size: 1.05rem; }
@media (max-width: 760px) {
  #books-panel .bk-line { grid-template-columns: 1fr 1fr 1fr; padding: 10px; border: 1px solid var(--k-line); border-radius: var(--k-radius-sm); }
  #books-panel .bk-line > textarea { grid-column: 1 / -1; }
  #books-panel .bk-line-head { display: none; }
}

#books-panel .bk-warn { margin: 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--k-warn) 45%, transparent); border-radius: var(--k-radius-sm);
  color: var(--k-text); background: rgba(245, 178, 91, .08); }
#books-panel .bk-missing { margin: 6px 0 0; padding-left: 18px; color: var(--k-muted); }
#books-panel .bk-history summary { cursor: pointer; color: var(--k-muted); }

#books-panel .bk-drop { display: grid; place-items: center; gap: 4px; min-height: 110px; margin-bottom: 14px; padding: 18px; border: 1.5px dashed var(--k-line-strong);
  border-radius: var(--k-radius); color: var(--k-muted); text-align: center; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
#books-panel .bk-drop strong { color: var(--k-text); }
#books-panel .bk-drop:is(:hover, :focus-visible, .over) { border-color: var(--k-accent); background: var(--k-accent-soft); outline: none; }
#books-panel .bk-receipts { display: grid; gap: var(--bk-gap); }
#books-panel .bk-receipt { padding: 14px 16px; }
#books-panel .bk-receipt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
#books-panel .bk-receipt-head > div { display: grid; flex: 1 1 200px; }
#books-panel .bk-receipt-head small { color: var(--k-muted); }
#books-panel .bk-tx .bk-suggest { flex-basis: 100%; }
#books-panel .bk-tx > .bk-inline:last-child { flex-basis: 100%; }
#books-panel .bk-accounts { max-height: 260px; overflow: auto; margin-bottom: 12px; }
#books-panel .bk-accounts p { margin: 2px 0; }
#books-panel .bk-settings { display: grid; gap: var(--bk-gap); margin-bottom: var(--bk-gap); }
#books-panel .bk-link { padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; cursor: pointer; }
#books-panel .bk-link:hover strong { color: var(--k-accent); }
#books-panel .bk-entries { display: grid; gap: 4px; margin-top: 4px; color: var(--k-muted); font-size: .85rem; }
#books-panel .bk-entries input { max-width: 130px; }
#books-panel .bk-warn-text { color: var(--k-warn) !important; }
#books-panel .bk-mailin { margin-bottom: var(--bk-gap); }
#books-panel .bk-series { margin-bottom: 12px; }
#books-panel .bk-reports > .card { margin-bottom: var(--bk-gap); }
#books-panel .bk-code { margin: 10px 0; }
#books-panel .bk-code-value { display: inline-block; padding: 8px 14px; border-radius: var(--k-radius-sm); color: var(--k-accent-ink); background: var(--k-accent);
  font-size: 1.4rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
#books-panel .bk-access { margin-bottom: var(--bk-gap); }

/* Büro bar (buero.js): switch Privat/Geschäftlich and the sections; shown above calendar, mail, documents and the Büro tools */
#workspace .buero-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; }
#workspace .buero-bar[hidden] { display: none; }
#workspace .buero-modes { display: inline-flex; padding: 3px; border: 1px solid var(--k-line-strong); border-radius: 999px; background: rgba(255, 255, 255, .03); }
#workspace .buero-modes button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--k-muted); background: transparent;
  font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
#workspace .buero-modes button[aria-pressed="true"] { color: var(--k-accent-ink); background: var(--k-accent); }
#workspace .buero-nav { flex: 1 1 420px; min-width: 0; }
#workspace .buero-nav > .segment[hidden] { display: none; }
body[data-scope="private"] #workspace .buero-modes button[aria-pressed="true"] { background: #b9a1ff; }
body[data-buero="on"] #workspace #tools-panel > .vs-subtabs { display: none; }
body[data-buero="on"] #workspace #books-panel .bk-nav [data-view="people"] { display: none; }
#workspace .scope-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid var(--k-line-strong); border-radius: 999px;
  color: var(--k-muted); background: transparent; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
#workspace .scope-chip.private { color: #cdbdff; border-color: rgba(185, 161, 255, .45); }
#workspace .scope-chip:hover { color: var(--k-text); border-color: var(--k-accent); }

.kn-header,.kn-toolbar,.kn-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.kn-header h2{margin:0}.kn-header .help{max-width:68ch}.kn-toolbar{justify-content:flex-start;margin:18px 0}.kn-toolbar label{display:grid;gap:6px;min-width:160px;flex:1}
.kn-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.kn-tabs button[aria-pressed=true]{border-color:var(--accent,#62d8c0);background:rgba(98,216,192,.12)}
.kn-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;align-items:start}.kn-entry{border:1px solid var(--line,rgba(255,255,255,.13));border-radius:16px;padding:18px;min-width:0;background:rgba(128,160,190,.035)}
.kn-entry h3{font-size:1.05rem;margin:0 0 8px;overflow-wrap:anywhere}.kn-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.kn-meta{font-size:.85rem;line-height:1.55;opacity:.78;overflow-wrap:anywhere}.kn-entry .kn-actions{justify-content:flex-start;margin-top:14px}
.kn-editor{margin:20px 0;border:1px solid var(--line,rgba(255,255,255,.13));border-radius:16px;padding:20px}.kn-editor form,.kn-form{display:grid;gap:14px}.kn-editor label,.kn-form label{display:grid;gap:6px}.kn-editor textarea{min-height:110px;resize:vertical}
.kn-editor :is(input,select,textarea),.kn-toolbar :is(input,select),.kn-form :is(input,select,textarea){width:100%;min-width:0;box-sizing:border-box}.kn-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:14px}
.kn-empty{padding:28px 18px;border:1px dashed var(--line,rgba(255,255,255,.2));border-radius:16px;line-height:1.6}.kn-empty h3{margin-top:0}.kn-history{margin-top:14px}.kn-history article{padding:10px 0;border-top:1px solid var(--line,rgba(255,255,255,.13))}
.kn-settings{margin-top:22px}.kn-settings label{display:flex;align-items:center;gap:9px;margin:12px 0}.kn-settings input[type=checkbox]{width:auto}.kn-error{color:var(--danger,#ffb2aa)}
#knowledge-status:empty{display:none}.kn-toolbar label{margin:0}
#knowledge-view [hidden]{display:none!important}#knowledge-view button{min-height:38px}#knowledge-title:focus{outline:none}#knowledge-view :focus-visible{outline:2px solid var(--accent,#62d8c0);outline-offset:3px}
@media(max-width:600px){.kn-toolbar{align-items:stretch;margin:12px 0}.kn-toolbar label{flex-basis:100%}.kn-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.kn-tabs button{padding:9px 10px}.kn-editor{padding:15px}.kn-actions .button{white-space:normal;text-align:left}#knowledge-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}#knowledge-search-form label{min-width:0}#knowledge-search-form label:nth-of-type(2){grid-column:1/-1;grid-row:2}#knowledge-search-form button{grid-column:2;grid-row:1}}
.kn-entry.kn-overdue{border-color:var(--danger,#ffb2aa)}.kn-entry h4{margin:0 0 6px;overflow-wrap:anywhere}.kn-lead{font-size:1.05rem;line-height:1.5}
.kn-dossier{margin-top:20px;display:grid;gap:10px}.kn-dossier h4{margin:0}.kn-dossier ul,#knowledge-care ul{margin:0;padding-left:1.2em;line-height:1.6;overflow-wrap:anywhere}
.kn-timeline{list-style:none;padding-left:0!important;border-left:2px solid var(--line,rgba(255,255,255,.13))}.kn-timeline li{padding-left:12px}
#knowledge-care h4{margin:18px 0 8px}#knowledge-care h5{margin:12px 0 4px;font-size:.95rem}
.kn-offer-line{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:end;padding:8px 0;border-top:1px solid var(--line,rgba(255,255,255,.13))}.kn-offer-line .help{grid-column:1/-1;margin:0}
@media(max-width:600px){.kn-offer-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.kn-offer-line label:first-child{grid-column:1/-1}}
.kn-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:8px;margin:10px 0}.kn-metric{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--line,rgba(255,255,255,.13));border-radius:12px}.kn-metric strong{font-size:1.2rem}.kn-metric span{font-size:.8rem;opacity:.78}
body[data-role=knowledge] #tools-panel .vs-subtabs,body[data-role=knowledge] #knowledge-setup,body[data-role=knowledge] #knowledge-company-setup{display:none!important}
.kn-code{font:600 1.6rem/1.2 ui-monospace,monospace;letter-spacing:.18em}
.kn-tab-pick{display:none;width:100%;margin:12px 0}@media(max-width:600px){.kn-tab-pick{display:block}.kn-tabs{display:none!important}}
.kn-code{overflow-wrap:anywhere}[aria-invalid=true]{outline:2px solid var(--danger,#ffb2aa)}

/* Navigation (navigation.js): full-screen map with a side panel for planning, banner and bottom bar while driving. */
.nav-view { position: fixed; inset: 0; z-index: 900; background: var(--k-bg, #060f19); color: var(--k-text, #eef4f9); overflow: hidden; }
.nav-view[hidden] { display: none; }
body.nav-open { overflow: hidden; }
/* Keep the canvas full size after the lazily loaded renderer CSS sets position:relative. */
.nav-view .nav-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.nav-map-status { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 2;
  max-width: calc(100% - 100px); padding: 8px 12px; border-radius: 10px; background: #0c1622; color: #eef4f9; font-size: .85rem; }
.nav-map-status[hidden] { display: none; }
.nav-map-status button { display: block; margin-top: 5px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 6px; padding: 6px; }
.nav-panel, .nav-banner, .nav-bottom { z-index: 3; }
.nav-view .leaflet-pane { z-index: 1; }
.nav-view .leaflet-top, .nav-view .leaflet-bottom { z-index: 2; }
.nav-view .leaflet-control-attribution { font-size: 10px; }
.nav-view button { touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.nav-panel { overscroll-behavior: contain; }
.nav-view.nav-nomap .nav-map { background: radial-gradient(circle at 50% 40%, rgba(98, 210, 240, .08), transparent 60%); }

.nav-panel { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; width: min(390px, calc(100% - 24px)); max-height: calc(100% - 24px);
  overflow-y: auto; display: grid; gap: 10px; padding: 14px; border-radius: var(--k-radius, 16px); background: var(--k-surface, rgba(12, 22, 34, .92));
  border: 1px solid var(--k-line-strong, rgba(255, 255, 255, .13)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.nav-panel[hidden] { display: none; }
.nav-head { display: flex; justify-content: space-between; align-items: center; }
.nav-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--k-line-strong, rgba(255, 255, 255, .13)); background: var(--k-surface-3, rgba(255, 255, 255, .08));
  color: inherit; font-size: 1.05rem; cursor: pointer; flex: none; }
.nav-search { display: flex; gap: 8px; }
.nav-search input { flex: 1; min-width: 0; font-size: 16px; }
.nav-modes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nav-modes button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--k-line-strong, rgba(255, 255, 255, .13)); background: transparent; color: inherit; cursor: pointer; }
.nav-modes button[aria-pressed="true"] { background: var(--k-accent-soft, rgba(98, 210, 240, .14)); border-color: var(--k-accent, #62d2f0); }
.nav-modes select { margin-left: auto; font-size: 16px; }
.nav-results, .nav-events, .nav-summary { display: grid; gap: 6px; }
.nav-summary[hidden] { display: none; }
.nav-result, .nav-event { text-align: left; padding: 9px 11px; border-radius: var(--k-radius-sm, 10px); border: 1px solid var(--k-line, rgba(255, 255, 255, .075));
  background: var(--k-surface-2, rgba(255, 255, 255, .045)); color: inherit; cursor: pointer; display: grid; gap: 2px; overflow-wrap: anywhere; }
.nav-event span, .nav-hint, .nav-target span, .nav-option span { color: var(--k-muted, #b0bfce); font-size: .86rem; }
.nav-events h4 { margin: 6px 0 0; font-size: .9rem; color: var(--k-muted, #b0bfce); }
.nav-target { display: grid; gap: 2px; overflow-wrap: anywhere; }
.nav-facts { margin: 0; font-size: 1.15rem; font-weight: 600; }
.nav-hint { margin: 0; }
.nav-option { display: grid; gap: 4px; padding: 9px 11px; border-radius: var(--k-radius-sm, 10px); background: var(--k-surface-2, rgba(255, 255, 255, .045)); }
.nav-option button { justify-self: start; }
#nav-go { width: 100%; font-size: 1.1rem; padding: 12px; }
.nav-status { margin: 0; min-height: 1.2em; color: var(--k-muted, #b0bfce); font-size: .88rem; }
.nav-status.error { color: var(--k-danger, #ff8a8a); }

.nav-banner { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto;
  display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--k-radius, 16px); background: #0b4f6c; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.nav-banner[hidden] { display: none; }
.nav-arrow { font-size: 2.6rem; line-height: 1; width: 48px; text-align: center; flex: none; }
.nav-banner div { display: grid; gap: 2px; min-width: 0; }
.nav-banner strong { font-size: 1.6rem; }
.nav-banner span { font-size: 1.05rem; overflow-wrap: anywhere; }
.nav-banner small { opacity: .8; }

.nav-bottom { position: absolute; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
  display: flex; gap: 10px; align-items: center; padding: 10px 12px 10px 18px; border-radius: var(--k-radius, 16px);
  background: var(--k-surface, rgba(12, 22, 34, .92)); border: 1px solid var(--k-line-strong, rgba(255, 255, 255, .13)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-bottom[hidden] { display: none; }
.nav-bottom > div { display: grid; flex: 1; min-width: 0; }
.nav-bottom strong { font-size: 1.25rem; }
.nav-bottom span { color: var(--k-muted, #b0bfce); }

.nav-me { width: 22px; height: 22px; border-radius: 50%; background: #22b8e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(34, 184, 232, .25); position: relative; }
.nav-me::after { content: ""; position: absolute; left: 50%; top: -11px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 9px solid #22b8e8; }
.nav-view .maplibregl-ctrl-attrib { font-size: 10px; }

@media (max-width: 760px) {
  .nav-panel { top: auto; bottom: max(28px, env(safe-area-inset-bottom)); max-height: 52%; }
  .nav-banner strong { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { .nav-view * { transition: none !important; } }
.nav-jam { margin: 0; color: #f97316; font-size: .9rem; }
.nav-ev { display: grid; gap: 4px; padding: 9px 11px; border-radius: var(--k-radius-sm, 10px); background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); }
.nav-ev.knapp, .nav-ev.vorher_laden, .nav-ev.ladestopp { background: rgba(250, 204, 21, .1); border-color: rgba(250, 204, 21, .4); }
.nav-ev span { font-size: .9rem; color: var(--k-muted, #b0bfce); }
.nav-ev button { justify-self: start; }
.ev-vehicles { display: grid; gap: 10px; }
.ev-car { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--k-radius-sm, 10px); border: 1px solid var(--k-line, rgba(255, 255, 255, .075)); }
.ev-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; align-items: end; }
.ev-field { display: grid; gap: 3px; font-size: .86rem; }
.ev-field input, .ev-field select { font-size: 16px; min-width: 0; }
.ev-ha { display: grid; gap: 8px; }
.ev-ha .ev-form { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
#travel-view .tr-ev { margin: 4px 0 0; color: var(--k-warn, #f5b25b); font-size: .9rem; }
.tr-legs { margin: 8px 0; padding-left: 22px; display: grid; gap: 12px; text-align: left; }
.tr-legs li { padding-left: 5px; overflow-wrap: anywhere; }
.tr-legs li > * { display: block; }
.live-item-body .tr-result { display: grid; gap: 6px; padding: 12px; margin-bottom: 12px; text-align: left; border: 1px solid var(--k-line, rgba(255,255,255,.12)); border-radius: 12px; }
.live-item-body .tr-result p { margin: 0; }

/* Travel instructions: time, station and platform remain distinct on small screens. */
.tr-legs { list-style: none; padding: 0; gap: 0; margin: 16px 0; }
.tr-legs .tr-leg { padding: 0; min-width: 0; }
.tr-leg-body { border: 1px solid var(--border, #64748b55); border-left: 4px solid var(--accent, #478ddc); border-radius: 12px; padding: 14px; background: var(--surface, #ffffff08); }
.tr-line { font-weight: 750; font-size: 1rem; margin-bottom: 12px; }
.tr-stop { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; }
.tr-stop + .tr-stop { border-top: 1px dashed var(--border, #64748b55); }
.tr-stop-time { font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.tr-stop-time small { display: block; font-size: .65rem; font-weight: 400; margin-top: 3px; }
.tr-stop-place { display: grid; gap: 3px; min-width: 0; }
.tr-stop-place small { font-size: .75rem; opacity: .75; }
.tr-stop-place strong { font-size: 1rem; overflow-wrap: anywhere; }
.tr-platform { padding: 7px 10px; border-radius: 8px; font-weight: 750; background: #2475cc22; border: 1px solid #478ddc88; white-space: nowrap; }
.tr-platform.unknown { font-size: .75rem; font-weight: 500; background: transparent; border-style: dashed; opacity: .75; }
.tr-legs .tr-transfer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 10px 0; padding: 12px 14px; border-radius: 8px; background: #c9901722; border: 1px solid #c9901755; font-size: .9rem; }
.tr-timetable-note { font-size: .78rem; opacity: .75; line-height: 1.5; }
.tr-plan-panel { display: grid; gap: 10px; margin-top: 12px; min-width: 0; }
.tr-plan-panel select { max-width: 100%; min-width: 0; }
.tr-plan-preview { min-width: 0; overflow-wrap: anywhere; }
.tr-plan-preview summary { cursor: pointer; padding: 8px 0; font-weight: 650; }
.tr-plan-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9rem; line-height: 1.6; }
.tr-event-plans { display: grid; gap: 8px; margin-top: 10px; }
.tr-event-plans .item-actions { align-items: center; }
.tr-event-plans button { white-space: normal; }
@media (max-width: 480px) {
  .tr-leg-body { padding: 10px; }
  .tr-stop { grid-template-columns: 74px minmax(0, 1fr); gap: 7px; }
  .tr-platform { grid-column: 2; justify-self: start; padding: 5px 9px; }
}

/* Connections use the familiar departure / duration / arrival hierarchy. */
.live-item-preview.is-travel { position: fixed; inset: 52px 0 0; padding: 20px; z-index: 40; }
.live-item-preview.is-travel .live-item-sheet { width: min(1120px, 100%); max-height: calc(100dvh - 92px); padding: 24px; text-align: left; }
.live-item-preview.is-travel .live-item-head { flex: 0 0 auto; padding-bottom: 16px; }
.live-item-preview.is-travel .live-item-head h2 { font-size: 1.45rem; }
.live-item-preview.is-travel .live-item-meta:empty { display: none; }
.live-item-preview.is-travel .live-item-body { white-space: normal; padding-right: 8px; overscroll-behavior: contain; }
.tr-comparison { display: grid; gap: 12px; min-width: 0; text-align: left; }
.tr-comparison-date { margin: 0 0 4px; font-size: .95rem; color: var(--k-muted, #a9beca); }
.tr-connection { min-width: 0; border: 1px solid #7692a13d; border-radius: 12px; background: #102b3c; color: #edf5fa; overflow: hidden; }
.tr-connection.recommended { border-color: #6dc8da88; }
.tr-connection > summary { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; list-style: none; padding: 20px; cursor: pointer; }
.tr-connection > summary::-webkit-details-marker { display: none; }
.tr-connection > summary:focus-visible { outline: 2px solid #6dc8da; outline-offset: -3px; }
.tr-connection-main { min-width: 0; }
.tr-connection-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; font-size: .82rem; color: #b7cedb; }
.tr-recommended { padding: 2px 8px; background: #247e7745; border-radius: 5px; color: #9de4cf; }
.tr-connection-timing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .7fr) minmax(0, 1fr); gap: 24px; }
.tr-connection-clock { display: grid; gap: 2px; align-content: start; min-width: 0; }
.tr-connection-clock strong { font-size: 1.8rem; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tr-connection-clock span { font-size: .95rem; overflow-wrap: anywhere; }
.tr-connection-clock small, .tr-connection-center small, .tr-connection-side small { color: #a9beca; font-size: .78rem; }
.tr-connection-center { text-align: center; align-self: center; display: grid; gap: 6px; font-size: .9rem; }
.tr-connection-rule { display: block; height: 1px; background: #6c899a; position: relative; }
.tr-connection-rule::after { content: ''; position: absolute; right: 0; top: -3px; border: 4px solid transparent; border-left-color: #6c899a; border-right: 0; }
.tr-connection-services { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.tr-service { padding: 3px 7px; border-radius: 4px; background: #ffffff0c; border: 1px solid #ffffff18; font-size: .8rem; font-weight: 650; }
.tr-service-arrow { color: #8aa9bb; font-size: .8rem; }
.tr-connection-side { display: grid; gap: 6px; align-content: center; justify-items: end; border-left: 1px solid #7692a133; padding-left: 20px; text-align: right; }
.tr-connection-side strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tr-connection-toggle { font-size: .8rem; color: #a3d9e5; margin-top: 10px; }
.tr-connection-toggle::after { content: ' ▾'; }
.tr-connection[open] .tr-connection-toggle::after { content: ' ▴'; }
.tr-connection-detail { padding: 0 20px 20px; border-top: 1px solid #7692a133; }
.tr-connection .tr-legs { margin: 12px 0; }
.tr-connection .tr-leg-body { border: 0; border-left: 2px solid #72c3df; border-radius: 0; margin-left: 4px; padding: 8px 16px; background: transparent; }
.tr-connection .tr-line { font-size: .86rem; color: #b0d4e4; margin-bottom: 4px; }
.tr-connection .tr-stop { padding: 7px 0; }
.tr-connection .tr-stop + .tr-stop { border-top: 0; }
.tr-connection .tr-stop-time { font-size: 1.05rem; }
.tr-connection .tr-platform { font-size: .84rem; padding: 4px 8px; }
.tr-connection .tr-transfer { margin: 4px 0 4px 4px; padding: 9px 16px; border: 0; border-left: 2px dashed #8ca7b3; border-radius: 0; background: #ffffff05; font-size: .83rem; }
.tr-other-options, .tr-comparison-notes { display: grid; gap: 12px; min-width: 0; }
.tr-other-options > summary, .tr-comparison-notes > summary { padding: 10px 0; cursor: pointer; font-size: .9rem; color: #bed0db; }
.tr-other-options > .tr-connection { margin-top: 12px; }
.tr-feeder-status { padding: 12px; margin: 0; border-left: 3px solid #b9a56b; background: #b9a56b10; font-size: .9rem; }
@media (max-width: 640px) {
  .live-item-preview.is-travel { inset: 44px 0 0; padding: 6px; }
  .live-item-preview.is-travel .live-item-sheet { max-height: calc(100dvh - 56px); padding: 14px 10px; border-radius: 12px; }
  .live-item-preview.is-travel .live-item-head { gap: 8px; padding-bottom: 12px; }
  .live-item-preview.is-travel .live-item-head h2 { font-size: 1.1rem; }
  .live-item-preview.is-travel .live-item-body { padding-right: 2px; }
  .tr-connection > summary { grid-template-columns: minmax(0, 1fr); padding: 14px 12px; gap: 12px; }
  .tr-connection-timing { grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr); gap: 10px; }
  .tr-connection-clock strong { font-size: 1.5rem; }
  .tr-connection-clock span { font-size: .8rem; }
  .tr-connection-center { font-size: .78rem; }
  .tr-connection-side { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; border-left: 0; border-top: 1px solid #7692a133; padding: 10px 0 0; text-align: left; }
  .tr-connection-side small { display: none; }
  .tr-connection-side strong { font-size: .95rem; }
  .tr-connection-toggle { margin: 0; }
  .tr-connection-detail { padding: 0 8px 14px; }
  .tr-connection .tr-leg-body { padding-right: 4px; padding-left: 10px; }
}

/* Compact dashboard: one useful sidebar, six flexible content columns. */
.tarvi-dashboard[hidden],.dashboard-composer,.dashboard-dock-toggle{display:none}
body.dashboard-active{overflow:hidden}
.tarvi-dashboard{position:fixed;inset:var(--dashboard-top,100px) 10px 10px;z-index:20;overflow:auto;padding:18px 16px 18px 248px;border:1px solid #8cbef124;border-radius:20px;background:radial-gradient(ellipse at 0 0,#28476b44,transparent 40%),#0b1320;color:#edf3fc;scrollbar-gutter:stable;overscroll-behavior:contain}
.dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.dashboard-heading h1{font-size:26px;letter-spacing:-.035em;margin:0}.dashboard-heading .eyebrow{color:#8ca9cd;letter-spacing:.14em;font-size:9px;margin:0 0 3px}.dashboard-status{color:#95a7c0;font-size:11px;margin:5px 0 12px;min-height:16px}
.dashboard-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(155px,calc((100dvh - var(--dashboard-top,100px) - 152px)/3));gap:10px;align-content:start}
.dashboard-card{min-width:0;min-height:0;border:1px solid #9ebfeb26;border-radius:14px;background:linear-gradient(145deg,#23354ed9,#101b2bf2);display:flex;flex-direction:column;overflow:hidden;padding:12px}
.dashboard-card[data-size=S],.dashboard-card[data-size=M]{grid-column:span 2;grid-row:span 1}.dashboard-card[data-size=L]{grid-column:span 4;grid-row:span 2}.dashboard-card[data-size=XL]{grid-column:span 6;grid-row:span 2}
.dashboard-card[data-size=S]{grid-column:span 1}.dashboard-card[data-widget=calendar]{border-top-color:#77b9f0}
.dashboard-card>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.dashboard-card h2{margin:0;font-size:14px}.dashboard-card-body{overflow:auto;min-height:0;overflow-wrap:anywhere;scrollbar-width:thin;overscroll-behavior:contain;flex:1}.dashboard-card-body ul{list-style:none;margin:0;padding:0}.dashboard-card-body li{padding:8px 0;border-top:1px solid #9ebfeb1f}.dashboard-card-body li:first-child{padding-top:0;border:0}.dashboard-card-body strong{font-size:13px;line-height:1.4;font-weight:550}.dashboard-card-body p{margin:4px 0;color:#aabbd1;font-size:12px;line-height:1.45;white-space:pre-wrap}.dashboard-card-body .dashboard-error,.dashboard-warning{color:#f3c28b}.dashboard-empty{color:#aabbd1;font-size:13px;line-height:1.5}
.dashboard-setting-row{display:grid;grid-template-columns:minmax(140px,1fr) 90px 44px 44px;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #96aac826}.dashboard-setting-row label{display:flex;align-items:center;gap:12px}.dashboard-setting-row input[type=checkbox]{width:18px;height:18px}.dashboard-settings{scroll-margin-top:100px}
.dashboard-day{position:absolute;top:18px;left:20px;width:208px;color:#aabbd1}.dashboard-clock{font-size:64px;line-height:1.05;font-weight:250;letter-spacing:-.06em;font-variant-numeric:tabular-nums;color:#e9f2ff;margin:0 0 8px}.dashboard-date{font-size:13px;line-height:1.5;margin:0}
.dashboard-sidebar-weather{margin-top:18px;padding-top:12px;border-top:1px solid #9ebfeb26}.dashboard-sidebar-weather[hidden]{display:none}.dashboard-sidebar-weather .dashboard-card-body{overflow:visible}.dashboard-weather-current{display:flex;align-items:center;gap:10px}.dashboard-card-body .dashboard-temperature{font-size:46px;font-weight:300;color:#f1f6ff;line-height:1.1;margin:0}.dashboard-card-body .dashboard-weather-sky{font-size:15px;color:#e3eefe;text-transform:capitalize}.dashboard-card-body .dashboard-weather-place{color:#aabbd1}.dashboard-card-body .dashboard-weather-detail{font-size:11px;margin-top:8px}.dashboard-weather-forecast{margin-top:12px;display:grid;gap:6px;font-size:12px}.dashboard-weather-forecast>div{display:flex;justify-content:space-between;gap:8px}
.dashboard-calendar-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px}.dashboard-calendar-views,.dashboard-calendar-nav{display:flex;gap:3px;align-items:center;flex-wrap:wrap}.dashboard-calendar-views{padding:3px;background:#07101c88;border-radius:9px}.dashboard-calendar-views button[aria-pressed=true]{background:#77b9f02b;color:#cce9ff}.tarvi-dashboard .dashboard-calendar-controls button{padding:5px 9px;min-height:32px}.dashboard-calendar-date{width:132px;min-width:0;font-size:12px;padding:4px 6px;color-scheme:dark}.dashboard-card .dashboard-calendar-range{margin:8px 0;color:#aac4e2;font-size:12px}.dashboard-calendar-days{display:grid;gap:5px;min-height:100%}.dashboard-calendar-week,.dashboard-calendar-month{grid-template-columns:repeat(7,minmax(0,1fr))}.dashboard-calendar-day{min-width:0;border:1px solid #9ebfeb16;border-radius:8px;padding:4px;background:#0a142344}.dashboard-calendar-day.is-today{background:#548bdc16;border-color:#80c8ff66}.dashboard-day-button{display:block;width:100%;border:0;background:none;color:#bdd0e9;font:inherit;font-size:11px;text-align:left;padding:5px 2px;cursor:pointer;border-radius:4px}.is-today .dashboard-day-button{color:#8fdbff;font-weight:700}.is-outside{opacity:.55}.dashboard-calendar-event{border-left:2px solid #78c8ed;background:#75b9ff12;border-radius:3px;margin:5px 0;padding:5px 4px;overflow-wrap:anywhere}.dashboard-calendar-event strong{display:block;font-size:11px;line-height:1.35}.dashboard-event-time{display:block;font-size:10px;color:#91c9f0;font-variant-numeric:tabular-nums;margin-bottom:3px}.dashboard-card-body .dashboard-calendar-free{font-size:10px;color:#8195b1;margin:6px 2px}.dashboard-calendar-day.dashboard-calendar-days{display:block}.dashboard-calendar-days.dashboard-calendar-day{padding:0;border:0;background:none}.dashboard-calendar-days.dashboard-calendar-day .dashboard-calendar-event{display:grid;grid-template-columns:55px 1fr;gap:8px;padding:12px}.dashboard-calendar-days.dashboard-calendar-day .dashboard-calendar-event strong{font-size:14px}.dashboard-event-location{grid-column:2;font-size:12px;color:#aabbd1}.dashboard-calendar-month .dashboard-calendar-day{min-height:70px}.dashboard-calendar-month .dashboard-day-button{font-size:10px}.dashboard-calendar-month .dashboard-calendar-event{padding:2px 3px}.dashboard-calendar-month .dashboard-calendar-event strong{font-size:10px}
.tarvi-dashboard button,.dashboard-composer button,.dashboard-dock-toggle{touch-action:manipulation;user-select:none}.tarvi-dashboard button:focus-visible,.dashboard-dock-toggle:focus-visible{outline:2px solid #91d8ff;outline-offset:2px}
body.dashboard-active #voice-panel{position:fixed!important;left:36px!important;bottom:34px!important;top:auto!important;right:auto!important;width:306px!important;max-height:calc(100dvh - var(--dashboard-top,100px) - 44px);overflow:auto;margin:0!important;padding:14px!important;z-index:21;border:1px solid rgba(137,190,245,.3);border-radius:20px;background:linear-gradient(160deg,#1c3049,#111c2c);box-shadow:0 0 45px rgba(49,121,212,.1)}
body.dashboard-active #voice-stage{min-height:0!important;height:128px!important;width:100%!important;margin:0!important;min-width:0!important;padding:0!important;background:none!important;border:0!important;overflow:hidden;display:block!important;position:relative!important}
body.dashboard-active .voice-orb-wrap{position:relative!important;inset:auto!important;width:112px!important;height:112px!important;min-height:0!important;flex:none!important;margin:0 auto!important;transform:none!important}
body.dashboard-active #live-toggle{width:112px!important;height:112px!important;position:relative!important;inset:auto!important;transform:none!important}
body.dashboard-active #live-neural{width:112px!important;height:112px!important}
body.dashboard-active #voice-stage>:not(.voice-orb-wrap):not(.voice-controls):not(#live-mute):not(#live-audio){display:none!important}
body.dashboard-active .voice-orb-ring,body.dashboard-active .voice-lower{display:none!important}
body.dashboard-active #live-mute{position:absolute!important;right:0!important;bottom:8px!important;left:auto!important;top:auto!important}
body.dashboard-active .voice-controls{position:absolute!important;bottom:0;left:0}
body.dashboard-active .dashboard-composer{display:block}.dashboard-composer form{display:flex;flex-direction:column;gap:8px}.dashboard-composer textarea{width:100%;min-height:62px!important;resize:vertical;font-size:16px!important;max-height:140px}.dashboard-composer>button{margin-top:8px}.dashboard-dock-status{font-size:12px;line-height:1.4;overflow-wrap:anywhere;color:#afc6e3;margin:6px 0 0}.tarvi-dashboard button:active,.dashboard-composer button:active{transform:scale(.97)}

body.dashboard-active #voice-panel{left:30px!important;bottom:26px!important;width:208px!important;padding:10px!important;max-height:calc(100dvh - var(--dashboard-top,100px) - 400px)}
body.dashboard-active #voice-stage{height:90px!important}body.dashboard-active .voice-orb-wrap,body.dashboard-active #live-toggle,body.dashboard-active #live-neural{width:80px!important;height:80px!important}
body.dashboard-active #voice-stage::before,body.dashboard-active #voice-stage::after{display:none!important}
/* Ambient weather motion indicates conditions; readable values never move. */
.dashboard-weather-scene{width:88px;height:76px;position:relative;flex:none;overflow:hidden}.dashboard-weather-scene span,.dashboard-weather-scene i{position:absolute;display:none}
.weather-sun{width:36px;height:36px;left:22px;top:20px;border:6px solid #ffdd78;border-radius:50%;background:#ffc75f;box-shadow:0 0 20px #ffc75f33}.weather-sun::before{content:'';position:absolute;inset:-15px;background:repeating-conic-gradient(from 0deg,#ffdc7c 0deg 4deg,transparent 4deg 45deg);mask:radial-gradient(circle,transparent 54%,#000 56%);border-radius:50%;animation:dashboard-sun 24s linear infinite}
.weather-cloud{width:52px;height:23px;left:18px;top:33px;background:#c1d2e8;border-radius:20px;animation:dashboard-cloud 6s ease-in-out infinite alternate}.weather-cloud::before,.weather-cloud::after{content:'';position:absolute;background:inherit;border-radius:50%;width:28px;height:28px;left:8px;top:-14px}.weather-cloud::after{width:21px;height:21px;left:29px;top:-8px}
.weather-drop{width:2px;height:11px;top:55px;left:24px;background:#8cd4ff;border-radius:2px;animation:dashboard-rain 1.2s linear infinite}.weather-drop.drop-1{left:34px;animation-delay:-.4s}.weather-drop.drop-2{left:44px;animation-delay:-.8s}.weather-drop.drop-3{left:54px;animation-delay:-.2s}.weather-drop.drop-4{left:64px;animation-delay:-.6s}
.weather-mist{left:10px;top:58px;width:68px;height:2px;background:#bdcddd;box-shadow:4px 7px #bdcddd,-4px 14px #bdcddd;animation:dashboard-cloud 6s ease-in-out infinite alternate}.weather-bolt{left:41px;top:48px;width:12px;height:24px;background:#ffdf82;clip-path:polygon(40% 0,100% 0,60% 40%,95% 40%,0 100%,30% 52%,0 52%);animation:dashboard-lightning 4s linear infinite}
[data-condition=sun] .weather-sun,[data-condition=cloud] .weather-cloud,[data-condition=cloud][data-sunny=true] .weather-sun,[data-condition=rain] .weather-cloud,[data-condition=rain] .weather-drop,[data-condition=snow] .weather-cloud,[data-condition=snow] .weather-drop,[data-condition=storm] .weather-cloud,[data-condition=storm] .weather-bolt,[data-condition=fog] .weather-cloud,[data-condition=fog] .weather-mist{display:block}
[data-condition=cloud] .weather-sun{left:9px;top:9px;width:28px;height:28px}[data-condition=snow] .weather-drop{width:4px;height:4px;background:#e9f7ff;animation-duration:2.8s}[data-condition=storm] .weather-cloud{background:#91a5c2}
@keyframes dashboard-sun{to{transform:rotate(360deg)}}@keyframes dashboard-cloud{to{transform:translateX(5px)}}@keyframes dashboard-rain{from{transform:translate(0,-3px);opacity:0}25%{opacity:1}to{transform:translate(-4px,14px);opacity:0}}@keyframes dashboard-lightning{0%,90%,100%{opacity:.35}94%{opacity:1}}
@media(max-width:1000px){.tarvi-dashboard{padding-left:204px}.dashboard-day{width:164px;left:18px}.dashboard-clock{font-size:52px}body.dashboard-active #voice-panel{left:28px!important;width:164px!important}.dashboard-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:175px}.dashboard-card[data-size=L],.dashboard-card[data-size=XL]{grid-column:span 4}.dashboard-card[data-size=M]{grid-column:span 2}.dashboard-heading{align-items:flex-start;flex-wrap:wrap}.dashboard-weather-current{gap:0}.dashboard-card-body .dashboard-temperature{font-size:38px}}
@media(max-height:800px) and (min-width:701px){body.dashboard-active .dashboard-dock-toggle{display:block}body.dashboard-active.dashboard-dock-compact #voice-stage{height:52px!important}body.dashboard-active.dashboard-dock-compact .voice-orb-wrap,body.dashboard-active.dashboard-dock-compact #live-toggle,body.dashboard-active.dashboard-dock-compact #live-neural{width:52px!important;height:52px!important}body.dashboard-active.dashboard-dock-compact .dashboard-composer{display:none}body.dashboard-active #voice-panel{max-height:calc(100dvh - var(--dashboard-top,100px) - 30px)}}
@media(max-width:700px){.tarvi-dashboard{inset:var(--dashboard-top,90px) 6px 6px;padding:14px 12px 130px;border-radius:14px}.dashboard-day{position:static;width:auto;display:grid;grid-template-columns:1fr 1fr;column-gap:12px;align-items:start;margin-bottom:16px}.dashboard-clock{font-size:52px;grid-column:1;margin:0}.dashboard-date{grid-column:1;font-size:12px}.dashboard-sidebar-weather{grid-column:2;grid-row:1/span 3;margin:0;padding:0 0 0 12px;border-top:0;border-left:1px solid #9ebfeb26}.dashboard-weather-current{gap:2px}.dashboard-weather-scene{width:76px;height:70px;margin-left:-8px}.dashboard-weather-forecast{display:none}.dashboard-card-body .dashboard-weather-detail{font-size:10px}.dashboard-heading h1{font-size:22px}.dashboard-heading .eyebrow{display:none}.dashboard-heading .item-actions{gap:2px}.dashboard-status{margin-bottom:10px}.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:165px;gap:8px}.dashboard-card[data-size=L],.dashboard-card[data-size=XL]{grid-column:span 2;grid-row:span 3}.dashboard-card[data-size=M]{grid-column:span 2}.dashboard-card[data-size=S]{grid-column:span 1}.dashboard-card{padding:10px}.dashboard-calendar-week{grid-template-columns:1fr}.dashboard-calendar-week .dashboard-calendar-day{display:grid;grid-template-columns:64px minmax(0,1fr);align-content:start;column-gap:5px}.dashboard-calendar-week .dashboard-day-button{grid-column:1;grid-row:1/span 30}.dashboard-calendar-week .dashboard-calendar-event,.dashboard-calendar-week .dashboard-calendar-free{grid-column:2}.dashboard-calendar-month{gap:2px}.dashboard-calendar-month .dashboard-calendar-day{padding:2px}.dashboard-calendar-month .dashboard-day-button{font-size:9px;padding:5px 0}.dashboard-calendar-month .dashboard-calendar-event strong{font-size:9px}.dashboard-calendar-nav{justify-content:space-between;width:100%}.dashboard-calendar-date{font-size:16px;width:145px}.dashboard-calendar-controls button{min-height:36px!important}.dashboard-setting-row{grid-template-columns:minmax(95px,1fr) 65px 40px 40px;gap:5px}.dashboard-setting-row select{font-size:16px}body.dashboard-active #voice-panel{left:16px!important;right:16px!important;width:auto!important;bottom:max(14px,env(safe-area-inset-bottom))!important;padding:8px 12px!important;max-height:50dvh}body.dashboard-active .dashboard-dock-toggle{display:block;float:right}body.dashboard-active #voice-stage{height:52px!important;width:80px!important}body.dashboard-active .voice-orb-wrap,body.dashboard-active #live-toggle,body.dashboard-active #live-neural{width:52px!important;height:52px!important}.dashboard-composer form{display:grid;grid-template-columns:1fr auto;align-items:center}.dashboard-composer textarea{min-height:52px!important}.dashboard-composer>button{margin-top:4px}body.dashboard-active.dashboard-dock-compact .dashboard-composer{display:none}body.dashboard-active:not(.dashboard-dock-compact) .tarvi-dashboard{padding-bottom:300px}}
@media(prefers-reduced-motion:reduce){.dashboard-weather-scene *,.dashboard-weather-scene *::before{animation:none!important}.tarvi-dashboard button,.dashboard-composer button{transition:none;transform:none!important}}
/* Use the card's width, including tablet and small user-selected sizes. */
.dashboard-card[data-widget=calendar]{container-type:inline-size}
.dashboard-card[data-widget=calendar][data-size=S],.dashboard-card[data-widget=calendar][data-size=M]{grid-column:span 2;grid-row:span 2}
@container (max-width:600px){
  .dashboard-calendar-week{grid-template-columns:1fr}
  .dashboard-calendar-week .dashboard-calendar-day{display:grid;grid-template-columns:64px minmax(0,1fr);align-content:start;column-gap:5px}
  .dashboard-calendar-week .dashboard-day-button{grid-column:1;grid-row:1/span 30}
  .dashboard-calendar-week .dashboard-calendar-event,.dashboard-calendar-week .dashboard-calendar-free{grid-column:2}
}
/* Panels and details share one readable, keyboard-accessible presentation. */
.dashboard-card-title{border:0;background:transparent;color:inherit;font:inherit;font-weight:650;text-align:left;padding:0;cursor:pointer}
.dashboard-entry-list{list-style:none;padding:0;margin:0}.dashboard-entry-list>li{padding:0!important}.dashboard-entry{width:100%;display:flex;gap:8px;border:0;background:transparent;text-align:left;padding:9px 2px;color:inherit;cursor:pointer;border-radius:6px}.dashboard-entry-number{font-size:10px;color:#7b98b9;min-width:16px;padding-top:3px;font-variant-numeric:tabular-nums}.dashboard-entry-text{min-width:0;flex:1}.dashboard-entry-text strong{display:block}.dashboard-entry-detail{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;font-size:12px;line-height:1.45;color:#aabbd1;margin-top:3px}.dashboard-entry:focus-visible{outline:2px solid #8ad5ff;outline-offset:-2px}.dashboard-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.065em;color:#9ab8dc;margin:14px 0 5px}.dashboard-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(65px,1fr));gap:7px;margin:0 0 10px}.dashboard-metrics>div{padding:8px;border:1px solid #9ebfeb20;border-radius:8px;background:#09142566}.dashboard-metrics strong{display:block;font-size:22px;font-weight:550;color:#b4e4ff}.dashboard-metrics span{display:block;font-size:10px;color:#9eb6d4}.dashboard-panel-note{font-size:11px!important;color:#93a8c2!important;margin:12px 0 0!important}
.dashboard-preview{width:min(1000px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);padding:20px;border:1px solid #86b9f04d;border-radius:18px;background:#111e30;color:#edf3fc;box-shadow:0 24px 100px #0009;overflow:auto;overscroll-behavior:contain}.dashboard-preview::backdrop{background:#020814b8}.dashboard-preview>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.dashboard-preview h2{font-size:24px;margin:0}.dashboard-preview-tools{display:flex;gap:8px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #91b0dd2b;margin-bottom:14px}.dashboard-preview .dashboard-card-body{overflow:visible;max-height:none}.dashboard-preview .dashboard-entry-text strong{font-size:15px}.dashboard-preview .dashboard-entry-detail{display:block;-webkit-line-clamp:unset;font-size:13px}.dashboard-preview .dashboard-metrics strong{font-size:28px}.dashboard-preview-body{overflow-wrap:anywhere;min-height:120px}.dashboard-preview-body h3{font-size:20px;margin:0 0 14px}.dashboard-preview-body h3.dashboard-section-title{font-size:12px;margin:20px 0 8px}.dashboard-preview-body .dashboard-detail-text{white-space:pre-wrap;font-size:15px;line-height:1.75;color:#dde8f6;margin-top:20px}.dashboard-detail-meta{color:#aabbd1;font-size:13px}.dashboard-detail-facts{display:grid;grid-template-columns:minmax(90px,140px) minmax(0,1fr);gap:8px 16px;padding:14px;background:#07132366;border-radius:10px;font-size:13px}.dashboard-detail-facts dt{color:#91b0d0}.dashboard-detail-facts dd{margin:0;white-space:pre-wrap}.dashboard-preview .dashboard-calendar-days{min-height:320px}.dashboard-preview .dashboard-calendar-event strong{font-size:13px}
.dashboard-layout-preview{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;max-width:720px;max-height:340px;overflow:auto;padding:12px;border:1px solid #88aacc40;border-radius:12px;background:#0b1320;color:#dbeaff;overscroll-behavior:contain}.dashboard-mini-sidebar{display:flex;flex-direction:column;gap:8px;font-size:10px}.dashboard-mini-sidebar strong{font-size:22px;font-weight:400}.dashboard-mini-sidebar span:last-child{margin-top:auto;padding-bottom:8px}.dashboard-mini-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:42px;gap:5px;align-content:start}.dashboard-mini-card{border:1px solid #7ea7d44d;border-radius:5px;background:#263c58;color:#dbeaff;padding:5px;font-size:10px;line-height:1.3;overflow:hidden;cursor:pointer;text-align:left;min-width:0}.dashboard-mini-card[data-size=S]{grid-column:span 1}.dashboard-mini-card[data-size=M]{grid-column:span 2}.dashboard-mini-card[data-size=L]{grid-column:span 4;grid-row:span 2}.dashboard-mini-card[data-size=XL]{grid-column:span 6;grid-row:span 2}.dashboard-mini-card[data-mini-widget=calendar][data-size=S],.dashboard-mini-card[data-mini-widget=calendar][data-size=M]{grid-column:span 2;grid-row:span 2}.dashboard-settings>input[type=search]{width:100%;max-width:720px;margin:12px 0;font-size:16px}.dashboard-setting-row[hidden]{display:none}.dashboard-setting-row:focus-within{background:#78b6f310;border-radius:8px}.dashboard-setting-row label{font-size:13px}
@media(max-width:700px){.dashboard-preview{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);padding:14px;border-radius:12px}.dashboard-preview h2{font-size:21px}.dashboard-detail-facts{grid-template-columns:80px minmax(0,1fr);gap:8px}.dashboard-layout-preview{grid-template-columns:54px minmax(0,1fr);padding:8px;gap:7px}.dashboard-mini-grid{grid-auto-rows:32px;gap:3px}.dashboard-mini-card{font-size:8px;padding:3px}.dashboard-mini-sidebar strong{font-size:18px}.dashboard-entry{padding-block:11px}}

.dashboard-setting-row{grid-template-columns:minmax(130px,1fr) 70px 62px 36px 36px;gap:8px}
.dashboard-setting-row select{min-width:0;padding-inline:8px}
@media(max-width:700px){.dashboard-setting-row{grid-template-columns:minmax(75px,1fr) 52px 48px 32px 32px;gap:4px}.dashboard-setting-row button{padding-inline:6px}.dashboard-setting-row label{font-size:12px;gap:6px}}
/* Objects, not identical rows: each content type has a recognizable material. */
.dashboard-entry-icon{width:20px;height:20px;flex:none;display:block}
.dashboard-designed-entry{position:relative;align-items:flex-start;gap:10px;padding:11px 8px;border:1px solid transparent;border-radius:10px;line-height:1.4;overflow-wrap:anywhere;max-width:100%;min-width:0}
.dashboard-designed-entry .dashboard-entry-number{font-size:10px;min-width:14px;opacity:.75;margin-left:auto;flex:none}
.dashboard-entry-list:has(.dashboard-designed-entry)>li{border-top:0!important;margin-bottom:6px}
.dashboard-designed-entry .dashboard-entry-text strong{font-size:13px;line-height:1.45;letter-spacing:-.01em}
.dashboard-designed-entry .dashboard-entry-detail{margin-top:5px;font-size:11px}
.dashboard-avatar{--avatar-hue:205;width:35px;height:35px;flex:none;display:grid;place-items:center;border-radius:12px;background:hsl(var(--avatar-hue) 36% 25%);border:1px solid hsl(var(--avatar-hue) 42% 42% / .6);color:hsl(var(--avatar-hue) 80% 87%);font-size:12px;font-weight:650;letter-spacing:.03em}
.dashboard-avatar .dashboard-entry-icon{width:22px;height:22px}
.dashboard-type-mark,.dashboard-flow-mark{flex:none;display:grid;place-items:center;width:30px;height:34px;color:#92bddf;background:#88b4e40e;border:1px solid #88b4e425;border-radius:7px}
.dashboard-flow-mark{width:30px;height:30px;border-radius:50%;background:#76cdb712;color:#89cfbe;border-color:#76cdb72b}
.dashboard-designed-entry[data-kind=tasks] .dashboard-type-mark{background:transparent;border:0;color:#adc8ea}
.dashboard-designed-entry[data-kind=documents] .dashboard-type-mark,.dashboard-designed-entry[data-kind=office] .dashboard-type-mark{background:#e2edff16;border-radius:3px;color:#bfd8f4}
.dashboard-status-chip{display:inline-flex;align-items:center;gap:5px;font-size:10px;line-height:1.4;font-weight:550;padding:3px 7px;border-radius:5px;background:#94a8c51a;color:#b7c7dd;margin-top:6px;max-width:100%;white-space:normal}
.dashboard-status-chip::before{content:'';width:5px;height:5px;flex:none;border-radius:50%;background:currentColor}
.dashboard-status-chip[data-tone=green]{background:#70c9a61a;color:#94dfbd}.dashboard-status-chip[data-tone=amber]{background:#dfb66318;color:#efcb87}.dashboard-status-chip[data-tone=danger]{background:#d4757a1c;color:#efa6ab}
.dashboard-person-capacity{display:inline-block;margin-top:7px;color:#a1c9ed;font-size:10px;padding:3px 7px;background:#90bbf00d;border:1px solid #90bbf025;border-radius:5px;font-variant-numeric:tabular-nums}
.dashboard-agent-meter{display:block;height:4px;background:#9db9d51a;border-radius:3px;margin-top:10px;max-width:130px;overflow:hidden}.dashboard-agent-meter>span{display:block;height:100%;background:linear-gradient(90deg,#6e9ce0,#84d5c2);border-radius:inherit}
/* Warm stationery; text is never rotated or moved. */
.dashboard-entry-list[data-panel-kind=notes]{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:12px;padding:7px 3px 5px}
.dashboard-entry-list[data-panel-kind=notes]>li{min-width:0;margin:0!important}
.dashboard-designed-entry.dashboard-note,[data-detail-kind=notes]{--paper:#f0e1a8;--paper-ink:#423b2a;background-color:var(--paper);background-image:repeating-linear-gradient(0deg,transparent 0 23px,#70603c12 23px 24px);color:var(--paper-ink);border:1px solid #fff8;box-shadow:0 4px 10px #0002;position:relative;border-radius:3px 3px 14px 3px}
.dashboard-designed-entry.dashboard-note{display:flex;flex-direction:column;gap:10px;min-height:146px;padding:16px 13px 12px;overflow:visible}
.dashboard-designed-entry.dashboard-note[data-paper="1"],[data-detail-kind=notes][data-paper="1"]{--paper:#d6e5d3;--paper-ink:#304b39}.dashboard-designed-entry.dashboard-note[data-paper="2"],[data-detail-kind=notes][data-paper="2"]{--paper:#e4d8ed;--paper-ink:#51405e}
.dashboard-note::before{content:'';position:absolute;width:42px;height:11px;top:-5px;left:calc(50% - 21px);background:#f9efd1a8;box-shadow:0 1px 2px #00000014;transform:rotate(-3deg)}
.dashboard-note::after{content:'';position:absolute;bottom:0;right:0;width:14px;height:14px;background:linear-gradient(135deg,#00000012 48%,#ffffff70 50%);border-radius:3px 0 13px 0}
.dashboard-note-meta{display:flex;align-items:center;gap:6px;width:100%;font-size:10px;font-weight:650;color:var(--paper-ink);opacity:.8;font-variant-numeric:tabular-nums}.dashboard-note-meta .dashboard-entry-icon{width:13px;height:13px}.dashboard-note .dashboard-entry-number{color:var(--paper-ink);padding:0}
.dashboard-note-writing{font-family:Georgia,'Times New Roman',serif;font-size:15px;line-height:1.6;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-align:left;word-break:normal;width:100%}
.dashboard-note-footer{font-size:9px;letter-spacing:.045em;color:var(--paper-ink);opacity:.6;margin-top:auto;padding-top:3px}
/* RSS previews use actual feed thumbnails through the existing authenticated cache. */
.dashboard-designed-entry.dashboard-news-story{display:grid;grid-template-columns:88px minmax(0,1fr);gap:11px;padding:10px 0;border-radius:0;border-bottom:1px solid #adc7ec1c}
.dashboard-news-story>.dashboard-entry-number{position:absolute;right:0;bottom:4px;font-size:9px}
.dashboard-news-image{display:block;position:relative;width:88px;aspect-ratio:4/3;overflow:hidden;border-radius:7px;background:linear-gradient(135deg,#2e5365,#26314e);border:1px solid #a6bddd1a;flex:none}
.dashboard-news-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#96c2ce;background:repeating-linear-gradient(135deg,transparent 0 18px,#c5e5ff06 18px 19px);font-size:8px;letter-spacing:.13em}
.dashboard-news-placeholder .dashboard-entry-icon{width:25px;height:25px;opacity:.8}
.dashboard-news-image img{position:absolute;width:100%;height:100%;inset:0;object-fit:cover;display:block}.dashboard-news-image img[hidden]{display:none}.dashboard-news-image.is-loaded .dashboard-news-placeholder{display:none}
.dashboard-news-byline{display:block;color:#8fc8dc;font-size:9px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;margin:0 0 4px;overflow-wrap:anywhere}
.dashboard-designed-entry .dashboard-news-headline{font-family:Georgia,'Times New Roman',serif;font-size:14px;font-weight:600;line-height:1.35;letter-spacing:0}
.dashboard-news-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;color:#aabbd1;line-height:1.4;margin-top:5px}.dashboard-news-date{display:block;font-size:9px!important;color:#8a9fb9!important;margin-top:6px}
/* Correspondence: sender, subject, mailbox. No invented unread indicators. */
.dashboard-designed-entry[data-kind=mail]{background:#9bbdeb06;border:1px solid #9bbdeb1c;padding:11px 9px}
.dashboard-mail-meta{display:flex;align-items:baseline;gap:8px;font-size:11px;color:#b5c7df;margin-bottom:4px}.dashboard-mail-meta>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.dashboard-mail-meta .dashboard-entry-number{padding:0}
.dashboard-mail-footer{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:9px;color:#839dbc;font-size:9px}.dashboard-mail-footer .dashboard-entry-icon{width:12px;height:12px}.dashboard-mail-footer>span:last-child{margin-left:auto}
/* Documents and amounts get a quiet receipt edge and tabular figures. */
.dashboard-designed-entry.dashboard-receipt{display:block;padding:12px 12px 17px;background:linear-gradient(135deg,#dce8f510,#b2cce704);border:1px solid #c2d7f12b;border-radius:3px 3px 0 0}
.dashboard-receipt::after{content:'';position:absolute;bottom:0;left:0;right:0;height:5px;background:linear-gradient(135deg,transparent 50%,#17263a 50%) 0 0/8px 8px,linear-gradient(225deg,transparent 50%,#17263a 50%) 0 0/8px 8px}
.dashboard-receipt-top{display:flex;align-items:center;gap:5px;font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:#92adc9;margin-bottom:9px}.dashboard-receipt-top .dashboard-entry-icon{width:14px;height:14px}.dashboard-receipt-top .dashboard-entry-number{padding:0}
.dashboard-receipt-amount{display:block;font-size:21px;font-weight:450;letter-spacing:-.035em;color:#e1edf9;margin-top:10px;font-variant-numeric:tabular-nums}
.dashboard-preview [data-detail-kind=notes]{padding:24px;color:var(--paper-ink)}.dashboard-preview [data-detail-kind=notes] h3{font-size:15px;color:var(--paper-ink)}.dashboard-preview [data-detail-kind=notes] .dashboard-detail-text{font-family:Georgia,'Times New Roman',serif;color:var(--paper-ink);font-size:19px;line-height:1.8}.dashboard-preview [data-detail-kind=notes] .dashboard-detail-facts{background:#ffffff30}.dashboard-preview [data-detail-kind=notes] .dashboard-detail-facts dt,.dashboard-preview [data-detail-kind=notes] .dashboard-detail-facts dd{color:var(--paper-ink)}
.dashboard-news-hero{width:100%;aspect-ratio:21/9;max-height:300px;margin-bottom:20px;border-radius:10px}.dashboard-preview .dashboard-news-story{grid-template-columns:140px minmax(0,1fr)}.dashboard-preview .dashboard-news-story .dashboard-news-image{width:140px}.dashboard-preview .dashboard-news-headline{font-size:20px}.dashboard-preview .dashboard-news-excerpt{font-size:13px}.dashboard-preview [data-detail-kind=news] h3{font-family:Georgia,'Times New Roman',serif;font-size:28px;line-height:1.3}
.dashboard-designed-entry:focus-visible{outline:2px solid #86d9ff;outline-offset:1px}.dashboard-note:focus-visible{outline-color:#78cafa}
@media(hover:hover) and (pointer:fine){.dashboard-designed-entry:not(.dashboard-note):hover{border-color:#a4c9f04a;background-color:#9bbdeb0c}.dashboard-note:hover{box-shadow:0 5px 15px #0003}.dashboard-card-title:hover{color:#a8daff}}
@media(max-width:700px){.dashboard-entry-list[data-panel-kind=notes]{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:10px}.dashboard-designed-entry.dashboard-news-story{grid-template-columns:76px minmax(0,1fr);gap:9px}.dashboard-news-image{width:76px}.dashboard-preview .dashboard-news-story{grid-template-columns:90px minmax(0,1fr)}.dashboard-preview .dashboard-news-story .dashboard-news-image{width:90px}.dashboard-preview .dashboard-news-headline{font-size:16px}.dashboard-preview [data-detail-kind=news] h3{font-size:22px}.dashboard-preview [data-detail-kind=notes]{padding:18px}.dashboard-preview [data-detail-kind=notes] .dashboard-detail-text{font-size:17px}.dashboard-news-hero{width:100%}}

/* A quiet paper carousel: only the selected sheet is interactive. */
.dashboard-note-carousel{min-width:0;overflow:hidden}
.dashboard-note-stage{position:relative;height:222px;perspective:900px;overflow:hidden;touch-action:pan-y pinch-zoom;border-radius:10px;outline-offset:-3px}
.dashboard-note-slide{position:absolute;inset:12px 12% 10px;transform-origin:center;transition:transform 180ms cubic-bezier(.23,1,.32,1),opacity 180ms cubic-bezier(.23,1,.32,1)}
.dashboard-note-slide .dashboard-note{width:100%;height:100%;min-height:0;text-align:left}
.dashboard-note-slide .dashboard-note-writing{-webkit-line-clamp:5}
.dashboard-note-controls{display:flex;align-items:center;justify-content:center;gap:18px;padding:4px}
.dashboard-note-controls button{min-width:36px;min-height:36px;font-size:19px}
.dashboard-note-count{font-variant-numeric:tabular-nums;font-size:12px;min-width:45px;text-align:center}
.dashboard-carousel-hint{text-align:center;font-size:11px;opacity:.6;margin:3px 0 0}
.dashboard-note-slide[inert]{pointer-events:none}
@media(prefers-reduced-motion:reduce){.dashboard-note-slide{transition:none}}
.dashboard-card[data-widget=notes] .dashboard-card-body{display:flex;flex-direction:column;overscroll-behavior:auto}
.dashboard-card[data-widget=notes] .dashboard-note-carousel{display:flex;flex-direction:column;flex:1;min-height:0}
.dashboard-card[data-widget=notes] .dashboard-note-stage{height:auto;flex:1;min-height:100px}
.dashboard-note-slide .dashboard-note{display:flex;flex-direction:column;overflow:hidden}
.dashboard-note-slide .dashboard-note-writing{flex:1;min-height:0}
.dashboard-note-controls,.dashboard-carousel-hint{flex-shrink:0}
.dashboard-card[data-widget=notes] .dashboard-carousel-hint{display:none}
.dashboard-card[data-widget=notes] .dashboard-note-slide .dashboard-note{padding:10px;gap:5px}
.dashboard-card[data-widget=notes] .dashboard-note-footer{display:none}
.dashboard-note-controls button{border:1px solid #91b0dd40;background:#122236;color:#dceafa;border-radius:8px;cursor:pointer}
.dashboard-note-controls button:disabled{opacity:.35;cursor:default}

/* Locally served handwriting: no font request leaves Tarvi. */
@font-face{font-family:'Tarvi Hand';src:url('/ui/fonts/PatrickHand-Regular.ttf') format('truetype');font-display:swap;font-style:normal;font-weight:400}
.dashboard-note-writing,.dashboard-preview [data-detail-kind=notes] .dashboard-detail-text{font-family:'Tarvi Hand','Segoe Print','Bradley Hand',cursive;font-weight:400;font-size:22px;line-height:1.35;letter-spacing:.015em}
.dashboard-designed-entry.dashboard-note,[data-detail-kind=notes]{background-image:linear-gradient(90deg,transparent 0 16px,#bd757520 16px 17px,transparent 17px),repeating-linear-gradient(0deg,transparent 0 28px,#70603c16 28px 29px),radial-gradient(ellipse at 20% 0,#fff5,transparent 70%);box-shadow:0 8px 18px #0003,inset 0 1px #fff8;border-radius:2px 5px 16px 4px}
.dashboard-note-slide{transition:transform 420ms cubic-bezier(.32,.72,0,1),opacity 420ms cubic-bezier(.32,.72,0,1);inset:12px 10% 12px}
.dashboard-note-slide .dashboard-note-writing{-webkit-line-clamp:unset}
.dashboard-card[data-widget=notes] .dashboard-note-slide .dashboard-note{padding:16px 14px 12px 24px;gap:12px}
.dashboard-card:is([data-widget=notes],[data-widget=contacts]):is([data-size=S],[data-size=M]){grid-row:span 2}
.dashboard-card:is([data-widget=notes],[data-widget=contacts]) .dashboard-card-body{display:flex;flex-direction:column;overscroll-behavior:auto}
.dashboard-collection{display:flex;flex-direction:column;gap:7px;min-height:0;flex:1}
.dashboard-collection-toolbar{display:flex;gap:3px;align-self:flex-start;padding:3px;background:#07101c70;border-radius:9px;flex-shrink:0}
.dashboard-collection-toolbar button{border:0;background:none;color:#aebdd0;border-radius:6px;padding:5px 9px;font:inherit;font-size:11px;min-height:28px;cursor:pointer}
.dashboard-collection-toolbar button[aria-pressed=true]{background:#88bbef24;color:#e1f2ff;box-shadow:0 1px 3px #0003}
.dashboard-collection>input{box-sizing:border-box;width:100%;min-width:0;font-size:16px;min-height:36px;border:1px solid #91b0dd40;border-radius:8px;background:#0c192a;color:#e1edf9;padding:6px 9px;flex-shrink:0}
.dashboard-collection-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;overscroll-behavior:auto}
.dashboard-collection .dashboard-note-carousel{display:flex;flex-direction:column;flex:1;min-height:180px;overflow:hidden}
.dashboard-collection .dashboard-note-stage{height:auto;flex:1;min-height:130px}
.dashboard-collection .dashboard-carousel-hint{display:none}
.dashboard-preview .dashboard-collection .dashboard-note-stage{min-height:310px}
.dashboard-collection-list{display:flex;flex-direction:column;gap:8px;list-style:none;margin:0;padding:0}
.dashboard-collection-list>li{padding:0!important;border:0!important}
.dashboard-collection-list .dashboard-note{min-height:96px;padding:12px 14px 12px 24px!important;gap:5px}
.dashboard-collection-list .dashboard-note-writing{font-size:20px;-webkit-line-clamp:2;flex:none}
.dashboard-collection-list .dashboard-note::before{display:none}
.dashboard-contact{display:flex;flex-direction:column;gap:15px;padding:20px;width:100%;height:100%;box-sizing:border-box;overflow:hidden;background:linear-gradient(135deg,#f6f2e9,#e4ebed);color:#233d4b;border:1px solid #fff8;border-radius:12px;box-shadow:0 8px 18px #0003;position:relative;text-align:left}
.dashboard-contact-heading{display:flex;align-items:center;gap:10px;min-width:0;width:100%;border-bottom:1px solid #25445d20;padding-bottom:12px}
.dashboard-contact-heading strong{font-size:18px!important;color:#203a4b;overflow-wrap:anywhere}
.dashboard-contact .dashboard-avatar{width:42px;height:42px;font-size:16px;flex:none;color:#284455;background:#b8cdd4}
.dashboard-contact-details{display:flex;flex-direction:column;gap:12px;width:100%;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:6px;box-sizing:border-box;text-align:left}
.dashboard-contact-line{white-space:pre-wrap;flex:none;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere;font-size:13px;color:#2e4a58}
.dashboard-contact-line small{font-size:9px;letter-spacing:.07em;text-transform:uppercase;color:#647e8b}
.dashboard-contact>.dashboard-entry-number{position:absolute;bottom:8px;right:10px;color:#677e87}
.dashboard-collection-list .dashboard-contact{height:auto;gap:5px;padding:10px 12px;background:#9bbdeb09;color:#dde8f6;border-color:#9bbdeb26;box-shadow:none}
.dashboard-collection-list .dashboard-contact-heading{border:0;padding:0}
.dashboard-collection-list .dashboard-contact-heading strong{color:#dde8f6;font-size:14px!important}
.dashboard-collection-list .dashboard-contact-details{padding-left:52px;box-sizing:border-box;gap:3px}
.dashboard-collection-list .dashboard-contact-line{color:#b9cddd;font-size:12px;display:block}
.dashboard-collection-list .dashboard-contact-line small{display:block}
@media(hover:hover) and (pointer:fine){.dashboard-contact:hover{background-color:#f1f3ef!important;border-color:#fff!important}.dashboard-collection-list .dashboard-contact:hover{background:#9bbdeb15!important}}
@media(prefers-reduced-motion:reduce){.dashboard-note-slide{transition:none}}
.dashboard-collection-content>button{border:1px solid #91b0dd30;border-radius:7px;background:#9bbdeb08;color:#b8cfe4;padding:6px 10px;font-size:11px;cursor:pointer;flex-shrink:0}

/* Einstellungen › Dashboard: preview and windows side by side, windows as a grid of small cards, order by dragging (sortable.js) */
.dashboard-settings{display:grid;grid-template-columns:minmax(0,1fr);gap:10px 24px;align-items:start}
.dashboard-settings>h2,.dashboard-settings>.help:not(.dashboard-settings-caption),.dashboard-settings>.status,.dashboard-settings>button{grid-column:1/-1}
.dashboard-settings>button{justify-self:start}
.dashboard-settings .dashboard-settings-search{max-width:none;margin:0}
.dashboard-settings .dashboard-settings-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;align-content:start}
.dashboard-settings .dashboard-setting-row{grid-template-columns:auto minmax(0,1fr) 58px 58px;gap:6px;padding:8px 10px;border:1px solid var(--k-line,#96aac826);border-top:1px solid var(--k-line,#96aac826);border-radius:12px;
  background:var(--k-surface-2,#78b6f30a);cursor:grab;touch-action:none;transition:border-color .15s ease,opacity .15s ease}
.dashboard-settings .dashboard-setting-row[data-fixed]{cursor:default}
.dashboard-settings .dashboard-setting-row[data-fixed] .dashboard-drag-handle{visibility:hidden}
.dashboard-settings .dashboard-setting-row.is-off{opacity:.62}
.dashboard-settings .dashboard-setting-row label{font-size:13px;min-width:0;gap:8px}
.dashboard-settings .dashboard-setting-row select{padding-inline:6px;min-height:34px}
.dashboard-settings .dashboard-setting-row:focus-visible{outline:2px solid var(--k-accent,#22d3ee);outline-offset:2px}
.dashboard-drag-handle{color:var(--k-muted,#8a94a3);font-size:16px;line-height:1;cursor:grab;user-select:none}
.is-sorting{cursor:grabbing}
.is-sorting .is-dragging{position:relative;z-index:5;cursor:grabbing;box-shadow:0 14px 34px #0008;opacity:.95}
.is-drop-target{border-color:var(--k-accent,#22d3ee)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--k-accent,#22d3ee) 35%,transparent)}
.dashboard-settings-preview .dashboard-mini-card{touch-action:none;cursor:grab}
@media(min-width:1100px){
  .dashboard-settings{grid-template-columns:minmax(340px,460px) minmax(0,1fr)}
  .dashboard-settings .dashboard-settings-preview{grid-column:1;grid-row:3;max-width:none;position:sticky;top:calc(var(--tarvi-head,0px) + 1rem)}
  .dashboard-settings .dashboard-settings-caption{grid-column:1;grid-row:4}
  .dashboard-settings .dashboard-settings-search{grid-column:2;grid-row:3;align-self:start}
  .dashboard-settings .dashboard-settings-list{grid-column:2;grid-row:3 / span 3;margin-top:58px}
}
@media(max-width:700px){.dashboard-settings .dashboard-settings-list{grid-template-columns:1fr}.dashboard-settings .dashboard-setting-row{grid-template-columns:auto minmax(0,1fr) 52px 52px}}
@media(prefers-reduced-motion:reduce){.dashboard-settings .dashboard-setting-row{transition:none}}

.dashboard-contact-heading{flex:none}.dashboard-contact-identity{align-items:flex-start;display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.dashboard-contact-subtitle{font-size:12px;color:#526d79;overflow-wrap:anywhere}.dashboard-contact-favorite{color:#a27116;font-size:20px;flex:none}.dashboard-collection-list .dashboard-contact-subtitle{color:#b9cddd}.dashboard-collection-list .dashboard-contact-details{overflow:visible;gap:9px;padding-top:12px}.dashboard-collection-list .dashboard-contact-line small{color:#91a9bb}

.dashboard-contact-preview{padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}.dashboard-contact-actions{display:flex;align-items:center;gap:10px;flex:none;padding-top:8px;border-top:1px solid #25445d20}.dashboard-contact-call{padding:8px 16px;border-radius:999px;border:1px solid #25445d40;background:#234b59;color:#fff;font:inherit;font-size:13px;cursor:pointer}.dashboard-contact-call:disabled{opacity:.5;cursor:default}.dashboard-contact-preview:focus-visible,.dashboard-contact-call:focus-visible{outline:2px solid #008a9b;outline-offset:3px}.dashboard-collection-list .dashboard-contact-actions{margin-left:52px}.dashboard-contact{cursor:default}

.dashboard-contact-details:focus-visible{outline:2px solid #008a9b;outline-offset:-2px}

/* Konten, Kennenlernen und Freigaben (KONTEN_PLAN.md) */
.accounts-own-name { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 .25rem; }
.accounts-pill { font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; background: var(--k-surface-2, rgba(127,127,127,.15)); color: var(--k-text-2, inherit); }
.accounts-pill.is-active { background: color-mix(in srgb, var(--k-accent, #22d3ee) 18%, transparent); color: var(--k-accent, #22d3ee); }
.accounts-pill.is-locked, .accounts-pill.is-deleting { background: rgba(239, 68, 68, .14); color: #ef4444; }
.accounts-row .item-actions { flex-wrap: wrap; align-items: center; }
.accounts-budget { width: 6.5rem; }
.accounts-invite-result { margin-top: .75rem; padding: .9rem 1rem; border-radius: 14px; background: var(--k-surface-2, rgba(127,127,127,.1)); }
.accounts-code { font: 600 2rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; margin: 0 0 .4rem; }
.accounts-link { word-break: break-all; }
.accounts-danger { margin-top: 1rem; }
.accounts-danger summary { cursor: pointer; color: #ef4444; }

/* Kennenlernen (onboarding) */
.onboarding { position: fixed; inset: 0; z-index: 2400; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--k-bg, #0b0f14) 72%, transparent); backdrop-filter: blur(10px); }
.onboarding[hidden] { display: none; }
.onboarding-panel { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 22px; padding: 1.4rem 1.4rem 1.2rem;
  background: var(--k-surface, #121821); color: var(--k-text, inherit); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.onboarding-panel h2 { margin: .1rem 0 .4rem; }
.onboarding-steps { list-style: none; margin: .8rem 0; padding: 0; display: grid; gap: .35rem; }
.onboarding-steps li { display: flex; gap: .55rem; align-items: baseline; }
.onboarding-steps li::before { content: "○"; color: var(--k-text-3, #8a94a3); }
.onboarding-steps li.is-done::before { content: "●"; color: var(--k-accent, #22d3ee); }
.onboarding-steps li.is-skipped::before { content: "–"; }
.onboarding-form { display: grid; gap: .45rem; margin-top: .6rem; }
.onboarding-form .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.onboarding-facts { display: grid; gap: .4rem; margin: .6rem 0; }
.onboarding-facts label { display: flex; gap: .5rem; align-items: flex-start; }
.onboarding-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1rem; }

/* Freigaben */
.shares-list .item-main p { margin: .15rem 0 0; }
.shares-badge { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; margin-left: .35rem;
  background: color-mix(in srgb, var(--k-accent, #22d3ee) 16%, transparent); color: var(--k-accent, #22d3ee); }
.shared-section { margin-top: 1rem; }
.shared-section h3 .shares-badge { vertical-align: middle; }
.onboarding.is-compact { place-items: end; background: transparent; backdrop-filter: none; pointer-events: none; }
.onboarding.is-compact .onboarding-panel { pointer-events: auto; width: min(440px, 100%); }
.shares-viewer { margin-top: .6rem; padding: .8rem; border-radius: 14px; background: var(--k-surface-2, rgba(127,127,127,.08)); }
.shares-viewer ul { margin: .3rem 0; padding-left: 1.1rem; }
.shares-viewer .row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.shares-viewer input[type="text"], .shares-viewer input[type="number"], .shares-viewer textarea { flex: 1 1 10rem; }
.onboarding-suggestions { display: grid; gap: .5rem; margin: .4rem 0 .6rem; }
.onboarding-suggestion { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .6rem .75rem; border-radius: 12px;
  background: var(--k-surface-2, rgba(127,127,127,.08)); }
.onboarding-suggestion p { margin: .1rem 0 0; }
.onboarding.is-compact .onboarding-steps { display: none; }

/* Einstellungen › Konten & Dienste (KONTEN_PLAN.md K6a) */
.connections-panel .character-header { align-items: flex-end; }
.connections-count { margin: 0; color: var(--k-muted, #8a94a3); font-size: .9rem; white-space: nowrap; }
.connections-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .2rem 0 .4rem; }
.connections-tools input[type="search"] { flex: 1 1 14rem; max-width: 26rem; }
.connections-filter { display: flex; gap: .35rem; flex-wrap: wrap; }
.connections-layout { display: grid; gap: 1.2rem; align-items: start; }
@media (min-width: 1100px) {
  .connections-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); }
  .connections-detail { position: sticky; top: calc(var(--tarvi-head, 0px) + 1rem); max-height: calc(100dvh - var(--tarvi-head, 0px) - 2rem); overflow: auto; }
}
.connections-group h3 { margin: 1.1rem 0 .55rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--k-muted, #8a94a3); }
.connections-group:first-child h3 { margin-top: .3rem; }
.connections-grid { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.connections-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; row-gap: .1rem;
  align-items: center; text-align: left; padding: .75rem .85rem; border-radius: var(--k-radius, 14px); cursor: pointer; font: inherit; color: var(--k-text, inherit);
  background: var(--k-surface-2, rgba(127,127,127,.08)); border: 1px solid var(--k-line, rgba(127,127,127,.18));
  transition: border-color .18s var(--k-ease-out, ease), background-color .18s var(--k-ease-out, ease), transform .12s var(--k-ease-out, ease); }
.connections-tile:hover { border-color: var(--k-line-strong, rgba(127,127,127,.35)); }
.connections-tile:active { transform: scale(.98); }
.connections-tile:focus-visible { outline: 2px solid var(--k-accent, #22d3ee); outline-offset: 2px; }
.connections-tile.is-open { border-color: var(--k-accent, #22d3ee); background: var(--k-accent-soft, color-mix(in srgb, var(--k-accent, #22d3ee) 10%, transparent)); }
.connections-tile .connections-mark { grid-row: 1 / span 2; }
.connections-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connections-state { font-size: .8rem; color: var(--k-muted, #8a94a3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connections-mark { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 12px; font-weight: 700; font-size: .85rem;
  letter-spacing: .02em; background: var(--k-surface-3, rgba(127,127,127,.16)); color: var(--k-text, inherit); position: relative; flex: none; }
.is-connected .connections-mark, .connections-mark.is-connected, .is-automatic .connections-mark, .connections-mark.is-automatic {
  background: color-mix(in srgb, var(--k-accent, #22d3ee) 22%, transparent); color: var(--k-accent, #22d3ee); }
.is-connected .connections-mark::after, .connections-mark.is-connected::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: .7rem; height: .7rem;
  border-radius: 50%; background: var(--k-accent, #22d3ee); box-shadow: 0 0 0 2px var(--k-surface, #121821); }
.is-main_only, .is-unavailable { opacity: .62; }
.connections-detail h3 { margin: 0; }
.connections-detail-head { display: flex; gap: .8rem; align-items: center; }
.connections-detail-head > div { flex: 1; min-width: 0; }
.connections-detail-head .help { margin: .1rem 0 0; }
.connections-body { display: grid; gap: .6rem; }
.connections-body > .card { margin: 0; box-shadow: none; padding: 0; background: transparent; border: 0; }
.connections-body > details.card > summary { display: none; }

/* Tarvi points at a place while it guides (connections.js highlight) */
.tarvi-spotlight { position: relative; z-index: 1; animation: tarvi-spotlight 4s var(--k-ease-out, ease) both; }
@keyframes tarvi-spotlight {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--k-accent, #22d3ee) 0%, transparent); }
  12% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-accent, #22d3ee) 70%, transparent), 0 0 32px color-mix(in srgb, var(--k-accent, #22d3ee) 35%, transparent); }
  70% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-accent, #22d3ee) 45%, transparent), 0 0 24px color-mix(in srgb, var(--k-accent, #22d3ee) 20%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--k-accent, #22d3ee) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .tarvi-spotlight { animation: none; outline: 3px solid var(--k-accent, #22d3ee); outline-offset: 3px; }
  .connections-tile { transition: none; }
}

.connections-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.connections-steps li { line-height: 1.6; }
.connections-pair { display: grid; gap: .5rem; justify-items: start; padding: .8rem; border-radius: var(--k-radius-sm, 10px); background: var(--k-surface-2, rgba(127,127,127,.08)); }
.connections-command { display: block; max-width: 100%; overflow-x: auto; padding: .5rem .7rem; border-radius: 8px; font: 600 1rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--k-surface-3, rgba(127,127,127,.16)); user-select: all; }
.connections-waiting { margin: 0; color: var(--k-muted, #8a94a3); }
.connections-next { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .2rem 0 .4rem; }
.connections-next-label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--k-accent, #22d3ee); margin-right: .2rem; }

/* Office-Studio frame (office-shell.js): start view with files, editor with full width, one task pane, status bar with zoom.
   Prefixed with body #workspace #office-view so it wins over office.css, ui-system.css and buero-look.css without !important. */

/* ---------- start view („files“): new documents and templates on top, then the list of all files */
body #workspace #office-view[data-of-view] .of-layout { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
body #workspace #office-view[data-of-view] .of-layout > * { width: 100%; box-sizing: border-box; }
body #workspace #office-view[data-of-view="files"] #of-editor { display: none; }
body #workspace #office-view[data-of-view="files"] #of-empty { display: block; order: -1; }
body #workspace #office-view[data-of-view="edit"] :is(.of-library, #of-empty),
body #workspace #office-view[data-of-view="edit"] > .section-head { display: none; }

/* templates: small tiles, one scrolling row per kind (Word/Excel start page) */
body #workspace #office-view #of-empty { padding: 20px 24px; min-width: 0; width: 100%; box-sizing: border-box; }
body #workspace #office-view #of-empty > h3 { margin: 0 0 2px; }
body #workspace #office-view #of-empty > .help { margin: 0 0 14px; }
body #workspace #office-view #of-gallery { display: grid; gap: 14px; margin: 0; min-width: 0; }
body #workspace #office-view .of-gallery-group { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
body #workspace #office-view .of-gallery-group h4 { margin: 0; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--k-faint); }
body #workspace #office-view .of-gallery-row { display: flex; gap: 8px; overflow-x: auto; min-width: 0; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--k-line-strong) transparent; }
body #workspace #office-view .of-gallery-row > .of-template-card { flex: 0 0 204px; word-break: normal; overflow-wrap: normal; hyphens: auto; min-height: 0; height: 84px; scroll-snap-align: start; display: grid !important; grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr; align-content: start; gap: 2px 8px; padding: 10px 12px !important; border-radius: 12px !important; font-size: .875rem; font-weight: 600; line-height: 1.25; overflow: hidden; }
body #workspace #office-view .of-template-card > .of-template-icon { grid-row: 1 / 3; font-size: 1.15rem; line-height: 1.2; }
body #workspace #office-view .of-template-card > small { grid-column: 2; font-size: .75rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--k-faint); opacity: 1; }
body #workspace #office-view .of-template-card.blank { border-width: 1.5px !important; align-content: center; }
body #workspace #office-view .of-template-card:hover:not(:disabled) { transform: none; box-shadow: none; background: var(--k-surface-3) !important; }

/* the file list: one line per file, like „Zuletzt verwendet“ */
body #workspace #office-view[data-of-view] .of-library { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 320px) auto;
  grid-template-areas: 'title search import' 'filter filter filter' 'list list list' 'help templates keys'; gap: 12px 16px; width: 100%; box-sizing: border-box; align-items: center; padding: 20px 24px; }
body #workspace #office-view[data-of-view] .of-layout > .of-resume { order: -2; }
body #workspace #office-view .of-library > h3 { grid-area: title; margin: 0; }
body #workspace #office-view .of-library > label:has(#of-search) { grid-area: search; margin: 0; }
body #workspace #office-view .of-library > label:has(#of-import) { grid-area: import; margin: 0; }
body #workspace #office-view .of-library > #of-file-filter { grid-area: filter; }
body #workspace #office-view .of-library > #of-library { grid-area: list; }
body #workspace #office-view .of-library > #of-voice-help { grid-area: help; align-self: start; }
body #workspace #office-view .of-library > .of-template-fields { grid-area: templates; align-self: start; }
body #workspace #office-view .of-library > .of-keys-button { grid-area: keys; align-self: start; justify-self: end; min-height: 34px; padding: 0 12px; font-size: .8125rem; border-radius: 999px; }
body #workspace #office-view .of-library > :is(#of-voice-help, .of-template-fields) > summary { font-size: .9rem; font-weight: 600; color: var(--k-muted); }
body #workspace #office-view[data-of-view="edit"] > .of-mail-panel:not([open]) { display: none; }
body #workspace #office-view .of-library > label:has(#of-search) { font-size: 0; gap: 0; }
body #workspace #office-view .of-library > label:has(#of-search) > input { font-size: 1rem; }

/* „Datei öffnen“ as a button instead of a raw file field */
body #workspace #office-view .of-library > label:has(#of-import) { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px;
  border: 1px solid var(--k-line-strong); border-radius: 999px; font-size: 0; cursor: pointer; white-space: nowrap; }
body #workspace #office-view .of-library > label:has(#of-import)::before { content: 'Datei öffnen …'; font-size: .9375rem; font-weight: 600; color: var(--k-text); }
body #workspace #office-view .of-library > label:has(#of-import):hover { background: var(--k-surface-3); }
body #workspace #office-view .of-library > label:has(#of-import):focus-within { outline: 2px solid var(--k-accent); outline-offset: 2px; }
body #workspace #office-view .of-library #of-import { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; }

/* blank documents start from the „Leer beginnen“ tiles above (the buttons stay for voice and keyboard shortcuts) */
body #workspace #office-view .of-library > .of-actions:not(#voice-panel *) { display: none; }

body #workspace #office-view .of-library #of-library { display: grid; gap: 2px; margin: 0; max-height: none; overflow: visible; }
body #workspace #office-view .of-library #of-library .of-file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0 8px; border-radius: 12px; padding: 0 4px 0 0; }
body #workspace #office-view .of-library #of-library .of-file > .of-file-open { grid-column: 1; grid-row: 1; }
body #workspace #office-view .of-library #of-library .of-file > .scope-chip { grid-column: 2; grid-row: 1; margin: 0; justify-self: end; }
body #workspace #office-view .of-library #of-library .of-file > .of-file-more { grid-column: 3; grid-row: 1; }
body #workspace #office-view .of-library .of-file-open { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 6px 10px; background: transparent; border: 0; text-align: left; }
body #workspace #office-view .of-library .of-file-text { display: grid; grid-template-columns: minmax(0, 1fr) 150px 220px; align-items: center; gap: 12px; flex: 1; min-width: 0; }
body #workspace #office-view .of-library .of-file-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
body #workspace #office-view .of-library .of-file-meta { display: contents; }
body #workspace #office-view .of-library .of-file-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--k-faint); font-size: .875rem; }
body #workspace #office-view .of-library #of-library .of-file:hover { background: var(--k-surface-2); }

/* „Weiter bearbeiten“ when the files are shown while a document is open */
body #workspace #office-view .of-resume { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 16px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--k-accent) 40%, transparent); background: var(--k-accent-soft); color: var(--k-text); text-align: left; cursor: pointer; }
body #workspace #office-view .of-resume[hidden] { display: none; }
body #workspace #office-view .of-resume-label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--k-accent); font-weight: 700; }
body #workspace #office-view .of-resume-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
body #workspace #office-view .of-resume-arrow { color: var(--k-accent); font-size: 1.1rem; }

/* ---------- editor: one compact command bar */
body #workspace #office-view #of-editor > .of-headbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin-bottom: 12px; }
body #workspace #office-view #of-editor > .of-headbar > .of-actions:first-child { flex: 1 1 560px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; margin: 0; }
body #workspace #office-view #of-editor > .of-headbar > .of-commands { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; }
body #workspace #office-view #of-editor > .of-headbar > :is(p, details) { flex: 1 1 100%; margin: 0; }
body #workspace #office-view #of-editor > .of-headbar > p:empty { display: none; }
body #workspace #office-view #of-editor > .of-headbar > details > summary { font-size: .875rem; color: var(--k-muted); }
body #workspace #office-view #of-editor .of-title { flex: 1 1 220px; min-width: 120px; display: flex; align-items: center; gap: 0; margin: 0; font-size: 0; }
body #workspace #office-view #of-editor .of-title input { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 600; min-height: 40px; background: transparent; border-color: transparent; }
body #workspace #office-view #of-editor .of-title input:hover { border-color: var(--k-line-strong); }
body #workspace #office-view #of-editor .of-title input:focus { border-color: var(--k-accent); background: var(--k-surface-2); }
body #workspace #office-view #of-saved { flex: none; font-size: .8125rem; color: var(--k-faint); white-space: nowrap; }
body #workspace #office-view #of-filing { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; }
body #workspace #office-view .of-back { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; }
body #workspace #office-view .of-back-icon { font-size: 1.25rem; line-height: 1; }
body #workspace #office-view .of-commands > button,
body #workspace #office-view .of-commands > .of-pane-toggles > button,
body #workspace #office-view .of-more-button { min-height: 38px; padding: 0 12px; font-size: .875rem; }
body #workspace #office-view .of-commands > #of-save { background: var(--k-accent); color: var(--k-accent-ink); border-color: transparent; }
body #workspace #office-view .of-commands .of-icon-button { min-width: 38px; padding: 0; justify-content: center; font-size: 1.05rem; }
body #workspace #office-view .of-pane-toggles { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--k-surface-2); }
body #workspace #office-view .of-pane-toggles > button { border-color: transparent; background: transparent; }
body #workspace #office-view .of-pane-toggles > button[aria-pressed="true"] { background: var(--k-accent-soft); color: var(--k-accent); border-color: color-mix(in srgb, var(--k-accent) 35%, transparent); }
body #workspace #office-view .of-pane-toggle-icon { margin-right: 4px; color: var(--k-accent); }
body #workspace #office-view .of-more { position: relative; }
body #workspace #office-view .of-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; display: grid; gap: 2px; padding: 6px;
  border: 1px solid var(--k-line-strong); border-radius: 14px; background: #121c2b; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7); }
:root[data-theme="light"] body #workspace #office-view .of-more-menu { background: #fff; }
body #workspace #office-view .of-more-menu[hidden] { display: none; }
body #workspace #office-view .of-more-menu > button { justify-content: flex-start; width: 100%; min-height: 40px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: .9rem; }
body #workspace #office-view .of-more-menu > button:hover { background: var(--k-surface-3); }
body #workspace #office-view .of-more-menu > button[hidden] { display: none; }
body #workspace #office-view .of-more-menu > #of-delete { color: #ff9d9d; }

/* ---------- document + task pane */
body #workspace #office-view .of-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; align-items: start; }
body #workspace #office-view[data-of-pane]:not([data-of-pane=""]) .of-workspace { grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 380px); }
body #workspace #office-view .of-canvas { display: contents; }
body #workspace #office-view .of-paper[data-kind] .of-canvas { display: block; overflow-x: auto; overflow-y: visible; min-width: 0; padding-bottom: 4px; }
body #workspace #office-view .of-paper[data-kind=pptx] .of-canvas { grid-area: stage; }
body #workspace #office-view #of-content .of-stage { width: calc(min(100%, 1200px) * var(--of-slide-zoom, 1)); max-width: none; }
body #workspace #office-view #of-content .of-sheet table { zoom: var(--of-sheet-zoom, 1); }
body #workspace #office-view .of-paper[data-kind=docx] #of-content { margin-left: auto; margin-right: auto; }

body #workspace #office-view .of-pane { position: sticky; top: calc(var(--tarvi-head, 0px) + 12px); max-height: calc(100vh - var(--tarvi-head, 0px) - 70px); display: flex; flex-direction: column;
  border: 1px solid var(--k-line); border-radius: var(--k-radius, 20px); background: var(--k-surface); box-shadow: var(--b-shadow, none); overflow: hidden; }
body #workspace #office-view[data-of-pane=""] .of-pane, body #workspace #office-view:not([data-of-pane]) .of-pane { display: none; }
body #workspace #office-view .of-pane-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--k-line); }
body #workspace #office-view .of-pane-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body #workspace #office-view .of-pane-tab { min-height: 34px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; font-size: .84rem; color: var(--k-muted); white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body #workspace #office-view .of-pane-tab[aria-selected="true"] { background: var(--k-surface-3); color: var(--k-text); }
body #workspace #office-view .of-pane-close { min-width: 34px; min-height: 34px; padding: 0; border: 0; background: transparent; font-size: 1.3rem; }
body #workspace #office-view .of-pane-body { overflow: auto; padding: 14px 16px 18px; overscroll-behavior: contain; }
body #workspace #office-view .of-pane-page { position: static; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; max-height: none; }
body #workspace #office-view .of-pane-page[hidden] { display: none; }
body #workspace #office-view .of-pane-page > .of-pane-title { margin: 0 0 10px; font-size: 1rem; }
body #workspace #office-view .of-pane-page .of-grid { grid-template-columns: minmax(0, 1fr); }

/* ---------- status bar */
body #workspace #office-view .of-statusbar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 6px 10px 6px 16px; min-height: 44px;
  border: 1px solid var(--k-line); border-radius: 14px; background: color-mix(in srgb, #0c1522 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
:root[data-theme="light"] body #workspace #office-view .of-statusbar { background: color-mix(in srgb, #fff 94%, transparent); }
body #workspace #office-view .of-status-info { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--k-faint); font-variant-numeric: tabular-nums; }
body #workspace #office-view .of-zoom { position: relative; display: flex; align-items: center; gap: 4px; flex: none; }
body #workspace #office-view .of-zoom-step { min-width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 1.15rem; justify-content: center; }
body #workspace #office-view .of-zoom-step:hover { background: var(--k-surface-3); }
body #workspace #office-view input.of-zoom-slider { width: 150px; height: 28px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
body #workspace #office-view input.of-zoom-slider::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; box-shadow: none;
  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--k-faint) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 100% 11px no-repeat, var(--k-line-strong); }
body #workspace #office-view input.of-zoom-slider::-moz-range-track { height: 3px; border-radius: 2px; box-shadow: none; background: var(--k-line-strong); }
body #workspace #office-view input.of-zoom-slider::-moz-range-progress { height: 3px; background: var(--k-line-strong); box-shadow: none; }
body #workspace #office-view input.of-zoom-slider::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5.5px; border: 0; border-radius: 50%; background: var(--k-text); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transform: none; }
body #workspace #office-view input.of-zoom-slider::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--k-text); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
body #workspace #office-view input.of-zoom-slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--k-accent-soft), 0 0 0 2px var(--k-accent); }
body #workspace #office-view .of-zoom-value { min-width: 64px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: .8125rem; font-variant-numeric: tabular-nums; justify-content: center; white-space: nowrap; }
body #workspace #office-view .of-zoom-value:hover { background: var(--k-surface-3); }
body #workspace #office-view .of-zoom-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 40; display: grid; gap: 2px; min-width: 190px; padding: 6px;
  border: 1px solid var(--k-line-strong); border-radius: 14px; background: #121c2b; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7); }
:root[data-theme="light"] body #workspace #office-view .of-zoom-menu { background: #fff; }
body #workspace #office-view .of-zoom-menu[hidden] { display: none; }
body #workspace #office-view .of-zoom-menu > button { justify-content: flex-start; min-height: 36px; border: 0; border-radius: 10px; background: transparent; font-size: .875rem; }
body #workspace #office-view .of-zoom-menu > button:hover, body #workspace #office-view .of-zoom-menu > button[aria-pressed="true"] { background: var(--k-surface-3); }
body #workspace #office-view .of-zoom-fit { border-bottom: 1px solid var(--k-line); }

/* the word count moved into the status bar */
body #workspace #office-view .of-paper[data-kind=docx] .of-word-stats { display: none; }

/* the focus mode keeps the status bar (zoom) */
body #workspace #office-view.of-focus :is(.of-headbar > details, .of-pane) { display: none; }

/* ---------- medium screens: the task pane floats over the document */
@media (max-width: 1279px) {
  body #workspace #office-view[data-of-pane]:not([data-of-pane=""]) .of-workspace { grid-template-columns: minmax(0, 1fr); }
  body #workspace #office-view .of-pane { position: fixed; top: auto; right: 12px; bottom: 12px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: min(78vh, 720px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); background: #101a28; }
  :root[data-theme="light"] body #workspace #office-view .of-pane { background: #fff; }
}

/* ---------- phones */
@media (max-width: 760px) {
  body #workspace #office-view[data-of-view] .of-library { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title import' 'search search' 'filter filter' 'list list' 'help help' 'templates templates' 'keys keys'; padding: 16px; }
  body #workspace #office-view .of-library .of-file-text { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  body #workspace #office-view .of-library .of-file-meta { display: flex; gap: 10px; }
  body #workspace #office-view .of-library #of-library .of-file > .scope-chip { display: none; }
  body #workspace #office-view #of-empty { padding: 16px; }
  body #workspace #office-view .of-gallery-group { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body #workspace #office-view .of-gallery-row > .of-template-card { flex-basis: 150px; }
  body #workspace #office-view #of-editor > .of-headbar > .of-actions:first-child { flex-basis: 100%; }
  body #workspace #office-view #of-editor > .of-headbar > .of-commands { flex-basis: 100%; justify-content: flex-start; }
  body #workspace #office-view .of-back { font-size: 0; padding: 0 12px; }
  body #workspace #office-view .of-back-icon { font-size: 1.4rem; }
  body #workspace #office-view #of-editor .of-title { flex-basis: 0; }
  body #workspace #office-view #of-focus-button { display: none; }
  body #workspace #office-view .of-commands > .of-more { order: 1; }
  body #workspace #office-view .of-commands > .of-pane-toggles { order: 2; }
  body #workspace #office-view .of-more-menu { right: auto; left: 0; }
  body #workspace #office-view .of-pane { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 82vh; }
  body #workspace #office-view .of-zoom-slider { width: 90px; }
  body #workspace #office-view .of-status-info { display: none; }
  body #workspace #office-view .of-statusbar { justify-content: flex-end; }
}

/* ---------- compact ribbon on larger screens (phones keep 16 px fields against the iOS input zoom) */
@media (min-width: 761px) {
  body #workspace #office-view .of-paper :has(> .of-ribbon) :is(select, button:not(.of-ribbon-tab), input:not([type=checkbox], [type=radio], [type=range], [type=color])):not(#voice-panel *) {
    min-height: 32px; height: auto; padding-top: 0; padding-bottom: 0; font-size: .8125rem; border-radius: 8px; }
  body #workspace #office-view .of-paper :has(> .of-ribbon) select:not(#voice-panel *) { padding-left: 8px; padding-right: 26px; }
  body #workspace #office-view .of-paper :has(> .of-ribbon) button:not(.of-ribbon-tab):not(#voice-panel *) { padding-left: 9px; padding-right: 9px; }
  body #workspace #office-view .of-paper :has(> .of-ribbon) input[type=color] { height: 32px; min-height: 32px; }
  body #workspace #office-view .of-paper .of-ribbon-tab { min-height: 34px; font-size: .875rem; }
}

/* scrolling to the caret, a cell or a search hit keeps it clear of the sticky status bar */
html:has(#office-view[data-of-view="edit"]:not([hidden])) { scroll-padding-bottom: 72px; }

/* ---------- task pane „Gestalten“: pictures, videos, tips and what to say */
body #workspace #office-view .of-design { display: grid; gap: 14px; }
body #workspace #office-view .of-design-section { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-surface-2); }
body #workspace #office-view .of-design-section > h4 { margin: 0; font-size: .82rem; letter-spacing: .02em; color: var(--k-muted); font-weight: 600; }
body #workspace #office-view .of-design-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body #workspace #office-view .of-design-button { min-height: 44px; border-radius: 10px; border: 1px solid var(--k-line-strong); background: var(--k-surface-3);
  color: var(--k-text); font-weight: 600; cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
body #workspace #office-view .of-design-button:hover { border-color: var(--k-accent); }
body #workspace #office-view .of-design-button:active { transform: scale(.98); }
body #workspace #office-view .of-design-small { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--k-line-strong); background: transparent;
  color: var(--k-text); cursor: pointer; justify-self: start; }
body #workspace #office-view .of-design-small:hover { border-color: var(--k-accent); color: var(--k-accent); }
body #workspace #office-view .of-design-small:disabled { opacity: .5; cursor: progress; }
body #workspace #office-view .of-design-list { display: grid; gap: 6px; }
body #workspace #office-view .of-design-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
body #workspace #office-view .of-design-item-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
body #workspace #office-view .of-design-help { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--k-muted); }
body #workspace #office-view .of-design-tips, body #workspace #office-view .of-design-say { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
body #workspace #office-view .of-design-tips li { position: relative; padding-left: 16px; font-size: .88rem; line-height: 1.45; }
body #workspace #office-view .of-design-tips li::before { content: ''; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--k-accent); }
body #workspace #office-view .of-design-tips li.is-ok::before { background: #34c27a; }
body #workspace #office-view .of-design-tip-say { display: block; margin-top: 2px; font-size: .8rem; color: var(--k-accent); }
body #workspace #office-view .of-design-say li { font-size: .86rem; line-height: 1.4; color: var(--k-text); padding: 6px 10px; border-radius: 8px; background: var(--k-surface-3); }
body #workspace #office-view .of-design-note { margin: 0; min-height: 1.2em; font-size: .85rem; color: var(--k-muted); }
body #workspace #office-view .of-design-note.is-bad { color: var(--k-danger, #ef4444); }

/* Einstellungen › Hilfe (app/help, help.js): a gallery of chapters, each opening as a large window with video and text.
   #help-panel / #help-dialog in the selectors: the app's general button and form styles must not win here. */
#help-panel #help-search { width: 100%; max-width: 40rem; margin: .2rem 0 1rem; }
#help-panel .help-list { display: grid; gap: 30px; }
#help-panel .help-group { display: grid; gap: 14px; }
#help-panel .help-group-title { display: flex; align-items: baseline; gap: .55rem; margin: 0; font-size: 1.05rem; letter-spacing: .01em; }
#help-panel .help-group-count { font-size: .78rem; font-weight: 500; color: var(--k-muted, #8a94a3); }
#help-panel .help-group-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
#help-panel .help-categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.2rem; }
#help-panel .help-chip { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .4rem .8rem; min-height: 0; border-radius: 999px;
  font: inherit; font-size: .86rem; cursor: pointer; color: var(--k-text, inherit); background: var(--k-surface, #121821);
  border: 1px solid var(--k-line, rgba(127,127,127,.22)); transition: border-color .15s, background .15s; }
#help-panel .help-chip:hover { border-color: var(--k-line-strong, rgba(127,127,127,.4)); }
#help-panel .help-chip[aria-pressed="true"] { border-color: var(--k-accent, #22d3ee); background: color-mix(in srgb, var(--k-accent, #22d3ee) 16%, transparent); }
#help-panel .help-chip-count { font-size: .76rem; color: var(--k-muted, #8a94a3); }
#help-dialog .help-video-wait { margin: .4rem 0 0; }
#help-panel .help-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; margin: 0; min-height: 0; height: 100%;
  text-align: left; font: inherit; color: var(--k-text, inherit); white-space: normal; overflow: hidden; cursor: pointer;
  border-radius: 16px; border: 1px solid var(--k-line, rgba(127,127,127,.18)); background: var(--k-surface, #121821);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .18s var(--k-ease-out, ease), border-color .18s var(--k-ease-out, ease), box-shadow .18s var(--k-ease-out, ease); }
#help-panel .help-card:hover { transform: translateY(-3px); border-color: var(--k-line-strong, rgba(127,127,127,.35)); box-shadow: 0 16px 40px rgba(0,0,0,.26); }
#help-panel .help-card:active { transform: scale(.985); }
#help-panel .help-card:focus-visible { outline: 2px solid var(--k-accent, #22d3ee); outline-offset: 3px; }
#help-panel .help-card.is-open { border-color: var(--k-accent, #22d3ee); }
.help-poster { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; flex: none;
  background: radial-gradient(circle at 50% 35%, #12404e 0%, #07131b 70%); }
.help-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.help-poster.is-empty { display: grid; place-items: center; padding: 1rem; }
.help-poster-title { color: #eef6fb; font-weight: 700; font-size: 1.05rem; text-align: center; line-height: 1.25; }
.help-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(6, 18, 26, .62); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.help-play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff; }
.help-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font-size: .78rem; font-weight: 600;
  background: rgba(0,0,0,.7); color: #fff; }
.help-card-text { display: grid; gap: .3rem; padding: .85rem 1rem 1rem; }
.help-card-text strong { font-size: 1rem; line-height: 1.3; }
.help-card-summary { color: var(--k-muted, #8a94a3); font-size: .86rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* the chapter: a large window, video and text side by side */
.help-dialog { width: min(1240px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--k-line, rgba(127,127,127,.25));
  border-radius: 20px; background: var(--k-surface, #121821); color: var(--k-text, #eef6fb); box-shadow: 0 30px 90px rgba(0,0,0,.5); overflow: hidden; }
.help-dialog::backdrop { background: rgba(3, 8, 12, .62); backdrop-filter: blur(6px); }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog .help-chapter-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; padding: 1.2rem 1.4rem .8rem;
  border-bottom: 1px solid var(--k-line, rgba(127,127,127,.18)); }
.help-dialog .help-chapter-head h2 { margin: .1rem 0 .2rem; }
.help-dialog .help-chapter-head .help { margin: 0; }
.help-dialog .help-chapter-actions { display: flex; gap: .5rem; flex: none; }
.help-dialog .help-chapter-body { display: grid; gap: 1.4rem; padding: 1.2rem 1.4rem 1.4rem; overflow: auto; min-height: 0; }
.help-dialog .help-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; display: block; }
.help-dialog .help-no-video { border-radius: 14px; }
.help-text h3 { margin: 1.1rem 0 .35rem; font-size: 1rem; }
.help-text h3:first-child { margin-top: 0; }
.help-text p, .help-text li { line-height: 1.6; }
.help-text ol, .help-text ul { padding-left: 1.2rem; margin: .2rem 0; }
.help-text code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: .05rem .3rem; border-radius: 5px; background: var(--k-surface-3, rgba(127,127,127,.16)); }
@media (min-width: 980px) {
  .help-dialog .help-chapter-body { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); align-items: start; }
  .help-dialog .help-chapter-media { position: sticky; top: 0; }
}
@media (max-width: 700px) {
  .help-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .help-dialog .help-chapter-head { padding: max(1rem, env(safe-area-inset-top)) 1rem .7rem; }
  .help-dialog .help-chapter-body { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { #help-panel .help-card { transition: none; } #help-panel .help-card:hover { transform: none; } }

/* Einstellungen › Datenschutz (privacy.js). #privacy-panel in the selectors: the app's general styles must not win here. */
#privacy-panel #privacy-body { display: grid; gap: 18px; }
#privacy-panel .privacy-card h2 { margin: .1rem 0 .4rem; }
#privacy-panel .privacy-checks { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: 10px; }
#privacy-panel .privacy-checks li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 14px; align-items: start; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--k-line, rgba(127,127,127,.18)); background: var(--k-surface-2, rgba(127,127,127,.05)); }
#privacy-panel .privacy-checks p { margin: .15rem 0 0; color: var(--k-muted, #8a94a3); font-size: .9rem; }
#privacy-panel .privacy-light { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
#privacy-panel .privacy-light::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
#privacy-panel .is-ok .privacy-light { color: #34d399; }
#privacy-panel .is-warn .privacy-light { color: #fbbf24; }
#privacy-panel .is-open .privacy-light { color: #f87171; }
#privacy-panel .is-check .privacy-light { color: var(--k-muted, #8a94a3); }
#privacy-panel .privacy-group { margin: 1.2rem 0 .2rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--k-muted, #8a94a3); }
#privacy-panel .privacy-row { display: grid; grid-template-columns: 1fr 12rem 8rem; gap: 14px; align-items: center; padding: 10px 0;
  border-top: 1px solid var(--k-line, rgba(127,127,127,.14)); }
#privacy-panel .privacy-row .help { margin: .15rem 0 0; font-size: .85rem; }
#privacy-panel .privacy-row select { width: 100%; }
#privacy-panel .privacy-fixed { font-size: .9rem; color: var(--k-muted, #8a94a3); }
#privacy-panel .privacy-due { font-size: .85rem; color: var(--k-muted, #8a94a3); text-align: right; }
#privacy-panel .privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
#privacy-panel #privacy-confirm { padding: 14px; border-radius: 12px; border: 1px solid var(--k-accent, #22d3ee); }
#privacy-panel #privacy-confirm input { max-width: 16rem; }
#privacy-panel .privacy-log { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
#privacy-panel .privacy-log li { display: grid; grid-template-columns: 11rem 1fr auto; gap: 12px; }
#privacy-panel .privacy-log time { color: var(--k-muted, #8a94a3); }
#privacy-panel .privacy-ai-form { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: .6rem; }
#privacy-panel .privacy-service { display: grid; grid-template-columns: 1.3fr 1.4fr 11rem; gap: 14px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--k-line, rgba(127,127,127,.14)); }
#privacy-panel .privacy-service.is-off strong { text-decoration: line-through; opacity: .7; }
#privacy-panel .privacy-service .help { margin: .1rem 0 0; font-size: .85rem; }
#privacy-panel .privacy-service-avv { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 8px; align-items: center; }
#privacy-panel .privacy-service-switch { display: grid; gap: 6px; justify-items: end; text-align: right; }
#privacy-panel .privacy-subjects { display: grid; gap: 10px; margin-top: .8rem; }
#privacy-panel .privacy-subject ul { margin: .3rem 0 0 1.4rem; padding: 0; }
#privacy-panel .privacy-subject li { font-size: .85rem; overflow-wrap: anywhere; }
#privacy-panel .privacy-request-form { display: grid; grid-template-columns: 9rem 1fr 10rem auto; gap: 8px; margin: .4rem 0 .6rem; }
#privacy-panel .privacy-log li.is-done { opacity: .6; }
@media (max-width: 1100px) { #privacy-panel .privacy-service { grid-template-columns: 1fr 1fr; } #privacy-panel .privacy-service-switch { grid-column: 1 / -1; justify-items: start; text-align: left; } }
@media (max-width: 640px) {
  #privacy-panel .privacy-service { grid-template-columns: 1fr; gap: 8px; }
  #privacy-panel .privacy-ai-form { grid-template-columns: 1fr; }
  #privacy-panel .privacy-request-form { grid-template-columns: 1fr; }
  #privacy-panel .privacy-service-avv { grid-template-columns: 1fr; }
  #privacy-panel .privacy-service-switch { justify-items: start; text-align: left; }
  #privacy-panel .privacy-checks li { grid-template-columns: 1fr; gap: 4px; }
  #privacy-panel .privacy-row { grid-template-columns: 1fr; gap: 6px; }
  #privacy-panel .privacy-due { text-align: left; }
  #privacy-panel .privacy-log li { grid-template-columns: 1fr; gap: 0; }
}

/* WhatsApp in TARVI: settings card, Tools › WhatsApp and the draft sheet (whatsapp.js). Own palette in WhatsApp green,
   scoped by id so the global card/button/form layers (ui-system.css, buero-look.css) do not reach into it. */
:root {
  --wa-green: #25d366; --wa-teal: #00a884; --wa-deep: #005c4b; --wa-night: #0b141a; --wa-panel: #111b21; --wa-raise: #1f2c34;
  --wa-line: rgba(233, 237, 239, .09); --wa-text: #e9edef; --wa-muted: #8696a0; --wa-out: #005c4b; --wa-out-text: #e9edef;
  --wa-chat: #0b141a; --wa-dots: rgba(255, 255, 255, .035); --wa-tick: #53bdeb; --wa-danger: #f15c6d;
  --wa-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7), 0 2px 0 rgba(255, 255, 255, .03) inset;
}
:root[data-theme="light"] {
  --wa-panel: #ffffff; --wa-raise: #f0f2f5; --wa-line: rgba(17, 27, 33, .1); --wa-text: #111b21; --wa-muted: #667781;
  --wa-out: #d9fdd3; --wa-out-text: #111b21; --wa-chat: #efeae2; --wa-dots: rgba(0, 0, 0, .045); --wa-tick: #027eb5;
  --wa-shadow: 0 30px 70px -28px rgba(11, 20, 26, .35), 0 1px 0 rgba(255, 255, 255, .8) inset;
}
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) { font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) * { box-sizing: border-box; }
.wa-svg { width: 1.15em; height: 1.15em; flex: none; }

/* --- shared pieces ------------------------------------------------------------------------------------------ */
.wa-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; flex: none;
  background: linear-gradient(145deg, #3ee07f 0%, var(--wa-green) 38%, var(--wa-teal) 100%);
  box-shadow: 0 10px 26px -8px rgba(37, 211, 102, .65), 0 1px 0 rgba(255, 255, 255, .45) inset; }
.wa-logo .wa-svg { width: 26px; height: 26px; }
.wa-logo.is-large { width: 64px; height: 64px; border-radius: 20px; }
.wa-logo.is-large .wa-svg { width: 36px; height: 36px; }
.wa-pill { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em; color: var(--wa-muted); background: rgba(134, 150, 160, .12); border: 1px solid var(--wa-line); }
.wa-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.wa-pill.is-on { color: var(--wa-green); background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .3); }
.wa-pill.is-on::before { box-shadow: 0 0 0 4px rgba(37, 211, 102, .18); animation: wa-pulse 2.4s ease-in-out infinite; }
@keyframes wa-pulse { 50% { box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); } }
.wa-avatar { --wa-hue: 150; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .02em;
  background: radial-gradient(circle at 30% 25%, hsl(var(--wa-hue) 70% 62%), hsl(var(--wa-hue) 55% 38%)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
.wa-avatar.is-small { width: 34px; height: 34px; font-size: .78rem; }
.wa-muted { color: var(--wa-muted); margin: 0; font-size: .9rem; line-height: 1.5; }
.wa-signature { margin: 6px 0 0; font-size: .8rem; line-height: 1.35; opacity: .72; }
.wa-fine { color: var(--wa-muted); font-size: .78rem; line-height: 1.5; margin: 14px 0 0; }
.wa-note { min-height: 1.2em; margin: 10px 0 0; color: var(--wa-muted); font-size: .86rem; }
.wa-note.is-error, .wa-status.is-error { color: var(--wa-danger); }
.wa-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) :is(.wa-btn, .wa-send, .wa-icon, .wa-link-btn, .wa-contact) {
  font: inherit; cursor: pointer; border: 0; -webkit-tap-highlight-color: transparent; transition: transform .16s cubic-bezier(.2, .8, .2, 1), background .2s, box-shadow .2s, opacity .2s; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) :is(.wa-btn, .wa-send):active:not(:disabled) { transform: scale(.97); }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) :is(.wa-btn, .wa-send, .wa-icon, .wa-contact, .wa-link-btn):focus-visible { outline: 2px solid var(--wa-green); outline-offset: 3px; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn-primary { color: #04210f; background: linear-gradient(180deg, #3ee07f, var(--wa-green));
  box-shadow: 0 12px 28px -10px rgba(37, 211, 102, .7), 0 1px 0 rgba(255, 255, 255, .5) inset; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn-primary:hover:not(:disabled) { box-shadow: 0 16px 34px -10px rgba(37, 211, 102, .85), 0 1px 0 rgba(255, 255, 255, .5) inset; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn-ghost { color: var(--wa-text); background: transparent; border: 1px solid var(--wa-line); }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn-ghost:hover { background: rgba(134, 150, 160, .1); }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-btn-ghost.is-danger { color: var(--wa-danger); border-color: rgba(241, 92, 109, .45); }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-send { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px 0 20px;
  border-radius: 999px; color: #fff; font-weight: 700; font-size: .98rem; letter-spacing: .01em;
  background: linear-gradient(160deg, #2ee27a 0%, var(--wa-teal) 70%, #008f72 100%);
  box-shadow: 0 14px 30px -12px rgba(0, 168, 132, .9), 0 1px 0 rgba(255, 255, 255, .35) inset; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-send .wa-svg { width: 20px; height: 20px; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) .wa-send:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 18px 36px -12px rgba(0, 168, 132, 1), 0 1px 0 rgba(255, 255, 255, .35) inset; }
:is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) :is(.wa-send, .wa-btn):disabled { opacity: .42; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); }
:is(#whatsapp-view, #whatsapp-draft) .wa-send.is-round { width: 52px; height: 52px; padding: 0; border-radius: 50%; flex: none; }
.wa-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0, 168, 132, .2); border-top-color: var(--wa-teal); animation: wa-spin .9s linear infinite; }
@keyframes wa-spin { to { transform: rotate(360deg); } }

/* chat bubbles with the WhatsApp tail and doodle-like wallpaper */
.wa-chat, .wa-thread { background-color: var(--wa-chat);
  background-image: radial-gradient(var(--wa-dots) 1.2px, transparent 1.4px), radial-gradient(var(--wa-dots) 1px, transparent 1.2px);
  background-size: 26px 26px, 26px 26px; background-position: 0 0, 13px 13px; }
.wa-day { align-self: center; margin: 2px auto 12px; padding: 5px 12px; border-radius: 8px; font-size: .74rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--wa-muted); background: var(--wa-raise); box-shadow: 0 1px .5px rgba(11, 20, 26, .13); width: fit-content; }
.wa-bubble { position: relative; max-width: min(88%, 520px); margin-left: auto; padding: 8px 10px 22px 12px; border-radius: 12px 0 12px 12px;
  color: var(--wa-out-text); background: var(--wa-out); box-shadow: 0 1px .5px rgba(11, 20, 26, .2); }
.wa-bubble.is-out::after { content: ""; position: absolute; top: 0; right: -8px; width: 8px; height: 13px; background: var(--wa-out);
  clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-bubble.is-failed { outline: 1px solid rgba(241, 92, 109, .55); }
.wa-meta { position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; color: color-mix(in srgb, var(--wa-out-text) 60%, transparent); }
.wa-ticks { width: 17px; height: 17px; }
.wa-ticks.is-sent { color: var(--wa-tick); }
.wa-ticks.is-wait { color: inherit; }
.wa-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; font-size: .95rem; }

/* --- the draft sheet --------------------------------------------------------------------------------------- */
#whatsapp-draft.wa-sheet { position: fixed; z-index: 1200; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px; color: var(--wa-text); background: var(--wa-panel); border: 1px solid var(--wa-line); box-shadow: var(--wa-shadow);
  opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .28s ease, transform .38s cubic-bezier(.2, .9, .25, 1.1); }
#whatsapp-draft.wa-sheet.is-open { opacity: 1; transform: none; }
#whatsapp-draft.wa-sheet[hidden] { display: none; }
#whatsapp-draft .wa-head { display: flex; align-items: center; gap: 14px; padding: 18px 16px 16px 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(62, 224, 127, .35), transparent 55%), linear-gradient(135deg, #00866b 0%, var(--wa-deep) 55%, #023b31 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
#whatsapp-draft .wa-head .wa-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
#whatsapp-draft .wa-who { min-width: 0; flex: 1; }
#whatsapp-draft .wa-who h2 { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#whatsapp-draft .wa-number { margin: 2px 0 0; font-size: .82rem; color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }
#whatsapp-draft .wa-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .12); }
#whatsapp-draft .wa-icon:hover { background: rgba(255, 255, 255, .22); }
#whatsapp-draft .wa-chat { display: flex; flex-direction: column; padding: 16px 20px 14px; min-height: 170px; overflow-y: auto; }
#whatsapp-draft .wa-bubble { animation: wa-pop .42s cubic-bezier(.2, .9, .25, 1.15) both; }
@keyframes wa-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
#whatsapp-draft .wa-input { display: block; width: 100%; min-width: 220px; min-height: 1.4em; max-height: 260px; margin: 0; padding: 0; resize: none; overflow-y: auto;
  border: 0; outline: 0; box-shadow: none; background: transparent; color: inherit; font: inherit; font-size: .98rem; line-height: 1.42; }
#whatsapp-draft[data-state="draft"] .wa-bubble { box-shadow: 0 1px .5px rgba(11, 20, 26, .2), 0 0 0 2px rgba(37, 211, 102, 0); transition: box-shadow .2s; }
#whatsapp-draft[data-state="draft"] .wa-bubble:focus-within { box-shadow: 0 1px .5px rgba(11, 20, 26, .2), 0 0 0 2px rgba(37, 211, 102, .55); }
#whatsapp-draft[data-state="sent"] .wa-ticks.is-sent { animation: wa-tick .5s ease both; }
@keyframes wa-tick { from { opacity: 0; transform: scale(.4); } }
#whatsapp-draft .wa-e2e { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px auto 0; padding: 6px 12px; border-radius: 8px; max-width: 92%;
  font-size: .72rem; color: #c6a85a; background: rgba(255, 210, 121, .08); text-align: center; }
:root[data-theme="light"] #whatsapp-draft .wa-e2e { color: #54656f; background: #ffeecd; }
#whatsapp-draft .wa-e2e .wa-svg { width: 13px; height: 13px; }
#whatsapp-draft .wa-status { margin: 0; padding: 10px 20px 0; min-height: 1.3em; font-size: .86rem; color: var(--wa-muted); }
#whatsapp-draft[data-state="sent"] .wa-status { color: var(--wa-green); font-weight: 600; }
#whatsapp-draft .wa-foot { padding: 10px 16px 16px; display: grid; gap: 10px; }
#whatsapp-draft .wa-actions { display: flex; justify-content: flex-end; gap: 10px; }
#whatsapp-draft .wa-hint { margin: 0; font-size: .82rem; color: var(--wa-muted); }
#whatsapp-draft .wa-hint:empty { display: none; }
#whatsapp-draft .wa-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 14px; font-size: .85rem;
  color: var(--wa-text); background: rgba(255, 196, 0, .1); border: 1px solid rgba(255, 196, 0, .28); }
#whatsapp-draft .wa-link-btn { padding: 0; background: none; color: var(--wa-green); font-weight: 600; text-decoration: none; }
#whatsapp-draft .wa-link-btn:hover { text-decoration: underline; }
@media (max-width: 640px) {
  #whatsapp-draft.wa-sheet { left: 0; right: 0; bottom: 0; width: 100%; max-height: 88dvh; border-radius: 26px 26px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); }
  #whatsapp-draft .wa-actions { display: grid; grid-template-columns: 1fr 1.6fr; }
  #whatsapp-draft .wa-send { width: 100%; }
}

/* --- settings card ---------------------------------------------------------------------------------------- */
#workspace #whatsapp-settings-box.wa-settings, #whatsapp-settings-box.wa-settings { position: relative; overflow: hidden; color: var(--wa-text);
  background: radial-gradient(140% 90% at 100% 0%, rgba(37, 211, 102, .1), transparent 50%), var(--wa-panel); border: 1px solid var(--wa-line); border-radius: 24px; }
#whatsapp-settings-box .wa-card-head { display: flex; align-items: center; gap: 14px; }
#whatsapp-settings-box .wa-card-head .eyebrow { margin: 0; color: var(--wa-teal); }
#whatsapp-settings-box .wa-card-head h2 { margin: 2px 0 0; }

/* linking: intro, QR, linked state (settings card and Tools view) */
.wa-link { margin-top: 18px; }
.wa-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.wa-feature { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; font-size: .88rem; line-height: 1.35; color: var(--wa-text);
  background: var(--wa-raise); border: 1px solid var(--wa-line); }
.wa-feature .wa-svg { width: 22px; height: 22px; color: var(--wa-teal); }
.wa-pair { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.wa-qr { position: relative; display: grid; place-items: center; width: 288px; height: 288px; padding: 12px; border-radius: 24px; background: #fff;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .65), 0 0 0 1px rgba(17, 27, 33, .06); }
.wa-qr img { width: 264px; height: 264px; image-rendering: pixelated; border-radius: 6px; animation: wa-fade .35s ease both; }
@keyframes wa-fade { from { opacity: .2; } }
.wa-pair-text h3 { margin: 0 0 12px; font-size: 1.2rem; color: var(--wa-text); }
.wa-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: wa; display: grid; gap: 10px; }
.wa-steps li { counter-increment: wa; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; color: var(--wa-text); font-size: .92rem; line-height: 1.45; }
.wa-steps li::before { content: counter(wa); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .78rem; font-weight: 700;
  color: var(--wa-green); background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .3); }
.wa-linked { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; background: var(--wa-raise); border: 1px solid var(--wa-line); }
.wa-linked strong { color: var(--wa-text); font-size: 1rem; }
.wa-linked-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; flex: none;
  background: linear-gradient(145deg, #3ee07f, var(--wa-teal)); box-shadow: 0 10px 24px -10px rgba(37, 211, 102, .8); }
.wa-linked-badge .wa-svg { width: 22px; height: 22px; }
@media (max-width: 720px) {
  .wa-pair { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .wa-qr { width: min(288px, 100%); height: auto; aspect-ratio: 1; }
  .wa-qr img { width: 100%; height: auto; }
}

/* --- Tools › WhatsApp -------------------------------------------------------------------------------------- */
#whatsapp-view.wa-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; width: 100%; min-width: 0; max-width: 1100px; margin: 0 auto; color: var(--wa-text); }
#whatsapp-view.wa-view > * { min-width: 0; }
#whatsapp-view.wa-view[hidden] { display: none; }
#whatsapp-view .wa-hero { position: relative; overflow: hidden; padding: 28px; border-radius: 28px; color: #fff; isolation: isolate;
  background: radial-gradient(90% 120% at 0% 0%, rgba(62, 224, 127, .42), transparent 55%), radial-gradient(70% 90% at 100% 100%, rgba(0, 168, 132, .45), transparent 60%),
    linear-gradient(135deg, #00735c 0%, #054d40 50%, #022c25 100%);
  box-shadow: 0 34px 80px -36px rgba(0, 92, 75, .9), 0 1px 0 rgba(255, 255, 255, .12) inset; }
#whatsapp-view .wa-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.4px); background-size: 22px 22px;
  mask-image: linear-gradient(110deg, transparent 20%, #000 75%); }
#whatsapp-view .wa-hero-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
#whatsapp-view .wa-hero h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 750; letter-spacing: -.03em; color: #fff; }
#whatsapp-view .wa-eyebrow { margin: 0 0 2px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
#whatsapp-view .wa-sub { margin: 6px 0 0; max-width: 60ch; color: rgba(255, 255, 255, .82); font-size: .98rem; }
#whatsapp-view .wa-hero .wa-pill { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); }
#whatsapp-view .wa-hero .wa-pill.is-on { color: #b8ffd3; }
#whatsapp-view .wa-hero :is(.wa-feature, .wa-linked) { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); }
#whatsapp-view .wa-hero .wa-feature .wa-svg { color: #8ff0b6; }
#whatsapp-view .wa-hero :is(.wa-muted, .wa-fine, .wa-note) { color: rgba(255, 255, 255, .72); }
#whatsapp-view .wa-hero .wa-pair-text h3, #whatsapp-view .wa-hero .wa-steps li { color: #fff; }
#whatsapp-view .wa-hero .wa-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
#whatsapp-view .wa-panel { padding: 22px; border-radius: 24px; background: var(--wa-panel); border: 1px solid var(--wa-line); box-shadow: 0 18px 50px -34px rgba(0, 0, 0, .7); }
#whatsapp-view .wa-title { margin: 0 0 14px; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; color: var(--wa-text); }
#whatsapp-view .wa-search-wrap { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 46px; border-radius: 14px; color: var(--wa-muted);
  background: var(--wa-raise); border: 1px solid transparent; transition: border-color .2s; }
#whatsapp-view .wa-search-wrap:focus-within { border-color: rgba(37, 211, 102, .5); }
#whatsapp-view .wa-search { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--wa-text); font: inherit; font-size: .95rem; }
#whatsapp-view .wa-contacts { display: flex; gap: 10px; margin: 14px 0; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
#whatsapp-view .wa-contact { display: grid; justify-items: center; gap: 6px; min-width: 86px; max-width: 110px; padding: 12px 8px; border-radius: 18px; scroll-snap-align: start;
  color: var(--wa-text); background: transparent; border: 1px solid transparent; }
#whatsapp-view .wa-contact .wa-avatar { width: 48px; height: 48px; font-size: .95rem; }
#whatsapp-view .wa-contact:hover { background: var(--wa-raise); }
#whatsapp-view .wa-contact.is-chosen { background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .45); }
#whatsapp-view .wa-contact.is-chosen .wa-avatar { box-shadow: 0 0 0 3px var(--wa-green); }
#whatsapp-view .wa-contact-name { font-size: .84rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#whatsapp-view .wa-contact-alias { font-size: .72rem; color: var(--wa-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#whatsapp-view .wa-compose { display: flex; align-items: flex-end; gap: 12px; }
#whatsapp-view .wa-compose-text { flex: 1; min-height: 52px; max-height: 220px; padding: 14px 18px; resize: vertical; border-radius: 24px; outline: 0;
  color: var(--wa-text); background: var(--wa-raise); border: 1px solid transparent; box-shadow: none; font: inherit; font-size: .96rem; line-height: 1.45; }
#whatsapp-view .wa-compose-text:focus { border-color: rgba(37, 211, 102, .5); }
#whatsapp-view .is-approval { border-color: rgba(255, 196, 0, .3); background: linear-gradient(180deg, rgba(255, 196, 0, .06), transparent 60%), var(--wa-panel); }
#whatsapp-view .wa-approval { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--wa-line); }
#whatsapp-view .wa-approval:first-of-type { margin-top: 12px; }
#whatsapp-view .wa-approval-body p { margin: 4px 0 0; color: var(--wa-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
#whatsapp-view .wa-approval .wa-actions { display: flex; gap: 8px; }
#whatsapp-view .wa-history .wa-thread { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; max-height: 560px; overflow-y: auto; }
#whatsapp-view .wa-msg { display: grid; justify-items: end; gap: 4px; }
#whatsapp-view .wa-to { display: flex; align-items: center; gap: 8px; margin: 0 4px 0 0; font-size: .74rem; font-weight: 600; color: var(--wa-muted); }
#whatsapp-view .wa-tag { padding: 2px 8px; border-radius: 999px; font-size: .68rem; color: var(--wa-teal); background: rgba(0, 168, 132, .12); }
#whatsapp-view .wa-fail { margin: 0 4px 0 0; font-size: .78rem; color: var(--wa-danger); }
#whatsapp-view .wa-bubble { margin-left: 0; }
@media (max-width: 640px) {
  #whatsapp-view .wa-hero { padding: 22px 18px; border-radius: 24px; }
  #whatsapp-view .wa-hero .wa-pill { margin-left: 0; }
  #whatsapp-view .wa-panel { padding: 18px 14px; }
  #whatsapp-view .wa-approval { grid-template-columns: auto 1fr; }
  #whatsapp-view .wa-approval .wa-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#whatsapp-view, #whatsapp-draft, #whatsapp-settings-box) *, #whatsapp-draft.wa-sheet { animation: none !important; transition: none !important; }
}

/* the global form layers style every input and textarea: these three are part of the chat look and stay bare */
:is(#whatsapp-view input.wa-search, #whatsapp-draft textarea.wa-input) {
  appearance: none !important; border: 0 !important; border-radius: 0 !important; background: transparent !important;
  box-shadow: none !important; padding: 0 !important; min-height: 0 !important; outline: 0 !important; color: inherit !important; }
#whatsapp-view textarea.wa-compose-text { appearance: none; background: var(--wa-raise) !important; border: 1px solid transparent !important; border-radius: 24px !important;
  box-shadow: none !important; color: var(--wa-text) !important; padding: 14px 18px !important; }
#whatsapp-view textarea.wa-compose-text:focus { border-color: rgba(37, 211, 102, .5) !important; }
#whatsapp-view .wa-contacts { scrollbar-width: none; }
#whatsapp-view .wa-contacts::-webkit-scrollbar { display: none; }

/* Attachments (01.11.2026): file or photo above the caption, "Foto oder Datei anhängen" in the footer */
.wa-file { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 10px; border-radius: 9px;
  background: rgba(0, 0, 0, .16); min-width: 0; }
:root[data-theme="light"] .wa-file { background: rgba(255, 255, 255, .55); }
.wa-file-icon { display: grid; place-items: center; width: 38px; height: 44px; flex: none; color: var(--wa-green); }
.wa-file-icon .wa-svg { width: 30px; height: 30px; }
.wa-file.is-image .wa-file-icon { color: var(--wa-tick); }
.wa-file-thumb { width: 64px; height: 64px; flex: none; border-radius: 7px; object-fit: cover; }
.wa-file-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.wa-file-name { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-file-meta { font-size: .78rem; color: var(--wa-muted); }
.wa-file-x { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--wa-muted); cursor: pointer; }
.wa-file-x:hover, .wa-file-x:focus-visible { background: rgba(255, 255, 255, .08); color: var(--wa-text); }
.wa-file-x .wa-svg { width: 16px; height: 16px; }
.wa-attach { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.wa-attach .wa-svg { width: 18px; height: 18px; }
@media (max-width: 640px) { #whatsapp-draft .wa-actions .wa-attach { grid-column: 1 / -1; justify-content: center; margin-right: 0; } }
#whatsapp-draft .wa-number.wa-members { font-variant-numeric: normal; line-height: 1.35; overflow-wrap: anywhere; }

.wa-rule { padding: 16px 0; border-bottom: 1px solid var(--wa-line); }
.wa-rule .wa-btn { margin-right: 8px; }
.wa-rule-form { margin-top: 16px; }
.wa-rule-form summary { cursor: pointer; padding: 12px 0; }
.wa-rule-form label { display: block; margin: 12px 0; }
.wa-rule-form input:not([type=checkbox]), .wa-rule-form select {
  display: block; width: 100%; box-sizing: border-box; min-height: 44px; margin-top: 6px;
  padding: 10px; border: 1px solid var(--wa-line); border-radius: 10px;
  background: var(--wa-raise); color: inherit; font: inherit; font-size: 16px;
}
.wa-auto .wa-actions { flex-wrap: wrap; }

/* Medien › Konzerte (KONZERTE_PLAN.md): a dark concert hall – stage light from above, velvet curtain, gold accents,
   posters for the programme, a programme booklet and a stage with a curtain that opens. Calm with reduced motion. */

#concerts-panel {
  --cz-ink: #f6ecdc; --cz-dim: rgba(246, 236, 220, .66); --cz-gold: #d9b56c; --cz-gold-2: #f3d79b;
  --k-accent: #d9b56c; --k-accent-ink: #241707; --k-accent-hover: #f3d79b;
  --cz-velvet: #6d0d1b; --cz-velvet-2: #3c0610; --cz-floor: #0b0708; --cz-line: rgba(217, 181, 108, .22);
  position: relative; isolation: isolate; overflow: hidden; color: var(--cz-ink);
  border-radius: 28px; padding: clamp(18px, 3vw, 40px) clamp(16px, 3vw, 40px) 48px; min-height: 70vh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 214, 150, .16), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 3px, transparent 3px 26px),
    linear-gradient(90deg, var(--cz-velvet-2), var(--cz-velvet) 6%, #1a0508 14%, var(--cz-floor) 24%, var(--cz-floor) 76%, #1a0508 86%, var(--cz-velvet) 94%, var(--cz-velvet-2));
  box-shadow: inset 0 0 0 1px var(--cz-line), 0 40px 80px -50px #000;
}
#concerts-panel::after {          /* floor reflection */
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(217, 181, 108, .05));
}
#concerts-panel .cz-lights { position: absolute; inset: 0 0 auto 0; height: 520px; z-index: -1; pointer-events: none; }
#concerts-panel .cz-lights span {
  position: absolute; top: -40px; width: 34%; height: 560px; left: 33%; transform-origin: 50% 0;
  background: conic-gradient(from 168deg at 50% 0, transparent 0deg, rgba(255, 224, 170, .13) 10deg, rgba(255, 224, 170, .05) 20deg, transparent 24deg);
  filter: blur(6px); animation: cz-sway 14s ease-in-out infinite alternate;
}
#concerts-panel .cz-lights span:nth-child(1) { left: 6%; transform: rotate(14deg); animation-delay: -4s; }
#concerts-panel .cz-lights span:nth-child(3) { left: 60%; transform: rotate(-14deg); animation-delay: -9s; }
@keyframes cz-sway { from { rotate: -3deg; } to { rotate: 3deg; } }

#concerts-panel .cz-head { text-align: center; max-width: 760px; margin: 8px auto 22px; }
#concerts-panel .cz-eyebrow { margin: 0 0 6px; color: var(--cz-gold); letter-spacing: .32em; text-transform: uppercase; font-size: .72rem; font-weight: 600; }
#concerts-panel .cz-title {
  margin: 0; font-family: "EB Garamond", Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: .01em;
  font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.05;
  background: linear-gradient(180deg, #fff6e4, var(--cz-gold-2) 60%, var(--cz-gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
#concerts-panel .cz-sub { margin: 10px auto 0; color: var(--cz-dim); max-width: 560px; }

#concerts-panel .cz-doors { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 auto 16px; }
#concerts-panel .cz-door {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; letter-spacing: .02em; color: var(--cz-ink);
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--cz-line); background: rgba(255, 255, 255, .04);
  transition: background .2s, border-color .2s, transform .2s cubic-bezier(.2, .8, .2, 1);
}
#concerts-panel .cz-door:hover { border-color: var(--cz-gold); }
#concerts-panel .cz-door:active { transform: scale(.97); }
#concerts-panel .cz-door[aria-pressed="true"] { background: linear-gradient(180deg, var(--cz-gold-2), var(--cz-gold)); color: #241707; border-color: transparent; }
#concerts-panel .cz-door:focus-visible, #concerts-panel .cz-poster:focus-visible, #concerts-panel .cz-hall:focus-visible { outline: 2px solid var(--cz-gold-2); outline-offset: 3px; }

#concerts-panel .cz-search { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 10px; }
#concerts-panel .cz-search input { flex: 1; min-width: 0; }
#concerts-panel .cz-status { text-align: center; color: var(--cz-dim); min-height: 1.4em; }
#concerts-panel .cz-hint { color: var(--cz-dim); font-size: .92rem; }

#concerts-panel .cz-section { margin-top: 30px; }
#concerts-panel .cz-section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--cz-line); padding-bottom: 8px; }
#concerts-panel .cz-section-head h3 { margin: 0; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 1.6rem; color: var(--cz-gold-2); }
#concerts-panel .cz-section-head p { margin: 0; color: var(--cz-dim); font-size: .9rem; }

/* halls */
#concerts-panel .cz-halls { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
#concerts-panel .cz-hall {
  --hue: 200; appearance: none; cursor: pointer; font: inherit; text-align: left; color: var(--cz-ink);
  position: relative; overflow: hidden; display: grid; gap: 4px; align-content: end; min-height: 150px; padding: 18px;
  border-radius: 20px; border: 1px solid hsl(var(--hue) 60% 60% / .28);
  background:
    radial-gradient(90% 70% at 50% 0%, hsl(var(--hue) 90% 62% / .38), transparent 70%),
    linear-gradient(180deg, hsl(var(--hue) 40% 14%), #0d0809);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
}
#concerts-panel .cz-hall::before {     /* an arch, like a door into the hall */
  content: ""; position: absolute; left: 50%; top: 14px; width: 54%; aspect-ratio: 1 / 1.1; translate: -50% 0;
  border-radius: 999px 999px 8px 8px; border: 1px solid hsl(var(--hue) 70% 70% / .25);
  background: linear-gradient(180deg, hsl(var(--hue) 100% 75% / .14), transparent);
}
#concerts-panel .cz-hall:hover { transform: translateY(-4px); border-color: hsl(var(--hue) 70% 65% / .6); box-shadow: 0 24px 40px -26px hsl(var(--hue) 90% 50% / .7); }
#concerts-panel .cz-hall:active { transform: scale(.98); }
#concerts-panel .cz-hall-name { font-family: "EB Garamond", Georgia, serif; font-size: 1.5rem; line-height: 1.1; }
#concerts-panel .cz-hall-genre { color: hsl(var(--hue) 85% 78%); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
#concerts-panel .cz-hall-about { color: var(--cz-dim); font-size: .85rem; }
#concerts-panel .cz-hall-door { margin-top: 6px; font-size: .8rem; color: var(--cz-gold); opacity: 0; translate: -4px 0; transition: opacity .25s, translate .25s; }
#concerts-panel .cz-hall:hover .cz-hall-door, #concerts-panel .cz-hall:focus-visible .cz-hall-door { opacity: 1; translate: 0 0; }

/* wings and hall search */
#concerts-panel .cz-hall-search { margin-left: auto; min-width: min(280px, 100%); }
#concerts-panel .cz-wings { display: grid; gap: 22px; }
#concerts-panel .cz-wing-name { margin: 0 0 10px; color: var(--cz-gold); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
#concerts-panel .cz-wing .cz-halls { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
#concerts-panel .cz-wing .cz-hall { min-height: 128px; padding: 14px 16px; }
#concerts-panel .cz-wing .cz-hall-name { font-size: 1.28rem; }
#concerts-panel .cz-more { display: flex; justify-content: center; margin: 30px 0 6px; }

/* posters */
#concerts-panel .cz-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
#concerts-panel .cz-strip > * { scroll-snap-align: start; }
#concerts-panel .cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
#concerts-panel .cz-poster {
  --hue: 210; appearance: none; cursor: pointer; font: inherit; color: var(--cz-ink); text-align: left; padding: 0;
  position: relative; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08);
  background: #120b0c; box-shadow: 0 18px 30px -22px #000;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
}
#concerts-panel .cz-poster:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 30px 46px -24px #000, 0 0 0 1px var(--cz-line); }
#concerts-panel .cz-poster:active { transform: scale(.98); }
#concerts-panel .cz-poster-art, #concerts-panel .cz-booklet-art {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(70% 50% at 50% 18%, hsl(var(--hue) 90% 60% / .55), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, hsl(var(--hue) 45% 18%), #0b0708);
}
#concerts-panel .cz-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.06; transition: opacity .6s, scale 1.2s cubic-bezier(.2, .8, .2, 1); }
#concerts-panel .has-image .cz-img { opacity: 1; scale: 1; }
#concerts-panel .cz-poster:hover .cz-img { scale: 1.05; }
#concerts-panel .cz-poster-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .1) 30%, rgba(8, 4, 5, .55) 58%, rgba(8, 4, 5, .96)); }
#concerts-panel .cz-poster-text { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 4px; }
#concerts-panel .cz-poster-artist {
  font-family: "EB Garamond", Georgia, serif; font-size: 1.42rem; line-height: 1.05; font-weight: 500; color: #fff8ea;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
#concerts-panel .cz-poster-place { font-size: .78rem; color: var(--cz-gold-2); letter-spacing: .04em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#concerts-panel .cz-poster-cta { margin-top: 4px; font-size: .72rem; letter-spacing: .08em; color: var(--cz-dim); opacity: .75; transition: opacity .25s, color .25s; }
#concerts-panel .cz-poster:hover .cz-poster-cta, #concerts-panel .cz-poster:focus-visible .cz-poster-cta { opacity: 1; color: var(--cz-gold-2); }
#concerts-panel .cz-badge { position: absolute; z-index: 2; top: 10px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
#concerts-panel .cz-length { right: 10px; }
#concerts-panel .cz-number { left: 10px; background: var(--cz-gold); color: #241707; }
#concerts-panel .cz-seal {
  position: absolute; z-index: 2; left: 14px; top: 44px; padding: 2px 8px; border-radius: 4px; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(243, 215, 155, .55); color: var(--cz-gold-2); background: rgba(10, 6, 6, .45);
  max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#concerts-panel .cz-number + .cz-length + .cz-seal { top: 44px; }

#concerts-panel .cz-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 4px; }
#concerts-panel .cz-filter-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
#concerts-panel .cz-wait { color: var(--cz-dim); text-align: center; }
#concerts-panel .cz-wait-big { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 60px 0; }
#concerts-panel .cz-wait-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cz-gold); box-shadow: 0 0 18px var(--cz-gold); animation: cz-pulse 1.2s ease-in-out infinite; }
@keyframes cz-pulse { 50% { opacity: .3; scale: .7; } }
#concerts-panel .cz-empty { text-align: center; color: var(--cz-dim); padding: 40px 0; }

/* programme booklet */
#concerts-panel .cz-booklet { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(5, 2, 3, .72); backdrop-filter: blur(10px); animation: cz-fade .25s ease-out; }
#concerts-panel .cz-booklet[hidden] { display: none; }
@keyframes cz-fade { from { opacity: 0; } }
#concerts-panel .cz-booklet-card {
  --hue: 210; position: relative; display: grid; grid-template-columns: minmax(220px, 38%) 1fr; grid-template-rows: minmax(0, 1fr); width: min(980px, 100%);
  max-height: min(88vh, 860px); max-height: min(88dvh, 860px);
  overflow: hidden; border-radius: 24px; background: linear-gradient(180deg, #1a1012, #0e0809); color: var(--cz-ink);
  box-shadow: 0 0 0 1px var(--cz-line), 0 50px 90px -40px #000; animation: cz-open .45s cubic-bezier(.2, .8, .2, 1);
}
@keyframes cz-open { from { opacity: 0; transform: translateY(18px) scale(.97) rotateX(6deg); } }
#concerts-panel .cz-booklet-art { position: relative; min-height: 0; }
#concerts-panel .cz-booklet-text { min-height: 0; padding: clamp(18px, 3vw, 34px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#concerts-panel .cz-booklet-artist { margin: 0; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.05; color: #fff6e4; overflow-wrap: anywhere; }
#concerts-panel .cz-booklet-title { margin: 6px 0 0; color: var(--cz-dim); }
#concerts-panel .cz-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 18px 0; padding: 14px 0; border-block: 1px solid var(--cz-line); }
#concerts-panel .cz-facts dt { color: var(--cz-gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; align-self: center; }
#concerts-panel .cz-facts dd { margin: 0; overflow-wrap: anywhere; }
#concerts-panel .cz-booklet-about { color: var(--cz-dim); line-height: 1.6; }
#concerts-panel .cz-setlist h4 { margin: 18px 0 8px; font-family: "EB Garamond", Georgia, serif; font-weight: 500; font-size: 1.3rem; color: var(--cz-gold-2); }
#concerts-panel .cz-songs { margin: 0 0 10px; padding-left: 1.8em; }
#concerts-panel .cz-songs.is-long { columns: 2 220px; column-gap: 28px; }
#concerts-panel .cz-songs li { break-inside: avoid; padding: 2px 0; }
#concerts-panel .cz-songs li::marker { color: var(--cz-gold); font-variant-numeric: tabular-nums; }
#concerts-panel .cz-set-name { margin: 10px 0 4px; color: var(--cz-gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
#concerts-panel .cz-set-source { color: var(--cz-dim); font-size: .82rem; }
#concerts-panel .cz-set-source a { color: var(--cz-gold-2); }
#concerts-panel .cz-booklet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; position: sticky; bottom: -1px; padding-top: 12px; background: linear-gradient(180deg, transparent, #0e0809 40%); }
#concerts-panel :is(#cz-ticket, #cz-search-submit, .cz-booklet-actions .button.primary) { background: linear-gradient(180deg, var(--cz-gold-2), var(--cz-gold)); color: #241707; border: 0; font-weight: 700; padding-inline: 22px; }

/* the stage */
#concerts-panel .cz-stage { margin: 10px 0 26px; scroll-margin-top: calc(var(--tarvi-head, 0px) + 12px); }
#concerts-panel .cz-stage[hidden] { display: none; }
#concerts-panel .cz-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#concerts-panel .cz-stage-title { margin: 0; font-family: "EB Garamond", Georgia, serif; font-size: 1.4rem; color: var(--cz-gold-2); overflow-wrap: anywhere; }
#concerts-panel .cz-proscenium {
  position: relative; overflow: hidden; border-radius: 18px 18px 6px 6px; aspect-ratio: 16 / 9; background: #000;
  box-shadow: 0 0 0 1px var(--cz-line), 0 0 0 10px rgba(217, 181, 108, .06), 0 50px 90px -40px rgba(255, 200, 120, .25);
}
#concerts-panel .cz-player { position: absolute; inset: 0; display: grid; }
#concerts-panel .cz-player .media-player { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; }
#concerts-panel .cz-player :is(iframe, video) { width: 100%; height: 100%; border: 0; background: #000; }
#concerts-panel .cz-curtain {
  position: absolute; top: 0; bottom: 0; width: 51%; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 14%, transparent 86%, rgba(0, 0, 0, .5)),
    repeating-linear-gradient(90deg, #4a0711 0 6px, #8e1626 14px, #5a0915 22px, #300409 30px);
  transition: transform 1.4s cubic-bezier(.65, 0, .25, 1);
}
#concerts-panel .cz-curtain-left { left: 0; transform-origin: left; box-shadow: inset -30px 0 40px -20px #000; }
#concerts-panel .cz-curtain-right { right: 0; transform-origin: right; box-shadow: inset 30px 0 40px -20px #000; }
#concerts-panel .cz-stage.is-open .cz-curtain-left { transform: translateX(-96%) scaleX(.35); }
#concerts-panel .cz-stage.is-open .cz-curtain-right { transform: translateX(96%) scaleX(.35); }
#concerts-panel .cz-seats {
  height: 46px; margin: -10px 4% 0; position: relative; z-index: 4; pointer-events: none; opacity: .9; transition: opacity .6s;
  background:
    radial-gradient(18px 22px at 18px 30px, #050203 98%, transparent) 0 0 / 36px 46px repeat-x,
    radial-gradient(18px 22px at 36px 40px, #0a0405 98%, transparent) 0 0 / 36px 46px repeat-x;
}
#concerts-panel .cz-stage:hover .cz-seats { opacity: .25; }

/* house lights down: everything but the stage fades */
body.cz-dimmed #workspace > :not(#media-panel), body.cz-dimmed .tabs-bar, body.cz-dimmed #media-views,
body.cz-dimmed #concerts-panel > :not(.cz-stage, .cz-booklet) { transition: opacity 1s, filter 1s; opacity: .14; filter: saturate(.3); }
body.cz-dimmed #concerts-panel > :not(.cz-stage, .cz-booklet):hover { opacity: .6; }
#workspace > *, .tabs-bar, #media-views, #concerts-panel > * { transition: opacity .8s, filter .8s; }

/* light theme keeps the hall dark: it is a hall */
@media (max-width: 760px) {
  #concerts-panel { border-radius: 20px; padding-inline: 14px; }
  #concerts-panel .cz-search { flex-direction: column; }
  #concerts-panel .cz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #concerts-panel .cz-halls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #concerts-panel .cz-hall { min-height: 120px; padding: 14px; }
  #concerts-panel .cz-wing .cz-hall { min-height: 108px; padding: 12px; }
  #concerts-panel .cz-hall-search { margin-left: 0; width: 100%; }
  #concerts-panel .cz-hall-name { font-size: 1.2rem; }
  #concerts-panel .cz-poster-artist { font-size: 1.12rem; }
  #concerts-panel .cz-strip { grid-auto-columns: 44vw; }
  #concerts-panel .cz-booklet { place-items: end stretch; padding: 0; }
  #concerts-panel .cz-booklet-card { grid-template-columns: 1fr; grid-template-rows: 180px minmax(0, 1fr); max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; animation-name: cz-sheet; }
  #concerts-panel .cz-songs.is-long { columns: 1; }
  #concerts-panel .cz-stage { scroll-margin-top: 76px; }
  #concerts-panel .cz-proscenium { aspect-ratio: auto; height: 56vw; min-height: 220px; }
}
@keyframes cz-sheet { from { transform: translateY(40%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #concerts-panel *, #concerts-panel *::before, #concerts-panel *::after { animation: none !important; transition-duration: .01ms !important; }
}
