/* LockIt.wtf: one stylesheet, no framework, system fonts. */
:root {
  --bg: #09090b;
  --surface: #131316;
  --surface-2: #1b1b20;
  --line: #2a2a31;
  --line-soft: #1f1f25;
  --text: #f5f5f6;
  --muted: #9b9ba6;
  --dim: #6b6b75;
  --lime: #c8ff3d;
  --lime-ink: #0b0f00;
  --lime-text: #c8ff3d;   /* lime as text/icon colour: darkened on light backgrounds */
  --green: #22e57a;
  --green-text: #8ff7bd;
  --cell: #17171c;
  --cell-line: rgb(255 255 255 / .04);
  --danger: #ff5c7a;
  --logo-tile: transparent;  /* light theme puts a dark tile behind the lime lock */
  --radius: 18px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* Light theme: automatic via prefers-color-scheme, or pinned with data-theme (see shared.js). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f1; --surface: #ffffff; --surface-2: #eef0e9; --line: #d8dbd2; --line-soft: #e6e8e1;
    --text: #121214; --muted: #5b5e66; --dim: #8a8d95; --lime-text: #4f6e00; --green: #1cc268; --green-text: #0d7a3e;
    --cell: #e3e6dd; --cell-line: rgb(0 0 0 / .05); --danger: #d8234a; --logo-tile: #121214; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f1; --surface: #ffffff; --surface-2: #eef0e9; --line: #d8dbd2; --line-soft: #e6e8e1;
  --text: #121214; --muted: #5b5e66; --dim: #8a8d95; --lime-text: #4f6e00; --green: #1cc268; --green-text: #0d7a3e;
  --cell: #e3e6dd; --cell-line: rgb(0 0 0 / .05); --danger: #d8234a; --logo-tile: #121214; color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgb(200 255 61 / .07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgb(34 229 122 / .06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- icons (Lucide sprite, injected by shared.js) ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ic-lime { color: var(--lime-text); }
.ic-green { color: var(--green-text); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header / brand ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; font-size: 19px; letter-spacing: -.03em; text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.logo svg .tile { fill: var(--logo-tile); }
.logo b { color: var(--lime-text); font-weight: 850; white-space: nowrap; }
.logo b .q { color: var(--muted); font-weight: 700; }
.logo b .k { color: var(--lime-text); }
.logo b.typing::after, .typed.typing::after { content: ""; display: inline-block; width: 2px; height: .85em; margin-left: 2px; vertical-align: -.08em; background: var(--lime-text); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* generic typed text: initials lime, the rest in the surrounding colour */
.typed .k, .af { color: var(--lime-text); }
.ctrls { display: flex; align-items: center; gap: 8px; flex: none; }
.seg-xs { padding: 2px; gap: 2px; }
.seg-xs button { height: 30px; padding: 0 9px; font-size: 12px; letter-spacing: .04em; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.05; }
.hero { padding: 28px 0 22px; }
.hero h1 { font-size: clamp(44px, 9vw, 92px); font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--lime-text); }
.hero p { margin: 18px 0 0; max-width: 540px; color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); }
.kicker { display: inline-block; margin-bottom: 16px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.card h2 .ic { width: 20px; height: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 8px; background: var(--surface-2); font: 700 13px/1 var(--mono); color: var(--lime-text); vertical-align: 3px; }

/* ---------- forms ---------- */
label.field { display: block; }
label.field > span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.input, select.input {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  font-size: 17px; transition: border-color .15s;
}
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d95' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 14px center;
}
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: var(--lime); }
.row { display: grid; gap: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none;
  transition: transform .08s, background .15s, border-color .15s;
}
.btn:hover { border-color: #3a3a44; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { background: #d6ff6b; border-color: #d6ff6b; }
.btn-big { height: 60px; width: 100%; font-size: 18px; font-weight: 850; letter-spacing: -.01em; border-radius: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip:hover { color: var(--text); }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.seg button { height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.seg button[aria-pressed="true"] .ic { color: var(--lime-text); }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { border-color: var(--lime); color: var(--lime-text); }
.detail strong { display: inline-flex; align-items: center; gap: 6px; }

.error { margin: 10px 0 0; color: var(--danger); font-size: 14px; font-weight: 600; min-height: 1em; }

/* ---------- create: calendar ---------- */
.create { display: grid; grid-template-columns: 1fr; gap: 16px; padding-bottom: 48px; }
.create .card { margin-top: 0; } /* the grid gap spaces them; no stacked-card margin */
@media (min-width: 900px) { .create { grid-template-columns: 1fr 1fr; align-items: start; } }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-size: 17px; }
.cal-nav { display: flex; gap: 6px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cal .dow { padding: 4px 0; text-align: center; font: 600 11px/1 var(--mono); color: var(--dim); text-transform: uppercase; }
.cal .d {
  aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 12px;
  background: var(--cell); font-weight: 650; font-size: 15px; transition: background .1s, color .1s;
}
.cal .d.today { box-shadow: inset 0 0 0 1px var(--dim); }
.cal .d.on { background: var(--lime); color: var(--lime-ink); }
.cal .d:disabled { background: transparent; color: var(--line); cursor: default; }
.cal .pad { visibility: hidden; }

.hours { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 600; color: var(--muted); }
.hours > span:first-child { flex: 1 0 100%; }
.hours .input { width: auto; flex: 1; height: 42px; padding: 0 36px 0 12px; font-size: 15px; background-position: right 10px center; background-size: 16px; }
@media (min-width: 520px) { .hours > span:first-child { flex: 0 0 auto; margin-right: 4px; } }

/* ---------- event layout ---------- */
.event-head { padding: 8px 0 18px; }
.event-head .title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-head .title-row h1 { flex: 1; min-width: 0; }
.event-head .title-row .btn { flex: none; margin-top: .35em; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.event-head h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 900; overflow-wrap: anywhere; border-radius: 10px; margin: 0 -6px; padding: 0 6px; }
.event-head h1[contenteditable] { cursor: text; }
.event-head h1[contenteditable]:hover { background: var(--surface-2); }
.event-head h1[contenteditable]:focus { outline: 2px solid var(--lime); outline-offset: 0; background: var(--surface-2); }
.event-head .meta { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.layout { display: grid; gap: 16px; padding-bottom: 64px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .layout { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
.side { display: grid; gap: 16px; }

.join { display: flex; gap: 10px; }
.join .input { flex: 1 1 auto; min-width: 0; }

/* ---------- locked banner ---------- */
.locked {
  position: relative; overflow: hidden; margin-bottom: 16px; padding: 22px;
  border-radius: var(--radius); background: var(--lime); color: var(--lime-ink);
}
.locked::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: rgb(255 255 255 / .25); filter: blur(30px); }
.locked .tag { display: inline-flex; align-items: center; gap: 6px; font: 800 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.locked .tag .ic { width: 14px; height: 14px; }
.locked h2 { margin-top: 10px; font-size: clamp(26px, 5vw, 40px); font-weight: 900; }
.locked p { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-weight: 650; }
.locked p.soft { opacity: .6; }
.locked .actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.locked .btn { background: var(--lime-ink); border-color: var(--lime-ink); color: var(--lime); }
.locked .btn-ghost { background: transparent; color: var(--lime-ink); border-color: rgb(0 0 0 / .25); }

/* ---------- heatmap grid ---------- */
.grid-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; overscroll-behavior-x: contain; }
.grid {
  --cols: 7; --row: 22px; --col: 46px;
  display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(var(--col), 1fr));
  user-select: none; -webkit-user-select: none; min-width: max-content;
  touch-action: manipulation; /* swipes scroll; JS blocks scrolling only once a hold has started painting */
}
@media (pointer: coarse) { .grid { --row: 28px; --col: 58px; } }
.grid.zoom { --row: 40px; --col: 88px; }
.grid.painting { cursor: crosshair; }
.grid .day { position: sticky; top: 0; z-index: 2; padding: 6px 2px 8px; text-align: center; background: var(--surface); line-height: 1.15; }
.grid .day b { display: block; font-size: 11px; font-family: var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.grid .day span { font-weight: 800; font-size: 16px; }
.grid .t { position: sticky; left: -20px; z-index: 3; padding-right: 8px; background: var(--surface); text-align: right; font: 500 11px/1 var(--mono); color: var(--dim); transform: translateY(-6px); white-space: nowrap; }
.grid .c {
  --h: 0;
  height: var(--row); margin: 0 1px;
  background: color-mix(in oklab, var(--green) calc(var(--h) * 100%), var(--cell));
  border-top: 1px dashed var(--cell-line);
}
.grid .c.hr { border-top: 1px solid var(--line); }
.grid .c.first { border-radius: 8px 8px 0 0; }
.grid .c.last { border-radius: 0 0 8px 8px; }
.grid .c.all { background: var(--green); box-shadow: 0 0 14px rgb(34 229 122 / .45); position: relative; z-index: 0; }
.grid .c.pick { outline: 2px solid var(--text); outline-offset: -2px; position: relative; z-index: 1; }
.grid .c.lockd { background: var(--lime) !important; box-shadow: 0 0 18px rgb(200 255 61 / .5); }
.grid.edit .c { background: var(--cell); box-shadow: none; }
.grid.edit .c.mine { background: var(--lime); }
.grid.edit .c.mine.hr { border-top-color: rgb(0 0 0 / .2); }

/* Busy AF: slots your calendar says you're busy in, hatched; still paintable if you know better */
.grid.edit .c.busy { background-image: repeating-linear-gradient(135deg, rgb(0 0 0 / .28) 0 3px, transparent 3px 7px); }
.grid.edit .c.busy:not(.mine) { background-color: color-mix(in oklab, var(--danger) 22%, var(--cell)); }
.busy-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, var(--danger) 12%, var(--surface-2)); font-size: 14px; font-weight: 600; }
.busy-bar .grow { flex: 1; min-width: 0; }
.busy-bar .swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; background: color-mix(in oklab, var(--danger) 22%, var(--cell)); background-image: repeating-linear-gradient(135deg, rgb(0 0 0 / .28) 0 2px, transparent 2px 5px); }
.cal-opts { display: grid; gap: 8px; margin-top: 14px; }
.cal-opts .btn { justify-content: flex-start; height: 48px; }
.cal-opts .btn .tail { margin-left: auto; color: var(--dim); }
.file { position: relative; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--lime); }
.busy-dlg .how { display: grid; gap: 5px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }

.legend { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend .bar { flex: 0 1 160px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--cell), var(--green)); }

.detail { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; min-height: 52px; }
.detail strong { font-size: 15px; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.who span { padding: 3px 9px; border-radius: 99px; background: color-mix(in oklab, var(--green) 18%, transparent); color: var(--green-text); font-weight: 600; font-size: 13px; }
.who span.no { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); text-decoration: line-through; }

.hint { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.hint b { color: var(--lime-text); }

/* ---------- best times ---------- */
.best { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.best li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.best .score { flex: none; display: grid; place-items: center; min-width: 52px; height: 38px; padding: 0 8px; border-radius: 10px; background: color-mix(in oklab, var(--green) 16%, transparent); color: var(--green-text); font: 800 15px/1 var(--mono); }
.best .score.full { background: var(--green); color: #00150a; }
.best .when { flex: 1; min-width: 0; font-weight: 700; line-height: 1.25; }
.best .when small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 14px; border: 1px dashed var(--line); border-radius: 14px; color: var(--dim); font-size: 14px; text-align: center; }

/* ---------- ideas ---------- */
.add-idea { display: grid; gap: 10px; margin-bottom: 14px; }
.add-idea .line { display: flex; gap: 8px; }
.add-idea .input { height: 46px; font-size: 16px; }
.ideas { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.idea { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--surface-2); }
.idea .body { flex: 1; min-width: 0; }
.idea .txt { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.idea .sub { margin-top: 3px; font-size: 12px; color: var(--dim); }
.idea .kind { font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.idea.top { box-shadow: inset 0 0 0 1px rgb(200 255 61 / .35); }
.vote {
  flex: none; display: grid; justify-items: center; gap: 1px; width: 52px; padding: 7px 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  font: 800 15px/1 var(--mono); transition: transform .08s;
}
.vote .ic { width: 14px; height: 14px; color: var(--dim); }
.vote[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.vote[aria-pressed="true"] .ic { color: var(--lime-ink); }
.vote:active { transform: scale(.92); }
.x { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); }
.x .ic { width: 16px; height: 16px; }
.x:hover { color: var(--danger); }
.idea .sub { display: flex; align-items: center; gap: 5px; }
.idea .sub .ic { width: 13px; height: 13px; }

/* ---------- people ---------- */
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 5px; border-radius: 99px; background: var(--surface-2); font-size: 14px; font-weight: 650; }
.person i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; font: 800 11px/1 var(--sans); font-style: normal; color: #000; }
.person.idle { color: var(--dim); }
.person .ic { width: 14px; height: 14px; color: var(--lime-text); }
.person.me { box-shadow: inset 0 0 0 1px var(--lime); }

/* ---------- dialog / toast ---------- */
dialog {
  width: min(460px, 100% - 32px); padding: 22px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgb(0 0 0 / .65); backdrop-filter: blur(4px); }
dialog h2 { font-size: 26px; font-weight: 900; }
dialog .big-when { margin: 14px 0; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: 18px; font-weight: 800; }
dialog .actions { display: flex; gap: 8px; margin-top: 18px; }
dialog .actions .btn { flex: 1; }

.tip {
  position: fixed; z-index: 45; max-width: min(260px, 100vw - 32px); padding: 8px 11px;
  border-radius: 11px; background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.35;
  box-shadow: 0 8px 24px rgb(0 0 0 / .35); pointer-events: none;
}
.tip b { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.tip .names { display: block; margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.tip .names.none { opacity: .55; font-weight: 500; }
.tip.act { pointer-events: auto; }
.tip .btn { margin-top: 8px; width: 100%; height: 34px; }
.tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--text); }
.tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text); }
.tip.pop { max-width: min(300px, 100vw - 32px); font-weight: 500; pointer-events: auto; }
.tip.pop::after { left: var(--arrow-x, 50%); top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text); }
.check-row { display: flex; align-items: center; gap: 4px; }
.info { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--dim); }
.info:hover { color: var(--text); background: var(--surface-2); }
.info .ic { width: 17px; height: 17px; }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50;
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700;
  transform: translate(-50%, 20px); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }


footer { padding: 28px 0 40px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 13px; }
footer p { margin: 0; max-width: 620px; }
footer p + p { margin-top: 10px; }
footer .ua { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
footer .ua a { color: var(--muted); font-weight: 600; text-decoration-color: var(--line); text-underline-offset: 3px; }
footer .ua a:hover { color: var(--text); }
.flag { flex: none; width: 18px; height: 12px; border-radius: 3px; background: linear-gradient(#0057b7 50%, #ffd700 50%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }

@media (max-width: 520px) {
  /* header: everything on one row — dot-only "live", icon-only share, tighter switcher */
  .top { padding: 14px 0; gap: 8px; }
  .logo { font-size: 17px; gap: 7px; }
  .logo.phr .word { display: none; }
  .logo svg { width: 22px; height: 22px; }
  .ctrls { gap: 6px; }
  .seg-xs button { height: 28px; padding: 0 7px; font-size: 11px; }
  .locked h2 { overflow-wrap: anywhere; }
  .card { padding: 16px; border-radius: 16px; }
  .grid-scroll { margin: 0 -16px; padding: 0 16px 4px; }
  .grid .t { left: -16px; }
  .join { flex-direction: column; }
  .join .input { flex: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
