:root {
  --hg-blue:#af4474; --hg-blue-hover:#963d65; --hg-canvas:#f5f6f8;
  --hg-panel:#fff; --hg-subtle:#fafbfc; --hg-text:#242424; --hg-muted:#616161;
  --hg-line:#eae7e9; --hg-selected:#f8eef3; --hg-bubble:#f7edf2;
  --hg-header:64px; --hg-rail:216px; --hg-mobile-nav:68px;
}
html[data-theme="dark"] {
  --hg-blue:#d9a1ba; --hg-blue-hover:#e2c0ca; --hg-canvas:#1d171a;
  --hg-panel:#282124; --hg-subtle:#231d20; --hg-text:#f3eff1; --hg-muted:#b7acb1;
  --hg-line:#42373c; --hg-selected:#4d323e; --hg-bubble:#593746;
  color-scheme:dark;
}

/* One picker on every device. No dependency on installed emoji fonts. */
#chatEmojiPicker { left:auto!important; right:0!important; bottom:calc(100% + 12px)!important; width:min(410px,calc(100vw - 30px))!important; max-height:min(440px,calc(100dvh - 220px))!important; min-height:0; z-index:150; border:1px solid var(--hg-line)!important; border-radius:10px!important; background:var(--hg-panel)!important; box-shadow:0 10px 40px #21151a25!important; }
#chatEmojiPicker.is-open { display:flex!important; }
#chatEmojiPicker:not(.is-open) { display:none!important; }
#chatEmojiPicker .chat-emoji-picker-header { display:flex; gap:8px; padding:12px; border-bottom:1px solid var(--hg-line); flex:none; }
#chatEmojiSearch { background:var(--hg-subtle)!important; border:1px solid var(--hg-line)!important; border-radius:6px; color:var(--hg-text); font-size:16px!important; min-height:40px; }
#chatEmojiClose { width:40px; flex:none; border:0; border-radius:6px; background:var(--hg-subtle); color:var(--hg-text); font-size:22px; cursor:pointer; }
#chatEmojiGrid { display:grid!important; grid-template-columns:repeat(7,minmax(0,1fr))!important; gap:2px!important; padding:10px!important; min-height:0; max-height:none; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
#chatEmojiGrid .chat-emoji-choice { width:100%!important; height:46px!important; min-height:46px!important; min-width:0!important; display:flex!important; align-items:center; justify-content:center; padding:6px!important; border:0!important; border-radius:6px!important; background:transparent; }
#chatEmojiGrid .chat-emoji-choice:hover { background:var(--hg-selected); }
#chatEmojiGrid .hog-emoji { width:30px; height:30px; margin:0; }
#chatEmojiGrid .chat-emoji-more { grid-column:1/-1; margin:8px 0 0; min-height:40px; border:1px solid var(--hg-line); border-radius:6px; background:var(--hg-subtle); color:var(--hg-blue); font:inherit; font-size:13px; cursor:pointer; }
#chatEmojiFeedback { padding:8px 12px; border-top:1px solid var(--hg-line); font-size:11px; color:var(--hg-muted); flex:none; }
.hog-emoji { display:inline-block!important; width:1.25em; height:1.25em; max-width:none!important; object-fit:contain; vertical-align:-.23em; margin:0 .04em; border:0!important; box-shadow:none!important; background:none!important; }
#chatMessages .chat-action-reaction .hog-emoji { width:25px; height:25px; }
#chatMessages .chat-message-text .hog-emoji { width:1.35em; height:1.35em; }
#chatMessages .chat-reaction-chip .hog-emoji { width:19px; height:19px; }


#chatJumpLatest { position:absolute; right:24px; bottom:116px; display:none; gap:7px; align-items:center; min-height:36px; padding:7px 12px; border:1px solid var(--hg-line); border-radius:20px; background:var(--hg-panel); color:var(--hg-blue); box-shadow:0 3px 12px #21151a12; cursor:pointer; z-index:5; }
#chatJumpLatest.is-visible { display:flex; }
#chatConnection { flex:none; padding:9px 20px; font-size:12px; color:#7a4200; background:#fff4ce; border-bottom:1px solid #ecdca9; }
#chatConnection[hidden] { display:none!important; }
.hg-video-preview-status { position:absolute; bottom:14px; left:0; right:0; color:#fff; text-align:center; font-size:12px; pointer-events:none; }
/* Original Hogdrive appearance, with compatibility and feature additions only. */
body.is-login { min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center; }
body.is-login .app-container { align-self:center; margin:auto!important; }
.hg-gallery-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:14px 0; }
.hg-gallery-count { margin-right:auto; font-size:13px; } .hg-gallery-count strong { font-size:20px; }
.hg-gallery-controls label { display:flex; align-items:center; gap:10px; }
.hg-gallery-controls select,.hg-sort-submit { min-height:44px; border:1px solid var(--hg-line); border-radius:8px; padding:8px; background:var(--hg-panel); color:var(--hg-text); }
.hg-sort-submit[hidden] { display:none; }
.hg-storage-note { font-size:12px; line-height:1.5; color:var(--hg-muted); }
.lady-gallery-media > img:not([src]) { opacity:0; }
.lady-gallery-media.is-preview-error::after { content:'Vorschau nicht verfügbar'; position:absolute; inset:0; display:grid; place-items:center; background:var(--hg-subtle); color:var(--hg-muted); }
.chat-emoji-button { display:inline-flex!important; }
.chat-auto-label { font-size:11px; font-weight:700; margin-bottom:7px; opacity:.85; }
@media(max-width:760px) {
 .hg-gallery-controls label { width:100%; justify-content:space-between; }
 .hg-gallery-controls select { min-width:0; max-width:75%; font-size:16px; }
 #chatEmojiPicker { width:min(410px,calc(100vw - 24px))!important; max-height:min(400px,calc(100dvh - 230px))!important; }
 #chatEmojiGrid { grid-template-columns:repeat(6,minmax(0,1fr))!important; }
 #chatShell.is-keyboard-open { top:var(--chat-viewport-top,0px)!important; left:var(--chat-viewport-left,0px)!important; width:var(--chat-viewport-width,100%)!important; height:var(--chat-viewport-height,100dvh)!important; bottom:auto!important; }
}

.hg-gallery-count { display:flex; align-items:baseline; gap:8px; }
