/*
 * Demo demo30 "UI kit": the shell shared by the four pages (buttons, pagination & arrows, SVG icons,
 * UTF-8 icons) — top bar, page nav, numbered cells, grounds, idle animations and the ?tune editor.
 * The pieces themselves are styled in buttons.css, nav.css, icons.css.
 */
@font-face { font-family: "Lato"; src: url("/demo30/fonts/Lato-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/demo30/fonts/lato-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/demo30/fonts/lato-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/demo30/fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/demo30/fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Lazurski"; src: url("/demo30/fonts/LazurskiBold.woff") format("woff"); font-weight: 400 700; font-display: swap; }

:root {
    --bg: #18171a;
    --ink: #f3f4f1;
    --mute: rgb(255 255 255 / 0.5);
    --line: rgb(255 255 255 / 0.08);
    --green: #53f57e;
    --green-d: #469a58;
    --yellow: #ffb500;
    --card: rgb(255 255 255 / 0.025);
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.5 "Lato", system-ui, sans-serif; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.kit { position: relative; z-index: 1; transition: padding .35s cubic-bezier(.2, .8, .2, 1); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── top bar ─────────────────────────────────────────────────────────── */
.bar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
    padding: 12px clamp(16px, 3vw, 40px); background: rgb(24 23 26 / 0.78);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.bar__brand img { width: 46px; height: auto; }
.bar__brand span { font: 600 13px/1 "Poppins", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.tabs { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.04); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs__link {
    position: relative; display: flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-radius: 999px;
    color: var(--mute); text-decoration: none; white-space: nowrap; font: 500 14px/1 "Poppins", sans-serif; transition: color .3s, background .3s;
}
.tabs__link b { font: 400 11px/1 var(--mono); color: var(--yellow); opacity: .8; }
.tabs__link--trash { gap: 6px; }
.bin { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; align-self: center; }
.tabs__link .bin { margin-right: -2px; }
.tabs__link:hover { color: #fff; }
.tabs__link[aria-current="page"] {
    color: #fff;
    background: radial-gradient(120% 160% at 0% 50%, rgb(83 245 126 / 0.28), transparent 70%), rgb(255 255 255 / 0.06);
    box-shadow: inset 0 0 0 1px rgb(83 245 126 / 0.25);
}
.bar__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tool {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
    background: rgb(255 255 255 / 0.04); color: var(--ink); font: 500 13px/1 "Poppins", sans-serif; cursor: pointer; transition: background .25s, border-color .25s;
}
.tool:hover { background: rgb(255 255 255 / 0.1); }
.tool[aria-pressed="true"] { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.tool:focus-visible, .tabs__link:focus-visible, .cell__n:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ── page head ───────────────────────────────────────────────────────── */
.head { padding: clamp(40px, 7vw, 96px) clamp(16px, 3vw, 40px) 24px; max-width: 1600px; margin: 0 auto; }
.head__kicker { margin: 0 0 14px; font: 400 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); }
.head__title { margin: 0; max-width: 17ch; font: 600 clamp(38px, 6vw, 84px)/0.98 "Poppins", sans-serif; letter-spacing: -0.03em; }
.head__title em { font-style: normal; background: linear-gradient(100deg, #53f57e, #b8f7c9 40%, #9a9a9a 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.head__lead { max-width: 64ch; margin: 22px 0 0; color: rgb(255 255 255 / 0.66); font-size: 17px; }
.head__lead kbd, .hint kbd { padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; font: 12px var(--mono); }
.head__hero { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }

/* jump bar: sections + find by number */
.jump {
    position: sticky; top: 65px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    padding: 10px max(clamp(16px, 3vw, 40px), calc((100% - 1600px) / 2 + clamp(16px, 3vw, 40px)));
    background: linear-gradient(rgb(24 23 26 / 0.86), rgb(24 23 26 / 0.6)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.jump__link { padding: 6px 12px; border-radius: 999px; background: rgb(24 23 26 / 0.7); border: 1px solid var(--line); color: var(--mute); text-decoration: none; font-size: 13px; backdrop-filter: blur(10px); }
.jump__link:hover { color: #fff; border-color: rgb(83 245 126 / 0.4); }
.jump__find { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.jump__find input[type="search"] { width: 120px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgb(24 23 26 / 0.8); color: #fff; font: 13px var(--mono); }
.jump__find input:focus-visible { outline: 2px solid var(--green); }
.jump__only { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgb(24 23 26 / 0.7); font-size: 13px; color: var(--mute); cursor: pointer; }
.jump__only input { accent-color: var(--green-d); }

/* ── sections and numbered cells ─────────────────────────────────────── */
.sec { max-width: 1600px; margin: 0 auto; padding: 48px clamp(16px, 3vw, 40px) 8px; scroll-margin-top: 120px; }
.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec__title { margin: 0; font: 600 clamp(22px, 2.4vw, 30px)/1.1 "Poppins", sans-serif; letter-spacing: -0.01em; }
.sec__range { font: 12px var(--mono); color: var(--yellow); }
.sec__note { margin: 0; flex-basis: 100%; max-width: 76ch; color: var(--mute); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--cell, 240px), 100%), 1fr)); gap: 10px; }
.grid--wide { --cell: 440px; }
.grid--icons { --cell: 112px; gap: 6px; }

.cell {
    --ground: linear-gradient(transparent, transparent);
    position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 168px; min-width: 0; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--ground), var(--card);
    transition: border-color .25s, box-shadow .25s;
}
.grid--wide .cell { min-height: 150px; }
.cell__n {
    justify-self: start; padding: 2px 7px; border: 0; border-radius: 6px; background: rgb(0 0 0 / 0.35);
    color: var(--yellow); font: 600 12px/1.4 var(--mono); letter-spacing: 0.04em; cursor: copy;
}
.cell__n:hover { background: var(--yellow); color: #18171a; }
.cell__n.is-done { background: var(--green); color: #18171a; }
.cell__stage { display: flex; align-items: center; justify-content: center; padding: 18px 4px; min-width: 0; }
.cell__name { display: flex; justify-content: space-between; gap: 8px; min-width: 0; margin: 0; color: var(--mute); font: 12px/1.3 var(--mono); }
.cell__name span { flex: none; }
.cell__name i { flex: 1 1 0; min-width: 0; font-style: normal; opacity: .65; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.is-edited::after { content: ""; position: absolute; top: 15px; left: 66px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.cell.is-hidden { display: none; }
/* the shared trash: a bin on every cell (shown on hover, always on touch), Restore on trash.html */
.cell__del {
    position: absolute; top: 8px; right: 8px; z-index: 3; display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px;
    border: 1px solid var(--line); border-radius: 8px; background: rgb(24 23 26 / 0.7); color: var(--mute); font-size: 13px; cursor: pointer;
    opacity: 0; transition: opacity .2s, background .2s, color .2s;
}
.cell:hover .cell__del, .cell__del:focus-visible { opacity: 1; }
@media (hover: none) { .cell__del { opacity: .8; } }
.cell__del:hover { background: #5a2a30; border-color: #ff6b7a; color: #fff; }
.cell__del:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.cell__del--back { opacity: 1; padding: 0 10px; color: var(--green); font: 600 12px/1 "Poppins", sans-serif; }
.cell__del--back:hover { background: var(--green-d); border-color: var(--green-d); }
.grid--icons .cell__del { top: 5px; right: 5px; min-width: 24px; height: 22px; font-size: 11px; }
.grid--icons .cell__del .bin { width: 12px; height: 12px; }
.cell[data-ground="light"] .cell__n { background: #18171a; }
.cell[data-ground="light"] .cell__del:not(:hover) { background: #18171a; color: #fff; }
.grid--icons .cell__del--back { padding: 0 6px; font-size: 10px; }
.cell__when { position: absolute; left: 12px; bottom: 30px; margin: 0; color: #ff9aa6; font: 10.5px var(--mono); }
.cell.is-leaving { animation: cell-leave .42s cubic-bezier(.5, 0, .7, .4) forwards; pointer-events: none; }
@keyframes cell-leave { to { opacity: 0; transform: scale(.85) rotate(-3deg); filter: blur(4px); } }
.trashed-note { max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); color: var(--mute); font-size: 13px; }
.trashed-note a { color: #ff9aa6; }
.cell.is-flash { animation: cell-flash 1.6s ease; }
@keyframes cell-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--yellow); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* grounds behind a cell (editor field "ground") */
.cell[data-ground="light"] { --ground: linear-gradient(#e9ece8, #e9ece8); }
.cell[data-ground="light"] .cell__name { color: rgb(24 23 26 / 0.6); }
.cell[data-ground="green"] { --ground: linear-gradient(135deg, #0f2a19, #1d4a2c); }
.cell[data-ground="glow"] { --ground: radial-gradient(90% 120% at 15% 30%, rgb(83 245 126 / 0.2), transparent 70%); }
.cell[data-ground="photo"] { --ground: linear-gradient(rgb(0 0 0 / 0.3), rgb(0 0 0 / 0.3)), url("/_img/photos/photo-07.jpg") center 30% / cover; }
.cell[data-ground="black"] { --ground: linear-gradient(#060606, #060606); }
.cell[data-ground="sunset"] { --ground: linear-gradient(135deg, #2b1630, #5a2a2a 60%, #6b4a1c); }

/* ── edit mode ───────────────────────────────────────────────────────── */
body.is-tuning .cell { cursor: pointer; }
body.is-tuning .cell:hover { border-color: rgb(83 245 126 / 0.45); }
body.is-tuning .cell.is-picked { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 40px rgb(83 245 126 / 0.18); }
body.is-tuning .cell__stage * { pointer-events: none; }
@media (min-width: 1100px) { body.is-tuning .kit { padding-right: 370px; } }
.hint { display: none; max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); color: var(--green); font-size: 14px; }
body.is-tuning .hint { display: block; }

.tuner {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column;
    width: min(370px, 100vw); background: rgb(20 19 22 / 0.95); border-left: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13px;
    transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
body.is-tuning .tuner { transform: none; }
.tuner__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tuner__num { font: 600 15px var(--mono); color: var(--yellow); }
.tuner__fam { flex: 1; color: var(--mute); font: 12px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuner__x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.08); color: #fff; cursor: pointer; font-size: 16px; }
.tuner__preview { display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 20px; border-bottom: 1px solid var(--line); overflow: hidden; }
.tuner__preview .cell__stage { padding: 0; }
.tuner__body { flex: 1; overflow: auto; padding: 4px 16px 16px; }
.tuner__empty { margin: 28px 0; color: var(--mute); text-align: center; line-height: 1.6; }
.tuner__group { margin: 16px 0 4px; color: var(--green); font: 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.trow { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 8px; margin: 7px 0; }
.trow > span { color: rgb(255 255 255 / 0.72); }
.trow input[type="range"] { width: 100%; accent-color: var(--green-d); }
.trow output { text-align: right; color: var(--yellow); font: 12px var(--mono); }
.trow input[type="color"] { width: 100%; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.trow input[type="text"], .trow select { grid-column: 2 / span 2; width: 100%; padding: 6px 8px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 6px; background: #26252a; color: #fff; }
.trow input.trow__hex { grid-column: 3; padding: 5px 4px; font: 11px var(--mono); }
.tuner__foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tuner__foot button { flex: 1 1 auto; padding: 9px 10px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.08); color: #fff; font: 600 12px/1 "Poppins", sans-serif; cursor: pointer; }
.tuner__foot button:hover { background: rgb(255 255 255 / 0.16); }
.tuner__foot button[data-act="copy"] { background: var(--green-d); }
.tuner__foot button[data-act="reset"] { background: #4a2328; }
.tuner__all { width: 100%; display: flex; gap: 6px; padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--line); }
.tuner__all button { background: transparent !important; border: 1px solid var(--line) !important; font-weight: 500 !important; }
.tuner__code { display: none; width: 100%; height: 160px; margin-top: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #0d0d0f; color: #cfe9d6; font: 11px/1.45 var(--mono); resize: vertical; }
.tuner__code.is-shown { display: block; }

.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px; background: #f3f4f1; color: #18171a;
    font: 600 13px "Poppins", sans-serif; transform: translate(-50%, 160%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); }
.toast.has-action { display: flex; align-items: center; gap: 14px; pointer-events: auto; padding-right: 8px; }
.toast__act { padding: 6px 14px; border: 0; border-radius: 999px; background: #18171a; color: var(--green); font: 600 12px/1 "Poppins", sans-serif; cursor: pointer; }

/* ── page-to-page footer nav ─────────────────────────────────────────── */
.pagenav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 1600px; margin: 64px auto 0; padding: 0 clamp(16px, 3vw, 40px); }
.pagenav a {
    --px: 0%;
    position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 6px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 18px;
    text-decoration: none; overflow: hidden; background: rgb(255 255 255 / 0.02); transition: border-color .3s;
}
.pagenav a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 140% at var(--px) 50%, rgb(83 245 126 / 0.24), transparent 70%); opacity: 0; transition: opacity .6s; }
.pagenav a:hover { border-color: rgb(83 245 126 / 0.4); }
.pagenav a:hover::before { opacity: 1; }
.pagenav__next { text-align: right; align-items: flex-end; grid-column: 2; --px: 100% !important; }
.pagenav small { color: var(--mute); font: 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.pagenav strong { font: 600 clamp(20px, 2.4vw, 32px)/1.1 "Poppins", sans-serif; }
.pagenav i { display: inline-block; font-style: normal; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.pagenav__prev:hover i { transform: translateX(-8px); }
.pagenav__next:hover i { transform: translateX(8px); }
.foot { max-width: 1600px; margin: 40px auto 0; padding: 24px clamp(16px, 3vw, 40px) 40px; color: var(--mute); font-size: 13px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { color: var(--green); }

/* ── idle animations (class a--<name> on the .anim wrapper of a piece) ── */
.anim { display: inline-flex; max-width: 100%; }
.a--float { animation: a-float 3.2s ease-in-out infinite; }
.a--pulse { animation: a-pulse 2s ease-in-out infinite; }
.a--breathe { animation: a-breathe 3s ease-in-out infinite; }
.a--shake { animation: a-shake 4s ease-in-out infinite; }
.a--wobble { animation: a-wobble 3.5s ease-in-out infinite; }
.a--jello { animation: a-jello 3.6s ease-in-out infinite; }
.a--bounce { animation: a-bounce 2s cubic-bezier(.3, 0, .3, 1) infinite; }
.a--heartbeat { animation: a-heartbeat 1.6s ease-in-out infinite; }
.a--tada { animation: a-tada 3.4s ease-in-out infinite; }
.a--swing { animation: a-swing 2.8s ease-in-out infinite; transform-origin: 50% -40%; }
.a--rubber { animation: a-rubber 3s ease-in-out infinite; }
.a--flash { animation: a-flash 2.6s ease-in-out infinite; }
.a--spin { animation: a-spin 6s linear infinite; }
.a--sway { animation: a-sway 4s ease-in-out infinite; }
.a--hue { animation: a-hue 6s linear infinite; }
.a--glow { animation: a-glow 2.4s ease-in-out infinite; }
.a--blink { animation: a-blink 1.2s steps(2, jump-none) infinite; }
.a--drop { animation: a-drop 2.4s cubic-bezier(.3, 0, .3, 1) infinite; }
.a--orbit { animation: a-orbit 4s linear infinite; }
@keyframes a-float { 50% { transform: translateY(-7px); } }
@keyframes a-pulse { 50% { transform: scale(1.06); } }
@keyframes a-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(.97); } }
@keyframes a-shake { 0%, 84%, 100% { transform: translateX(0); } 86%, 90%, 94% { transform: translateX(-4px); } 88%, 92%, 96% { transform: translateX(4px); } }
@keyframes a-wobble { 0%, 70%, 100% { transform: none; } 75% { transform: translateX(-6px) rotate(-4deg); } 82% { transform: translateX(5px) rotate(3deg); } 88% { transform: translateX(-3px) rotate(-2deg); } 94% { transform: translateX(2px) rotate(1deg); } }
@keyframes a-jello { 0%, 70%, 100% { transform: none; } 76% { transform: skewX(-10deg) skewY(-4deg); } 82% { transform: skewX(6deg) skewY(2deg); } 88% { transform: skewX(-3deg); } 94% { transform: skewX(1deg); } }
@keyframes a-bounce { 0%, 60%, 100% { transform: translateY(0); } 20% { transform: translateY(-14px); } 35% { transform: translateY(0) scale(1.04, .94); } 45% { transform: translateY(-5px); } }
@keyframes a-heartbeat { 0%, 40%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.08); } 20% { transform: scale(.98); } }
@keyframes a-tada { 0%, 70%, 100% { transform: none; } 73%, 76% { transform: scale(.92) rotate(-3deg); } 79%, 85%, 91% { transform: scale(1.08) rotate(3deg); } 82%, 88%, 94% { transform: scale(1.08) rotate(-3deg); } }
@keyframes a-swing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(5deg); } 75% { transform: rotate(-5deg); } }
@keyframes a-rubber { 0%, 60%, 100% { transform: scale(1); } 66% { transform: scale(1.18, .82); } 72% { transform: scale(.88, 1.12); } 80% { transform: scale(1.06, .94); } 88% { transform: scale(.98, 1.02); } }
@keyframes a-flash { 0%, 60%, 100% { opacity: 1; } 70%, 90% { opacity: .25; } 80% { opacity: 1; } }
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-sway { 0%, 100% { transform: perspective(500px) rotateY(-16deg); } 50% { transform: perspective(500px) rotateY(16deg); } }
@keyframes a-hue { to { filter: hue-rotate(360deg); } }
@keyframes a-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgb(83 245 126 / 0)); } 50% { filter: drop-shadow(0 0 14px rgb(83 245 126 / 0.65)); } }
@keyframes a-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes a-drop { 0% { transform: translateY(-10px); opacity: 0; } 25%, 75% { transform: none; opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
@keyframes a-orbit { from { transform: rotate(0) translateX(5px) rotate(0); } to { transform: rotate(360deg) translateX(5px) rotate(-360deg); } }

@media (max-width: 860px) {
    .bar { flex-wrap: wrap; gap: 10px; }
    .tabs { order: 3; width: 100%; margin: 0; }
    .bar__tools { margin-left: auto; }
    .tool span { display: none; }
    .jump { position: static; }
    .jump__find { margin-left: 0; }
    .tuner { top: auto; height: 64vh; width: 100vw; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; transform: translateY(105%); }
    .pagenav { grid-template-columns: 1fr; }
    .pagenav__next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* trash.html */
.trash-empty { max-width: 1600px; margin: 40px auto 0; padding: 40px clamp(16px, 3vw, 40px); color: var(--mute); text-align: center; font-size: 17px; }
.sec--trash .sec__range { color: #ff9aa6; }

/* ── votes, cell tools, pieces kept as code ──────────────────────────── */
.cell__tools { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; align-items: center; gap: 4px; }
.cell__tools .cell__del { position: static; }
.cell__vote {
    display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
    background: rgb(24 23 26 / 0.7); color: var(--mute); font: 600 12px/1 var(--mono); cursor: pointer; transition: color .2s, background .2s, border-color .2s;
}
.cell__vote:hover { color: #ff6b8a; border-color: rgb(255 107 138 / .5); }
.cell__vote.is-voted { color: #ff6b8a; border-color: rgb(255 107 138 / .35); background: rgb(255 107 138 / .12); }
.cell__vote.is-voted .bin { fill: currentColor; }
.cell__vote.is-pop .bin { animation: a-heartbeat .6s ease; }
.cell__vote:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.cell[data-ground="light"] .cell__vote:not(.is-voted) { background: #18171a; color: #fff; }
.grid--icons .cell__vote { height: 22px; padding: 0 5px; font-size: 10px; gap: 3px; }
.grid--icons .cell__vote .bin { width: 11px; height: 11px; }
.grid--icons .cell__tools { top: 5px; right: 5px; gap: 2px; }
.grid--icons .cell.is-edited::after { left: 50px; top: 11px; }
.cell__from { position: absolute; left: 12px; bottom: 30px; color: var(--green); font: 10.5px var(--mono); text-decoration: none; }
.cell__from:hover { text-decoration: underline; }
.sec--made .sec__title::before, .sec--imported .sec__title::before { content: "✦ "; color: var(--green); }
.tabs__link--top .bin { color: #ff6b8a; }
.jump__only select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: #26252a; color: #fff; font-size: 12px; }
.jump__bar { max-width: 1600px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

.cell--raw .cell__stage { padding: 8px 0; }
.cell--raw .anim { width: 100%; justify-content: center; }
.rawbox { display: block; width: 100%; }
.rawbox__frame { display: block; width: 100%; height: 124px; border: 0; background: transparent; }
.tuner__preview .rawbox { width: 320px; max-width: 100%; }
.trow--code { grid-template-columns: 1fr; gap: 4px; }
.trow--code textarea {
    width: 100%; padding: 8px; border: 1px solid rgb(255 255 255 / 0.16); border-radius: 6px; background: #0d0d0f; color: #cfe9d6;
    font: 11.5px/1.45 var(--mono); resize: vertical; tab-size: 2;
}
.trow--code textarea:focus-visible { outline: 2px solid var(--green); }
.tuner__foot .tuner__save { flex-basis: 100%; padding: 11px; background: radial-gradient(120% 220% at 20% 50%, rgb(83 245 126 / .4), transparent 62%), #141316; box-shadow: inset 0 0 0 1px rgb(83 245 126 / .4); font-size: 13px; }
.tuner__foot .tuner__save:hover { background-color: var(--green-d); }
.tuner.is-empty .tuner__save { opacity: .4; pointer-events: none; }
.tuner__note { flex-basis: 100%; margin: 2px 0 0; color: var(--mute); font-size: 11.5px; }
.tuner.is-empty .tuner__note { display: none; }

/* ── import.html ─────────────────────────────────────────────────────── */
a.tool { text-decoration: none; }
.tool--main { padding: 10px 20px; background: radial-gradient(120% 220% at 20% 50%, rgb(83 245 126 / .4), transparent 62%), #141316; border-color: rgb(83 245 126 / .45); }
.tool--main:hover { background-color: var(--green-d); }
.tool:disabled { opacity: .5; cursor: wait; }
.imp__form, .imp__rule { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.imp__step { margin: 26px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.imp__step h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 600 22px/1.2 "Poppins", sans-serif; }
.imp__step h2 b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: #18171a; font: 600 14px var(--mono); }
.imp__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 10px 0; }
.imp__row label { display: inline-flex; align-items: center; gap: 8px; color: rgb(255 255 255 / .72); font-size: 14px; }
.imp__row input[type="number"] { width: 70px; }
.imp__row input[type="number"], .imp__row input[type="text"], .imp__row select { padding: 7px 10px; border: 1px solid rgb(255 255 255 / .16); border-radius: 8px; background: #26252a; color: #fff; }
.imp__grow { flex: 1 1 300px; }
.imp__grow input { flex: 1; min-width: 0; }
.imp__langs { display: inline-flex; gap: 4px; }
.imp__code { display: block; width: 100%; margin: 8px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #0d0d0f; color: #cfe9d6; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-x: auto; resize: vertical; }
.imp__code:focus-visible { outline: 2px solid var(--green); }
.imp__status { font: 13px var(--mono); color: var(--mute); }
.imp__status.is-ok { color: var(--green); }
.imp__status.is-bad { color: #ff9aa6; }
.imp__result { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgb(83 245 126 / .08); border: 1px solid rgb(83 245 126 / .3); }
.imp__result h3 { margin: 0 0 8px; font: 600 18px "Poppins", sans-serif; }
.imp__result a { color: var(--green); margin-right: 8px; font-family: var(--mono); }
.imp__result a.tool { color: #fff; font-family: "Poppins", sans-serif; }
.imp__rule ul { padding-left: 20px; color: rgb(255 255 255 / .8); }
.imp__rule li { margin: 6px 0; }
.imp__rule code { padding: 1px 6px; border-radius: 5px; background: rgb(0 0 0 / .35); color: var(--yellow); font-size: .9em; }
.tool[aria-pressed="true"] { background: var(--green-d); border-color: var(--green-d); }
.imp__step.imp__rule { margin: 26px auto; }
.cell__edit {
    display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px;
    background: rgb(24 23 26 / 0.7); color: var(--mute); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, color .2s;
}
.cell:hover .cell__edit, .cell__edit:focus-visible, .cell.is-picked .cell__edit { opacity: 1; }
@media (hover: none) { .cell__edit { opacity: .8; } }
.cell__edit:hover { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.cell__edit:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.cell[data-ground="light"] .cell__edit:not(:hover) { background: #18171a; color: #fff; }
.grid--icons .cell__edit { min-width: 22px; height: 22px; padding: 0 4px; }
.grid--icons .cell__edit .bin { width: 11px; height: 11px; }
.trow__hint { font-style: normal; color: var(--mute); font-size: 10.5px; }
.rawbox--shadow { min-height: 124px; }

/* long pages: sections off screen are not laid out or painted until they come near */
.sec { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* many pages, many sections: one scrolling row each */
.tabs__link { padding: 8px 12px; gap: 6px; }
.jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.jump__link { flex: none; }
.jump__find { flex: none; position: sticky; right: 0; padding-left: 10px; background: linear-gradient(90deg, transparent, rgb(24 23 26 / .95) 10px); }
.grid--icons { --cell: 124px; }
@media (max-width: 860px) { .jump__find { position: static; background: none; } }
