:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202720;
  background: #f6f8f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #28724e;
  --green-dark: #1e5d3e;
  --green-soft: #e8f3eb;
  --ink: #202720;
  --muted: #768078;
  --line: #e4e9e2;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f7fbf6;
  font-size: 21px;
  font-weight: 780;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #22623f;
  background: #c9e8d0;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(380px, 1.05fr) minmax(420px, 0.95fr);
}

.welcome-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(30px, 5vw, 72px);
  color: #f7fbf6;
  background: #183c2d;
}

.welcome-panel::before,
.welcome-panel::after {
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.welcome-panel::before {
  right: -255px;
  bottom: 35px;
}

.welcome-panel::after {
  right: -190px;
  bottom: 100px;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin-top: clamp(70px, 12vh, 145px);
}

.eyebrow {
  margin: 0 0 12px;
  color: #72917e;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.14em;
}

.welcome-panel .eyebrow {
  color: #a0d2ae;
}

.welcome-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5.2vw, 66px);
  font-weight: 690;
  letter-spacing: -0.065em;
  line-height: 1.08;
}

.welcome-copy h1 span {
  color: #9dd2ad;
}

.welcome-description {
  max-width: 410px;
  margin: 23px 0 0;
  color: #d1ded4;
  font-size: 16px;
  line-height: 1.7;
}

.welcome-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #c5d7ca;
  font-size: 13px;
}

.proof-icon {
  color: #bce4c5;
  font-size: 17px;
}

.welcome-art {
  position: absolute;
  right: 3%;
  bottom: 4%;
  width: min(47vw, 450px);
  height: 310px;
  opacity: 0.9;
}

.orbit {
  position: absolute;
  right: 7%;
  bottom: -75px;
  width: 385px;
  height: 385px;
  border: 1px solid #ffffff16;
  border-radius: 50%;
}

.orbit-two {
  right: 16%;
  bottom: -13px;
  width: 260px;
  height: 260px;
}

.art-card {
  position: absolute;
  top: 22px;
  left: 34%;
  display: flex;
  width: 166px;
  height: 226px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid #d1e8d5a6;
  border-radius: 19px;
  box-shadow: 0 24px 60px #071b1280;
}

.art-card-back {
  top: 42px;
  left: 57%;
  transform: rotate(14deg);
  color: #a5d2ad;
  background: linear-gradient(145deg, #406f53, #254d39);
  font-size: 56px;
  font-weight: 850;
}

.art-card-front {
  transform: rotate(-11deg);
  color: #315d42;
  background: linear-gradient(150deg, #e3f0d8 0%, #aacb9d 100%);
}

.card-spark {
  align-self: flex-end;
  color: #628955;
  font-size: 21px;
}

.card-gem {
  align-self: center;
  color: #47794a;
  font-size: 65px;
  text-shadow: 0 7px 10px #27462936;
}

.card-caption {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.45;
}

.welcome-footer {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  color: #a7b9ab;
  font-size: 12px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 45px;
  background: #fbfcfa;
}

.auth-box {
  width: min(100%, 405px);
}

.auth-box h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 690;
  letter-spacing: -0.055em;
}

.auth-subtitle {
  margin: 9px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.auth-box label {
  display: block;
  margin: 17px 0 7px;
  color: #39433b;
  font-size: 13px;
  font-weight: 650;
}

.auth-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe5de;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
}

.auth-box input:focus,
.search-box:focus-within {
  border-color: #68a57c;
  box-shadow: 0 0 0 3px #28724e1a;
}

.auth-box input::placeholder {
  color: #a7aea8;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: #fff;
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-outline {
  border-color: #dfe5de;
  color: #334138;
  background: #fff;
}

.button-outline:hover {
  border-color: #b7cab9;
  background: #f5f8f4;
}

.auth-submit {
  width: 100%;
  min-height: 49px;
  margin-top: 25px;
  font-size: 14px;
}

.auth-submit span {
  margin-left: auto;
  font-size: 19px;
  font-weight: 400;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

#forgot-password {
  display: block;
  margin: 14px 0 0 auto;
}

.auth-switch {
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.auth-switch .text-button {
  margin-left: 4px;
}

.fine-print {
  color: #929a93;
  font-size: 11px;
  line-height: 1.6;
}

.auth-box .fine-print {
  margin-top: 35px;
  text-align: center;
}

.form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #53665a;
  font-size: 13px;
  line-height: 1.5;
}

.form-message.error {
  color: #a53c32;
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 244px;
  flex-direction: column;
  padding: 28px 18px 18px;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}

.sidebar-brand {
  margin: 0 0 55px 7px;
  color: #1f4933;
}

.sidebar-brand .brand-mark {
  width: 31px;
  height: 31px;
}

.nav-label {
  margin: 0 0 11px 11px;
  color: #9aa29a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: #667169;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.nav-item.active {
  color: #236a44;
  background: #eaf4ec;
}

.nav-icon {
  width: 17px;
  color: #75907d;
  font-size: 17px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 17px;
  padding: 15px;
  border: 1px solid #e2e9e1;
  border-radius: 12px;
  background: #f6f9f5;
}

.note-gem {
  color: #43815a;
  font-size: 17px;
}

.sidebar-note strong {
  color: #33473a;
  font-size: 13px;
  line-height: 1.4;
}

.sidebar-note > span:last-child {
  color: #7e8980;
  font-size: 11px;
  line-height: 1.55;
}

.sign-out {
  width: 100%;
}

.workspace {
  min-height: 100vh;
  margin-left: 244px;
}

.topbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #8b948c;
  font-size: 12px;
}

.breadcrumbs strong {
  color: #374139;
  font-weight: 650;
}

.crumb-divider {
  color: #c4cbc4;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subscription-badge {
  padding: 6px 10px;
  border: 1px solid #dceade;
  border-radius: 99px;
  color: #36714c;
  background: #eef7ef;
  font-size: 11px;
  font-weight: 700;
}

.account-email {
  max-width: 190px;
  overflow: hidden;
  color: #677169;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .button {
  min-height: 35px;
  padding: 0 12px;
  font-size: 12px;
}

.collection-view {
  max-width: 1440px;
  margin: 0 auto;
  padding: 43px clamp(24px, 4vw, 58px) 50px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}

.page-heading .eyebrow {
  margin-bottom: 7px;
}

.page-heading h1,
.paywall-card h1 {
  margin: 0;
  color: #243229;
  font-size: clamp(29px, 3vw, 39px);
  font-weight: 690;
  letter-spacing: -0.06em;
}

.heading-period {
  color: #4f9969;
}

.page-subtitle {
  margin: 8px 0 0;
  color: #818b82;
  font-size: 13px;
}

.button-plus {
  font-size: 19px;
  font-weight: 400;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 46px;
}

.summary-card {
  position: relative;
  min-height: 151px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.value-summary {
  border-color: #cfe2d2;
  background: linear-gradient(120deg, #eef7ee, #f8fbf7);
}

.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-label {
  color: #78857a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.summary-icon {
  color: #42805a;
  font-size: 17px;
}

.icon-soft {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: #517c5e;
  background: #f0f5ef;
}

.summary-value {
  display: block;
  margin-top: 16px;
  color: #26362b;
  font-size: clamp(25px, 3vw, 35px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1;
}

.value-summary .summary-value {
  color: #236441;
}

.summary-caption {
  display: block;
  margin-top: 9px;
  color: #89938a;
  font-size: 11px;
}

.value-decoration {
  position: absolute;
  right: 18px;
  bottom: -31px;
  color: #79ad83;
  font-size: 112px;
  opacity: 0.12;
}

.collection-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.collection-toolbar h2 {
  margin: 0;
  color: #2f3c32;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.collection-toolbar p {
  margin: 6px 0 0;
  color: #929a93;
  font-size: 11px;
}

.search-box {
  display: flex;
  width: min(270px, 100%);
  height: 39px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #e2e7e0;
  border-radius: 9px;
  background: #fff;
}

.search-box > span {
  color: #829085;
  font-size: 20px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #354239;
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #a6aea7;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 15px;
}

.collection-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e9e3;
  border-radius: 13px;
  background: #fff;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 25px #263b2b12;
}

.collection-card-image-wrap {
  display: grid;
  height: 209px;
  place-items: center;
  overflow: hidden;
  padding: 12px;
  background: linear-gradient(145deg, #f0f4ef, #f9faf8);
}

.collection-card-image {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.collection-card-placeholder {
  display: grid;
  width: 114px;
  height: 160px;
  place-items: center;
  border: 1px solid #c8d7ca;
  border-radius: 9px;
  color: #548063;
  background: linear-gradient(145deg, #e5f0e5, #d1e3d2);
  font-size: 30px;
}

.remove-card {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #e6e9e4;
  border-radius: 50%;
  color: #778078;
  background: #ffffffeb;
  font-size: 18px;
}

.remove-card:hover {
  color: #a84336;
  background: #fff;
}

.collection-card-body {
  padding: 14px;
}

.card-name {
  overflow: hidden;
  margin: 0;
  color: #2c382f;
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-set {
  overflow: hidden;
  margin: 5px 0 13px;
  color: #8a948c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid #edf0ec;
}

.card-grade {
  color: #688071;
  font-size: 10px;
  font-weight: 700;
}

.card-market-value {
  color: #236441;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.card-quantity {
  margin-top: 9px;
  color: #929a93;
  font-size: 10px;
}

.empty-state {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px dashed #d5dfd5;
  border-radius: 15px;
  background: #fbfcfa;
  text-align: center;
}

.empty-art {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  color: #41805a;
  background: #eaf4eb;
  font-size: 23px;
}

.empty-state h2 {
  margin: 17px 0 0;
  color: #344238;
  font-size: 19px;
}

.empty-state p {
  max-width: 370px;
  margin: 9px 0 19px;
  color: #859087;
  font-size: 13px;
  line-height: 1.6;
}

.price-disclaimer {
  max-width: 760px;
  margin: 24px 0 0;
  color: #929a93;
  font-size: 10px;
  line-height: 1.6;
}

.paywall {
  display: grid;
  min-height: calc(100vh - 70px);
  place-items: center;
  padding: 30px;
}

.paywall-card {
  width: min(100%, 470px);
  padding: 37px;
  border: 1px solid #deeadf;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px #1e38251a;
}

.paywall-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 13px;
  color: #397b52;
  background: #eaf5ec;
  font-size: 20px;
}

.paywall-card h1 {
  font-size: 33px;
}

.paywall-card > p:not(.eyebrow):not(.fine-print) {
  color: #7b867d;
  font-size: 13px;
  line-height: 1.7;
}

.paywall-card ul {
  display: grid;
  gap: 12px;
  margin: 22px 0 25px;
  padding: 0;
  color: #536158;
  font-size: 13px;
  list-style: none;
}

.paywall-card li::before {
  margin-right: 10px;
  color: #43835a;
  content: "✓";
  font-weight: 800;
}

.paywall-card .button {
  width: 100%;
  min-height: 48px;
}

.paywall-card .fine-print {
  margin: 12px 0 0;
  text-align: center;
}

.scan-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(88vh, 880px);
  padding: 0;
  overflow: auto;
  border: 1px solid #e0e7df;
  border-radius: 17px;
  color: var(--ink);
  background: #fcfdfb;
  box-shadow: 0 25px 90px #12271d45;
}

.scan-dialog::backdrop {
  background: #16231ab3;
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 25px 0;
}

.dialog-header .eyebrow {
  margin-bottom: 5px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.05em;
}

.icon-button {
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 9px;
  color: #6d786f;
  background: #f0f4ef;
  font-size: 22px;
}

.dialog-intro {
  margin: 10px 25px 18px;
  color: #79837b;
  font-size: 13px;
  line-height: 1.55;
}

.add-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 25px 0;
  padding: 4px;
  border-radius: 10px;
  background: #f0f4ef;
}

.add-method {
  min-height: 37px;
  border: 0;
  border-radius: 7px;
  color: #768078;
  background: transparent;
  font-size: 12px;
  font-weight: 680;
}

.add-method.active {
  color: #2b6841;
  background: #fff;
  box-shadow: 0 1px 4px #1b32231a;
}

.catalog-search-form {
  display: grid;
  gap: 13px;
  margin: 0 25px;
}

.catalog-search-form > label,
.catalog-search-row > label {
  display: grid;
  gap: 7px;
  color: #47544a;
  font-size: 12px;
  font-weight: 680;
}

.catalog-search-form label > span {
  color: #9aa29b;
  font-size: 10px;
  font-weight: 450;
}

.catalog-search-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe6de;
  border-radius: 9px;
  outline: 0;
  color: #344138;
  background: #fff;
  font-size: 13px;
}

.catalog-search-form input:focus {
  border-color: #68a57c;
  box-shadow: 0 0 0 3px #28724e1a;
}

.catalog-search-form input::placeholder {
  color: #a7aea8;
}

.catalog-search-row {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 11px;
}

.catalog-search-submit {
  width: 100%;
  min-height: 43px;
}

.catalog-search-submit span {
  margin-left: auto;
  font-size: 18px;
  font-weight: 400;
}

#catalog-search-status {
  margin: 8px 25px;
}

.catalog-search-results {
  display: grid;
  max-height: 330px;
  gap: 10px;
  margin: 12px 25px 4px;
  overflow: auto;
  padding: 2px 3px 5px 0;
}

.catalog-result-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid #e3e9e2;
  border-radius: 11px;
  background: #fff;
}

.catalog-result-image,
.catalog-result-placeholder {
  display: grid;
  width: 78px;
  height: 106px;
  place-items: center;
  border-radius: 7px;
  background: #f1f4f0;
}

.catalog-result-image {
  object-fit: contain;
}

.catalog-result-placeholder {
  color: #548063;
  font-size: 21px;
}

.catalog-result-content {
  min-width: 0;
}

.catalog-result-content h3 {
  overflow: hidden;
  margin: 1px 0 4px;
  color: #2c3b30;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-result-content > p {
  overflow: hidden;
  margin: 0 0 8px;
  color: #858f87;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-variant-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #818b83;
  font-size: 10px;
}

.catalog-variant-select {
  max-width: 100%;
  min-width: 0;
  height: 27px;
  padding: 0 6px;
  border: 1px solid #e3e8e2;
  border-radius: 6px;
  color: #516057;
  background: #fbfcfa;
  font-size: 10px;
}

.catalog-result-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.catalog-price-chip {
  padding: 4px 5px;
  border-radius: 5px;
  color: #46634e;
  background: #eff6ef;
  font-size: 9px;
  font-weight: 650;
}

.catalog-use-card {
  width: 100%;
  min-height: 31px;
  margin-top: 8px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
}

.upload-zone {
  display: flex;
  min-height: 153px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 25px;
  border: 1px dashed #bed0bf;
  border-radius: 13px;
  color: #738078;
  background: #f7faf6;
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #5b9b6b;
  background: #f0f8f0;
}

.upload-zone strong {
  color: #365340;
  font-size: 13px;
}

.upload-zone > span:last-of-type {
  font-size: 11px;
}

.upload-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 11px;
  color: #397b52;
  background: #e7f2e8;
  font-size: 19px;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.credit-note {
  margin: 12px 25px 0;
  color: #8b958c;
  font-size: 10px;
  line-height: 1.5;
}

.scan-dialog > .form-message {
  margin: 10px 25px;
}

.scan-result {
  padding: 0 25px 25px;
}

.scan-result h3 {
  margin: 17px 0 10px;
  font-size: 15px;
}

.scan-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}

.scan-comparison-figure {
  min-width: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid #e2e9e1;
  border-radius: 10px;
  background: #fff;
}

.scan-comparison-figure figcaption {
  overflow: hidden;
  margin-bottom: 6px;
  color: #69766c;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-comparison-figure img,
.scan-image-placeholder {
  display: grid;
  width: 100%;
  height: 152px;
  place-items: center;
  border-radius: 7px;
  background: #f1f4f0;
}

.scan-comparison-figure img {
  object-fit: contain;
}

.scan-image-placeholder {
  color: #818c83;
  font-size: 10px;
}

.scan-result-card {
  padding: 12px;
  border: 1px solid #e2e9e1;
  border-radius: 12px;
  background: #fff;
}

.scan-card-title {
  margin: 2px 0 5px;
  color: #2a3a2f;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.scan-card-variant {
  margin: 0;
  color: #828d84;
  font-size: 11px;
}

.scan-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.scan-price {
  padding: 7px 8px;
  border: 1px solid #deeadf;
  border-radius: 8px;
  color: #42644b;
  background: #f1f8f1;
  font-size: 10px;
}

.scan-price strong {
  margin-left: 4px;
  color: #24372a;
}

.scan-sold a {
  color: #2f6b45;
}

.scan-trend {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.trend-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 8px;
}

.trend-label {
  color: #42644b;
  font-size: 11px;
  font-weight: 700;
}

.trend-sparkline {
  width: 100%;
  height: 26px;
}

.trend-sparkline polyline {
  fill: none;
  stroke: #3f8a57;
  stroke-width: 2;
}

.trend-badge {
  text-align: right;
  font-size: 11px;
  font-weight: 750;
}

.trend-up {
  color: #1f8a43;
}

.trend-down {
  color: #c23b3b;
}

.trend-flat {
  color: #828d84;
}

.scan-save-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.scan-save-fields label {
  display: grid;
  gap: 6px;
  color: #68746b;
  font-size: 11px;
  font-weight: 650;
}

.scan-save-fields input,
.scan-save-fields select {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 9px;
  border: 1px solid #dfe6de;
  border-radius: 8px;
  color: #344138;
  background: #fff;
  font-size: 12px;
}

.scan-result .button {
  width: 100%;
  margin-top: 13px;
}

.scan-reference {
  margin-top: 8px;
  color: #88928a;
  font-size: 10px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  z-index: 5;
  top: 18px;
  right: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 16px;
  border: 1px solid #d4e5d6;
  border-radius: 10px;
  color: #285b3c;
  background: #f4faf3;
  box-shadow: 0 8px 28px #162d1f1c;
  font-size: 13px;
}

.toast.error {
  border-color: #efd6d0;
  color: #8f3e31;
  background: #fff7f5;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.upload-zone:focus-within {
  outline: 3px solid #8fc59a;
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .auth-layout {
    grid-template-columns: minmax(320px, 0.85fr) minmax(380px, 1fr);
  }

  .welcome-art {
    right: -70px;
    opacity: 0.62;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .value-summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    min-height: 360px;
    padding: 26px;
  }

  .welcome-copy {
    max-width: 500px;
    margin-top: 58px;
  }

  .welcome-copy h1 {
    font-size: clamp(36px, 9vw, 52px);
  }

  .welcome-description {
    max-width: 340px;
    font-size: 14px;
  }

  .welcome-art {
    right: -95px;
    bottom: -166px;
    opacity: 0.45;
    transform: scale(0.78);
  }

  .welcome-footer {
    margin-top: 40px;
  }

  .auth-panel {
    min-height: auto;
    padding: 45px 24px 55px;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    margin: 0;
  }

  .sidebar .nav-label,
  .sidebar > .nav-item,
  .sidebar-bottom {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    min-height: 57px;
    padding: 0 18px;
  }

  .breadcrumbs {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 9px;
  }

  .subscription-badge {
    margin-right: auto;
    font-size: 10px;
  }

  .account-email {
    display: none;
  }

  .collection-view {
    padding: 28px 18px 38px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .page-heading .button {
    flex-shrink: 0;
    padding: 0 11px;
    font-size: 12px;
  }

  .summary-grid {
    gap: 10px;
    margin-bottom: 34px;
  }

  .summary-card {
    min-height: 133px;
    padding: 15px;
  }

  .summary-label {
    font-size: 9px;
  }

  .summary-value {
    font-size: clamp(22px, 7vw, 31px);
  }

  .collection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
  }

  .collection-card-image-wrap {
    height: 175px;
  }

  .collection-card-body {
    padding: 11px;
  }

  .paywall {
    min-height: calc(100vh - 127px);
    padding: 18px;
  }

  .paywall-card {
    padding: 25px;
  }
}

@media (max-width: 420px) {
  .welcome-panel {
    min-height: 325px;
  }

  .welcome-copy {
    margin-top: 43px;
  }

  .welcome-description {
    max-width: 295px;
  }

  .welcome-proof {
    font-size: 11px;
  }

  .page-heading {
    gap: 9px;
  }

  .page-heading h1 {
    font-size: 28px;
  }

  .page-subtitle {
    max-width: 190px;
    font-size: 11px;
  }

  .page-heading .button {
    gap: 4px;
    min-height: 38px;
    padding: 0 8px;
    font-size: 11px;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .value-summary {
    grid-column: 1 / -1;
  }

  .scan-save-fields {
    grid-template-columns: 1fr 1fr;
  }

  .scan-comparison-figure img,
  .scan-image-placeholder {
    height: 125px;
  }

  .catalog-result-card {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }

  .catalog-result-image,
  .catalog-result-placeholder {
    width: 65px;
    height: 92px;
  }

  .catalog-price-chip {
    font-size: 8px;
  }
}

.collection-card.clickable { cursor: pointer; }
.detail-sales { margin: 6px 0 14px; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.detail-sales a { color: inherit; }

.detail-dialog { width: min(720px, calc(100vw - 28px)); }
.detail-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 14px 0 16px; border-radius: 999px; background: #eef2ec; }
.detail-tabs button { border: 0; padding: 7px 16px; border-radius: 999px; background: transparent; color: #5b665e; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.detail-tabs button.active { background: #fff; color: #17231b; box-shadow: 0 1px 4px #1b2d2226; }
.detail-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.detail-stat { padding: 10px 12px; border: 1px solid #e3e9e1; border-radius: 12px; background: #fff; }
.detail-stat span { display: block; color: #7a857d; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.detail-stat strong { display: block; margin-top: 3px; font-size: 17px; font-variant-numeric: tabular-nums; }
.detail-stat.trend-up strong { color: #1f9d55; }
.detail-stat.trend-down strong { color: #d64545; }
.detail-stat.trend-flat strong { color: #7a857d; }
.detail-chart-wrap { margin-top: 14px; padding: 10px; border: 1px solid #e3e9e1; border-radius: 14px; background: #fff; }
.detail-chart { display: block; width: 100%; height: auto; --c: #7a857d; }
.detail-chart.trend-up { --c: #1f9d55; }
.detail-chart.trend-down { --c: #d64545; }
.chart-grid { stroke: #e9eee7; stroke-width: 1; }
.chart-label { fill: #8a948c; font-size: 11px; }
.chart-line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--c); opacity: .1; }
.chart-dot { fill: #fff; stroke: var(--c); stroke-width: 2; }
.detail-note, .detail-empty { margin: 8px 2px; color: #7a857d; font-size: 12px; }
.detail-sales { display: grid; gap: 6px; }
.detail-sale { display: flex; justify-content: space-between; padding: 10px 14px; border: 1px solid #e3e9e1; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; font-size: 14px; }
a.detail-sale:hover { border-color: #b9c7bb; background: #f7faf6; }
.detail-sale strong { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .detail-stats { grid-template-columns: repeat(2, 1fr); } }
.detail-stat em { display: block; margin-top: 2px; color: #7a857d; font-size: 11px; font-style: normal; }
.chart-holder { position: relative; }
.chart-grid-v { stroke-dasharray: 2 4; }
.chart-smooth { fill: none; stroke: #17231b; stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; }
.chart-extreme { fill: #5b665e; font-size: 11px; font-weight: 600; }
.chart-dot { r: 3.5; }
.chart-guide { stroke: #17231b; stroke-width: 1; opacity: .35; }
.chart-focus { fill: var(--c); stroke: #fff; stroke-width: 2.5; }
.detail-chart { touch-action: none; cursor: crosshair; }
.chart-tip { position: absolute; z-index: 2; display: grid; gap: 2px; padding: 8px 11px; border-radius: 10px; background: #17231b; color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; transform: translate(12px, -110%); box-shadow: 0 6px 20px #17231b40; }
.chart-tip.flip { transform: translate(calc(-100% - 12px), -110%); }
.chart-tip strong { font-size: 15px; }
.chart-tip span { color: #c8d2ca; }
.chart-tip .tip-up { color: #6fdc9a; }
.chart-tip .tip-down { color: #ff8b8b; }
.game-toggle { display: inline-flex; gap: 4px; margin: 14px 25px 0; padding: 4px; border-radius: 999px; background: #eef2ec; }
.game-option { border: 0; padding: 7px 16px; border-radius: 999px; background: transparent; color: #5b665e; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.game-option.active { background: #fff; color: #17231b; box-shadow: 0 1px 4px #1b2d2226; }

.nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #1f6b4f; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.match-saved { font-weight: 600; }
.collection-card-body .button { margin-top: 10px; width: 100%; }

.help-form { display: grid; gap: 14px; max-width: 640px; margin-bottom: 32px; }
.help-form label { display: grid; gap: 6px; font-weight: 600; }
.help-form input, .help-form select, .help-form textarea { font: inherit; padding: 11px 12px; border: 1px solid #d5dccf; border-radius: 10px; background: #fff; }
.help-form textarea { resize: vertical; }
.help-form .button { justify-self: start; }
.help-tickets { display: grid; gap: 14px; max-width: 760px; margin-bottom: 40px; }
.help-ticket { padding: 18px; border: 1px solid #e1e7dc; border-radius: 14px; background: #fff; }
.help-ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-ticket-head h3 { margin: 0; font-size: 1.05rem; }
.help-ticket-meta { margin: 4px 0 10px; color: #6b7568; font-size: .85rem; text-transform: capitalize; }
.help-ticket-message { margin: 0; white-space: pre-wrap; }
.help-badge { padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eef2ea; color: #3f4a3c; }
.help-badge-answered { background: #dff3e8; color: #1f6b4f; }
.help-badge-closed { background: #ececec; color: #666; }
.help-ticket-reply { margin-top: 14px; padding: 12px 14px; border-left: 3px solid #1f6b4f; background: #f3f8f4; border-radius: 6px; }
.help-ticket-reply p { margin: 4px 0 0; white-space: pre-wrap; }

.referral-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 980px; margin-bottom: 40px; }
.referral-card { display: grid; gap: 12px; align-content: start; padding: 22px; border: 1px solid #e1e7dc; border-radius: 16px; background: #fff; }
.referral-code-row, .referral-link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.referral-code { font-size: 2rem; letter-spacing: .18em; font-family: ui-monospace, Consolas, monospace; color: #1f6b4f; }
.referral-link-row input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid #d5dccf; border-radius: 10px; background: #f7f9f5; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-buttons .button { text-decoration: none; }
.referral-stat { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid #e1e7dc; }
.referral-stat strong { font-size: 1.8rem; }
#auth-referral { text-transform: uppercase; }

.collection-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.collection-tab { font: inherit; font-weight: 600; padding: 8px 16px; border: 1px solid #d5dccf; border-radius: 999px; background: #fff; color: #4a5a4f; cursor: pointer; }
.collection-tab.active { background: #1f6b4f; border-color: #1f6b4f; color: #fff; }
.collection-tab .tab-count { margin-left: 6px; opacity: .7; font-weight: 500; }

.gemtest-form { display: grid; gap: 18px; max-width: 980px; }
.gemtest-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.gemtest-slot { position: relative; display: grid; place-content: center; gap: 4px; min-height: 190px; padding: 14px; text-align: center; border: 2px dashed #c9d3c3; border-radius: 16px; background: #fff; cursor: pointer; overflow: hidden; }
.gemtest-slot:hover { border-color: #1f6b4f; }
.gemtest-slot .slot-title { font-weight: 700; }
.gemtest-slot .slot-title em { display: block; font-size: .72rem; font-style: normal; color: #b4532a; }
.gemtest-slot .slot-hint { font-size: .8rem; color: #6b7a70; }
.gemtest-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gemtest-slot.filled .slot-title, .gemtest-slot.filled .slot-hint { position: relative; z-index: 1; background: rgba(255,255,255,.88); padding: 2px 8px; border-radius: 8px; }
.gemtest-slot.filled { border-style: solid; border-color: #1f6b4f; place-content: end center; }
.gemtest-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gemtest-result { max-width: 980px; margin: 26px 0 10px; padding: 24px; border: 1px solid #e1e7dc; border-radius: 16px; background: #fff; display: grid; gap: 14px; }
.gemtest-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.gemtest-grade { display: grid; gap: 2px; padding: 14px 26px; border-radius: 14px; background: #eef5ef; text-align: center; }
.gemtest-grade-number { font-size: 3.4rem; line-height: 1; color: #1f6b4f; }
.gemtest-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.gemtest-score { display: grid; gap: 4px; }
.gemtest-score strong { font-size: 1.3rem; }
.gemtest-bar { height: 8px; border-radius: 99px; background: #e8ede4; overflow: hidden; }
.gemtest-bar i { display: block; height: 100%; background: #1f6b4f; }
.gemtest-faults { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.gemtest-disclaimer { max-width: 980px; font-size: .85rem; color: #6b7a70; }
