/* SPDX-License-Identifier: MIT
 * The drive's compositions on top of the shadcn port (web/shared/ui/tokens.css, components.css), ported
 * from the design prototype's app.css (research/design/drive, 16-drive-design §8): containers, brand,
 * the app shell, folders, the file table, uploads, the share dialog parts, activity, received and storage,
 * then refinements (touch targets, focus, phones, contrast). The home, reading pages, viewer and buyer page keep their own stylesheets.
 * Nothing here restyles a component; it lays components out. */
/* Phones on slow networks: the drive's words come from the home's 18 KB Latin subset of the same pinned Geist
   (400 to 700, every weight the drive uses); the 70 KB full face (tokens.css) loads only for a character outside it. */
@font-face {
  font-family: "Geist";
  src: url("/shared/fonts/geist/Geist-Latin.7e1491511d.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027, U+2030-203A, U+20AC, U+2122, U+2190-2193;
}

/* ---------- containers and type (shadcn "Typography" page values) ---------- */
.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }
.h1 { font-size: var(--text-4xl); line-height: 1.1; font-weight: 600; letter-spacing: var(--tracking-tight); text-wrap: balance; }
@media (min-width: 768px) { .h1 { font-size: var(--text-5xl); } }
.h2 { font-size: var(--text-2xl); line-height: var(--text-2xl--lh); font-weight: 600; letter-spacing: var(--tracking-tight); text-wrap: balance; }
.h3 { font-size: var(--text-lg); line-height: var(--text-lg--lh); font-weight: 600; letter-spacing: var(--tracking-tight); }
.h4 { font-size: var(--text-base); line-height: var(--text-base--lh); font-weight: 600; }
.lead { font-size: var(--text-lg); line-height: 1.6; color: var(--muted-foreground); text-wrap: pretty; }
.muted { color: var(--muted-foreground); }
.small { font-size: var(--text-xs); line-height: var(--text-xs--lh); }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: -0.01em; }
.tari-text { color: var(--tari); }
.stack { display: grid; gap: var(--gap, 1rem); }
.row { display: flex; align-items: center; gap: var(--gap, 0.5rem); }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: var(--text-base); letter-spacing: var(--tracking-tight); text-decoration: none; color: inherit; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-lg); flex-shrink: 0; }
.brand-mark .icon { width: 1.25rem; height: 1.25rem; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text small { font-size: var(--text-xs); font-weight: 400; color: var(--muted-foreground); letter-spacing: 0; }
/* the name as the logo (the sprite's i-wordmark, docs/review/brand-kit-1.md): 17/30 of the tile's height, as the site's
   header sets it; its letters in the text colour, its i's rhombus the kit's lime, #ACFF00, in both themes */
.wordmark { display: block; flex: none; width: calc(1.125rem * 148 / 34); height: 1.125rem; color: var(--foreground); }
/* over a second line (the sidebar's My drive) the name is 1rem, so both lines sit inside the tile's 2rem with air
   between them */
.sidebar-header .wordmark { width: calc(1rem * 148 / 34); height: 1rem; margin-bottom: 0.125rem; }

/* ---------- theme toggle icon swap ---------- */
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-icon-light { display: none; } :root:not([data-theme="light"]) .theme-icon-dark { display: block; } }

/* ---------- drive shell ---------- */
.app-header { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 0.5rem; height: var(--header-height); padding-inline: 0.75rem; border-bottom: 1px solid var(--border); background: var(--background); }
@media (min-width: 768px) { .app-header { padding-inline: 1rem; gap: 0.75rem; } }
.app-header .separator[data-orientation="vertical"] { height: 1rem; align-self: center; }
.search { position: relative; flex: 1; max-width: 40rem; }
.app-header .header-more { margin-left: auto; }   /* the actions sit at the right edge, as in Google Drive */
.search > .icon { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; color: var(--muted-foreground); }
.search .input { padding-left: 2.25rem; padding-right: 3.25rem; background: var(--muted); border-color: transparent; box-shadow: none; }
.search .input:focus-visible { background: var(--background); border-color: var(--ring); }
.search .kbd { position: absolute; right: 0.5rem; top: 50%; translate: 0 -50%; }
@media (max-width: 767px) { .search .kbd { display: none; } .search .input { padding-right: 0.75rem; } }
.header-more { display: none; }
@media (min-width: 900px) { .header-more { display: inline-flex; } }
.page { display: grid; gap: 1.5rem; padding: 1rem 1rem 6rem; min-width: 0; }
@media (min-width: 768px) { .page { padding: 1.5rem 1.5rem 4rem; } }
.view { display: contents; }
.page-head { display: flex; align-items: center; gap: 0.75rem; min-height: 2.25rem; flex-wrap: wrap; }
.page-head .h2 { margin-right: auto; }
.page-desc { color: var(--muted-foreground); margin-top: -1rem; max-width: 60ch; }
.section-label { font-size: var(--text-sm); font-weight: 500; margin-bottom: 0.75rem; }
.side-new { padding: 0.25rem 0.5rem 0.5rem; }
.side-new .btn { width: auto; justify-content: flex-start; }
.side-meter { display: grid; gap: 0.5rem; padding: 0.25rem 0.5rem 0.5rem; }
.side-meter .meta { font-size: var(--text-xs); color: var(--muted-foreground); }
.side-meter .btn { justify-self: start; }
.account .avatar { background: var(--sidebar-accent); }
.account .brand-text span { font-size: var(--text-sm); font-weight: 500; }
.account .brand-text small { font-family: var(--font-mono); font-size: 0.6875rem; }
.btn.fab { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-sticky); height: 3.5rem; padding-inline: 1.25rem 1.5rem; border-radius: var(--radius-xl); box-shadow: inset 0 0 0 1px var(--brand-edge), var(--shadow-lg); }
@media (min-width: 768px) { .fab { display: none; } }

/* ---------- folders ---------- */
.folder-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.folder {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.5rem 0.75rem 0.875rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); box-shadow: var(--shadow-xs); cursor: pointer; transition: background-color var(--duration) var(--ease); min-width: 0; text-align: left; color: inherit; font: inherit; text-decoration: none;
}
.folder:hover { background: color-mix(in oklab, var(--accent) 60%, transparent); }
.folder:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.folder-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); background: var(--muted); flex-shrink: 0; }
.folder-body { display: grid; gap: 0.25rem; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.folder-icon { color: inherit; }
.folder-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-meta { display: flex; align-items: center; gap: 0.375rem; font-size: var(--text-xs); color: var(--muted-foreground); }

/* ---------- file table ---------- */
.files { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
.files .table th { color: var(--muted-foreground); font-size: var(--text-xs); font-weight: 500; height: 2.5rem; }
.files .table th:first-child, .files .table td:first-child { padding-left: 1rem; width: 2rem; }
.files .table td { height: 3.25rem; }
.files .table td:last-child, .files .table th:last-child { width: 3rem; padding-right: 0.5rem; text-align: right; }
.file-name { display: flex; align-items: center; gap: 0.75rem; min-width: 0; max-width: 26rem; }
.file-name .icon { color: var(--muted-foreground); }
.file-name .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .star { color: var(--warning); }
.file-meta { display: none; font-size: var(--text-xs); color: var(--muted-foreground); }
.num-cell { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.num-cell.right { text-align: right; }
.row-ended .name { color: var(--muted-foreground); }
@media (max-width: 767px) {
  .files { border: 0; border-radius: 0; background: transparent; margin-inline: -1rem; }
  .files .table thead { display: none; }
  .files .table .col-wide { display: none; }
  .files .table td { height: 4rem; }
  .files .table td:first-child { display: none; }
  .files .table td:nth-child(2) { padding-left: 1rem; }
  .file-name { align-items: center; max-width: calc(100vw - 5rem); }
  .file-text { display: grid; gap: 0.125rem; min-width: 0; }
  .file-meta { display: flex; align-items: center; gap: 0.375rem; }
  .file-name > .icon { width: 1.25rem; height: 1.25rem; }
}
.selbar { display: flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; padding: 0.25rem 0.5rem; border-radius: var(--radius-lg); background: var(--muted); }
.selbar .count { font-weight: 500; margin-inline: 0.25rem 0.5rem; }

/* ---------- drop overlay and upload panel ---------- */
.drop-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: 1rem; background: color-mix(in oklab, var(--background) 82%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay-inner { position: absolute; inset: 0.75rem; border: 2px dashed var(--ring); border-radius: var(--radius-xl); display: grid; place-items: center; align-content: center; gap: 0.5rem; text-align: center; }
@media (min-width: 768px) { .drop-overlay { left: var(--sidebar-width); } }
.drop-overlay .dropzone-media { width: 3.5rem; height: 3.5rem; }
.drop-overlay[data-state="open"] .drop-overlay-inner { --enter-opacity: 0; --enter-scale: 0.98; animation: sh-enter 150ms var(--ease-out) both; }
.uploads { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-sticky);   /* under dialogs and their overlay */ width: min(22rem, calc(100vw - 2rem)); padding: 0; gap: 0; overflow: hidden; }
.uploads-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.5rem 0.625rem 1rem; border-bottom: 1px solid var(--border); font-weight: 500; }
.uploads-list { max-height: 15rem; overflow: auto; }
.upload-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.25rem 0.75rem; padding: 0.625rem 1rem; }
.upload-row + .upload-row { border-top: 1px solid var(--border); }
.upload-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.upload-row .progress { grid-column: 2 / 4; height: 0.25rem; }
.upload-row .stage { font-size: var(--text-xs); color: var(--muted-foreground); }
.upload-row .note { grid-column: 2 / 4; font-size: var(--text-xs); color: var(--muted-foreground); }   /* a photo that went up with its metadata */
.upload-row[data-done] .stage { color: var(--success); }
.upload-row[data-done] .progress { visibility: hidden; }   /* done says so in words; the full bar adds nothing */
.upload-row[data-busy] .progress::after { content: ""; position: absolute; inset: 0; width: 30%; border-radius: inherit; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--primary) 60%, transparent), transparent); animation: up-sweep 1.3s ease-in-out infinite; }
@keyframes up-sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (max-width: 767px) { .uploads { bottom: 5.5rem; } }

/* ---------- share dialog ---------- */
.choices { display: grid; gap: 0.5rem; }
.choice {
  display: flex; align-items: flex-start; gap: 0.875rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer; transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); background: var(--background);
}
.choice:hover { background: color-mix(in oklab, var(--accent) 50%, transparent); }
.choice[data-state="checked"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.choice:has(.radio:focus-visible) { box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); border-color: var(--ring); }
.choice .choice-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); background: var(--muted); flex-shrink: 0; }
.choice[data-tari] .choice-icon { background: var(--tari-soft); color: var(--tari); }
.choice .choice-body { display: grid; gap: 0.25rem; flex: 1; min-width: 0; }
.choice .choice-title { font-weight: 500; }
.choice .choice-desc { color: var(--muted-foreground); font-size: var(--text-sm); }
.choice .radio { margin-top: 0.625rem; }
.choice .choice-extra { margin-top: 0.5rem; }
.choice[data-state="unchecked"] .choice-extra { display: none; }
.setting-row { display: flex; align-items: flex-start; gap: 0.875rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.setting-row .choice-body { display: grid; gap: 0.25rem; flex: 1; }
.setting-row .choice-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); background: var(--muted); flex-shrink: 0; }
.setting-row .choice-title { font-weight: 500; }
.setting-row .choice-desc { color: var(--muted-foreground); font-size: var(--text-sm); }
.setting-row .switch { margin-top: 0.125rem; }
.link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-row .input { flex: 1 1 10rem; min-width: 0; font-family: var(--font-mono); font-size: 0.8125rem; }
.link-row > .btn { flex: none; }
.link-row:has(> :nth-child(3)) > .input { flex-basis: 100%; }   /* with Share too: the link on top, Copy and Share under it */
.result { display: grid; gap: 1rem; }
.result-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 640px) { .result-grid:has(.qr-wrap) { grid-template-columns: 1fr auto; } }
.qr-wrap { display: grid; gap: 0.5rem; justify-items: center; width: 10.5rem; text-align: center; }
@media (pointer: coarse) { .qr-wrap { display: none; } }   /* phones get Share, not a code to scan */
.qr { width: 10.5rem; height: 10.5rem; border-radius: var(--radius-md); border: 1px solid var(--border); }
.qr-paper { fill: var(--qr-paper); } .qr-ink { fill: var(--qr-ink); }
.say { font-size: var(--text-base); font-weight: 500; }
.word-box { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-lg); background: var(--muted); }
.word-box strong { font-family: var(--font-mono); font-size: var(--text-base); font-weight: 600; }
.word-box .stack { --gap: 0.125rem; }
.dialog-step-head { display: flex; align-items: center; gap: 0.5rem; }
.safety { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.375rem; font-size: 1.25rem; text-align: center; }
.safety span { padding: 0.375rem 0; border-radius: var(--radius-md); background: var(--muted); }

/* ---------- activity sheet ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; padding-bottom: 1.25rem; }
.timeline li::before { content: ""; position: absolute; left: 1rem; top: 2rem; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .t-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--muted); }
.timeline .t-icon[data-tone="tari"] { background: var(--tari-soft); color: var(--tari); }
.timeline .t-icon[data-tone="success"] { background: var(--success-soft); color: var(--success); }
.timeline .t-body { display: grid; gap: 0.125rem; padding-top: 0.25rem; }
.timeline .t-title { font-weight: 500; }
.timeline .t-meta { font-size: var(--text-xs); color: var(--muted-foreground); }
.timeline a { color: var(--foreground); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; font-size: var(--text-sm); }
.kv dt { color: var(--muted-foreground); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- received ---------- */
.drop-card .card-content { display: grid; gap: 0.75rem; }
/* on a phone, Make a new hidebox link goes under the card's words, so the title keeps the width */
@media (max-width: 639px) {
  .drop-card .card-header:has(.card-action) { grid-template-columns: minmax(0, 1fr); }
  .drop-card .card-action { grid-column-start: auto; grid-row: auto; justify-self: start; margin-inline-start: -0.625rem; }
}
.scanline { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-xs); color: var(--muted-foreground); }
.scanline .icon { color: var(--success); }

/* ---------- storage ---------- */
.meter-big { display: grid; gap: 1rem; }
.meter-num { font-size: var(--text-3xl); font-weight: 600; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.meter-num small { font-size: var(--text-base); font-weight: 400; color: var(--muted-foreground); letter-spacing: 0; }
.stackbar { display: flex; height: 0.75rem; border-radius: var(--radius-full); overflow: hidden; background: var(--muted); gap: 2px; }
.stackbar span { display: block; height: 100%; }
.legend { display: grid; gap: 0.5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); font-size: var(--text-sm); list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; align-items: center; gap: 0.5rem; }
.legend .sw { width: 0.625rem; height: 0.625rem; border-radius: 3px; flex-shrink: 0; }
.legend b { margin-left: auto; font-weight: 400; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.c1 { background: var(--chart-1); } .c2 { background: var(--chart-2); } .c3 { background: var(--chart-3); } .c4 { background: var(--chart-4); }
.packs { display: grid; gap: 1rem; }
@media (min-width: 768px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack-price { font-size: var(--text-2xl); font-weight: 600; letter-spacing: var(--tracking-tight); }
.pack-price small { font-size: var(--text-sm); font-weight: 500; color: var(--tari); margin-left: 0.25rem; }
.rules-read { display: grid; gap: 0; }
.rules-read .item + .item { border-top: 1px solid var(--border); border-radius: 0; }
.two-col { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

/* ======================= refinements: touch targets, focus, phones, contrast ======================= */
/* Touch: every row control and folder icon is a 44 px target on coarse pointers. */
@media (pointer: coarse) {
  .btn[data-size="icon-sm"], .btn[data-size="icon-sm"]:has(> .icon) { width: var(--target); height: var(--target); }
  .folder-icon { width: 2.75rem; height: 2.75rem; }
}
/* The brand tile is ink in both themes with the open box in the brand kit's lime, #ACFF00 (docs/review/brand-kit-1.md),
   as on the site: the mark never changes colour (shadcn's dark sidebar-primary is blue, its dark primary near-white). */
.brand-mark { background: #0A0A0A; color: #ACFF00; }
/* Links and link-buttons get shadcn's ring, never the browser's default outline. */
a:focus-visible, .link-btn:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); border-radius: var(--radius-sm); }
.sheet-title:focus, .dialog-title:focus { outline: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }
.tx-link { color: var(--muted-foreground); text-underline-offset: 3px; }
/* Phones: folders are a compact two-column grid, so files show in the first screen. FAB clears the last row. */
@media (max-width: 767px) {
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .folder { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon kebab" "body body"; gap: 0.375rem; padding: 0.5rem 0.25rem 0.625rem 0.625rem; }
  .folder > .folder-icon { grid-area: icon; width: 2.75rem; height: 2.75rem; }
  .folder > .btn { grid-area: kebab; justify-self: end; }
  .folder > .folder-body { grid-area: body; }
  .folder-meta .badge { max-width: 100%; overflow: hidden; }
  .page { padding-bottom: calc(3.5rem + 2.5rem + env(safe-area-inset-bottom)); }
}
.fab[data-variant="secondary"] { background: var(--card); color: var(--foreground); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
/* Badges side by side in a cell (rule + Leaves). */
.badges { display: inline-flex; flex-wrap: wrap; gap: 0.375rem; }
/* Empty drive: the brand moment (the drive's mark taking in two files) and the Tari address row. */
.empty-art { position: relative; width: 7rem; height: 4.5rem; margin-bottom: 0.5rem; }
.empty-art .ea-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.empty-art .ea-mark .icon { width: 2rem; height: 2rem; }
.empty-art .ea-file { position: absolute; top: 0.75rem; display: grid; place-items: center; width: 2.5rem; height: 3rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--muted-foreground); box-shadow: var(--shadow-xs); }
.empty-art .ea-l { left: 0; rotate: -8deg; }
.empty-art .ea-r { right: 0; rotate: 8deg; }
.tari-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; margin-top: 1.25rem; padding: 0.75rem 0.75rem 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); text-align: left; width: min(100%, 26rem); }
.tari-row > .icon { color: var(--tari); }
.tari-row .stack { gap: 0.125rem; min-width: 0; }
.tari-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Share dialog: "It ends" is a line under the three choices, with a default. */
.ends-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-inline: 0.25rem; }
.ends-row .select-trigger { min-width: 10rem; }
.path-line { display: flex; gap: 0.5rem; align-items: flex-start; }
.path-line .icon { flex-shrink: 0; margin-top: 0.125rem; }
/* Move warning, the warning alert variant. */
.alert[data-variant="warning"] > .icon { color: var(--warning); }
.alert[hidden] { display: none; }
/* Activity feed (drive-wide) and the glass box. */
.feed { padding: 0.5rem 1rem; list-style: none; margin: 0; }
.feed li { padding-block: 0.625rem; }
.feed .t-title .muted { font-weight: 400; }
.feed-group { display: grid; gap: 0.5rem; }
/* Activity at scale (lib/feed.js): the day and its count, the chips, a row of several folded open to its files. */
.feed-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: -0.5rem; }
.feed-day { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0; }
.feed-count { font-size: var(--text-xs); font-weight: 400; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.feed-toggle { justify-self: start; margin: 0.25rem 0 0 -0.625rem; color: var(--muted-foreground); }
.feed-toggle .icon { transition: rotate var(--duration) var(--ease); }
.feed-toggle[aria-expanded="true"] .icon { rotate: 90deg; }
.feed-members { list-style: none; margin: 0.125rem 0 0; padding: 0 0 0 0.75rem; display: grid; max-width: 40rem; border-left: 1px solid var(--border); }
.timeline .feed-members li { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: center; gap: 0.125rem 0.5rem; padding: 0.3125rem 0; }
.timeline .feed-members li::before { content: none; }
.feed-members .icon { color: var(--muted-foreground); }
.feed-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.feed-members .t-meta { justify-self: end; text-align: right; font-variant-numeric: tabular-nums; }
.feed-members [data-testid="exit-receipt"] { grid-column: 2 / -1; justify-self: start; text-align: left; }
@media (prefers-reduced-motion: reduce) { .feed-toggle .icon { transition: none; } }
/* Earnings: the total in violet (an amount of tTARI), each link's take, where the money is. */
.earn-body { display: grid; gap: 1rem; }
.earn-num { font-size: var(--text-3xl); line-height: 1.1; font-weight: 600; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; color: var(--tari); }
.earn-num small { font-size: var(--text-base); font-weight: 500; letter-spacing: 0; }
.earn-parts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.earn-parts b { margin-left: 0; }
.num-cell.earn-amount { color: var(--tari); }
.earn-amount .badge { margin-left: 0.5rem; }
@media (max-width: 767px) { .earn-amount .badge { display: none; } }
.file-text .link-btn { justify-self: start; text-align: left; }
.earn-field { --gap: 0.5rem; }
.earn-move { --gap: 0.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.timeline.known li .t-title { font-weight: 400; }
/* Storage: one neutral ramp for what fills the drive; violet only for paid space (the bar's tail). */
.c1 { background: color-mix(in oklab, var(--foreground) 82%, transparent); }
.c2 { background: color-mix(in oklab, var(--foreground) 58%, transparent); }
.c3 { background: color-mix(in oklab, var(--foreground) 38%, transparent); }
.c4 { background: color-mix(in oklab, var(--foreground) 22%, transparent); }
.stackbar { background: linear-gradient(to right, var(--muted) var(--free, 100%), var(--tari-soft) var(--free, 100%)); }
.sw-tari { background: var(--tari); }
/* Buyer page. */
.locked-note { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); font-size: var(--text-sm); padding: 0.75rem; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.visit { display: flex; align-items: center; gap: 0.375rem; }
.disclosure { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 0.75rem; }
.disclosure > summary { display: flex; align-items: center; gap: 0.5rem; min-height: var(--target); cursor: pointer; font-size: var(--text-sm); font-weight: 500; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { transition: rotate var(--duration) var(--ease); }
.disclosure[open] > summary .icon { rotate: 90deg; }
.disclosure > .stack { padding-bottom: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .disclosure > summary .icon { transition: none; } }
@media (max-width: 767px) { .file-meta { flex-wrap: wrap; row-gap: 0.25rem; } }
.choice:not(:has(.choice-desc)) { align-items: center; }
.choice:not(:has(.choice-desc)) .choice-body { align-self: center; }
/* Contrast on tinted fills: selected rows and the word box use ink at 72% (>= 4.5:1 on --muted). */
.files tr[data-state="selected"] .num-cell, .files tr[data-state="selected"] .file-meta, .word-box .muted { color: color-mix(in oklab, var(--foreground) 72%, var(--muted)); }
/* Targets: site links on phones, and a 24 px hit area for the dialog close on computers (icon unchanged). */
@media (pointer: coarse) { .brand, .site-footer .links a { min-height: 2.75rem; display: inline-flex; align-items: center; } }
.dialog-close { width: 1.5rem; height: 1.5rem; top: 0.75rem; right: 0.75rem; }   /* same icon centre as shadcn's top-4 right-4 */
@media (pointer: coarse) { .dialog-close { top: 0.5rem; right: 0.5rem; width: 2.75rem; height: 2.75rem; } }
/* New (sidebar) and the phone's floating New: Google's white button, and the view's one lime primary while My
   drive or a folder lists files and nothing is picked (site v4: drive-shell.js setNew drops the variant). */
.side-new .btn { height: 2.75rem; padding-inline: 1rem 1.25rem; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--brand-edge), var(--shadow-sm); }
.side-new .btn[data-variant] { background: var(--card); color: var(--foreground); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.side-new .btn[data-variant]:hover { background: var(--accent); }
.fab[data-variant="secondary"]:focus-visible, .side-new .btn[data-variant]:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }

/* ======================= the drive in the app ======================= */
/* Booting and the screen of a browser with no drive yet. */
.drive-boot { min-height: 100dvh; }
.start { min-height: 100dvh; display: grid; justify-items: center; align-content: start; padding: max(2.5rem, 14vh) 1rem 2rem; }
.start-card { display: grid; gap: 1.25rem; justify-items: start; width: min(100%, 32rem); }
.start-card .lead { font-size: var(--text-base); }
.working { gap: 0.5rem; }
.noscript { padding: 1rem; }
.skip:focus { position: fixed; z-index: var(--z-overlay); top: 0.5rem; left: 0.5rem; width: auto; height: auto; clip: auto; margin: 0; padding: 0.5rem 0.75rem; background: var(--background); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
/* A file's name opens it: a plain button that reads as the name. */
.link-plain { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; max-width: 100%; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); }
.link-plain:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); border-radius: var(--radius-sm); }
.file-name a.name { color: inherit; text-decoration: none; }
.file-name a.name:hover { text-decoration: underline; text-underline-offset: 3px; }
.row.end { justify-content: flex-end; }
.alert[data-variant="success"] > .icon { color: var(--success); }
.address-full { word-break: break-all; }
.word-code { word-break: break-all; padding: 0.75rem 1rem; border-radius: var(--radius-lg); background: var(--muted); }
.move-list { max-height: min(22rem, 50vh); overflow: auto; padding: 0.125rem; }
/* Rename: a new extension's question under the field (ui/rename.js) */
.ext-ask { display: grid; gap: 0.625rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--muted); font-size: var(--text-sm); line-height: var(--text-sm--lh); }
.ext-ask-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.upload-row .failed { color: var(--destructive); }
.a-testnet { font-size: var(--text-xs); color: var(--muted-foreground); }
/* The code a phone scans: ink on white in both themes (DESIGN.md "The QR Is Ink On White Rule"). */
.md-qr { display: grid; justify-items: start; gap: 0.5rem; margin: 0.5rem 0 0; }
.md-qr svg { width: 10.5rem; height: 10.5rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: #fff; }
.md-qr svg > path { fill: #0a0a0a; }   /* the modules; the mark keeps its own colours */
.md-qr figcaption { font-size: var(--text-xs); color: var(--muted-foreground); max-width: 28ch; }
.setting-row .stack { --gap: 0.5rem; margin-top: 0.5rem; }
.trash-cell { white-space: nowrap; }
/* on a phone the Trash's first cell is the name (the file table's first cell is its checkbox) */
@media (max-width: 767px) {
  .files .table.trash-table td:first-child { display: table-cell; padding-left: 1rem; width: 100%; max-width: 0; }
  .trash-table .file-name { max-width: none; min-width: 0; }
  .trash-table .file-text { min-width: 0; }
  .trash-table .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trash-table td:last-child { padding-right: 1rem; }
}
/* Upload rows, rules, prices and empty dialog slots. */
.upload-row .stage { display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap; }
.uploads { z-index: var(--z-sticky); }
.rules-read .item-description { display: block; -webkit-line-clamp: unset; overflow: visible; text-wrap: pretty; }
.legend li.paid { grid-column: 1 / -1; }
.price-big { display: flex; align-items: baseline; gap: 0.375rem; font-size: var(--text-4xl); font-weight: 600; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.price-big small { font-size: var(--text-base); font-weight: 500; color: var(--tari); letter-spacing: 0; }
.dialog > div:empty:not([class]), .sheet-body > div:empty:not([class]) { display: none; }

/* ======================= share dialog, folder viewer, Received ======================= */
.field-error { color: var(--destructive); }
.links-list { gap: 0.5rem; }
.links-list .item-actions { display: flex; gap: 0.25rem; margin-left: auto; }
/* Tables without a picking column (a shared folder, Received): the first cell is the name. */
.files[data-plain] .table th:first-child, .files[data-plain] .table td:first-child { width: auto; }
.files[data-plain] .table td:last-child, .files[data-plain] .table th:last-child { width: 1%; white-space: nowrap; }
@media (max-width: 767px) {
  .files[data-plain] .table td:first-child { display: table-cell; padding-left: 1rem; }
  .files[data-plain] .table td:nth-child(2) { padding-left: 0.5rem; }
  .files[data-plain] .file-name { max-width: calc(100vw - 9rem); }
  .files[data-plain] .table td:last-child { padding-right: 1rem; }
}
.files[hidden] { display: none; }
/* The folder viewer: on the link page it takes the whole page; in Received it sits in a dialog. */
.fv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--background); }
@media (min-width: 768px) { .fv-top { padding-inline: 1.5rem; } }
.fv-page { display: grid; gap: 1.5rem; width: min(100%, 60rem); margin-inline: auto; padding: 1.5rem 1rem 4rem; min-width: 0; }
@media (min-width: 768px) { .fv-page { padding: 2.5rem 1.5rem 4rem; } }
.fv-page:focus { outline: none; }
.fv { --gap: 1rem; min-width: 0; }
.fv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.fv-title { --gap: 0.25rem; min-width: 0; }
.fv-title :is(h1, h2, h3) { overflow-wrap: anywhere; }
.fv-title :is(h1, h2, h3):focus { outline: none; }
.fv-actions { justify-content: flex-end; }
.fv-status { --gap: 1rem; }
.fv-status .visit .icon { width: 0.875rem; height: 0.875rem; }
.fv[data-state="ended"] .visit { color: var(--foreground); font-weight: 500; }
.fv-warn { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--warning); }
.fv-warn .icon { width: 0.875rem; height: 0.875rem; color: var(--warning); }
.fv-card { width: min(100%, 32rem); margin-inline: auto; }
.fv-card .card-footer .btn { width: 100%; }
#rec-open .fv .files { max-height: min(50vh, 28rem); overflow: auto; }
/* Received: the sender column says who can't be named; the scan line breathes under the drop card. */
.drop-card + .scanline { margin-top: -0.5rem; }
/* Pay to open (step 15): the buyer page (/p/<id>) from the prototype's pay.html: the price card first on phones, beside the teaser from 960 px, where it stays in view. */
.fv-page.pay-main { width: min(100%, 72rem); }
.buyer { display: grid; gap: 1.5rem; align-items: start; grid-template-areas: "head" "list" "pay"; min-width: 0; }   /* phones: what you buy, then the price */
.buyer-head { grid-area: head; display: grid; gap: 0.75rem; }
.buyer-head .h1 { text-wrap: balance; }
.buyer-head .h1:focus { outline: none; }   /* focused for screen readers on arrival, not a control */
.buyer-pay { grid-area: pay; min-width: 0; }
.buyer-list { grid-area: list; min-width: 0; }
@media (min-width: 960px) {
  .buyer { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); grid-template-rows: auto 1fr; grid-template-areas: "head pay" "list pay"; column-gap: 2.5rem; padding-block: 1rem; }
  .buyer-pay { position: sticky; top: 1.5rem; }
}
.buyer-pay .btn[data-size="lg"] { width: 100%; }
.buyer-pay .alert p + p { margin-top: 0.5rem; }
.buyer .card-title.row { flex-wrap: wrap; row-gap: 0.25rem; }
.preview-list { list-style: none; margin: 0; padding: 0; }
.preview-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border); }
.preview-list li:last-child { border-bottom: 0; }
.preview-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-list .size { color: var(--muted-foreground); font-variant-numeric: tabular-nums; font-size: var(--text-xs); }
.preview-list .icon { color: var(--muted-foreground); }
.pay-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.pay-qr .md-qr { margin: 0; }
.pay-qr .md-qr svg { width: 8.5rem; height: 8.5rem; }   /* the address at level Q with the mark: 2.2 px a module */
.pay-qr .md-qr figcaption { max-width: 8.5rem; }
.pay-qr .input { font-size: var(--text-xs); }
@media (max-width: 380px) { .pay-qr { grid-template-columns: minmax(0, 1fr); justify-items: start; } }
/* A drive in this browser (owner-5): its line keeps the height of Pay from my drive and its two-line note while
   the drive is checked and after, so the answer moves nothing below it. */
.pay-drive { min-height: calc(var(--target) + 3rem); align-content: start; }
/* Received's Payments (the owner check, step 16) */
[data-testid="sales-root"] .badge[data-check] { white-space: nowrap; }

/* Delete my drive (drive-account.js wipe): each file drops into the can as it is deleted, then a check. */
.wipe-sure { align-items: flex-start; }
#delete-drive > * { min-width: 0; }
#delete-drive .dialog-footer { flex-direction: column-reverse; }
#delete-drive .dialog-footer .btn { width: 100%; white-space: normal; height: auto; min-height: 2.5rem; text-align: center; }
.wipe-sure label { font-size: var(--text-sm); line-height: 1.4; }
.wipe-stage { position: relative; height: 8.5rem; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.wipe-can { width: 5.5rem; height: auto; overflow: visible; }
.wipe-can .wipe-body path:first-child { fill: var(--muted); stroke: var(--foreground); stroke-width: 3; stroke-linejoin: round; }
.wipe-can .wipe-ribs { fill: none; stroke: var(--muted-foreground); stroke-width: 3; stroke-linecap: round; }
.wipe-can .wipe-lid { fill: var(--muted); stroke: var(--foreground); stroke-width: 3; stroke-linejoin: round; transform-box: fill-box; transform-origin: 0% 100%; }
.wipe-stage.is-eating .wipe-lid { animation: wipe-lid 420ms var(--ease, ease-out); }
.wipe-stage.is-eating .wipe-can { animation: wipe-gulp 420ms var(--ease, ease-out); }
.wipe-chip { position: absolute; left: 50%; top: 0; width: 2rem; height: 2rem; margin-left: -1rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--background); border: 1px solid var(--border); box-shadow: var(--shadow-sm, 0 1px 2px rgb(0 0 0 / 0.2));
  animation: wipe-drop 520ms cubic-bezier(0.55, 0, 0.75, 0.2) forwards; }
.wipe-chip .icon { width: 1rem; height: 1rem; }
.wipe-count { font-weight: 500; font-variant-numeric: tabular-nums; margin: 0; }
.wipe-now { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.25rem; }
.wipe-stage.is-done .wipe-can { animation: wipe-shrink 500ms var(--ease, ease-out) forwards; }
.wipe-check { position: absolute; left: 50%; bottom: 1.5rem; width: 4rem; height: 4rem; margin-left: -2rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-solid); color: var(--on-brand); box-shadow: inset 0 0 0 1px var(--brand-edge); opacity: 0; animation: wipe-pop 420ms 260ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.wipe-check .icon { width: 2rem; height: 2rem; stroke-width: 3; }
@keyframes wipe-drop {
  0% { transform: translate(var(--x), -2.5rem) rotate(0deg) scale(1); opacity: 0; }
  20% { opacity: 1; }
  80% { transform: translate(0, 4.4rem) rotate(var(--r)) scale(0.8); opacity: 1; }
  100% { transform: translate(0, 5.4rem) rotate(var(--r)) scale(0.5); opacity: 0; }
}
@keyframes wipe-lid { 0%, 100% { transform: rotate(0deg); } 35% { transform: rotate(-28deg) translateY(-4px); } }
@keyframes wipe-gulp { 0%, 100% { transform: scale(1); } 70% { transform: scale(1.04, 0.96); } }
@keyframes wipe-shrink { to { transform: scale(0.6); opacity: 0; } }
@keyframes wipe-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .wipe-stage.is-eating .wipe-lid, .wipe-stage.is-eating .wipe-can, .wipe-chip { animation: none; }
  .wipe-stage.is-done .wipe-can { animation: none; opacity: 0; }
  .wipe-check { animation: none; opacity: 1; }
}

/* ======================= drive v3 (docs/review/drive-v3.md): the home's v3 look ======================= */
/* The mark's ink tile is a frosted tile in dark mode (its edge lit from above, as v3's glass); light keeps it plain. */
.brand-mark { box-shadow: var(--tile-edge); }
.empty-art .ea-mark { box-shadow: var(--tile-edge), var(--shadow-md); }
/* The header is frosted: the list scrolls under it, blurred. Solid where transparency is turned down. */
.app-header { background: color-mix(in oklab, var(--background) 80%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
@media (prefers-reduced-transparency: reduce) { .app-header { background: var(--background); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* Glass on the drive's own raised surfaces (components.css has the shadcn ones). The phone's list has no box. */
.folder, .folder:hover, .tari-row, .empty-art .ea-file, .side-new .btn[data-variant], .side-new .btn[data-variant]:hover, .fab[data-variant="secondary"] { background-image: var(--glass); border-color: var(--glass-edge); border-top-color: var(--glass-top); }
.folder:focus-visible, .side-new .btn[data-variant]:focus-visible { border-color: var(--ring); }   /* the ring's border wins over a hovered edge */
@media (min-width: 768px) { .files { background-image: var(--glass); border-color: var(--glass-edge); border-top-color: var(--glass-top); } }
@media (prefers-contrast: more) { .folder, .tari-row, .files, .side-new .btn[data-variant], .fab[data-variant="secondary"] { background-image: none; border-color: var(--border); } }
/* Icon tiles are small frosted tiles in dark mode (a white wash, the lit edge); Tari's keep their violet wash. */
:is(.folder-icon, .choice .choice-icon, .setting-row .choice-icon, .empty-media[data-variant="icon"], .alert-media, .timeline .t-icon) { background: var(--tile-fill); box-shadow: var(--tile-edge); }
.choice[data-tari] .choice-icon, .timeline .t-icon[data-tone="tari"] { background: var(--tari-soft); }
.timeline .t-icon[data-tone="success"] { background: var(--success-soft); }
/* The start screen (no drive yet): the home's open box with the files rising out of it, beside the words on a
   computer and under them on a phone. Dark: on the void, its floor faded out (v3.css); light: on v3's gunmetal
   card, drawn with lighten so the picture's ink takes the card's light. */
.start-pic { position: relative; isolation: isolate; width: min(100%, 24rem); aspect-ratio: 1; margin-top: 2rem; border-radius: 14px; background: var(--stage); box-shadow: var(--stage-shadow); overflow: hidden; pointer-events: none; user-select: none; }
.start-pic img { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: var(--stage-blend);
  -webkit-mask: linear-gradient(to bottom, #000 88%, transparent); mask: linear-gradient(to bottom, #000 88%, transparent); }
@media (min-width: 900px) {   /* only the start screen: Opening your drive and its errors use .start with one child */
  .start:has(> .start-pic) { grid-template-columns: minmax(0, 30rem) minmax(0, 26rem); column-gap: clamp(2rem, 6vw, 5rem); align-items: center; justify-content: center; align-content: center; padding-block: 2.5rem; }
  .start:has(> .start-pic) > .start-pic { width: 100%; margin-top: 0; }   /* without :has(), the phone's stack */
}

/* ======================= a drive's shop (docs/shop.md): the public page (/shop/<id>) and My shop ======================= */
/* Phones first: each listing is its words, then its price and Buy and open across the card; side by side from 640 px.
   The owner's words keep their own line breaks and wrap anywhere, so a long word never pushes the page sideways. */
.fv-page.shop-main { width: min(100%, 48rem); }
.shop { display: grid; gap: 2rem; min-width: 0; }
.shop-head { display: grid; gap: 0.75rem; justify-items: start; min-width: 0; }
.shop-head .h1 { text-wrap: balance; max-width: 100%; }
.shop-head .h1:focus { outline: none; }   /* focused for screen readers on arrival, not a control */
.shop-own-text { overflow-wrap: anywhere; }
.shop-bio { white-space: pre-line; color: var(--muted-foreground); max-width: 40rem; line-height: 1.5; }
.shop-list { display: grid; gap: 0.75rem; min-width: 0; }
.shop-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.shop-item { gap: 1rem; padding: 1rem; min-width: 0; }
.shop-item-main { display: flex; gap: 0.875rem; align-items: flex-start; min-width: 0; }
.shop-item-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center;
  background: var(--tile-fill, var(--muted)); box-shadow: var(--tile-edge, none); }
.shop-item-text { display: grid; gap: 0.25rem; min-width: 0; }
.shop-item-title { margin: 0; font-size: var(--text-base); font-weight: 600; line-height: 1.3; }
.shop-item-desc { font-size: var(--text-sm); color: var(--muted-foreground); }
.shop-item-meta { font-size: var(--text-xs); color: var(--muted-foreground); }
.shop-item-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.shop-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-item-buy .btn { flex: 1 1 10rem; }
@media (min-width: 640px) {
  .shop-item { flex-direction: row; align-items: center; justify-content: space-between; }
  .shop-item-buy { flex: none; justify-content: flex-end; }
  .shop-item-buy .btn { flex: none; }
}
.shop-foot { display: grid; gap: 0.75rem; justify-items: start; padding-top: 1rem; border-top: 1px solid var(--border); }
.shop-owner { min-width: 0; max-width: 56rem; }
.shop-meta { font-size: var(--text-xs); color: var(--muted-foreground); overflow-wrap: anywhere; }
.shop-facts { gap: 0.5rem; }
.shop-facts .item-description { display: block; -webkit-line-clamp: unset; }
.shop-listed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.shop-listed { gap: 0.5rem; }
.shop-listed .item-title { flex-wrap: wrap; width: auto; }
/* ======================= the market (docs/market.md): /market, and Ask for it on a public shop's page ======================= */
/* The search row wraps on a phone: the field takes the line, the filter and the button share the next. An ask's state
   sits where Buy and open would, as a quiet panel: what is happening, then what to do. */
.market-search { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.market-search .input[type="search"] { flex: 1 1 14rem; min-width: 0; }
.market-search .market-kind { flex: 0 1 9rem; width: auto; }
.market-item-buy { align-items: flex-start; }
.market-ask-slot { display: grid; gap: 0.5rem; min-width: 0; }
.market-ask { display: grid; gap: 0.375rem; padding: 0.75rem; border-radius: var(--radius-md); background: var(--muted); min-width: 0; max-width: 24rem; }
.market-ask-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 600; font-size: var(--text-sm); }
.market-ask[data-state="answered"] .market-ask-title .icon { color: var(--success, currentColor); }
.market-ask[data-state="ended"] .market-ask-title .icon, .market-ask[data-state="bad"] .market-ask-title .icon { color: var(--destructive, currentColor); }
.market-ask-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.market-ask p.small { margin: 0; }
@media (min-width: 640px) {
  .market-item-buy { align-items: center; }
}
.shop-listed .item-content { min-width: min(100%, 12rem); }
.shop-link-actions { flex-wrap: wrap; gap: 0.5rem; }

/* ======================= withdrawing earnings (docs/withdraw.md): the block in Earnings and its dialog ======================= */
.wd-ready { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.wd-big { display: grid; gap: 0.25rem; }
.wd-big b { font-size: var(--text-2xl, 1.5rem); font-variant-numeric: tabular-nums; }
.wd-address { margin: 0; padding: 0.75rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--muted);
  font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; word-break: break-all; }
.wd-muted { color: var(--muted-foreground); }
.wd-mark { background: color-mix(in oklab, var(--brand-solid) 45%, transparent); color: var(--foreground); border-radius: 3px; padding: 0 1px; font-weight: 600; }
.wd-rows { display: grid; gap: 0.5rem; }
.wd-row { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--text-sm); }
.wd-num { font-variant-numeric: tabular-nums; }
.wd-history .preview-list li { flex-wrap: wrap; row-gap: 0.25rem; }
.wd-history .preview-list .name { flex: 1 1 14rem; }
.wd-history .preview-list .tx-link { font-size: var(--text-xs); }
