/* Shared web / WebView shell. Colours follow the existing site theme. */
@font-face{font-family:'Material Symbols Rounded';src:url('/assets/fonts/material/MaterialSymbolsRounded.woff2') format('woff2');font-weight:100 700;font-style:normal;font-display:block}
@font-face{font-family:'Material Icons';src:url('/assets/fonts/material/MaterialIcons-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:block}
.material-symbol{font-family:'Material Symbols Rounded';font-weight:400;font-style:normal;font-size:22px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:'liga';font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;-webkit-font-smoothing:antialiased}
.shell-stats{display:flex;align-items:center;gap:8px;margin-left:auto;padding:5px 8px;border:1px solid var(--border);border-radius:18px;background:var(--bg-2)}.shell-stats a{display:flex;align-items:center;gap:3px;color:var(--text-0);font-size:11px;text-decoration:none}.shell-stats .material-symbol{font-size:19px}.shell-stats__ratings{flex-direction:column;font-size:9px!important;line-height:1.2}.app-editor-mode .shell-stats{display:none}
@media(max-width:768px){.shell-stats{gap:6px;padding:4px 6px}.navbar:has(.shell-stats) .brand>span:last-child{display:none}.navbar:has(.shell-stats) .nav-user{gap:6px}.navbar:has(.shell-stats) .nav-user>.btn,.navbar:has(.shell-stats) .lang-switcher{display:none}.navbar:has(.shell-stats) .nav-hamburger{order:-1}}
.rich-extra-tools{position:relative}.rich-extra-tools>summary{list-style:none;cursor:pointer;display:grid;place-items:center;min-width:36px;min-height:36px;border:1px solid var(--border);border-radius:10px;color:var(--text-0);background:var(--bg-1)}.rich-extra-tools>summary::-webkit-details-marker{display:none}
.rich-extra-tools[open]{display:flex;flex-wrap:wrap;gap:4px;align-items:center;flex:1}.rich-extra-tools:not([open])>.rich-tool-group{display:none!important}
:root{--shell-top:68px;--shell-bottom:88px;--shell-surface:color-mix(in srgb,var(--bg-1) 94%,transparent);--gradient:linear-gradient(135deg,var(--accent),var(--accent-2),var(--accent-3,#d946ef))}
body{padding-top:var(--shell-top)!important;padding-bottom:calc(var(--shell-bottom) + env(safe-area-inset-bottom))!important}
.navbar{position:fixed!important;inset:0 0 auto!important;height:var(--shell-top);z-index:1000;background:var(--shell-surface)!important;backdrop-filter:blur(18px);border-bottom:1px solid var(--border)}
.app-dock{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(460px,calc(100% - 24px));display:grid;grid-template-columns:repeat(5,1fr);align-items:center;gap:4px;padding:6px;border:1px solid color-mix(in srgb,var(--accent) 32%,var(--border));border-radius:24px;background:var(--shell-surface);backdrop-filter:blur(20px);box-shadow:0 12px 40px #0003,0 0 24px color-mix(in srgb,var(--accent) 10%,transparent);z-index:1000}
.app-dock__item{min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:17px;color:var(--text-2);font-size:10px;text-decoration:none;position:relative;transition:background .18s,color .18s,transform .18s}
.app-dock__item:hover,.app-dock__item[aria-current=page]{color:var(--text-0);background:color-mix(in srgb,var(--accent) 16%,var(--bg-2))}
.app-dock__item:focus-visible,.rich-tool:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.app-dock__item--messenger{background:var(--gradient);color:white;min-height:58px;margin-top:-18px;border:4px solid var(--bg-1);border-radius:50%;width:62px;justify-self:center;box-shadow:0 4px 20px color-mix(in srgb,var(--accent) 30%,transparent)}
.app-dock__item--messenger .material-symbol{font-size:26px}
.app-dock__badge{position:absolute;top:-2px;right:-3px;min-width:18px;padding:2px 4px;border-radius:12px;background:var(--accent-3,#d946ef);color:white;font-size:10px;border:2px solid var(--bg-1)}.app-dock__badge[hidden]{display:none}
.site-footer,.footer{margin-bottom:16px!important}
.main-content{overflow:visible!important}.main-sidebar{max-height:calc(100dvh - var(--shell-top) - var(--shell-bottom))!important;border-radius:16px!important;min-height:0;overflow-y:auto!important;overscroll-behavior-y:contain;touch-action:pan-y}
.app-editor-mode .app-dock{display:none}.app-editor-mode .main-sidebar{display:none!important}.app-editor-mode .main-content{width:100%;min-width:0}
.app-editor-mode .nav-user,.app-editor-mode .nav-links{display:none!important}.app-editor-mode .nav-links.nav-links--open{display:flex!important}.app-editor-mode .nav-hamburger{display:flex!important;margin-left:auto}
.app-editor-mode .nav-links.nav-links--open{position:fixed;top:var(--shell-top);right:12px;left:auto;width:min(320px,calc(100% - 24px));padding:12px;flex-direction:column;align-items:stretch;border:1px solid var(--border);border-radius:16px;background:var(--bg-1);box-shadow:0 10px 30px #0003}
.nav-links .shell-menu-sections{list-style:none;width:100%}.nav-links .main-sidebar{display:block!important;width:100%!important;position:static!important;max-height:none!important;overflow:visible!important;background:var(--bg-1)!important;padding:0!important}.nav-links .main-sidebar a{font-size:12px}.nav-links.nav-links--open{max-height:calc(100dvh - var(--shell-top) - var(--shell-bottom));min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y}.nav-links.nav-links--open>li{flex-shrink:0}
@media(max-width:768px){.navbar .nav-links{top:var(--shell-top);left:10px;right:10px;border:1px solid var(--border);border-radius:18px;transform:translateY(-6px);transition:opacity .16s,transform .16s,visibility .16s}.navbar .nav-links.nav-links--open{transform:translateY(0)}}
.app-editor-mode .editor-wrapper{overflow:visible!important;border-radius:18px!important}
.editor-settings{border-bottom:1px solid var(--border);border-radius:16px;background:var(--bg-1)}
.editor-settings>summary{cursor:pointer;padding:10px 14px;color:var(--text-2);font-size:13px;min-height:40px;display:list-item}
.editor-settings[open]>summary{color:var(--text-0);border-bottom:1px solid var(--border)}
.app-editor-mode .editor-canvas{position:sticky;top:var(--shell-top);z-index:20;background:var(--bg-1);border-radius:14px;box-shadow:0 4px 24px #0002}
.editor-wrapper .rich-toolbar{padding:4px!important;gap:3px!important;border-radius:14px 14px 0 0!important;background:var(--bg-2)}
.rich-tool-group{gap:3px;padding:2px 4px;border-color:var(--border)}
.editor-wrapper .rich-tool,.editor-wrapper .rich-toolbar select,.rich-voice select{min-height:34px!important;padding:5px 8px!important;border-radius:9px!important;background:var(--bg-1);color:var(--text-0);border:1px solid var(--border)!important}
.rich-tool[aria-pressed=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 16%,var(--bg-1))!important}
.editor-wrapper .rich-editor .tiptap{padding:12px!important;max-height:calc(100dvh - var(--shell-top) - var(--editor-tools-height,110px) - 100px)!important;min-height:160px;overflow-y:auto;overscroll-behavior:contain;scroll-padding:16px}
.app-editor-mode .rich-voice{position:fixed;bottom:calc(10px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(570px,calc(100% - 20px));padding:6px;gap:4px;border:1px solid var(--border);border-radius:20px;background:var(--shell-surface);backdrop-filter:blur(18px);box-shadow:0 8px 28px #0003;z-index:1001;justify-content:center}
.rich-voice .rich-tool{border-radius:12px!important;min-height:38px;border:1px solid var(--border);padding:6px 10px}
.editor-actions{gap:6px!important;padding:8px!important;flex-wrap:wrap}.editor-actions .btn{border-radius:12px!important;min-height:38px;padding:7px 10px!important;font-size:12px}.editor-actions__select{max-width:155px;border-radius:10px!important}
.rich-emoji{border-radius:18px;padding:8px;box-shadow:0 8px 30px #0002}.emoji-categories{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}.emoji-categories .rich-tool{border-radius:12px;font-size:11px}.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:4px}.emoji-cell{width:38px;height:38px;border-radius:50%!important;padding:0!important;display:inline-grid;place-items:center;background:var(--bg-1);border:1px solid var(--border);font-size:22px!important}.emoji-frequent{display:flex;gap:3px;flex-wrap:wrap}.emoji-categories [aria-pressed=true]{border-color:var(--accent);color:var(--accent)}
.app-editor-mode .rich-emoji{max-height:30dvh;overflow:auto}
.app-editor-mode .editor-canvas{height:calc(100dvh - var(--shell-top) - var(--shell-bottom) - 60px);display:flex;flex-direction:column;min-height:260px}
.app-editor-mode .editor-canvas>.rich-toolbar{flex-shrink:0}.app-editor-mode .editor-canvas>.rich-editor{flex:1;min-height:0;overflow:auto}
.app-editor-mode .editor-canvas .rich-editor .tiptap{min-height:100px;max-height:none!important;overflow:visible}
.app-editor-mode .editor-canvas>.rich-emoji{flex-shrink:1;min-height:70px}
.btn-action .material-symbol{font-size:17px}.nav-links .main-sidebar a.active{color:var(--accent)!important}.emoji-panel button{width:38px;height:38px;padding:0!important;border-radius:50%!important;border:1px solid var(--border)!important;background:var(--bg-1)!important;display:grid;place-items:center}
.app-editor-mode .brand__logo img{display:none}.app-editor-mode .brand__logo::before{content:'home';font-family:'Material Symbols Rounded';font-size:24px;font-feature-settings:'liga';color:var(--text-0)}
.editor-wrapper,.editor-image-picker-modal,.editor-crop-modal{--editor-bg-page:var(--bg-0);--editor-bg-block:var(--bg-2);--editor-bg-canvas:var(--bg-1);--editor-text-primary:var(--text-0);--editor-text-secondary:var(--text-2);--editor-accent:var(--accent);--editor-accent-hover:var(--accent-2);--editor-border:var(--border);--gradient:linear-gradient(135deg,var(--accent),var(--accent-2),var(--accent-3,#d946ef))}
.editor-wrapper .editor-top-panel,.editor-wrapper .editor-main-info,.editor-wrapper .editor-cover-section-wrapper,.editor-wrapper .editor-excerpt-section,.editor-wrapper .editor-bottom-panel,.editor-cover-floating-panel,.editor-image-picker-modal__content,.editor-crop-modal__content{color:var(--text-0)!important}
.editor-wrapper input,.editor-wrapper textarea,.editor-wrapper select{border-radius:9px}.editor-wrapper label,.editor-cover-placeholder{color:var(--text-2)!important}
.app-editor-mode .editor-actions{display:flex!important;flex-direction:row!important;align-items:center!important}.app-editor-mode .editor-actions__visibility-group{display:flex!important;flex-direction:row!important;align-items:center!important;width:auto!important;margin:0!important}
.shell-icon-button{display:inline-grid!important;place-items:center;width:38px!important;height:38px;min-width:38px;padding:0!important;border:1px solid var(--border);border-radius:12px!important;background:var(--bg-2);color:var(--text-0)!important;cursor:pointer;text-decoration:none}.shell-icon-button--primary{background:var(--gradient);color:white!important}.shell-stats{min-width:190px;gap:14px;padding:6px 12px}.shell-stats__ratings{min-width:50px;gap:2px}.nav-links:has(.shell-icon-button){gap:5px}.navbar .nav-user{gap:5px}
@media(max-width:768px){.shell-stats{min-width:155px;gap:8px;padding:5px 8px}.shell-icon-button{width:32px!important;min-width:32px;height:34px}.navbar:has(.shell-stats) .nav-user>.shell-icon-button{display:none!important}.navbar:has(.shell-stats) .nav-user>.shell-icon-button[href='/profile#settings']{display:inline-grid!important}.navbar .nav-links .shell-icon-button{width:38px!important;display:inline-grid!important}}
html[dir=rtl] .shell-stats{margin-left:0;margin-right:auto}
.shell-stats__unread{display:flex;align-items:center;gap:3px;font-size:11px}.shell-stats{min-width:216px;gap:12px}.shell-stats .material-symbol{font-size:18px}@media(max-width:768px){.shell-stats{min-width:178px;gap:6px}.navbar:has(.shell-stats) .nav-user>.shell-icon-button[href='/profile#settings']{display:none!important}}
.app-editor-mode{--shell-bottom:140px}.app-editor-mode .rich-voice{bottom:calc(68px + env(safe-area-inset-bottom))}.app-editor-mode .editor-actions{position:fixed;bottom:calc(10px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(650px,calc(100% - 20px));min-height:48px;background:var(--shell-surface);backdrop-filter:blur(18px);border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 24px #0003;z-index:1001;justify-content:center}
@media(max-width:768px){.app-editor-mode .editor-actions>.btn,.app-editor-mode .editor-actions__visibility-group>.btn{font-size:0!important;width:38px;height:38px;padding:9px!important;flex-shrink:0}.app-editor-mode .editor-actions .btn svg{width:20px;height:20px}.app-editor-mode .editor-actions__select{max-width:140px;font-size:11px}.app-editor-mode .editor-actions__visibility-group{flex:0 1 auto!important}.app-editor-mode .editor-actions{flex-wrap:nowrap!important}}
.toast-container{bottom:calc(var(--shell-bottom) + 16px + env(safe-area-inset-bottom))!important}.cookie-banner{bottom:calc(var(--shell-bottom) + env(safe-area-inset-bottom))!important;border-radius:18px;max-width:600px;margin:auto;padding:12px!important}
@media(max-width:768px){:root{--shell-top:54px;--shell-bottom:90px}.navbar .nav-container{min-height:54px!important;height:54px;padding:0 10px!important;gap:8px}.brand{font-size:16px}.brand__logo img{width:28px;height:28px}.nav-user__name{display:none}.app-editor-mode .editor-wrapper{margin:0!important}.editor-wrapper .rich-tool,.editor-wrapper .rich-toolbar select{min-height:36px!important}.rich-tool-group{padding:0 2px}.editor-wrapper .rich-editor .tiptap{font-size:16px}.editor-actions__visibility-group{gap:5px!important}.site-footer{padding:16px 12px!important}.app-editor-mode .rich-voice select{max-width:94px}.rich-voice .rich-tool{font-size:11px;padding:6px 8px}.main-sidebar{top:var(--shell-top)!important}}
@media(prefers-reduced-motion:reduce){.app-dock__item,.rich-tool{transition:none!important}}

.shell-menu-account-actions{display:flex;gap:8px;padding:8px 0;border-top:1px solid var(--border);list-style:none}

body.shell-guest{--shell-bottom:0px;padding-bottom:env(safe-area-inset-bottom)!important}.shell-guest .site-footer{padding-bottom:20px!important}
