:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #ebe7e0;
  --text: #1d1b19;
  --muted: #6b655e;
  --border: #d9d3c9;
  --accent: #b5832a;
  --accent-text: #ffffff;
  --badge: rgba(20, 18, 16, 0.82);
  --badge-text: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1b1d22;
    --surface-2: #262930;
    --text: #ece8e1;
    --muted: #9a958d;
    --border: #33363e;
    --accent: #d7a548;
    --accent-text: #15130f;
    --badge: rgba(0, 0, 0, 0.78);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0 16px 32px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1.3rem; margin: 0 0 2px; }
h3 { font-size: 0.95rem; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
a { color: var(--accent); }
button, select, input { font: inherit; color: inherit; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0 10px;
}
.brand p { margin: 2px 0 0; font-size: 0.88rem; }
.view-toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.view-toggle button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.view-toggle button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.chip {
  flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.chip .n { opacity: 0.75; margin-left: 4px; font-size: 0.85em; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
#search {
  flex: 1 1 260px; min-width: 0; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
}
.filters { flex: 1 1 100%; }
.filters summary {
  cursor: pointer; display: inline-block; padding: 6px 2px; color: var(--muted); user-select: none;
}
.pill {
  display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font-size: 0.8em; text-align: center;
}
.filter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px;
  padding: 8px 0 4px; align-items: end;
}
.filter-grid label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); gap: 3px; }
.filter-grid select {
  padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  min-width: 0;
}
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 8px 0; text-align: left; }
.count { margin: 8px 0; font-size: 0.85rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; } }

.tile {
  display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; min-width: 0;
}
.art {
  position: relative; aspect-ratio: 5 / 7; border-radius: 7px; overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow);
}
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art.landscape img { object-fit: contain; }
.art.noimg { display: grid; place-items: center; padding: 10px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.tile:focus-visible .art { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile.missing .art img { filter: grayscale(1); opacity: 0.35; }
.cap { font-size: 0.8rem; line-height: 1.25; min-width: 0; }
.cap .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cap .meta { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); }

.badges { position: absolute; inset: 6px 6px auto 6px; display: flex; justify-content: space-between; gap: 4px; pointer-events: none; }
.badges .left, .badges .right { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.badges .right { align-items: flex-end; }
.b {
  background: var(--badge); color: var(--badge-text); font-size: 0.7rem; font-weight: 700;
  padding: 1px 6px; border-radius: 5px; letter-spacing: 0.02em;
}
.b.foil { background: linear-gradient(90deg, #f6d365, #fda085, #a1c4fd, #c2e9fb); color: #1b1407; }
.b.lang { background: #2f6fd1; }
.b.proxy { background: #a33a3a; }

/* Foil shimmer: a moving rainbow sheen over foil copies. Static when reduced motion is preferred. */
.tile.foil .art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 0, 170, 0.22) 38%, rgba(0, 230, 255, 0.24) 50%,
              rgba(255, 240, 0, 0.22) 62%, transparent 75%);
  background-size: 300% 300%; mix-blend-mode: color-dodge; animation: sheen 5s linear infinite;
}
@keyframes sheen { from { background-position: 100% 100%; } to { background-position: 0% 0%; } }
@media (prefers-reduced-motion: reduce) {
  .tile.foil .art::after { animation: none; background-position: 50% 50%; }
}

#sentinel { height: 1px; }

dialog {
  width: min(920px, calc(100vw - 24px)); padding: 0;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);   /* dvh = the visible height; plain vh includes the mobile URL bar */
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  scrollbar-color: var(--border) transparent;
}
/* Phones keep a margin to tap outside, sized to the *visible* viewport (dvh) so the top edge and the
   close button never sit under the browser's URL bar. */
@media (max-width: 640px) {
  dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
/* High-contrast close button: accent fill, ring, shadow; 44px = comfortable touch target. Stays pinned while scrolling. */
.close {
  /* Sticky block with a negative bottom margin overlays the content instead of floating (a float made
     every line beside it wrap short). */
  position: sticky; top: 10px; display: block; margin: 10px 10px -54px auto; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--accent); color: var(--accent-text);
  font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer; z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.close:hover { filter: brightness(1.1); }
.close:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.detail-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; padding: 20px; }
@media (max-width: 640px) { .detail-body { grid-template-columns: 1fr; padding: 14px; } .detail-art { max-width: 300px; margin: 0 auto; } }
.detail-art img { width: 100%; border-radius: 12px; display: block; }
.rules { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.rules:empty { display: none; }
.kw {
  display: inline-block; font-size: 0.78em; font-weight: 700; letter-spacing: 0.03em; padding: 0 5px;
  border-radius: 4px; background: var(--text); color: var(--surface);
}
.flavor { font-style: italic; color: var(--muted); }
.flavor:empty { display: none; }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th, .table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dom { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 0.78rem; margin-right: 4px; color: #fff; }
.dom.Fury { background: #c8382f; } .dom.Calm { background: #3c9b5b; } .dom.Mind { background: #2f6fd1; }
.dom.Body { background: #d9822b; } .dom.Chaos { background: #8a49c4; } .dom.Order { background: #b39b25; }

footer { margin-top: 32px; text-align: center; }

/* ---------- phase 3: editing ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  cursor: pointer; white-space: nowrap; list-style: none;
}
.btn::-webkit-details-marker { display: none; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 0.85rem; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.danger { color: #d24b4b; border-color: color-mix(in srgb, #d24b4b 50%, var(--border)); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border: 1px solid var(--accent);
}
.chip.new { border-style: dashed; color: var(--muted); }
.chip .kind { font-size: 0.75em; opacity: 0.7; margin-right: 4px; }

.loc-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border);
}
.loc-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.b.in { background: var(--accent); color: var(--accent-text); }

.stacks { display: flex; flex-direction: column; gap: 8px; }
.stacks .empty { margin: 0; }
.stack { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.stack.in-target { border-color: var(--accent); }
.stack-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stack-head .loc { font-weight: 600; margin-right: auto; }
.stack-head .qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.tag {
  font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--border);
}
.tag.foil { background: linear-gradient(90deg, #f6d365, #fda085, #a1c4fd, #c2e9fb); color: #1b1407; border: 0; }
.tag.lang { background: #2f6fd1; color: #fff; border: 0; }
.tag.proxy { background: #a33a3a; color: #fff; border: 0; }
.stack-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stack-actions .step { min-width: 36px; font-size: 1.1rem; font-weight: 700; }
.stack-panel { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.stack-panel label, .add-form label, #fd-body label { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: var(--muted); }
.stack-panel label.check, .add-form label.check, #fd-body label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 0.88rem; }
.stack-panel select, .stack-panel input, .add-form select, .add-form input, #fd-body select, #fd-body input {
  min-height: 36px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0;
}
.stack-panel input[type="number"], .add-form input[type="number"] { width: 5.5em; }
.stack-panel input[type="checkbox"], .add-form input[type="checkbox"], #fd-body input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; }

.add-wrap { margin-top: 10px; }
.add-wrap > summary { display: inline-flex; }
.add-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; align-items: end;
  margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px;
}

.history-wrap { margin-top: 16px; }
.history-wrap > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.history { margin: 8px 0 0; padding-left: 18px; font-size: 0.85rem; }
.history li { margin-bottom: 4px; }
.history time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }

.form-dialog { width: min(440px, calc(100vw - 24px)); }
.form-dialog form { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
#fd-body { display: flex; flex-direction: column; gap: 10px; }
#fd-body p { margin: 0; }
.fd-actions { display: flex; justify-content: flex-end; gap: 8px; }
.error { color: #d24b4b; }

.toast {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; z-index: 1000;
  background: var(--text); color: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); font-size: 0.9rem;
}
.toast.error { background: #a33a3a; color: #fff; }
/* The toast is a popover so it renders in the top layer, above an open modal dialog. */
.toast[popover] { inset: auto; margin: 0; border: 0; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); }

/* ---------- phase 4: value ---------- */
.value-line { margin: 2px 0 0; font-size: 0.95rem; }
.value-line #value-total { font-weight: 700; }
.value-line .link { padding: 0 0 0 6px; font-size: 0.85rem; }
.stack-head .worth { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.cap .meta .proxy-price { font-style: italic; }
.spark { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 4px; }
.spark figure { margin: 0; }
.spark svg { display: block; width: 160px; height: 44px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--accent); }
.spark figcaption { font-size: 0.75rem; color: var(--muted); }
#values { width: min(640px, calc(100vw - 24px)); }
.values-body { padding: 4px 20px 20px; }
.values-body h2 { margin-top: 14px; }
#v-table td .sub { display: block; font-size: 0.75rem; color: var(--muted); }
#v-table tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
.v-refresh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.movers ol { margin: 4px 0 0; padding-left: 18px; font-size: 0.86rem; }
.movers li { margin-bottom: 3px; }
.movers .up { color: #3c9b5b; } .movers .down { color: #d24b4b; }
.movers button.link { padding: 0; text-align: left; font-size: inherit; }
@media (max-width: 480px) {
  #v-table .usd { display: none; }   /* phones: CAD is the headline; each card still shows USD */
  .values-body { padding: 4px 14px 16px; }
}

/* ---------- phase 5: quick add + import ---------- */
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#quick, #import { width: min(720px, calc(100vw - 24px)); }
.panel-body { padding: 4px 20px 20px; }
.panel-body h2 { margin-top: 14px; }
.qa-settings { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0 12px; }
.qa-settings label, .imp-row label { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: var(--muted); }
.qa-settings label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 0.88rem; min-height: 36px; }
.qa-settings select, .imp-row select, .imp-row input {
  min-height: 36px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0;
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); font-weight: 600; }
#qa-search {
  width: 100%; padding: 11px 12px; font-size: 1.05rem; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface);
}
.qa-hint { margin: 6px 0 8px; }
@media (hover: none) { .qa-hint { display: none; } }   /* touch screens: the buttons are the interface */
.qa-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qa-results li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
}
.qa-results li[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.qa-results li.flash { animation: flash 0.6s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); } }
@media (prefers-reduced-motion: reduce) { .qa-results li.flash { animation: none; } }
.qa-results img { width: 40px; height: 56px; object-fit: cover; border-radius: 4px; display: block; background: var(--surface); }
.qa-results .qa-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-results .qa-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-results .qa-btns { display: flex; gap: 6px; }
.qa-empty { color: var(--muted); font-size: 0.9rem; padding: 8px 2px; }
.qa-log { margin: 6px 0 0; padding-left: 20px; font-size: 0.88rem; }
.qa-log li { margin-bottom: 4px; }
.qa-log .link { padding: 0 0 0 8px; font-size: 0.85rem; }
.qa-log li.undone { text-decoration: line-through; color: var(--muted); }
.imp-dest { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.imp-dest legend { padding: 0 4px; font-weight: 600; }
.imp-dest label.check, #imp-allow-wrap { display: flex; align-items: center; gap: 8px; }
.imp-row { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 26px; }
#imp-problems { max-height: 180px; overflow: auto; margin: 6px 0 0; padding-left: 18px; }
.qa-results li.qa-empty { display: block; border: 0; background: none; padding: 8px 2px; color: var(--muted); }
/* Dialog titles stop short of the pinned close button. */
.panel-body h2, .values-body h2 { padding-right: 56px; }

/* ---------- promo versions ---------- */
.b.promo { background: linear-gradient(90deg, #7b4bd6, #c048a8); color: #fff; }
.tag.promo { background: linear-gradient(90deg, #7b4bd6, #c048a8); color: #fff; border: 0; }
.stack-head .promo-of { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.promo-info:empty { display: none; }
.promo-info { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.promo-info .promo-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 0.88rem; }
.promo-info img { width: 44px; height: 62px; object-fit: cover; border-radius: 4px; display: block; }
.promo-info .muted { font-size: 0.8rem; }
.b.event { background: rgba(123, 75, 214, 0.9); color: #fff; font-weight: 600; }
.qa-settings input#qa-event { min-height: 36px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); width: 11em; max-width: 100%; }

/* ---------- phase 6: accounts & sharing ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; box-shadow: var(--shadow); }
.auth-card h1 { margin-bottom: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form h2 { margin: 0; font-size: 1.1rem; }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.auth-form input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.auth-form .btn { align-self: flex-start; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-items { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); padding: 6px; }
.menu-item { text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.link-row input { flex: 1 1 220px; min-width: 0; min-height: 36px; padding: 5px 8px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2); font-family: ui-monospace, monospace; font-size: 0.85rem; }
.link-row label { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: var(--muted); }
.link-row select { min-height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 5px 8px; }
.plain-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plain-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
#share, #friends, #account, #admin { width: min(560px, calc(100vw - 24px)); }
#ad-users td, #ad-users th { padding: 6px 4px; }
/* Read-only views (someone else's shared binder): no editing controls anywhere. */
body.readonly #qa-open, body.readonly #imp-open, body.readonly .chip.new, body.readonly .loc-actions,
body.readonly #build-banner, body.readonly .stack-actions, body.readonly #d-add-wrap, body.readonly .history-wrap,
body.readonly #value-open, body.readonly .view-toggle, body.readonly .stack-panel { display: none !important; }
