:root {
  --ink: #142725;
  --muted: #687672;
  --paper: #f4f2ea;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(20, 39, 37, 0.13);
  --green: #153d39;
  --green-soft: #dce8df;
  --copper: #b66d42;
  --copper-soft: #f0dfd1;
  --gold: #c7a568;
  --danger: #9d3d32;
  --shadow: 0 22px 60px rgba(35, 52, 45, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family:
    "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(20, 39, 37, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 39, 37, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(182, 109, 66, 0.35);
  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;
}

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(20px);
  opacity: 0.35;
  z-index: -1;
}

.page-glow-one {
  top: 6vh;
  right: -180px;
  background: radial-gradient(circle, rgba(199, 165, 104, 0.44), transparent 70%);
}

.page-glow-two {
  left: -220px;
  top: 52vh;
  background: radial-gradient(circle, rgba(21, 61, 57, 0.25), transparent 70%);
}

.topbar {
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f7f2e8;
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-mark svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.brand strong {
  display: block;
  font-family: "STSong", "SimSun", serif;
  font-size: 23px;
  letter-spacing: 0.12em;
}

.brand small {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preference-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
}

.language-picker {
  position: relative;
}

.preference-select {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.language-trigger {
  min-width: 118px;
  justify-content: flex-start;
  cursor: pointer;
  color: #3d504b;
  font-size: 11px;
  font-weight: 700;
}

.language-trigger #currentLanguageLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  transition: transform 160ms ease;
}

.language-trigger[aria-expanded="true"] .picker-chevron {
  transform: rotate(180deg);
}

.currency-trigger[aria-expanded="true"] .picker-chevron,
.form-currency-trigger[aria-expanded="true"] .picker-chevron {
  transform: rotate(180deg);
}

.language-popover,
.currency-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: min(340px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(20, 39, 37, 0.16);
  border-radius: 17px;
  background: #fffdf8;
  box-shadow: 0 22px 54px rgba(25, 42, 36, 0.2);
}

.language-search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f2e9;
}

.language-search svg {
  width: 15px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
}

.language-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.language-options {
  max-height: 304px;
  margin-top: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.language-option {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: start;
}

.language-option:hover,
.language-option.active {
  background: var(--green-soft);
}

.language-option[aria-selected="true"] {
  color: var(--green);
  font-weight: 800;
}

.language-option strong {
  font-size: 12px;
  font-weight: 700;
}

.language-option small {
  color: var(--muted);
  font-size: 9px;
  text-align: end;
}

.language-empty {
  margin: 14px 8px 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

html[dir="rtl"] .language-popover {
  right: 0;
  left: auto;
}

html[dir="rtl"] .currency-popover {
  right: 0;
  left: auto;
}

html[dir="rtl"] .picker-chevron {
  margin-left: 0;
  margin-right: auto;
}

.preference-select svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: #63726e;
  stroke-width: 1.5;
}

.preference-select select {
  max-width: 92px;
  border: 0;
  outline: 0;
  color: #3d504b;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.currency-preference select {
  width: 54px;
}

.currency-picker {
  position: relative;
}

.currency-trigger {
  min-width: 48px;
  height: 100%;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #3d504b;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.currency-picker-block {
  position: relative;
  min-width: 0;
}

.form-currency-trigger {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font-size: 12px;
}

.currency-popover {
  width: 280px;
}

.item-currency-popover {
  width: 100%;
}

.currency-symbol {
  color: var(--copper);
  font-family: Georgia, serif;
  font-size: 13px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #536562;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-button:hover {
  color: var(--copper);
  border-color: rgba(182, 109, 66, 0.35);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.account-button {
  position: relative;
  width: auto;
  min-width: 76px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
}

.account-button-label {
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.account-indicator {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #a6aea9;
}

.account-indicator.online {
  background: #4b9673;
}

.account-indicator.syncing {
  background: var(--gold);
  animation: pulseDot 900ms ease infinite;
}

@keyframes pulseDot {
  50% {
    transform: scale(0.68);
    opacity: 0.55;
  }
}

.account-dialog {
  width: min(540px, calc(100vw - 28px));
  max-height: min(88vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #f9f7f0;
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.account-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.account-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.account-shell {
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
}

.account-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.account-loading {
  padding: 34px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: #e9e6dc;
}

.auth-tab {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.auth-tab.active {
  color: var(--ink);
  background: #fffdfa;
  box-shadow: 0 4px 14px rgba(20, 39, 37, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-captcha {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(24, 74, 61, 0.14);
  border-radius: 15px;
  background: rgba(231, 239, 230, 0.62);
}

.auth-captcha-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.auth-captcha-heading strong {
  color: var(--ink);
  font-size: 10px;
}

.auth-captcha-heading span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
}

.captcha-track {
  position: relative;
  height: 48px;
  border: 1px solid rgba(20, 39, 37, 0.16);
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.5) 0 7px,
      rgba(32, 83, 69, 0.06) 7px 14px
    ),
    #dfe6dd;
  box-shadow: inset 0 2px 5px rgba(20, 39, 37, 0.08);
  cursor: grab;
  outline: none;
  touch-action: none;
  user-select: none;
}

.captcha-track:focus-visible {
  box-shadow:
    inset 0 2px 5px rgba(20, 39, 37, 0.08),
    0 0 0 3px rgba(31, 116, 99, 0.2);
}

.captcha-track.dragging {
  cursor: grabbing;
}

.captcha-target {
  position: absolute;
  top: 4px;
  width: 40px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: 1px dashed rgba(31, 116, 99, 0.7);
  border-radius: 999px;
  color: rgba(31, 116, 99, 0.45);
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.captcha-target i {
  width: 17px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 11px 11px;
  clip-path: polygon(50% 0, 100% 18%, 88% 70%, 50% 100%, 12% 70%, 0 18%);
}

.captcha-fill {
  position: absolute;
  inset: 3px auto 3px 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31, 116, 99, 0.16), rgba(187, 144, 81, 0.25));
  pointer-events: none;
}

.captcha-thumb {
  position: absolute;
  top: 3px;
  left: 0;
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  color: #fff9e9;
  background:
    radial-gradient(circle at 35% 28%, #e7c984, #b38443 54%, #75552c 100%);
  box-shadow:
    0 7px 16px rgba(91, 63, 25, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  font-size: 16px;
  pointer-events: none;
}

.captcha-track.solved {
  border-color: rgba(39, 114, 92, 0.48);
  background: rgba(218, 240, 228, 0.9);
}

.captcha-track.failed {
  border-color: rgba(157, 61, 50, 0.45);
  animation: captchaShake 280ms ease;
}

.captcha-retry {
  justify-self: end;
  font-size: 9px;
}

@keyframes captchaShake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.auth-verification {
  display: grid;
  gap: 13px;
  padding: 4px 0 0;
}

.auth-verification h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 24px;
  font-weight: 500;
}

.auth-verification > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.field-hint {
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.account-message {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--danger);
  background: rgba(157, 61, 50, 0.08);
  font-size: 10px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.forgot-password-button {
  justify-self: start;
  margin-top: -4px;
  font-size: 10px;
}

.account-privacy {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.account-clear-local {
  margin-top: 12px;
  color: var(--danger);
  font-size: 10px;
}

.account-user-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.63);
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #f6ead1;
  background: var(--green);
  font-size: 20px;
}

.account-user-card strong,
.account-user-card span {
  display: block;
}

.account-profile-editor {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
}

.account-profile-editor summary {
  cursor: pointer;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  list-style-position: inside;
}

.account-profile-editor[open] summary {
  margin-bottom: 12px;
}

.account-profile-editor .field span {
  font-size: 9px;
}

.account-user-card strong {
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
}

.account-user-card div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.account-email-status {
  width: fit-content;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #27725c;
  background: rgba(70, 153, 122, 0.1);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.account-email-status.pending {
  color: #8a5b2f;
  background: rgba(195, 126, 61, 0.12);
}

.account-verify-button {
  width: 100%;
  margin-top: 10px;
}

.account-sync-copy {
  margin: 19px 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.account-cloud-meta {
  min-height: 18px;
  margin: 0;
  color: var(--copper);
  font-size: 10px;
}

.account-auto-sync {
  margin-top: 13px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(31, 116, 99, 0.14);
  border-radius: 12px;
  background: rgba(225, 244, 236, 0.52);
}

.account-auto-sync label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #34544c;
  font-size: 10px;
  font-weight: 700;
}

.account-auto-sync input {
  accent-color: var(--green);
}

.account-auto-sync .text-button {
  flex: none;
  font-size: 9px;
}

.account-sync-status {
  min-height: 16px;
  margin: 7px 1px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.account-sync-status.synced {
  color: #27725c;
}

.account-sync-status.conflict,
.account-sync-status.offline {
  color: #9a5a35;
}

.account-sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 17px;
}

.account-password-change {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(20, 39, 37, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.74);
}

.account-password-change summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  list-style-position: inside;
}

.account-password-change[open] summary {
  margin-bottom: 13px;
}

.account-password-change .field span {
  font-size: 9px;
}

.account-password-submit {
  width: 100%;
}

.account-delete-panel {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(157, 61, 50, 0.18);
  border-radius: 12px;
  background: rgba(255, 248, 245, 0.7);
}

.account-delete-panel summary {
  cursor: pointer;
  list-style-position: inside;
}

.account-delete-panel[open] summary {
  margin-bottom: 13px;
}

.account-delete-panel .account-delete {
  margin: 0;
}

.account-logout {
  margin-top: 18px;
  font-size: 11px;
}

.account-delete {
  margin-top: 12px;
  color: var(--danger);
  font-size: 10px;
}

.account-password-reset h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 24px;
  font-weight: 500;
}

.account-password-reset > p:not(.eyebrow) {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.ai-assistant-fab {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 15;
  min-width: 58px;
  height: 58px;
  padding: 0 13px;
  border: 1px solid rgba(236, 208, 148, 0.42);
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  color: #f4dfac;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 240, 196, 0.15), transparent 43%),
    var(--green);
  box-shadow: 0 14px 34px rgba(21, 61, 57, 0.28);
  cursor: pointer;
}

.ai-assistant-fab span {
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.ai-assistant-fab small {
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.assistant-dialog {
  width: min(660px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.assistant-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.assistant-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.assistant-shell {
  max-height: min(86vh, 780px);
  display: flex;
  flex-direction: column;
}

.assistant-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.assistant-intro {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.assistant-context {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
}

.assistant-context h3 {
  margin: 0 0 10px;
  font-size: 11px;
}

.assistant-coin-search {
  margin-bottom: 8px;
}

.assistant-coin-list {
  max-height: 148px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.assistant-coin-choice {
  width: 100%;
  min-height: 43px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: start;
}

.assistant-coin-choice:hover,
.assistant-coin-choice.selected {
  border-color: rgba(21, 61, 57, 0.14);
  background: var(--green-soft);
}

.assistant-coin-choice img,
.assistant-coin-choice .mini-coin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #ece7da;
}

.mini-coin {
  display: grid;
  place-items: center;
  color: var(--copper);
}

.assistant-coin-choice strong,
.assistant-coin-choice small {
  display: block;
}

.assistant-coin-choice strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-coin-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.assistant-or {
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.assistant-upload {
  width: 100%;
}

.assistant-context-preview {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #f0ede3;
}

.assistant-context-preview img {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
}

.assistant-context-preview strong,
.assistant-context-preview span {
  display: block;
}

.assistant-context-preview strong {
  font-size: 11px;
}

.assistant-context-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.assistant-context-message,
.assistant-no-items {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.assistant-submit {
  width: 100%;
  margin-top: 12px;
}

.assistant-answer {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
}

.assistant-answer h3 {
  margin: 0 0 11px;
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
}

.assistant-answer-text {
  min-height: 70px;
  color: #384944;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.assistant-sources {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.assistant-sources a {
  color: var(--copper);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.celebration-dialog {
  width: min(550px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  color: #073b43;
  background: transparent;
  overflow: visible;
}

.celebration-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 45%, rgba(52, 239, 219, 0.24), transparent 42%),
    rgba(3, 28, 35, 0.78);
  backdrop-filter: blur(7px);
}

.celebration-dialog[open] {
  animation: celebrationReveal 420ms cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

.celebration-shell {
  position: relative;
  padding: 32px 36px 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 30px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -4%, rgba(255, 255, 255, 0.82), transparent 31%),
    radial-gradient(circle at 91% 15%, rgba(255, 236, 116, 0.46), transparent 23%),
    radial-gradient(circle at 7% 88%, rgba(255, 255, 255, 0.18), transparent 31%),
    linear-gradient(150deg, #72f4df 0%, #26ded5 31%, #00b8c7 66%, #07889f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(0, 65, 79, 0.18),
    0 36px 100px rgba(0, 22, 30, 0.48);
}

.celebration-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 23px;
  pointer-events: none;
}

.celebration-shell::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -35%;
  bottom: -35%;
  left: -34%;
  width: 210px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(22deg);
  animation: celebrationLightSweep 5.4s ease-in-out infinite;
}

.celebration-shell > :not(.celebration-confetti):not(.celebration-sparks):not(.celebration-close) {
  position: relative;
  z-index: 2;
}

.celebration-dialog .eyebrow {
  color: rgba(3, 62, 70, 0.66);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.celebration-close {
  position: absolute;
  z-index: 5;
  top: 15px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(3, 60, 69, 0.18);
  border-radius: 50%;
  color: #0a535b;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 21px;
}

.celebration-shell h2 {
  margin: 0 auto;
  max-width: 410px;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(29px, 5vw, 40px);
  font-weight: 500;
  line-height: 1.25;
}

.celebration-copy {
  margin: 13px 0 0;
  color: #075660;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.celebration-story {
  margin: 5px 0 0;
  color: rgba(3, 59, 67, 0.62);
  font-size: 10px;
}

.celebration-visual {
  width: 146px;
  height: 162px;
  margin: 22px auto 30px;
  position: relative;
  display: grid;
  place-items: center;
}

.celebration-visual::before,
.celebration-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.celebration-visual::before {
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    0 0 0 16px rgba(255, 255, 255, 0.08),
    0 0 48px rgba(255, 244, 177, 0.34);
  animation: celebrationHalo 3.4s ease-in-out infinite;
}

.celebration-visual::after {
  left: 20%;
  right: 20%;
  bottom: 5px;
  height: 15px;
  background: rgba(0, 57, 67, 0.24);
  filter: blur(7px);
}

.celebration-visual img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  object-fit: contain;
  background: #e9e2d1;
  box-shadow: 0 18px 36px rgba(0, 65, 75, 0.28);
  animation: treasureFloat 3.8s ease-in-out infinite;
}

.celebration-placeholder {
  position: relative;
  z-index: 2;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f8e5b7;
  border: 2px solid rgba(255, 239, 198, 0.44);
  background:
    radial-gradient(circle at 34% 28%, #e7c77f, transparent 22%),
    radial-gradient(circle at 45% 42%, #c7974c, #80552d 64%, #4e3524);
  box-shadow:
    inset 0 0 0 7px rgba(80, 46, 24, 0.24),
    inset 0 0 0 9px rgba(255, 236, 185, 0.25),
    0 20px 36px rgba(0, 0, 0, 0.34);
  animation: treasureFloat 3.8s ease-in-out infinite;
}

.celebration-placeholder span {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 48px;
}

.celebration-item strong,
.celebration-item span {
  display: block;
  overflow-wrap: anywhere;
}

.celebration-item {
  position: relative;
  z-index: 3;
  min-height: 46px;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 14px;
}

.celebration-item strong {
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.celebration-item span {
  margin-top: 5px;
  color: rgba(3, 57, 65, 0.62);
  font-size: 9px;
  line-height: 1.55;
}

.celebration-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.celebration-dialog .celebration-actions .button {
  min-width: 0;
  padding-inline: 12px;
  line-height: 1.3;
}

.celebration-dialog .celebration-share {
  border-color: rgba(255, 255, 255, 0.52);
  color: #073e46;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(8px);
}

.celebration-dialog .button-quiet {
  border-color: rgba(255, 255, 255, 0.42);
  color: #073e46;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.celebration-dialog .celebration-primary {
  grid-column: 1 / -1;
  color: #123c42;
  border-color: transparent;
  background: linear-gradient(135deg, #fff388, #ffd94f);
  box-shadow:
    0 12px 26px rgba(0, 74, 83, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.celebration-number {
  margin: 17px 0 0;
  color: rgba(3, 56, 64, 0.82);
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.celebration-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.celebration-confetti {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.celebration-confetti i {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 6px;
  height: 13px;
  border-radius: 1.5px;
  background: var(--confetti-color, #e7c77e);
  opacity: 0;
  transform-origin: center;
  animation: confettiBurst 3.4s cubic-bezier(0.12, 0.72, 0.22, 1) infinite;
  animation-delay: var(--delay, 0s);
}

.celebration-confetti i:nth-child(3n) {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.celebration-confetti i:nth-child(4n) {
  width: 12px;
  height: 5px;
}

.celebration-confetti i:nth-child(5n) {
  width: 5px;
  height: 19px;
  border-radius: 999px;
}

.celebration-confetti i:nth-child(1) { --x: -265px; --y: -190px; --r: 340deg; --delay: -0.1s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(2) { --x: -225px; --y: -285px; --r: -220deg; --delay: -1.2s; --confetti-color: #ff6b6b; }
.celebration-confetti i:nth-child(3) { --x: -170px; --y: -350px; --r: 430deg; --delay: -0.6s; --confetti-color: #52d6aa; }
.celebration-confetti i:nth-child(4) { --x: -102px; --y: -385px; --r: 160deg; --delay: -2.4s; --confetti-color: #62b7ff; }
.celebration-confetti i:nth-child(5) { --x: -32px; --y: -390px; --r: -420deg; --delay: -1.5s; --confetti-color: #ff8ccf; }
.celebration-confetti i:nth-child(6) { --x: 44px; --y: -372px; --r: 280deg; --delay: -0.3s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(7) { --x: 118px; --y: -335px; --r: -180deg; --delay: -2.7s; --confetti-color: #73d8ff; }
.celebration-confetti i:nth-child(8) { --x: 184px; --y: -278px; --r: 390deg; --delay: -1s; --confetti-color: #ff755f; }
.celebration-confetti i:nth-child(9) { --x: 238px; --y: -195px; --r: -260deg; --delay: -1.8s; --confetti-color: #9b8cff; }
.celebration-confetti i:nth-child(10) { --x: 270px; --y: -100px; --r: 250deg; --delay: -0.5s; --confetti-color: #52d6aa; }
.celebration-confetti i:nth-child(11) { --x: 280px; --y: 6px; --r: -350deg; --delay: -2.2s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(12) { --x: 250px; --y: 108px; --r: 210deg; --delay: -1.4s; --confetti-color: #ff8ccf; }
.celebration-confetti i:nth-child(13) { --x: 188px; --y: 195px; --r: -230deg; --delay: -0.2s; --confetti-color: #62b7ff; }
.celebration-confetti i:nth-child(14) { --x: 110px; --y: 258px; --r: 330deg; --delay: -2.6s; --confetti-color: #ff6b6b; }
.celebration-confetti i:nth-child(15) { --x: 18px; --y: 285px; --r: -180deg; --delay: -0.8s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(16) { --x: -74px; --y: 278px; --r: 270deg; --delay: -2s; --confetti-color: #52d6aa; }
.celebration-confetti i:nth-child(17) { --x: -158px; --y: 235px; --r: -320deg; --delay: -1.1s; --confetti-color: #9b8cff; }
.celebration-confetti i:nth-child(18) { --x: -225px; --y: 164px; --r: 180deg; --delay: -2.5s; --confetti-color: #ff755f; }
.celebration-confetti i:nth-child(19) { --x: -264px; --y: 72px; --r: -250deg; --delay: -1.7s; --confetti-color: #62b7ff; }
.celebration-confetti i:nth-child(20) { --x: -275px; --y: -30px; --r: 310deg; --delay: -0.4s; --confetti-color: #ff8ccf; }
.celebration-confetti i:nth-child(21) { --x: -214px; --y: -115px; --r: -290deg; --delay: -1.3s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(22) { --x: 215px; --y: -125px; --r: 220deg; --delay: -2.1s; --confetti-color: #52d6aa; }
.celebration-confetti i:nth-child(23) { --x: 212px; --y: 145px; --r: -210deg; --delay: -0.7s; --confetti-color: #ffcf4a; }
.celebration-confetti i:nth-child(24) { --x: -208px; --y: 134px; --r: 360deg; --delay: -2.8s; --confetti-color: #ff6b6b; }

.celebration-sparks i {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff4b7;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 16px rgba(255, 237, 118, 0.72);
  opacity: 0;
  animation: celebrationSpark 2.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

.celebration-sparks i:nth-child(1) { --x: -180px; --y: -100px; --delay: 0.1s; }
.celebration-sparks i:nth-child(2) { --x: -125px; --y: -155px; --delay: 0.8s; }
.celebration-sparks i:nth-child(3) { --x: -60px; --y: -180px; --delay: 1.5s; }
.celebration-sparks i:nth-child(4) { --x: 15px; --y: -165px; --delay: 0.5s; }
.celebration-sparks i:nth-child(5) { --x: 95px; --y: -140px; --delay: 1.1s; }
.celebration-sparks i:nth-child(6) { --x: 160px; --y: -75px; --delay: 1.8s; }
.celebration-sparks i:nth-child(7) { --x: 190px; --y: 5px; --delay: 0.35s; }
.celebration-sparks i:nth-child(8) { --x: 145px; --y: 105px; --delay: 1.4s; }
.celebration-sparks i:nth-child(9) { --x: 75px; --y: 150px; --delay: 0.9s; }
.celebration-sparks i:nth-child(10) { --x: -15px; --y: 165px; --delay: 2s; }
.celebration-sparks i:nth-child(11) { --x: -110px; --y: 125px; --delay: 0.2s; }
.celebration-sparks i:nth-child(12) { --x: -185px; --y: 30px; --delay: 1.7s; }
.celebration-sparks i:nth-child(13) { --x: -155px; --y: -30px; --delay: 2.2s; }
.celebration-sparks i:nth-child(14) { --x: -45px; --y: -115px; --delay: 0.65s; }
.celebration-sparks i:nth-child(15) { --x: 120px; --y: -35px; --delay: 1.25s; }
.celebration-sparks i:nth-child(16) { --x: 35px; --y: 125px; --delay: 0.4s; }
.celebration-sparks i:nth-child(17) { --x: -80px; --y: 75px; --delay: 1.9s; }
.celebration-sparks i:nth-child(18) { --x: 185px; --y: 70px; --delay: 2.35s; }

@keyframes celebrationReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes treasureFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes celebrationHalo {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes celebrationLightSweep {
  0%,
  24% {
    left: -34%;
    opacity: 0;
  }
  42% {
    opacity: 0.75;
  }
  72%,
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes celebrationSpark {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.4);
  }
  22% {
    opacity: 1;
  }
  72% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--x), var(--y), 0) scale(1.15);
  }
}

@keyframes confettiBurst {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) rotate(0deg) scale(0.25);
  }
  7% {
    opacity: 1;
  }
  58% {
    opacity: 0.95;
    transform: translate3d(var(--x), var(--y), 0) rotate(var(--r)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--x), calc(var(--y) + 210px), 0)
      rotate(calc(var(--r) + 180deg)) scale(0.82);
  }
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.dialog-footer .button-primary:disabled,
#saveItemButton:disabled {
  color: #697672;
  border-color: #c7cecb;
  background: #dfe4e1;
  box-shadow: none;
  opacity: 1;
}

.button-primary {
  color: #fffaf0;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(21, 61, 57, 0.18);
}

.button-primary:hover {
  background: #0d302d;
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.button-quiet:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(20, 39, 37, 0.24);
}

.button-ai {
  color: var(--green);
  background: linear-gradient(135deg, #d8e7df, #f2eadb);
  border-color: rgba(21, 61, 57, 0.12);
}

.button-danger {
  color: var(--danger);
  border-color: rgba(157, 61, 50, 0.18);
  background: rgba(157, 61, 50, 0.06);
}

.text-button {
  border: 0;
  padding: 2px;
  color: var(--copper);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.page {
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-floating-actions {
  display: none;
}

.hero {
  display: none !important;
}

.collection-home-lead {
  padding: 34px 0 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.collection-home-lead h1 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.15;
}

.collection-home-lead p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.onboarding-panel {
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(28, 119, 101, 0.14);
  border-radius: 17px;
  background:
    radial-gradient(circle at 4% 0, rgba(40, 207, 182, 0.11), transparent 30%),
    rgba(255, 255, 255, 0.64);
}

.onboarding-panel[hidden] {
  display: none;
}

.onboarding-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.onboarding-heading h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 20px;
  font-weight: 500;
}

.onboarding-heading > span {
  margin-left: auto;
  color: #27725c;
  font-size: 9px;
  font-weight: 800;
}

.onboarding-heading .text-button {
  flex: none;
  font-size: 9px;
}

.onboarding-steps {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-steps button {
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  text-align: left;
}

.onboarding-steps button:hover {
  border-color: rgba(21, 61, 57, 0.22);
}

.onboarding-check {
  width: 20px;
  height: 20px;
  position: relative;
  border: 1px solid #b7c5c0;
  border-radius: 50%;
}

.onboarding-steps button.completed .onboarding-check {
  border-color: #1aa489;
  background: #1aa489;
}

.onboarding-steps button.completed .onboarding-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
}

.onboarding-steps strong,
.onboarding-steps small {
  display: block;
}

.onboarding-steps strong {
  overflow: hidden;
  display: -webkit-box;
  font-size: 9px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.onboarding-steps small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.insight-entry-grid {
  margin: 18px 0 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.insight-entry-grid button {
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.insight-entry-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 61, 57, 0.2);
  box-shadow: 0 12px 28px rgba(22, 47, 40, 0.08);
}

.insight-entry-grid button > span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f1dca9;
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 17px;
}

.insight-entry-grid strong {
  align-self: end;
  font-size: 11px;
}

.insight-entry-grid small {
  align-self: start;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.insights-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-height: min(92vh, 940px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #f6f4ed;
  box-shadow: 0 34px 110px rgba(12, 34, 29, 0.32);
  overflow: hidden;
}

.insights-dialog::backdrop {
  background: rgba(10, 28, 25, 0.68);
  backdrop-filter: blur(7px);
}

.insights-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.insights-shell {
  max-height: min(92vh, 940px);
  display: flex;
  flex-direction: column;
}

.insights-tabs {
  padding: 10px 28px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.insights-tabs button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.insights-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.insights-body {
  padding: 22px 28px 30px;
  overflow-y: auto;
}

.insights-body > .stats-grid {
  margin-top: 0;
}

.insights-body > section {
  scroll-margin-top: 12px;
}

.hero {
  min-height: 420px;
  padding: 64px 4vw 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 64px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 36px 0 36px auto;
  width: 45%;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(110deg, transparent, rgba(21, 61, 57, 0.055));
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--copper);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-family: "STSong", "SimSun", "Songti SC", serif;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--copper);
  font-style: normal;
}

.hero-text {
  max-width: 570px;
  margin: 25px 0 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-notes span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #4c5f5a;
  background: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.hero-notes span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--copper);
}

.hero-art {
  position: relative;
  min-height: 370px;
  display: grid;
  place-items: center;
  perspective: 1100px;
  isolation: isolate;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 22px 0;
  z-index: -1;
  border: 1px solid rgba(234, 205, 145, 0.18);
  border-radius: 38px;
  background:
    radial-gradient(circle at 48% 34%, rgba(222, 190, 121, 0.23), transparent 38%),
    radial-gradient(circle at 15% 85%, rgba(90, 132, 115, 0.16), transparent 44%),
    linear-gradient(145deg, #183f3a 0%, #102f2d 44%, #081e1d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 203, 0.13),
    inset 0 -20px 50px rgba(0, 0, 0, 0.2),
    0 30px 70px rgba(13, 39, 35, 0.22);
}

.hero-art::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 18%;
  right: 18%;
  bottom: 51px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5), transparent 70%);
  filter: blur(10px);
}

.hero-aura {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(199, 165, 104, 0.22) 0%,
    rgba(199, 165, 104, 0.08) 36%,
    transparent 70%
  );
  filter: blur(8px);
  animation: auraBreathe 6.5s ease-in-out infinite;
}

.hero-coin {
  width: clamp(215px, 24vw, 308px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  color: #f8edcf;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.1) 0deg 2deg, transparent 2deg 10deg),
    radial-gradient(circle at 35% 28%, #d8b97d, #a46b3f 47%, #674029 78%);
  box-shadow:
    inset 0 0 0 9px rgba(77, 42, 25, 0.22),
    inset 0 0 0 12px rgba(255, 245, 210, 0.35),
    0 34px 60px rgba(70, 45, 24, 0.22);
  transform: rotate(-8deg);
  transform-style: preserve-3d;
  animation: coinFloat 7s ease-in-out infinite;
  will-change: transform;
  z-index: 2;
}

.hero-coin::before,
.hero-coin::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 248, 223, 0.48);
}

.hero-coin::before {
  inset: 28px;
}

.hero-coin::after {
  inset: 42px;
}

.coin-inner {
  width: 42%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 13%;
  border: 1px solid rgba(255, 248, 223, 0.58);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(50px, 7vw, 82px);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(61, 34, 18, 0.4);
}

.coin-shine {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(
    110deg,
    transparent 28%,
    rgba(255, 255, 255, 0.08) 39%,
    rgba(255, 255, 255, 0.44) 49%,
    rgba(255, 255, 255, 0.08) 59%,
    transparent 70%
  );
  background-size: 260% 100%;
  animation: coinShine 5.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}

.coin-depth {
  position: absolute;
  z-index: -1;
  inset: 7px 2px -12px -7px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 1deg,
      rgba(248, 222, 160, 0.62) 0deg 1.2deg,
      rgba(72, 45, 26, 0.72) 1.2deg 2.6deg
    ),
    linear-gradient(135deg, #4d321f, #b37b3e 48%, #35241a);
  box-shadow:
    14px 18px 26px rgba(0, 0, 0, 0.34),
    inset -8px -5px 12px rgba(52, 31, 18, 0.55);
  transform: translateZ(-20px);
  filter: saturate(0.86) brightness(0.72);
}

.coin-face-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32))
    saturate(1.04)
    contrast(1.04);
}

.coin-face-svg text {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-transform: uppercase;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(235, 207, 150, 0.22);
  border-radius: 50%;
  mix-blend-mode: screen;
  z-index: 1;
}

.orbit-one {
  width: 330px;
  height: 330px;
  transform: rotate(14deg) scaleY(0.4);
  animation: orbitSpinOne 19s linear infinite;
}

.orbit-two {
  width: 390px;
  height: 390px;
  transform: rotate(-22deg) scaleY(0.28);
  animation: orbitSpinTwo 27s linear infinite reverse;
}

.hero-stamp {
  position: absolute;
  right: 0;
  bottom: 12px;
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  border: 1px solid rgba(235, 205, 146, 0.5);
  color: #e7ca8e;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 239, 196, 0.11), transparent 44%),
    rgba(7, 29, 27, 0.84);
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 196, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  z-index: 4;
  transform: rotate(9deg);
  animation: stampFloat 5.5s ease-in-out infinite;
}

.hero-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(199, 165, 104, 0.75);
  opacity: 0;
  animation: sparkDrift 5.2s ease-in-out infinite;
  z-index: 4;
}

.hero-spark-one {
  left: 15%;
  top: 35%;
  animation-delay: 0.2s;
}

.hero-spark-two {
  right: 13%;
  top: 24%;
  width: 4px;
  height: 4px;
  animation-delay: 1.5s;
}

.hero-spark-three {
  right: 19%;
  bottom: 20%;
  width: 5px;
  height: 5px;
  animation-delay: 2.7s;
}

.hero-spark-four {
  left: 22%;
  bottom: 18%;
  width: 3px;
  height: 3px;
  animation-delay: 3.8s;
}

@keyframes coinFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-8deg) rotateY(-5deg);
  }
  50% {
    transform: translate3d(0, -11px, 18px) rotate(-3deg) rotateY(7deg);
  }
}

@keyframes coinShine {
  0%,
  15% {
    background-position: 180% 0;
  }
  55%,
  100% {
    background-position: -90% 0;
  }
}

@keyframes orbitSpinOne {
  from {
    transform: rotate(14deg) scaleY(0.4);
  }
  to {
    transform: rotate(374deg) scaleY(0.4);
  }
}

@keyframes orbitSpinTwo {
  from {
    transform: rotate(-22deg) scaleY(0.28);
  }
  to {
    transform: rotate(-382deg) scaleY(0.28);
  }
}

@keyframes stampFloat {
  0%,
  100% {
    transform: translateY(0) rotate(9deg);
  }
  50% {
    transform: translateY(-7px) rotate(6deg);
  }
}

@keyframes sparkDrift {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.7);
  }
  25%,
  65% {
    opacity: 0.85;
  }
  55% {
    transform: translate3d(5px, -18px, 0) scale(1.15);
  }
}

@keyframes auraBreathe {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}

.hero-stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(241, 213, 157, 0.3);
  border-radius: 50%;
}

.hero-stamp span {
  font-size: 8px;
  letter-spacing: 0.2em;
}

.hero-stamp strong {
  margin-top: 6px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(182, 109, 66, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(240, 223, 209, 0.66);
  color: #70442f;
  font-size: 12px;
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner strong {
  margin-right: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.value-history-panel {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 8% 0, rgba(37, 183, 159, 0.09), transparent 30%),
    rgba(255, 255, 255, 0.6);
}

.history-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-align: right;
}

.history-summary span {
  color: var(--ink);
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.history-summary strong {
  padding: 4px 8px;
  border-radius: 999px;
  color: #28745d;
  background: rgba(66, 157, 124, 0.1);
  font-size: 9px;
}

.history-summary strong.negative {
  color: var(--danger);
  background: rgba(157, 61, 50, 0.08);
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.7fr);
  gap: 24px;
  align-items: stretch;
}

.history-chart-wrap {
  min-width: 0;
  padding: 12px 14px 4px;
  border: 1px solid rgba(21, 61, 57, 0.08);
  border-radius: 17px;
  background: rgba(248, 250, 246, 0.72);
}

.history-legend {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
}

.history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.history-legend i {
  width: 18px;
  height: 2px;
  display: inline-block;
  border-radius: 999px;
}

.history-line-value {
  background: #238d77;
}

.history-line-cost {
  background: #c49454;
}

.history-chart {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.history-grid-line {
  stroke: rgba(21, 61, 57, 0.09);
  stroke-width: 1;
}

.history-area {
  fill: url("#historyValueGradient");
}

.history-value-path {
  fill: none;
  stroke: #238d77;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-cost-path {
  fill: none;
  stroke: #c49454;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.history-point {
  fill: #f9fbf7;
  stroke: #238d77;
  stroke-width: 2;
}

.history-axis-label {
  fill: #8a9692;
  font-family: "Segoe UI", sans-serif;
  font-size: 9px;
}

.history-timeline {
  min-width: 0;
  padding: 4px 2px;
}

.history-timeline h3 {
  margin: 0 0 13px;
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
  font-weight: 500;
}

.history-timeline ol {
  max-height: 230px;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  overflow-y: auto;
  list-style: none;
}

.history-timeline li {
  position: relative;
  padding: 0 0 14px 20px;
}

.history-timeline li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid #dbe8e1;
  border-radius: 50%;
  background: #2a957d;
}

.history-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: #dce7e1;
}

.history-event-copy strong,
.history-event-copy span {
  display: block;
}

.history-event-copy strong {
  overflow-wrap: anywhere;
  font-size: 10px;
}

.history-event-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.dealer-panel,
.set-panel {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
}

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

.section-heading-compact h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 22px;
  font-weight: 500;
}

.panel-kicker {
  color: var(--muted);
  font-size: 9px;
}

.dealer-heading-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.dealer-missing-price {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #9a5b16;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dealer-missing-price:hover,
.dealer-missing-price:focus-visible {
  color: #6e3d0b;
}

.value-reference.pending-price strong {
  color: #a5651a;
  font-size: 11px;
}

.dealer-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.dealer-metrics > div {
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(21, 61, 57, 0.05);
}

.dealer-metrics span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.dealer-metrics strong {
  display: block;
  margin-top: 8px;
  font-family: "Segoe UI", sans-serif;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.set-list {
  display: grid;
  gap: 12px;
}

.set-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.4fr) auto auto;
  align-items: center;
  gap: 14px;
}

.set-row strong {
  font-size: 11px;
}

.set-row-copy small {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.set-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 61, 57, 0.1);
}

.set-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(21, 61, 57, 0.1);
}

.set-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.set-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.set-count {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 11px;
  white-space: nowrap;
}

.set-row-actions {
  display: flex;
  gap: 6px;
}

.set-row-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.set-row-actions button:hover {
  color: var(--ink);
  background: var(--green-soft);
}

.set-empty {
  margin: 5px 0 0;
  padding: 22px;
  border: 1px dashed rgba(21, 61, 57, 0.17);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
}

.set-empty[hidden] {
  display: none;
}

.set-dialog {
  width: min(580px, calc(100vw - 28px));
  max-height: min(88vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.set-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.set-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.set-form {
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
}

.set-dialog-body {
  padding: 24px 28px 28px;
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 15px;
  overflow-y: auto;
}

.set-dialog-body .field:first-of-type,
.set-dialog-body .field:last-of-type,
.set-dialog-body .set-edit-progress,
.set-dialog-body .account-message {
  grid-column: 1 / -1;
}

.set-edit-progress {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(31, 116, 99, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(226, 241, 233, 0.72), rgba(250, 246, 234, 0.68));
}

.set-edit-progress-head,
.set-edit-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.set-edit-progress-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.set-edit-progress-head strong {
  color: var(--green);
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
  font-weight: 500;
}

.set-edit-progress progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: rgba(30, 91, 74, 0.13);
}

.set-edit-progress progress::-webkit-progress-bar {
  border-radius: inherit;
  background: rgba(30, 91, 74, 0.13);
}

.set-edit-progress progress::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, #1e6c59, #c09553);
}

.set-edit-progress progress::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #1e6c59, #c09553);
}

.set-edit-progress-meta {
  color: var(--copper);
  font-size: 9px;
}

.set-edit-progress-meta small {
  color: var(--muted);
  font-size: 9px;
}

.set-edit-progress.complete {
  border-color: rgba(39, 114, 92, 0.34);
  background: rgba(218, 240, 228, 0.8);
}

.status-dialog .set-dialog-body {
  grid-template-columns: 1fr;
}

.status-dialog-coin {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--copper);
  font-family: "STSong", "SimSun", serif;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-dialog .set-dialog-body .field-wide {
  grid-column: 1 / -1;
}

.trash-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(90vh, 820px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.trash-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.trash-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.trash-shell {
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
}

.trash-body {
  padding: 22px 28px 28px;
  overflow-y: auto;
}

.trash-intro {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.trash-list,
.recovery-list {
  display: grid;
  gap: 9px;
}

.trash-row {
  padding: 10px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.trash-thumb {
  width: 52px;
  height: 52px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #f0d99f;
  background: linear-gradient(145deg, #31564e, #173c36);
  font-size: 20px;
}

.trash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trash-copy {
  min-width: 0;
}

.trash-copy strong,
.trash-copy span {
  display: block;
}

.trash-copy strong {
  overflow-wrap: anywhere;
  font-family: "STSong", "SimSun", serif;
  font-size: 14px;
}

.trash-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.trash-row-actions {
  display: flex;
  gap: 6px;
}

.trash-row-actions button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.trash-row-actions button.danger {
  color: var(--danger);
}

.trash-section-title {
  margin: 25px 0 11px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
  font-weight: 500;
}

.recovery-row {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(34, 129, 105, 0.15);
  border-radius: 13px;
  background: rgba(225, 244, 236, 0.55);
}

.recovery-row strong,
.recovery-row span {
  display: block;
}

.recovery-row strong {
  font-size: 10px;
}

.recovery-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.recovery-row button {
  min-height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.stat-card {
  min-height: 164px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 8px 30px rgba(28, 49, 43, 0.045);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stat-card-dark {
  color: #f7f0e2;
  border-color: transparent;
  background:
    radial-gradient(circle at 85% 12%, rgba(199, 165, 104, 0.22), transparent 35%),
    var(--green);
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.08em;
  opacity: 0.68;
}

.stat-card strong {
  display: block;
  min-height: 40px;
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  white-space: nowrap;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 13px;
}

.stat-card-dark small {
  color: rgba(255, 250, 235, 0.58);
}

.stat-glyph {
  position: absolute;
  right: 18px;
  bottom: 12px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 54px;
  color: rgba(20, 39, 37, 0.055);
  user-select: none;
}

.stat-card-dark .stat-glyph {
  color: rgba(255, 255, 255, 0.07);
}

.stat-card-change strong.negative {
  color: var(--danger);
}

.stat-card-change strong.positive {
  color: #32755e;
}

.collection-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

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

.panel-heading h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 28px;
  font-weight: 500;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.panel-heading-actions .text-button {
  font-size: 10px;
}

.view-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.view-mode-button[aria-pressed="true"] {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fffdf5;
  background: var(--green);
}

.result-count {
  color: var(--muted);
  font-size: 12px;
}

.batch-toolbar {
  margin-bottom: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(25, 116, 99, 0.18);
  border-radius: 14px;
  background: rgba(225, 244, 236, 0.62);
}

.batch-toolbar[hidden] {
  display: none;
}

.batch-toolbar-head,
.batch-selection-summary,
.batch-selection-actions,
.batch-toolbar-main,
.batch-update-fields {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-toolbar-head,
.batch-toolbar-main {
  justify-content: space-between;
}

.batch-toolbar-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(25, 116, 99, 0.14);
}

.batch-selection-summary {
  flex-wrap: wrap;
}

.batch-toolbar-head strong {
  color: #24594c;
  font-size: 14px;
  font-weight: 800;
}

.batch-selection-actions {
  gap: 4px 10px;
  flex-wrap: wrap;
}

.batch-selection-actions .text-button {
  font-size: 10px;
}

.batch-toolbar .batch-exit-button {
  min-width: 138px;
  min-height: 50px;
  padding-inline: 22px;
  border-color: rgba(154, 91, 22, 0.28);
  color: #6f4515;
  background: #fff8e9;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(129, 84, 29, 0.1);
}

.batch-toolbar .batch-exit-button:hover,
.batch-toolbar .batch-exit-button:focus-visible {
  border-color: rgba(154, 91, 22, 0.5);
  color: #4f2f08;
  background: #fff1cf;
}

body.batch-mode-active .ai-assistant-fab {
  display: none;
}

.batch-toolbar-main {
  align-items: flex-end;
  flex-wrap: wrap;
}

.batch-update-fields {
  flex: 1 1 500px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.batch-update-fields label {
  display: flex;
  flex: 1 1 130px;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.batch-update-fields select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
}

.batch-toolbar .button {
  min-height: 38px;
  padding-inline: 13px;
  font-size: 10px;
}

.batch-toolbar .button#batchCancelButton {
  min-height: 50px;
  font-size: 14px;
}

.batch-actions-menu {
  position: relative;
  flex: none;
}

.batch-actions-menu > summary {
  min-width: 138px;
  cursor: pointer;
  list-style: none;
  justify-content: space-between;
}

.batch-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.batch-actions-menu > summary b {
  transition: transform 160ms ease;
}

.batch-actions-menu[open] > summary b {
  transform: rotate(180deg);
}

.batch-actions-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(25, 116, 99, 0.18);
  border-radius: 14px;
  background: #fcfdf9;
  box-shadow: 0 18px 45px rgba(16, 49, 44, 0.2);
}

.batch-actions-popover > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.batch-action-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #294c43;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  text-align: start;
}

.batch-action-item:hover,
.batch-action-item:focus-visible {
  background: #e8f4ee;
}

.batch-action-item > span:first-child {
  width: 22px;
  color: var(--green);
  font-size: 15px;
  text-align: center;
}

.batch-action-danger {
  margin-top: 7px;
  color: var(--danger);
  border-top: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
}

.batch-action-danger > span:first-child {
  color: var(--danger);
}

.batch-export-section {
  margin: 8px 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(225, 244, 236, 0.62);
}

.batch-export-section strong {
  display: block;
  margin-bottom: 8px;
  color: #35564d;
  font-size: 9px;
}

.batch-export-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 7px;
}

.batch-export-grid button {
  min-height: 34px;
  border: 1px solid rgba(25, 116, 99, 0.18);
  border-radius: 8px;
  color: #24594c;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.batch-export-grid button:hover:not(:disabled),
.batch-export-grid button:focus-visible:not(:disabled) {
  border-color: rgba(25, 116, 99, 0.42);
  background: #f4fbf6;
}

.batch-export-grid button:disabled,
.batch-action-item:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.collection-panel.batch-mode .card-actions,
.collection-panel.batch-mode .card-detail-toggle,
.collection-panel.batch-mode .coin-card-body {
  display: none;
}

.batch-select {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 25px;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 52, 47, 0.54);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  font-size: 13px;
}

.collection-panel.batch-mode .batch-select {
  display: grid;
}

.coin-card.batch-selected {
  border-color: #159981;
  box-shadow:
    0 0 0 2px rgba(21, 153, 129, 0.18),
    0 18px 36px rgba(27, 44, 38, 0.12);
}

.coin-card.batch-selected .batch-select {
  background: #0da890;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.saved-filter-row {
  margin: -12px 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.saved-filter-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.saved-filter-row select {
  min-height: 32px;
  max-width: 210px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.saved-filter-row .text-button {
  font-size: 9px;
}

.search-field,
.select-field {
  height: 44px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.search-field {
  padding: 0 16px;
  gap: 10px;
}

.search-field svg {
  width: 17px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.search-field input::placeholder {
  color: #94a09c;
}

.select-field {
  padding: 0 12px;
}

.select-field select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.collection-panel.thumbnail-mode .collection-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.coin-thumb-card {
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(25, 47, 40, 0.06);
  cursor: zoom-in;
}

.coin-thumb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(157, 121, 64, 0.28);
  box-shadow: 0 16px 34px rgba(23, 43, 37, 0.12);
}

.coin-thumb-media {
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  height: auto;
}

.coin-thumb-media .coin-media-main {
  padding: 7px;
}

.coin-thumb-media .coin-status-badge {
  top: 8px;
  right: 8px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 0;
  box-shadow: 0 4px 12px rgba(18, 38, 31, 0.18);
}

.coin-thumb-media .status-light {
  width: 8px;
  height: 8px;
}

.coin-thumb-number {
  position: absolute;
  z-index: 5;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #324f48;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(20, 45, 40, 0.1);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-thumb-caption {
  padding: 10px 11px 11px;
  background: #fff;
}

.coin-thumb-caption strong,
.coin-thumb-caption span {
  display: block;
}

.coin-thumb-caption strong {
  overflow: hidden;
  color: #1c332e;
  font-family: "STSong", "SimSun", serif;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-thumb-caption span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  animation: cardIn 320ms ease both;
}

.coin-card:focus-visible {
  outline: 3px solid rgba(22, 116, 98, 0.24);
  outline-offset: 3px;
}

.coin-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 39, 37, 0.22);
  box-shadow: 0 18px 36px rgba(27, 44, 38, 0.09);
}

@keyframes cardIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.coin-media {
  aspect-ratio: 1.5;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(214, 190, 139, 0.34), transparent 33%),
    linear-gradient(145deg, #e8e2d6, #d4d6ce);
}

.coin-media img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  padding: 8px;
  object-fit: contain;
  object-position: center;
}

.coin-media .coin-media-main {
  z-index: 1;
}

.coin-card:not(.expanded) .coin-media {
  aspect-ratio: 1 / 1.08;
}

.card-detail-toggle {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 12px;
  min-width: 118px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fffdf5;
  background: rgba(17, 62, 51, 0.9);
  box-shadow: 0 8px 20px rgba(14, 45, 36, 0.26);
  backdrop-filter: blur(9px);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.card-detail-toggle:hover {
  background: rgba(19, 86, 68, 0.96);
  transform: translateX(-50%) translateY(-1px);
}

.card-detail-toggle:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.card-detail-toggle b {
  font-size: 13px;
  line-height: 1;
}

.coin-placeholder {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 247, 224, 0.86);
  border: 2px solid rgba(103, 68, 42, 0.28);
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.08) 0deg 3deg, transparent 3deg 11deg),
    radial-gradient(circle at 32% 28%, #bd925b, #8e5b39 56%, #5f3e2b);
  box-shadow:
    inset 0 0 0 5px rgba(76, 45, 27, 0.18),
    0 12px 24px rgba(72, 46, 27, 0.17);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 35px;
}

.demo-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #75442a;
  background: rgba(255, 244, 223, 0.88);
  backdrop-filter: blur(7px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.coin-number-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  max-width: calc(100% - 118px);
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: #fffdf6;
  background: rgba(29, 49, 43, 0.82);
  box-shadow: 0 6px 16px rgba(18, 38, 31, 0.18);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .coin-number-badge {
  left: auto;
  right: 12px;
}

.coin-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  min-width: 78px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  backdrop-filter: blur(9px);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(18, 38, 31, 0.18);
}

.status-light {
  position: relative;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.coin-status-badge.status-forSale {
  color: #effff7;
  border-color: rgba(153, 255, 207, 0.5);
  background: linear-gradient(135deg, rgba(15, 102, 67, 0.96), rgba(18, 77, 53, 0.96));
  box-shadow:
    0 8px 20px rgba(12, 76, 49, 0.28),
    0 0 0 1px rgba(55, 210, 139, 0.16);
}

.status-forSale .status-light {
  color: #65ffa9;
}

.status-forSale .status-light::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #65ffa9;
  border-radius: 50%;
  animation: saleLightPulse 1.35s ease-out infinite;
}

.coin-status-badge.status-sold {
  color: #fff1ef;
  border-color: rgba(255, 141, 128, 0.48);
  background: linear-gradient(135deg, rgba(153, 45, 35, 0.96), rgba(104, 29, 25, 0.96));
}

.status-sold .status-light {
  color: #ff7d70;
}

.coin-status-badge.status-owned {
  color: #654b20;
  border-color: rgba(178, 133, 58, 0.38);
  background: linear-gradient(135deg, rgba(255, 246, 215, 0.97), rgba(236, 211, 153, 0.96));
}

.status-owned .status-light {
  color: #d3a23f;
  box-shadow: 0 0 9px rgba(211, 162, 63, 0.7);
}

.coin-status-badge.status-wishlist {
  color: #ecf5ff;
  border-color: rgba(156, 202, 245, 0.46);
  background: linear-gradient(135deg, rgba(54, 91, 122, 0.96), rgba(40, 66, 91, 0.96));
}

.status-wishlist .status-light {
  color: #85c9ff;
}

@keyframes saleLightPulse {
  0% {
    transform: scale(0.55);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(2.15);
    opacity: 0;
  }
}

html[dir="rtl"] .coin-status-badge {
  left: 12px;
  right: auto;
}

.coin-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.coin-card-body[hidden] {
  display: none;
}

.coin-card.expanded .coin-card-body {
  animation: cardDetailsIn 180ms ease both;
}

@keyframes cardDetailsIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coin-card-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--copper);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.item-chip-row {
  position: absolute;
  bottom: 11px;
  left: 11px;
  display: flex;
  gap: 5px;
}

html[dir="rtl"] .item-chip-row {
  left: auto;
  right: 11px;
}

.item-chip {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 2px 8px rgba(20, 39, 37, 0.08);
  font-size: 8px;
  font-weight: 800;
}

.item-chip.privacy-public {
  color: #7d552e;
  background: rgba(247, 230, 204, 0.94);
}

.coin-card-kicker span + span::before {
  content: "·";
  margin-right: 7px;
}

.coin-tag-row {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.coin-tag {
  padding: 3px 6px;
  border-radius: 999px;
  color: #6d5b42;
  background: rgba(215, 188, 140, 0.16);
  font-size: 7px;
  font-weight: 700;
}

.coin-card h3 {
  min-height: 42px;
  margin: 8px 0 5px;
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.coin-meta {
  margin: 0;
  min-height: 30px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.coin-values {
  margin-top: auto;
  padding-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  align-items: end;
}

.coin-values > div {
  min-width: 0;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.coin-values span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 12px;
}

.coin-values strong {
  display: block;
  margin-top: 3px;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.coin-values .value-reference strong {
  color: var(--copper);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.card-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.card-actions .card-full-details {
  grid-column: 1 / -1;
  border-color: rgba(20, 86, 69, 0.24);
  color: #fffdf5;
  background: linear-gradient(135deg, #1b6655, #174f43);
  box-shadow: 0 6px 14px rgba(18, 73, 58, 0.16);
}

.card-actions .card-full-details:hover {
  background: linear-gradient(135deg, #21745f, #1a5a4b);
}

.sale-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.wishlist-fields {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(178, 119, 58, 0.16);
  border-radius: 13px;
  background: rgba(244, 229, 209, 0.42);
}

.wishlist-alert-toggle {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #684a32;
  font-size: 10px;
}

.wishlist-alert-toggle input {
  accent-color: var(--copper);
}

.wishlist-panel {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid rgba(177, 118, 58, 0.16);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 94% 0, rgba(221, 172, 92, 0.15), transparent 29%),
    rgba(255, 251, 244, 0.7);
}

.wishlist-panel[hidden] {
  display: none;
}

.wishlist-summary {
  color: #8b6038;
  font-size: 9px;
}

.wishlist-list {
  display: grid;
  gap: 10px;
}

.wishlist-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  border: 1px solid rgba(177, 118, 58, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.wishlist-row.reached {
  border-color: rgba(37, 139, 105, 0.28);
  background: rgba(225, 246, 236, 0.67);
}

.wishlist-thumb {
  width: 58px;
  height: 58px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #f2dfb3;
  background: linear-gradient(145deg, #31564e, #173c36);
  font-family: Georgia, serif;
  font-size: 22px;
}

.wishlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wishlist-copy {
  min-width: 0;
}

.wishlist-copy strong,
.wishlist-copy span {
  display: block;
}

.wishlist-copy strong {
  overflow-wrap: anywhere;
  font-family: "STSong", "SimSun", serif;
  font-size: 14px;
}

.wishlist-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.wishlist-price {
  min-width: 105px;
  text-align: right;
}

.wishlist-price span,
.wishlist-price strong {
  display: block;
}

.wishlist-price span {
  color: var(--muted);
  font-size: 8px;
}

.wishlist-price strong {
  margin-top: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.wishlist-price .wishlist-target {
  margin-top: 4px;
  color: #9c6638;
  font-size: 8px;
}

.wishlist-price em {
  margin-top: 3px;
  display: block;
  color: #9c6638;
  font-size: 8px;
  font-style: normal;
}

.wishlist-row.reached .wishlist-price em {
  color: #27725c;
  font-weight: 800;
}

.wishlist-actions {
  display: flex;
  gap: 6px;
}

.wishlist-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

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

.print-label-area {
  display: none;
}

.card-actions button:hover {
  background: var(--green-soft);
  border-color: transparent;
}

.empty-state {
  padding: 76px 20px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.load-more-wrap {
  padding-top: 22px;
  display: flex;
  justify-content: center;
}

.load-more-wrap[hidden] {
  display: none;
}

.empty-coin {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(20, 39, 37, 0.25);
  border-radius: 50%;
  color: var(--copper);
  font-size: 30px;
}

.empty-state h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 22px;
}

.empty-state p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
  padding: 36px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #87918e;
  font-size: 10px;
}

.footer-legal {
  display: flex;
  gap: 14px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  color: var(--copper);
  text-decoration: underline;
}

.legal-page {
  width: min(820px, calc(100% - 32px));
  margin: 42px auto 70px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.legal-language-switch {
  margin-bottom: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.legal-language-switch button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.legal-language-switch button.active {
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.legal-page h1 {
  margin: 0 0 8px;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 500;
}

.legal-page h2 {
  margin: 30px 0 9px;
  font-family: "STSong", "SimSun", serif;
  font-size: 21px;
  font-weight: 500;
}

.legal-page p,
.legal-page li {
  color: #455953;
  font-size: 12px;
  line-height: 1.8;
}

.legal-page .legal-meta {
  color: var(--muted);
  font-size: 10px;
}

.legal-page a {
  color: var(--copper);
}

.smart-import-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.smart-import-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.smart-import-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.smart-import-shell {
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
}

.smart-import-body {
  padding: 22px 28px 26px;
  overflow-y: auto;
}

.smart-import-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.smart-import-summary strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.smart-import-summary span,
.smart-import-hint {
  color: var(--muted);
  font-size: 10px;
}

.smart-import-hint {
  margin: 6px 0 16px;
  line-height: 1.6;
}

.smart-import-controls {
  margin: -4px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
}

.smart-import-controls label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #35564d;
  font-weight: 700;
}

.smart-import-controls input {
  accent-color: var(--green);
}

.smart-import-controls #smartImportPresetStatus.preset {
  color: #27725c;
  font-weight: 700;
}

.smart-import-mapping {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.import-map-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.import-map-row label {
  display: grid;
  gap: 6px;
}

.import-map-row strong {
  min-height: 26px;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.import-map-row small {
  color: var(--muted);
  font-size: 8px;
}

.import-map-row select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
}

.import-map-row.mapped {
  border-color: rgba(39, 126, 102, 0.26);
  background: rgba(225, 244, 236, 0.58);
}

.smart-import-preview-wrap {
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.smart-import-preview {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 9px;
}

.smart-import-preview th,
.smart-import-preview td {
  max-width: 190px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-import-preview th {
  position: sticky;
  top: 0;
  color: var(--green);
  background: #f1f5ef;
  font-weight: 800;
}

.smart-import-preview tr:last-child td {
  border-bottom: 0;
}

.smart-import-preview tr.row-invalid {
  background: rgba(157, 61, 50, 0.055);
}

.smart-import-preview tr.row-duplicate {
  background: rgba(191, 136, 59, 0.08);
}

.smart-import-preview .row-number,
.smart-import-preview .row-state {
  width: 90px;
}

.row-state-badge {
  padding: 3px 6px;
  border-radius: 999px;
  color: #32705f;
  background: rgba(69, 155, 122, 0.1);
  font-size: 8px;
  font-weight: 800;
}

.row-state-badge.invalid {
  color: var(--danger);
  background: rgba(157, 61, 50, 0.08);
}

.row-state-badge.duplicate {
  color: #8b5b29;
  background: rgba(191, 136, 59, 0.12);
}

.smart-import-report {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(34, 129, 105, 0.18);
  border-radius: 14px;
  background: rgba(225, 244, 236, 0.62);
}

.smart-import-report[hidden] {
  display: none;
}

.smart-import-report h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
  font-weight: 500;
}

.smart-import-report p {
  margin: 7px 0 0;
  color: #35564d;
  font-size: 10px;
}

.smart-import-report ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.share-dialog {
  width: min(850px, calc(100vw - 32px));
  max-height: min(90vh, 820px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: #f7fbf9;
  box-shadow: 0 34px 110px rgba(12, 43, 43, 0.34);
  overflow: hidden;
}

.share-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 45%, rgba(32, 212, 197, 0.18), transparent 38%),
    rgba(7, 28, 32, 0.72);
  backdrop-filter: blur(7px);
}

.share-dialog[open] {
  animation: dialogIn 240ms cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

.share-shell {
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
}

.share-header {
  padding: 22px 28px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 4% 0, rgba(29, 214, 198, 0.15), transparent 28%),
    rgba(255, 255, 255, 0.72);
}

.share-header h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 28px;
  font-weight: 500;
}

.share-body {
  padding: 24px 28px 26px;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 1.18fr);
  gap: 26px;
  align-items: center;
  min-height: 0;
  overflow-y: auto;
}

.share-preview-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(11, 107, 109, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.82), transparent 32%),
    linear-gradient(150deg, #79f0df, #17cdc9 54%, #07899e);
  box-shadow:
    0 22px 48px rgba(12, 78, 78, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.share-preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.share-preview-frame img[hidden] {
  display: none;
}

.share-preview-loading {
  max-width: 190px;
  color: #064e56;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.share-preview-loading::before {
  content: "";
  width: 28px;
  height: 28px;
  margin: 0 auto 11px;
  display: block;
  border: 2px solid rgba(5, 83, 91, 0.2);
  border-top-color: #075e68;
  border-radius: 50%;
  animation: sharePreviewSpin 800ms linear infinite;
}

.share-preview-loading.error::before {
  display: none;
}

.share-preview-loading[hidden] {
  display: none;
}

@keyframes sharePreviewSpin {
  to {
    transform: rotate(360deg);
  }
}

.share-options {
  min-width: 0;
}

.share-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.share-watermark-note {
  margin-top: 18px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(12, 126, 127, 0.14);
  border-radius: 15px;
  background: rgba(218, 246, 240, 0.58);
}

.share-watermark-note > span:last-child,
.share-switch-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.share-watermark-note strong,
.share-switch-copy strong {
  font-size: 11px;
}

.share-watermark-note small,
.share-switch-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.share-watermark-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f0d182;
  background:
    radial-gradient(circle at 34% 28%, #dfbd71, transparent 24%),
    linear-gradient(145deg, #234f49, #0d302d);
  box-shadow: inset 0 0 0 2px rgba(242, 216, 152, 0.24);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.share-switch-row {
  margin-top: 14px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(12, 126, 127, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.share-switch-row[hidden] {
  display: none;
}

.share-switch-copy em {
  margin-top: 8px;
  color: #0c6d72;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.share-switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.share-switch {
  width: 46px;
  height: 26px;
  position: relative;
  direction: ltr;
  border-radius: 999px;
  background: #c7d2ce;
  box-shadow: inset 0 1px 3px rgba(24, 55, 49, 0.18);
  transition: background 180ms ease;
}

.share-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 45, 40, 0.24);
  transition: transform 180ms ease;
}

.share-switch-row input:checked + .share-switch {
  background: #08bfb7;
}

.share-switch-row input:checked + .share-switch::after {
  transform: translateX(20px);
}

.share-switch-row input:focus-visible + .share-switch {
  outline: 3px solid rgba(8, 191, 183, 0.22);
  outline-offset: 3px;
}

.public-share-panel {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(29, 120, 117, 0.14);
  border-radius: 15px;
  background: rgba(236, 248, 244, 0.7);
}

.public-share-panel h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 16px;
  font-weight: 500;
}

.public-share-panel > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.public-share-options {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.public-share-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #45605a;
  font-size: 9px;
}

.public-share-options input {
  accent-color: #08bfb7;
}

.public-share-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-share-actions .button {
  min-height: 34px;
  font-size: 10px;
}

.public-share-actions .text-button {
  color: var(--danger);
  font-size: 9px;
}

.public-share-result {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.public-share-result input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  color: #33534c;
  background: #fff;
  font-size: 9px;
}

.public-share-result .button {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 9px;
}

.public-share-status {
  min-height: 14px;
  color: #30725f !important;
}

.share-footer {
  padding: 16px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: #edf7f3;
}

.share-footer .button {
  min-width: 126px;
}

.item-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #f9f7f0;
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.coin-preview-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(91vh, 880px);
  padding: 0;
  border: 0;
  border-radius: 27px;
  color: var(--ink);
  background: #f8f6ef;
  box-shadow: 0 34px 110px rgba(12, 34, 29, 0.32);
  overflow: hidden;
}

.coin-preview-dialog::backdrop {
  background: rgba(10, 28, 25, 0.68);
  backdrop-filter: blur(7px);
}

.coin-preview-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.coin-preview-shell {
  max-height: min(91vh, 880px);
  display: flex;
  flex-direction: column;
}

.coin-preview-body {
  padding: 24px 28px 28px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.95fr);
  gap: 25px;
  overflow-y: auto;
}

.coin-preview-gallery {
  min-height: 430px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  place-items: center;
  gap: 12px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 30%, rgba(226, 190, 112, 0.2), transparent 35%),
    linear-gradient(145deg, #173f39, #082824);
}

.coin-preview-gallery img {
  max-width: 100%;
  max-height: 500px;
  border: 1px solid rgba(245, 223, 167, 0.38);
  border-radius: 15px;
  object-fit: contain;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

.coin-preview-placeholder {
  width: 170px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f4dfac;
  background:
    radial-gradient(circle at 34% 28%, #e7c77f, transparent 22%),
    radial-gradient(circle at 45% 42%, #c7974c, #80552d 64%, #4e3524);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 60px;
}

.coin-preview-info {
  min-width: 0;
}

.coin-preview-info h3 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.2;
}

.coin-preview-meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.coin-preview-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.coin-preview-facts {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.coin-preview-fact {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.65);
}

.coin-preview-fact span,
.coin-preview-fact strong {
  display: block;
}

.coin-preview-fact span {
  color: var(--muted);
  font-size: 8px;
}

.coin-preview-fact strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.coin-preview-notes,
.coin-preview-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.coin-preview-notes h4,
.coin-preview-history h4 {
  margin: 0 0 9px;
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
  font-weight: 500;
}

.coin-preview-notes p {
  margin: 0;
  max-height: 150px;
  overflow-y: auto;
  color: #4b5e58;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.coin-preview-history ol {
  max-height: 140px;
  margin: 0;
  padding-left: 18px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.coin-preview-history li + li {
  margin-top: 6px;
}

.coin-preview-dialog .dialog-footer > span {
  color: var(--copper);
  font-size: 12px;
  font-weight: 700;
}

.quick-valuation-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(85vh, 700px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 30px 90px rgba(12, 34, 29, 0.3);
  overflow: hidden;
}

.quick-valuation-dialog::backdrop {
  background: rgba(10, 28, 25, 0.68);
  backdrop-filter: blur(7px);
}

.quick-valuation-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.quick-valuation-form {
  max-height: min(85vh, 700px);
  display: flex;
  flex-direction: column;
}

.quick-valuation-body {
  padding: 22px 28px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  overflow-y: auto;
}

.quick-valuation-body > p:first-child,
.quick-valuation-body .field:nth-of-type(1),
.quick-valuation-body .field:nth-of-type(3),
.quick-valuation-body .account-message {
  grid-column: 1 / -1;
}

.quick-valuation-body > p:first-child {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
}

.quick-valuation-symbol {
  padding-left: 12px;
  color: var(--copper);
  font-family: Georgia, serif;
}

@media (max-width: 560px) {
  .quick-valuation-body {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .quick-valuation-body .field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .coin-preview-body {
    grid-template-columns: 1fr;
    padding: 18px;
    align-content: start;
    grid-auto-rows: max-content;
  }

  .coin-preview-gallery {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .coin-preview-gallery img {
    width: 100%;
    max-height: none;
  }

  .coin-preview-facts {
    grid-template-columns: 1fr;
  }
}

.rates-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: min(88vh, 860px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #f9f7f0;
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(25, 38, 33, 0.28);
  overflow: hidden;
}

.rates-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.rates-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.rates-form {
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
}

.rates-body {
  padding: 25px 28px 28px;
  overflow-y: auto;
}

.rates-description,
.rates-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.rates-disclaimer {
  padding-top: 16px;
  color: #8a654e;
}

.rate-sync-panel {
  margin-top: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  border: 1px solid rgba(27, 116, 100, 0.16);
  border-radius: 14px;
  background: rgba(225, 244, 236, 0.6);
}

.rate-sync-panel strong {
  font-size: 11px;
}

.rate-sync-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.rate-sync-panel p.error {
  color: var(--danger);
}

.rate-sync-panel p.stale {
  color: #8a5b2f;
}

.rate-sync-panel .button {
  min-height: 34px;
  font-size: 10px;
}

.rate-auto-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #35554d;
  font-size: 9px;
}

.rate-auto-toggle input {
  accent-color: var(--green);
}

.rate-override-row {
  min-height: 24px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.rate-override-row .text-button {
  font-size: 9px;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 20px;
}

.rate-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.rate-field label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rate-code {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  direction: ltr;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.rate-code small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.rate-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.item-dialog::backdrop {
  background: rgba(14, 30, 28, 0.62);
  backdrop-filter: blur(5px);
}

.item-dialog[open] {
  animation: dialogIn 220ms ease both;
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.item-form {
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
}

.dialog-header {
  padding: 24px 28px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 247, 240, 0.96);
}

.dialog-header h2 {
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: 28px;
  font-weight: 500;
}

html:not([lang="zh-CN"]):not([lang="zh-TW"]):not([lang="ja"]):not([lang="ko"]) .dialog-header h2 {
  font-family: "Microsoft YaHei UI", "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 0;
}

.close-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.photo-section {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(210px, 0.8fr);
  gap: 20px;
  align-items: center;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-slot-wrap {
  min-width: 0;
  position: relative;
}

.photo-slot {
  width: 100%;
  aspect-ratio: 1.02;
  border: 1px dashed rgba(20, 39, 37, 0.22);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  padding: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(214, 190, 139, 0.25), transparent 35%),
    #e8e6de;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.photo-slot:hover,
.photo-slot.drag-over {
  border-color: rgba(182, 109, 66, 0.6);
  box-shadow: 0 0 0 3px rgba(182, 109, 66, 0.08);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ece9df;
}

.photo-slot-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #7e8a86;
}

.photo-slot-placeholder span {
  font-size: 28px;
  color: var(--copper);
}

.photo-slot-placeholder small {
  font-size: 10px;
}

.photo-slot-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 2px 8px rgba(20, 39, 37, 0.08);
  font-size: 9px;
  font-weight: 800;
}

.slot-remove {
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 39, 37, 0.14);
  border-radius: 50%;
  color: var(--danger);
  background: rgba(255, 253, 247, 0.92);
  cursor: pointer;
  font-size: 16px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.file-button {
  cursor: pointer;
}

.photo-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.ai-status {
  flex-basis: 100%;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.ai-status.ready {
  color: #39705e;
}

.ai-status.error {
  color: var(--danger);
}

.ai-spark {
  color: var(--copper);
}

.form-section {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin: 0 0 15px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  color: #53625e;
  font-size: 10px;
  font-weight: 700;
}

.field b {
  color: var(--copper);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: rgba(182, 109, 66, 0.55);
  box-shadow: 0 0 0 3px rgba(182, 109, 66, 0.08);
}

.money-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  overflow: hidden;
}

.certificate-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  overflow: hidden;
}

.certificate-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.certificate-lookup {
  width: 38px;
  flex: none;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--copper);
  background: rgba(240, 223, 209, 0.35);
  cursor: pointer;
  font-size: 17px;
}

.money-field > span {
  padding-left: 12px;
  color: var(--copper);
  font-family: Georgia, serif;
}

.money-field input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dialog-footer {
  padding: 17px 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: #f4f1e8;
}

.dialog-footer-right {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fffaf0;
  background: rgba(20, 39, 37, 0.94);
  box-shadow: 0 14px 40px rgba(15, 31, 28, 0.25);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.undo-bar {
  position: fixed;
  left: 50%;
  bottom: 76px;
  z-index: 21;
  min-width: min(390px, calc(100vw - 28px));
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 14px;
  color: #fffaf0;
  background: rgba(20, 39, 37, 0.96);
  box-shadow: 0 14px 40px rgba(15, 31, 28, 0.28);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.undo-bar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.undo-bar .text-button {
  flex: none;
  color: #f0d18b;
  font-size: 10px;
  font-weight: 800;
}

html[lang="ar"] body {
  font-family: Tahoma, "Segoe UI", sans-serif;
}

html[dir="rtl"] .hero h1,
html[dir="rtl"] .panel-heading h2,
html[dir="rtl"] .dialog-header h2,
html[dir="rtl"] .empty-state h3 {
  font-family: Tahoma, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] .coin-card-kicker span + span::before {
  content: "·";
}

html[dir="rtl"] .eyebrow {
  letter-spacing: 0.06em;
}

html[lang="ru"] .hero h1,
html[lang="uk"] .hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}

html[lang="hi"] .hero h1,
html[lang="th"] .hero h1 {
  font-family: "Nirmala UI", "Leelawadee UI", "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.32;
}

html[dir="rtl"] .hero-stamp {
  left: 0;
  right: auto;
}

html[dir="rtl"] .stat-glyph {
  left: 18px;
  right: auto;
}

html[dir="rtl"] .search-field svg {
  order: 0;
}

html[dir="rtl"] .dialog-footer-right {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 1120px) {
  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

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

@media (max-width: 840px) {
  .topbar,
  .page,
  .footer {
    width: min(100% - 32px, 720px);
  }

  .topbar {
    min-height: 0;
    padding: 13px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .top-actions {
    gap: 5px;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .preference-controls {
    padding-right: 0;
  }

  .preference-select {
    height: 36px;
    padding: 0 7px;
  }

  .preference-select svg,
  .currency-symbol {
    display: none;
  }

  .preference-select select {
    max-width: 80px;
  }

  .language-trigger {
    min-width: 92px;
    max-width: 112px;
  }

  .top-actions .button {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 44px 0 38px;
  }

  .hero-art {
    min-height: 250px;
  }

  .hero-coin {
    width: 190px;
  }

  .hero-stamp {
    right: 15%;
    bottom: 0;
  }

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

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

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

  .search-field {
    grid-column: 1 / -1;
  }

  .photo-section {
    grid-template-columns: 1fr;
  }

  .share-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: none;
  }

  .share-preview-frame {
    flex: none;
    max-width: 245px;
  }

  .share-options {
    flex: none;
  }

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

  .history-layout {
    grid-template-columns: 1fr;
  }

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

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

  .insights-body {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .topbar,
  .page,
  .footer {
    width: calc(100% - 24px);
  }

  .topbar {
    min-height: 76px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .coin-status-badge {
    top: 10px;
    right: 10px;
    min-width: 70px;
    min-height: 30px;
    gap: 7px;
    padding: 6px 10px;
    font-size: 10px;
  }

  .coin-number-badge {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 102px);
    padding: 6px 9px;
    font-size: 9px;
  }

  html[dir="rtl"] .coin-status-badge {
    left: 10px;
    right: auto;
  }

  html[dir="rtl"] .coin-number-badge {
    left: auto;
    right: 10px;
  }

  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  body.modal-open .mobile-bottom-nav {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 14;
    left: 10px;
    right: 10px;
    bottom: max(9px, env(safe-area-inset-bottom, 0px));
    min-height: 62px;
    padding: 6px 5px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    border: 1px solid rgba(20, 39, 37, 0.13);
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 16px 42px rgba(18, 38, 33, 0.2);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    padding: 4px 2px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    border-radius: 14px;
    color: #798783;
    background: transparent;
    cursor: pointer;
  }

  .mobile-bottom-nav button span {
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-bottom-nav button small {
    overflow: hidden;
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.active {
    color: var(--green);
    background: var(--green-soft);
  }

  .mobile-bottom-nav button.mobile-add span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff4d9;
    background: var(--green);
    box-shadow: 0 8px 18px rgba(21, 61, 57, 0.24);
  }

  .toast {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }

  .undo-bar {
    bottom: calc(136px + env(safe-area-inset-bottom, 0px));
  }

  .collection-home-lead {
    padding: 18px 0 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .collection-home-lead .button {
    width: 100%;
  }

  .collection-home-lead h1 {
    font-size: 30px;
    line-height: 1.1;
  }

  .collection-home-lead p:last-child {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.55;
  }

  .onboarding-panel {
    margin-top: 12px;
    padding: 12px;
  }

  .onboarding-heading {
    align-items: center;
    gap: 10px;
  }

  .onboarding-heading .eyebrow {
    display: none;
  }

  .onboarding-heading h2 {
    font-size: 17px;
  }

  .onboarding-heading > span {
    margin-left: 0;
  }

  .onboarding-heading .text-button {
    margin-left: auto;
  }

  .onboarding-steps {
    margin-top: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .onboarding-steps button {
    min-height: 58px;
    padding: 6px 4px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    text-align: center;
  }

  .onboarding-steps strong {
    min-height: 24px;
    font-size: 8px;
    line-height: 1.3;
  }

  .onboarding-steps small {
    display: none;
  }

  .insight-entry-grid {
    margin: 12px 0 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .insight-entry-grid button {
    min-height: 64px;
    padding: 8px 3px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }

  .insight-entry-grid button > span {
    grid-row: auto;
    width: 27px;
    height: 27px;
    font-size: 14px;
  }

  .insight-entry-grid strong {
    min-height: 22px;
    align-self: start;
    font-size: 9px;
    line-height: 1.2;
  }

  .insight-entry-grid small {
    display: none;
  }

  .insights-dialog {
    width: calc(100vw - 16px);
    max-height: 94vh;
  }

  .insights-tabs {
    padding: 8px 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 20px;
  }

  .top-actions .button-primary {
    min-width: 42px;
    padding: 0 12px;
  }

  .preference-controls {
    gap: 3px;
  }

  .preference-select {
    padding: 0 6px;
  }

  .preference-select select {
    max-width: 70px;
    font-size: 10px;
  }

  .language-popover,
  html[dir="rtl"] .language-popover {
    left: 0;
    right: auto;
    width: calc(100vw - 24px);
    transform: none;
  }

  html[dir="rtl"] .language-popover {
    left: auto;
    right: 0;
  }

  .header-currency-popover,
  html[dir="rtl"] .header-currency-popover {
    position: fixed;
    top: 152px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .language-trigger {
    min-width: 82px;
    max-width: 96px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .currency-preference select {
    width: 48px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .top-actions .action-label {
    min-height: 32px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 13px;
  }

  .hero-art {
    min-height: 215px;
  }

  .hero-coin {
    width: 160px;
  }

  .hero-stamp {
    width: 86px;
    height: 86px;
    right: 6%;
  }

  html[dir="rtl"] .hero-stamp {
    left: 6%;
    right: auto;
  }

  .orbit-one {
    width: 260px;
    height: 260px;
  }

  .orbit-two {
    width: 300px;
    height: 300px;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 142px;
    padding: 17px;
  }

  .stat-card strong {
    min-height: 34px;
    margin-top: 10px;
    font-size: 25px;
  }

  .collection-panel {
    padding: 18px;
    border-radius: 22px;
  }

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

  .search-field {
    grid-column: auto;
  }

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

  .dealer-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .set-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .set-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .set-count {
    grid-column: 2;
    grid-row: 1;
  }

  .set-row-actions {
    grid-column: 3;
    grid-row: 1;
  }

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

  .wishlist-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .wishlist-thumb {
    width: 52px;
    height: 52px;
  }

  .wishlist-price {
    grid-column: 2;
    text-align: left;
  }

  .wishlist-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .trash-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .trash-thumb {
    width: 46px;
    height: 46px;
  }

  .trash-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .coin-media {
    aspect-ratio: 1.72;
  }

  .demo-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

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

  .panel-heading-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
  }

  .result-count {
    padding-top: 20px;
  }

  .batch-toolbar {
    padding: 14px;
  }

  .batch-toolbar-head,
  .batch-toolbar-main {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-toolbar .batch-exit-button,
  .batch-actions-menu,
  .batch-actions-menu > summary,
  .batch-update-fields,
  .batch-update-fields label,
  .batch-update-fields .button {
    width: 100%;
  }

  .batch-update-fields {
    display: grid;
    grid-template-columns: 1fr;
  }

  .batch-actions-popover {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: 0 10px 24px rgba(16, 49, 44, 0.12);
  }

  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .share-header,
  .share-body,
  .share-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .share-body {
    gap: 18px;
  }

  .share-preview-frame {
    max-width: 205px;
  }

  .share-footer .button {
    min-width: 0;
    flex: 1;
  }

  .smart-import-body {
    padding: 18px;
  }

  .smart-import-mapping {
    grid-template-columns: 1fr;
  }

  .value-history-panel {
    padding: 18px;
  }

  .history-summary {
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
  }

  .history-chart {
    height: 180px;
  }

  .rates-body {
    padding: 20px 18px 22px;
  }

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

  .account-body {
    padding: 20px 18px 24px;
  }

  .account-sync-actions {
    grid-template-columns: 1fr;
  }

  .ai-assistant-fab {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
  }

  .assistant-body {
    padding: 20px 18px 24px;
  }

  .assistant-context-preview {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .assistant-context-preview > div {
    min-width: 0;
    grid-column: 2;
  }

  .assistant-context-preview .text-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .celebration-shell {
    padding: 27px 20px 20px;
  }

  .celebration-actions {
    grid-template-columns: 1fr;
  }

  .celebration-dialog .celebration-primary {
    grid-column: auto;
  }

  .photo-section {
    grid-template-columns: 1fr;
  }

  .photo-slot {
    max-height: 210px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-footer-right {
    margin: 0;
  }

  .dialog-footer-right .button {
    flex: 1;
  }

  .footer {
    flex-direction: column;
    gap: 7px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body > * {
    display: none !important;
  }

  body .print-label-area {
    display: block !important;
    color: #152a27;
  }

  body .print-label-area:not(.single-label) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4mm;
    align-items: start;
  }

  .print-label {
    width: 100%;
    max-width: 90mm;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 32mm 1fr;
    gap: 7mm;
    padding: 7mm;
    border: 0.4mm solid #294943;
    border-radius: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body .print-label-area:not(.single-label) .print-label {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .print-label img {
    width: 32mm;
    height: 32mm;
    object-fit: contain;
    border: 0.3mm solid #b9a77f;
    background: #f3eee2;
  }

  .print-label h1 {
    margin: 0 0 2mm;
    font-family: Georgia, serif;
    font-size: 15pt;
  }

  .print-label p {
    margin: 1.3mm 0;
    font-size: 8.5pt;
    line-height: 1.4;
  }

  .print-label .label-number {
    margin-top: 3mm;
    color: #9b603b;
    font-size: 7pt;
    letter-spacing: 0.12em;
  }
}

/* Editorial collection layout */
body {
  background:
    radial-gradient(circle at 82% 4%, rgba(196, 157, 91, 0.18), transparent 27rem),
    radial-gradient(circle at 5% 42%, rgba(32, 97, 83, 0.1), transparent 32rem),
    linear-gradient(180deg, #f8f6f0 0%, #efede6 58%, #f5f2eb 100%);
}

.page {
  width: min(1480px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  padding-bottom: 72px;
}

.topbar {
  width: 100%;
  max-width: none;
  min-height: 82px;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid rgba(20, 39, 37, 0.1);
  background: rgba(248, 246, 240, 0.86);
  box-shadow: 0 8px 26px rgba(22, 42, 36, 0.045);
  backdrop-filter: blur(18px) saturate(125%);
}

.topbar.scrolled {
  background: rgba(248, 246, 240, 0.95);
  box-shadow: 0 14px 38px rgba(18, 39, 33, 0.09);
}

.brand-mark {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 8px 20px rgba(21, 61, 57, 0.18);
}

.top-actions,
.quick-actions,
.preference-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .button {
  min-height: 40px;
  border-radius: 999px;
}

.topbar #addCoinButton {
  display: none;
}

.quick-actions {
  padding-left: 8px;
  border-left: 1px solid rgba(20, 39, 37, 0.12);
}

.page > .collection-home-lead {
  order: 1;
}

.page > .collection-panel {
  order: 3;
}

.page > .demo-banner {
  order: 4;
}

.page > .insight-entry-grid {
  order: 2;
}

.page > .onboarding-panel {
  order: 5;
}

.page > .hero {
  order: 6;
}

.collection-home-lead {
  min-height: 292px;
  margin: 28px 0 20px;
  padding: 38px 42px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: end;
  gap: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  color: #f8f2e4;
  background:
    radial-gradient(circle at 84% 14%, rgba(222, 188, 119, 0.3), transparent 22rem),
    linear-gradient(118deg, #0c2e2b 0%, #173e38 48%, #244d43 100%);
  box-shadow:
    0 34px 80px rgba(14, 37, 32, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.collection-home-lead::before {
  content: "";
  width: 480px;
  height: 480px;
  position: absolute;
  z-index: -1;
  top: -270px;
  right: -52px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      transparent 0 29px,
      rgba(238, 212, 157, 0.15) 30px 31px,
      transparent 32px 51px
    );
  transform: rotate(-12deg);
}

.collection-home-lead::after {
  content: "CL";
  position: absolute;
  z-index: -1;
  right: 46px;
  bottom: -42px;
  color: rgba(246, 227, 185, 0.055);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 210px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.12em;
}

.lead-copy {
  min-width: 0;
}

.collection-home-lead .eyebrow {
  color: #ddc28d;
}

.collection-home-lead h1 {
  max-width: 850px;
  margin: 14px 0 0;
  color: #fffaf0;
  font-family: "STSong", "SimSun", Georgia, serif;
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.lead-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(244, 240, 228, 0.68);
  font-size: 13px;
  line-height: 1.75;
}

.lead-metrics {
  margin-top: 28px;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.lead-metrics span {
  min-width: 150px;
  padding: 0 24px;
  border-left: 1px solid rgba(239, 220, 180, 0.24);
}

.lead-metrics span:first-child {
  padding-left: 0;
  border-left: 0;
}

.lead-metrics small,
.lead-metrics strong {
  display: block;
}

.lead-metrics small {
  color: rgba(244, 240, 228, 0.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-metrics strong {
  margin-top: 7px;
  color: #ead5a5;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 27px;
  font-weight: 550;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lead-actions {
  display: grid;
  justify-items: end;
  gap: 16px;
}

.lead-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collection-home-lead .ai-assistant-fab {
  width: auto;
  min-width: 76px;
  height: 50px;
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 999px;
  color: #f0d8a0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.collection-home-lead .ai-assistant-fab span {
  font-size: 14px;
}

.collection-home-lead .ai-assistant-fab small {
  margin-top: 0;
  color: rgba(245, 234, 207, 0.72);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.lead-edition {
  color: rgba(239, 220, 180, 0.58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: right;
}

.collection-home-lead #homeAddButton {
  min-width: 158px;
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.28);
  color: #183b35;
  background: linear-gradient(135deg, #f1dfb4, #d8ba7c);
  box-shadow: 0 14px 34px rgba(8, 24, 21, 0.25);
  font-size: 12px;
}

.collection-home-lead #homeAddButton:hover {
  color: #102d28;
  background: linear-gradient(135deg, #faebc8, #e4c88c);
}

.collection-panel {
  margin: 0 0 22px;
  padding: 30px 30px 32px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 28px;
  background: rgba(255, 254, 250, 0.86);
  box-shadow:
    0 28px 70px rgba(25, 46, 39, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.panel-heading {
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(20, 39, 37, 0.1);
}

.panel-heading h2 {
  margin-top: 5px;
  color: #17342f;
  font-size: 34px;
  letter-spacing: -0.025em;
}

.panel-heading-actions {
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 999px;
  background: rgba(243, 239, 230, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.panel-heading-actions .text-button {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: #53625e;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
  transition:
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.panel-heading-actions .text-button:hover {
  color: #1f443b;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 10px rgba(24, 48, 41, 0.08);
}

.panel-heading-actions .text-button[aria-pressed="true"] {
  color: #fffaf0;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(21, 61, 57, 0.18);
}

.panel-heading-actions .text-button > span:first-child {
  color: #a8783e;
  font-family: Georgia, serif;
  font-size: 13px;
}

.panel-heading-actions .text-button[aria-pressed="true"] > span:first-child {
  color: #e9cc8c;
}

.trash-count-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #8e4b21;
  background: rgba(183, 112, 55, 0.11);
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}

.trash-button-icon {
  font-family: "Segoe UI Symbol", sans-serif !important;
}

.filters {
  padding: 12px;
  gap: 8px;
  border: 1px solid rgba(20, 39, 37, 0.09);
  border-radius: 20px;
  background: #f4f1e9;
}

.filters-toggle-row {
  margin: 0 2px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.collection-search-field {
  flex: 1 1 420px;
  max-width: 620px;
}

.filters-toggle-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.filters-toggle-meta .view-mode-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #53625e;
  background: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.filters-toggle-meta .view-mode-button > span:first-child {
  color: #a8783e;
  font-family: Georgia, serif;
  font-size: 14px;
}

.filters-toggle-meta .view-mode-button[aria-pressed="true"] {
  color: #fffaf0;
  background: var(--green);
}

.filters-toggle-meta .view-mode-button[aria-pressed="true"] > span:first-child {
  color: #e9cc8c;
}

.compact-status-field {
  width: 132px;
  min-width: 132px;
  flex: none;
  height: 42px;
  padding-inline: 13px;
}

.compact-status-field select {
  font-weight: 750;
}

.active-filter-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters-toggle-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 999px;
  color: #36574f;
  background: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 750;
}

.filters-toggle-button b {
  font-size: 11px;
  line-height: 1;
}

.filters-area[hidden] {
  display: none;
}

.advanced-management-row {
  width: fit-content;
  margin: 0 0 10px;
  margin-inline-start: auto;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  border: 1px solid rgba(20, 39, 37, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.5);
}

.advanced-management-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(20, 39, 37, 0.08);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #53625e;
  background: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 750;
}

.advanced-management-button[aria-pressed="true"] {
  color: #fffaf0;
  background: var(--green);
}

.search-field,
.select-field {
  height: 42px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(20, 39, 37, 0.055);
}

.search-field:focus-within,
.select-field:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(29, 104, 84, 0.28),
    0 5px 14px rgba(25, 60, 49, 0.07);
}

.saved-filter-row {
  margin: 12px 0 22px;
  padding: 0 2px;
}

.collection-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 18px;
}

.coin-card {
  height: auto;
  align-self: start;
  border-color: rgba(20, 39, 37, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(25, 47, 40, 0.065);
}

.coin-card.expanded {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(250px, 0.84fr) minmax(320px, 1.16fr);
  align-items: stretch;
}

.collection-panel.batch-mode .coin-card.expanded {
  grid-column: auto;
  display: flex;
}

.coin-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 121, 64, 0.28);
  box-shadow: 0 24px 52px rgba(23, 43, 37, 0.13);
}

.coin-media {
  aspect-ratio: 5 / 4;
  background: #fff;
}

.coin-media img {
  padding: 10px;
}

.coin-card:not(.expanded) .coin-media {
  aspect-ratio: var(--card-media-ratio, 5 / 4);
}

.coin-card.expanded .coin-media {
  min-height: 520px;
  height: 100%;
  aspect-ratio: auto;
}

.coin-card-body {
  padding: 20px 21px 21px;
  background: #fff;
}

.coin-card-kicker {
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.coin-tag {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
}

.coin-card h3 {
  min-height: 0;
  margin: 11px 0 7px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.coin-meta {
  min-height: 0;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.65;
}

.coin-values {
  margin-top: 18px;
  padding-top: 0;
  gap: 9px;
  border-top: 0;
}

.coin-values > div {
  min-height: 70px;
  padding: 12px 13px;
  border: 1px solid rgba(20, 39, 37, 0.08);
  border-radius: 12px;
  background: #fff;
}

.coin-values span {
  font-size: 10.5px;
  line-height: 1.35;
}

.coin-values strong {
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.15;
}

.card-actions {
  gap: 8px;
  margin-top: 17px;
}

.card-actions button {
  min-height: 42px;
  border-radius: 12px;
  color: #294b43;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.card-actions button:not(.card-full-details) {
  padding-inline: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.card-actions button:not(.card-full-details)::before {
  color: #a7773e;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 500;
}

.card-actions button[data-action="edit"]::before {
  content: "✎";
}

.card-actions button[data-action="status"]::before {
  content: "◉";
}

.card-actions button[data-action="share"]::before {
  content: "↗";
}

.card-actions button[data-action="print"]::before {
  content: "▣";
}

.card-actions .card-full-details {
  min-height: 47px;
  font-size: 12.5px;
}

.card-actions .card-full-details::after {
  content: "↗";
  margin-left: 8px;
  color: #e8c981;
}

.insight-entry-grid {
  margin: 0 0 22px;
  gap: 12px;
}

.insight-entry-grid button {
  min-height: 104px;
  padding: 18px;
  border-color: rgba(20, 39, 37, 0.1);
  border-radius: 20px;
  background: rgba(255, 254, 250, 0.82);
  box-shadow: 0 12px 32px rgba(25, 47, 40, 0.05);
}

.insight-entry-grid button > span {
  width: 42px;
  height: 42px;
  box-shadow: 0 8px 18px rgba(21, 61, 57, 0.15);
}

.insight-entry-grid strong {
  font-size: 13px;
  letter-spacing: -0.01em;
}

.insight-entry-grid small {
  font-size: 9px;
  line-height: 1.5;
}

.onboarding-panel {
  margin: 0 0 22px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 254, 250, 0.76);
  box-shadow: 0 14px 36px rgba(25, 47, 40, 0.05);
}

.demo-banner {
  margin-bottom: 22px;
  border-radius: 18px;
  box-shadow: none;
}

.empty-state {
  max-width: 560px;
  margin: 28px auto 8px;
  padding: 46px 28px;
  border: 1px solid rgba(20, 39, 37, 0.09);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0, rgba(212, 185, 129, 0.17), transparent 55%),
    rgba(248, 246, 239, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.empty-coin {
  width: 82px;
  height: 82px;
  margin-bottom: 20px;
  border-color: rgba(157, 120, 62, 0.26);
  background:
    radial-gradient(circle, rgba(221, 197, 149, 0.18), transparent 67%);
  color: #a97a3e;
  box-shadow: 0 12px 32px rgba(151, 111, 48, 0.09);
}

.empty-state h3 {
  color: #17342f;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 390px;
  margin: 10px auto 22px;
  line-height: 1.65;
}

.detail-add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-add-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}

.detail-photo-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.detail-image-list {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.detail-image-list[hidden] {
  display: none;
}

.detail-image-card {
  min-width: 0;
  padding: 8px;
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.detail-image-card img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  object-fit: contain;
  background: #eae5d8;
}

.detail-image-copy {
  min-width: 0;
}

.detail-image-copy strong,
.detail-image-copy small {
  display: block;
}

.detail-image-copy strong {
  font-size: 10px;
}

.detail-image-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-image-card > button {
  width: 24px;
  height: 24px;
  padding: 0;
  position: absolute;
  top: 5px;
  right: 5px;
  border: 1px solid rgba(166, 58, 43, 0.18);
  border-radius: 50%;
  color: #a23e2f;
  background: rgba(255, 250, 244, 0.94);
  cursor: pointer;
}

.detail-editor-dialog {
  width: min(1040px, calc(100vw - 28px));
  max-height: min(94vh, 920px);
  padding: 0;
  border: 0;
  border-radius: 27px;
  color: var(--ink);
  background: #f9f7f0;
  box-shadow: 0 38px 120px rgba(10, 29, 25, 0.38);
  overflow: hidden;
}

.detail-editor-dialog::backdrop {
  background: rgba(8, 25, 22, 0.72);
  backdrop-filter: blur(7px);
}

.detail-editor-dialog[open] {
  animation: dialogIn 220ms ease both;
}

.detail-editor-shell {
  max-height: min(94vh, 920px);
  display: flex;
  flex-direction: column;
}

.detail-editor-body {
  padding: 20px 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 15px 18px;
  overflow-y: auto;
}

.detail-side-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.detail-side-panel h3 {
  margin: 0;
  font-size: 12px;
}

.detail-side-buttons,
.detail-tool-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.detail-side-buttons button,
.detail-tool-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 999px;
  color: #53625e;
  background: rgba(255, 255, 255, 0.84);
  font-size: 9px;
  font-weight: 800;
}

.detail-side-buttons button.active,
.detail-tool-button.active {
  color: #fff9ea;
  border-color: var(--green);
  background: var(--green);
}

.detail-side-buttons button:disabled {
  opacity: 0.42;
}

.detail-editor-stage {
  min-width: 0;
  min-height: 360px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(224, 190, 118, 0.14), transparent 40%),
    linear-gradient(145deg, #173f39, #082824);
}

.detail-editor-stage canvas {
  width: 100%;
  max-height: 56vh;
  border: 1px solid rgba(241, 218, 164, 0.36);
  border-radius: 14px;
  display: block;
  object-fit: contain;
  background: #0a2521;
  touch-action: none;
}

.detail-editor-help {
  margin: 0;
  color: rgba(248, 239, 218, 0.7);
  font-size: 8px;
  line-height: 1.5;
  text-align: center;
}

.detail-editor-controls {
  min-width: 0;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 13px;
  border: 1px solid rgba(20, 39, 37, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.detail-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-tool-button {
  padding-inline: 5px;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.detail-tool-button > span:first-child {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
}

.detail-range-field {
  display: grid;
  gap: 8px;
  color: #50615d;
  font-size: 10px;
}

.detail-range-field > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-range-field strong {
  color: var(--copper);
  font-variant-numeric: tabular-nums;
}

.detail-range-field input {
  width: 100%;
  accent-color: var(--green);
}

.detail-editor-footer {
  justify-content: space-between;
}

.detail-editor-history-actions {
  display: flex;
  gap: 8px;
}

.coin-preview-details {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.coin-preview-details h4 {
  margin: 0 0 9px;
  font-family: "STSong", "SimSun", serif;
  font-size: 17px;
  font-weight: 500;
}

.coin-preview-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.coin-preview-detail-grid figure {
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.coin-preview-detail-grid img {
  width: 100%;
  max-height: 180px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  background: #eee9dd;
}

.coin-preview-detail-grid figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

@media (max-width: 780px) {
  .detail-image-list {
    grid-template-columns: 1fr;
  }

  .detail-editor-dialog {
    width: calc(100vw - 16px);
    max-height: 95vh;
    border-radius: 22px;
  }

  .detail-editor-shell {
    max-height: 95vh;
  }

  .detail-editor-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .detail-side-panel {
    flex: none;
    align-items: stretch;
    flex-direction: column;
  }

  .detail-side-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .detail-editor-stage {
    flex: none;
    min-height: 220px;
    padding: 9px;
  }

  .detail-editor-stage canvas {
    max-height: 42vh;
  }

  .detail-editor-controls {
    flex: none;
  }

  .detail-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-editor-history-actions,
  .detail-editor-footer .dialog-footer-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .coin-preview-detail-grid {
    grid-template-columns: 1fr;
  }
}

.item-dialog {
  border-radius: 30px;
  background: #fbf9f4;
  box-shadow: 0 42px 120px rgba(11, 30, 26, 0.34);
}

.item-form > .dialog-header {
  padding: 27px 30px 22px;
  border-bottom-color: rgba(20, 39, 37, 0.09);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.55), rgba(240, 234, 219, 0.72));
}

.item-form > .dialog-header h2 {
  font-size: 34px;
  letter-spacing: -0.025em;
}

.item-form > .dialog-body {
  padding: 26px 30px 30px;
}

.item-form .form-section {
  padding: 24px 0 5px;
  border-top-color: rgba(20, 39, 37, 0.09);
}

.item-form .form-section h3 {
  color: #173a34;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.item-form .field > span {
  color: #50615d;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.item-form .field input,
.item-form .field select,
.item-form .field textarea,
.item-form .form-currency-trigger {
  min-height: 44px;
  border-color: rgba(20, 39, 37, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.item-form .field input:focus,
.item-form .field select:focus,
.item-form .field textarea:focus,
.item-form .form-currency-trigger:focus {
  border-color: rgba(24, 113, 91, 0.38);
  box-shadow: 0 0 0 4px rgba(35, 125, 99, 0.07);
}

.item-form > .dialog-footer {
  padding: 17px 30px;
  border-top-color: rgba(20, 39, 37, 0.09);
  background: rgba(244, 241, 233, 0.94);
  backdrop-filter: blur(12px);
}

@media (max-width: 1280px) {
  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-panel.thumbnail-mode .collection-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-panel.thumbnail-mode .collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: auto;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .collection-home-lead {
    min-height: 260px;
    padding: 32px;
    grid-template-columns: minmax(0, 1fr) 170px;
  }

  .collection-home-lead h1 {
    font-size: clamp(38px, 7vw, 58px);
  }

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

  .filters {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 24px, 1480px);
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    position: relative;
    top: auto;
    z-index: 10;
    min-height: 64px;
    padding: 9px 0;
    flex-wrap: nowrap;
    gap: 8px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    display: none;
  }

  .top-actions {
    width: auto;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .preference-controls {
    padding: 0;
    gap: 0;
  }

  .topbar .currency-picker,
  .topbar #ratesButton,
  .topbar #importButton,
  .topbar #exportBackupButton,
  .topbar #exportCsvButton {
    display: none;
  }

  .topbar .language-trigger {
    min-width: 86px;
    max-width: 98px;
    height: 38px;
    padding-inline: 10px;
  }

  .topbar .account-button {
    width: auto;
    min-width: 54px;
    height: 38px;
    min-height: 38px;
    padding: 0 10px;
    gap: 0;
  }

  .topbar .account-button svg {
    display: none;
  }

  .topbar .account-button-label {
    font-size: 11px;
  }

  .quick-actions {
    width: auto;
    padding: 0;
    border-left: 0;
    display: flex;
    gap: 0;
  }

  .quick-actions .button {
    min-width: 0;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  .quick-actions #addCoinButton {
    min-width: 82px;
    border-radius: 999px;
  }

  .mobile-bottom-nav {
    display: none;
  }

  body {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .collection-home-lead {
    min-height: 0;
    margin: 14px 0 12px;
    padding: 26px 22px 22px;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 24px;
    border-radius: 24px;
  }

  .collection-home-lead::before {
    width: 340px;
    height: 340px;
    top: -190px;
    right: -120px;
  }

  .collection-home-lead::after {
    right: 14px;
    bottom: -24px;
    font-size: 132px;
  }

  .collection-home-lead h1 {
    margin-top: 10px;
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.06;
  }

  .lead-copy > p:not(.eyebrow) {
    margin-top: 13px;
    font-size: 11px;
  }

  .lead-metrics {
    margin-top: 22px;
  }

  .lead-metrics span {
    min-width: 0;
    flex: 1;
    padding: 0 16px;
  }

  .lead-metrics strong {
    font-size: 23px;
  }

  .lead-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .lead-edition {
    text-align: left;
  }

  .collection-home-lead #homeAddButton {
    min-width: 130px;
    min-height: 46px;
  }

  .page > .collection-panel {
    order: 2;
  }

  .collection-panel {
    padding: 18px 14px 20px;
    border-radius: 24px;
  }

  .item-form > .dialog-header {
    padding: 22px 18px 18px;
  }

  .item-form > .dialog-header h2 {
    font-size: 29px;
  }

  .item-form > .dialog-body {
    padding: 20px 18px 24px;
  }

  .item-form > .dialog-footer {
    padding: 14px 18px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .panel-heading h2 {
    font-size: 28px;
  }

  .panel-heading-actions {
    width: 100%;
    max-width: none;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 14px;
  }

  .panel-heading-actions .text-button {
    min-width: 0;
    padding-inline: 7px;
    font-size: 9px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
    border-radius: 16px;
  }

  .filters-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .collection-search-field {
    width: 100%;
    max-width: none;
    flex: none;
  }

  .filters-toggle-meta {
    justify-content: flex-start;
    gap: 6px;
  }

  .compact-status-field {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .filters-toggle-meta .view-mode-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
  }

  .filters-toggle-meta .view-mode-button #thumbnailModeLabel {
    display: none;
  }

  .filters-toggle-meta .view-mode-button > span:first-child {
    font-size: 16px;
  }

  .filters-toggle-button {
    min-height: 40px;
    padding-inline: 10px;
  }

  .advanced-management-row {
    width: 100%;
    padding: 7px;
    justify-content: stretch;
  }

  .advanced-management-button {
    flex: 1 1 0;
    justify-content: center;
    min-height: 38px;
    padding-inline: 8px;
  }

  .search-field,
  .select-field {
    height: 40px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .collection-panel.thumbnail-mode .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .coin-thumb-caption {
    padding: 8px 9px 9px;
  }

  .coin-thumb-caption strong {
    font-size: 12px;
  }

  .coin-card.expanded {
    grid-column: auto;
    display: flex;
    flex-direction: column;
  }

  .coin-card.expanded .coin-media {
    min-height: 0;
    aspect-ratio: 5 / 4;
  }

  .coin-card {
    border-radius: 18px;
  }

  .coin-media img {
    padding: 8px;
  }

  .coin-card-body {
    padding: 17px 17px 18px;
  }

  .coin-card h3 {
    font-size: 21px;
  }

  .coin-meta {
    font-size: 11px;
  }

  .coin-values > div {
    min-height: 66px;
    padding: 11px;
  }

  .coin-values strong {
    font-size: 18px;
  }

  .card-actions button {
    min-height: 44px;
    font-size: 11.5px;
  }

  .empty-state {
    margin-top: 18px;
    padding: 34px 20px;
    border-radius: 20px;
  }

  .collection-home-lead .lead-actions {
    width: 100%;
    display: block;
  }

  .collection-home-lead .lead-edition {
    display: none;
  }

  .collection-home-lead .lead-action-buttons {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .collection-home-lead #aiAssistantButton {
    display: none;
  }

  .collection-home-lead #homeAddButton {
    position: static;
    width: auto;
    min-width: 150px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
  }

  .mobile-floating-actions {
    position: fixed;
    right: 16px;
    left: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 18;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
    pointer-events: none;
  }

  html[dir="rtl"] .mobile-floating-actions {
    right: auto;
    left: 16px;
  }

  .mobile-floating-actions button {
    pointer-events: auto;
  }

  .mobile-floating-ai {
    width: 50px;
    min-width: 50px;
    height: 50px;
    padding: 0;
    border: 1px solid rgba(236, 208, 148, 0.42);
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    color: #f4dfac;
    background:
      radial-gradient(circle at 32% 24%, rgba(255, 240, 196, 0.15), transparent 43%),
      var(--green);
    box-shadow: 0 14px 34px rgba(21, 61, 57, 0.28);
  }

  .mobile-floating-ai span {
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-floating-ai small {
    margin-top: 2px;
    font-size: 6px;
    letter-spacing: 0.08em;
  }

  .mobile-floating-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  body.modal-open .mobile-floating-actions,
  body.batch-mode-active .mobile-floating-actions {
    display: none;
  }

  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .page > .insight-entry-grid {
    order: 3;
  }

  .insight-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .insight-entry-grid button {
    min-height: 96px;
    padding: 13px;
  }

  .insight-entry-grid strong {
    font-size: 12px;
  }

  .insight-entry-grid small {
    font-size: 8px;
  }

  .onboarding-panel {
    padding: 15px;
    border-radius: 18px;
  }

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

@media (max-width: 380px) {
  .brand-mark {
    display: none;
  }

  .brand strong {
    font-size: 17px;
  }

  .topbar .language-trigger {
    min-width: 80px;
    max-width: 88px;
    padding-inline: 8px;
  }

  .quick-actions #addCoinButton {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
