/* Caramund shell: presentation only; theme engine and feature gates unchanged. */
html body dialog#petal-menu {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 24px 16px 16px; border-radius: 28px;
  border: 1px solid var(--border-soft); background: var(--white);
  background: color-mix(in srgb, var(--white) 84%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgb(0 0 0 / .18); color: var(--ink);
}
html body dialog#petal-menu::backdrop { background: rgb(12 12 24 / .28); backdrop-filter: blur(4px); }
html body #petal-menu .petal-heading { background: transparent; padding: 0 8px 8px; margin: auto; }
html body #petal-menu .petal-wheel { width: min(360px, 100%); background: transparent; border: 0; box-shadow: none; }
html body #petal-menu .petal {
  width: 78px; min-height: 0; aspect-ratio: 1; border-radius: 50%;
  background: var(--white); color: var(--ink); border: 1px solid var(--border-soft);
  box-shadow: 0 8px 20px rgb(0 0 0 / .06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
html body #petal-menu .petal:hover { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 10px 24px rgb(0 0 0 / .12); }
html body #petal-menu .petal svg { width: 23px; height: 23px; stroke-width: 1.6; }
html body #petal-menu .petal-center { width: 58px; height: 58px; min-height: 0; border-radius: 50%; background: var(--white); color: var(--ink); border: 1px solid var(--border-soft); box-shadow: none; }
html body #petal-menu .petal-center span { font-size: 26px; line-height: 1; }
html body #petal-menu .petal-center small { font-size: 10px; }
html body #petal-menu .petal-shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px; border: 1px solid var(--border-soft); border-radius: 22px; background: var(--white); }
html body #petal-menu .petal-shortcuts a { flex: 0 1 auto !important; padding: 7px 10px; border: 0; border-radius: 999px; background: transparent !important; color: var(--ink) !important; font-size: 12px; box-shadow: none !important; }
html body #petal-menu .petal { font-size: 11px; }
html body #petal-menu .petal-shortcuts a:hover { background: color-mix(in srgb, var(--appearance-accent, var(--green)) 12%, var(--white)); }
html body :is(#petal-menu a, #petal-menu button, #theme-library button):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* Keep scrolling, without the sidebar's decorative scrollbar. */
html body #legacy-sidebar { scrollbar-width: none; }
html body #legacy-sidebar::-webkit-scrollbar { display: none; }
html body #legacy-sidebar .sidebar-item:is(.active, [aria-current="page"]) {
  background: var(--appearance-accent, var(--green)) !important;
  color: var(--appearance-onaccent, #fff) !important; box-shadow: none; border-radius: 10px;
}
html body #legacy-sidebar .sidebar-item:is(.active, [aria-current="page"]) :is(span, svg) {
  color: inherit !important;
}
html body .unified-navbar :is(.nav-center, .nav-right, .workspace-shortcuts) { gap: 8px; }
html body .unified-navbar .account-menu { margin-inline-start: 4px; padding-inline-start: 12px; border-inline-start: 1px solid currentColor; }
/* One document scroll. No fixed-height, independently scrolling columns. */
html body #theme-library { overflow: visible; scrollbar-gutter: auto; }
html body #theme-library .layout { height: auto; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 32px; }
html body #theme-library .layout > section { overflow: visible; height: auto; max-height: none; scrollbar-gutter: auto; }
html body #theme-library .preview { position: sticky; top: calc(var(--library-nav-height, 64px) + 16px); border: 1px solid var(--border-soft); border-radius: 20px; padding: 18px; box-shadow: 0 8px 30px rgb(0 0 0 / .04); }
html body #theme-library .previewhead { position: static; padding-top: 0; }
html body #theme-library .cards .card { position: relative; border-radius: 12px; border-color: color-mix(in srgb, var(--theme-card-ink) 18%, var(--theme-card-bg)) !important; transition: transform .2s ease, box-shadow .2s ease; }
html body #theme-library .cards .card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(0 0 0 / .08); }
html body #theme-library .cards .card[aria-pressed="true"] { outline-width: 2px; outline-offset: 3px; }
html body #theme-library .theme-active-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--theme-card-ink); animation: mund-badge-in .2s ease; }
@keyframes mund-badge-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) {
  html body #theme-library .layout { grid-template-columns: minmax(0, 1fr); }
  html body #theme-library .layout > section:first-child { grid-column: 1; grid-row: 1; }
  html body #theme-library .preview { grid-column: 1; grid-row: 2; position: static; }
}
@media (max-height: 800px) { html body #theme-library .preview { position: static; } }
@media (max-width: 400px) { html body #petal-menu .petal { width: 66px; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) {
  html body #petal-menu .petal, html body #theme-library .card { transition: none; }
  html body #theme-library .theme-active-badge { animation: none; }
}
@media (forced-colors: active) { html body #petal-menu .petal, html body #theme-library .card { border: 1px solid ButtonText !important; } }
