/* ══ Liquid Glass look ═══════════════════════════════════
   Content is the bottom layer and is never on glass. Three glass pieces float above it:
   the toolbar, the event sidebar and the ages dock. Refraction is added by js/liquid.js
   where the browser can do it; the rules here are the frosted fallback plus the lit rim. */
:root[data-look="liquid"] {
  --ground: #0b0c10;
  --panel: rgba(26, 28, 36, .34);
  --panel-solid: #1b1d25;
  --raise: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .14);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, .7);
  --accent: #ffd27a;
  --on-accent: #1b1404;
  --sel: rgba(255, 255, 255, .18);
  --blur: blur(18px) saturate(170%);
  --edge: 1px solid rgba(255, 255, 255, .14);
  --sheen: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -1px 0 rgba(255, 255, 255, .1), inset 0 0 22px rgba(255, 255, 255, .05), 0 10px 34px rgba(0, 0, 0, .3);
  --gap: 10px;
  --r: 26px;
  --r-s: 999px;
  --side-w: clamp(300px, 32vw, 400px);
  --top-h: 54px;
  --dock-h: 104px;
  color-scheme: dark;
}
:root[data-look="liquid"] .backdrop { display: block; }
:root[data-look="liquid"] .backdrop div:not(.none) { filter: blur(40px) saturate(1.3) brightness(.62); }
/* the dimming layer the guidelines ask for when glass sits over media */
:root[data-look="liquid"] .backdrop::after { background: rgba(8, 9, 13, .35); }

/* lit rim on the two bars: bright where light strikes, top-left and bottom-right */
:root[data-look="liquid"] .top, :root[data-look="liquid"] .band { border-color: transparent; }
:root[data-look="liquid"] .top::before, :root[data-look="liquid"] .band::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .1) 28%, rgba(255, 255, 255, .04) 64%, rgba(255, 255, 255, .46));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* a large piece reads as thicker glass: more tint, more frost */
:root[data-look="liquid"] .list { --panel: rgba(20, 22, 29, .5); --blur: blur(30px) saturate(170%); }

/* controls on the glass: capsules, concentric with their bar */
:root[data-look="liquid"] .top { padding: 8px 10px 8px 20px; }
:root[data-look="liquid"] .search, :root[data-look="liquid"] .seg, :root[data-look="liquid"] .look select { background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
:root[data-look="liquid"] .search { height: 36px; padding: 0 14px; flex: 1 1 140px; min-width: 140px; }
:root[data-look="liquid"] .top { gap: 8px 14px; }
:root[data-look="liquid"] .tools { gap: 6px 10px; }
:root[data-look="liquid"] .seg { padding: 3px; }
:root[data-look="liquid"] .seg button { padding: 5px 13px; }
:root[data-look="liquid"] .seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .26); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 5px rgba(0, 0, 0, .25); }
:root[data-look="liquid"] .look select { padding: 6px 12px; }
:root[data-look="liquid"] .link { padding: 5px 4px; }
:root[data-look="liquid"] .ribbon { border-bottom: 0; padding: 5px 5px 0; gap: 2px; }
:root[data-look="liquid"] .era { border-left: 0; border-radius: 18px; padding: 7px 10px 0; overflow: hidden; }
:root[data-look="liquid"] .era[aria-current="true"] { background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34); }
:root[data-look="liquid"] .chips { padding: 6px 10px 8px; }
:root[data-look="liquid"] .chip { padding: 3px 11px; }
:root[data-look="liquid"] .chip[aria-pressed="true"] { background: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
:root[data-look="liquid"] .row { border-radius: 16px; padding: 8px 12px; width: calc(100% - 16px); margin: 1px 8px; }
:root[data-look="liquid"] .row[aria-current="true"] { background: rgba(255, 255, 255, .17); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
:root[data-look="liquid"] .era-head { background: rgba(30, 32, 41, .82); padding: 14px 20px 7px; }
:root[data-look="liquid"] .pic .frame { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 50px rgba(0, 0, 0, .45); }
:root[data-look="liquid"] .list, :root[data-look="liquid"] .detail { scrollbar-color: rgba(255, 255, 255, .25) transparent; }

/* gel-like response to a press */
:root[data-look="liquid"] :is(.seg button, .chip, .row, .era, .link, .pn button) { transition: transform .28s cubic-bezier(.3, 1.7, .5, 1), background-color .18s; }
:root[data-look="liquid"] :is(.seg button, .chip, .link):active { transform: scale(.93); }
:root[data-look="liquid"] :is(.row, .era, .pn button):active { transform: scale(.975); }

/* dialogs materialise: they grow and sharpen into place */
:root[data-look="liquid"] dialog {
  background: rgba(28, 30, 39, .72); border-color: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(44px) saturate(180%); backdrop-filter: blur(44px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 30px 90px rgba(0, 0, 0, .55);
}
:root[data-look="liquid"] dialog[open] { animation: materialise .34s cubic-bezier(.2, .9, .3, 1.12); }
:root[data-look="liquid"] dialog::backdrop { background: rgba(6, 7, 12, .35); }
@keyframes materialise { from { opacity: 0; transform: scale(.93); filter: blur(10px); } }

/* floating layout: content runs edge to edge underneath the glass */
@media (min-width: 861px) {
  :root[data-look="liquid"] body { padding: 0; display: block; position: relative; }
  :root[data-look="liquid"] main { position: absolute; inset: 0; display: block; }
  :root[data-look="liquid"] .top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 6; }
  :root[data-look="liquid"] .list { position: absolute; left: 10px; top: calc(var(--top-h) + 20px); bottom: 10px; width: var(--side-w); z-index: 5; }
  :root[data-look="liquid"] .band { position: absolute; bottom: 10px; left: calc(var(--side-w) + 20px); right: 10px; z-index: 6; }
  :root[data-look="liquid"] .detail {
    position: absolute; inset: 0; z-index: 1;
    background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    padding: calc(var(--top-h) + 46px) clamp(20px, 4vw, 56px) calc(var(--dock-h) + 46px) calc(var(--side-w) + 20px + clamp(20px, 4vw, 56px));
    /* scroll edge effect: content thins out where it passes under the bars */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), #000 calc(var(--top-h) + 44px), #000 calc(100% - var(--dock-h) - 44px), rgba(0, 0, 0, .5));
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), #000 calc(var(--top-h) + 44px), #000 calc(100% - var(--dock-h) - 44px), rgba(0, 0, 0, .5));
  }
}
@media (max-width: 860px) {
  :root[data-look="liquid"] body { padding: 8px; gap: 8px; }
  :root[data-look="liquid"] .top { position: sticky; top: 8px; z-index: 6; padding: 8px 12px; }
  :root[data-look="liquid"] .list { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root[data-look="liquid"] .era-head { border-radius: 14px; border-bottom: 0; top: calc(var(--top-h) + 14px); }
  :root[data-look="liquid"] .detail { background: rgba(20, 22, 29, .93); border-radius: 0; }
}

/* people who asked for less transparency, more contrast or less motion */
/* Reduced transparency: choosing this look is an explicit opt-in, so the glass stays,
   but it carries a heavier tint so text never depends on what is behind it. Indigo and Stone are the solid looks. */
@media (prefers-reduced-transparency: reduce) {
  :root[data-look="liquid"] { --panel: rgba(22, 24, 31, .52); }
  :root[data-look="liquid"] .list { --panel: rgba(20, 22, 29, .64); }
}
@media (prefers-contrast: more) {
  :root[data-look="liquid"] .panel, :root[data-look="liquid"] dialog { border: 2px solid rgba(255, 255, 255, .7); background: var(--panel-solid); }
  :root[data-look="liquid"] { --muted: rgba(245, 245, 247, .9); }
}
@media (prefers-reduced-motion: reduce) {
  :root[data-look="liquid"] dialog[open] { animation: none; }
  :root[data-look="liquid"] :is(.seg button, .chip, .row, .era, .link, .pn button) { transition: none; }
  :root[data-look="liquid"] :is(.seg button, .chip, .row, .era, .link, .pn button):active { transform: none; }
}
