/* The shape of the back office: where things sit and how big they are. Colors, typefaces and corners come from
   the two looks (game.css and plain.css), which set the variables used here. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.45; }
h1, h2, h3, p, ul, ol, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.boot { padding: 48px 24px; text-align: center; color: var(--ink-2); }

/* ---- frame ---- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 16px; padding: 18px 14px 16px; overflow-y: auto; background: var(--side-bg); border-right: var(--rule); z-index: 40; }
.brand { display: grid; gap: 4px; padding: 4px 8px 12px; text-decoration: none; color: var(--ink); border-bottom: var(--rule); }
.brand img { display: block; width: 176px; height: auto; filter: var(--logo-filter); }
.brand-sub { font-family: var(--font-head); font-size: .74rem; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--ink-2); }
.menu { display: grid; gap: 2px; }
.menu-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 12px; color: var(--ink); text-decoration: none; font-size: 1rem; border: 1px solid transparent; }
.menu-link:hover { background: var(--hover); }
.menu-link.is-here { background: var(--here-bg); color: var(--here-ink); border-color: var(--here-line); font-weight: 600; }
.menu-badge, .tab-count, .bell-count { min-width: 24px; padding: 1px 7px; text-align: center; font-size: .78rem; font-weight: 700; line-height: 1.5; background: var(--count-bg); color: var(--count-ink); border-radius: var(--pill); }
.side-foot { margin-top: auto; padding-top: 12px; border-top: var(--rule); }
.side-foot .btn { width: 100%; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 10px clamp(14px, 3vw, 32px); background: var(--top-bg); border-bottom: var(--rule); }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn.menu-btn { display: none; }
.menu-shade { display: none; }
.screen { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 32px) 110px; outline: none; }
.practice { padding: 9px clamp(14px, 3vw, 32px); font-size: .9rem; background: var(--practice-bg); color: var(--practice-ink); border-bottom: var(--rule); }
.tabbar { display: none; }

.search { position: relative; flex: 1 1 320px; max-width: 460px; }
.search-input { width: 100%; height: 46px; padding: 0 14px; background: var(--field-bg); border: var(--field-rule); border-radius: var(--radius); }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 12px; background: var(--btn-bg); border: var(--btn-rule); border-radius: var(--radius); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--hover); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; font-weight: 700; background: var(--avatar-bg); color: var(--avatar-ink); border-radius: var(--pill); }
.pop-anchor { position: relative; }
.pop { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; padding: 8px; background: var(--pop-bg); border: var(--pop-rule); box-shadow: var(--pop-shadow); border-radius: var(--radius); }
.search-pop { left: 0; right: auto; width: min(520px, calc(100vw - 24px)); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 10px; }
.pop h3 { font-family: var(--font-head); font-size: .78rem; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--ink-2); padding: 8px 8px 4px; }
.pop-head h3 { padding: 0; }
.pop-note { padding: 12px 8px; color: var(--ink-2); }
.pop-item { display: grid; gap: 2px; padding: 10px 8px; color: var(--ink); text-decoration: none; border-top: var(--rule-soft); }
.pop-item:hover, .pop-item:focus-visible { background: var(--hover); }
.pop-item.is-new strong::before { content: "New: "; color: var(--accent-text); }
.pop-item small { color: var(--ink-2); }
.account-pop { width: 280px; display: grid; gap: 10px; padding: 14px; }
.account-who { display: grid; gap: 2px; }
.account-who small { color: var(--ink-2); overflow-wrap: anywhere; }
.account-look { display: flex; align-items: center; gap: 8px; }
.account-look > span { margin-right: auto; color: var(--ink-2); }

/* ---- score strip: only the Game look shows it ---- */
.hud { display: none; }

/* ---- page head ---- */
.page-head { margin-bottom: 22px; }
.crumb { display: inline-block; margin-bottom: 8px; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.page-head h1 { font-family: var(--font-head); font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.12; font-weight: var(--head-weight); letter-spacing: var(--head-track); outline: none; }
.lede { margin-top: 6px; max-width: 62ch; color: var(--ink-2); font-size: 1.04rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- pieces ---- */
.stack { display: grid; gap: 18px; }
.stack > * { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.cols > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
/* Six tiles: one row on a wide screen, two rows of three on a narrower one, so no tile is left alone on a row. */
.tiles.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1280px) { .tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.card { background: var(--panel); border: var(--card-rule); border-radius: var(--radius); }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding: 16px 18px 0; }
.card-head h2 { font-family: var(--font-head); font-size: 1.16rem; font-weight: var(--head-weight); letter-spacing: var(--head-track); }
.card-about { margin-top: 3px; color: var(--ink-2); font-size: .93rem; max-width: 64ch; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-body { padding: 16px 18px 18px; display: grid; gap: 14px; }
.card-body > * { min-width: 0; }
.card.flush .card-body { padding: 0; gap: 0; }
.card.flush .card-head { padding-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 9px 18px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--btn-bg); color: var(--btn-ink); border: var(--btn-rule); border-radius: var(--radius); }
.btn:hover { background: var(--btn-hover); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-line); }
.btn.quiet { background: transparent; border-color: transparent; text-decoration: underline; padding-inline: 6px; }
.btn.small { min-height: 38px; padding: 5px 12px; font-size: .9rem; }
.btn.big { min-height: 56px; padding: 12px 26px; font-size: 1.1rem; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }

.badge { display: inline-block; padding: 2px 9px; font-size: .8rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--badge-line, currentColor); border-radius: var(--pill); }
.info-wrap { position: relative; display: inline-flex; }
.info { width: 22px; height: 22px; padding: 0; font-size: .78rem; font-weight: 700; font-style: italic; line-height: 1; cursor: pointer; background: transparent; color: var(--ink-2); border: 1px solid var(--ink-2); border-radius: 50%; }
.info-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(280px, 70vw); padding: 9px 11px; font-size: .86rem; font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; line-height: 1.4; background: var(--pop-bg); color: var(--ink); border: var(--pop-rule); box-shadow: var(--pop-shadow); border-radius: var(--radius); }
.tile { display: grid; gap: 6px; align-content: start; padding: 16px 18px; background: var(--panel); border: var(--card-rule); border-radius: var(--radius); }
.tile-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: .8rem; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--ink-2); }
.tile-value { font-family: var(--font-head); font-size: 2rem; font-weight: var(--head-weight); line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* A long amount gets smaller letters so it stays on one line; an answer in words is set like a sentence. */
.tile-value.is-long { font-size: 1.55rem; white-space: nowrap; overflow-wrap: normal; }
.tile-value.is-words { font-size: 1.15rem; line-height: 1.3; }
.tile-sub { color: var(--ink-2); font-size: .9rem; }
.note { padding: 11px 14px; border: var(--note-rule); background: var(--note-bg); border-radius: var(--radius); }
.loading { display: flex; align-items: center; gap: 10px; padding: 40px 8px; color: var(--ink-2); }
.loading-mark { width: 18px; height: 18px; border: 2px solid var(--line-color); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty, .error-box { display: grid; justify-items: start; gap: 8px; padding: 28px 22px; border: var(--empty-rule); border-radius: var(--radius); color: var(--ink-2); }
.empty-title { font-family: var(--font-head); font-size: 1.14rem; color: var(--ink); }
.code { padding: 12px 14px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; background: var(--field-bg); border: var(--field-rule); border-radius: var(--radius); user-select: all; }

/* ---- fields ---- */
.field { display: grid; gap: 6px; align-content: start; }
.field-label { font-weight: 600; }
.field-optional { font-weight: 400; color: var(--ink-2); }
.field-help { color: var(--ink-2); font-size: .9rem; }
.field-error { color: var(--bad-text); font-weight: 600; font-size: .92rem; }
.input { width: 100%; min-height: 46px; padding: 9px 12px; background: var(--field-bg); border: var(--field-rule); border-radius: var(--radius); }
.input[aria-invalid] { border-color: var(--bad-line); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select { appearance: auto; }
.money-box { display: flex; align-items: center; }
.money-sign { display: grid; place-items: center; min-width: 34px; min-height: 46px; background: var(--field-bg); border: var(--field-rule); border-right: 0; color: var(--ink-2); }
.money-box .input { min-width: 0; font-variant-numeric: tabular-nums; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.switch-input { position: absolute; opacity: 0; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.switch-track { flex: none; position: relative; width: 52px; height: 30px; background: var(--switch-off); border: var(--switch-rule); border-radius: var(--switch-radius); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--switch-knob); border-radius: var(--switch-radius); transition: transform .15s; }
.switch-input:checked + .switch-track { background: var(--switch-on); }
.switch-input:checked + .switch-track .switch-knob { transform: translateX(22px); background: var(--switch-knob-on); }
.switch-input:focus-visible + .switch-track { outline: var(--focus-ring); outline-offset: 2px; }
.switch-input:disabled + .switch-track { opacity: .5; }
.switch-words, .check-words { display: grid; gap: 2px; }
.switch-label, .check-label { font-weight: 600; }
.switch-about, .check-about { color: var(--ink-2); font-size: .9rem; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check-input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; width: fit-content; max-width: 100%; justify-self: start; border: var(--btn-rule); border-radius: var(--radius); overflow: hidden; }
.seg-input { position: absolute; opacity: 0; pointer-events: none; }
.seg-label { min-height: 42px; padding: 8px 14px; cursor: pointer; background: var(--btn-bg); border-left: var(--rule-soft); font-size: .95rem; }
.seg-input:first-child + .seg-label { border-left: 0; }
.seg-input:checked + .seg-label { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg-input:focus-visible + .seg-label { outline: var(--focus-ring); outline-offset: -3px; }
.seg-input:disabled + .seg-label { opacity: .5; cursor: not-allowed; }

/* ---- tabs and tables ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 14px; cursor: pointer; background: var(--btn-bg); color: var(--ink); border: var(--btn-rule); border-radius: var(--radius); }
.tab[aria-selected="true"] { background: var(--here-bg); color: var(--here-ink); border-color: var(--here-line); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: var(--rule-soft); }
.table thead th { font-family: var(--font-head); font-size: .78rem; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--ink-2); font-weight: 600; border-bottom: var(--rule); white-space: nowrap; }
.table tbody th { font-weight: 600; }
.table .right { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-link { cursor: pointer; }
.table tr.is-link:hover { background: var(--hover); }
.row-link { color: inherit; text-decoration: none; }
.row-link:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.table tfoot td, .table tfoot th { font-weight: 700; border-top: var(--rule); border-bottom: 0; }
.cell-sub { display: block; color: var(--ink-2); font-size: .88rem; font-weight: 400; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager-page { color: var(--ink-2); }
.thumb { display: block; object-fit: cover; background: var(--thumb-bg); border: var(--rule-soft); }
.thumb-sm { width: 44px; height: 44px; } .thumb-md { width: 64px; height: 64px; } .thumb-lg { width: 120px; height: 120px; }
.thumb-none { display: grid; place-items: center; text-align: center; padding: 4px; font-size: .68rem; line-height: 1.1; color: var(--ink-2); }
.with-thumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.with-thumb > :last-child { min-width: 0; }

/* ---- pop-up boxes ---- */
.has-dialog { overflow: hidden; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: var(--shade); }
.dialog { width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--pop-bg); border: var(--pop-rule); box-shadow: var(--pop-shadow); border-radius: var(--radius); outline: none; }
.dialog.wide { width: min(820px, 100%); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 6px; }
.dialog-head h2 { font-family: var(--font-head); font-size: 1.3rem; font-weight: var(--head-weight); line-height: 1.2; }
.dialog-x { flex: none; width: 40px; height: 40px; font-size: 1.5rem; line-height: 1; cursor: pointer; background: transparent; color: var(--ink-2); border: 1px solid transparent; border-radius: var(--radius); }
.dialog-x:hover { background: var(--hover); color: var(--ink); }
.dialog-body { padding: 8px 20px 20px; overflow-y: auto; display: grid; gap: 14px; }
.dialog-form { display: grid; gap: 14px; }
.dialog-text { color: var(--ink); }
.dialog-detail { color: var(--ink-2); font-size: .93rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.toast-zone { position: fixed; z-index: 120; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 12px 16px; font-weight: 600; background: var(--toast-bg); color: var(--toast-ink); border: var(--toast-rule); box-shadow: var(--pop-shadow); border-radius: var(--radius); pointer-events: auto; }
.toast.leaving { opacity: 0; transition: opacity .25s; }
.toast-loot { cursor: pointer; }
.savebar { position: fixed; z-index: 60; left: 248px; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px clamp(14px, 3vw, 32px); background: var(--savebar-bg); color: var(--savebar-ink); border-top: var(--savebar-rule); }
.savebar-words { font-weight: 600; }
.savebar-actions { display: flex; gap: 10px; }

/* ---- sign in ---- */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.signin-form { width: min(440px, 100%); display: grid; gap: 16px; padding: 28px 26px; background: var(--panel); border: var(--card-rule); border-radius: var(--radius); }
.signin-form h1 { font-family: var(--font-head); font-size: 1.9rem; font-weight: var(--head-weight); }
.signin-logo { width: 210px; filter: var(--logo-filter); }

/* ---- lists made of big rows ---- */
.biglist { display: grid; gap: 10px; }
.bigrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; padding: 12px 16px; text-decoration: none; color: var(--ink); background: var(--panel); border: var(--card-rule); border-radius: var(--radius); }
a.bigrow:hover { background: var(--hover); }
.bigrow-words { display: grid; gap: 2px; min-width: 0; }
.bigrow-title { font-size: 1.08rem; font-weight: 600; }
.bigrow-sub { color: var(--ink-2); font-size: .92rem; }
.bigrow-count { flex: none; min-width: 48px; padding: 4px 10px; text-align: center; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; background: var(--count-bg); color: var(--count-ink); border-radius: var(--radius); }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 6px 16px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv .right { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- an order's path and its timeline ---- */
.path { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.path-step { display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); text-align: center; }
.path-step::before { content: ""; height: 8px; background: var(--path-off); border-radius: var(--pill); }
.path-step.is-done::before { background: var(--path-done); }
.path-step.is-now::before { background: var(--path-now); }
.path-step.is-now { color: var(--ink); font-weight: 700; }
.timeline { display: grid; gap: 0; }
.timeline li { display: grid; gap: 2px; padding: 12px 0 12px 18px; border-left: 2px solid var(--line-color); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; }
.timeline-when { color: var(--ink-2); font-size: .86rem; }
.timeline li.is-note p { padding: 8px 10px; background: var(--note-bg); border: var(--note-rule); border-radius: var(--radius); white-space: pre-wrap; }
.line-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: var(--rule-soft); }
.line-item:first-child { border-top: 0; padding-top: 0; }
.line-item h3 { font-size: 1.08rem; }
.spec { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; }
.spec > span { padding: 2px 8px; font-size: .88rem; border: var(--rule-soft); border-radius: var(--pill); }
.spec .spec-key { color: var(--ink-2); }

/* ---- drawings ---- */
.bars-wrap { overflow-x: auto; }
.bars-wrap { min-width: 0; }
.bars { display: block; max-width: 100%; }
.bars .bar { fill: var(--chart); }
.bars .bar-zero { fill: var(--line-color); }
.bars-base { stroke: var(--line-color); stroke-width: 1; }
.bars-label { fill: var(--ink-2); font-size: 12px; font-family: var(--font-body); }
/* One grid for the whole list, so every bar starts and ends at the same place whatever the length of the names and amounts. */
.barlist { display: grid; grid-template-columns: fit-content(55%) minmax(60px, 1fr) max-content; gap: 10px 12px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 1.2fr) minmax(60px, 2fr) auto; gap: 12px; align-items: center; }
@supports (grid-template-columns: subgrid) { .barlist li { grid-column: 1 / -1; grid-template-columns: subgrid; } }
.barlist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-track { height: 12px; background: var(--path-off); border-radius: var(--pill); overflow: hidden; }
.barlist-fill { display: block; height: 100%; background: var(--chart); }
.barlist-value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.steps-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.steps-flow .tile { position: relative; }

/* ---- ring pictures ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.photo { display: grid; gap: 6px; }
.photo img, .photo video { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--thumb-bg); border: var(--rule-soft); }
.photo-meta { font-size: .86rem; color: var(--ink-2); }
.ring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ring-card { display: grid; grid-template-rows: auto 1fr; background: var(--panel); border: var(--card-rule); border-radius: var(--radius); overflow: hidden; }
.ring-card > a { display: block; color: inherit; text-decoration: none; }
.ring-card img, .ring-card .thumb-none { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ring-card-body { display: grid; gap: 8px; padding: 12px 14px 14px; align-content: start; }
.ring-card h3 { font-family: var(--font-head); font-size: 1.14rem; }
.price-table input.input { min-height: 40px; padding: 6px 8px; }
.price-table .money-sign { min-height: 40px; min-width: 28px; }
.price-table td { padding: 8px 10px; }

/* ---- phones ---- */
@media (max-width: 900px) {
  .app { display: block; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--pop-shadow); }
  body.menu-open .side { transform: none; }
  body.menu-open .menu-shade { display: block; position: fixed; inset: 0; z-index: 35; background: var(--shade); }
  .icon-btn.menu-btn { display: inline-flex; }
  .menu-btn-word { display: none; }
  .top { gap: 8px; min-height: 58px; padding: 8px 12px; }
  .account-name, .bell-word { display: none; }
  /* The search box shrinks so the menu button, the search, the bell and the account stay on one row. */
  .search { flex: 1 1 110px; min-width: 0; }
  .top-right { gap: 6px; }
  .bell:has(.bell-count[hidden])::before { content: "News"; font-size: .8rem; }
  .icon-btn { padding: 6px 10px; }
  .tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--top-bg); border-top: var(--rule); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar-link { position: relative; display: grid; place-items: center; min-height: 56px; padding: 6px 2px; font-size: .86rem; color: var(--ink); text-decoration: none; background: transparent; border: 0; cursor: pointer; }
  .tabbar-link.is-here { font-weight: 700; color: var(--here-ink); background: var(--here-bg); }
  .tabbar-link .menu-badge { position: absolute; top: 4px; right: calc(50% - 30px); }
  .screen { padding-bottom: 150px; }
  .savebar { left: 0; bottom: calc(56px + env(safe-area-inset-bottom)); }
  .toast-zone { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .has-savebar .toast-zone { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .cols, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .steps-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  html { font-size: 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .page-actions, .page-actions .btn { width: 100%; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tfoot { display: block; }
  .table tr { display: block; padding: 10px 14px; border-bottom: var(--rule); }
  .table th, .table td { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); flex: none; color: var(--ink-2); text-align: left; font-weight: 400; }
  .table td:empty { display: none; }
  .table tbody th { text-align: left; font-size: 1.06rem; padding-bottom: 6px; }
  .table tbody th .with-thumb { width: 100%; }
  .dialog-actions .btn { flex: 1 1 auto; }
  /* The drop-down boxes at the top (search results, news, account) take the width of the phone, so nothing is cut off. */
  .pop { position: fixed; top: 60px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 140px); }
  .account-pop { width: auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .kv dt { margin-top: 8px; font-size: .88rem; }
  .line-item { grid-template-columns: auto minmax(0, 1fr); }
  .line-item > :last-child { grid-column: 1 / -1; }
  .path-step { font-size: .7rem; }
  .barlist { grid-template-columns: minmax(0, 1fr) max-content; }
  .barlist li { grid-template-columns: minmax(0, 1fr) auto; }
  @supports (grid-template-columns: subgrid) { .barlist li { grid-template-columns: subgrid; } }
  .barlist-name { white-space: normal; }
  .barlist-track { grid-column: 1 / -1; order: 3; }
  /* Number tiles sit two to a row. */
  .tiles, .tiles.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 12px 14px; }
  .tile-value { font-size: 1.6rem; }
  .tile-value.is-long { font-size: 1.2rem; }
  .tile-label { font-size: .72rem; gap: 6px; }
  /* Rings: the photo sits beside the words, so several rings fit on one screen. */
  .ring-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ring-card { grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: auto; }
  .ring-card img, .ring-card .thumb-none { height: 100%; min-height: 108px; }
  .ring-card-body { padding: 10px 12px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0s !important; transition-duration: 0s !important; } }

/* ---- tick lists and groups of fields ---- */
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
legend.field-label { padding: 0; margin-bottom: 6px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 18px; max-height: 240px; overflow: auto; padding: 8px 12px; border: var(--field-rule); background: var(--field-bg); }
.access-grid { display: grid; gap: 0; border: var(--card-rule); }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; padding: 12px 14px; border-top: var(--rule-soft); }
.access-row:first-child { border-top: 0; }
.access-row .switch-about, .access-row .card-about { margin: 0; }
@media (max-width: 640px) { .access-row { grid-template-columns: minmax(0, 1fr); } }

/* ---- messages ---- */
.inbox-row { align-items: flex-start; }
.inbox-said { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.thread { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.thread-item { padding: 12px 14px; border: var(--card-rule); border-radius: var(--radius); background: var(--panel-2, var(--panel)); }
.thread-item.from-them { border-left: 4px solid var(--accent); }
.thread-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 4px; }
.thread-when { color: var(--ink-2); font-size: .9rem; }
.thread-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- website words ---- */
.field-count { justify-self: end; color: var(--ink-2); font-size: .84rem; font-variant-numeric: tabular-nums; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }

/* ---- settings ---- */
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px 12px; }
ul.stack { margin: 0; padding: 0; list-style: none; }

/* ---- team ---- */
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.person-words { flex: 1 1 220px; min-width: 0; }
.person-words h2 { overflow-wrap: anywhere; }
.person-you { color: var(--ink-2); font-weight: 400; }
.person.is-off { opacity: .72; }
.avatar.big { width: 46px; height: 46px; font-size: 1.3rem; }
code.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.05rem; padding: 3px 8px; border: var(--field-rule); background: var(--field-bg); user-select: all; overflow-wrap: anywhere; }

/* ---- my account ---- */
ol.steps { display: grid; gap: 12px; margin: 0; padding-left: 1.4em; }
ol.steps li { padding-left: 4px; }
ul.code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ---- boxes to type in are never wider than a comfortable line ---- */
.card-body > .field, .card-body > .stack > .field { max-width: 720px; }
.narrow { max-width: 320px; }

/* ---- a part of a page that opens when asked ---- */
details.fold { border-top: var(--rule-soft); padding-top: 12px; }
details.fold > summary { cursor: pointer; font-weight: 600; padding: 8px 0; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border: var(--btn-rule); font-weight: 700; }
details.fold[open] > summary::before { content: "−"; }
details.fold > * + * { margin-top: 12px; }
.qr { display: block; width: 208px; height: 208px; margin: 10px 0; border: 1px solid #000; background: #fff; }
.photo .photo-video { width: 100%; aspect-ratio: 1; font-size: .9rem; }

/* ---- links that sit in a row like tabs (the pages about numbers) ---- */
a.tab { text-decoration: none; }
.tab[aria-current="page"] { background: var(--here-bg); color: var(--here-ink); border-color: var(--here-line); font-weight: 700; }
.page-tabs { margin-bottom: 0; padding-bottom: 14px; border-bottom: var(--rule-soft); }

/* ---- scorecard ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: var(--rule-soft); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
a.kpi-link:hover { background: var(--hover); }
.kpi-name { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: .93rem; line-height: 1.3; }
.kpi-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: var(--head-weight); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value.is-words { font-size: 1.05rem; line-height: 1.3; font-weight: 400; color: var(--ink-2); }
.change { font-size: .88rem; }
.change.tone-good { color: var(--good-text); font-weight: 600; }
.change.tone-bad { color: var(--bad-text); font-weight: 600; }
.change.tone-flat { color: var(--ink-2); }
.tile.tone-bad .tile-value { color: var(--bad-text); }
.tile.tone-good .tile-value { color: var(--good-text); }

/* ---- ring chart ---- */
.ring-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 32px; align-items: center; }
.ring { display: block; width: min(220px, 60vw); height: auto; }
.ring-part { stroke: var(--part-line); stroke-width: 2; stroke-linejoin: round; }
.ring.has-lit .ring-part:not(.is-lit) { opacity: .45; }
.part-1 { fill: var(--part-1); background: var(--part-1); } .part-2 { fill: var(--part-2); background: var(--part-2); } .part-3 { fill: var(--part-3); background: var(--part-3); }
.part-4 { fill: var(--part-4); background: var(--part-4); } .part-5 { fill: var(--part-5); background: var(--part-5); } .part-6 { fill: var(--part-6); background: var(--part-6); }
.part-other { fill: var(--part-other); background: var(--part-other); }
.ring-middle { fill: var(--ink); font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.ring-middle-label { fill: var(--ink-2); font-family: var(--font-body); font-size: 13px; }
.ring-list { display: grid; gap: 2px; }
.ring-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 8px; border-bottom: var(--rule-soft); }
.ring-row.is-lit { background: var(--hover); }
.ring-swatch { width: 16px; height: 16px; border: 1px solid var(--part-line); outline: 1px solid var(--ink-2); outline-offset: 0; }
.ring-name { font-weight: 600; overflow-wrap: anywhere; }
.ring-share { font-variant-numeric: tabular-nums; font-weight: 700; }
.ring-amount { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

/* ---- live map ---- */
.map-host { background: var(--map-sea); border: var(--rule-soft); overflow: hidden; }
.map { display: block; width: 100%; height: auto; }
.map-land path { fill: var(--map-land); stroke: var(--map-line); stroke-width: .5; vector-effect: non-scaling-stroke; }
.map-old { fill: var(--map-old); opacity: .8; }
.map-dot { fill: var(--map-dot); stroke: var(--map-dot-ring); }
.map-pulse { fill: var(--map-dot); opacity: .22; }
.map-count { fill: var(--map-dot-ring); font-family: var(--font-body); font-weight: 700; }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink-2); font-size: .9rem; }
.key-here, .key-old { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.key-here { background: var(--map-dot); outline: 2px solid var(--map-dot-ring); } .key-old { background: var(--map-old); margin-left: 10px; }
.plain-list { display: grid; gap: 0; }
.plain-list li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: var(--rule-soft); }

/* ---- books ---- */
.span-bar { display: grid; gap: 4px; }
.span-bar .tabs { margin-bottom: 4px; }
.span-own { border-top: 0; padding-top: 0; }
.span-day { display: inline-flex; align-items: center; gap: 8px; }
.span-day .input { width: auto; }
.pnl .pnl-head th { padding-top: 22px; font-family: var(--font-head); font-size: .8rem; letter-spacing: var(--label-track); text-transform: var(--label-case); color: var(--ink-2); border-bottom: var(--rule); }
.pnl tbody th { font-weight: 400; }
.pnl-name { display: inline-flex; align-items: center; gap: 8px; }
.pnl-total th, .pnl-total td { font-weight: 700; border-top: var(--rule); }
.pnl-total th .pnl-name { font-weight: 700; }
.pnl-profit th, .pnl-profit td { font-size: 1.12rem; border-top: 3px double var(--line-color); border-bottom: 0; }
.pnl td { white-space: nowrap; }
.filter-row { align-items: stretch; }
.filter-kind { flex: 0 1 220px; } .filter-search { flex: 1 1 240px; max-width: 420px; }
button.linklike { padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.table.compact th, .table.compact td { padding: 7px 10px; font-size: .93rem; }
.map-grid { display: grid; gap: 8px; }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); gap: 12px; align-items: center; }
.ticklist { display: grid; gap: 8px; }
.ticklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.ticklist .tick { display: grid; place-items: center; width: 24px; height: 24px; font-weight: 700; border: var(--btn-rule); }
.ticklist li.is-done .tick { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ticklist li.is-done { color: var(--ink-2); }

/* ---- carts ---- */
.cart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.cart-head h2 { font-family: var(--font-head); font-size: 1.14rem; font-weight: var(--head-weight); overflow-wrap: anywhere; }
.cart-value { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cart-lines { display: grid; gap: 0; border-top: var(--rule-soft); }
.cart-lines li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: var(--rule-soft); }
.cart-line-price { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- the words under a sale price ---- */
.note-preview { padding: 12px 14px; min-height: 48px; background: #fff; color: #111; border: var(--field-rule); font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
/* The price part of a ring's page, drawn in the admin the way the store draws it. It keeps the store's own colors in every look. */
.store-price { display: grid; gap: 5px; justify-items: start; padding: 18px 20px; background: #fff; color: #111; border: var(--field-rule); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; }
.store-price p { margin: 0; }
.store-tag { background: #8a3b2e; color: #fff; font-size: .66rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; padding: 6px 10px 5px; }
.store-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 3px; font-size: 1.75rem; line-height: 1.15; }
.store-off { color: #8a3b2e; font-size: .8em; }
.store-pay { color: #111; }
.store-regular, .store-regular s { font-size: .82rem; color: #767676; }
.store-words { margin-top: 2px; font-size: .85rem; line-height: 1.5; color: #111; overflow-wrap: anywhere; }
.store-words b, .store-words strong, .note-preview b, .note-preview strong { font-weight: 600; }
.store-words p, .store-words div { margin: 0; }
.store-words p + p, .store-words div + div, .store-words p + div, .store-words div + p { margin-top: 5px; }
.store-words mark, .note-preview mark { display: inline-block; background: #1f6b4a; color: #fff; font-size: .66rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; padding: 4px 8px 3px; margin-right: 6px; vertical-align: 1px; }
.store-words small, .note-preview small { font-size: .75rem; color: #767676; }
.store-words s, .store-words del, .note-preview s, .note-preview del { color: #767676; }
.store-words a, .note-preview a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.store-empty { color: #767676; }
.input.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92rem; }
.fill-ins { gap: 6px; }
.fill-ins .btn.small { min-height: 34px; padding: 3px 9px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .84rem; }
.fill-ins.is-words .btn.small { font-family: inherit; font-size: .88rem; }

/* ---- looks a person may use; a question with its answer ---- */
.looks-ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.looks-shade { margin-top: 4px; padding: 10px 12px; border: var(--rule-soft); }
.pair { display: grid; gap: 10px; padding: 12px 14px; border: var(--rule-soft); }
.card.tone-good { border-color: var(--good-text); }

@media (max-width: 640px) {
  .ring-chart { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .ring-list { width: 100%; }
  .ring-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .ring-amount { grid-column: 2 / -1; text-align: left; min-width: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 1.45rem; }
  .map-row { grid-template-columns: minmax(0, 1fr); }
  .pnl td { white-space: normal; }
  .pnl .pnl-head { padding-bottom: 0; }
  .pnl .pnl-head th { padding-top: 14px; }
  /* With one amount for each line, the report stays a two-column list on a phone: the line on the left, its amount on the right. */
  .pnl-simple tbody tr:not(.pnl-head) { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
  .pnl-simple tbody tr:not(.pnl-head) th { display: block; flex: 1 1 auto; min-width: 0; padding-bottom: 4px; font-size: 1rem; }
  .pnl-simple tbody td { display: block; flex: none; white-space: nowrap; }
  .pnl-simple tbody td::before { content: none; }
  .span-day { width: 100%; justify-content: space-between; }
  .cart-lines li { flex-direction: column; gap: 2px; }
  .cart-line-price { text-align: left; }
}

/* ---------- pictures and videos: a ring's gallery and the Picture check page ---------- */
.stack.tight { gap: 8px; }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; align-items: start; }
.pic { display: grid; gap: 6px; align-content: start; min-width: 0; }
.pic-open { display: block; width: 100%; padding: 0; cursor: zoom-in; background: var(--thumb-bg); border: var(--rule-soft); border-radius: var(--radius); overflow: hidden; }
.pic-open:hover { border-color: var(--ink-2); }
.pic-frame { position: relative; display: block; aspect-ratio: 1; }
.pic-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-play { position: absolute; left: 8px; bottom: 8px; display: grid; place-items: center; width: 34px; height: 34px; padding-left: 3px; font-size: .9rem; color: #fff; background: rgba(0, 0, 0, .72); border-radius: 50%; }
.pic-missing { display: grid; place-items: center; height: 100%; min-height: 96px; padding: 10px; text-align: center; font-size: .86rem; color: var(--ink-2); }
.pic.is-off .pic-frame img, .pic.is-held .pic-frame img { opacity: .45; filter: grayscale(1); }
.pic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: .86rem; color: var(--ink-2); }
.pic-meta .badge { font-size: .74rem; padding: 1px 7px; }
.pic-num { flex-basis: 100%; font-weight: 700; color: var(--ink); }
.pic-about { flex-basis: 100%; overflow-wrap: anywhere; }
.pic-moves { display: flex; gap: 6px; }
.pic-moves .btn { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
.pic-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pic-detail .btn.big { width: 100%; min-height: 50px; font-size: 1rem; padding: 10px 16px; }
.pic-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.dialog.wide:has(.pic-detail), .dialog.wide:has(.check-box) { width: min(1080px, 100%); }
.look { display: grid; gap: 8px; min-width: 0; }
.look-pane { position: relative; width: 100%; height: min(62dvh, 640px); overflow: auto; cursor: zoom-in; background: var(--thumb-bg); border: var(--rule-soft); border-radius: var(--radius); touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; }
.look-pane[data-zoom="4"] { cursor: zoom-out; }
.look-pane img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.look.is-video video { display: block; width: 100%; max-height: min(62dvh, 640px); background: #000; border-radius: var(--radius); }
.look-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.look-zoom { font-weight: 600; color: var(--ink); min-width: 9ch; }
.progress { display: grid; gap: 6px; }
.progress-track { display: block; height: 12px; background: var(--field-bg); border: var(--field-rule); border-radius: var(--pill); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
.progress-words { font-size: .9rem; color: var(--ink-2); }
/* Picture check */
.check-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.meter { display: grid; gap: 8px; }
.meter-track { display: flex; height: 16px; background: var(--field-bg); border: var(--field-rule); border-radius: var(--pill); overflow: hidden; }
.meter-part { display: block; height: 100%; }
.meter-part.is-fine { background: var(--good-text); }
.meter-part.is-off { background: var(--bad-text); }
.meter-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .92rem; color: var(--ink-2); }
.meter-key b { color: var(--ink); }
.meter-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--field-bg); border: 1px solid var(--ink-2); }
.meter-dot.is-fine { background: var(--good-text); border-color: var(--good-text); }
.meter-dot.is-off { background: var(--bad-text); border-color: var(--bad-text); }
.check-filters { display: grid; gap: 12px; }
.check-group { display: grid; gap: 10px; padding-top: 16px; border-top: var(--rule-soft); }
.check-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.check-group-head h3 { font-size: 1.05rem; }
.check-group-head small { color: var(--ink-2); font-weight: 400; }
.check-box { display: grid; gap: 12px; }
.check-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.check-where strong { font-size: 1.05rem; }
.check-count { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.check-buttons { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; }
.check-buttons .btn { min-height: 56px; }
.check-keys { font-size: .86rem; color: var(--ink-2); }
.check-box .look-pane { height: min(56dvh, 620px); }
.check-box .look.is-video video { max-height: min(56dvh, 620px); }
kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; text-align: center; font: inherit; font-size: .84em; font-weight: 700; border: var(--btn-rule); border-radius: 4px; background: var(--btn-bg); }
@media (max-width: 760px) {
  .pic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pic-detail { grid-template-columns: minmax(0, 1fr); }
  .look-pane { height: min(46dvh, 420px); }
  .look-tip { display: none; }
  .check-top { grid-template-columns: minmax(0, 1fr); }
  .check-buttons { grid-template-columns: 1fr 1fr; }
  .check-buttons .btn.is-main { grid-column: 1 / -1; order: -1; }
  .check-box .look-pane { height: min(44dvh, 400px); }
  .check-keys { display: none; }
}

/* Center diamond prices: one row per carat, with what shoppers pay and (for a login that sees money) what it costs. */
.diamond-grid { display: grid; gap: 10px; }
.diamond-row { display: grid; grid-template-columns: 4.5rem minmax(0, 14rem); align-items: end; gap: 6px 18px; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.1)); }
.diamond-grid.has-costs .diamond-row { grid-template-columns: 4.5rem minmax(0, 14rem) minmax(0, 14rem); }
.diamond-row:last-child { border-bottom: 0; }
.diamond-carat { font-family: var(--font-head); font-size: 1.1rem; align-self: center; white-space: nowrap; }
.diamond-cell { display: grid; gap: 4px; min-width: 0; }
.diamond-cell-label { font-size: .82rem; color: var(--ink-2); }
.diamond-cell .money-box { max-width: 13rem; }
.diamond-row .field-error { grid-column: 1 / -1; margin: 0; }
.diamond-example { margin: 4px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--wash, rgba(0,0,0,.04)); line-height: 1.5; }
@media (max-width: 480px) {
  .diamond-row, .diamond-grid.has-costs .diamond-row { grid-template-columns: 3.3rem minmax(0, 1fr); gap: 6px 10px; }
  .diamond-grid.has-costs .diamond-row { grid-template-columns: 3.3rem minmax(0, 1fr) minmax(0, 1fr); }
  .diamond-cell .money-box .input { padding-left: 8px; padding-right: 6px; }
}
