/* Shared structure for both versions. Each version's stylesheet supplies the tokens and its own world. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); font-feature-settings: 'tnum' 0; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--selection); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
/* always reserve the scrollbar's width, so short and long pages sit at the same horizontal position */
html { scrollbar-color: var(--line-2) transparent; scrollbar-gutter: stable; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
time, .c-num, .c-date, .count, dd, .mono, .ver, .v-num { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.i { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- console icons, jacks, avatars ---------- */
.cicon { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--text-2); }
.cicon.logo::before { content: ''; width: 100%; height: 100%; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.cicon.sym .i { width: 70%; height: 70%; }
.cicon.xs { width: 18px; height: 18px; }
.cicon.sm { width: 24px; height: 24px; }
.cicon.lg { width: 40px; height: 40px; }
.cicon.xl { width: 64px; height: 64px; }
.jack { width: 22px; height: 22px; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar.initials { display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: hsl(var(--hue, 220) 45% 28%); background: hsl(var(--hue, 220) 55% 88%); letter-spacing: .02em; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.md { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }
.avatar.me { --hue: 220; }

/* ---------- buttons & form controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.on { color: var(--accent-text); }
.btn.icon-only { width: 36px; min-height: 36px; padding: 0; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.big { min-height: 48px; padding: 0 20px; font-size: 15px; }
.btn.big small { font-weight: 500; opacity: .8; font-size: 12px; }
.btn.wide { width: 100%; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn.follow.on { background: var(--accent-soft); border-color: transparent; }
.filter-input, .results-search { position: relative; display: flex; align-items: center; flex: 1 1 220px; max-width: 360px; }
.filter-input .i, .results-search .i { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.filter-input input, .results-search input, .field input, .field select, .field textarea, .select select, .sort select { width: 100%; min-height: 38px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.filter-input input, .results-search input { padding-left: 34px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.select select, .sort select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.sort { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.sort select { width: auto; color: var(--text); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 3px); background: var(--surface); gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a { padding: 6px 12px; border-radius: var(--radius); color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.seg a:hover { color: var(--text); background: var(--hover); }
.seg a[aria-current] { background: var(--seg-on); color: var(--seg-on-text); font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }
.rowcheck { display: inline-grid; place-items: center; width: 28px; height: 28px; cursor: pointer; position: relative; }
.rowcheck input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rowcheck span { width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 4px; background: var(--surface); transition: background .12s, border-color .12s; }
.rowcheck input:checked + span { background: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
.rowcheck input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar-bg); color: var(--topbar-text); border-bottom: 1px solid var(--topbar-line); }
.topbar-in { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav > a, .nav-extras > button { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: var(--radius); color: var(--topbar-text-2); text-decoration: none; font-weight: 500; font-size: 14px; background: none; border: 0; cursor: pointer; }
.mainnav > a:hover, .nav-extras > button:hover { color: var(--topbar-text); background: var(--topbar-hover); }
.mainnav > a[aria-current], .nav-extras > button.current { color: var(--topbar-text); background: var(--topbar-on); }
.nav-extras { position: relative; }
.nav-extras .i { width: 14px; height: 14px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; display: flex; align-items: center; }
.search > .i { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--search-icon); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 36px 0 34px; border-radius: var(--radius); border: 1px solid var(--search-line); background: var(--search-bg); color: var(--search-text); }
.search input::placeholder { color: var(--search-placeholder); }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.top-actions .btn.ghost { color: var(--topbar-text); }
.top-actions .btn.ghost:hover { background: var(--topbar-hover); }
.theme-btn .when-dark { display: none; }
[data-theme="dark"] .theme-btn .when-dark { display: block; }
[data-theme="dark"] .theme-btn .when-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .when-dark { display: block; } :root:not([data-theme="light"]) .theme-btn .when-light { display: none; } }
.account { position: relative; }
.account-btn { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }

/* menus & suggestions */
.menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 260px; padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); }
.menu.right { left: auto; right: 0; }
.menu-title { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; flex-direction: column; }
.menu-title small { font-weight: 400; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius); background: none; color: var(--text); text-decoration: none; text-align: left; cursor: pointer; font-size: 14px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); }
.menu-item > small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.menu-item.rich { align-items: flex-start; }
.menu-item.rich .i { margin-top: 2px; color: var(--accent-text); }
.menu-item.rich span, .send .menu-item span { display: flex; flex-direction: column; }
.menu-item.rich small, .send .menu-item small { color: var(--text-2); font-size: 12.5px; }
.menu-item .i:empty { width: 18px; }
.rb-mark { width: 20px; height: auto; flex: none; margin-top: 3px; }
[data-theme="dark"] .rb-mark { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rb-mark { filter: invert(1); } }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 360px; z-index: 60; padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); max-height: 70vh; overflow-y: auto; }
.sg-title { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.sg-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: 14px; }
.sg-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-item small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.sg-item:hover, .sg-item:focus-visible { background: var(--hover); outline: none; }
.sg-all { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.sg-all:hover, .sg-all:focus-visible { background: var(--hover); outline: none; }
.sg-none { padding: 12px 10px; color: var(--text-2); }

/* ---------- page frame ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: 28px 24px 96px; outline: none; }
.page-head { margin-bottom: 20px; max-width: 72ch; }
.page-head h1 { font: var(--h1); letter-spacing: var(--h1-track); }
.page-head p { margin-top: 8px; color: var(--text-2); font-size: 16px; }
.block { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { font: var(--h2); letter-spacing: var(--h2-track); }
.section-head p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.more .i { width: 16px; height: 16px; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.more:hover .i { transform: translateX(3px); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.toolbar .sort { margin-left: auto; }
.result-count { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.result-count strong { color: var(--text); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 13.5px; color: var(--text-2); }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.empty, .gate { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty > .i, .gate > .i { width: 32px; height: 32px; color: var(--text-3); }
.empty h3 { font-size: 18px; }
.empty p, .gate p { color: var(--text-2); max-width: 46ch; }
.gate { border: 0; padding: 80px 20px; }
.gate h1 { font: var(--h1); letter-spacing: var(--h1-track); }
.gate .fine { font-size: 13px; color: var(--text-3); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.callout > .i { color: var(--accent-text); margin-top: 2px; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius-lg); background: var(--accent-soft); }
.notice p { flex: 1; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.muted-tag { background: var(--surface-2); color: var(--text-2); }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap; }
.count { color: var(--text-3); font-weight: 500; }

/* connection badges and look tags */
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.conn .jack { width: 20px; height: 20px; }
.p-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.look { display: inline-flex; padding: 1px 7px; border-radius: var(--radius); font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }

/* ---------- home ---------- */
.console-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.ctile { position: relative; }
.ctile .star { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: none; color: var(--text-3); cursor: pointer; }
.ctile .star:hover { background: var(--hover); color: var(--text); }
.ctile .star.on { color: var(--star); }
.ctile .star.on .i { fill: currentColor; }
.ctile .star .i { width: 16px; height: 16px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.acts { list-style: none; margin: 0; padding: 0; }
.act { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.act:first-child { border-top: 0; padding-top: 4px; }
.act-line { font-size: 14.5px; }
.act-who { font-weight: 600; color: var(--text); text-decoration: none; }
.act-what { font-weight: 600; }
.act-note { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.act-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.act-meta .cicon { margin-right: -6px; }
.act-meta .conn { font-size: 13px; }
.act-meta .conn .jack { width: 16px; height: 16px; }
.act-kind { display: inline-flex; align-items: center; gap: 4px; align-self: start; font-size: 12px; color: var(--text-3); }
.act-kind .i { width: 14px; height: 14px; }
.ver { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); }
.creator-mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.creator-mini a { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 8px; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.creator-mini a:hover { background: var(--hover); }
.creator-mini .avatar { grid-row: span 2; }
.cm-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-meta { font-size: 12.5px; color: var(--text-2); }
.personal { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-top: 28px; }
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mine-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.mine-list a:hover { border-color: var(--line-2); }
.mine-name { font-weight: 600; }
.mine-count { margin-left: auto; color: var(--text-2); font-size: 13px; }

/* ---------- consoles ---------- */
.maker { margin-top: 32px; }
.maker h2 { font: var(--h3); margin-bottom: 12px; }
.console-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.console-head h1 { font: var(--h1); letter-spacing: var(--h1-track); }
.console-head p { color: var(--text-2); margin-top: 4px; }
.console-head .btn { margin-left: auto; }
.conn-chooser h2 { font: var(--h3); margin-bottom: 12px; }
.conn-options { display: flex; flex-wrap: wrap; gap: 8px; }
.conn-option { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.conn-option:hover { border-color: var(--text-3); }
.conn-option.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.co-count { color: var(--text-2); font-weight: 500; font-size: 13px; }

/* ---------- profile browser ---------- */
.browse { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.filters-head, .filters-foot { display: none; }
.fgroup { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.fgroup legend { font-weight: 700; font-size: 13px; padding: 0; margin-bottom: 6px; }
.fopt { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 2px 6px; margin: 0 -6px; border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.fopt:hover { background: var(--hover); }
.fopt input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.fopt .fl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fopt .count { font-size: 12.5px; }
.fopt.none { opacity: .45; cursor: default; }
.fopt .jack { width: 20px; height: 20px; }
.more-opts summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent-text); padding: 6px 0; list-style: none; }
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts[open] summary { display: none; }
.results { min-width: 0; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.results-bar .result-count { margin: 0; order: -1; flex-basis: 100%; display: none; }
.results-bar .sort { margin-left: auto; }
.filters-btn { display: none; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.view-toggle a { display: grid; place-items: center; width: 36px; height: 36px; color: var(--text-2); }
.view-toggle a + a { border-left: 1px solid var(--line-2); }
.view-toggle a[aria-current] { background: var(--seg-on); color: var(--seg-on-text); }
.view-toggle .i { width: 16px; height: 16px; }
.results > .result-count { display: none; }
.results-bar p.result-count { display: block; flex-basis: auto; order: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; text-decoration: none; }
.chip .i { width: 14px; height: 14px; }
.chip.clear { background: none; color: var(--text-2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.pager-nums { display: flex; gap: 4px; align-items: center; }
.pager-nums a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager-nums a:hover { background: var(--hover); }
.pager-nums a[aria-current] { background: var(--seg-on); color: var(--seg-on-text); font-weight: 700; }
.pager-nums .gap { color: var(--text-3); padding: 0 4px; }
.selbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: calc(var(--radius) + 6px); background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-menu); animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.selbar .btn.ghost { color: var(--inverse-text); }
.selbar .btn.ghost:hover { background: rgb(255 255 255 / .12); }
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } }

/* profile table */
.table-wrap { overflow-x: auto; }
.plist { width: 100%; border-collapse: collapse; font-size: 14px; }
.plist th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.plist td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plist tbody tr:hover { background: var(--row-hover); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--text); }
.th-sort .i { width: 13px; height: 13px; }
.th-sort .idle { opacity: 0; }
.th-sort:hover .idle { opacity: .6; }
.plist th[aria-sort="ascending"], .plist th[aria-sort="descending"] { color: var(--text); }
.c-check { width: 40px; padding-right: 0 !important; }
.c-rank { width: 32px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.c-num, .plist th.c-num { text-align: right; white-space: nowrap; }
.plist th.c-num .th-sort { flex-direction: row-reverse; }
.c-date { white-space: nowrap; color: var(--text-2); }
.c-act { width: 84px; }
.pname { font-weight: 600; color: var(--text); text-decoration: none; }
a.pname:hover, .pname-wrap:hover .pname { text-decoration: underline; text-decoration-color: var(--text-3); }
.psub { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .btn { color: var(--text-2); }
.row-actions .btn:hover { color: var(--text); }

/* cards shared */
.pcard, .kcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.pcard-art, .kcard-art { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 2; background: var(--osd); }
.pcard-art img, .kcard-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.osd-fallback { display: grid; place-items: center; gap: 8px; color: #7d8494; }
.osd-fallback .cicon { color: #7d8494; }
.pcard-body, .kcard-body { padding: 12px 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.pcard h3, .kcard h3 { font-size: 15px; line-height: 1.3; }
.pcard h3 a, .kcard h3 a { color: var(--text); text-decoration: none; }
.pcard h3 a:hover, .kcard h3 a:hover { text-decoration: underline; }
.pcard-foot { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.pcard-foot .creator-link { flex: 1; min-width: 0; }
.dl { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.dl .i { width: 14px; height: 14px; }
.creator-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.creator-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-link:hover span { text-decoration: underline; }

/* ---------- profile page ---------- */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.p-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.p-title h1 { font: var(--h1); letter-spacing: var(--h1-track); overflow-wrap: anywhere; }
.p-meta { margin-top: 8px; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.p-meta .creator-link { color: var(--link); }
.p-tags { margin-top: 12px; }
.p-head .p-tags { margin-top: 14px; }
.p-banner { margin: 0; width: 320px; }
.p-banner img, .osd-fallback { width: 100%; aspect-ratio: 5 / 2; background: var(--osd); border-radius: var(--radius); image-rendering: pixelated; object-fit: contain; }
.p-banner .osd-fallback { text-align: center; font-size: 13px; padding: 12px; }
.p-banner figcaption { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.p-banner.small { width: 100%; margin-top: 16px; }
.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 8px; }
.p-stats { display: flex; gap: 16px; margin-left: auto; font-size: 13.5px; color: var(--text-2); }
.p-stats strong { color: var(--text); }
.send { position: relative; }
.send .menu { min-width: 300px; }
.tabs { margin-top: 32px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs-in { display: flex; gap: 4px; }
.tabs a { position: relative; padding: 10px 12px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); }
.tabs a[aria-current]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--tab-on); border-radius: 2px; }
.tabs .count { font-size: 12.5px; }
.tab-body { padding-top: 24px; }
.tab-body > section + section { margin-top: 36px; }
.notes h2, .tuned h2 { font: var(--h3); }
.notes-text { white-space: pre-wrap; font: 14px/1.6 var(--font-mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0 0; overflow-x: auto; }
.notes p { margin-top: 8px; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.settings-table th, .settings-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.settings-table thead th { font-size: 12.5px; color: var(--text-2); font-weight: 600; border-bottom-color: var(--line-2); }
.settings-table tbody th { font-weight: 500; width: 46%; }
.s-label { display: block; font-weight: 600; }
.s-group, .s-desc { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 400; margin-top: 2px; }
.s-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.val { font-weight: 600; font-variant-numeric: tabular-nums; }
.was { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.common { color: var(--text-2); }
.tr-tuned, .settings-table tr.is-tuned { background: var(--tuned-bg); }
.settings-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.s-cat { border-top: 1px solid var(--line-2); padding: 4px 0; }
.s-cat summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; font: var(--h3); list-style: none; }
.s-cat summary::-webkit-details-marker { display: none; }
.s-cat summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(-45deg); margin-left: auto; transition: transform .2s; }
.s-cat[open] summary::after { transform: rotate(45deg); }
.s-sec { margin: 4px 0 16px; }
.s-sec h4 { font-size: 12.5px; font-weight: 700; text-transform: capitalize; color: var(--text-2); margin-bottom: 4px; }
.s-cats { margin-top: 14px; }
.modes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.modes li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 500; }
.versions { list-style: none; margin: 0; padding: 0; }
.versions li { padding: 16px 0; border-top: 1px solid var(--line); }
.versions li:first-child { border-top: 0; padding-top: 0; }
.v-head { display: flex; align-items: center; gap: 10px; }
.v-num { font-weight: 700; font-size: 16px; }
.v-head time { margin-left: auto; color: var(--text-2); font-size: 13.5px; }
.versions p { color: var(--text-2); margin-top: 4px; }
.v-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.v-actions .btn { font-weight: 500; }
.versions.compact li { padding: 10px 0; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts > div.wide { grid-column: 1 / -1; }
.facts dt { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.hash { display: flex; align-items: center; gap: 8px; }
.hash span { overflow-wrap: anywhere; }
.ok, .warn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ok { color: var(--ok); }
.warn { color: var(--danger); }
.ok .i, .warn .i { width: 16px; height: 16px; }
.file-facts + .callout { margin-top: 20px; }
.profile-side { display: grid; gap: 16px; position: sticky; top: 84px; }
.side-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 10px; }
.side-card h2 { font-size: 13px; font-weight: 700; color: var(--text-2); }
.pn-name { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.pn-name:hover { text-decoration: underline; }
.pn-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pn-steps .btn { border-color: var(--line); }
.cc-top { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.cc-top span { display: flex; flex-direction: column; }
.cc-top small { color: var(--text-2); font-size: 13px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li a { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.related li:first-child a { border-top: 0; }
.rl-name { font-weight: 600; font-size: 14px; }
.rl-meta { font-size: 12.5px; color: var(--text-2); }
.related a:hover .rl-name { text-decoration: underline; }

/* ---------- pack, creator ---------- */
.pack-head, .creator-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; }
.ph-main { display: flex; align-items: center; gap: 18px; }
.pack-head h1, .creator-head h1 { font: var(--h1); letter-spacing: var(--h1-track); }
.ph-stats { display: flex; gap: 28px; margin: 0; }
.ph-stats dt { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ph-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.pack-head .p-actions { grid-column: 1 / -1; margin: 0; }
.banner-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.banner-row img { width: 240px; aspect-ratio: 5 / 2; flex: none; background: var(--osd); border-radius: var(--radius); object-fit: contain; image-rendering: pixelated; }
.banners-strip { margin-top: 28px; }
.more-packs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.more-packs a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.more-packs a:hover { border-color: var(--line-2); }
.more-packs span { display: flex; flex-direction: column; }
.more-packs small { color: var(--text-2); }
.creator-head { grid-template-columns: auto minmax(0, 1fr) auto; margin-bottom: 8px; }
.ch-consoles { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; font-size: 13px; }
.ch-consoles a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--surface); }
.ch-consoles a:hover { border-color: var(--line-2); }
.ch-consoles .count { font-size: 12px; }
.ch-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.creator-head .ph-stats { grid-column: 3; grid-row: 1; }
.creator-list { list-style: none; margin: 0; padding: 0; }
.creator-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) 1fr auto auto; gap: 20px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.cr-id { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.cr-id span { display: flex; flex-direction: column; min-width: 0; }
.cr-id strong { font-size: 15.5px; }
.cr-id small { color: var(--text-2); }
.cr-id:hover strong { text-decoration: underline; }
.cr-consoles { display: flex; align-items: center; gap: 6px; }
.more-n { font-size: 12.5px; color: var(--text-2); }
.cr-stats { display: flex; gap: 24px; margin: 0; }
.cr-stats dt { font-size: 12px; color: var(--text-2); }
.cr-stats dd { margin: 0; font-weight: 700; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.feed-group h2 { font: var(--h3); margin: 24px 0 4px; }
.following-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.following-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.following-list li a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; min-width: 0; }

/* ---------- upload ---------- */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; counter-reset: s; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 600; }
.stepper .sn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); font-size: 12px; }
.stepper .sn .i { width: 14px; height: 14px; }
.stepper li.on { background: var(--accent-soft); color: var(--accent-text); }
.stepper li.on .sn { background: var(--accent); color: var(--accent-ink); }
.stepper li.done .sn { background: var(--ok); color: #fff; }
.dropzone { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone > .i { width: 36px; height: 36px; color: var(--accent-text); }
.dropzone + p { margin-top: 14px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 12.5px; }
.hint .i { width: 14px; height: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.read-back .facts { grid-template-columns: 1fr; }
/* upload: choosing files */
.stepper a, .stepper li > span { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.stepper li.done:has(a:hover) { background: var(--hover); color: var(--text); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:has(:focus-visible), label.btn:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.dropzone .formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; list-style: none; margin: 10px 0 0; padding: 0; color: var(--text-2); font-size: 13.5px; }
.dropzone .formats li { display: flex; align-items: center; gap: 6px; }
.dropzone .formats .i { width: 15px; height: 15px; color: var(--text-3); }
.dropzone.slim { grid-auto-flow: column; justify-content: center; align-items: center; padding: 14px 16px; margin-top: 12px; border-width: 1px; font-size: 14px; }
.dropzone.slim > .i { width: 16px; height: 16px; }
.up-files, .up-narrow, .up-review, .up-review ~ * { max-width: 760px; }
.up-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: var(--h3); margin: 28px 0 8px; }
.up-h:first-child { margin-top: 0; }
.up-h small { flex: none; font-weight: 400; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.up-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.up-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 8px 10px 12px; }
.up-row + .up-row { border-top: 1px solid var(--line); }
.up-art { display: grid; place-items: center; flex: none; width: 60px; height: 36px; border-radius: 6px; background: var(--surface-2); color: var(--text-3); overflow: hidden; }
.up-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.up-art.banner { background: var(--osd); }
.up-art.banner img { object-fit: contain; }
.up-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.up-name strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.up-name small { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12.5px; }
.up-name small .i { width: 13px; height: 13px; }
.up-row.bad .up-name small, .up-row.bad .up-art { color: var(--danger); }
.up-row.todo .up-art { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.up-row .ok { font-size: 13px; }
.up-row > label.btn { margin-right: 4px; cursor: pointer; }
.up-row.edit { align-items: flex-start; padding: 12px; }
.up-row.edit > .up-art { margin-top: 1px; }
.up-edit { flex: 1; min-width: 0; display: grid; gap: 6px; }
.up-edit.two { grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 6px 12px; }
.up-edit.two > small, .up-edit.two > .fopt { grid-column: 1 / -1; }
.up-edit small { font-size: 12.5px; overflow-wrap: anywhere; }
.up-edit .fopt { margin: 0; padding: 0; min-height: 28px; font-size: 13.5px; }
.up-edit .fopt .fl { white-space: normal; }
.up-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--text-2); font-size: 13.5px; }
.up-note .i { width: 15px; height: 15px; margin-top: 3px; }
.up-files .fw-warn { margin-top: 16px; }
/* upload: describing */
.field-err { display: flex; align-items: center; gap: 5px; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.field-err .i { width: 13px; height: 13px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field textarea { resize: vertical; }
.up-mode { align-self: start; justify-self: start; max-width: 100%; }
.up-keep { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.up-keep .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.up-keep .facts > div:nth-last-child(-n + 2) { border-bottom: 0; padding-bottom: 0; }
.ver-bump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-2); font-size: 13.5px; }
.ver-bump .i { width: 14px; height: 14px; color: var(--text-3); }
.ver-bump > span:last-child { flex: 1 1 240px; margin-left: 4px; }
.ver.new { background: var(--accent-soft); color: var(--accent-text); }
.i.inline { display: inline; width: 14px; height: 14px; vertical-align: -2px; color: var(--text-3); }
.with-icon { display: inline-flex; align-items: center; gap: 8px; }
/* upload: review */
.up-review { padding: 18px 20px 6px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.up-review h2 { font: var(--h2); letter-spacing: var(--h2-track); margin-bottom: 12px; overflow-wrap: anywhere; }
.up-review .facts > div:last-child, .up-review .facts > div:nth-last-child(2):not(.wide):has(+ div:not(.wide)) { border-bottom: 0; }
.up-review dd { white-space: pre-line; }
.up-review + .fw-warn { margin-top: 16px; }
.up-plain { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; white-space: normal; }
.up-plain li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.up-plain li > span:first-of-type { min-width: 0; overflow-wrap: anywhere; }
.up-plain .i, .up-plain .jack { width: 18px; height: 18px; flex: none; color: var(--text-3); }
.up-plain .warn { flex: none; font-size: 13px; margin-left: 4px; white-space: nowrap; } .up-plain .warn .i { color: inherit; width: 14px; height: 14px; }
.up-fine { margin-top: 12px; text-align: right; }
/* select with icons and search */
.dd { position: relative; min-width: 0; }
.dd-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 5px 10px 5px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.dd-btn:hover { border-color: var(--text-3); }
.dd.open .dd-btn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-btn > .i { width: 16px; height: 16px; color: var(--text-3); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.dd.open .dd-btn > .i { transform: rotate(180deg); }
.dd-face, .dd-item { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-face small, .dd-item small { margin-left: auto; padding-left: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-ph { color: var(--text-3); }
.dd-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: min(280px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-menu); }
.dd.up .dd-pop { top: auto; bottom: calc(100% + 6px); }
.dd-search { position: relative; display: flex; align-items: center; margin-bottom: 6px; }
.dd-search .i { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.field .dd-search input { min-height: 36px; padding-left: 34px; }
.field .dd-search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .field legend { padding: 0; margin-bottom: 8px; }
.dd-list { list-style: none; margin: 0; padding: 0; max-height: 292px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; outline: none; }
.dd-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.dd-group:first-child { padding-top: 4px; }
.dd-opt { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-radius: var(--radius); font-size: 14px; cursor: pointer; }
.dd-opt:hover, .dd-opt.active { background: var(--hover); }
.dd-opt[aria-selected="true"] { font-weight: 600; }
.dd-check { width: 16px; height: 16px; color: var(--accent-text); visibility: hidden; }
.dd-opt[aria-selected="true"] .dd-check { visibility: visible; }
.dd-none { padding: 14px 10px; color: var(--text-2); font-size: 14px; }
.dd [hidden] { display: none; }
@media (max-width: 760px) {
  .dd-opt { min-height: 44px; }
  .up-edit.two { grid-template-columns: minmax(0, 1fr); }
  .up-row .seg-radio label { padding: 6px 10px; }
  .up-art { width: 48px; height: 30px; }
  .up-keep .facts { grid-template-columns: 1fr; }
  .up-keep .facts > div:nth-last-child(2) { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .up-fine { text-align: left; }
  .up-mode.wide { display: flex; flex-direction: column; justify-self: stretch; }
  .up-mode.wide label { text-align: center; padding-block: 9px; }
  .read-back .p-banner { order: 0; }
}
@media (prefers-reduced-motion: reduce) { .dd-btn > .i { transition: none; } }

/* ---------- extras ---------- */
.mask-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mask-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.mask-preview { width: 100%; height: auto; aspect-ratio: 2 / 1; display: block; image-rendering: pixelated; }
.mask-body { padding: 12px 14px; display: grid; gap: 4px; }
.mask-body h2 { font-size: 15px; }
.mask-body .mono { color: var(--text-2); overflow-wrap: anywhere; }
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.banner-tile { display: grid; gap: 8px; color: var(--text); text-decoration: none; }
.banner-tile img { width: 100%; aspect-ratio: 5 / 2; object-fit: contain; background: var(--osd); border-radius: var(--radius); image-rendering: pixelated; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.banner-tile:hover img { transform: translateY(-2px); }
.banner-tile span { display: flex; flex-direction: column; font-size: 13.5px; }
.banner-tile small { color: var(--text-2); }

/* ---------- footer, tabbar, dock, toasts, dialog ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-in { max-width: var(--max); margin: 0 auto; padding: 40px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 32px 72px; font-size: 14px; }
.footer .brand { color: var(--text); margin-bottom: 10px; }
.footer p { color: var(--text-2); }
.footer h3 { font-size: 13px; margin-bottom: 8px; }
.footer nav { display: grid; gap: 6px; align-content: start; }
.footer nav a { color: var(--text-2); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.tabbar { display: none; }
.dock { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: calc(var(--radius) + 6px); background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-menu); font-size: 13px; }
.dock-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius); background: rgb(255 255 255 / .1); color: inherit; cursor: pointer; font-weight: 600; }
.dock-toggle .i { width: 16px; height: 16px; }
.dock-body { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 8px; }
.dock.closed .dock-body { display: none; }
.dock .switch { padding-right: 8px; border-right: 1px solid rgb(255 255 255 / .18); margin-right: 4px; }
.dock .switch .track { background: rgb(255 255 255 / .25); }
.dock .switch input:checked + .track { background: var(--dock-on); }
#toasts { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: calc(var(--radius) + 4px); background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-menu); font-size: 14px; font-weight: 500; animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); transition: opacity .3s, transform .3s; max-width: min(520px, calc(100vw - 32px)); }
.toast .i { color: var(--dock-on); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dialog { border: 0; padding: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-menu); width: min(420px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgb(10 12 18 / .5); }
.dialog-in { padding: 22px; display: grid; gap: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { font: var(--h3); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .search { max-width: 300px; }
  .profile-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
}
@media (max-width: 1020px) {
  .mainnav { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; color: var(--text-2); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--accent-text); }
  .footer { padding-bottom: 64px; }
  .dock { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .selbar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  #toasts { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
  .browse { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: auto 0 0 0; top: auto; z-index: 70; max-height: 86vh; padding: 0 20px; background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-menu); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
  .filters.open { transform: none; visibility: visible; }
  body.sheet-open::after { content: ''; position: fixed; inset: 0; z-index: 65; background: rgb(10 12 18 / .45); }
  .filters-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface); padding: 14px 0 10px; z-index: 1; }
  .filters-head h2 { font-size: 17px; }
  .filters-foot { display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
  .filters-foot .btn { flex: 1; }
  .filters-btn { display: inline-flex; border-color: var(--line-2); }
  .profile-layout, .feed-layout, .upload-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-side { position: static; }
  .personal, .split { grid-template-columns: 1fr; gap: 32px; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar-in { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .brand { order: 1; }
  .top-actions { order: 2; flex: 1 0 auto; justify-content: flex-end; }
  .search { order: 4; flex: 1 1 160px; max-width: none; margin: 0; }
  .upload-btn span, .signin-btn { font-size: 13px; }
  .upload-btn span { display: none; }
  .upload-btn { width: 38px; padding: 0; }
  .page { padding: 20px 16px 96px; }
  .block { margin-top: 36px; }
  .suggest { min-width: 0; }
  .p-head { grid-template-columns: 1fr; }
  .p-banner { width: 100%; max-width: 360px; order: -1; }
  .p-stats { margin-left: 0; width: 100%; }
  .p-actions .btn.big { flex: 1 1 100%; }
  .pack-head, .creator-head { grid-template-columns: 1fr; }
  .creator-head .ph-stats { grid-column: auto; grid-row: auto; }
  .ph-stats { gap: 20px; flex-wrap: wrap; }
  .creator-row { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .cr-consoles { display: none; }
  .cr-stats { grid-column: 1; gap: 16px; }
  .creator-row .follow { grid-row: 1; grid-column: 2; }
  .facts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .toolbar .sort, .results-bar .sort { margin-left: 0; }
  .results-bar .results-search { flex-basis: 100%; max-width: none; order: -2; }
  .filter-input { max-width: none; flex-basis: 100%; }
  .pager .btn span { display: none; }
  .creator-mini { grid-template-columns: 1fr; }
  .console-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-table tbody th { width: 52%; }
  .selbar { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  @keyframes rise { from { transform: translateY(16px); opacity: 0; } }
  /* profile tables become stacked rows */
  .plist thead { display: none; }
  .plist, .plist tbody { display: block; }
  .plist tr { display: grid; grid-template-columns: auto 1fr auto; column-gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .plist td { display: block; padding: 0; border: 0; }
  .plist .c-check { grid-row: 1 / span 3; padding-top: 2px; width: auto; }
  .plist .c-rank { grid-row: 1 / span 3; width: auto; padding-top: 2px; }
  .plist .c-name { grid-column: 2; }
  .plist .c-act { grid-column: 3; grid-row: 1 / span 3; width: auto; }
  .plist .c-date, .plist .c-num, .plist .c-look { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* art boxes keep their ratio whatever the banner's native size */
.pcard-art, .kcard-art, .thumb { position: relative; overflow: hidden; }
.pcard-art img, .kcard-art img, .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
body:has(.selbar:not([hidden])) .dock { display: none; }

/* ---------- artwork: screenshot → banner → console logo ---------- */
.art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art.banner { background: var(--osd); }
.art.banner img { object-fit: contain; image-rendering: pixelated; inset: 8% 4%; width: 92%; height: 84%; }
.art.logo { display: grid; place-items: center; background: var(--surface-2); }
.art.logo .cicon { width: 44px; height: 44px; color: var(--text-3); }
.art.thumb { width: 96px; flex: none; border-radius: 6px; }
.art.thumb.logo .cicon { width: 26px; height: 26px; }
.art.tiny { width: 72px; flex: none; border-radius: 4px; }
.art.tiny.logo .cicon { width: 20px; height: 20px; }
.pcard-art, .kcard-art { aspect-ratio: 16 / 9; display: block; }
.pcard-art .art, .kcard-art .art { height: 100%; }

/* ---------- Send to RetroTINK (matches the production button: system font, black, Signal Bridge mark) ---------- */
.rb-glyph { display: inline-block; width: 24px; aspect-ratio: 128 / 80; flex: none; background: currentColor; -webkit-mask: var(--rb-mark) center / contain no-repeat; mask: var(--rb-mark) center / contain no-repeat; }
.rb-glyph.lg { width: 32px; }
.send-tink { --send-bg: #000; --send-fg: #fff; --send-hover: #252525; position: relative; display: inline-flex; align-items: stretch; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: 0; border-radius: var(--radius); }
[data-theme="dark"] .send-tink { --send-bg: #fff; --send-fg: #000; --send-hover: #e5e5e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .send-tink { --send-bg: #fff; --send-fg: #000; --send-hover: #e5e5e5; } }
.st-action, .st-trigger { display: inline-flex; align-items: center; border: 1px solid var(--send-bg); background: var(--send-bg); color: var(--send-fg); font: inherit; cursor: pointer; transition: background .15s, border-color .15s; }
.st-action { gap: 10px; min-height: 40px; padding: 0 14px; border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; font-weight: 600; text-align: left; flex: 1; min-width: 0; }
.st-action:hover, .st-trigger:hover, .st-trigger[aria-expanded="true"] { background: var(--send-hover); border-color: var(--send-hover); }
.st-trigger { justify-content: center; width: 40px; padding: 0; border-radius: 0 var(--radius) var(--radius) 0; border-left-color: color-mix(in srgb, var(--send-fg) 30%, var(--send-bg)); }
.st-trigger .i { width: 16px; height: 16px; }
.send-tink:not(:has(.st-trigger)) .st-action { border-radius: var(--radius); }
.st-label { display: inline-flex; gap: 5px; align-items: baseline; flex-wrap: wrap; }
.st-via { font-weight: 400; opacity: .72; white-space: nowrap; }
.send-tink.xl .st-action { min-height: 58px; padding: 0 20px; gap: 14px; }
.send-tink.xl .st-label { flex-direction: column; gap: 1px; }
.send-tink.xl .st-main { font-size: 17px; }
.send-tink.xl .st-via { font-size: 13px; }
.send-tink.xl .rb-glyph { width: 34px; }
.send-tink.xl .st-trigger { width: 52px; }
.send-tink.sm .st-action { min-height: 36px; font-size: 13.5px; }
.send-tink.sending .st-action { cursor: progress; background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--send-fg) 18%, transparent), transparent); background-size: 200% 100%; animation: sending 1s linear infinite; }
@keyframes sending { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.send-tink.sent { --send-bg: #15803d; --send-hover: #15803d; --send-fg: #fff; }
.st-menu { min-width: 300px; }
.st-option { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; min-height: 60px; }
.st-option span { display: flex; flex-direction: column; }
.st-option small { color: var(--text-2); font-size: 12.5px; }
.st-option[aria-checked="true"] { background: var(--accent-soft); }
.st-opt-icon { display: grid; place-items: center; }
.st-check { width: 16px; height: 16px; color: var(--accent-text); }
.send-mini .rb-glyph { width: 20px; }
.light-only { display: block; }
.dark-only { display: none; }
[data-theme="dark"] .light-only { display: none; }
[data-theme="dark"] .dark-only { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .light-only { display: none; } :root:not([data-theme="light"]) .dark-only { display: block; } }

/* split download button */
.split-btn { position: relative; display: inline-flex; }
.split-btn > .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.split-btn > .split-trigger { width: 36px; padding: 0; border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; position: relative; }
.split-btn > .split-trigger::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.split-trigger .i { width: 16px; height: 16px; }
.dl-menu { min-width: 320px; }
.ver-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 16px; align-items: start; }
.vi-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.vi-body { display: flex; flex-direction: column; }
.vi-body small { color: var(--text-2); font-size: 12.5px; }

/* header connection pill */
.device { position: relative; }
.device-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border: 1px solid var(--topbar-line); border-radius: 999px; background: transparent; color: var(--topbar-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.device-pill:hover { background: var(--topbar-hover); }
.device-pill .rb-glyph { width: 20px; }
.dp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.on .dp-dot, .device-pill.on .dp-dot { background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / .18); }
.device-menu { min-width: 280px; }
.dm-head { display: flex; align-items: center; gap: 12px; padding: 10px; }
.dm-head div { display: flex; flex-direction: column; }
.dm-head small, .dm-line { color: var(--text-2); font-size: 12.5px; }
.dm-line { padding: 0 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* home sync band */
.sync-band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 32px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.sb-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: #000; color: #fff; }
.sb-icon .rb-glyph { width: 30px; }
.sync-band h2 { font: var(--h3); }
.sync-band p { color: var(--text-2); font-size: 14px; margin-top: 2px; }

/* profile hero: gallery + send-first summary */
.p-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 36px; align-items: start; margin-bottom: 8px; }
.p-gallery { margin: 0; min-width: 0; }
.g-main { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.g-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-main.banner { background: var(--osd); }
.g-main.banner img { object-fit: contain; image-rendering: pixelated; inset: 14% 8%; width: 84%; height: 72%; }
.g-main.logo { display: grid; place-items: center; background: var(--surface-2); }
.g-main.logo .cicon { width: 96px; height: 96px; color: var(--text-3); }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.g-thumb { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; opacity: .72; transition: opacity .15s, border-color .15s; }
.g-thumb:hover { opacity: 1; }
.g-thumb[aria-current] { border-color: var(--accent); opacity: 1; }
.g-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-thumb.banner-thumb { background: var(--osd); }
.g-thumb.banner-thumb img { object-fit: contain; image-rendering: pixelated; }
.p-gallery figcaption { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.p-summary h1 { font: var(--h1); letter-spacing: var(--h1-track); overflow-wrap: anywhere; }
.p-summary .p-meta { margin-top: 8px; }
.p-cta { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.p-cta .send-tink { width: 100%; }
.send-note { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.p-secondary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.p-summary .p-stats { margin: 14px 0 0; flex-wrap: wrap; }
.pack-head .send-tink.xl { min-width: 320px; }
.pack-nav .send-tink { width: 100%; }

/* pack screenshot strip */
.strip-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.strip-item { flex: none; width: 260px; display: grid; gap: 6px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.strip-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #000; }
.strip-item.banner img { object-fit: contain; background: var(--osd); image-rendering: pixelated; }
.strip-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-item:hover span { text-decoration: underline; }
.shots-strip { margin-top: 28px; }
.shots-strip .muted { margin-top: 6px; }

.mask-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- sync page ---------- */
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.card-title { font: var(--h3); margin: 0 0 10px; }
.card-title:not(:first-child) { margin-top: 22px; }
.sync-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sync-main { display: grid; gap: 16px; }
.sync-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.sync-side .send-tink { width: 100%; }
.sync-device { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.rb-logo { height: 20px; width: auto; }
.sd-status { display: flex; align-items: center; gap: 10px; }
.sd-status > span:nth-child(2) { display: flex; flex-direction: column; }
.sd-status small { color: var(--text-2); font-size: 13px; }
.change-list { list-style: none; margin: 0; padding: 0; }
.change-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.change-list li:first-child { border-top: 0; }
.change-list a { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.change-list a span { display: flex; flex-direction: column; min-width: 0; }
.change-list strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-list small { color: var(--text-2); font-size: 12.5px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; }
.choice input { margin: 3px 0 0; accent-color: var(--accent); }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--text-2); font-size: 13px; }
.choice.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.fopt.inc { margin: 0; padding: 6px 4px; }
.sync-note { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.sync-note .i { width: 15px; height: 15px; color: var(--ok); }
.sync-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.sync-sum dt { font-size: 12px; color: var(--text-2); }
.sync-sum dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sync-progress .bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sync-progress .bar span { display: block; height: 100%; width: 0; background: #22c55e; transition: width .09s linear; }
.sp-text { margin-top: 6px; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-tree { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font: 13px/1.5 var(--font-mono); }
.tree-title { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 4px; font-family: var(--font); }
.sd-tree ul { list-style: none; margin: 0; padding-left: 14px; }
.sd-tree > ul { padding-left: 0; }
.sd-tree li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sd-tree li > ul { flex-basis: 100%; }
.sd-tree .i { width: 14px; height: 14px; color: var(--text-3); }
.sd-tree small { margin-left: auto; color: var(--text-3); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.dialog-in h2 { font: var(--h2); }

@media (max-width: 1180px) { .dp-label { display: none; } .device-pill { padding: 0 9px; } }
@media (max-width: 1020px) {
  .p-hero, .sync-layout { grid-template-columns: minmax(0, 1fr); }
  .sync-side { position: static; }
}
@media (max-width: 760px) {
  .sync-band { grid-template-columns: auto minmax(0, 1fr); }
  .sb-btn { grid-column: 1 / -1; }
  .pack-head .send-tink.xl { min-width: 0; width: 100%; }
  .p-cta { padding: 14px; }
  .sync-sum { grid-template-columns: 1fr 1fr 1fr; }
  .art.thumb { width: 80px; }
  .selbar .st-main { font-size: 13px; }
}
.strip-item img { height: auto; display: block; }
.sync-main { grid-template-columns: minmax(0, 1fr); } .sync-main > .card, .sync-side { min-width: 0; } .change-list a { flex: 1; }

/* ---------- SD card modes + new card setup ---------- */
.sb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-stepper a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.choice > span:nth-child(2) { flex: 1; min-width: 0; }
.choice strong { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.choice strong > .i, .choice strong > .rb-glyph { width: 18px; height: 18px; color: var(--text-2); flex: none; }
.choice .rb-glyph.inline { background: var(--text); }
.choice .mono { font-size: 12.5px; word-break: break-all; }
.choice > .tag, .choice > .btn { align-self: center; flex: none; }
.rec { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.choice.on .rec { background: var(--surface); }
.setup-nav { display: flex; justify-content: space-between; gap: 12px; }
.setup-side .card-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.setup-side .card-title .i { width: 18px; height: 18px; }
.setup-sum { margin: 0; display: grid; }
.setup-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.setup-sum > div:first-child { border-top: 0; }
.setup-sum dt { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.setup-sum dt .i { width: 15px; height: 15px; }
.setup-sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.setup-sum dd small { margin-left: 8px; font-weight: 400; color: var(--text-3); }
.setup-sum .total { border-top: 1px solid var(--line-2); }
.setup-sum .total dt { color: var(--text); font-weight: 700; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.pick-head div { display: flex; gap: 4px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; font-size: 13.5px; min-width: 0; }
.pick input { margin: 0; accent-color: var(--accent); }
.pick .cicon { flex: none; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.inc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.inc-row input { margin: 3px 0 0; accent-color: var(--accent); }
.ir-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ir-text strong { font-size: 14.5px; }
.ir-text small { color: var(--text-2); font-size: 13px; }
.inc-row .count { color: var(--text-2); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inc-row.disabled { opacity: .55; cursor: not-allowed; }
.section-head .btn.small + .btn.small { margin-left: 4px; }
.demo-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.demo-note .i { width: 14px; height: 14px; }
.recap { margin: 0; }
.recap > div { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.recap > div:first-child { border-top: 0; }
.recap dt { color: var(--text-2); }
.recap dd { margin: 0; font-weight: 600; }
.xl-btn { min-height: 52px; font-size: 15px; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.phases li { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.phases .i { width: 16px; height: 16px; }
.phases .ph-run, .phases .ph-done, .phases li.run .ph-wait, .phases li.done .ph-wait { display: none; }
.phases li.run { color: var(--text); font-weight: 600; }
.phases li.run .ph-run { display: block; color: var(--accent); animation: spin 1s linear infinite; }
.phases li.done { color: var(--text-2); }
.phases li.done .ph-done { display: block; color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .phases li.run .ph-run { animation: none; } }
@media (max-width: 760px) {
  .recap > div { grid-template-columns: minmax(0, 1fr) auto; }
  .recap dd { grid-column: 1; grid-row: 2; }
  .setup-nav .btn.primary { flex: 1; justify-content: center; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-actions { grid-column: 1 / -1; }
  .sb-actions .btn { flex: 1; justify-content: center; }
}
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.choice strong > .rb-glyph { width: 22px; height: auto; }
.card-lede { display: flex; gap: 8px; align-items: flex-start; margin: -2px 0 14px; }
.card-lede .i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.choice strong { display: block; }
.choice strong > .i, .choice strong > .rb-glyph { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.choice strong .rec { display: inline-block; margin-left: 4px; vertical-align: 1px; }
.fw-row { border-top: 0; padding-top: 0; }
.opt { font-style: normal; font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 4px; }
.field input[type=file] { font-size: 13px; }
.hint.note { color: var(--text-2); align-items: flex-start; } .hint.note .i { margin-top: 2px; flex: none; }
/* console picker: give names room; wrap to two lines instead of truncating */
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: 420px; }
.pick { align-items: center; min-height: 44px; }
.pick .pk-name { flex: 1; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 760px) { .pick-grid { grid-template-columns: minmax(0, 1fr); max-height: none; } }
.choice small:empty { display: none; }
.setup-side .steps.small { font-size: 13px; padding-left: 18px; }
.fw-row { display: grid; gap: 10px; }
.fw-row .inc-row { border-top: 0; padding: 0; }
.fw-ver { display: flex; align-items: center; gap: 10px; margin-left: 26px; font-size: 13.5px; color: var(--text-2); }
.fw-ver select { width: auto; min-width: 220px; min-height: 36px; padding: 6px 32px 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background-color: var(--surface); color: var(--text); font: inherit; }
.fw-ver select:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) { .fw-ver { margin-left: 0; flex-wrap: wrap; } .fw-ver select { width: 100%; min-width: 0; } }
.fw-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); font-size: 13.5px; }
.fw-warn .i { margin-top: 1px; flex: none; }
.setup-side .fw-warn { margin-top: 0; }
.tree-toggle { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tree-toggle > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; }
.tree-toggle > summary::-webkit-details-marker { display: none; }
.tree-toggle > summary .i { width: 16px; height: 16px; color: var(--text-2); }
.tree-toggle > summary .chev { margin-left: auto; transition: transform .15s; }
.tree-toggle[open] > summary .chev { transform: rotate(180deg); }
.tree-toggle > summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.tree-toggle .sd-tree { margin: 0 8px 8px; }
@media (prefers-reduced-motion: reduce) { .tree-toggle > summary .chev { transition: none; } }

/* ---------- setup flow: second pass ---------- */
.mode-seg { margin: 0 0 24px; }
.seg-radio label { position: relative; padding: 6px 14px; border-radius: var(--radius); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.seg-radio input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-radio label:hover { color: var(--text); background: var(--hover); }
.seg-radio label:has(:checked) { background: var(--seg-on); color: var(--seg-on-text); font-weight: 600; }
.seg-radio label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pair { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.card-title + .pair { border-top: 0; padding-top: 2px; }
.pair:last-child { padding-bottom: 0; }
.pair-label { font-size: 14.5px; font-weight: 600; }
.pick-wrap { padding: 0 0 6px; }
.pick-wrap .pick-head { margin-top: 6px; }
.pick-grid { max-height: none; overflow: visible; padding: 0; }
.pick small { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pick .pk-name small { display: block; }
.device-note { margin: 12px 0 0; }
.recap a { color: var(--accent-text); font-size: 13px; text-underline-offset: 3px; }
.setup-stepper { flex-wrap: nowrap; }
.setup-done { display: grid; gap: 14px; max-width: 640px; }
.setup-done .card-title, .setup-done p { margin: 0; }
.setup-done .fw-warn { margin: 0; }
.setup-done-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 1020px) {
  .setup-review { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .setup-review .sync-main { display: contents; }
  .setup-review .sync-main > .card { order: 1; }
  .setup-review .setup-side { order: 2; }
  .setup-review .setup-nav { order: 3; }
}
@media (max-width: 760px) {
  .setup-stepper { gap: 6px; }
  .setup-stepper li:not(.on) a > span:not(.sn) { display: none; }
  .setup-stepper li:not(.on) { padding-right: 6px; }
  .mode-seg { display: flex; }
  .mode-seg a { flex: 1; text-align: center; }
}

/* ---------- site pass ---------- */
.creator-cols { display: none; }
@media (min-width: 761px) {
  .creator-list { display: grid; grid-template-columns: minmax(220px, 1.4fr) 1fr auto auto; column-gap: 20px; }
  .creator-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
  .creator-cols { display: grid; padding-block: 8px; border-top: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
  .creator-cols:hover { background: none; }
  .cr-stats { gap: 0; }
  .cr-stats > * { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
  .creator-row:not(.creator-cols) .cr-stats dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .creator-row:not(.creator-cols) .cr-stats dd { font-weight: 600; }
}
/* home: packs always fill whole rows */
@media (min-width: 1100px) { .home-packs { grid-template-columns: repeat(4, minmax(0, 1fr)); } .home-packs > :nth-child(n + 5) { display: none; } }
@media (min-width: 761px) and (max-width: 1099px) { .home-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- connection switcher in the top bar ---------- */
.device-pill .i { width: 16px; height: 16px; }
.device-pill .dp-chev { width: 14px; height: 14px; opacity: .7; margin-left: -2px; }
.device-pill[aria-expanded="true"] .dp-chev { transform: rotate(180deg); }
.dm-head { justify-content: space-between; }
.dm-methods { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.sd-method { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.device-menu { min-width: 320px; }
.dm-head small { white-space: nowrap; }
@media (max-width: 600px) { .device-menu { position: fixed; top: 58px; left: 12px; right: 12px; min-width: 0; } }
.sb-icon { background: var(--surface-2); color: var(--text); }
.sb-icon .i { width: 28px; height: 28px; stroke-width: 1.75; }
.setup-sum dd.none { font-weight: 400; color: var(--text-3); }

/* ---------- sync page: nothing to compare against yet ---------- */
.sync-ask { display: grid; gap: 16px; }
.sync-ask .card-title { margin: 0; }
.sa-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-since { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-weight: 600; font-size: 14px; }
.sa-since input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.sa-connect { justify-self: start; }
.sa-connect .btn .i { width: 16px; height: 16px; }
.fw-ver { margin-left: 6px; color: var(--text-2); font-size: 13px; }
.sync-main .fopt.inc + .pair { margin-top: 6px; }
.fopt.inc .fl { display: block; }
.fw-ver { display: inline; }
.sa-connect .menu { min-width: 320px; }
.sa-connect { justify-self: stretch; max-width: 360px; }

/* ---------- update page: one content-selection card ---------- */
.sync-main .pair { flex-wrap: wrap; gap: 8px 16px; }
.seg-radio label.off { opacity: .45; cursor: not-allowed; }
.seg-radio label.off:hover { background: none; color: var(--text-2); }
.seg-radio label.off input { cursor: not-allowed; }
.pair-check { cursor: pointer; }
.pair-check input { width: 18px; height: 18px; margin: 0 4px 0 0; accent-color: var(--accent); }
.sync-main .pair + .sync-note { margin-top: 14px; }
.sync-side .setup-sum { margin-bottom: 14px; }
@media (max-width: 760px) { .scope-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .scope-seg label { text-align: center; } }
.sync-pick { margin: 4px 0 12px; }
