:root {
  color-scheme: dark;
  --stage: #262421;
  --stage-grid: #312e29;
  --ink: #f7f4eb;
  --muted: #a9a59b;
  --muted-strong: #cbc6bb;
  --surface: #1a1917;
  --surface-2: #24221f;
  --surface-3: #302d29;
  --line: #3b3833;
  --red: #ec3340;
  --yellow: #f2cf35;
  --green: #27b06d;
  --green-deep: #173a2a;
  --green-line: #2e9d69;
  --blue: #5c91f0;
  --phone-width: min(393px, 100vw);
  --shadow: 0 30px 90px #000b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--stage);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.7%, #0002 49.8%, #0002 50.2%, transparent 50.3%),
    repeating-linear-gradient(0deg, var(--stage-grid) 0 1px, transparent 1px 32px),
    var(--stage);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.phone {
  position: relative;
  width: var(--phone-width);
  height: min(852px, calc(100dvh - 56px));
  min-height: 620px;
  overflow: hidden;
  overflow: clip;
  border: 1px solid #4b4740;
  border-radius: 42px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 7px #0b0b0a;
}

.status-bar {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 27px 0;
  color: #eeeae0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-icons {
  font-size: 8px;
  letter-spacing: 3px;
}

.app-header {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 17px 10px;
  border-bottom: 1px solid var(--line);
  background: #1a1917f5;
}

.avatar-button,
.icon-button,
.square-button {
  position: relative;
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.avatar-button {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #2771ee;
}

.avatar-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wordmark {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.wordmark strong {
  color: var(--yellow);
}

.icon-button,
.square-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  font-size: 21px;
  font-weight: 900;
}

.screen-scroll {
  position: absolute;
  inset: 92px 0 73px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar,
.sheet-scroll::-webkit-scrollbar {
  display: none;
}

.view {
  padding: 21px 17px 9px;
}

.view[hidden] {
  display: none;
}

.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 3px;
  color: var(--red);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 290px;
  margin-bottom: 0;
  font-size: 27px;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
}

.lead {
  margin: -4px 0 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.progress-card {
  position: relative;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid #a1222c;
  border-radius: 18px;
  background:
    linear-gradient(120deg, transparent 50%, #ffffff12 50.5%, transparent 51%),
    linear-gradient(120deg, #ad1f2b, var(--red));
  box-shadow: 0 10px 28px #bb1d2b26;
}

.progress-card::after {
  content: "P";
  position: absolute;
  right: 68px;
  bottom: -42px;
  color: #ffffff0d;
  font-size: 130px;
  font-weight: 950;
  font-style: italic;
  transform: skew(-9deg);
}

.progress-copy {
  position: relative;
  z-index: 1;
}

.progress-copy p {
  margin-bottom: 2px;
  color: #ffe6e8;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-copy strong {
  display: block;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.progress-copy small {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.progress-ring {
  --owned-pct: 0;
  position: relative;
  z-index: 1;
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--yellow) calc(var(--owned-pct) * 1%), #791a22 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #bc2230;
}

.progress-ring span {
  position: relative;
  font-size: 12px;
  font-weight: 950;
}

.search-row {
  display: flex;
  gap: 8px;
  margin: 17px 0 12px;
}

.search-box {
  height: 42px;
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-2);
}

.search-box > span:first-child {
  font-size: 20px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #8d887f;
}

.square-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 17px;
}

.filter-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--yellow);
}

.chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 10px;
  font-weight: 850;
}

.chip.active {
  color: #18150b;
  border-color: var(--yellow);
  background: var(--yellow);
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 1px 10px;
}

.text-button {
  padding: 5px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}

.catalog-list {
  display: grid;
  gap: 9px;
}

.publication-card {
  width: 100%;
  min-height: 130px;
  display: grid;
  grid-template-columns: 87px minmax(0, 1fr);
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: 0 5px 15px #0002;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.publication-card:active {
  transform: scale(0.985);
}

.publication-card.owned {
  border-color: var(--green-line);
  background: var(--green-deep);
  box-shadow: 0 0 0 1px #27b06d26, 0 6px 19px #07160f;
}

.cover-trigger {
  width: 87px;
  align-self: center;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: zoom-in;
}

.cover {
  position: relative;
  display: block;
  width: 87px;
  height: 112px;
  align-self: center;
  overflow: hidden;
  border-radius: 4px;
  color: white;
  background:
    radial-gradient(circle at 75% 35%, var(--cover-b) 0 14%, transparent 14.5%),
    linear-gradient(150deg, transparent 50%, #0005 50.5%),
    var(--cover-a);
  box-shadow: 0 7px 13px #0007, inset 0 0 0 1px #ffffff33;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, #fff2, transparent 24%, transparent 77%, #0003);
}

.cover img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
}

.cover-view-icon {
  position: absolute;
  z-index: 3;
  right: 5px;
  bottom: 5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  color: #181713;
  background: #f8f4e9e8;
  box-shadow: 0 2px 6px #0008;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.cover-brand {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  right: 5px;
  display: block;
  color: #fff;
  font-size: 7px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.03em;
  text-shadow: 1px 1px var(--cover-c);
}

.cover-number {
  position: absolute;
  z-index: 1;
  top: 25px;
  left: 6px;
  display: block;
  max-width: 74px;
  font-size: 18px;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.cover-title {
  position: absolute;
  z-index: 1;
  right: 6px;
  bottom: 8px;
  left: 6px;
  display: block;
  padding-top: 5px;
  border-top: 2px solid var(--cover-c);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 2px 1px 1px 0;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.volume-label {
  color: var(--red);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.publication-card.owned .volume-label {
  color: #78dea9;
}

.research-dot {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #60583d;
  border-radius: 50%;
  color: var(--yellow);
  background: #312d1f;
  font-size: 9px;
  font-weight: 900;
}

.card-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  line-height: 1.14;
  letter-spacing: -0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.publication-card.owned .card-meta {
  color: #a9cbb8;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.mini-tag {
  padding: 3px 6px;
  border-radius: 999px;
  color: #cdc8bd;
  background: var(--surface-3);
  font-size: 7px;
  font-weight: 800;
}

.publication-card.owned .mini-tag {
  color: #c5ead5;
  background: #245039;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: auto;
  padding-top: 8px;
}

.parts-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.parts-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #766f64;
}

.parts-status.complete {
  color: #76d8a6;
}

.parts-status.complete .parts-dot {
  background: var(--green);
}

.own-button {
  min-width: 61px;
  padding: 6px 8px;
  border: 1px solid #4c4842;
  border-radius: 8px;
  color: #d7d2c8;
  background: #302e2a;
  font-size: 8px;
  font-weight: 900;
}

.own-button.active {
  color: #0f291d;
  border-color: #65d49b;
  background: #65d49b;
}

.empty-state {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface-2);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.tab-bar {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  height: 74px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px 31px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #171614f5;
  backdrop-filter: blur(14px);
}

.tab {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  color: #817d75;
  background: transparent;
  font-size: 18px;
}

.tab strong {
  font-size: 8px;
  font-weight: 850;
}

.tab.active {
  color: var(--yellow);
}

.set-list {
  display: grid;
  gap: 10px;
}

.set-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.set-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--set-color);
}

.set-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.set-top p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.set-top h2 {
  font-size: 15px;
}

.set-count {
  color: var(--set-color);
  font-size: 16px;
  font-weight: 950;
}

.set-bar {
  height: 5px;
  overflow: hidden;
  margin-top: 13px;
  border-radius: 99px;
  background: #0d0c0b;
}

.set-bar span {
  display: block;
  width: var(--set-pct);
  height: 100%;
  border-radius: inherit;
  background: var(--set-color);
}

.set-card > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.insight-hero {
  padding: 18px;
  border: 1px solid #46526c;
  border-radius: 17px;
  background: linear-gradient(145deg, #253450, #222837);
}

.insight-hero p,
.insight-hero span {
  margin-bottom: 3px;
  color: #acb9d5;
  font-size: 9px;
}

.insight-hero strong {
  display: block;
  margin-bottom: 4px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}

.insight-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
}

.insight-number {
  display: block;
  margin-bottom: 7px;
  color: var(--yellow);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.insight-grid strong {
  display: block;
  font-size: 11px;
}

.insight-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.attention-list {
  margin-top: 4px;
}

.attention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.attention-volume {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: #17130a;
  background: var(--yellow);
  font-size: 9px;
  font-weight: 950;
}

.attention-copy {
  min-width: 0;
  flex: 1;
}

.attention-copy strong,
.attention-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-copy strong {
  font-size: 10px;
}

.attention-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.attention-arrow {
  color: var(--muted);
}

.sheet-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  background: #000a;
  backdrop-filter: blur(2px);
}

.sheet-backdrop[hidden] {
  display: none;
}

.cover-viewer {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: stretch;
  background: #090908f2;
  backdrop-filter: blur(8px);
}

.cover-viewer[hidden] {
  display: none;
}

.cover-viewer-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding:
    max(48px, calc(26px + env(safe-area-inset-top)))
    18px
    max(24px, calc(14px + env(safe-area-inset-bottom)));
}

.cover-viewer-head {
  flex: none;
  min-height: 61px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: start;
  gap: 14px;
}

.cover-viewer-head > div {
  min-width: 0;
}

.cover-viewer-head h2 {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.1;
}

.cover-viewer-close,
.cover-viewer-nav {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #5b5750;
  border-radius: 50%;
  color: var(--ink);
  background: #292724ed;
  box-shadow: 0 4px 14px #0007;
}

.cover-viewer-close {
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
}

.cover-viewer-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 10px 38px;
}

.cover-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 7px;
  background: #111;
  box-shadow: 0 16px 42px #000d, 0 0 0 1px #ffffff20;
}

.cover-viewer-nav {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 36px;
  height: 44px;
  border-radius: 18px;
  transform: translateY(-50%);
  font-size: 31px;
  line-height: 1;
}

.cover-viewer-nav.previous {
  left: -2px;
}

.cover-viewer-nav.next {
  right: -2px;
}

.cover-viewer-nav[hidden] {
  display: none;
}

.cover-viewer-counter {
  flex: none;
  min-height: 24px;
  margin: 9px 0 0;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
}

.bottom-sheet {
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 91%;
  overflow: hidden;
  border: 1px solid #48443e;
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: #201f1c;
  box-shadow: 0 -24px 60px #0009;
  transform: translateY(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.bottom-sheet.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.detail-sheet {
  height: 91%;
  display: flex;
  flex-direction: column;
}

.sheet-handle {
  flex: none;
  width: 38px;
  height: 4px;
  margin: 9px auto 4px;
  border-radius: 99px;
  background: #55514b;
}

.detail-head {
  flex: none;
  min-height: 107px;
  display: grid;
  grid-template-columns: 61px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 11px;
  padding: 8px 17px 13px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  width: 59px;
}

.detail-cover .cover-trigger {
  width: 59px;
}

.detail-cover .cover {
  width: 59px;
  height: 76px;
}

.detail-cover .cover-number {
  top: 20px;
  font-size: 13px;
}

.detail-cover .cover-title {
  font-size: 5px;
}

.detail-title-block {
  min-width: 0;
}

.detail-title-block h2 {
  font-size: 17px;
  line-height: 1.08;
}

.detail-title-block > p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.sheet-close {
  width: 28px;
  height: 28px;
  align-self: start;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-strong);
  background: var(--surface-3);
  font-size: 18px;
}

.sheet-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 17px max(48px, calc(30px + env(safe-area-inset-bottom)));
  scroll-padding-bottom: max(48px, calc(30px + env(safe-area-inset-bottom)));
  scrollbar-width: none;
}

.state-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.detail-primary-actions {
  margin: 0 0 10px;
}

.state-row button {
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 900;
}

.state-row button.active[data-state="owned"] {
  color: #10281d;
  border-color: #6bd7a0;
  background: #6bd7a0;
}

.state-row button.active[data-state="wishlist"] {
  color: #29200a;
  border-color: var(--yellow);
  background: var(--yellow);
}

.state-row button.active[data-state="trade"] {
  color: white;
  border-color: var(--blue);
  background: #3d69b8;
}

.form-section {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.completion-score {
  color: #7ad8a8;
  font-size: 12px;
}

.cover-variant-count {
  color: #8ab4ff;
  font-size: 9px;
}

.cover-variant-help {
  margin: -3px 0 11px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.cover-variant-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cover-variant-option {
  position: relative;
  width: 100%;
  min-height: 86px;
  display: grid !important;
  grid-template-columns: 22px 42px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: inherit;
  background: #191816;
  cursor: pointer;
  text-align: left;
}

.cover-variant-option.owned {
  border-color: #376d53;
  background: #17251d;
}

.cover-variant-option.active {
  border-color: #5c91f0;
  background: #16233a;
  box-shadow: inset 0 0 0 1px #5c91f044;
}

.cover-variant-status {
  width: 22px;
  height: 22px;
  display: block !important;
  margin: 0 !important;
  padding-top: 2px;
  border: 1px solid #56514b;
  border-radius: 7px;
  color: var(--muted-strong);
  background: var(--surface-3);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.cover-variant-option.owned .cover-variant-status {
  color: #10271d;
  border-color: var(--green);
  background: #6cd7a1;
}

.cover-variant-option img {
  width: 42px;
  height: 56px;
  object-fit: contain;
  border-radius: 3px;
  background: #111;
  box-shadow: 0 4px 9px #0008;
}

.cover-variant-copy,
.cover-variant-copy strong,
.cover-variant-copy small {
  min-width: 0;
  display: block !important;
  margin: 0 !important;
}

.cover-variant-copy strong {
  color: var(--ink);
  font-size: 9px;
  line-height: 1.2;
}

.cover-variant-copy small {
  margin-top: 3px !important;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.25;
}

.cover-source-link {
  display: inline-block;
  margin-top: 9px;
  color: #8ab4ff;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.form-section label {
  display: block;
  margin-top: 9px;
}

.form-section label:first-child,
.field-grid label {
  margin-top: 0;
}

.form-section label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-section input,
.form-section select,
.form-section textarea {
  width: 100%;
  min-height: 37px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #151412;
  outline: 0;
  font-size: 10px;
}

.form-section textarea {
  resize: vertical;
  line-height: 1.45;
}

.component-list {
  display: grid;
  gap: 7px;
}

.component-option {
  position: relative;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 51px;
  margin: 0 !important;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #191816;
}

.component-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.component-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #56514b;
  border-radius: 6px;
  color: transparent;
  background: var(--surface-3);
  font-size: 12px;
  font-weight: 950;
}

.component-option input:checked + .component-check {
  color: #10271d;
  border-color: var(--green);
  background: #6cd7a1;
}

.component-copy {
  min-width: 0;
}

.component-copy strong,
.component-copy small {
  display: block;
}

.component-copy strong {
  font-size: 10px;
}

.component-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.25;
}

.verify-badge {
  padding: 3px 5px;
  border-radius: 999px;
  color: #e4d07a;
  background: #37311a;
  font-size: 7px;
  font-weight: 900;
}

.audit-note,
.catalog-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.catalog-note {
  padding: 10px;
  border-radius: 9px;
  color: #c7c0a4;
  background: #2a271d;
}

.market-link {
  display: block;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.filter-sheet {
  max-height: 78%;
}

.filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 17px 15px;
  border-bottom: 1px solid var(--line);
}

.filter-options {
  padding: 16px 17px 8px;
}

.filter-options fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.filter-options fieldset label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 800;
}

.filter-options input {
  accent-color: var(--yellow);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.switch-row span {
  display: grid;
  gap: 2px;
}

.switch-row strong {
  font-size: 10px;
}

.switch-row small {
  color: var(--muted);
  font-size: 8px;
}

.switch-row input {
  width: 38px;
  height: 21px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
  padding: 10px 17px max(19px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.sheet-actions button {
  padding: 11px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.primary-action {
  border: 1px solid var(--yellow);
  color: #201a07;
  background: var(--yellow);
}

.toast {
  position: absolute;
  z-index: 70;
  right: 25px;
  bottom: 88px;
  left: 25px;
  padding: 11px 14px;
  border: 1px solid #5b554d;
  border-radius: 11px;
  color: var(--ink);
  background: #302d29f2;
  box-shadow: 0 10px 30px #0007;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(12px);
}

.toast[hidden] {
  display: none;
}

@media (max-width: 520px) {
  :root {
    --phone-width: 100vw;
  }

  html,
  body,
  .stage {
    min-height: 100%;
    background: var(--surface);
  }

  .stage {
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .status-bar {
    padding-top: max(8px, env(safe-area-inset-top));
    height: calc(35px + max(0px, env(safe-area-inset-top) - 8px));
  }

  .screen-scroll {
    top: calc(92px + max(0px, env(safe-area-inset-top) - 8px));
  }
}

@media (max-height: 700px) and (min-width: 521px) {
  .stage {
    padding: 14px;
  }

  .phone {
    height: calc(100dvh - 28px);
    border-radius: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Collection Lab additions */

.four-tabs {
  grid-template-columns: repeat(4, 1fr);
}

.four-tabs .tab {
  min-width: 0;
  padding-inline: 2px;
}

.four-tabs .tab strong {
  font-size: 7px;
}

.offline-pill,
.moment-badge,
.audit-status,
.edition-badge,
.component-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.offline-pill {
  align-self: flex-start;
  padding: 5px 7px;
  border: 1px solid #2f7250;
  color: #8ee0b5;
  background: #173326;
  font-size: 7px;
}

.hunt-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 14px 0 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #141311;
}

.hunt-toggle button {
  min-width: 0;
  padding: 8px 3px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 8px;
  font-weight: 850;
}

.hunt-toggle button.active {
  color: #18150a;
  background: var(--yellow);
}

.hunt-list {
  display: grid;
  gap: 8px;
}

.hunt-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 26px;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.hunt-item .cover-compact {
  width: 52px;
  height: 70px;
  border-radius: 6px;
}

.hunt-item .cover-trigger {
  width: 52px;
}

.hunt-item .cover-view-icon,
.detail-cover .cover-view-icon {
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  font-size: 11px;
}

.hunt-copy {
  min-width: 0;
}

.hunt-copy > span {
  color: var(--yellow);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hunt-copy h3 {
  overflow: hidden;
  margin: 2px 0 5px;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunt-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.target-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-strong);
  font-size: 7px;
  font-weight: 800;
}

.target-price input {
  width: 55px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #171614;
  font-size: 8px;
}

.hunt-open {
  width: 26px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: var(--yellow);
  background: #312d20;
  font-size: 20px;
}

.rescue-card {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #3f4834;
  border-radius: 15px;
  background:
    radial-gradient(circle at 90% 0%, #594e1d55, transparent 42%),
    #201f1b;
}

.rescue-card h2 {
  margin: 3px 0 5px;
  font-size: 18px;
}

.rescue-card > p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.rescue-search {
  width: 100%;
  margin-top: 12px;
}

.rescue-results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.rescue-result {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 1px 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: inherit;
  background: #171614;
  text-align: left;
}

.rescue-result .component-kind {
  grid-row: 1 / 3;
  align-self: center;
  padding: 5px 4px;
  color: #d9c85d;
  background: #393219;
  font-size: 6px;
}

.rescue-result strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rescue-result small,
.rescue-hint {
  color: var(--muted);
  font-size: 7px;
}

.rescue-hint {
  margin: 0;
  padding: 8px 2px 2px;
  line-height: 1.4;
}

.research-dot.audited {
  border-color: #286d4b;
  color: #78d5a4;
  background: #173326;
}

.issue-story {
  margin: 0 0 6px;
  padding: 14px 17px 15px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 10%, #7e6e282b, transparent 42%),
    #211f1a;
}

.moment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.moment-row:has(.moment-badge[hidden]) {
  display: none;
}

.audit-status,
.moment-badge {
  padding: 4px 7px;
  font-size: 6px;
}

.audit-status {
  color: #88d9ae;
  background: #173326;
}

.audit-status[data-status="research"] {
  color: #e7cd73;
  background: #3c3418;
}

.moment-badge {
  color: #ffb0b6;
  background: #4a1c22;
}

.issue-story h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.issue-story p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.55;
}

.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.research-details {
  margin-top: 9px;
  border-top: 1px solid var(--line);
}

.research-details summary {
  padding-top: 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.research-status {
  margin-top: 9px;
}

.source-row a {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-strong);
  background: var(--surface-2);
  font-size: 7px;
  font-weight: 850;
  text-decoration: none;
}

.copy-manager {
  background: #1f1d19;
}

.optional-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.optional-section > summary::-webkit-details-marker {
  display: none;
}

.optional-section > summary::after {
  content: "+";
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-strong);
  font-size: 13px;
}

.optional-section[open] > summary::after {
  content: "−";
}

.optional-section > summary > div {
  min-width: 0;
  flex: 1;
}

.optional-section > summary strong {
  display: block;
  font-size: 11px;
}

.optional-hint {
  flex: none;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.optional-content {
  padding-top: 13px;
}

.compact-form-heading {
  align-items: center;
}

.compact-form-heading h3 {
  font-size: 11px;
}

.small-action,
.danger-text {
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 7px;
  font-weight: 900;
}

.small-action {
  color: #17140b;
  border-color: var(--yellow);
  background: var(--yellow);
}

.danger-text {
  color: #ef8e95;
  background: #35191d;
}

.danger-text:disabled {
  opacity: 0.35;
  cursor: default;
}

.copy-switch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-bottom: 10px;
}

.copy-switch-row select {
  width: 100%;
}

.grade-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.grade-details summary {
  padding: 11px 0 7px;
  color: var(--yellow);
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.grade-grid {
  margin-top: 4px;
}

.variant-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.variant-notes span {
  padding: 5px 7px;
  border: 1px dashed #70683f;
  border-radius: 7px;
  color: #ddce86;
  background: #2c2819;
  font-size: 7px;
}

.edition-badge {
  max-width: 54px;
  padding: 4px 5px;
  color: #b9cff9;
  background: #203250;
  font-size: 5px;
  text-align: center;
}

.verify-badge.documented {
  color: #8fdaad;
  background: #173326;
}

.value-band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.value-band-grid label {
  min-width: 0;
}

.value-band-grid input {
  width: 100%;
}

.toggle-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.toggle-option > span {
  display: grid;
  gap: 2px;
}

.toggle-option strong {
  font-size: 9px;
}

.toggle-option small {
  color: var(--muted);
  font-size: 7px;
}

.toggle-option input {
  width: 20px;
  height: 20px;
}

.secondary-button,
.primary-button {
  padding: 11px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.primary-button {
  border: 1px solid var(--yellow);
  color: #201a07;
  background: var(--yellow);
}

.tools-sheet {
  max-height: 78%;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 17px 12px;
}

.tool-grid button {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: inherit;
  background: var(--surface-2);
  text-align: left;
}

.tool-grid button strong {
  color: var(--yellow);
  font-size: 9px;
}

.tool-grid button small {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.tool-grid .tool-reset {
  min-height: 60px;
  grid-column: 1 / -1;
}

.tool-grid .tool-reset strong {
  color: #ef8e95;
}

/* Release readability, guidance, and collection safety */

.eyebrow,
.section-kicker {
  font-size: 10px;
}

.chip {
  min-height: 36px;
  padding-block: 9px;
  font-size: 11px;
}

.text-button {
  min-height: 32px;
  font-size: 11px;
}

.volume-label {
  font-size: 9.5px;
}

.card-copy h3 {
  font-size: 14px;
}

.card-meta {
  font-size: 11px;
}

.mini-tag {
  font-size: 9px;
}

.parts-status,
.own-button {
  font-size: 10px;
}

.own-button {
  min-height: 32px;
}

.four-tabs .tab strong,
.tab strong {
  font-size: 10px;
}

.set-top p,
.set-card > p,
.insight-hero p,
.insight-hero span,
.insight-grid p,
.attention-copy small {
  font-size: 11px;
  line-height: 1.4;
}

.attention-copy strong {
  font-size: 12px;
}

.hunt-toggle button {
  min-height: 36px;
  font-size: 10px;
}

.hunt-copy > span,
.target-price {
  font-size: 9px;
}

.hunt-copy h3 {
  font-size: 12px;
}

.hunt-copy p,
.rescue-result small,
.rescue-hint {
  font-size: 10px;
}

.target-price input,
.rescue-result strong {
  font-size: 11px;
}

.rescue-card > p:not(.section-kicker),
.issue-story p {
  font-size: 11px;
}

.rescue-result .component-kind,
.audit-status,
.moment-badge {
  font-size: 8px;
}

.detail-title-block > p:last-child,
.state-row button,
.cover-variant-count {
  font-size: 11px;
}

.state-row button {
  min-height: 38px;
}

.cover-variant-help,
.cover-variant-copy small,
.cover-source-link,
.component-copy small,
.audit-note,
.catalog-note,
.research-details summary,
.source-row a,
.optional-hint,
.grade-details summary,
.variant-notes span,
.toggle-option small {
  font-size: 10px;
}

.cover-variant-copy strong,
.form-section label > span,
.component-copy strong,
.market-link,
.optional-section > summary strong,
.compact-form-heading h3,
.toggle-option strong {
  font-size: 11px;
}

.form-section input,
.form-section select,
.form-section textarea {
  min-height: 42px;
  font-size: 12px;
}

.small-action,
.danger-text,
.edition-badge,
.verify-badge {
  font-size: 9px;
}

.filter-options legend,
.filter-options fieldset label,
.switch-row small,
.toggle-option small {
  font-size: 10px;
}

.filter-options fieldset label,
.switch-row strong,
.sheet-actions button,
.secondary-button,
.primary-button {
  font-size: 11px;
}

.backup-reminder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #695f2e;
  border-radius: 13px;
  background: #292519;
}

.backup-reminder[hidden] {
  display: none;
}

.backup-reminder div {
  min-width: 0;
}

.backup-reminder strong,
.backup-reminder span {
  display: block;
}

.backup-reminder strong {
  color: var(--yellow);
  font-size: 12px;
}

.backup-reminder span {
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.35;
}

.backup-reminder button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--yellow);
  border-radius: 9px;
  color: #201a07;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 900;
}

.backup-status {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.tool-grid button strong {
  font-size: 11px;
}

.tool-grid button small {
  font-size: 9.5px;
}

.tool-grid .tool-wide {
  min-height: 66px;
  grid-column: 1 / -1;
}

.onboarding-dialog {
  position: absolute;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  background: #090908ed;
  backdrop-filter: blur(10px);
}

.onboarding-dialog[hidden] {
  display: none;
}

.onboarding-card {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid #514d45;
  border-radius: 23px;
  background:
    radial-gradient(circle at 90% 0%, #7b692431, transparent 38%),
    #211f1c;
  box-shadow: 0 24px 60px #000c;
}

.onboarding-card > img {
  display: block;
  margin-bottom: 15px;
  border-radius: 13px;
}

.onboarding-card h2 {
  max-width: 285px;
  margin: 4px 0 17px;
  font-size: 22px;
  line-height: 1.08;
}

.onboarding-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.onboarding-steps > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.onboarding-steps > div > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #201a07;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 950;
}

.onboarding-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.onboarding-steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
}

.onboarding-card > .primary-button {
  width: 100%;
  min-height: 44px;
}

.about-sheet {
  height: 88%;
  display: flex;
  flex-direction: column;
}

.about-scroll {
  padding-top: 2px;
}

.about-scroll section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.about-scroll h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.about-scroll p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.about-replay {
  width: 100%;
  margin: 17px 0 8px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  font-size: 11px;
}

.toast span {
  min-width: 0;
}

.toast button {
  flex: none;
  padding: 6px 9px;
  border: 1px solid var(--yellow);
  border-radius: 8px;
  color: #201a07;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 950;
}

.toast button[hidden] {
  display: none;
}

.offline-panel {
  margin: 14px 17px 0;
  padding: 13px 14px;
  border: 1px solid #5a512b;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #f2cf3512, transparent 52%),
    var(--surface-2);
  box-shadow: 0 10px 24px #0004;
}

.offline-copy {
  display: grid;
  gap: 4px;
}

.offline-copy strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.offline-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.offline-progress {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #0e0e0d;
  box-shadow: inset 0 0 0 1px #ffffff0d;
}

.offline-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d5a91c, var(--yellow));
  transition: width 180ms ease;
}

.offline-panel[data-state="ready"] {
  border-color: var(--green-line);
  background:
    linear-gradient(135deg, #27b06d19, transparent 52%),
    var(--green-deep);
}

.offline-panel[data-state="ready"] .offline-progress span {
  background: var(--green);
}

.offline-panel[data-state="error"] {
  border-color: #a1222c;
  background:
    linear-gradient(135deg, #ec334019, transparent 52%),
    var(--surface-2);
}
