/* Raincord site. Every colour, size and timing comes from the tokens below. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2"); }

:root {
  /* the night sky behind the logo */
  --bg: #05070e;
  --bg-2: #080b16;
  --surface: #0c1120;
  --surface-2: #121a2d;
  --line: #1a2338;
  --line-strong: #27324b;
  --hover: rgba(160, 190, 255, 0.06);
  --text: #e9eef8;
  --text-2: #9ba8c0;
  --text-3: #7f8ba3;
  --shadow: 0 30px 80px rgba(0, 4, 20, 0.6), 0 0 0 1px var(--line);
  --glow: rgba(47, 123, 255, 0.22);


  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Poppins", var(--font);
  --fs-xs: 0.8125rem; --fs-sm: 0.875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.75rem, 3.2vw, 2.25rem); --fs-3xl: clamp(2.25rem, 5vw, 3.25rem); --fs-4xl: clamp(2.75rem, 7vw, 4.75rem);
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 5rem; --s9: 7rem;
  --ctl: 2.5rem; --ctl-lg: 3rem;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 140ms;
}
:root[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #eef2f9;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --line: #dfe5f0;
  --line-strong: #c9d2e2;
  --hover: rgba(20, 40, 90, 0.05);
  --text: #0b1120;
  --text-2: #4c5870;
  --text-3: #5f6b83;
  --shadow: 0 30px 70px rgba(20, 40, 90, 0.16), 0 0 0 1px var(--line);
  --glow: rgba(47, 123, 255, 0.14);
}

/* the accent: one at a time, picked on the Themes page */
:root, :root[data-accent="rain"] { --accent: #2f7bff; --accent-hover: #4b8dff; --accent-soft: rgba(47, 123, 255, 0.14); --on-accent: #fff; }
:root[data-accent="violet"] { --accent: #8b6cff; --accent-hover: #9d83ff; --accent-soft: rgba(139, 108, 255, 0.14); --on-accent: #fff; }
:root[data-accent="mint"] { --accent: #1fb487; --accent-hover: #2bc896; --accent-soft: rgba(31, 180, 135, 0.14); --on-accent: #fff; }
:root[data-accent="coral"] { --accent: #e5485f; --accent-hover: #ef5f74; --accent-soft: rgba(229, 72, 95, 0.14); --on-accent: #fff; }
:root[data-accent="amber"] { --accent: #e3a018; --accent-hover: #f0b234; --accent-soft: rgba(227, 160, 24, 0.16); --on-accent: #1a1204; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
body { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.65 var(--font); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
html, body { overflow-x: clip; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.wrap { width: min(var(--wide), 100%); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 99; padding: var(--s2) var(--s3); background: var(--surface); border-radius: var(--r-md); }
.ic { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
.section { padding-top: var(--s8); padding-bottom: var(--s8); }
.section-head { max-width: 36rem; margin-bottom: var(--s6); }
.section-head p { margin-top: var(--s3); color: var(--text-2); font-size: var(--fs-lg); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: var(--s5); height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font: 600 var(--fs-lg)/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; }
.brand img { border-radius: 8px; }
.links { display: flex; gap: var(--s1); }
.links a { padding: var(--s2) var(--s3); border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; transition: color var(--fast) var(--ease), background var(--fast) var(--ease); }
.links a:hover { color: var(--text); background: var(--hover); }
.links a[aria-current="page"] { color: var(--text); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.icon-btn.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--ctl); padding: 0 var(--s4); border: 1px solid transparent; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn-lg { height: var(--ctl-lg); padding: 0 var(--s5); font-size: var(--fs-md); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -8px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { background: var(--hover); border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn.is-soon { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.is-soon:active { transform: none; }
.btn-primary.is-soon:hover { background: var(--accent); }
.btn-ghost.is-soon:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); border-color: var(--line-strong); }
.icon-btn { display: grid; place-items: center; width: var(--ctl); height: var(--ctl); border: 0; border-radius: var(--r-md); background: none; color: var(--text-2); cursor: pointer; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ic { width: 1.25rem; height: 1.25rem; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: var(--s1) var(--s2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-size: var(--fs-xs); font-weight: 500; box-shadow: var(--shadow); pointer-events: none; animation: tip 0s 450ms both; }
@keyframes tip { from { visibility: hidden; } to { visibility: visible; } }
.arrow { transition: transform var(--fast) var(--ease); }

/* ---------- hero ---------- */
.hero-wrap { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero-wrap::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 18rem; width: 70rem; height: 40rem; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow), transparent); }
.hero { display: grid; justify-items: center; text-align: center; padding-top: var(--s9); }
.hero h1 { font-size: var(--fs-4xl); }
.lead { margin-top: var(--s5); max-width: 34rem; color: var(--text-2); font-size: var(--fs-lg); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s6); }
.fine { margin-top: var(--s4); color: var(--text-3); font-size: var(--fs-sm); }
.fine a { color: var(--text-2); }
.shot { width: 100%; margin-top: var(--s8); }
.hero-wrap .shot .app { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ---------- the app preview: a Yapin window running Raincord. It stays dark in both themes. ---------- */
.app { --a-bg: #0b0f1a; --a-rail: #070a12; --a-side: #090d17; --a-line: #19213a; --a-text: #e3e8f3; --a-text-2: #8d99b0; --a-text-3: #66728a; --a-hover: rgba(160, 190, 255, 0.06);
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-xl); background: var(--a-bg); color: var(--a-text); box-shadow: var(--shadow); overflow: hidden; text-align: left; font-size: var(--fs-sm); line-height: 1.5; }
.app-bar { display: flex; align-items: center; gap: 6px; height: 2.25rem; padding: 0 var(--s4); background: var(--a-rail); border-bottom: 1px solid var(--a-line); }
.app-bar > span { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--a-line); }
.app-bar b { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto; padding-right: 2.5rem; color: var(--a-text-2); font-size: var(--fs-xs); font-weight: 500; }
.app-bar b img { border-radius: 3px; }
.app-body { display: grid; grid-template-columns: 4.25rem 13.5rem minmax(0, 1fr) 16rem; min-height: 27rem; }

.rail { display: grid; align-content: start; justify-items: center; gap: var(--s2); padding: var(--s3) 0; background: var(--a-rail); }
.rail span { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: #141b2e; color: var(--a-text-2); font-weight: 600; font-size: var(--fs-xs); }
.rail span.on { border-radius: 14px; background: var(--accent); color: var(--on-accent); }
.rail span.on::before { content: ""; position: absolute; left: -0.75rem; width: 4px; height: 2.25rem; border-radius: 0 4px 4px 0; background: var(--a-text); }
.rail hr { width: 1.75rem; margin: var(--s1) 0; border: 0; border-top: 2px solid var(--a-line); }

.chans { display: flex; flex-direction: column; background: var(--a-side); border-right: 1px solid var(--a-line); }
.chans-head { display: flex; align-items: center; height: 3rem; padding: 0 var(--s4); border-bottom: 1px solid var(--a-line); font-weight: 600; }
.chans ul { list-style: none; display: grid; gap: 2px; padding: var(--s3) var(--s2); }
.chans li { display: flex; align-items: center; gap: var(--s2); padding: 0.35rem var(--s2); border-radius: var(--r-sm); color: var(--a-text-2); }
.chans li.on { background: var(--a-hover); color: var(--a-text); }
.chans li .ic { width: 1rem; height: 1rem; color: var(--a-text-3); }
.chans li.cat { padding-top: var(--s3); color: var(--a-text-3); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.me { display: flex; align-items: center; gap: var(--s2); margin-top: auto; padding: var(--s3); background: var(--a-rail); }
.me b { display: block; font-weight: 600; line-height: 1.2; }
.me small { color: var(--a-text-3); font-size: 0.6875rem; }

.convo { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.convo-head { display: flex; align-items: center; gap: var(--s2); height: 3rem; padding: 0 var(--s4); border-bottom: 1px solid var(--a-line); font-weight: 600; }
.convo-head .ic { color: var(--a-text-3); }
.convo-head small { min-width: 0; margin-left: var(--s2); padding-left: var(--s3); border-left: 1px solid var(--a-line); color: var(--a-text-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: grid; align-content: end; gap: 2px; padding: var(--s3) var(--s2); }
.msg { display: flex; gap: var(--s3); padding: var(--s2) var(--s3); border-left: 2px solid transparent; border-radius: 0 var(--r-md) var(--r-md) 0; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.msg > div { min-width: 0; }
.av { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: #fff; font-weight: 600; font-size: var(--fs-xs); }
.me .av { width: 2rem; height: 2rem; }
.av1 { background: #4f5fc4; } .av2 { background: #2a8a83; } .av3 { background: #b14d47; } .av4 { background: #7a5bc0; } .av5 { background: #2f6fd6; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.who b { font-weight: 600; }
.who time { color: var(--a-text-3); font-size: 0.6875rem; }
.msg p { overflow-wrap: anywhere; }
.msg p + p { margin-top: 2px; }
.tag { display: inline-flex; align-items: center; height: 1.15rem; padding: 0 0.45rem; border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-size: 0.6875rem; font-weight: 600; vertical-align: 1px; }
.tag-red { background: rgba(239, 111, 130, 0.14); color: #ef7a8a; }
.link { color: #6fa8ff; }
.composer { margin: 0 var(--s4) var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: #121a2c; color: var(--a-text-3); }

/* what each plugin changes in the chat */
.fx-deleted, .fx-translated, .fx-clean-tag, .fx-keyword .tag { display: none; }
.fx-deleted { color: #ef7a8a; text-decoration: line-through; }
.chat[data-logger] .fx-deleted { display: block; }
.chat[data-translate] .fx-translated { display: block; color: var(--a-text-2); }
.chat[data-keywords] .fx-keyword { background: var(--accent-soft); border-left-color: var(--accent); }
.chat[data-keywords] .fx-keyword .tag { display: inline-flex; }
.chat[data-clean] .fx-track { display: none; }
.chat[data-clean] .fx-clean-tag { display: inline-flex; }

.plugins-panel { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); background: var(--a-side); border-left: 1px solid var(--a-line); }
.plugins-panel h3 { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s3); font: 600 var(--fs-sm)/1.2 var(--font); letter-spacing: 0; }
.plugins-panel h3 img { border-radius: 4px; }
.row-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2); border-radius: var(--r-md); cursor: pointer; }
.row-switch:hover { background: var(--a-hover); }
.row-switch b { display: block; font-weight: 600; }
.row-switch small { display: block; color: var(--a-text-3); font-size: 0.75rem; line-height: 1.4; }
.plugins-panel .hint { margin-top: auto; padding: var(--s2); color: var(--a-text-3); font-size: 0.75rem; }

/* on/off switch (a real checkbox underneath) */
.switch { appearance: none; flex: none; width: 2.25rem; height: 1.3rem; border-radius: var(--r-full); background: #2a3348; position: relative; cursor: pointer; transition: background var(--fast) var(--ease); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.3rem - 4px); height: calc(1.3rem - 4px); border-radius: 50%; background: #fff; transition: transform var(--fast) var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(0.95rem); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.card-ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: var(--s2); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); }
.card p { color: var(--text-2); font-size: var(--fs-sm); }
.card .more { display: inline-flex; align-items: center; gap: var(--s1); margin-top: auto; padding-top: var(--s3); color: var(--accent); font-size: var(--fs-sm); font-weight: 600; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
a.card:hover .arrow { transform: translateX(3px); }

/* the two-up band near the bottom of the home page */
.duo-wrap { padding-top: 0; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.panel { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(160deg, var(--surface), var(--bg-2)); }
.panel p { color: var(--text-2); }
.panel .btn { margin-top: var(--s2); }

/* ---------- inner pages ---------- */
.page-head { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: var(--s8); padding-bottom: var(--s7); }
.page-head h1 { font-size: var(--fs-3xl); }
.page-head p { margin-top: var(--s4); max-width: 34rem; color: var(--text-2); font-size: var(--fs-lg); }

/* plugins */
.group + .group { margin-top: var(--s7); }
.group h2 { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-xl); margin-bottom: var(--s4); }
.group h2 .card-ic { margin: 0; width: 2.25rem; height: 2.25rem; }
.plist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.plist li { display: flex; gap: var(--s3); padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plist .ic { margin-top: 4px; color: var(--accent); }
.plist b { display: block; font-weight: 600; }
.plist span { color: var(--text-2); font-size: var(--fs-sm); }
.suggest-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s7); padding: var(--s5) var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(160deg, var(--surface), var(--bg-2)); }
.suggest-row h2 { font-size: var(--fs-xl); }
.suggest-row p { margin-top: var(--s1); color: var(--text-2); }

/* themes */
.theme-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5) var(--s7); align-items: end; }
.theme-grid .notes { margin-top: 0; }
.theme-shot { margin-top: var(--s6); }
.picker h2 { font-size: var(--fs-xl); }
.picker p { margin-top: var(--s2); color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.sw { display: grid; justify-items: center; gap: var(--s2); padding: 0; border: 0; background: none; color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.sw i { display: block; width: 3.25rem; height: 3.25rem; border-radius: var(--r-lg); transition: transform var(--fast) var(--ease); }
.sw:hover i { transform: translateY(-2px); }
.sw[aria-checked="true"] { color: var(--text); }
.sw[aria-checked="true"] i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.sw1 i { background: #2f7bff; } .sw2 i { background: #8b6cff; } .sw3 i { background: #1fb487; } .sw4 i { background: #e5485f; } .sw5 i { background: #e3a018; }
.notes { list-style: none; padding: 0; display: grid; gap: var(--s3); margin-top: var(--s6); }
.notes li { display: flex; gap: var(--s3); color: var(--text-2); }
.notes .ic { margin-top: 4px; color: var(--accent); }
.notes b { color: var(--text); font-weight: 600; }

/* open source */
.source-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(160deg, var(--surface), var(--bg-2)); }
.source-card .card-ic { margin: 0; width: 3rem; height: 3rem; }
.source-card p { margin-top: var(--s1); color: var(--text-2); }

/* questions */
.faq > * { max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 4rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px); transition: transform var(--fast) var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding-bottom: var(--s5); max-width: 40rem; color: var(--text-2); }
.faq a, .legal a { color: var(--accent); text-underline-offset: 3px; }
.faq-more { margin-top: var(--s7); }

/* terms and privacy */
.legal > * { max-width: 44rem; }
.legal .updated { color: var(--text-3); font-size: var(--fs-sm); }
.legal h2 { margin-top: var(--s7); margin-bottom: var(--s3); font-size: var(--fs-xl); }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: var(--s3); }
.legal ul { display: grid; gap: var(--s2); margin-top: var(--s3); padding-left: 1.25rem; }
.legal strong { color: var(--text); font-weight: 600; }

/* not found */
.lost { display: grid; justify-items: start; gap: var(--s4); padding-top: var(--s9); padding-bottom: var(--s9); }
.lost h1 { font-size: var(--fs-3xl); }
.lost p { color: var(--text-2); font-size: var(--fs-lg); }

/* ---------- suggest a plugin (dialog) ---------- */
.modal { width: min(32rem, calc(100vw - 2rem)); margin: auto; padding: var(--s6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(4px); }
.modal h2 { font-size: var(--fs-xl); }
.modal-sub { margin-top: var(--s2); color: var(--text-2); }
.modal label { display: block; margin-top: var(--s5); margin-bottom: var(--s2); font-weight: 600; font-size: var(--fs-sm); }
.modal .opt { color: var(--text-3); font-weight: 400; }
.modal textarea, .modal input { width: 100%; padding: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.modal textarea:focus, .modal input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.modal .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.5rem; margin-top: var(--s3); font-size: var(--fs-sm); color: var(--text-2); }
.form-msg[data-kind="error"] { color: #ef6f82; }
.form-msg[data-kind="ok"] { color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s2); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s6); padding-top: var(--s7); padding-bottom: var(--s6); }
.foot-brand p { margin-top: var(--s3); max-width: 18rem; color: var(--text-2); font-size: var(--fs-sm); }
.foot h3 { margin-bottom: var(--s3); color: var(--text-3); font: 500 var(--fs-xs)/1.2 var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
.foot ul { list-style: none; padding: 0; display: grid; gap: var(--s2); }
.foot ul a { color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; }
.foot ul a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s5); padding-top: var(--s4); padding-bottom: var(--s5); border-top: 1px solid var(--line); color: var(--text-3); font-size: var(--fs-xs); }
.foot-bottom a { color: var(--text-2); }

/* ---------- smaller screens ---------- */
@media (max-width: 60rem) {
  .app-body { grid-template-columns: 4.25rem minmax(0, 1fr) 15rem; }
  .chans { display: none; }
  .cards { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 44rem) {
  .icon-btn.menu-btn { display: grid; }
  .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: var(--s2) var(--gutter) var(--s4); background: var(--bg); border-bottom: 1px solid var(--line); }
  .bar[data-open] .links { display: flex; }
  .links a { padding: var(--s3); font-size: var(--fs-md); }
  .bar-end .btn-text { display: none; }
  .bar-end .btn { width: var(--ctl); padding: 0; }
  .hero { padding-top: var(--s7); }
  .app-body { grid-template-columns: 1fr; }
  .rail { display: none; }
  .plugins-panel { border-left: 0; border-top: 1px solid var(--a-line); }
  .shot { margin-top: var(--s6); }
  .plist { grid-template-columns: 1fr; }
  .source-card { grid-template-columns: 1fr; }
  .suggest-row .btn, .source-card .btn { width: 100%; }
  .section { padding-top: var(--s7); padding-bottom: var(--s7); }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
