/* appdealer styles. The colours are variables on [data-theme="paper"]. */

/* Fonts are served from this site (SIL Open Font License), so no page waits on a third party. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-variable-latin-extended.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo-variable-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-variable-latin-extended.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/jetbrains-mono-variable-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

[data-theme="paper"] {
  --background: #F4F4F2; --surface: #FFFFFF; --surface-raised: #FAFAF8; --ink: #0B0B0B; --muted: #5C5C5C;
  --line: #E2E2DF; --line-strong: #A8A8A4; --button: #0B0B0B; --button-ink: #FFFFFF; --brand: #E10600;
  --accent: #E10600; --accent-ink: #FFFFFF; --urgent: #C40500; --urgent-fill: #E10600; --urgent-ink: #FFFFFF;
  --positive: #1B6B3A; --positive-fill: #1B6B3A; --positive-ink: #FFFFFF; --focus: #E10600; --shadow: rgba(0, 0, 0, .18);
  color-scheme: light;
}

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --duration-fast: 140ms;
  --duration: 220ms;
  --duration-slow: 340ms;
  /* A lot opening: the panel and the page's glide to it share this curve and length (market-page.js). */
  --ease-open: cubic-bezier(.22, 1, .36, 1);
  --duration-open: 560ms;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
  margin: 0; background: var(--background); color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
.page-width { max-width: 1360px; margin: 0 auto; padding: 0 28px; }
.page-bottom { padding-bottom: 90px; }
/* The footer's line runs the whole width, like the header's; two classes, so the narrow-screen .page-width padding
   does not take the footer's height away. */
.site-footer { margin-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer .page-width { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 18px; padding-bottom: 28px; }
.site-footer a { color: var(--ink); font-weight: 600; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Terms, Privacy and Refunds: a column of reading width, headings in the display face. */
.legal-date { margin: 0; font-size: 13.5px; }
.legal { max-width: 720px; font-size: 15.5px; line-height: 1.6; }
.legal h2 { margin: 30px 0 8px; font-size: 19px; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; line-height: 1.25; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal .table-box { margin: 4px 0 14px; }
.legal .table { font-size: 14px; line-height: 1.4; }
.legal .table td { vertical-align: top; }
.legal .table th { white-space: normal; vertical-align: bottom; }
@media (max-width: 480px) { .legal .table th, .legal .table td { padding-left: 6px; padding-right: 6px; } }
.muted { color: var(--muted); }
.urgent { color: var(--urgent); }
.screen-reader-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Motion. Moving between pages is a short cross-fade with the header held still (where the browser
   supports it); everything a person does on a page answers with a short transition. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
.site-header { view-transition-name: site-header; }
.chat-launcher { view-transition-name: support-launcher; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-panel-enter { animation: rise-in .28s var(--ease-out) both; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 10px 22px; min-height: 64px; flex-wrap: wrap; }
.logo { text-decoration: none; display: inline-flex; border-radius: 6px; }
.wordmark { font-weight: 800; font-stretch: 125%; font-size: 21px; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.wordmark-dealer { color: var(--brand); transition: color var(--duration) ease; }
.logo:hover .wordmark-dealer { color: var(--ink); }
.navigation { display: flex; gap: 2px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.navigation a { position: relative; padding: 9px 13px; border-radius: 8px; text-decoration: none; font-weight: 500; white-space: nowrap; transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease; }
.navigation a::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform var(--duration) var(--ease-out); }
.navigation a:hover { background: var(--surface); }
.navigation a:hover::after { transform: scaleX(.4); }
.navigation a[aria-current="page"] { font-weight: 700; }
.navigation a[aria-current="page"]::after { transform: scaleX(1); }
.navigation-soon { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; font-weight: 500; white-space: nowrap; color: var(--muted); cursor: default; }
.header-right { display: flex; align-items: center; gap: 8px; }
.menu-wrapper { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 800; cursor: pointer; transition: box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out); }
.avatar:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.avatar:active { transform: scale(.94); }
.menu, .popover {
  position: absolute; z-index: 40; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 50px var(--shadow); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity var(--duration) ease, transform var(--duration) var(--ease-out);
}
.menu { right: 0; top: calc(100% + 8px); }
.menu.is-open, .popover.is-open { opacity: 1; transform: none; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; text-decoration: none; font-size: 14px; cursor: pointer; transition: background-color var(--duration-fast) ease; }
.menu a:hover, .menu button:hover { background: var(--surface-raised); }
.menu-who { margin: 0; padding: 8px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }

/* Buttons and controls */
.button {
  height: 44px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--button); color: var(--button-ink);
  font-weight: 700; font-stretch: 106%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; white-space: nowrap;
  transition: filter var(--duration-fast) ease, background-color var(--duration-fast) ease, color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}
.button:hover { filter: brightness(1.14) contrast(.96); }
.button:active { transform: scale(.97); }
.button-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.button-quiet:hover { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--ink); filter: none; }
.button-small { height: 36px; padding: 0 12px; border-radius: 9px; font-size: 14px; }
.button[disabled], .button[aria-disabled="true"] { opacity: .45; cursor: default; filter: none; transform: none; }
.button-wide { width: 100%; }
.button.is-busy { pointer-events: none; }
.button.is-busy::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-button { border: 0; background: none; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); gap: 2px; flex-wrap: wrap; }
.segmented button { height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: background-color var(--duration) var(--ease-out), color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out); }
.segmented button:hover { color: var(--ink); }
.segmented button:active { transform: scale(.97); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--button); color: var(--button-ink); }
.segmented .count { font-weight: 500; font-size: 12.5px; opacity: .8; font-variant-numeric: tabular-nums; }

.chip { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: background-color var(--duration) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out); }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--background); border-color: var(--ink); }
.chip[aria-disabled="true"] { border-style: dashed; color: var(--muted); }
.chip .soon { font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input, .select {
  height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-size: 15px; min-width: 0; transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.input:focus, .select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); outline: none; }
.input[aria-invalid="true"] { border-color: var(--urgent); }
.field-error { color: var(--urgent); font-size: 13px; min-height: 0; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; cursor: pointer; font-size: 14px; }
.checkbox input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }
input[type="range"] { width: 100%; margin: 4px 0 0; accent-color: var(--ink); }

/* Technology and theme */
.technology { display: inline-block; margin-right: 7px; padding: 0 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--muted); vertical-align: 1px; line-height: 16px; }
.lot-theme { min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lot-icon { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; display: block; }
.lot-icon svg { display: block; width: 100%; height: 100%; }
.lot-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--urgent-fill); display: inline-block; flex: 0 0 auto; animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--urgent-fill) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* Page heads */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding: 30px 0 20px; }
.page-title { margin: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; font-stretch: 125%; letter-spacing: -.035em; line-height: 1; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }

/* Market: filters in a side panel, search above the list. */
.market-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 0 36px; align-items: start; }
.market-main { min-width: 0; container-type: inline-size; }
.market-filters { position: sticky; top: 65px; max-height: calc(100vh - 65px); overflow-y: auto; padding: 16px 2px 40px 0; scrollbar-width: thin; }
.filters-head { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-bottom: 4px; padding: 0 10px; }
.filters-head h2 { margin: 0 auto 0 0; font-size: 15px; font-weight: 800; font-stretch: 112%; }
.market-filters .filters-close { display: none; }
.filter-group { display: flex; flex-direction: column; gap: 1px; padding: 12px 0; border-top: 1px solid var(--line); }
.filters-head + .filter-group { border-top: 0; padding-top: 0; }
.filter-group h3 { margin: 0 0 6px; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.filter-option {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; cursor: pointer; font-size: 14px; color: var(--ink);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.filter-option:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.filter-option[aria-pressed="true"] { background: var(--ink); color: var(--background); font-weight: 700; }
.filter-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-option .count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.filter-option[aria-pressed="true"] .count { color: inherit; opacity: .7; }
.filter-option.is-soon { color: var(--muted); }
.soon { font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.filter-note { margin: 2px 0 6px 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; animation: rise-in .2s var(--ease-out) both; }
.filter-note p { margin: 0; color: var(--muted); }
/* The themes of the games in the list, as many as there are. */
.filter-options { display: flex; flex-direction: column; gap: 1px; }

.market-toolbar {
  position: sticky; top: 65px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 16px 0 12px;
  background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-strong);
}
.filters-toggle { display: none; }
.filters-toggle .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--background); font-size: 11.5px; display: inline-grid; place-items: center; }
.filters-toggle .count:empty { display: none; }
.search-field { position: relative; flex: 1 1 240px; display: flex; min-width: 0; }
.search-field .input { width: 100%; padding-left: 36px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.results-count { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filters-backdrop { position: fixed; inset: 0; z-index: 64; background: rgba(8, 8, 8, .45); opacity: 0; transition: opacity var(--duration) ease; }
.filters-backdrop.is-open { opacity: 1; }

/* Market list */
.lots { list-style: none; margin: 0; padding: 0; }
.group-badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: var(--background); letter-spacing: .02em; }

.lot { border-bottom: 1px solid var(--line); }
.is-entering { animation: rise-in .34s var(--ease-out) both; animation-delay: calc(var(--row-index, 0) * 22ms); }
.lot-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 170px 96px 104px 18px;
  gap: 14px; align-items: center; min-height: 60px; padding: 8px 8px 8px 6px; cursor: pointer;
  transition: background-color var(--duration) ease;
}
.lot-row:hover { background: var(--surface); }
.lot.is-open .lot-row { background: var(--surface); }
.lot-meta { display: contents; }
.lot-toggle { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; border-radius: 8px; }
.lot-icon { transition: transform var(--duration) var(--ease-out); }
.lot-row:hover .lot-icon { transform: scale(1.06) rotate(-2deg); }
.lot-main { display: flex; flex-direction: column; min-width: 0; }
.lot-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-description { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { display: flex; flex-direction: column; line-height: 1.25; font-variant-numeric: tabular-nums; min-width: 0; }
.timer b { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.timer small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer.is-urgent b, .timer small.urgent { color: var(--urgent); }
.timer.is-positive b { color: var(--positive); }
.price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price b { font-size: 16px; font-weight: 800; font-stretch: 112%; }
.price s, .price small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lot-buy { justify-self: end; }
.chevron { width: 18px; height: 18px; color: var(--muted); transition: transform var(--duration-slow) var(--ease-out); }
.lot.is-open .chevron { transform: rotate(180deg); }

/* The in-row details open by height, not by jumping in. */
.lot-panel-frame { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-open) var(--ease-open); background: var(--surface); }
.lot.is-open .lot-panel-frame { grid-template-rows: 1fr; }
.lot-panel-clip { min-height: 0; overflow: hidden; }
.lot-panel {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .9fr); gap: 22px 26px;
  padding: 14px 8px 22px 58px; opacity: 0; transform: translateY(-10px);
  transition: opacity var(--duration-slow) ease, transform var(--duration-open) var(--ease-open);
}
.lot.is-open .lot-panel { opacity: 1; transform: none; }
/* Every screenshot laid out whole, nothing behind a scroll: the first one large, the others beside it in two rows and
   then below. The columns come from the count (market-page.js), so the rows beside the large one are never empty. */
.screenshot-mosaic {
  --cell: 108px; --gap: 10px;
  grid-column: 1 / -1; display: grid; gap: var(--gap); align-items: start; grid-auto-flow: row dense;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  width: 100%; max-width: calc(var(--columns) * var(--cell) + (var(--columns) - 1) * var(--gap));
}
.screenshot-mosaic.is-landscape { --cell: 190px; }
.screenshot-mosaic.is-even { --cell: 200px; }
.screenshot-mosaic.is-landscape.is-even { --cell: 380px; }
.screenshot {
  display: block; width: 100%; aspect-ratio: var(--ratio); border: 0; border-radius: 16px; padding: 4px; background: var(--ink);
  transition: transform var(--duration) var(--ease-out);
}
.screenshot.is-lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; align-self: stretch; border-radius: 22px; padding: 5px; }
.screenshot > span { position: relative; display: block; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: #262626; }
.screenshot.is-lead > span { border-radius: 17px; }
.screenshot img, .screenshot svg, .screenshot video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
button.screenshot { cursor: zoom-in; }
button.screenshot:hover { transform: translateY(-2px); }
button.screenshot:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* As the panel opens, the screens come in one after another. */
.lot.is-open .screenshot { animation: tile-in var(--duration-open) var(--ease-open) backwards; animation-delay: calc(90ms + var(--tile-index, 0) * 32ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* The viewer covers the page in the site's ink; the picture is as large as the window allows. */
dialog.viewer {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--ink); color: #FFFFFF; overflow: hidden;
}
dialog.viewer::backdrop { background: transparent; }
dialog.viewer[open] { animation: fade-in .2s ease; }
dialog.viewer.is-closing { animation: fade-out .18s ease forwards; }
html:has(dialog.viewer[open]) { overflow: hidden; }
.viewer-track {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  overscroll-behavior: contain; scrollbar-width: none;
}
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; display: grid; place-items: center; padding: 68px 84px 28px; scroll-snap-align: center; scroll-snap-stop: always; }
.viewer-slide img, .viewer-slide video { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 96px); border-radius: 22px; }
.viewer-slide video { background: #000; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.video-play svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.viewer-bar { position: absolute; z-index: 1; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 14px 24px; pointer-events: none; }
.viewer-title { margin: 0; font-size: 16px; font-weight: 800; font-stretch: 118%; letter-spacing: -.01em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-title span { margin-left: 8px; font-weight: 500; font-stretch: 100%; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
.viewer-button {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .12); color: #FFFFFF; cursor: pointer; pointer-events: auto; transition: background var(--duration-fast) ease;
}
.viewer-button:hover { background: rgba(255, 255, 255, .24); }
.viewer-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.viewer-button:disabled { opacity: .25; cursor: default; }
.viewer-step { position: absolute; z-index: 1; top: 50%; width: 52px; height: 52px; transform: translateY(-50%); }
.viewer-previous { left: 18px; }
.viewer-next { right: 18px; }
.panel-information { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel-kicker { margin: 0; font-size: 12.5px; color: var(--muted); }
.panel-title { margin: 0; font-size: 24px; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; line-height: 1; }
.panel-description { margin: 0; max-width: 60ch; text-wrap: pretty; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 16px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; }
.facts .facts-wide { grid-column: 1 / -1; }
.panel-hash { margin: 0; font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; word-break: break-all; }

.buy-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--background); border: 1px solid var(--line); align-self: start; }
.buy-box-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.buy-box-total b { font-size: 26px; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.buy-box-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.buy-box-actions .button { flex: 1 1 140px; }
.buy-box-note { margin: 0; flex-basis: 100%; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.buy-box-message { margin: 0; font-size: 14px; }

.more { display: flex; justify-content: center; padding: 22px 0 90px; }
.empty-state { padding: 48px 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; animation: rise-in .3s var(--ease-out) both; }
.empty-state p { margin: 0; }

/* Dialogs */
dialog.sheet {
  border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink);
  width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 90px var(--shadow);
}
dialog.sheet[open] { animation: dialog-in .26s var(--ease-out); }
dialog.sheet[open]::backdrop { background: rgba(8, 8, 8, .5); animation: fade-in .26s ease; }
dialog.sheet.is-closing { animation: dialog-out .2s ease forwards; }
dialog.sheet.is-closing::backdrop { animation: fade-out .2s ease forwards; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.98); } }
.sheet-inner { display: flex; flex-direction: column; gap: 16px; padding: 20px 22px 22px; }
.sheet-head { display: flex; gap: 12px; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; line-height: 1.1; }
.sheet-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.sheet-close { margin-left: auto; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; transition: background-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out); }
.sheet-close:hover { background: var(--surface-raised); transform: rotate(90deg); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100vw - 24px));
  padding: 13px 16px; border-radius: 12px; background: var(--ink); color: var(--background); font-size: 14px; box-shadow: 0 16px 40px var(--shadow);
  animation: toast-in .26s var(--ease-out);
}
.toast.is-out { animation: toast-out .24s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }

/* After a card payment */
.payment-card { max-width: 560px; margin: 64px auto 0; padding: 36px 32px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.payment-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; animation: rise-in .24s var(--ease-out) both; }
.payment-state h1 { margin: 0; font-size: 26px; font-weight: 800; font-stretch: 122%; letter-spacing: -.03em; line-height: 1.1; }
.payment-state p { margin: 0; text-wrap: pretty; }
.payment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.payment-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.payment-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.payment-mark-done { background: var(--positive-fill); color: var(--positive-ink); }
.payment-mark-stopped { background: var(--line); color: var(--ink); }
.payment-mark-attention { background: var(--urgent-fill); color: var(--urgent-ink); }

/* Connection */
.connection-notice { position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: min(420px, calc(100vw - 100px)); padding: 10px 14px; border-radius: 12px; background: var(--urgent-fill); color: var(--urgent-ink); font-size: 13.5px; font-weight: 600; box-shadow: 0 12px 30px var(--shadow); animation: rise-in .24s var(--ease-out) both; }

/* Support chat */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launcher {
  height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: var(--button); color: var(--button-ink);
  font-weight: 700; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; box-shadow: 0 12px 30px var(--shadow);
  transition: transform var(--duration) var(--ease-out), filter var(--duration-fast) ease;
}
.chat-launcher:hover { transform: translateY(-2px); filter: brightness(1.1); }
.chat-launcher:active { transform: scale(.96); }
.chat-panel {
  width: min(380px, calc(100vw - 28px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px var(--shadow);
  opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom right;
  transition: opacity var(--duration) ease, transform var(--duration-slow) var(--ease-out);
}
.chat.is-open .chat-panel { opacity: 1; transform: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head div { display: flex; flex-direction: column; line-height: 1.25; }
.chat-head small { color: var(--muted); font-size: 12.5px; }
.chat-badge .wordmark { font-size: 15px; }
.chat-log { flex: 1 1 auto; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.message { max-width: 82%; padding: 9px 12px 6px; border-radius: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.message p { margin: 0; white-space: pre-wrap; text-wrap: pretty; }
.message time { font-size: 11px; opacity: .65; align-self: flex-end; }
.message-from-support { align-self: flex-start; background: var(--background); border-bottom-left-radius: 4px; }
.message-from-me { align-self: flex-end; background: var(--button); color: var(--button-ink); border-bottom-right-radius: 4px; }
.message.is-new { animation: message-in .3s var(--ease-out) both; }
@keyframes message-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.typing { flex-direction: row; gap: 4px; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-topics { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-form { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1 1 auto; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--background); color: var(--ink); font-size: 14px; line-height: 1.4; transition: border-color var(--duration-fast) ease; }
.chat-form textarea:focus { outline: none; border-color: var(--ink); }
.chat-send { width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) ease; }
.chat-send { background: var(--button); color: var(--button-ink); }
.chat-send:active { transform: scale(.92); }

/* Request a game: its button sits above the support chat's, and the chat's panel covers it when the chat is open. */
.request { position: fixed; right: 18px; bottom: 78px; z-index: 54; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.request-launcher {
  height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 12px 30px var(--shadow);
  transition: transform var(--duration) var(--ease-out), border-color var(--duration-fast) ease;
}
.request-launcher svg { color: var(--brand); }
.request-launcher:hover { transform: translateY(-2px); border-color: var(--ink); }
.request-launcher:active { transform: scale(.96); }
.request-panel {
  width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 150px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 30px 80px var(--shadow); opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom right;
  transition: opacity var(--duration) ease, transform var(--duration-slow) var(--ease-out);
}
.request.is-open .request-panel { opacity: 1; transform: none; }
.request-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.request-form p { margin: 0; }
.request-form textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.request-note { font-size: 14px; color: var(--muted); text-wrap: pretty; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: 0 0 auto; width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background-color var(--duration) ease; }
.switch-track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform var(--duration) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; line-height: 1.3; font-size: 14px; }
.switch-text small { color: var(--muted); font-size: 13px; }

/* Panels used by Account and Administration */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h2 { margin: 0; font-size: 19px; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; }
.panel h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel p { margin: 0; }
.grid-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section { padding: 8px 0 26px; }
.table-box { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .number { text-align: right; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--duration-fast) ease; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-raised) 60%, transparent); }
.key-value-list { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
.key-value-list dt { color: var(--muted); }
.key-value-list dd { margin: 0; text-align: right; }

/* Purchases */
.purchase-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 84px auto; gap: 14px; align-items: center; min-height: 64px; padding: 8px 6px; border-bottom: 1px solid var(--line); transition: background-color var(--duration) ease; }
.purchase-row:hover { background: var(--surface); }
.purchase-row.is-expired > :not(.purchase-actions) { opacity: .5; }
.purchase-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.purchase-actions { display: flex; gap: 6px; justify-content: flex-end; }
.window-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 5px; }
.window-bar span { display: block; height: 100%; background: var(--positive-fill); transition: width .6s var(--ease-out); }
.window-bar.is-urgent span { background: var(--urgent-fill); }

/* Sign in and sign up */
.auth-layout { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px 16px 80px; }
.auth-logo .wordmark { font-size: 26px; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.auth-card h2 { margin: 0; font-size: 24px; font-weight: 800; font-stretch: 122%; letter-spacing: -.03em; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.password-field { position: relative; display: flex; }
.password-field .input { flex: 1; padding-right: 64px; }
.password-field .text-button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; padding: 4px; }
.form-message { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; animation: rise-in .24s var(--ease-out) both; }
.form-message.is-error { background: color-mix(in srgb, var(--urgent-fill) 10%, transparent); color: var(--urgent); }
.form-message.is-success { background: color-mix(in srgb, var(--positive-fill) 12%, transparent); color: var(--positive); }
.auth-switch { margin: 0; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--ink); font-weight: 600; }

/* Administration */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tiles[aria-busy="true"] { min-height: 120px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 800; font-stretch: 125%; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile-detail { font-size: 13px; color: var(--muted); }
.tile.is-urgent { border-color: var(--urgent-fill); }
.tile.is-urgent .tile-value { color: var(--urgent); }
/* Admin, Analytics: its sections in a column, visits a day as columns from one baseline, the costs' form. */
.analytics { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.analytics-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.table .sub-row td { color: var(--muted); }
.table .sub-row td:first-child { padding-left: 16px; }
.day-chart { display: flex; flex-direction: column; gap: 8px; }
.day-chart p, .day-chart-axis { font-size: 12.5px; }
.day-chart-scroll { overflow-x: auto; }
/* The room above the columns is where a day's numbers show. */
.day-chart-plot { position: relative; display: flex; align-items: stretch; gap: 2px; height: 166px; padding-top: 26px; border-bottom: 1px solid var(--line-strong); }
.day-column { flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.day-column span { display: block; width: 100%; max-width: 24px; background: var(--ink); border-radius: 4px 4px 0 0; transition: background-color var(--duration-fast) ease; }
.day-column:hover span, .day-column:focus-visible span { background: var(--accent); }
.day-column:focus-visible { outline-offset: -2px; }
.day-chart-tip { position: absolute; top: 0; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px; background: var(--button); color: var(--button-ink); font-size: 12.5px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.day-chart-axis { display: flex; justify-content: space-between; }
.day-numbers summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.day-numbers[open] summary { margin-bottom: 8px; }
.cost-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cost-form .field { flex: 1 1 130px; }
.cost-form .cost-note { flex: 2 1 200px; }
.cost-form .input { width: 100%; }
.ad-link { font-size: 13px; word-break: break-all; }
.account-cell { display: flex; flex-direction: column; line-height: 1.3; }
.account-cell small { font-size: 12.5px; color: var(--muted); }
dialog.sheet.sheet-wide { width: min(760px, calc(100vw - 24px)); }
.dialog-subtitle { margin: 0; font-size: 15px; font-weight: 700; }
.code-note { display: block; margin-top: 3px; font-size: 12px; }
.state-pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.state-pill[data-state="active"] { background: color-mix(in srgb, var(--positive-fill) 14%, transparent); color: var(--positive); box-shadow: none; }
.support-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.conversations-panel { padding: 8px; max-height: calc(100vh - 220px); overflow-y: auto; }
.conversation-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.conversation { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: background-color var(--duration-fast) ease; }
.conversation:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.conversation.is-current { background: var(--background); }
.conversation-who { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; min-width: 0; }
.conversation-who time { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conversation-last { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-panel { padding: 0; overflow: hidden; }
.thread-panel > .muted, .thread-panel > .empty-state { padding: 22px; }
.thread-log { display: flex; flex-direction: column; gap: 8px; padding: 18px; max-height: calc(100vh - 320px); min-height: 240px; overflow-y: auto; }

/* Mail: one letter, its text as written (line breaks kept, long words broken). */
.letter-sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.letter-older { margin: 8px 12px 6px; }
.letter { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.letter-subject { margin: 0; font-size: 19px; font-weight: 800; font-stretch: 118%; letter-spacing: -.02em; overflow-wrap: anywhere; }
.letter-meta { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: 13.5px; }
.letter-meta dt { color: var(--muted); }
.letter-meta dd { margin: 0; overflow-wrap: anywhere; }
.letter-text { padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: calc(100vh - 380px); min-height: 160px; overflow-y: auto; }
.letter-attachments { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.letter-reply { padding-top: 14px; border-top: 1px solid var(--line); }
.letter-reply p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.letter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.letter-note { margin: 0; font-size: 12.5px; }

/* Narrow lists. The market's rows follow the width of the list, not of the window, because the side
   panel takes part of it on wide screens. */
@container (max-width: 960px) {
  .lot-panel { padding-left: 8px; }
}
@container (max-width: 720px) {
  .lot-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "main price buy" "meta meta meta"; row-gap: 6px; }
  .lot-toggle { grid-area: main; }
  .lot-meta { grid-area: meta; display: flex; align-items: center; gap: 10px; padding-left: 52px; flex-wrap: wrap; }
  .lot-row .price { grid-area: price; }
  .lot-row .lot-buy { grid-area: buy; }
  .chevron { display: none; }
  .lot-panel { grid-template-columns: minmax(0, 1fr); }
  .screenshot-mosaic { grid-template-columns: repeat(var(--narrow-columns), minmax(0, 1fr)); max-width: none; }
  .screenshot-mosaic.is-landscape .screenshot.is-lead { grid-row: auto; aspect-ratio: var(--ratio); }
}

/* Narrow screens: the filters slide in from the left. */
@media (max-width: 1099px) {
  .market-layout { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: inline-flex; }
  .market-filters {
    position: fixed; z-index: 65; top: 0; bottom: 0; left: 0; width: min(320px, 88vw); max-height: none; padding: 14px 12px 32px;
    background: var(--surface); box-shadow: 0 0 60px var(--shadow); transform: translateX(-104%); visibility: hidden;
    transition: transform var(--duration-slow) var(--ease-out), visibility 0s linear var(--duration-slow);
  }
  .market-filters.is-open { transform: none; visibility: visible; transition: transform var(--duration-slow) var(--ease-out); }
  .market-filters .filters-close { display: grid; }
}
@media (max-width: 980px) {
  .support-layout { grid-template-columns: minmax(0, 1fr); }
  .analytics-pair { grid-template-columns: minmax(0, 1fr); }
  .purchase-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 760px) {
  .page-width { padding: 0 16px; }
  .site-header { position: static; }
  .market-toolbar { top: 0; flex-wrap: wrap; }
  .search-field { order: 3; flex-basis: 100%; }
  .results-count { margin-left: auto; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .navigation { order: 3; flex-basis: 100%; }
  .toast { bottom: 84px; }
  .chat { right: 12px; bottom: 12px; }
  .chat-launcher span { display: none; }
  .chat-launcher { width: 48px; padding: 0; justify-content: center; }
  .request { right: 12px; bottom: 70px; }
  .request-launcher-rest { display: none; }
  .viewer-step { display: none; }
  .viewer-slide { padding: 60px 12px 20px; }
  .viewer-slide img, .viewer-slide video { max-height: calc(100dvh - 80px); border-radius: 16px; }
}
@media (max-width: 440px) {
  .header-inner { gap: 8px 12px; }
  .wordmark { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
