:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  --chrome: #131a19;
  --toolbar: #171f1e;
  --side: #121b19;
  --panel: #1a2522;
  --input: #101715;
  --line: #ffffff14;
  --text: #edf4f0;
  --muted: #a2b2aa;
  --accent: #b9f4d7;
  --selected: #20352c;
  --hover: #ffffff0d;
  --shadow: #0005;
}
:root[data-theme="light"] {
  color-scheme: light;
  --chrome: #f0f5f1;
  --toolbar: #f9fcfa;
  --side: #f7faf7;
  --panel: #fff;
  --input: #ebf1ed;
  --line: #183c2921;
  --text: #172f23;
  --muted: #4b6759;
  --accent: #17563d;
  --selected: #e0eee5;
  --hover: #1b4a3410;
  --shadow: #1b322422;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100vh; height: 100dvh; background: var(--side); color: var(--text); display: flex; flex-direction: column; overflow: hidden; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; background: none; }
button:disabled { cursor: default; opacity: .38; }
button:focus-visible, input:focus-visible, textarea:focus-visible, .upload:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 18px; height: 18px; flex: none; display: block; }
.chrome { position: relative; z-index: 3; background: var(--chrome); flex: none; }
.tabstrip { display: flex; height: 47px; align-items: center; gap: 7px; padding: 0 15px 0 10px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; color: var(--muted); border-radius: 8px; padding: 0; }
.icon-button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.menu-toggle { margin-right: 6px; }
.tabs { display: flex; gap: 4px; min-width: 0; overflow: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; min-width: 96px; width: 208px; height: 34px; background: var(--hover); border: 1px solid transparent; border-radius: 8px; padding-right: 4px; flex-shrink: 1; }
.tab.active { background: var(--toolbar); border-color: var(--line); }
.tab-select { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 100%; padding: 0 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.tab-select svg { width: 14px; height: 14px; color: var(--accent); }
.tab .icon-button { width: 24px; height: 24px; }
.tab .icon-button svg { width: 13px; height: 13px; }
.private-label { display: flex; align-items: center; gap: 7px; margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 650; white-space: nowrap; }
.private-label svg { width: 15px; height: 15px; }
.toolbar { display: flex; align-items: center; gap: 5px; background: var(--toolbar); padding: 6px 13px 7px 10px; border-block: 1px solid var(--line); }
.address { flex: 1; display: flex; align-items: center; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); padding: 0 11px; gap: 10px; margin: 0 4px; }
.address:focus-within { border-color: var(--accent); }
.address input, .search input { width: 100%; min-width: 0; background: none; border: 0; padding: 0; color: inherit; outline: none; }
.address input { font-size: 12px; }
.address input::placeholder { color: var(--muted); }
.address svg { width: 14px; height: 14px; color: var(--muted); }
.workspace { --sidebar-width: 242px; --sidebar-offset: 0px; --wallpaper: url("assets/lac-alpin.png"); --admin-wallpaper: url("assets/creste-admin.png"); flex: 1; min-height: 0; position: relative; display: flex; overflow: hidden; }
.workspace.sidebar-open { --sidebar-offset: var(--sidebar-width); }
.sidebar { width: var(--sidebar-offset); flex: none; overflow: hidden; background: var(--side); transition: width 230ms ease; }
.sidebar-inner { display: flex; flex-direction: column; width: var(--sidebar-width); height: 100%; padding: 27px 15px 17px; border-right: 1px solid var(--line); overflow: auto; }
.sidebar-rail { position: absolute; inset: 0 auto 0 var(--sidebar-offset); width: 20px; z-index: 3; display: grid; align-items: center; touch-action: pan-y; user-select: none; cursor: ew-resize; transition: left 230ms ease; }
.sidebar-handle { width: 19px; height: 56px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: var(--side); color: var(--muted); cursor: ew-resize; }
.sidebar-handle:hover, .sidebar-handle:focus-visible { background: var(--panel); color: var(--accent); }
.sidebar-handle:focus-visible { outline-offset: -2px; }
.handle-grip { width: 3px; height: 18px; border-radius: 3px; background: currentColor; pointer-events: none; }
.sidebar-dragging .sidebar, .sidebar-dragging .sidebar-rail { transition: none; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 5px 32px; }
.brand-icon { background: var(--accent); color: var(--side); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
:root[data-theme="light"] .brand-icon { color: white; }
.brand-icon svg { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 20px; font-weight: 720; letter-spacing: -.55px; line-height: 1; }
.brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.nav-item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; text-align: left; color: var(--muted); font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.selected { background: var(--selected); color: var(--accent); }
.nav-item svg { width: 17px; height: 17px; }
.category-icon-image { width: 17px; height: 17px; flex: none; object-fit: contain; }
.category-filters .category-icon-image { width: 14px; height: 14px; }
.sidebar-section { margin-top: 23px; }
.nav-label { margin: 0 11px 7px; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.sidebar-bottom { margin-top: auto; padding-top: 14px; }
.sidebar-bottom .nav-item { border: 1px solid var(--line); }
#desktop-logout { margin-top: 8px; }
.card-transfer { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 20px 18px; }
.card-transfer p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-transfer #card-transfer-status { color: var(--accent); }
.card-transfer #card-transfer-status[data-error] { color: #f38c8c; }
#category-icon-selection { align-self: center; color: var(--text); font-size: 13px; }
.category-icon-picker { display: grid; gap: 7px; margin: 12px 0; }
.category-icon-picker fieldset { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.category-icon-picker fieldset legend { color: var(--muted); }
.category-icon-picker button[aria-pressed="true"] { color: var(--accent); background: var(--selected); outline: 1px solid var(--accent); outline-offset: -2px; }
.surface { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.start, .admin, .web-surface, .page-error { position: absolute; inset: 0; }
.start {
  isolation: isolate;
  overflow: auto;
  display: flex;
  flex-direction: column;
  color: #f6fbf7;
  background-color: #142620;
  background-image: linear-gradient(180deg, #0b181649, #10211d28 37%, #0b171599 79%, #091412a6),
    linear-gradient(90deg, #08161348, #08161308 62%),
    var(--wallpaper);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  scrollbar-width: thin;
  scrollbar-color: #9cb9a578 transparent;
}
:root[data-theme="light"] .start { background-image: linear-gradient(180deg, #12282232, #10211d37 36%, #14241f82), var(--wallpaper); }
.start-inner { width: min(100% - 64px, 1000px); margin: auto; padding: clamp(38px, 7.5vh, 85px) 0 48px; }
.hero { text-align: center; }
.hero-symbol { width: 58px; height: 58px; margin: 0 auto 21px; display: grid; place-items: center; color: #c8f9df; background: #162e28af; border: 1px solid #b5f5d76e; border-radius: 19px; box-shadow: 0 8px 22px #0712114a; backdrop-filter: blur(12px); }
.hero-symbol svg { width: 28px; height: 28px; }
.hero h1 { font-size: clamp(36px, 5vw, 71px); line-height: 1.02; letter-spacing: -.065em; margin: 0; font-weight: 750; text-wrap: balance; text-shadow: 0 4px 22px #091b18a3; }
.hero h1 span { color: #b8f4d7; }
.hero p { font-size: clamp(13px, 1.45vw, 16px); color: #e0ebe4; margin: 17px 0 28px; text-shadow: 0 2px 9px #091b18; }
.search { display: flex; gap: 12px; align-items: center; width: min(100%, 610px); height: 59px; margin-inline: auto; background: #101c1be6; border: 1px solid #e3ffed40; border-radius: 14px; padding: 7px 8px 7px 17px; backdrop-filter: blur(14px); box-shadow: 0 12px 42px #08171550; text-align: left; }
.search:focus-within { border-color: #b9f4d7; }
.search > span { color: #c0d2c8; }
.search input { font-size: 14px; }
.search input::placeholder { color: #c0d2c8; }
.search-submit { display: grid; place-items: center; flex: none; width: 41px; height: 41px; border-radius: 9px; background: #b9f4d7; color: #103426; }
.search-submit:hover { background: #e0ffef; }
.favorites { margin-top: clamp(42px, 7vh, 76px); }
.favorites-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.favorites-heading h2 { font-size: 17px; margin: 0; letter-spacing: -.015em; overflow-wrap: anywhere; }
.favorites-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rearrange-hint { margin: 0 0 12px; font-size: 13px; color: #e4f3e8; }
.subtle-button { color: var(--muted); border: 1px solid var(--line); border-radius: 8px; min-height: 34px; padding: 6px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; }
.subtle-button:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.subtle-button svg { width: 14px; height: 14px; }
.favorites .subtle-button { color: #e4f3e8; background: #13241dbd; border-color: #e3ffed30; }
.favorites .subtle-button:hover { background: #284236; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr)); gap: 15px; }
.cover-image {
  --cover-x: 0%;
  --cover-y: 100%;
  --cover-size: 300% 200%;
  background: #24392e var(--cover-image, url("assets/galerie-start.png")) var(--cover-x) var(--cover-y) / var(--cover-size) no-repeat;
}
.cover-image[data-cover="orange"] { --cover-y: 0%; }
.cover-image[data-cover="stone"] { --cover-x: 50%; --cover-y: 0%; }
.cover-image[data-cover="red"] { --cover-x: 100%; --cover-y: 0%; }
.cover-image[data-cover="violet"] { --cover-x: 50%; }
.cover-image[data-cover="green"] { --cover-x: 100%; }
.cover-image[data-custom-cover] { --cover-x: 50%; --cover-y: 50%; --cover-size: cover; }
.link-card {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: stretch;
  align-content: stretch;
  aspect-ratio: 1;
  min-width: 0;
  min-height: min-content;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #fff;
  text-align: center;
}
.link-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #10171285; transition: background 350ms; }
.link-card:is(:hover, :focus-visible)::before { background: #0b140db3; }
.tile-caption { display: grid; place-items: center; align-content: center; padding: clamp(17px, 1.8vw, 27px); min-width: 0; text-shadow: 0 2px 8px #000c; }
.tile-caption::before, .tile-caption::after { content: ""; position: absolute; inset: 11px; pointer-events: none; opacity: 0; transition: opacity 350ms, transform 350ms; }
.tile-caption::before { border-block: 1px solid #fff; transform: scaleX(0); }
.tile-caption::after { border-inline: 1px solid #fff; transform: scaleY(0); }
.link-card:is(:hover, :focus-visible) .tile-caption::before, .link-card:is(:hover, :focus-visible) .tile-caption::after { transform: scale(1); opacity: 1; }
.tile-caption strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(16px, 1.7vw, 24px); font-weight: 400; line-height: 1.25; letter-spacing: .03em; text-transform: uppercase; }
#links .link-card { container-type: inline-size; }
#links .link-card.drag-source { opacity: .55; }
#links :is([aria-pressed="true"], .drop-target) { box-shadow: inset 0 0 0 3px #b9f4d7; }
#links .link-card[draggable="true"][aria-pressed] { cursor: grab; }
.link-space { min-width: 0; aspect-ratio: 1; }
button.link-space { display: grid; place-items: center; padding: 0; border: 1px dashed #b9f4d77d; color: #c8f9df; background: #10211d70; }
button.link-space:is(:hover, .drop-target) { background: #284236; }
button.link-space svg { width: 20px; height: 20px; }
#links .tile-caption { padding: clamp(12px, 9cqi, 20px); }
#links .tile-caption strong { font-size: clamp(14px, 10cqi, 20px); }
.tile-details { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(10px); transition: grid-template-rows 350ms, margin-top 350ms, opacity 350ms, transform 350ms; }
.tile-info { display: grid; gap: 4px; min-height: 0; overflow: hidden; overflow-wrap: anywhere; font-size: clamp(11px, 1vw, 13px); line-height: 1.4; color: #fff; }
.link-description { white-space: pre-line; }
.link-url { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; color: #c0f2d9; }
.link-card:is(:hover, :focus-visible) .tile-details { grid-template-rows: 1fr; margin-top: 10px; opacity: 1; transform: translateY(0); }
:root[data-theme="light"] .search { background: #f2faf4ec; color: #19362a; }
:root[data-theme="light"] .search > span, :root[data-theme="light"] .search input::placeholder { color: #436957; }
:root[data-theme="light"] .search-submit { background: #17563d; color: #ffffff; }
.start-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 18px 23px; font-size: 11px; color: #c9d9d0; text-align: center; }
.start-footer svg { width: 13px; height: 13px; }
.admin, .page-error { background: var(--toolbar); overflow: auto; }
.admin {
  container-type: inline-size;
  isolation: isolate;
  background: linear-gradient(180deg, color-mix(in srgb, var(--side) 82%, transparent), color-mix(in srgb, var(--side) 43%, transparent) 52%),
    var(--admin-wallpaper) center 35% / cover no-repeat var(--side);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent;
}
.admin-access { display: grid; align-items: safe center; justify-items: center; padding: 24px; }
.access-card { width: min(100%, 415px); padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 60px var(--shadow); }
.access-card .card-icon { margin-top: 12px; }
.access-card h1 { font-size: 30px; line-height: 1.12; }
#access-form { margin-top: 22px; display: grid; gap: 8px; }
#access-form label { font-size: 13px; font-weight: 650; }
#access-form input { width: 100%; height: 42px; margin-bottom: 5px; border-radius: 8px; border: 1px solid var(--line); background: var(--input); color: var(--text); padding: 0 10px; }
#access-form .form-error { margin: 0 0 3px; font-size: 12px; }
#access-form .action-button { margin-top: 6px; min-height: 41px; }
.admin-inner { width: min(100% - 64px, 1090px); margin: 0 auto; padding: 34px 0 50px; }
.admin-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.admin-back { border-color: transparent; margin-left: -9px; }
.admin h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; margin: 13px 0 9px; letter-spacing: -.05em; }
.intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.admin-grid { display: grid; gap: 18px; align-items: start; }
.admin-tools { display: grid; gap: 18px; min-width: 0; }
.admin-card { min-width: 0; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 90%, transparent); box-shadow: 0 12px 28px -20px var(--shadow); }
.card-heading { display: flex; align-items: center; gap: 12px; padding: 18px 20px; min-height: 76px; }
.card-heading h2 { font-size: 16px; letter-spacing: -.02em; margin: 0 0 4px; }
.card-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.card-heading > button { margin-inline-start: auto; }
.appearance-heading { flex-wrap: wrap; }
.appearance-title { display: flex; align-items: center; gap: 12px; }
.theme-setting { margin-inline-start: auto; max-width: 100%; }
.theme-setting h3 { margin: 0 0 6px; font-size: 13px; }
.card-icon { width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--selected); color: var(--accent); border: 1px solid var(--line); }
.action-button { background: var(--accent); color: var(--side); min-height: 36px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; padding: 7px 11px; cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; }
.action-button:hover { filter: brightness(1.12); }
.action-button svg { width: 15px; height: 15px; }
:root[data-theme="light"] .action-button { color: white; }
#categories { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 12px; }
.category-filters, .category-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.category-filters button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.category-filters button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); color: var(--accent); }
.category-actions .icon-button { width: 30px; height: 30px; }
.category-actions .icon-button svg { width: 15px; height: 15px; }
.category-actions .subtle-button:disabled { opacity: .45; cursor: default; }
.admin-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr)); gap: 10px; }
.admin-link-card { position: relative; display: grid; min-width: 0; container-type: inline-size; }
.admin-link-card .tile-caption { padding: 25px 17px 17px; }
.admin-link-card .tile-caption strong { font-size: clamp(16px, 10cqi, 24px); }
.link-actions { position: absolute; top: 7px; right: 7px; display: flex; gap: 2px; }
.link-actions .icon-button { width: 28px; height: 28px; background: #0c1815d9; color: #eef7f2; }
.link-actions .icon-button:hover:not(:disabled) { background: #28463b; color: #fff; }
.link-actions .icon-button svg { width: 15px; height: 15px; }
.admin .delete-action:hover { background: #b7444420; color: #f3a3a3; }
:root[data-theme="light"] .admin .delete-action:hover { color: #9f3434; }
.admin-links-empty { color: var(--muted); }
.setting { border-top: 1px solid var(--line); padding: 17px 20px; }
.setting h3 { font-size: 13px; margin: 0 0 11px; }
.setting small { color: var(--muted); display: block; margin: 9px 0 12px; font-size: 11px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-options button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--muted); font-size: 12px; font-weight: 650; min-width: 0; }
.theme-options button:hover { background: var(--hover); color: var(--text); }
.theme-options button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); color: var(--accent); }
.theme-options svg { width: 15px; height: 15px; }
.wallpaper-preview { background: var(--chrome); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.preview-toolbar { display: flex; gap: 7px; align-items: center; padding: 5px 8px; color: var(--muted); }
.preview-toolbar svg { width: 12px; height: 12px; }
.preview-toolbar > :last-child { flex: 1; height: 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--input); }
.preview-image { display: block; width: 100%; aspect-ratio: 2.15; object-fit: cover; background: #142620; }
[data-wallpaper="admin-wallpaper"] .preview-image { object-position: center 35%; }
.wallpaper-library { margin-top: 16px; }
.wallpaper-library h4 { margin: 0 0 6px; font-size: 12px; }
.wallpaper-library .wallpaper-options { grid-template-columns: repeat(auto-fill, minmax(min(100%, 96px), 1fr)); }
.wallpaper-options .cover-thumbnail { aspect-ratio: 1.7; }
.wallpaper-status { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.setting-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.setting-actions .upload { color: var(--accent); background: var(--selected); }
.upload { position: relative; }
.upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload:has(input:disabled) { opacity: .55; }
.empty { grid-column: 1 / -1; margin: 0; padding: 15px 20px; font-size: 13px; }
.web-surface { background: var(--panel); }
.page-error { display: grid; align-content: center; justify-items: center; text-align: center; padding: 20px; }
.page-error > span { color: var(--accent); }
.page-error > span svg { width: 36px; height: 36px; }
.page-error h2 { margin: 14px 0 0; }
.page-error p { color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); width: min(calc(100% - 26px), 430px); padding: 23px; box-shadow: 0 20px 60px var(--shadow); }
dialog::backdrop { background: #07120eb3; }
dialog h2 { margin: 0 0 15px; font-size: 22px; overflow-wrap: anywhere; }
dialog p { color: var(--muted); font-size: 13px; }
dialog label { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; }
dialog input, dialog textarea { width: 100%; border-radius: 7px; background: var(--input); border: 1px solid var(--line); color: var(--text); }
dialog input { height: 38px; padding: 0 9px; }
dialog textarea { padding: 8px 9px; resize: vertical; }
#category-icon-settings { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 0; }
#category-icon-settings legend { padding-inline: 4px; font-size: 13px; }
.category-icon-choice { display: flex; align-items: end; gap: 10px; }
.category-icon-choice label { flex: 1; min-width: 0; margin: 0; }
#category-icon-preview { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--selected); color: var(--accent); }
#category-icon-preview > * { width: 24px; height: 24px; }
#category-icon { min-width: 0; height: 38px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--input); color: var(--text); font: inherit; }
#category-icon-file { height: auto; padding: 0; font-size: 12px; }
#category-icon-file::file-selector-button { margin-right: 8px; padding: 7px 10px; color: var(--text); background: var(--selected); border: 0; cursor: pointer; }
dialog:has(#cover-library:not([hidden])) { width: min(calc(100% - 26px), 550px); max-height: calc(100% - 32px); }
#cover-library { margin: 16px 0 0; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
#cover-library legend { padding: 0 5px; font-size: 13px; font-weight: 650; }
.cover-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 67px), 1fr)); gap: 6px; padding: 3px; max-height: 226px; overflow: auto; }
.cover-option { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 3px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.cover-option:hover, .cover-option[aria-pressed="true"] { border-color: var(--accent); background: var(--selected); color: var(--text); }
.cover-option[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--accent); }
.uploaded-cover { position: relative; min-width: 0; }
.uploaded-cover .cover-option { width: 100%; height: 100%; }
.uploaded-cover .icon-button { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; background: #131a19e6; color: #fff; }
.uploaded-cover .icon-button:hover { background: #a52f2f; color: #fff; }
.uploaded-cover .icon-button svg { width: 14px; height: 14px; }
.cover-thumbnail { display: block; aspect-ratio: 1; width: 100%; border-radius: 4px; object-fit: cover; }
.cover-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 10px; line-height: 1.25; }
.cover-upload { display: grid; gap: 6px; }
.cover-upload label { margin: 0; }
#cover-file { height: auto; min-width: 0; padding: 0; font-size: 12px; }
#cover-file::file-selector-button { margin-right: 8px; padding: 7px 10px; color: var(--text); background: var(--selected); border: 0; cursor: pointer; }
#cover-file:disabled { opacity: .65; }
.cover-upload small { color: var(--muted); font-size: 11px; }
#cover-status, #cover-empty { margin: 8px 0 0; font-size: 12px; overflow-wrap: anywhere; }
#cover-options, #included-covers { margin-top: 8px; }
#included-covers summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.danger { background: #b74444; color: white; }
.form-error { color: #f38c8c; }
.toast { position: fixed; z-index: 5; bottom: 22px; right: 22px; border-radius: 10px; padding: 13px 17px; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 28px var(--shadow); font-size: 13px; }
@container (min-width: 600px) {
  .appearance-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-heading { grid-column: 1 / -1; }
  .appearance-card > [data-wallpaper="admin-wallpaper"] { border-inline-start: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .workspace { --sidebar-width: min(242px, 42vw); }
  .start-inner { width: calc(100% - 36px); padding-top: 40px; }
  .hero-symbol { margin-bottom: 14px; }
  .admin-inner { width: calc(100% - 32px); padding-top: 24px; }
}
@media (max-width: 450px) {
  .private-label { display: none; }
  .tabstrip { padding-right: 8px; }
  .link-grid, .admin-link-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .card-heading, .setting { padding-inline: 12px; }
  #categories { padding: 8px; }
  .card-heading { gap: 7px; }
  .card-heading h2 { font-size: 14px; }
  .card-heading .card-icon { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
