:root{--bg:#f2e5cf;--surface:#fffcf6;--ink:#352d25;--muted:#756451;--line:#dfceb3;--copper:#925d39;--pale:#eddfc8;color-scheme:light}
html[data-theme=dark]{--bg:#211e1a;--surface:#2d2823;--ink:#f4e6ce;--muted:#c6b59c;--line:#504437;--copper:#d5ab7e;--copper-dark:#edc9a2;--gold:#d5ab7e;--pale:#3a3026;--green:#b3d2a8;--red:#efb0a6;--shadow:0 7px 22px #0003;color-scheme:dark}
body{background:var(--bg);color:var(--ink)}.menu-backdrop,.menu-close{display:none}.template-launch{margin-bottom:15px}.template-point{border-bottom:1px solid var(--line);padding:9px 0}.template-point summary{cursor:pointer;font-weight:600;padding:5px}.template-point label{margin:8px 0}.template-point input[type=checkbox]{width:auto}.template-buttons,.receipt-person{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap}.template-buttons button,.receipt{color:var(--muted);padding:6px}.receipt{letter-spacing:-2px;font-weight:bold}.receipt.was-read{color:var(--copper-dark);border-bottom:2px solid var(--copper)}.receipt-old{font-size:11px;color:var(--muted);display:block}.receipt-person{padding:9px 0;border-bottom:1px solid var(--line)}.compact-welcome{background:var(--pale)}.settings-card select{background:var(--surface);color:var(--ink);padding:10px;border:1px solid var(--line);border-radius:8px}
@media(max-width:760px){.sidebar.open~.menu-backdrop{display:block;position:fixed;inset:0;background:#21170f55;z-index:29}.sidebar.open .menu-close{display:block;position:absolute;top:8px;right:8px;width:44px;height:44px;font-size:25px}.mobile-nav{background:#e8d5b5}.mobile-nav .active{background:var(--surface);color:var(--ink)}}
html[data-theme=dark] button:focus-visible,html[data-theme=dark] a:focus-visible,html[data-theme=dark] input:focus-visible,html[data-theme=dark] textarea:focus-visible,html[data-theme=dark] select:focus-visible{outline:3px solid #56493b}
html[data-theme=dark] .primary,html[data-theme=dark] .button.primary{color:#f4e6ce}
html[data-theme=dark] .pill{color:#c6b59c}
html[data-theme=dark] .pill.green{background:#324233}
html[data-theme=dark] .pill.red{background:#48302a}
html[data-theme=dark] .error{background:#2d2823;border:1px solid #56493b;color:#efb0a6}
html[data-theme=dark] .brand img{box-shadow:0 3px 10px #00000036}
html[data-theme=dark] .nav-group-label{color:#c6b59c}
html[data-theme=dark] .nav-link{color:#c6b59c}
html[data-theme=dark] .nav-link:hover{background:#3a3026}
html[data-theme=dark] .nav-count{color:#f4e6ce}
html[data-theme=dark] .channel-nav{color:#c6b59c}
html[data-theme=dark] .channel-nav.active{background:#3a3026}
html[data-theme=dark] .channel-dot{background:#694b32}
html[data-theme=dark] .channel-dot.dot1{background:#324233}
html[data-theme=dark] .channel-dot.dot2{background:#694b32}
html[data-theme=dark] .sidebar-tip{background:#2d2823;border:1px solid #56493b;color:#c6b59c}
html[data-theme=dark] .sidebar-tip strong{color:#c6b59c}
html[data-theme=dark] .avatar{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .avatar.alt{background:#324233;color:#b3d2a8}
html[data-theme=dark] .avatar.rose{background:#48302a;color:#c6b59c}
html[data-theme=dark] .topbar{background:#2d2823}
html[data-theme=dark] .breadcrumb{color:#c6b59c}
html[data-theme=dark] .breadcrumb span{color:#f4e6ce}
html[data-theme=dark] .search-form{background:#3a3026;border:1px solid #56493b;color:#c6b59c}
html[data-theme=dark] .online-status{color:#b3d2a8}
html[data-theme=dark] .online-status::before{background:#324233}
html[data-theme=dark] .date-caption{color:#c6b59c}
html[data-theme=dark] .welcome{border:1px solid #56493b;background:linear-gradient(110deg,#3a3026,#2d2823 65%,#3a3026)}
html[data-theme=dark] .welcome p{color:#c6b59c}
html[data-theme=dark] .welcome img{box-shadow:0 8px 25px #00000036}
html[data-theme=dark] .welcome:after{border:1px solid #56493b}
html[data-theme=dark] .stat-symbol{color:#c6b59c;background:#3a3026}
html[data-theme=dark] .stat small{color:#c6b59c}
html[data-theme=dark] .body-copy{color:#c6b59c}
html[data-theme=dark] .file-chip{background:#2d2823}
html[data-theme=dark] .post-footer{border-top:1px solid #56493b}
html[data-theme=dark] .post-footer button{color:#c6b59c}
html[data-theme=dark] .post-footer .seen{color:#c6b59c}
html[data-theme=dark] .rail-heading .icon{color:#c6b59c}
html[data-theme=dark] .calendar-date{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .shortcut{border-bottom:1px solid #56493b}
html[data-theme=dark] .shortcut .icon{color:#c6b59c}
html[data-theme=dark] .shortcut .arrow{color:#c6b59c}
html[data-theme=dark] .rail-footer{color:#c6b59c}
html[data-theme=dark] .demo-banner{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .knowledge-card:hover{border-color:#56493b}
html[data-theme=dark] .knowledge-icon{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .knowledge-card footer{color:#c6b59c}
html[data-theme=dark] .check-button{border:1.5px solid #56493b;color:#f4e6ce}
html[data-theme=dark] .day.other{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .day.today .day-num{color:#f4e6ce}
html[data-theme=dark] .day-event{color:#c6b59c}
html[data-theme=dark] .thread-button{border-top:1px solid #56493b}
html[data-theme=dark] .thread-button.active{background:#3a3026}
html[data-theme=dark] .messages{background:#2d2823}
html[data-theme=dark] .message{background:#2d2823;border:1px solid #56493b;box-shadow:0 3px 7px #00000036}
html[data-theme=dark] .message.mine{background:#3a3026;border-color:#56493b}
html[data-theme=dark] .message small{color:#c6b59c}
html[data-theme=dark] .message time{color:#c6b59c}
html[data-theme=dark] .chat-compose textarea{background:#2d2823}
html[data-theme=dark] .skeleton{background:linear-gradient(90deg,#3a3026,#2d2823,#3a3026)}
html[data-theme=dark] .list-table td{border-bottom:1px solid #56493b}
html[data-theme=dark] .notice-row.unread{background:#3a3026}
html[data-theme=dark] .notice-row small{color:#c6b59c}
html[data-theme=dark] .modal{box-shadow:0 25px 100px #00000036}
html[data-theme=dark] .modal::backdrop{background:#694b32}
html[data-theme=dark] .modal-foot{background:#2d2823}
html[data-theme=dark] .modal label,html[data-theme=dark] .setup-card label{color:#c6b59c}
html[data-theme=dark] .modal input,html[data-theme=dark] .modal select,html[data-theme=dark] .modal textarea,html[data-theme=dark] .settings-card input,html[data-theme=dark] .settings-card select,html[data-theme=dark] .settings-card textarea,html[data-theme=dark] .setup-card input,html[data-theme=dark] .setup-card select,html[data-theme=dark] .filters select{border:1px solid #56493b;background:#2d2823}
html[data-theme=dark] .upload-label{border:1px dashed #56493b}
html[data-theme=dark] .detail-body{color:#c6b59c}
html[data-theme=dark] .detail-info{background:#3a3026}
html[data-theme=dark] .confirm-box{border:1px solid #56493b;background:#3a3026}
html[data-theme=dark] .viewer-row{border-bottom:1px solid #56493b}
html[data-theme=dark] .comment time{color:#c6b59c}
html[data-theme=dark] .comment p{color:#c6b59c}
html[data-theme=dark] .image-modal{background:#694b32}
html[data-theme=dark] .image-modal .modal-head{background:#694b32;color:#f4e6ce}
html[data-theme=dark] .setup-body{background:radial-gradient(ellipse at top,#3a3026,#2d2823 60%)}
html[data-theme=dark] .setup-card{background:#2d2823;box-shadow:0 25px 80px #00000036}
html[data-theme=dark] .checks span{background:#324233}
html[data-theme=dark] .checks .check-fail{background:#3a3026}
html[data-theme=dark] .login-aside{background:#3a3026}
html[data-theme=dark] .login-aside:after{border:1px solid #56493b}
html[data-theme=dark] .login-aside img{box-shadow:0 15px 40px #00000036}
html[data-theme=dark] .login-aside h1{color:#f4e6ce}
html[data-theme=dark] .login-aside p{color:#c6b59c}
html[data-theme=dark] .login-aside .login-footer{color:#c6b59c}
html[data-theme=dark] .login-form label{color:#c6b59c}
html[data-theme=dark] .login-form footer{color:#c6b59c}
html[data-theme=dark] #toast{background:#694b32;color:#f4e6ce;box-shadow:0 10px 35px #00000036}
html[data-theme=dark] .code-field{background:#3a3026}
@media(min-width:1600px){}
@media(max-width:1200px){}
@media(max-width:980px){}
@media(max-width:760px){html[data-theme=dark] .sidebar{box-shadow:15px 0 80px #00000036}
html[data-theme=dark] .mobile-nav{background:#2d2823}
html[data-theme=dark] .mobile-nav a,html[data-theme=dark] .mobile-nav button{color:#c6b59c}}
@media(prefers-reduced-motion:reduce){}
@media(max-width:760px){}
html[data-theme=dark] .compact-welcome p{color:#c6b59c}
html[data-theme=dark] .body-copy{color:#f4e6ce}
html[data-theme=dark] .post-image{background:#3a3026}
html[data-theme=dark] .cover-media{background:#3a3026}
html[data-theme=dark] .post-footer>button,html[data-theme=dark] .post-footer .seen,html[data-theme=dark] .post-footer .reaction-picker>summary{color:#c6b59c}
html[data-theme=dark] .reaction-options{border:1px solid #56493b;box-shadow:0 8px 30px #00000036}
html[data-theme=dark] .item-menu-options{border:1px solid #56493b;box-shadow:0 8px 28px #00000036}
html[data-theme=dark] .create-fab{color:#f4e6ce;box-shadow:0 5px 18px #00000036;border:1px solid #56493b}
html[data-theme=dark] .create-fab:hover{background:#3a3026}
html[data-theme=dark] .detail-body{color:#f4e6ce}
html[data-theme=dark] .comment p{color:#f4e6ce}
html[data-theme=dark] .cover-placeholder{border:1px dashed #56493b;background:#3a3026}
html[data-theme=dark] .message small{color:#c6b59c}
html[data-theme=dark] .message time{color:#c6b59c}
@media(max-width:760px){html[data-theme=dark] .mobile-nav{background:#3a3026;border-top:1px solid #56493b;box-shadow:0 -4px 18px #00000036}
html[data-theme=dark] .mobile-nav a,html[data-theme=dark] .mobile-nav button{color:#f4e6ce}
html[data-theme=dark] .mobile-nav .active{background:#694b32;color:#f4e6ce;box-shadow:0 2px 5px #00000036}
html[data-theme=dark] .mobile-badge{background:#48302a;color:#f4e6ce}}
@media(max-width:360px){}
html[data-theme=dark] .update-banner{background:#3a3026}
html[data-theme=dark] .confirmation-overview{border:1px solid #56493b;background:#2d2823}
html[data-theme=dark] .confirmed-status{color:#b3d2a8}
html[data-theme=dark] .pending-status{color:#c6b59c}
html[data-theme=dark] .chat-emoji-panel{border:1px solid #56493b;box-shadow:0 6px 24px #00000036}
@media(max-width:760px){}
@media(max-width:640px){}
html[data-theme=dark] .checklist-badge{background:#3a3026;color:#c6b59c}
html[data-theme=dark] .checklist-badge.done{background:#324233;color:#b3d2a8}
html[data-theme=dark] .checklist-badge.problem{background:#3a3026;color:#efb0a6}
html[data-theme=dark] .checklist-all-clear{color:#b3d2a8}
html[data-theme=dark] .checklist-issue-mark{background:#3a3026;color:#efb0a6}
html[data-theme=dark] .checklist-progress progress{background:#3a3026}
html[data-theme=dark] .checklist-progress progress::-webkit-progress-bar{background:#3a3026}
html[data-theme=dark] .checklist-tick{border:1.5px solid #56493b}
html[data-theme=dark] .checklist-tick.checked{background:#324233;border-color:#56493b;color:#b3d2a8}
html[data-theme=dark] .checklist-point.problem .checklist-tick{color:#efb0a6;border-color:#56493b;background:#3a3026}
html[data-theme=dark] .checklist-point.done .checklist-point-meta strong,html[data-theme=dark] .checklist-point.resolved .checklist-point-meta strong{color:#b3d2a8}
html[data-theme=dark] .checklist-point.problem:not(.resolved) .checklist-point-meta strong{color:#efb0a6}
html[data-theme=dark] .checklist-resolution{color:#b3d2a8}
html[data-theme=dark] .checklist-signoff{background:#324233;border:1px solid #56493b}
html[data-theme=dark] .checklist-finish-warning{background:#2d2823;border:1px solid #56493b}
@media(max-width:900px){}
@media(max-width:430px){}

html[data-theme=dark] .brand-document,html[data-theme=dark] .brand-document[data-brand=wirtshaus]{--doc-paper:#2d2823;--doc-ink:#f4e6ce;--doc-accent:#d5ab7e;--doc-line:#504437;--doc-muted:#c6b59c}
html[data-theme=dark] .document-logo{background:#fffdf8;border-radius:6px;padding:6px}
html[data-theme=dark] .primary,html[data-theme=dark] .create-fab,html[data-theme=dark] .nav-count{background:#d5ab7e;color:#211e1a}
html[data-theme=dark] .mobile-nav{background:#382e23}html[data-theme=dark] .mobile-nav .active{color:var(--ink);background:var(--surface)}
html[data-theme=dark] .topbar,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:var(--surface);color:var(--ink)}
@media print{html[data-theme=dark]{--bg:white;--surface:white;--ink:#222;--muted:#555;--line:#bbb;color-scheme:light}html[data-theme=dark] .brand-document *{color:#222!important;background:transparent!important;box-shadow:none!important}html[data-theme=dark] .brand-document[data-brand=wirtshaus]{--doc-ink:#222;--doc-line:#bbb;--doc-accent:#794728;--doc-paper:white}html[data-theme=dark] .document-logo{padding:0}}
.ck-heading{display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding:0 0 12px;margin-bottom:14px}.ck-heading img{width:55px;height:55px;flex:none}.ck-heading h1{font-size:clamp(21px,4vw,28px);margin:0}.ck-heading p{margin:3px 0;color:var(--muted);font-size:15px}.ck-areas{display:grid;gap:8px;margin-bottom:16px}.ck-areas>div{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.ck-areas strong{width:80px;font-size:14px}.ck-areas button{padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink)}.ck-areas button[aria-pressed=true]{background:var(--ink);color:var(--bg)}.ck-areas button:disabled{opacity:.5;cursor:default}
@media screen{html[data-theme=dark] .ck-heading img{filter:brightness(0) invert(.89)}}
@media(max-width:400px){.ck-areas strong{width:100%}.ck-heading{gap:10px}.ck-heading img{width:46px;height:46px}}

.attachments .file-chip.attachment-photo {display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:.65rem;max-width:100%;box-sizing:border-box}
.attachment-photo img {width:44px;height:64px;object-fit:contain;border-radius:4px;background:rgba(120,110,90,.12)}
.attachment-photo span,.attachment-viewer strong {min-width:0;overflow-wrap:anywhere}
.attachment-viewer {max-width:94vw;width:48rem;box-sizing:border-box;border:0;border-radius:12px;padding:1rem;color:CanvasText;background:Canvas}
.attachment-viewer::backdrop {background:#000b}
.attachment-viewer header,.attachment-viewer footer {display:flex;align-items:center;justify-content:space-between;gap:.65rem;padding:.4rem 0}
.attachment-viewport {height:62vh;height:62dvh;overflow:auto}
.attachment-viewport img {display:block;width:100%;height:100%;object-fit:contain}
.attachment-viewer.zoomed .attachment-viewport img {width:200%;height:auto;max-width:none}
@media(max-width:440px){.attachments .file-chip.attachment-photo {grid-template-columns:44px minmax(0,1fr);row-gap:0}.attachment-photo img{grid-row:span 2}.attachment-photo small{grid-column:2}}
.template-point summary button {float:right;margin-inline-start:.5rem}

.receipt .receipt-count{letter-spacing:normal;font-size:.8rem;font-weight:500;margin-inline-start:.4rem}
.receipt .receipt-count:empty{display:none}
#chat-file-list .chat-attachment-thumb{width:48px;height:48px;object-fit:cover;border-radius:6px;flex:none}

@media (max-width: 760px) {
  .chat-compose #chat-form {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "emoji attachment photo photo" "message message message send";
    align-items: center;
    gap: 4px 6px;
  }
  #chat-form .chat-emojis { grid-area: emoji; }
  #chat-form > label.icon-button { grid-area: attachment; }
  #chat-form .krug-photo-choice { grid-area: photo; justify-self: start; }
  #chat-form #chat-input {
    grid-area: message;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    font-size: 17px;
    line-height: 1.4;
    box-sizing: border-box;
  }
  #chat-form > button[type=submit] { grid-area: send; align-self: end; }
}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}.avatar.chat-photo{width:24px;height:24px;vertical-align:middle;margin-inline-end:6px}.photo-editor canvas{border-radius:50%;width:160px;height:160px;margin:auto}.photo-editor{display:grid;gap:12px}.photo-editor fieldset label{display:grid}
@media(max-width:760px){.kc.kc-mobile .kc-agenda{overflow-y:auto;overscroll-behavior-y:auto;box-sizing:border-box;padding-bottom:12px}.mobile-nav{-webkit-touch-callout:none;user-select:none}}
#nav-slots label{display:grid;grid-template-columns:5em 1fr;align-items:center;margin:8px 0}
#nav-slots .nav-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
#nav-slots .available{grid-template-columns:repeat(3,minmax(0,1fr))}
#nav-slots button{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:.7rem;min-width:0;min-height:64px;padding:.3rem;display:grid;justify-items:center;align-content:center;gap:.3rem;font-size:.78rem;overflow-wrap:anywhere;touch-action:none;user-select:none}
#nav-slots [aria-pressed=true],#nav-slots .drop-target{outline:2px solid var(--gold);outline-offset:-2px}
#nav-slots [data-key=tippspiel] svg{color:#3d956d}
html:has(.notice-dialog[open]),body:has(.notice-dialog[open]){overflow:hidden;overscroll-behavior:none}
dialog.notice-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem);overflow:hidden}
.notice-dialog .modal-head{flex:none}.notice-dialog .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
.notice-more{flex:none;padding:.55rem;color:var(--text);background:var(--surface);border-top:1px solid var(--line)}.notice-more[hidden]{display:none}

/* Keep the portal controls below the iPhone status area and its fading edge. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 760px) {
    .topbar {
      height: auto;
      min-height: 60px;
      box-sizing: content-box;
      padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
      background-color: var(--surface, #fffdfa);
    }
    .mobile-chat-open .chat-header {
      padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    }
  }
}
.message-reactions{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;margin-top:.25rem}
.message-reactions button{font:inherit;line-height:1.1;min-width:32px;min-height:32px;padding:.25rem .45rem;border-radius:1rem;border:1px solid var(--line);background:var(--surface);color:var(--text)}
.message-reactions [aria-pressed=true]{outline:2px solid var(--gold);outline-offset:-2px}
.modal-body .message-reactions button{min-width:44px;min-height:44px;font-size:1.25rem}
#messages .message img{-webkit-touch-callout:none}
