/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-950:oklch(25.8% .092 26.042);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-950:oklch(27.9% .077 45.635);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-950:oklch(27.4% .072 132.109);--color-green-400:oklch(79.2% .209 151.711);--color-green-950:oklch(26.6% .065 152.934);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-950:oklch(27.7% .046 192.524);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-950:oklch(29.3% .066 243.157);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-950:oklch(25.7% .09 281.288);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-950:oklch(28.3% .141 291.089);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-950:oklch(29.3% .136 325.661);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-950:oklch(27.1% .105 12.094);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.isolate{isolation:isolate}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.border{border-style:var(--tw-border-style);border-width:1px}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.text-justify{text-align:justify}.text-wrap{text-wrap:wrap}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.invert{--tw-invert:invert(100%);filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[program\:node83-web\]{program:node83-web}.\[program\:node83-worker\]{program:node83-worker}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}/* Restore native dialog centring after the global margin reset. */
dialog { margin: auto; }
:root{color-scheme:dark;--bg:#0c0d10;--panel:#13151a;--panel-raised:#191b22;--border:#262932;--muted:#858b99;--text:#eceef3;--accent:#c7f36b;--accent-dark:#1d2812;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{min-height:100vh;background:var(--bg);color:var(--text)}a{color:inherit}.landing{display:grid;min-height:100vh;place-items:center;background:radial-gradient(ellipse at 50% 42%,#171a20 0%,#0c0d10 58%)}.landing a{color:var(--text);font:500 16px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;text-decoration:none;transition:color .2s}.landing a:hover{color:var(--accent)}.login{display:grid;min-height:100vh;place-items:center;padding:24px;background:radial-gradient(ellipse at 50% 35%,#191d24,#0c0d10 65%)}.login form{display:grid;width:min(100%,390px);gap:18px;padding:36px;background:rgba(19,21,26,.94);border:1px solid var(--border);border-radius:14px;box-shadow:0 24px 90px #0008}.login-brand,.brand{width:max-content;color:var(--text);font:600 14px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;text-decoration:none}.login h1{margin:12px 0 0;font-size:26px;letter-spacing:-.04em}.login form>p:not(.error){margin:0;color:var(--muted);font-size:14px}.login label{display:grid;gap:8px;color:#b7bbc5;font-size:13px}.login input{height:46px;padding:0 13px;border:1px solid #333741;border-radius:7px;outline:none;background:#0e1014;color:var(--text);font:inherit}.login input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.login button,.sidebar button{height:44px;border:0;border-radius:7px;background:var(--accent);color:var(--accent-ink);font:600 14px inherit;cursor:pointer;transition:filter .15s,transform .15s}.login button:hover{filter:brightness(1.06);transform:translateY(-1px)}.error{min-height:0;margin:0;color:#ff9e9e;font-size:13px}.error:empty{display:none}.shell{display:flex;min-height:100vh}.sidebar{position:sticky;top:0;display:flex;width:258px;height:100vh;flex:none;flex-direction:column;gap:34px;padding:26px 16px 18px;border-right:1px solid var(--border);background:#101115;overflow:hidden}.sidebar[data-sidebar-animate]{transition:width .2s}.sidebar-collapsed .sidebar{width:76px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{display:flex;align-items:center;min-height:42px;padding:0 12px;border:1px solid transparent;border-radius:7px;color:#9ba0ac;text-decoration:none;font-size:13px;white-space:nowrap;transition:background .15s,color .15s}.sidebar nav a:hover{background:#191b20;color:#f4f5f8}.sidebar nav a.active{border-color:var(--accent-border);background:var(--accent-dark);color:var(--accent)}.sidebar form{margin-top:auto}.sidebar button{width:100%;background:#1a1c22;color:#c4c7d0}.sidebar button:hover{background:#242730}.sidebar-collapsed .sidebar nav a{overflow:hidden;font-size:0}.sidebar-collapsed .sidebar nav a:first-letter{font-size:14px}.shell main{flex:1;min-width:0}.toggle{display:grid;width:38px;height:38px;margin:17px 0 0 20px;place-items:center;border:1px solid transparent;border-radius:7px;background:transparent;color:#a9afbb;font-size:17px;cursor:pointer}.toggle:hover{border-color:var(--border);background:#17191e;color:white}.page{width:min(100%,1000px);margin:70px auto;padding:0 44px}.page h1{margin:13px 0;font-size:clamp(29px,4vw,38px);letter-spacing:-.045em}.page>p:not(.eyebrow){color:var(--muted);font-size:14px}.empty{margin:32px 0 22px;padding:24px;border:1px solid var(--border);border-radius:9px;background:#13151a;color:#a5aab5;font-size:14px;line-height:1.6}.page>a{color:var(--accent);text-decoration:none;font-size:13px}.page>a:hover{text-decoration:underline}@media(max-width:700px){.sidebar{width:76px}.sidebar nav a{font-size:0}.sidebar nav a:first-letter{font-size:14px}.page{margin:42px auto;padding:0 22px}.page h1{font-size:29px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.count-pill{padding:8px 11px;border:1px solid var(--border);border-radius:99px;color:#adb2bd;font-size:12px}.upload-panel{display:flex;align-items:center;gap:12px;margin:30px 0 28px;padding:17px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}.upload-panel>div{display:grid;gap:5px;flex:1}.upload-panel strong{font-size:13px}.upload-panel span{color:var(--muted);font-size:12px}.upload-button,.upload-panel button{display:inline-flex;min-height:38px;align-items:center;justify-content:center;padding:0 13px;border:1px solid #343843;border-radius:6px;background:#1a1c22;color:#e5e7ed;font:600 12px inherit;cursor:pointer}.upload-button:hover{background:#22252d}.upload-button input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.upload-panel button{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:15px}.asset-card{overflow:hidden;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.asset-preview{display:grid;aspect-ratio:4/3;place-items:center;background-color:#17191e;background-image:linear-gradient(45deg,#202229 25%,transparent 25%),linear-gradient(-45deg,#202229 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#202229 75%),linear-gradient(-45deg,transparent 75%,#202229 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}.asset-preview img{width:100%;height:100%;object-fit:contain}.asset-meta{display:grid;gap:6px;padding:12px}.asset-meta strong{overflow:hidden;color:#e0e2e8;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.asset-meta span{color:var(--muted);font-size:11px;text-transform:capitalize}.gallery-empty{grid-column:1/-1;display:grid;min-height:230px;align-content:center;justify-items:center;padding:20px;border:1px dashed #343842;border-radius:10px;text-align:center}.gallery-empty .empty-icon{display:grid;width:42px;height:42px;place-items:center;border:1px solid var(--accent-border);border-radius:11px;background:var(--accent-dark);color:var(--accent);font-size:22px}.gallery-empty h2{margin:15px 0 5px;font-size:16px}.gallery-empty p{max-width:350px;color:var(--muted);font-size:13px;line-height:1.6}@media(max-width:600px){.upload-panel{align-items:stretch;flex-direction:column}.upload-panel>div{margin-bottom:4px}.upload-button,.upload-panel button{width:100%}.page-heading{align-items:flex-start}}
.search-form{display:flex;gap:8px;margin:27px 0}.search-form input,.snippet-editor input,.snippet-editor textarea{width:100%;padding:11px 12px;border:1px solid #30343d;border-radius:6px;outline:none;background:#101115;color:var(--text);font:inherit;font-size:13px}.search-form input:focus,.snippet-editor input:focus,.snippet-editor textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.search-form button,.snippet-editor>button{padding:0 16px;border:1px solid var(--accent);border-radius:6px;background:var(--accent);color:var(--accent-ink);font:600 12px inherit;cursor:pointer}.snippet-layout{display:grid;grid-template-columns:minmax(250px,320px) minmax(0,1fr);align-items:start;gap:18px}.snippet-editor,.snippet-card{padding:17px;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.snippet-editor{display:grid;gap:14px}.snippet-editor h2{margin:0 0 3px;font-size:15px}.snippet-editor label{display:grid;gap:7px;color:#b7bbc5;font-size:12px}.snippet-editor textarea{resize:vertical;font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.snippet-editor>button{min-height:39px}.snippet-list{display:grid;gap:12px}.snippet-card header{display:flex;justify-content:space-between;gap:12px}.snippet-card h2{margin:0;font-size:14px}.snippet-card header p{margin:5px 0 0;color:var(--muted);font-size:12px}.snippet-card header>span{height:max-content;padding:5px 8px;border:1px solid var(--border);border-radius:99px;color:#b4b9c5;font:10px ui-monospace,monospace}.snippet-card details{margin-top:14px;border-top:1px solid var(--border);padding-top:11px}.snippet-card summary{color:var(--accent);font-size:12px;cursor:pointer}.snippet-card pre{overflow:auto;margin:12px 0 0;padding:13px;border-radius:6px;background:#0c0d10;color:#d9dce5;font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap}.quiet-button{margin-top:10px;border:0;background:none;color:#8d929f;font-size:11px;cursor:pointer}.quiet-button:hover{color:#f69b9b}.snippet-list .gallery-empty{min-height:180px}@media(max-width:860px){.snippet-layout{grid-template-columns:1fr}.snippet-editor{order:2}}
.utility-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:30px}.utility-card,.json-tool{display:grid;gap:16px;padding:18px;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.utility-card h2{margin:0;font-size:15px}.utility-card p{color:var(--muted);font-size:12px}.utility-card button,.json-actions button{min-height:38px;padding:0 12px;border:1px solid var(--accent);border-radius:6px;background:var(--accent);color:var(--accent-ink);font:600 12px inherit;cursor:pointer}.utility-card output{display:block;overflow-wrap:anywhere;min-height:20px;color:var(--accent-text);font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace}.json-tool{margin-top:26px}.json-tool label{font-size:12px;color:#b7bbc5}.json-tool textarea{width:100%;min-height:340px;padding:14px;border:1px solid #30343d;border-radius:7px;background:#0d0e12;color:#e5e7ed;font:13px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical}.json-actions{display:flex;gap:8px}.json-actions .secondary{border-color:#343843;background:#1a1c22;color:#d7d9e1}.json-status{min-height:18px;margin:0;color:var(--accent);font-size:12px}.json-status.invalid{color:#ff9e9e}
.keys-page{max-width:900px}.keys-page header h1{margin:0 0 8px;font-size:25px;letter-spacing:-.025em}.keys-page header p{margin:0 0 22px;color:var(--muted);font-size:13px}.generator-list{display:grid;max-width:650px;gap:13px}.generator-field{display:grid;gap:7px;color:#b7bbc5;font-size:12px}.generator-control{display:flex;min-width:0}.generator-value{width:100%;min-width:0;height:42px;padding:0 12px;border:1px solid #30343d;border-right:0;border-radius:6px 0 0 6px;outline:none;background:#17191e;color:#dfe2e9;font:12px ui-monospace,SFMono-Regular,Menlo,monospace}.generator-value:focus{border-color:var(--accent)}.generator-control button{min-width:74px;padding:0 12px;border:1px solid #343843;border-radius:0 6px 6px 0;background:#202229;color:#dce0e8;font:600 11px inherit;cursor:pointer}.generator-control button:hover{border-color:var(--accent-border);background:var(--accent-dark);color:var(--accent)}.generator-actions{display:flex;align-items:center;gap:13px;margin-top:3px}.generator-actions>button{min-height:38px;padding:0 14px;border:1px solid var(--accent);border-radius:6px;background:var(--accent);color:var(--accent-ink);font:600 12px inherit;cursor:pointer}.generator-actions p{min-height:16px;margin:0;color:var(--accent);font-size:11px}
.gallery-page{width:100%;max-width:none;margin:38px 0;padding:0 clamp(22px,3.2vw,54px)}.gallery-page .page-heading{align-items:flex-end;margin-bottom:23px}.gallery-page .page-heading h1{margin:7px 0 5px}.gallery-page .page-heading p:not(.eyebrow){margin:0;color:var(--muted);font-size:13px}.gallery-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px}.gallery-button{display:inline-flex;min-height:39px;align-items:center;justify-content:center;padding:0 14px;border:1px solid var(--accent);border-radius:7px;background:var(--accent);color:var(--accent-ink);font:600 12px inherit;text-decoration:none;cursor:pointer}.gallery-button:hover{filter:brightness(1.06)}.gallery-button.secondary{border-color:#343843;background:#1a1c22;color:#e5e7ed}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.gallery-crumbs{display:flex;align-items:center;gap:8px;min-height:38px;color:#727987;font-size:11px;line-height:20px}.gallery-crumbs>a,.gallery-crumbs>span,.gallery-crumbs>strong{display:inline-flex;align-items:center;min-height:20px}.gallery-crumbs svg{display:block}.gallery-crumbs a{color:var(--accent);text-decoration:none}.gallery-crumbs strong{font-weight:500;color:#d6d9e0}.gallery-search{display:flex;align-items:center;gap:15px;margin:0 0 15px;padding:12px 14px;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.gallery-search label{flex:none;color:#b7bbc5;font-size:12px}.gallery-search>div{display:flex;flex:1;min-width:0;gap:8px}.gallery-search input{width:100%;min-width:0;height:38px;padding:0 12px;border:1px solid #30343d;border-radius:6px;background:#0e1014;color:var(--text);font:13px inherit;outline:none}.gallery-search input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.gallery-search button{min-width:76px;border:1px solid #343843;border-radius:6px;background:#202229;color:#e5e7ed;font:600 11px inherit;cursor:pointer}.gallery-dropzone{display:flex;min-height:88px;align-items:center;justify-content:center;gap:10px;margin:0 0 18px;border:1px dashed #414650;border-radius:9px;background:#111318;color:#aeb4c0;font-size:12px}.gallery-dropzone strong{color:#e0e3ea;font-weight:550}.drop-icon{display:grid;width:31px;height:31px;place-items:center;border:1px solid var(--accent-border);border-radius:8px;background:var(--accent-dark);color:var(--accent);font-size:18px}.gallery-message{min-height:0;margin:0;color:var(--accent);font-size:12px}.gallery-message:empty{display:none}.gallery-message.is-error{color:#ff9e9e}.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,205px),1fr));align-items:start;gap:15px;width:100%;margin-top:15px}.asset-card{min-width:0;border-radius:10px;transition:border-color .15s,transform .15s}.asset-card:hover{border-color:#444a56;transform:translateY(-1px)}.asset-card.folder-card{display:block;color:inherit;text-decoration:none}.folder-preview{background:linear-gradient(145deg,#191c22,#13151a)}.folder-preview>span{display:grid;width:58px;height:48px;place-items:center;border:1px solid var(--accent-border);border-radius:8px;background:var(--accent-dark);color:var(--accent);font-size:30px}.asset-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-state{display:flex;align-items:center;gap:9px;color:#d3d7e0;font-size:12px;text-transform:capitalize}.gallery-spinner{width:17px;height:17px;border:2px solid #414650;border-top-color:var(--accent);border-radius:50%;animation:gallery-spin .8s linear infinite}@keyframes gallery-spin{to{transform:rotate(360deg)}}.gallery-upload-card .asset-preview img{opacity:.72}.gallery-upload-card.is-failed{border-color:#633c3b}.gallery-upload-card.is-failed .asset-meta span{color:#ff9e9e}.gallery-empty{min-height:260px;margin-top:14px;background:#111318}.gallery-empty>span{display:grid;width:46px;height:46px;place-items:center;border:1px solid var(--accent-border);border-radius:12px;background:var(--accent-dark);color:var(--accent);font-size:23px}.gallery-pagination{display:flex;align-items:center;justify-content:center;gap:24px;margin:28px 0;color:#9ba0ac;font-size:12px}.gallery-pagination a{color:var(--accent);text-decoration:none}.gallery-pagination a:hover{text-decoration:underline}.gallery-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#070809d9;backdrop-filter:blur(5px)}.gallery-overlay[hidden]{display:none}.gallery-overlay>div{padding:30px 44px;border:1px dashed var(--accent);border-radius:14px;background:var(--accent-dark);color:var(--accent-text);font-size:17px;box-shadow:0 24px 80px #0009}.gallery-overlay strong{color:var(--accent)}@media(max-width:700px){.gallery-page{margin:34px 0;padding:0 18px}.gallery-page .page-heading{align-items:flex-start;flex-direction:column}.gallery-actions{width:100%}.gallery-search{align-items:stretch;flex-direction:column;gap:8px}.gallery-dropzone{flex-wrap:wrap;gap:6px;padding:14px;text-align:center}.asset-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));gap:10px}}
.sidebar nav a{gap:12px}.nav-icon{display:grid;width:18px;flex:none;place-items:center;color:#969ba8;font:14px ui-monospace,SFMono-Regular,Menlo,monospace}.sidebar nav a.active .nav-icon{color:var(--accent)}.sidebar-collapsed .sidebar .nav-label{display:none}

.gallery-state.is-failed-state{color:#ff9e9e}
.image-card{display:block;color:inherit;text-decoration:none}.image-card:hover{text-decoration:none}.detail-page{margin:26px 0;padding:0 30px}.detail-heading{margin-bottom:19px}.detail-heading h1{margin:9px 0 0;font-size:27px}.image-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(325px,390px);align-items:start;gap:18px}.detail-stage-wrap{position:sticky;top:22px;min-width:0}.detail-stage{position:relative;display:grid;width:100%;min-height:min(72vh,820px);max-height:calc(100vh - 72px);place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:10px;background-color:#17191e;background-image:linear-gradient(45deg,#202229 25%,transparent 25%),linear-gradient(-45deg,#202229 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#202229 75%),linear-gradient(-45deg,transparent 75%,#202229 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0;cursor:zoom-in}.detail-stage img{display:block;width:100%;height:100%;max-height:calc(100vh - 74px);object-fit:contain}.stage-hint{position:absolute;right:14px;bottom:14px;padding:8px 11px;border:1px solid #444a55;border-radius:6px;background:#101115d9;color:#e5e7ed;font-size:11px;opacity:0;transition:opacity .15s}.detail-stage:hover .stage-hint,.detail-stage:focus-visible .stage-hint{opacity:1}.detail-state{align-content:center;justify-items:center;gap:12px;padding:35px;color:#aeb4c0;cursor:default}.detail-state p{max-width:420px;text-align:center;line-height:1.6}.detail-state.is-failed{color:#ff9e9e}.detail-sidebar{display:grid;gap:14px;min-width:0}.detail-panel{padding:17px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}.detail-panel h2{margin:0 0 14px;font-size:14px}.address-field{display:flex;min-width:0;gap:7px}.address-field input{width:100%;min-width:0;height:39px;padding:0 10px;border:1px solid #30343d;border-radius:6px;background:#0e1014;color:#aeb4c0;font:11px ui-monospace,SFMono-Regular,Menlo,monospace}.detail-primary,.detail-secondary,.detail-danger{display:inline-flex;min-height:36px;align-items:center;justify-content:center;gap:7px;padding:0 11px;border:1px solid #343843;border-radius:6px;background:#1b1d23;color:#e2e5ec;font:600 11px inherit;text-decoration:none;white-space:nowrap;cursor:pointer}.detail-primary{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}.detail-primary:hover{filter:brightness(1.07)}.detail-secondary:hover{border-color:#555d6b;background:#22252d}.detail-button-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.detail-form{display:grid;gap:13px}.detail-form>label{display:grid;gap:6px;color:#b7bbc5;font-size:11px}.detail-form input,.detail-form textarea,.detail-move select{width:100%;min-width:0;padding:10px;border:1px solid #30343d;border-radius:6px;background:#101115;color:#e0e3ea;font:12px inherit;outline:none}.detail-form textarea{min-height:98px;resize:vertical;line-height:1.55}.detail-form input:focus,.detail-form textarea:focus,.detail-move select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.detail-form small{color:var(--muted);font-size:10px}.detail-save-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.detail-save-row [data-save-state]{min-height:16px;color:#777e8c;font-size:11px}.save-state.is-ok{color:#67c995!important}.save-state.is-error{color:#ff9e9e!important}.detail-primary:disabled{opacity:.6;cursor:wait}.detail-props{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 12px;margin:0}.detail-props>div{min-width:0}.detail-props dt{margin-bottom:4px;color:#838a98;font-size:10px}.detail-props dd{margin:0;overflow-wrap:anywhere;color:#d8dbe3;font-size:11px;line-height:1.55}.detail-props dd span{color:#8b92a0}.detail-props .detail-wide{grid-column:1/-1}.detail-props .detail-hash{font:10px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--accent-text)}.detail-move{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.detail-move label{flex:none;color:#9da3af;font-size:11px}.detail-move select{height:36px;padding:0 8px;font-size:11px}.detail-move button{flex:none}.detail-danger{color:#ff9696;border-color:transparent;background:transparent}.detail-danger:hover{background:#361c1d;border-color:#5d3031}.gallery-lightbox{width:min(96vw,1500px);height:min(94vh,1100px);max-width:none;max-height:none;padding:0;border:1px solid #343843;border-radius:10px;background:#101115;color:var(--text)}.gallery-lightbox::backdrop{background:#050608e8;backdrop-filter:blur(4px)}.lightbox-bar{display:flex;height:50px;align-items:center;justify-content:space-between;padding:0 15px;border-bottom:1px solid var(--border);font-size:12px}.lightbox-bar button{display:grid;width:32px;height:32px;place-items:center;border:0;border-radius:6px;background:#202229;color:#e5e7ed;cursor:pointer}.lightbox-stage{display:grid;height:calc(100% - 50px);place-items:center;overflow:auto;background-color:#17191e;background-image:linear-gradient(45deg,#202229 25%,transparent 25%),linear-gradient(-45deg,#202229 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#202229 75%),linear-gradient(-45deg,transparent 75%,#202229 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}.lightbox-stage img{max-width:100%;max-height:100%;object-fit:contain;cursor:zoom-in}.lightbox-stage img.actual-size{max-width:none;max-height:none;object-fit:initial;cursor:zoom-out}@media(max-width:1000px){.image-detail-layout{grid-template-columns:minmax(0,1fr) minmax(290px,340px)}.detail-stage{min-height:60vh}}@media(max-width:760px){.image-detail-layout{grid-template-columns:1fr}.detail-stage-wrap{position:static}.detail-stage{min-height:42vh;max-height:65vh}.detail-stage img{max-height:64vh}.detail-heading h1{font-size:23px}}
.detail-stage{padding:0;color:inherit}
.detail-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}.detail-top-actions{display:flex;align-items:center;gap:8px}.detail-move-menu{position:relative}.detail-move-menu>summary{list-style:none}.detail-move-menu>summary::-webkit-details-marker{display:none}.detail-move{position:absolute;top:calc(100% + 8px);right:0;z-index:20;display:grid;min-width:280px;gap:9px;margin:0;padding:14px;border:1px solid var(--border);border-radius:9px;background:#17191e;box-shadow:0 16px 42px #0009}.detail-move .detail-secondary{width:100%}.detail-heading .detail-danger{height:36px}@media(max-width:760px){.detail-heading{align-items:flex-start;flex-direction:column}.detail-top-actions{align-self:flex-end}}
/* Gallery follows the compact header and square-card layout of the reference app. */
.sidebar-heading{display:flex;align-items:center;min-height:32px}.nav-icon .gallery-mark{width:18px;height:18px;color:inherit}.sidebar .brand{display:flex;align-items:center;gap:10px;flex:none;width:max-content;min-width:32px;height:32px;margin-inline-start:6px;padding:0;border:0;background:transparent;color:var(--text);font:500 14px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;cursor:pointer}.sidebar .brand:hover{background:transparent;filter:brightness(1.15)}.brand-mark{display:block;flex:none}.brand:focus-visible{outline:2px solid #d1a047;outline-offset:4px;border-radius:7px}.sidebar-collapsed .sidebar .brand-wordmark{display:none}@media(max-width:700px){:root:not(.sidebar-collapsed) .sidebar{width:258px}:root:not(.sidebar-collapsed) .sidebar nav a{font-size:13px}}
.gallery-topbar{display:flex;align-items:center;gap:24px;height:64px;padding:0 30px;border-bottom:1px solid #2a2d33;background:#181a1e}.gallery-topbar-brand{display:flex;align-items:center;gap:9px;color:#e1e3e8;text-decoration:none;font-size:15px;font-weight:600}.gallery-topbar-brand>span{color:var(--accent);font-size:25px}.gallery-topbar-search{display:flex;align-items:center;gap:10px;width:min(48vw,600px);height:40px;margin:auto;padding:0 12px;border:1px solid #2b2e36;border-radius:8px;background:#1e2025;color:#9299a6}.gallery-topbar-search:focus-within{border-color:var(--accent)}.gallery-topbar-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#e0e2e8;font:13px inherit}.gallery-topbar-search kbd{padding:1px 5px;border:1px solid #3c414c;border-radius:3px;font:11px ui-monospace,monospace;color:#9299a6}.gallery-topbar .gallery-button{flex:none;min-height:38px;background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.gallery-list{margin:26px 0;padding:0 30px}.gallery-list>.gallery-crumbs{margin-bottom:12px}.gallery-list-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.gallery-list-heading h1{display:flex;align-items:baseline;gap:12px;margin:0;font-size:25px;letter-spacing:-.025em}.gallery-list-heading h1>span{font-size:13px;color:#8e95a2;font-weight:400;letter-spacing:0}.gallery-list .gallery-button.secondary{min-height:38px;background:#1a1c21;border-color:#343942;color:#ced1d9}.gallery-view-options{display:flex;align-items:center;gap:22px;flex-wrap:wrap;min-height:36px;margin-bottom:18px}.gallery-view-options label{display:flex;align-items:center;gap:9px;color:#8e95a2;font-size:12px}.gallery-view-options select{height:36px;padding:0 28px 0 10px;border:1px solid #343942;border-radius:7px;background:#1a1c21;color:#d1d5dd;font:12px inherit}.gallery-list .asset-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:18px;margin-top:0}.gallery-list .asset-preview{position:relative;display:block;aspect-ratio:1/1;overflow:hidden;min-height:0}.gallery-list .asset-preview img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;object-fit:contain}.gallery-list .asset-preview .gallery-state,.gallery-list .folder-preview>span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gallery-list .asset-card{border-radius:11px;background:#181a1e}.gallery-list .asset-meta{gap:7px;padding:13px 12px}.gallery-list .asset-meta strong{font-size:13px}.gallery-list .asset-meta span{font-size:11px;text-transform:none}.gallery-list .gallery-empty{margin-top:0}.gallery-list .gallery-message:not(:empty){margin-bottom:14px}@media(max-width:760px){.gallery-topbar{gap:12px;padding:0 18px}.gallery-topbar-brand{display:none}.gallery-topbar-search{width:auto;flex:1}.gallery-topbar-search kbd{display:none}.gallery-list,.detail-page{margin-top:20px;padding:0 18px}.gallery-list-heading h1{font-size:23px}.gallery-list .asset-grid{grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px}}@media(max-width:420px){.gallery-list-heading{align-items:flex-start;gap:10px}.gallery-list-heading h1{flex-wrap:wrap;gap:5px}.gallery-view-options{gap:10px}.gallery-view-options label{gap:5px}}
.gallery-mark{width:23px;height:23px;color:var(--accent)}.gallery-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.gallery-topbar .gallery-mark{width:23px;height:23px}.gallery-topbar .gallery-button,.gallery-list-heading .gallery-button{gap:8px}
.gallery-list .folder-card{position:relative;overflow:visible}.folder-link{display:block;color:inherit;text-decoration:none}.folder-link .asset-preview{border-radius:10px 10px 0 0}.folder-card .asset-meta{position:relative;padding-right:42px}.folder-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e0e2e8;font-size:13px;font-weight:600;text-decoration:none}.folder-name:hover{text-decoration:underline}.folder-card-menu{position:absolute;right:9px;top:50%;transform:translateY(-50%)}.folder-card-menu summary{display:grid;width:30px;height:32px;place-items:center;border:1px solid transparent;border-radius:6px;color:#8e95a2;cursor:pointer;list-style:none}.folder-card-menu summary::-webkit-details-marker{display:none}.folder-card-menu summary svg{width:20px;height:20px}.folder-card-menu summary:hover,.folder-card-menu[open] summary{border-color:#343942;color:#e5e7ed;background:#252830}.folder-menu-panel{position:absolute;right:0;bottom:calc(100% + 5px);z-index:40;display:grid;width:195px;padding:6px;border:1px solid #343942;border-radius:9px;background:#1a1c21;box-shadow:0 12px 35px #0008}.folder-menu-panel button{display:flex;align-items:center;gap:11px;min-height:38px;padding:0 11px;border:0;border-radius:5px;background:transparent;color:#d4d7de;font:13px inherit;text-align:left;cursor:pointer}.folder-menu-panel button:hover{background:#292d35}.folder-menu-panel .danger{color:#ee7871}.folder-card:has(details[open]){z-index:40;transform:none}.folder-action-dialog{width:min(440px,calc(100vw - 32px));padding:23px;border:1px solid #343942;border-radius:12px;background:#181a1e;color:#e0e3ea;box-shadow:0 24px 70px #0009}.folder-action-dialog::backdrop{background:#060708b8}.folder-action-dialog form{display:grid;gap:17px}.folder-action-dialog h2{margin:0;font-size:20px}.folder-action-dialog p{margin:0;color:#a3aab8;font-size:13px;line-height:1.6;overflow-wrap:anywhere}.folder-action-dialog label{display:grid;gap:7px;color:#bdc3cf;font-size:12px}.folder-action-dialog [hidden]{display:none}.folder-action-dialog input,.folder-action-dialog select{width:100%;height:40px;padding:0 10px;border:1px solid #3b404c;border-radius:6px;background:#101216;color:#e0e3ea;font:13px inherit}.folder-action-dialog [data-folder-error]{color:#ff9e9e}.folder-action-dialog [data-folder-error]:empty{display:none}.folder-dialog-actions{display:flex;justify-content:flex-end;gap:8px}.folder-dialog-actions button{min-height:37px;padding:0 13px;border:1px solid #3b404c;border-radius:6px;background:#252830;color:#e0e3ea;font:600 12px inherit;cursor:pointer}.folder-dialog-actions [type=submit]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.folder-dialog-actions [type=submit].danger{background:#c94a43;border-color:#c94a43;color:#fff}.folder-dialog-actions button:disabled{opacity:.5;cursor:wait}
.gallery-heading-actions{display:flex;align-items:center;gap:8px}.folder-card-menu.folder-header-menu{position:relative;inset:auto;transform:none;z-index:45}.folder-header-menu summary{width:38px;height:38px;border:1px solid #343942;border-radius:7px;background:#1a1c21}.folder-header-menu .folder-menu-panel{top:calc(100% + 8px);bottom:auto;width:215px}.gallery-list .folder-preview .folder-glyph{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:68px;height:68px;fill:var(--accent-dark);stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.folder-glyph path{vector-effect:non-scaling-stroke}.folder-action-dialog{width:min(550px,calc(100vw - 32px));padding:25px}.folder-destination-tree{max-height:280px;overflow:auto;padding:7px;border:1px solid #30343d;border-radius:8px;background:#1b1e23}.folder-destination-tree .folder-destination-row{position:relative;display:flex;align-items:center;gap:10px;min-height:38px;padding:8px 10px 8px calc(10px + var(--folder-depth)*20px);border-radius:5px;color:#c4c9d3;cursor:pointer}.folder-destination-row input{position:absolute!important;width:1px!important;height:1px!important;opacity:0}.folder-destination-row:has(:disabled){color:#565e6c;cursor:default}.folder-destination-row:has(:checked){background:var(--accent-dark);color:var(--accent-text)}.folder-destination-row:has(:focus-visible){outline:2px solid #a3b7dc;outline-offset:-2px}.folder-destination-row:not(:has(:disabled)):hover{background:#282d36}.folder-destination-row span{overflow-wrap:anywhere}.folder-destination-row svg{flex:none}
.gallery-upload-queue{margin-bottom:18px;padding:12px 14px;border:1px solid #343942;border-radius:8px;background:#171a1f}.gallery-upload-queue>summary{color:#d4d8df;font-size:13px;cursor:pointer}.gallery-list .gallery-upload-queue .asset-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));max-width:850px;margin-top:12px}.gallery-thumbnail-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px;padding:12px 14px;border:1px solid #3c414b;border-radius:8px;background:#191d24;color:#afb7c6;font-size:12px;line-height:1.5}.gallery-thumbnail-notice button{flex:none;min-height:32px;padding:0 10px;border:1px solid var(--accent-border);border-radius:5px;background:var(--accent-dark);color:var(--accent);font:12px inherit;cursor:pointer}.gallery-thumbnail-notice[hidden],.gallery-upload-queue[hidden],.gallery-thumbnail-notice button[hidden]{display:none}
.detail-danger{border-color:#d05249;background:#bd3e36;color:#fff}.detail-danger:hover{border-color:#e16a60;background:#cf4a41;color:#fff}.detail-danger:focus-visible{outline:2px solid #f4a69e;outline-offset:3px}.detail-page .gallery-crumbs>a{display:inline-flex;align-items:center}.detail-save-row .detail-primary{gap:7px}
.gallery-list .image-card{position:relative}.image-card-link{display:block;color:inherit;text-decoration:none}.image-selection-box{position:absolute;top:9px;right:9px;z-index:3;display:grid;width:28px;height:28px;place-items:center;border:1px solid #535966;border-radius:6px;background:#11151be6;opacity:0;transition:opacity .12s;cursor:pointer}.image-selection-box input{width:17px;height:17px;margin:0;accent-color:var(--accent);cursor:pointer}.image-card:hover .image-selection-box,.image-card:focus-within .image-selection-box,.image-card.is-selected .image-selection-box{opacity:1}.gallery-list .image-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.gallery-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;padding:10px 12px;border:1px solid var(--accent-border);border-radius:8px;background:var(--accent-dark);color:var(--accent-text);font-size:13px}.gallery-selection-bar [data-selection-count]{margin-right:auto}.gallery-selection-bar[hidden]{display:none}[data-bulk-error]{color:#ff9e9e!important}[data-bulk-error]:empty{display:none}@media(hover:none){.image-selection-box{opacity:1}}
.gallery-topbar{position:sticky;top:0;z-index:60}.gallery-header-actions{display:flex;align-items:center;gap:9px;margin-left:auto}.gallery-topbar--image .gallery-topbar-brand{display:flex}.gallery-topbar .detail-danger,.gallery-topbar .detail-secondary{min-height:38px}.gallery-list-heading .gallery-crumbs{min-width:0;max-width:100%;flex-shrink:0;flex-wrap:wrap}.gallery-list-heading{min-height:38px}.gallery-list-footer{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:28px;padding:16px 0;border-top:1px solid var(--border);color:#8e95a2;font-size:12px}.gallery-list-footer .gallery-pagination{margin:0}.detail-page>.gallery-crumbs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:18px;min-width:0}.detail-page>.gallery-crumbs>strong{font-weight:500;overflow-wrap:anywhere}.detail-stage-wrap{top:86px}.detail-stage,.detail-stage img{max-height:calc(100vh - 110px)}.node83-toasts{position:fixed;right:22px;bottom:22px;z-index:120;display:grid;gap:10px;width:min(370px,calc(100vw - 32px));pointer-events:none}.node83-toast{display:flex;align-items:center;gap:11px;padding:14px;border:1px solid #45523b;border-radius:9px;background:#1c241c;color:#e1e9dc;box-shadow:0 10px 35px #0007;font-size:13px;line-height:1.5;pointer-events:auto;animation:toast-appear .15s ease-out}.node83-toast>span{flex:1;overflow-wrap:anywhere}.node83-toast>svg{color:#b4d57b}.node83-toast button{display:grid;place-items:center;flex:none;width:27px;height:27px;border:0;border-radius:5px;background:transparent;color:#a6b29e;cursor:pointer}.node83-toast button:hover{background:#ffffff12;color:#fff}.node83-toast.is-error{border-color:#874b45;background:#30201f;color:#f2d4d1}.node83-toast.is-error>svg{color:#f69b92}@keyframes toast-appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(max-width:760px){.gallery-header-actions{gap:7px}.gallery-list-footer{align-items:flex-start;flex-direction:column;gap:14px}.detail-stage-wrap{top:auto}.detail-stage,.detail-stage img{max-height:65vh}.node83-toasts{bottom:16px;right:16px}}@media(prefers-reduced-motion:reduce){.node83-toast{animation:none}}
.folder-mosaic{position:absolute;inset:0;display:grid;gap:1px;background:var(--border)}.folder-mosaic-1{grid-template:1fr/1fr}.folder-mosaic-2{grid-template:1fr/1fr 1fr}.folder-mosaic-3,.folder-mosaic-4{grid-template:1fr 1fr/1fr 1fr}.folder-mosaic-3>.folder-cover:first-child{grid-row:span 2}.folder-cover{display:grid;min-width:0;min-height:0;overflow:hidden;background-color:#1b1e24;background-image:linear-gradient(45deg,#252931 25%,transparent 25%),linear-gradient(-45deg,#252931 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#252931 75%),linear-gradient(-45deg,transparent 75%,#252931 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.gallery-list .folder-mosaic img{position:static;display:block;min-width:0;min-height:0;width:100%;height:100%;object-fit:contain;padding:7px}
.gallery-list .image-card{overflow:visible}.image-card>.folder-card-menu{top:auto;bottom:12px;transform:none}.image-card .asset-meta{padding-right:42px}.image-card-link .asset-preview{border-radius:10px 10px 0 0}.image-card:has(details[open]){z-index:40;transform:none}

/* Snippets shares the gallery shell; its colours come from .snippets-theme. */
.snippets-theme, .wiki-theme {
  --snippet-accent-soft: var(--accent-dark);
}
.snippets-theme .snippets-mark { color: var(--accent); }
.snippets-topbar .snippets-mark { width: 23px; height: 23px; }
.snippets-topbar .gallery-button, .snippets-workspace .gallery-button {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px;
}
.snippets-workspace .gallery-crumbs a, .snippets-workspace .gallery-pagination a {
  color: var(--accent);
}
.snippets-workspace .gallery-topbar-search:focus-within { border-color: var(--accent); }
.snippets-workspace .gallery-topbar-search { min-width: 0; }
.snippets-workspace .gallery-view-options { gap: 18px; }
.snippet-browser { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.snippet-results { min-width: 0; }
.snippet-result {
  margin-bottom: 12px; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: 10px; background: #17191d; transition: border-color .15s;
}
.snippet-result:hover { border-color: #545057; }
.snippet-result h2 { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 600; }
.snippet-result h2 a { color: #e6e7eb; text-decoration: none; overflow-wrap: anywhere; }
.snippet-result h2 a:hover { color: var(--accent); }
.snippet-result p, .snippet-document-meta > p {
  margin: 7px 0 0; color: #a3a7b1; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere;
}
.snippet-result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; }
.snippet-result-meta time { display: inline-flex; align-items: center; gap: 6px; color: #8e95a2; font-size: 11px; }
.snippet-result-meta time svg { width: 14px; height: 14px; }
.snippet-language {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid #343840;
  border-radius: 99px; color: #c9cdd6; background: #202229; font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none; white-space: nowrap;
}
.snippet-language > span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #a1a8b6; }
.snippet-language[data-language=rust] > span { background: #dea584; }
.snippet-language[data-language=go] > span { background: #00add8; }
.snippet-language[data-language=python] > span { background: #67a8d5; }
.snippet-language[data-language=javascript] > span, .snippet-language[data-language=jsx] > span { background: #f1e05a; }
.snippet-language[data-language=typescript] > span, .snippet-language[data-language=tsx] > span { background: #6ba5e8; }
.snippet-language[data-language=php] > span { background: #a49bc9; }
.snippet-language[data-language=sql] > span { background: #e5ae5b; }
.snippet-language[data-language=bash] > span { background: #89b569; }
.snippet-language[data-language=html] > span { background: #e8775d; }
.snippet-language:hover { border-color: #76717a; }
.snippet-tags, .snippet-tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.snippet-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--accent-border);
  border-radius: 5px; background: var(--snippet-accent-soft); color: var(--accent);
  font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; overflow-wrap: anywhere;
}
.snippet-tag:hover, .snippet-tag.is-active { border-color: var(--accent); color: var(--accent); }
.snippet-tag > span { color: var(--accent-muted); font-size: 10px; }
.snippet-facets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 36px; min-width: 0; padding: 4px 0; }
.snippet-facets h2 { margin: 0 0 15px; color: #a4a8b2; font-size: 11px; line-height: 1.5; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.snippet-facets ul { list-style: none; padding: 0; margin: 0; }
.snippet-facets li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.snippet-facets li .snippet-language { border: 0; background: none; padding: 0; font-family: inherit; font-size: 12px; }
.snippet-facets li > span { color: #8e95a2; font-size: 11px; }
.snippet-filter { color: var(--accent); font-size: 12px; }
.snippet-clear { margin-left: auto; color: #b2a59d; font-size: 12px; text-decoration: none; }
.snippet-clear:hover { color: var(--accent); }
.snippet-muted { color: #8e95a2; font-size: 12px; }
.snippet-empty { display: grid; min-height: 220px; align-content: center; justify-items: center; gap: 12px; padding: 28px; border: 1px dashed #3c3b3d; border-radius: 10px; text-align: center; }
.snippet-empty h2 { margin: 0; color: #d0d3db; font-size: 16px; font-weight: 500; }
.snippet-empty p, .snippet-empty a { margin: 0; font-size: 13px; color: #a7a3a2; }
.snippets-workspace :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.snippet-editor-dialog { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; }
.snippet-editor-fields { display: grid; gap: 16px; }
.snippet-editor-dialog label { display: block; line-height: 1.6; }
.snippet-editor-dialog input, .snippet-editor-dialog select, .snippet-editor-dialog textarea { display: block; margin-top: 6px; }
.snippet-editor-dialog input:focus, .snippet-editor-dialog select:focus, .snippet-editor-dialog textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.snippet-editor-dialog small { display: block; margin-top: 5px; color: #8e95a2; font-size: 11px; font-weight: 400; }
.snippet-editor-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.snippet-editor-dialog textarea { width: 100%; min-height: 250px; padding: 13px; resize: vertical; border: 1px solid #3b404c; border-radius: 6px; background: #101216; color: #e0e3ea; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
.snippets-workspace .folder-dialog-actions [type=submit]:not(.danger) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.snippets-workspace [data-snippet-error] { color: #ff9e9e; }
.snippets-workspace [data-snippet-error]:empty { display: none; }
.snippet-document { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #13151a; }
.snippet-document-meta { padding: 18px 20px; }
.snippet-document-meta > p { margin-top: 0; }
.snippet-document-meta .snippet-result-meta { margin-top: 0; }
.snippet-document-meta > p + .snippet-result-meta { margin-top: 14px; }
.snippet-code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-block: 1px solid var(--border); background: #1a1c21; color: #8e95a2; font-size: 12px; }
.snippet-code-toolbar > div { display: flex; gap: 7px; }
.snippet-code { margin: 0; padding: 22px; overflow: auto; max-height: 70vh; color: #dce0e9; background: #101216; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
@media (max-width: 520px) {
  .snippets-topbar { gap: 10px; flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 12px; }
  .snippets-topbar .gallery-topbar-brand { display: flex; margin-right: auto; }
  .snippets-topbar .gallery-topbar-search { order: 3; flex-basis: 100%; }
  .snippets-topbar .gallery-button { padding-inline: 10px; font-size: 12px; }
  .snippet-result { padding: 16px; }
  .snippet-result-meta { gap: 10px; }
  .snippet-editor-row, .snippet-facets { grid-template-columns: minmax(0, 1fr); }
  .snippet-editor-dialog { padding: 18px; }
}

/* Token colors only. The shared snippet viewer owns spacing and background. */
.snippet-code > code.hljs { display: block; padding: 0; color: inherit; background: transparent; }
.snippet-code .hljs-comment, .snippet-code .hljs-quote, .wiki-content .hljs-comment, .wiki-content .hljs-quote { color: #858b99; font-style: italic;}
.snippet-code .hljs-keyword, .snippet-code .hljs-doctag, .snippet-code .hljs-selector-tag, .snippet-code .hljs-template-tag, .wiki-content .hljs-keyword, .wiki-content .hljs-doctag, .wiki-content .hljs-selector-tag, .wiki-content .hljs-template-tag { color: #c792ea;}
.snippet-code .hljs-string, .snippet-code .hljs-regexp, .snippet-code .hljs-template-variable, .snippet-code .hljs-addition, .wiki-content .hljs-string, .wiki-content .hljs-regexp, .wiki-content .hljs-template-variable, .wiki-content .hljs-addition { color: #b5cea8;}
.snippet-code .hljs-number, .snippet-code .hljs-literal, .snippet-code .hljs-symbol, .snippet-code .hljs-bullet, .wiki-content .hljs-number, .wiki-content .hljs-literal, .wiki-content .hljs-symbol, .wiki-content .hljs-bullet { color: #f0b58a;}
.snippet-code .hljs-title, .snippet-code .hljs-section, .wiki-content .hljs-title, .wiki-content .hljs-section { color: #82aaff;}
.snippet-code .hljs-built_in, .snippet-code .hljs-type, .snippet-code .hljs-title.class_, .wiki-content .hljs-built_in, .wiki-content .hljs-type, .wiki-content .hljs-title.class_ { color: #e5bd83;}
.snippet-code .hljs-attr, .snippet-code .hljs-attribute, .snippet-code .hljs-property, .snippet-code .hljs-variable, .wiki-content .hljs-attr, .wiki-content .hljs-attribute, .wiki-content .hljs-property, .wiki-content .hljs-variable { color: #9cdcfe;}
.snippet-code .hljs-meta, .snippet-code .hljs-name, .snippet-code .hljs-selector-id, .snippet-code .hljs-selector-class, .wiki-content .hljs-meta, .wiki-content .hljs-name, .wiki-content .hljs-selector-id, .wiki-content .hljs-selector-class { color: #e5a175;}
.snippet-code .hljs-deletion, .wiki-content .hljs-deletion { color: #f49b92;}
.snippet-code .hljs-emphasis, .wiki-content .hljs-emphasis { font-style: italic;}
.snippet-code .hljs-strong, .wiki-content .hljs-strong { font-weight: 700;}


/* Wiki shares the gallery shell and Snippets' cards, tags and facets; its colours come from .wiki-theme. */
.wiki-theme .wiki-mark { color: var(--accent); }
.wiki-topbar .gallery-topbar-brand { display: flex; }
.wiki-topbar .wiki-mark { width: 23px; height: 23px; }
.wiki-workspace .gallery-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px; }
.wiki-workspace .gallery-crumbs a, .wiki-workspace .gallery-pagination a { color: var(--accent); }
.wiki-workspace .gallery-topbar-search { min-width: 0; }
.wiki-workspace .gallery-topbar-search:focus-within { border-color: var(--accent); }
.wiki-workspace :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wiki-workspace .gallery-heading-actions { flex-wrap: wrap; }
.wiki-workspace .detail-secondary .gallery-icon, .wiki-workspace .detail-danger .gallery-icon { width: 15px; height: 15px; }
.wiki-workspace button:disabled { opacity: .55; cursor: wait; }
.wiki-workspace .gallery-view-options { gap: 18px; }
.wiki-workspace .snippet-tags:empty { display: none; }
.wiki-topbar .wiki-topbar-special { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
.wiki-topbar .wiki-topbar-special .gallery-icon { width: 15px; height: 15px; color: var(--accent); }
.wiki-special-nav .detail-secondary.is-active { border-color: var(--accent-border); background: var(--accent-dark); color: var(--accent-text); }
.wiki-page-menu .folder-menu-panel a { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 11px; border-radius: 5px; color: #d4d7de; text-decoration: none; }
.wiki-page-menu .folder-menu-panel a:hover { background: #292d35; }

/* Dialogs */
.wiki-dialog { max-height: calc(100dvh - 48px); overflow-y: auto; }
.wiki-dialog label { display: block; line-height: 1.6; }
.wiki-dialog label > input, .wiki-dialog label > select { display: block; margin-top: 6px; }
.wiki-dialog input:focus, .wiki-dialog select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wiki-dialog small { display: block; margin-top: 5px; color: #8e95a2; font-size: 11px; }
.wiki-address { display: flex; align-items: center; margin-top: 6px; border: 1px solid #3b404c; border-radius: 6px; background: #101216; overflow: hidden; }
.wiki-address:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wiki-address > span { flex: 0 1 auto; max-width: 58%; padding-left: 10px; overflow: hidden; color: #8e95a2; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.wiki-dialog .wiki-address input { flex: 1; min-width: 60px; height: 38px; padding: 0 10px 0 0; border: 0; background: transparent; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-dialog .wiki-address input:focus { box-shadow: none; }
.wiki-workspace .folder-dialog-actions button { display: inline-flex; align-items: center; gap: 7px; }
.wiki-workspace .folder-dialog-actions [type=submit]:not(.danger) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiki-workspace [data-wiki-error] { margin: 0; color: #ff9e9e; font-size: 13px; line-height: 1.6; }
.wiki-workspace [data-wiki-error]:empty { display: none; }

/* Image dialog: gallery picker, upload and size */
.wiki-image-dialog { width: min(760px, calc(100vw - 32px)); }
.wiki-image-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid #343942; border-radius: 8px; background: #121418; justify-self: start; }
.wiki-image-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #aeb4c0; font-family: inherit; font-size: 13px; cursor: pointer; }
.wiki-image-tabs button .gallery-icon { width: 15px; height: 15px; }
.wiki-image-tabs button:hover { color: #e6e7eb; }
.wiki-image-tabs button[aria-selected=true] { background: var(--accent-dark); color: var(--accent-text); }
.wiki-image-panel { display: grid; gap: 12px; min-width: 0; }
.folder-action-dialog .wiki-image-search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border: 1px solid #3b404c; border-radius: 6px; background: #101216; color: #8e95a2; }
.wiki-image-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wiki-image-search .gallery-icon { flex: none; width: 16px; height: 16px; }
.folder-action-dialog .wiki-image-search input { height: 38px; padding: 0; border: 0; background: transparent; outline: 0; box-shadow: none; }
.folder-action-dialog p.wiki-image-status { min-height: 1.6em; color: #8e95a2; font-size: 12px; }
.wiki-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px; }
.wiki-image-grid:empty { display: none; }
.wiki-image-option { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 6px 6px 8px; border: 1px solid #2d3139; border-radius: 8px; background: #121418; color: #dfe2e8; font-family: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.wiki-image-option:hover, .wiki-image-option:focus-visible { border-color: var(--accent); background: var(--accent-dark); }
.wiki-image-option img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: #191c22; }
.wiki-image-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-image-option small { overflow: hidden; color: #8e95a2; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wiki-image-more { justify-self: center; }
.folder-action-dialog .wiki-image-drop { display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 220px; padding: 24px; border: 1px dashed #414650; border-radius: 9px; background: #111318; color: #aeb4c0; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.wiki-image-drop .gallery-icon { width: 26px; height: 26px; color: var(--accent); }
.wiki-image-drop strong { color: #e6e7eb; font-size: 14px; font-weight: 600; }
.wiki-image-drop:hover, .wiki-image-drop.is-over, input:focus-visible + .wiki-image-drop { border-color: var(--accent); background: var(--accent-dark); }
.wiki-image-drop.is-busy { opacity: .6; pointer-events: none; }
.wiki-image-chosen { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.wiki-image-chosen[hidden] { display: none; }
.wiki-image-chosen-preview { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wiki-image-chosen-preview img { flex: none; width: 96px; height: 96px; object-fit: cover; border: 1px solid #2d3139; border-radius: 7px; background: #191c22; }
.wiki-image-chosen-preview > div { display: grid; justify-items: start; gap: 4px; min-width: 0; font-size: 12px; }
.wiki-image-chosen-preview strong { max-width: 100%; overflow: hidden; color: #e6e7eb; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.wiki-image-chosen-preview span { color: #8e95a2; }
.wiki-image-size { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: #bdc3cf; font-size: 12px; }
.wiki-image-size > span:first-child { flex-basis: 100%; }
.folder-action-dialog .wiki-image-size label { display: inline-flex; align-items: center; gap: 7px; color: #dfe2e8; font-size: 13px; cursor: pointer; }
.folder-action-dialog .wiki-image-size input[type=radio] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.wiki-image-amount { display: inline-flex; align-items: center; gap: 7px; color: #8e95a2; }
.folder-action-dialog .wiki-image-amount input { width: 96px; }
.folder-action-dialog .wiki-image-amount input:disabled { opacity: .45; }
.wiki-image-hint { margin-top: -8px; color: #8e95a2; font-size: 11px; }

/* Search and tag results */
.wiki-result-path { margin: 0 0 4px; color: var(--accent-muted); font-size: 11px; letter-spacing: .02em; overflow-wrap: anywhere; }
.wiki-result-path span { margin: 0 3px; color: #5f6572; }
.snippet-result.wiki-result p.wiki-result-path { margin: 0 0 4px; color: var(--accent-muted); font-size: 11px; }
.wiki-result mark { padding: 0 2px; border-radius: 3px; background: color-mix(in oklab, var(--accent) 24%, transparent); color: var(--accent-text); }
.snippet-result p.wiki-result-empty { color: #8e95a2; font-style: italic; }
.wiki-subpage-count { display: inline-flex; align-items: center; gap: 6px; color: #8e95a2; font-size: 11px; white-space: nowrap; }
.wiki-subpage-count .gallery-icon { width: 14px; height: 14px; }

/* Page view */
.wiki-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--accent-dark); color: var(--accent-text); font-size: 13px; line-height: 1.6; }
.wiki-notice > .gallery-icon { width: 18px; height: 18px; color: var(--accent); }
.wiki-notice p { flex: 1; min-width: 220px; margin: 0; }
.wiki-notice a { color: var(--accent); }
.wiki-notice > div { display: flex; flex-wrap: wrap; gap: 8px; }
.wiki-notice.is-deleted { border-color: #5d3031; background: #221416; color: #f1c4c1; }
.wiki-notice.is-deleted > .gallery-icon { color: #ff9696; }
.wiki-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 32px; }
.wiki-layout.has-toc { grid-template-columns: minmax(0, 1fr) 230px; }
.wiki-document { min-width: 0; padding: 30px 36px 36px; border: 1px solid var(--border); border-radius: 10px; background: #13151a; }
.wiki-document-header { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.wiki-document-header h1 { margin: 0 0 12px; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.wiki-document-header .snippet-result-meta { margin-top: 0; }
.wiki-document-header .snippet-tags:empty { display: none; }
.wiki-revision-link { color: #8e95a2; font-size: 11px; text-decoration: none; }
.wiki-revision-link:hover { color: var(--accent); }
.wiki-toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 4px 0; }
.wiki-toc h2, .wiki-subpages h2, .wiki-day h2 { margin: 0 0 12px; color: #a4a8b2; font-size: 11px; line-height: 1.5; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.wiki-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.wiki-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 1px solid transparent; color: #a3a7b1; font-size: 12.5px; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.wiki-toc a:hover, .wiki-toc a.is-current { border-left-color: var(--accent); color: var(--accent); }
.wiki-toc-level-1 a { padding-left: 26px; }
.wiki-toc-level-2 a { padding-left: 38px; }
.wiki-subpages { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); }
.wiki-subpages ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.wiki-subpages li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 13px; border: 1px solid var(--border); border-radius: 8px; background: #17191d; transition: border-color .15s; }
.wiki-subpages li:hover { border-color: var(--accent-border); }
.wiki-subpages a { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; padding: 11px 0 11px 13px; color: #dfe2e8; font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.wiki-subpages a:hover { color: var(--accent); }
.wiki-subpages a .gallery-icon, .wiki-tree a .gallery-icon { width: 15px; height: 15px; color: #8e95a2; }
.wiki-empty-page { margin: 0; color: #8e95a2; font-size: 14px; font-style: italic; }
div.wiki-empty-page { font-style: normal; }

/* Rendered Markdown */
.wiki-content { color: #d6d9e0; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.wiki-content > :first-child { margin-top: 0; }
.wiki-content > :last-child { margin-bottom: 0; }
.wiki-content :is(h1, h2, h3, h4, h5, h6) { margin: 1.8em 0 .6em; color: #eceef3; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; scroll-margin-top: 84px; }
.wiki-content h1 { font-size: 26px; }
.wiki-content h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 21px; }
.wiki-content h3 { font-size: 17px; }
.wiki-content h4 { font-size: 15px; }
.wiki-content :is(h5, h6) { color: #b7bbc5; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.wiki-content :is(p, ul, ol, blockquote, table, dl) { margin: 0 0 1.1em; }
.wiki-content a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 3px; }
.wiki-content a:hover { text-decoration-color: var(--accent); }
.wiki-content a.wiki-link { text-decoration-style: solid; }
.wiki-content a.wiki-link.is-missing { color: #a3a7b1; text-decoration-color: #5f6572; text-decoration-style: dashed; }
.wiki-content a.wiki-link.is-missing:hover { color: var(--accent); text-decoration-color: var(--accent); }
.wiki-content :is(ul, ol) { padding-left: 1.6em; }
.wiki-content ul { list-style: disc; }
.wiki-content ol { list-style: decimal; }
.wiki-content :is(ul, ol) ul { list-style-type: circle; }
.wiki-content :is(ul, ol) :is(ul, ol) ul { list-style-type: square; }
.wiki-content ol ol { list-style-type: lower-alpha; }
.wiki-content ol ol ol { list-style-type: lower-roman; }
.wiki-content li::marker { color: var(--accent-muted); }
.wiki-content ol > li::marker { font-variant-numeric: tabular-nums; }
.wiki-content li + li { margin-top: .25em; }
.wiki-content li > :is(ul, ol) { margin: .25em 0 0; }
.wiki-content li > p { margin: 0 0 .5em; }
.wiki-content ul:has(> li > input[type=checkbox]) { padding-left: .2em; list-style: none; }
.wiki-content input[type=checkbox] { margin: 0 .55em 0 0; vertical-align: -2px; accent-color: var(--accent); }
.wiki-content blockquote { margin-left: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent-border); color: #a9adb7; }
.wiki-content code { padding: .12em .4em; border: 1px solid #2c2f37; border-radius: 4px; background: #1b1d23; color: var(--accent-text); font: .86em ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-content pre { margin: 0 0 1.1em; padding: 16px 18px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: #101216; color: #dce0e9; font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; overflow-wrap: normal; }
.wiki-content pre code { display: block; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.wiki-code { position: relative; margin: 0 0 1.1em; }
.wiki-code pre { margin: 0; }
.wiki-code-copy { position: absolute; top: 8px; right: 8px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #343942; border-radius: 6px; background: #1b1d23; color: #a3a7b1; opacity: 0; cursor: pointer; transition: opacity .15s; }
.wiki-code-copy .gallery-icon { width: 15px; height: 15px; }
.wiki-code:hover .wiki-code-copy, .wiki-code-copy:focus-visible { opacity: 1; }
.wiki-code-copy:hover { border-color: #555d6b; color: #eceef3; }
@media (hover: none) { .wiki-code-copy { opacity: 1; } }
.wiki-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.wiki-content :is(th, td) { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.wiki-content th { background: #1a1c21; font-weight: 600; }
.wiki-content tbody tr:nth-child(even) td { background: #15171b; }
.wiki-content img { max-width: 100%; height: auto; border-radius: 6px; }
.wiki-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border); }
.wiki-content del { color: #8e95a2; }
.wiki-content .footnote-definition { display: flex; gap: 8px; margin-top: 1em; color: #a3a7b1; font-size: 13px; }
.wiki-content .footnote-definition p { margin: 0; }
.wiki-content sup { line-height: 0; }
/* Callouts use semantic colours, not the module accent. */
.wiki-content blockquote[class^='markdown-alert-'] { padding: 10px 16px; border-left-width: 3px; border-radius: 0 8px 8px 0; background: #16181d; color: #c9cdd6; }
.wiki-content blockquote[class^='markdown-alert-']::before { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.wiki-content blockquote.markdown-alert-note { border-left-color: #60a5fa; }
.wiki-content blockquote.markdown-alert-note::before { content: 'Note'; color: #93c5fd; }
.wiki-content blockquote.markdown-alert-tip { border-left-color: #4ade80; }
.wiki-content blockquote.markdown-alert-tip::before { content: 'Tip'; color: #86efac; }
.wiki-content blockquote.markdown-alert-important { border-left-color: #a78bfa; }
.wiki-content blockquote.markdown-alert-important::before { content: 'Important'; color: #c4b5fd; }
.wiki-content blockquote.markdown-alert-warning { border-left-color: #fbbf24; }
.wiki-content blockquote.markdown-alert-warning::before { content: 'Warning'; color: #fcd34d; }
.wiki-content blockquote.markdown-alert-caution { border-left-color: #f87171; }
.wiki-content blockquote.markdown-alert-caution::before { content: 'Caution'; color: #fca5a5; }
.wiki-content blockquote[class^='markdown-alert-'] > :last-child { margin-bottom: 0; }

/* Editor */
.wiki-editor { display: grid; gap: 16px; }
.wiki-editor-frame { overflow: hidden; border: 1px solid #30343d; border-radius: 10px; background: #101216; }
.wiki-editor-frame:focus-within { border-color: var(--accent-border); }
.wiki-editor-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: #17191d; }
.wiki-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.wiki-toolbar button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #a3a7b1; cursor: pointer; }
.wiki-toolbar button .gallery-icon { width: 16px; height: 16px; }
.wiki-toolbar button:hover { background: #252830; color: #eceef3; }
.wiki-toolbar-separator { width: 1px; height: 20px; margin: 0 6px; background: #30343d; }
.wiki-editor-modes { display: inline-flex; padding: 3px; border: 1px solid #30343d; border-radius: 8px; background: #101216; }
.wiki-editor-modes button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: #a3a7b1; font: 600 12px inherit; cursor: pointer; }
.wiki-editor-modes button .gallery-icon { width: 14px; height: 14px; }
.wiki-editor-modes button:hover { color: #eceef3; }
.wiki-editor-modes button[aria-pressed=true] { background: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-border); color: var(--accent-text); }
.wiki-editor-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: clamp(360px, calc(100dvh - 340px), 1400px); }
.wiki-editor-panes[data-mode=write], .wiki-editor-panes[data-mode=preview] { grid-template-columns: minmax(0, 1fr); }
.wiki-editor-panes[data-mode=write] .wiki-preview, .wiki-editor-panes[data-mode=preview] textarea { display: none; }
.wiki-editor-panes textarea { width: 100%; height: 100%; min-height: 0; padding: 20px 22px; resize: none; border: 0; outline: 0; background: transparent; color: #dce0e9; font: 13.5px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
.wiki-editor-panes textarea::placeholder { color: #5f6572; }
.wiki-editor-panes[data-mode=split] textarea { border-right: 1px solid var(--border); }
.wiki-workspace .wiki-editor-panes textarea:focus-visible { outline: 0; }
.wiki-preview { min-width: 0; overflow-y: auto; padding: 20px 26px; background: #13151a; }
.wiki-editor-panes[data-mode=preview] .wiki-preview { padding: 26px 34px; }
.wiki-preview-empty { color: #8e95a2; font-style: italic; }
.wiki-editor-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.wiki-editor-meta label { display: block; color: #bdc3cf; font-size: 12px; line-height: 1.6; }
.wiki-editor-meta input { display: block; width: 100%; height: 40px; margin-top: 6px; padding: 0 11px; border: 1px solid #3b404c; border-radius: 6px; background: #101216; color: #e0e3ea; font: 13px inherit; }
.wiki-editor-meta input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wiki-editor-meta small { display: block; margin-top: 5px; color: #8e95a2; font-size: 11px; }
.wiki-syntax-help { border: 1px solid var(--border); border-radius: 8px; background: #15171b; font-size: 13px; }
.wiki-syntax-help summary { padding: 11px 14px; color: #b7bbc5; cursor: pointer; }
.wiki-syntax-help dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; margin: 0; padding: 4px 14px 8px; }
.wiki-syntax-help dt { color: #d4d7de; }
.wiki-syntax-help dd { margin: 0; color: #a3a7b1; line-height: 1.6; }
.wiki-syntax-help code { padding: .1em .35em; border-radius: 4px; background: #1f2229; color: var(--accent-text); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-syntax-help p { margin: 6px 14px 14px; color: #8e95a2; font-size: 12px; }

/* History */
/* Relative so visually hidden headings stay inside the scroller. */
.wiki-table-scroll, .wiki-diff-scroll { position: relative; }
.wiki-table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #13151a; }
.wiki-history { width: 100%; border-collapse: collapse; font-size: 13px; }
.wiki-history th { padding: 11px 14px; border-bottom: 1px solid var(--border); background: #17191d; color: #a4a8b2; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.wiki-history td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #c9cdd6; vertical-align: middle; }
.wiki-history tbody tr:last-child td { border-bottom: 0; }
.wiki-history tbody tr:hover td { background: #16181d; }
.wiki-history-pick { width: 1%; white-space: nowrap; }
.wiki-history-pick input { margin: 0 3px; accent-color: var(--accent); cursor: pointer; }
.wiki-history-number { white-space: nowrap; }
.wiki-history-number a { color: var(--accent); font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
.wiki-history-number a:hover { text-decoration: underline; }
.wiki-current-badge { margin-left: 8px; padding: 2px 7px; border: 1px solid var(--accent-border); border-radius: 99px; background: var(--accent-dark); color: var(--accent-text); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.wiki-history-change { min-width: 260px; }
.wiki-change-kind { display: inline-flex; padding: 2px 8px; border: 1px solid #343840; border-radius: 99px; background: #202229; color: #c9cdd6; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.wiki-change-kind[data-kind=created] { border-color: var(--accent-border); color: var(--accent-text); }
.wiki-change-summary { margin-left: 10px; color: #a3a7b1; overflow-wrap: anywhere; }
.wiki-history time { color: #8e95a2; font-size: 12px; white-space: nowrap; }
.wiki-history-size { color: #a3a7b1; font-size: 12px; white-space: nowrap; }
.wiki-delta { margin-left: 8px; color: #8e95a2; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-delta.is-plus, .wiki-diff-stats .is-plus { color: #7ed99a; }
.wiki-delta.is-minus, .wiki-diff-stats .is-minus { color: #ff9e9e; }
.wiki-history-actions { text-align: right; white-space: nowrap; }
.wiki-history-actions > * + * { margin-left: 6px; }

/* Diffs: additions and removals use semantic colours. */
.wiki-diff-summary { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px 14px; margin-bottom: 16px; }
.wiki-diff-side { display: flex; flex: 1; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 8px 10px; min-width: 240px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; background: #13151a; font-size: 13px; }
.wiki-diff-side > a { color: var(--accent); font-weight: 600; text-decoration: none; }
.wiki-diff-side time { color: #8e95a2; font-size: 12px; }
.wiki-diff-side .wiki-change-summary { flex-basis: 100%; margin: 0; }
.wiki-diff-arrow { align-self: center; color: #8e95a2; font-size: 18px; }
.wiki-diff-stats { flex-basis: 100%; margin: 0; color: #8e95a2; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-diff-stats span { margin-right: 10px; }
.wiki-diff-meta { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.wiki-diff-meta li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: #a3a7b1; font-size: 13px; }
.wiki-diff-meta strong { min-width: 44px; color: #d4d7de; }
.wiki-diff-meta del { padding: 2px 7px; border-radius: 4px; background: #3a1d1f; color: #ffb4b0; }
.wiki-diff-meta ins { padding: 2px 7px; border-radius: 4px; background: #173322; color: #a6ecbb; text-decoration: none; }
.wiki-diff-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #101216; }
.wiki-diff { width: 100%; border-collapse: collapse; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
.wiki-diff th { padding: 8px 10px; border-bottom: 1px solid var(--border); background: #17191d; color: #8e95a2; font: 600 10px Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: .06em; text-align: right; text-transform: uppercase; }
.wiki-diff-number { width: 1%; padding: 0 10px; border-right: 1px solid #1f2229; color: #5f6572; text-align: right; white-space: nowrap; user-select: none; }
.wiki-diff-sign { width: 1%; padding: 0 4px 0 10px; color: #8e95a2; user-select: none; }
.wiki-diff-line { padding: 0 16px 0 4px; color: #cfd3dc; white-space: pre-wrap; overflow-wrap: anywhere; }
.wiki-diff-del td { background: #2a1517; }
.wiki-diff-del .wiki-diff-line { color: #ffcdc9; }
.wiki-diff-del .wiki-diff-sign { color: #ff9e9e; }
.wiki-diff-del mark { border-radius: 2px; background: #6b2a2c; color: #fff; }
.wiki-diff-ins td { background: #13261a; }
.wiki-diff-ins .wiki-diff-line { color: #c8f5d4; }
.wiki-diff-ins .wiki-diff-sign { color: #7ed99a; }
.wiki-diff-ins mark { border-radius: 2px; background: #1f5a33; color: #fff; }
.wiki-diff-gap td { padding: 6px 14px; border-block: 1px solid #1f2229; background: #15171b; color: #8e95a2; font: 11px Inter, ui-sans-serif, system-ui, sans-serif; text-align: center; }
.wiki-diff-empty { margin: 0; padding: 28px; border: 1px dashed #3c3b3d; border-radius: 10px; color: #a7a3a2; font-size: 13px; text-align: center; }
.wiki-diff-steps { justify-content: space-between; }

/* Special pages: generated documents laid out like wiki pages */
.wiki-special-badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.wiki-special-badge .gallery-icon { width: 14px; height: 14px; }
.wiki-special-document .wiki-document-header h1 { margin-bottom: 8px; }
.wiki-special-description { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.wiki-special-description a { color: var(--accent); }
.wiki-special-document .gallery-list-footer { margin-top: 22px; padding-bottom: 0; }
.wiki-special-document .wiki-tree > ul { padding: 0; border: 0; background: transparent; }
.wiki-special-document .wiki-change-list { border: 0; border-radius: 0; background: transparent; }
.wiki-special-document .wiki-change-list > li { padding-inline: 0; }
.wiki-special-document .snippet-empty { margin: 0; }
.wiki-tree-empty { margin: 6px 0 0 31px; color: #8e95a2; font-size: 13px; }
.wiki-link-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.wiki-link-button:hover { text-decoration: underline; }
.wiki-special-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wiki-special-list a { display: flex; align-items: flex-start; gap: 14px; padding: 13px 14px; border-radius: 8px; color: inherit; text-decoration: none; }
.wiki-special-list a:hover { background: #1e2026; }
.wiki-special-list a > .gallery-icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.wiki-special-list span { display: grid; gap: 3px; min-width: 0; }
.wiki-special-list strong { color: #e6e7eb; font-size: 14.5px; font-weight: 600; }
.wiki-special-list a:hover strong { color: var(--accent); }
.wiki-special-list small { color: #a3a7b1; font-size: 13px; line-height: 1.5; }
.wiki-tag-cloud { gap: 8px; }
.wiki-search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.wiki-search-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #343942; border-radius: 8px; background: #101216; color: #e0e2e8; font: 14px inherit; }
.wiki-search-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.wiki-search-form .gallery-button { min-height: 40px; }
.wiki-search-hint { margin: 0; color: #8e95a2; font-size: 13px; line-height: 1.6; }
.wiki-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.wiki-empty-actions .detail-secondary { display: inline-flex; align-items: center; gap: 7px; }
.wiki-tree ul { margin: 0; padding: 0; list-style: none; }
.wiki-tree > ul { padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #13151a; }
.wiki-tree ul ul { margin-left: 21px; padding-left: 12px; border-left: 1px solid var(--border); }
.wiki-tree a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; color: #dfe2e8; font-size: 13.5px; text-decoration: none; overflow-wrap: anywhere; }
.wiki-tree a:hover { background: #1e2026; color: var(--accent); }
.wiki-day { margin-bottom: 24px; }
.wiki-change-list { margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: #13151a; list-style: none; }
.wiki-change-list > li { display: flex; align-items: center; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.wiki-change-list > li:last-child { border-bottom: 0; }
.wiki-change-list > li > time { flex: none; width: 74px; color: #8e95a2; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.wiki-change-body { flex: 1; min-width: 0; }
.wiki-change-title { color: #e6e7eb; font-size: 14.5px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.wiki-change-title:hover { color: var(--accent); }
.wiki-change-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: #a3a7b1; font-size: 12px; }
.wiki-change-detail .wiki-change-summary { margin-left: 0; }
.wiki-change-detail time { color: #8e95a2; }
.wiki-former-path { color: #8e95a2; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.wiki-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.wiki-change-list :is(.detail-secondary, .detail-danger) { font-size: 13px; }

@media (max-width: 1100px) {
  .wiki-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .wiki-toc { position: static; order: -1; max-height: none; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #13151a; }
}
@media (max-width: 900px) {
  .wiki-editor-modes [data-mode=split] { display: none; }
  .wiki-editor-meta { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .wiki-document { padding: 20px 18px 24px; }
  .wiki-content { font-size: 14.5px; }
  .wiki-editor-panes textarea, .wiki-preview { padding: 16px; }
  .wiki-editor-panes { height: clamp(320px, calc(100dvh - 300px), 900px); }
  .wiki-change-list > li { flex-wrap: wrap; }
  .wiki-change-list > li > time { width: auto; }
  .wiki-row-actions { justify-content: flex-start; width: 100%; }
  .wiki-syntax-help dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .wiki-syntax-help dd { margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .wiki-topbar { gap: 10px; flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 12px; }
  .wiki-topbar .gallery-topbar-brand { display: flex; margin-right: auto; }
  .wiki-topbar .gallery-topbar-search { order: 3; flex-basis: 100%; }
  .wiki-topbar .gallery-button { padding-inline: 10px; font-size: 12px; }
  .wiki-special-nav .detail-secondary span, .wiki-topbar .wiki-topbar-special span { display: none; }
  .wiki-topbar .wiki-topbar-special { padding-inline: 10px; }
}

.keys-topbar .gallery-topbar-brand { display: flex; }
.keys-topbar .keys-mark { width: 23px; height: 23px; color: var(--accent); }
.keys-description, .json-description { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Signed-in home: only the wordmark, matching the signed-out landing page. */
.home-view { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.home-wordmark { margin: 0; color: var(--text); font: 500 16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

.json-topbar .gallery-topbar-brand { display: flex; }
.json-topbar .json-mark { width: 23px; height: 23px; color: var(--accent); }

.pastebin-theme .pastebin-mark { color: var(--accent); }
.pastebin-topbar .gallery-topbar-brand { display: flex; }
.pastebin-topbar .pastebin-mark { width: 23px; height: 23px; }
.pastebin-topbar > .gallery-button { margin-left: auto; }
.pastebin-workspace .gallery-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px; }
.pastebin-workspace .gallery-crumbs a { color: var(--accent); }
.pastebin-panel { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.pastebin-panel > label { font-size: 12px; color: #b7bbc5; }
.pastebin-panel textarea { width: 100%; min-width: 0; height: clamp(300px, 48vh, 680px); padding: 16px; resize: vertical; border: 1px solid #30343d; border-radius: 7px; background: #101216; color: #dce0e9; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 4; }
.pastebin-panel textarea:focus, .pastebin-lifetime select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.pastebin-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.pastebin-lifetime { display: flex; align-items: center; gap: 10px; color: #9ba1ad; font-size: 12px; }
.pastebin-lifetime select { height: 38px; padding: 0 28px 0 10px; border: 1px solid #343942; border-radius: 7px; background: #1a1c21; color: #d1d5dd; font: 12px inherit; }
.pastebin-copy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pastebin-expiration { color: #8e95a2; font-size: 12px; }
.pastebin-error { margin: 0; color: #ff9e9e; font-size: 13px; line-height: 1.6; }
.pastebin-error:empty { display: none; }
.pastebin-workspace button:disabled { opacity: .55; cursor: wait; }
.pastebin-unavailable { display: grid; justify-items: start; gap: 16px; padding: 28px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.pastebin-unavailable h1, .pastebin-unavailable p { margin: 0; }
.pastebin-unavailable h1 { font-size: 22px; }
.pastebin-unavailable p { color: var(--muted); font-size: 14px; }
@media (max-width: 520px) {
  .pastebin-panel { padding: 14px; }
  .pastebin-panel textarea { padding: 12px; }
  .pastebin-actions { align-items: flex-start; flex-direction: column; }
}

.public-paste-view { width: 100%; max-width: 1200px; min-width: 0; margin: 0 auto; }

.links-theme .links-mark { color: var(--accent); }
.links-topbar .gallery-topbar-brand { display: flex; }
.links-topbar .links-mark { width: 23px; height: 23px; }
.links-topbar > .gallery-button { margin-left: auto; }
.links-workspace .gallery-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px; }
.links-workspace .gallery-crumbs a { color: var(--accent); }
.links-description { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.links-panel { display: grid; gap: 18px; max-width: 760px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.links-field { display: grid; gap: 8px; min-width: 0; }
.links-field > label { font-size: 12px; color: #b7bbc5; }
.links-field input { width: 100%; min-width: 0; height: 44px; padding: 0 13px; border: 1px solid #30343d; border-radius: 7px; background: #101216; color: #dce0e9; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.links-field input[readonly] { background: #15171c; color: #c9cdd6; }
.links-field input[aria-invalid=true] { border-color: #874b45; }
.links-field input:focus, .links-workspace select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.links-control { display: flex; min-width: 0; gap: 8px; }
.links-control .detail-secondary { min-height: 44px; padding: 0 14px; }
.links-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.links-error { margin: -6px 0 0; color: #ff9e9e; font-size: 13px; line-height: 1.6; }
.links-error:empty { display: none; }
@media (max-width: 520px) {
  .links-panel { padding: 14px; }
  .links-control { flex-direction: column; }
  .links-actions { align-items: flex-start; flex-direction: column; }
}

/* Shared 404 card for short links, pastes and unknown pages. */
.not-found { display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: clamp(20px, 7vh, 84px) auto 0; padding: 46px 36px 42px; border: 1px solid var(--border); border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 68%), var(--panel); box-shadow: 0 24px 70px #0006; text-align: center; }
.not-found-badge { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: 14px; background: var(--accent-dark); color: var(--accent); }
.not-found-badge .gallery-icon { width: 24px; height: 24px; color: var(--accent); }
.not-found-code { margin: 12px 0 0; background: linear-gradient(180deg, #f1f2f6 10%, color-mix(in srgb, var(--accent) 60%, #2c3038)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(68px, 13vw, 104px); font-weight: 750; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.not-found h1 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.02em; }
.not-found-message { max-width: 380px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.not-found-actions { margin-top: 16px; }
.not-found-actions .gallery-button { gap: 7px; }
.public-not-found { min-height: 100vh; background: radial-gradient(ellipse at 50% 30%, #161a20, var(--bg) 62%); }
.public-topbar .gallery-topbar-brand { display: flex; }
.public-topbar .gallery-icon, .public-brand-mark { width: 23px; height: 23px; color: var(--accent); }
.public-not-found-view { padding: 0 16px 48px; }
@media (max-width: 520px) {
  .not-found { padding: 36px 20px 32px; }
}

.imagebin-theme .imagebin-mark { color: var(--accent); }
.imagebin-topbar .gallery-topbar-brand { display: flex; }
.imagebin-topbar .imagebin-mark { width: 23px; height: 23px; }
.imagebin-topbar > .gallery-button { margin-left: auto; }
.imagebin-workspace .gallery-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px; }
.imagebin-workspace .gallery-crumbs a { color: var(--accent); }
.imagebin-workspace button:disabled { opacity: .55; cursor: not-allowed; }
.imagebin-description { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.imagebin-panel { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.imagebin-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.imagebin-dropzone { display: grid; min-height: clamp(260px, 42vh, 520px); place-content: center; justify-items: center; gap: 8px; padding: 28px; border: 1px dashed #414650; border-radius: 9px; background: #111318; color: #aeb4c0; font-size: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.imagebin-dropzone:hover, .imagebin-file:focus-visible + .imagebin-dropzone { border-color: var(--accent); background: var(--accent-dark); }
.imagebin-file:focus-visible + .imagebin-dropzone { outline: 2px solid var(--accent); outline-offset: 2px; }
.imagebin-dropzone[hidden] { display: none; }
.imagebin-dropzone strong { margin-top: 6px; color: #e0e3ea; font-size: 14px; font-weight: 550; }
.imagebin-drop-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: 12px; background: var(--accent-dark); color: var(--accent); }
.imagebin-drop-icon .gallery-icon { width: 22px; height: 22px; }
.imagebin-preview { display: grid; gap: 12px; margin: 0; }
.imagebin-preview[hidden] { display: none; }
.imagebin-stage { display: grid; min-height: 200px; max-height: 70vh; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background-color: #17191e; background-image: linear-gradient(45deg, #202229 25%, transparent 25%), linear-gradient(-45deg, #202229 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #202229 75%), linear-gradient(-45deg, transparent 75%, #202229 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.imagebin-stage img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; object-fit: contain; }
.imagebin-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; min-width: 0; font-size: 12px; }
.imagebin-meta strong { overflow-wrap: anywhere; color: #e0e3ea; font-size: 13px; font-weight: 550; }
.imagebin-meta span { color: var(--muted); }
.imagebin-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.imagebin-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.imagebin-buttons [hidden] { display: none; }
.imagebin-workspace select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.imagebin-error { margin: 0; color: #ff9e9e; font-size: 13px; line-height: 1.6; }
.imagebin-error:empty { display: none; }
.imagebin-overlay > div { border-color: var(--accent); background: var(--accent-dark); color: var(--accent-text); }
.imagebin-overlay strong { color: var(--accent); }
.public-image-view { width: 100%; max-width: 1200px; min-width: 0; margin: 0 auto; }
@media (max-width: 520px) {
  .imagebin-panel { padding: 14px; }
  .imagebin-dropzone { min-height: 220px; }
  .imagebin-actions { align-items: flex-start; flex-direction: column; }
}

/* Filebin reuses the Imagebin panel, dropzone and actions; these rules cover what is new. */
.filebin-theme .filebin-mark { color: var(--accent); }
.imagebin-topbar .filebin-mark { width: 23px; height: 23px; }
.filebin-selected { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: #111318; }
.filebin-selected[hidden] { display: none; }
.filebin-file-icon { display: grid; flex: none; width: 46px; height: 46px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: 12px; background: var(--accent-dark); color: var(--accent); }
.filebin-file-icon .gallery-icon { width: 22px; height: 22px; }
.filebin-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.filebin-progress[hidden] { display: none; }
.filebin-progress-track { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #22252d; }
.filebin-progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .15s; }
.filebin-progress > span { min-width: 76px; text-align: right; }
.filebin-section { display: grid; gap: 10px; min-width: 0; }
.filebin-section h2 { margin: 0; color: #e0e3ea; font-size: 13px; font-weight: 600; }
.filebin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; }
.filebin-archive table { width: 100%; border-collapse: collapse; font-size: 12px; }
.filebin-archive th { padding: 9px 12px; border-bottom: 1px solid var(--border); background: #17191e; color: #8e95a2; font-weight: 500; text-align: left; white-space: nowrap; }
.filebin-archive td { padding: 8px 12px; border-bottom: 1px solid #1f2228; color: #aeb4c0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.filebin-archive tr:last-child td { border-bottom: 0; }
.filebin-archive td.filebin-entry-name { max-width: 520px; overflow: hidden; color: #e0e3ea; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; }
.filebin-archive th:not(:first-child), .filebin-archive td:not(:first-child) { width: 1%; }
.filebin-archive-total { margin: 0; color: var(--muted); font-size: 12px; }
.filebin-hashes { display: grid; gap: 8px; margin: 0; }
.filebin-hashes > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 12px; }
.filebin-hashes dt { color: #8e95a2; font-size: 12px; }
.filebin-hashes dd { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.filebin-hashes code { flex: 1; min-width: 0; padding: 8px 10px; overflow-wrap: anywhere; border: 1px solid #30343d; border-radius: 6px; background: #0e1014; color: var(--accent-text); font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.filebin-hashes .detail-secondary { flex: none; }
.filebin-workspace .imagebin-buttons .gallery-button { text-decoration: none; }
@media (max-width: 520px) {
  .filebin-hashes > div { grid-template-columns: 1fr; gap: 5px; }
  .filebin-archive td.filebin-entry-name { max-width: 220px; }
}

/* Lucide icons beside text. */
.generator-actions > button { display: inline-flex; align-items: center; gap: 7px; }
.gallery-pagination a { display: inline-flex; align-items: center; gap: 4px; }
.gallery-pagination a .gallery-icon { width: 15px; height: 15px; }

/* Logout is a POST form styled as a sidebar menu item; its label collapses with the others. */
.sidebar .sidebar-logout button { display: flex; align-items: center; gap: 12px; width: 100%; height: auto; min-height: 42px; padding: 0 12px; overflow: hidden; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #9ba0ac; font: inherit; font-size: 13px; text-align: left; white-space: nowrap; transform: none; transition: background .15s, color .15s; }
.sidebar .sidebar-logout button:hover { background: #191b20; color: #f4f5f8; filter: none; transform: none; }
.sidebar .sidebar-logout button:hover .nav-icon { color: #f4f5f8; }
.sidebar .sidebar-logout button:focus-visible, .sidebar nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Module themes. Every module colour comes from this block: components use
   only the --accent* tokens. Add a module by adding a `.{slug}-theme` line
   (the class is derived from its path) and listing it in the derived-token
   selector below. Accents are Tailwind palette colours (tailwindcss 4.x),
   spread evenly across Tailwind's hues from red to rose in sidebar order:
   red, amber, lime, green, teal, sky, indigo, violet, fuchsia and rose. The
   first module stays red and the last rose; adding a module respaces them.
   ========================================================================== */
:root {
  --color-red-400: oklch(70.4% 0.191 22.216);
  --color-red-950: oklch(25.8% 0.092 26.042);
  --color-amber-400: oklch(82.8% 0.189 84.429);
  --color-amber-950: oklch(27.9% 0.077 45.635);
  --color-lime-400: oklch(84.1% 0.238 128.85);
  --color-lime-950: oklch(27.4% 0.072 132.109);
  --color-green-400: oklch(79.2% 0.209 151.711);
  --color-green-950: oklch(26.6% 0.065 152.934);
  --color-teal-400: oklch(77.7% 0.152 181.912);
  --color-teal-950: oklch(27.7% 0.046 192.524);
  --color-sky-400: oklch(74.6% 0.16 232.661);
  --color-sky-950: oklch(29.3% 0.066 243.157);
  --color-indigo-400: oklch(67.3% 0.182 276.935);
  --color-indigo-950: oklch(25.7% 0.09 281.288);
  --color-violet-400: oklch(70.2% 0.183 293.541);
  --color-violet-950: oklch(28.3% 0.141 291.089);
  --color-fuchsia-400: oklch(74% 0.238 322.16);
  --color-fuchsia-950: oklch(29.3% 0.136 325.661);
  --color-rose-400: oklch(71.2% 0.194 13.428);
  --color-rose-950: oklch(27.1% 0.105 12.094);
  --accent-ink: #171b11;
}
.filebin-theme { --accent: var(--color-red-400); --accent-ink: var(--color-red-950); }
.gallery-theme { --accent: var(--color-amber-400); --accent-ink: var(--color-amber-950); }
.imagebin-theme { --accent: var(--color-lime-400); --accent-ink: var(--color-lime-950); }
.json-formatter-theme { --accent: var(--color-green-400); --accent-ink: var(--color-green-950); }
.keys-theme { --accent: var(--color-teal-400); --accent-ink: var(--color-teal-950); }
.links-theme { --accent: var(--color-sky-400); --accent-ink: var(--color-sky-950); }
.pastebin-theme { --accent: var(--color-indigo-400); --accent-ink: var(--color-indigo-950); }
.snippets-theme { --accent: var(--color-violet-400); --accent-ink: var(--color-violet-950); }
.tickets-theme { --accent: var(--color-fuchsia-400); --accent-ink: var(--color-fuchsia-950); }
.wiki-theme { --accent: var(--color-rose-400); --accent-ink: var(--color-rose-950); }
/* Derived tokens must be declared where --accent is set so they follow it. */
:root, .filebin-theme, .gallery-theme, .imagebin-theme, .json-formatter-theme, .keys-theme, .links-theme, .pastebin-theme, .snippets-theme, .tickets-theme, .wiki-theme {
  --accent-dark: color-mix(in oklab, var(--accent) 13%, #101115);
  --accent-border: color-mix(in oklab, var(--accent) 38%, #1a1c22);
  --accent-text: color-mix(in oklab, var(--accent) 55%, #eceef3);
  --accent-muted: color-mix(in oklab, var(--accent) 55%, #858b99);
  --accent-ring: color-mix(in oklab, var(--accent) 16%, transparent);
}
/* Sidebar icons always show their own module colour. */
.sidebar nav a .nav-icon, .sidebar nav a.active .nav-icon { color: var(--accent); }

/* Running binary version, visible only in authenticated documents. */
.app-version{position:fixed;right:12px;bottom:6px;z-index:90;color:var(--muted);font-size:10px;line-height:14px;pointer-events:none}.node83-toasts{bottom:36px}

/* Tickets shares the gallery shell, grid and dialogs; its colours come from .tickets-theme. */
.tickets-theme .tickets-mark { color: var(--accent); }
.tickets-topbar .gallery-topbar-brand { display: flex; }
.tickets-topbar .tickets-mark { width: 23px; height: 23px; }
.tickets-workspace .gallery-button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); gap: 7px; }
.tickets-workspace .gallery-crumbs a { color: var(--accent); }
.tickets-workspace :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tickets-workspace button:disabled { opacity: .55; cursor: wait; }
.tickets-grid { list-style: none; margin: 0; padding: 0; }
.gallery-list .tickets-grid { grid-template-columns: repeat(auto-fill, minmax(max(224px, calc((100% - 54px) / 4)), 1fr)); gap: 18px; }
.asset-card.tickets-card { display: flex; align-items: flex-start; gap: 20px; min-height: 112px; padding: 16px; color: inherit; text-decoration: none; }
.tickets-card:hover, .tickets-card:focus-visible { border-color: var(--accent-border); }
.tickets-tile { display: grid; flex: none; place-items: center; width: 56px; height: 56px; border: 1px solid var(--accent-border); border-radius: 12px; background: var(--accent-dark); color: var(--accent-text); font: 700 16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; overflow: hidden; }
.tickets-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tickets-card-name { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.tickets-card-description { display: -webkit-box; margin: 0; overflow: hidden; color: #aeb4c0; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.tickets-card-counts { margin-top: auto; color: var(--accent-muted); font-size: 12px; }
.tickets-dialog { max-height: calc(100dvh - 48px); overflow-y: auto; }
.tickets-dialog label { display: block; line-height: 1.6; }
.tickets-dialog label > input, .tickets-dialog label > textarea { display: block; width: 100%; margin-top: 6px; }
.tickets-dialog textarea { padding: 8px 10px; border: 1px solid #3b404c; border-radius: 6px; background: #101216; color: inherit; font: inherit; resize: vertical; }
.tickets-dialog input:focus, .tickets-dialog textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.tickets-dialog small { display: block; margin-top: 5px; color: #8e95a2; font-size: 11px; }
.tickets-address { margin: 10px 0 0; color: #8e95a2; font-size: 12px; overflow-wrap: anywhere; }
.tickets-address code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.tickets-card-item { position: relative; }
.tickets-card-item .folder-card-menu { position: absolute; top: 30px; right: 12px; }
.tickets-card-item .folder-card-menu[open] { z-index: 5; }
.tickets-card-name { padding-right: 26px; }
.tickets-dialog .tickets-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tickets-dialog .tickets-check[hidden] { display: none; }
.tickets-dialog .tickets-check > input { display: inline-block; width: auto; margin: 0; accent-color: var(--accent); }
.tickets-dialog .tickets-check small { flex-basis: 100%; margin: 0; }
.tickets-card-item .folder-menu-panel { top: calc(100% + 5px); bottom: auto; }
.tickets-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tickets-board-title { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.tickets-board-title h1 { margin: 0; }
.tickets-tile-header { width: 48px; height: 48px; font-size: 14px; }
.tickets-icon-field { display: flex; align-items: flex-start; gap: 14px; margin-top: 12px; }
.tickets-icon-preview { flex: none; width: 64px; height: 64px; border: 1px solid #3b404c; border-radius: 12px; background: #101216; }
.tickets-icon-field > div { min-width: 0; flex: 1; }
.tickets-dialog .tickets-icon-field input[type=file] { font-size: 12px; }
.tickets-deleted-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tickets-deleted-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.tickets-deleted-item .tickets-card-body { flex: 1; }
.tickets-deleted-item .tickets-card-name { padding-right: 0; }
.tickets-deleted-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tickets-deleted-actions .gallery-icon { width: 15px; height: 15px; }
.tickets-deleted-item .tickets-tile { opacity: .7; }
.tickets-deleted-item .tickets-key { min-width: 64px; }
.tickets-deleted-link { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: .85rem; opacity: .8; color: inherit; text-decoration: none; }
.tickets-deleted-link:hover { opacity: 1; text-decoration: underline; }
.tickets-deleted-link .gallery-icon { width: 15px; height: 15px; }
.tickets-ticket-head .folder-header-menu { margin-left: 8px; }
.tickets-ticket-head .folder-header-menu summary { width: 32px; height: 32px; }
.tickets-card-item .folder-menu-panel .gallery-icon { width: 16px; height: 16px; }
.tickets-dialog .folder-dialog-actions [type=submit].danger { background: #c94a43; border-color: #c94a43; color: #fff; }
.tickets-workspace .gallery-list-footer a { color: var(--accent); }
@media (max-width: 640px) { .tickets-deleted-item { flex-wrap: wrap; } .tickets-deleted-actions { justify-content: flex-start; } }
.tickets-dialog [data-tickets-error] { color: #ff9e9e; }
.tickets-dialog [data-tickets-error]:empty { display: none; }
.tickets-dialog [data-tickets-error] { color: #ff9e9e; }
.tickets-dialog [data-tickets-error]:empty { display: none; }
.tickets-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; align-items: flex-start; }
.tickets-lane { flex: 1 1 224px; min-width: 224px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 12px; background: rgba(255,255,255,.03); max-height: 70vh; }
.tickets-lane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tickets-lane-head h2 { margin: 0; font-size: 1rem; }
.tickets-lane-count { font-size: .8rem; opacity: .7; }
.tickets-lane-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-y: auto; min-height: 4px; }
.tickets-ticket { display: grid; gap: 4px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.05); overflow-wrap: anywhere; }
.tickets-key { font-size: .75rem; font-weight: 600; opacity: .7; }
.tickets-add { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px 4px; opacity: .8; }
.tickets-add:hover { opacity: 1; }
.tickets-quick-add input { width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { .tickets-lane { flex: 0 0 85vw; } }
.tickets-add[hidden], .tickets-quick-add[hidden] { display: none; }
.tickets-quick-add [data-tickets-error] { color: #ff9e9e; margin: 4px 0 0; font-size: .85rem; }
.tickets-quick-add [data-tickets-error]:empty { display: none; }
.tickets-ticket { cursor: pointer; }
.tickets-ticket:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.tickets-ticket-dialog { width: min(980px, 96vw); max-width: 96vw; }
.tickets-ticket-dialog form { display: grid; gap: 12px; }
.tickets-ticket-head { display: flex; align-items: center; gap: 12px; }
.tickets-ticket-head h2 { margin: 0; }
.tickets-ticket-created { margin-left: auto; font-size: .85rem; opacity: .7; }
.tickets-ticket-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tickets-ticket-dialog label { display: grid; gap: 4px; }
.tickets-ticket-dialog .wiki-editor-panes { min-height: 240px; }
.tickets-ticket-stale[hidden] { display: none; }
.tickets-comments { display: grid; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.tickets-comments h3 { margin: 0; }
.tickets-comments-total { opacity: .7; font-weight: 400; }
.tickets-comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tickets-comment-list:empty { display: none; }
.tickets-comment { padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; }
.tickets-comment-head { display: flex; align-items: center; gap: 8px; font-size: .8rem; opacity: .85; }
.tickets-comment-actions { margin-left: auto; display: flex; gap: 6px; }
.tickets-comment-actions button { font-size: .8rem; padding: 2px 8px; }
.tickets-comment-body { margin-top: 6px; overflow-wrap: anywhere; }
.tickets-comment-form .wiki-editor-panes { height: 180px; min-height: 0; }
.tickets-comment-count { display: inline-flex; align-items: center; gap: 3px; font-size: .75rem; opacity: .8; }
.tickets-comment-count svg { width: 13px; height: 13px; }
.tickets-progress { justify-self: start; font-size: .75rem; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); opacity: .85; }
.tickets-progress.is-complete { border-color: var(--accent-border); color: var(--accent-text); opacity: 1; }
.tickets-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tickets-due, .tickets-completed { font-size: .75rem; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.tickets-due.is-overdue { border-color: #874b45; background: #30201f; color: #ff9e9e; }
.tickets-due.is-soon { border-color: #7a6228; background: #2d2614; color: #f2cf86; }
.tickets-completed { border-color: var(--accent-border); color: var(--accent-text); }
.tickets-ticket.is-complete .tickets-ticket-title { opacity: .75; }
.tickets-criteria { display: grid; gap: 8px; }
.tickets-criteria h3 { margin: 0; font-size: 1rem; }
.tickets-criteria-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tickets-criteria-list:empty { display: none; }
.tickets-criteria-list label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.tickets-criteria-list input { margin-top: 3px; }
.tickets-criteria-list input:checked + span { text-decoration: line-through; opacity: .65; }
.tickets-criteria-note { margin: 0; font-size: .85rem; opacity: .75; }
.tickets-criteria-note[hidden] { display: none; }
@media (max-width: 700px) { .tickets-ticket-fields { grid-template-columns: 1fr; } }
.tickets-ticket { position: relative; }
.tickets-move { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; opacity: 0; }
.tickets-move .gallery-icon { width: 16px; height: 16px; }
.tickets-ticket:hover .tickets-move, .tickets-ticket:focus-within .tickets-move, .tickets-move:focus-visible { opacity: .8; }
.tickets-move:hover { opacity: 1; background: rgba(255,255,255,.1); }
@media (hover: none) { .tickets-move { opacity: .6; } }
.tickets-ticket.is-dragging { opacity: .4; }
.tickets-placeholder { list-style: none; min-height: 44px; border: 2px dashed var(--accent-border, rgba(255,255,255,.35)); border-radius: 9px; background: rgba(255,255,255,.04); }
.tickets-lane.is-target { border-color: var(--accent); background: rgba(255,255,255,.07); }
.tickets-dialog select { width: 100%; margin-top: 6px; }
.tickets-ticket .tickets-ticket-title { padding-right: 26px; }
.tickets-ticket { -webkit-touch-callout: none; }
@media (pointer: coarse) { .tickets-ticket { user-select: none; -webkit-user-select: none; } }
.tickets-ghost { position: fixed; z-index: 1000; margin: 0; pointer-events: none; opacity: .92; box-shadow: 0 8px 24px rgba(0,0,0,.45); transform: rotate(2deg); list-style: none; }
.tickets-ghost .tickets-move { display: none; }

.tickets-more { margin-top: 6px; padding: 2px 4px; border: 0; background: none; color: inherit; font-size: .8rem; opacity: .7; cursor: pointer; text-decoration: underline; }
.tickets-more:hover { opacity: 1; }
.tickets-new-dialog { width: min(560px, 96vw); }
.tickets-new-dialog form { display: grid; gap: 12px; }
.tickets-new-dialog label { display: grid; gap: 4px; }
