/* Teal Stripes Vibes. Written by hand; the per-vibe styles (the ground, the field, the drift) come from vibeCss in src/vibe.js. */
:root { color-scheme: dark; --ink: #f4fbfa; --muted: rgba(244, 251, 250, 0.72); --glass: rgba(4, 14, 16, 0.62); --line: rgba(230, 255, 251, 0.22); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #0b3b3a; color: var(--ink); font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, sans-serif; overflow: hidden; }
.field { position: fixed; inset: 0; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; }
:root[data-gl="on"] #gl { opacity: 1; }
.card { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(22rem, calc(100vw - 32px)); padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }
.card h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.1; }
.card .mood { margin: 2px 0 10px; color: var(--muted); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card .stamp { font-weight: 700; letter-spacing: 0.12em; }
.card[data-stamp-large] .stamp { position: fixed; inset: 0; display: grid; place-items: center; font-size: clamp(4rem, 22vw, 14rem); background: rgba(2, 8, 10, 0.72); letter-spacing: 0.08em; }
.card .expr { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font: 11.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.card nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.card a { color: var(--ink); text-underline-offset: 3px; }
.card a:focus-visible, summary:focus-visible, #keep-app:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.status { margin: 8px 0 0; font-size: 13px; color: var(--ink); }
details { margin-top: 8px; font-size: 13px; }
summary { cursor: pointer; color: var(--muted); min-height: 24px; }
details ul { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 2px 10px; }
details li code { margin-right: 4px; }
details li.off { opacity: 0.45; }
details p { margin: 6px 0 0; color: var(--muted); font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.keep { margin: 8px 0 0; }
#keep-app { font: 600 13px/1 ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 44px; cursor: pointer; }
.closed { position: fixed; left: max(16px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top)); max-width: min(28rem, calc(100vw - 32px)); padding: 12px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.closed h2 { margin: 0 0 4px; font-size: 1rem; }
.closed p { margin: 0; color: var(--muted); }
@media (max-width: 30rem) { .card { left: 16px; right: 16px; width: auto; } }

/* The card fades when the hand is still, so the stripes can be taken alone; h holds it hidden. */
.card { transition: opacity 0.7s ease, transform 0.7s ease; }
:root[data-ui="asleep"] .card, :root[data-ui="held"] .card { opacity: 0; transform: translateY(10px); pointer-events: none; }
:root[data-ui="asleep"] body, :root[data-ui="held"] body { cursor: none; }
.caption { margin: 8px 0 0; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tune { margin-top: 8px; }
.tune-grid { display: grid; gap: 4px 10px; margin: 8px 0; }
.tune-grid label { display: grid; grid-template-columns: 3.4rem 1fr 2.6rem; align-items: center; gap: 8px; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.tune-grid input[type="range"] { width: 100%; min-height: 28px; accent-color: #5eead4; }
.tune-grid output { color: var(--ink); text-align: right; }
.tune-ways, .share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; }
.share > span { color: var(--muted); margin-right: 2px; }
.tune-ways button, .share button { font: 600 12.5px/1 ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; min-height: 36px; cursor: pointer; }
.tune-ways button[aria-pressed="true"] { background: var(--ink); color: #062a2b; border-color: var(--ink); }
.tune-ways button:focus-visible, .share button:focus-visible, .tune input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (pointer: coarse) { .tune-ways button, .share button { min-height: 44px; } }
.say { display: grid; grid-template-columns: 3.4rem 1fr; align-items: center; gap: 8px; margin-top: 8px; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.say input { font: 14px/1.2 ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.card { max-height: calc(100vh - 32px); overflow: auto; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* The expression's parts are handles: hold one, scan its choices, keep it or let it go. */
.expr .slot { font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 0 1px; cursor: pointer; border-radius: 3px; }
.expr .slot:hover { background: rgba(255, 255, 255, 0.08); }
.expr .slot[aria-pressed="true"] { background: var(--ink); color: #062a2b; border-bottom-color: transparent; }
.expr .slot:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.held { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.22); font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.held-name { color: var(--muted); }
.held output { color: var(--ink); min-width: 4ch; overflow-wrap: anywhere; }
.held-count { color: var(--muted); margin-right: auto; }
.held button { font: 600 12.5px/1 ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 0 11px; min-height: 34px; cursor: pointer; }
.held #held-keep { background: var(--ink); color: #062a2b; border-color: var(--ink); }
@media (pointer: coarse) { .held button { min-height: 44px; } .expr .slot { padding: 4px 2px; } }

/* What the lock holds, as mutex.buzz says it. */
.lock { margin: 8px 0 0; padding: 6px 8px; border-left: 2px solid #f5b041; background: rgba(0, 0, 0, 0.2); font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.lock a { color: var(--ink); }

/* The set's ring fades with the card, so a screenshot takes the stripes alone. */
.set-ring { transition: opacity 0.7s ease; }
:root[data-ui="asleep"] .set-ring:not(.open), :root[data-ui="held"] .set-ring { opacity: 0; pointer-events: none; }

/* The shader keeps its fade as it takes the set's pinch (pinch.css). */
#gl.pinchable { transition: opacity 0.6s ease, scale 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
#gl.pinchable[data-pinching] { transition: opacity 0.6s ease; }

/* The mask as six chips: lit, the facet comes from the seed; dim, the teal ground stands in. Each is a link to the address with it switched. */
.facet-row { display: flex; flex-wrap: wrap; gap: 4px; }
.card .facet { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20, 184, 166, 0.12); color: var(--muted); font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
.card .facet.on { background: var(--ink); border-color: var(--ink); color: #062a2b; }
.card .facet:hover { border-color: var(--ink); }
.facet-letter { font-weight: 700; opacity: 0.6; }
@media (pointer: coarse) { .card .facet { min-height: 44px; } }
