/* Reuse shared component tokens only inside the coin mode. */
body[data-collection-mode="coins"] {
  --ink: #51432f;
  --muted: #806e53;
  --green: #8f6e35;
  --line: #e9dfcc;
  --paper: #faf8f1;
  --coin-none: #eee6d3;
  --coin-single: #dbc18a;
  --coin-multiple: #b5914a;
  --surface: #fffdf9;
  --surface-soft: #f2ead7;
  --input: #fffcf7;
  --coin-accent-text: #80602b;
  --coin-warning: #9b654e;
  --coin-map-light: #fcfaf4;
  --coin-map-dark: #f3ecdc;
  --coin-map-border: #fffcf5;
  --coin-hover: #e4cb91;
  --coin-outline: #967439;
  --coin-button-ink: #ffffff;
  --selection-light: #f2ead7;
  --selection-line: #b5914a;
  --selection-ink: #80602b;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}
body[data-collection-mode="coins"] .button.primary {
  color: var(--coin-button-ink);
}
body[data-collection-mode="coins"] .brand-mark {
  background: #8f6e35;
}
body[data-collection-mode="coins"] .header {
  background: var(--surface);
}
body[data-collection-mode="coins"] .collection-mode-switch {
  background: var(--surface-soft);
  border-color: var(--line);
}
body[data-collection-mode="coins"] .collection-mode-switch a {
  color: var(--muted);
}
body[data-collection-mode="coins"]
  .collection-mode-switch
  a[aria-current="page"] {
  background: var(--surface);
  color: var(--coin-accent-text);
  box-shadow: 0 2px 6px #8b6b3114;
}
body[data-collection-mode="coins"] .brand-mark svg {
  stroke: #fff6df;
}
body[data-collection-mode="coins"] .collection-utility-links .text-button {
  color: var(--muted);
}
body[data-collection-mode="coins"]
  :is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline-color: #a27c32;
}
body[data-collection-mode="coins"] .nav-item {
  color: var(--muted);
}
body[data-collection-mode="coins"] .nav-item.active {
  color: var(--coin-accent-text);
}
body[data-collection-mode="coins"] .nav-item > span:not(.localized-label) {
  background: var(--surface-soft);
  color: var(--coin-accent-text);
}
body[data-collection-mode="coins"]
  :is(.stat-top, .stat-bottom > span, .subtitle) {
  color: var(--muted);
}
body[data-collection-mode="coins"] .stat-top > .icon {
  color: #9d834f;
}
body[data-collection-mode="coins"] .stat + .stat:before {
  background: var(--line);
}
body[data-collection-mode="coins"] .tiny-star {
  color: #b99c60;
}
body[data-collection-mode="coins"] .personal-tag {
  background: var(--surface-soft);
  color: var(--muted);
}
body[data-collection-mode="coins"] .live-dot {
  background: #b28c45;
}
body[data-collection-mode="coins"] .eyebrow {
  color: var(--muted);
}
body[data-collection-mode="coins"] .view-switch {
  background: var(--surface-soft);
}
body[data-collection-mode="coins"] .view-switch button {
  color: var(--muted);
}
body[data-collection-mode="coins"] .view-switch button.selected {
  background: var(--surface);
  color: var(--coin-accent-text);
}
body[data-collection-mode="coins"] .map-topline {
  color: var(--muted);
}
body[data-collection-mode="coins"] :is(.zoom-controls, .zoom-controls button) {
  background: var(--surface);
  color: var(--coin-accent-text);
}
@media (max-width: 620px) {
  body[data-collection-mode="coins"] .main-nav {
    background: var(--surface);
  }
}
.coin-main {
  max-width: 1560px;
  margin: auto;
  padding: 38px 3.4% 20px;
}
.coin-intro {
  align-items: center;
  margin: 0 0 30px;
}
.coin-intro h1 {
  font-size: 43px;
  line-height: 1.14;
  letter-spacing: -1.9px;
  max-width: 580px;
}
.coin-intro .eyebrow {
  color: var(--muted);
  margin-bottom: 16px;
}
.coin-intro .subtitle {
  font-size: 12px;
  line-height: 1.9;
  margin-top: 16px;
}
.coin-intro-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 25px;
}
.coin-intro-right .personal-tag {
  font-size: 10px;
}
.coin-intro-right .button {
  padding: 13px 20px;
}
.coin-stats {
  margin-bottom: 28px;
  grid-template-columns: repeat(4, 1fr);
}
.coin-stats .stat {
  padding: 23px 25px;
}
.coin-stats .stat-bottom strong {
  font-size: 35px;
}
.coin-stats .stat-bottom > span {
  font-size: 9px;
}
.coin-stats .stat-top {
  font-size: 10px;
}
.coin-workspace {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}
.coin-map-view {
  height: 460px;
  background: radial-gradient(ellipse at 50% 40%, var(--coin-map-light), var(--coin-map-dark));
  position: relative;
}
#coin-world-map {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.coin-map-country {
  stroke: var(--coin-map-border);
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.18s;
}
.coin-map-country:hover,
.coin-map-country:focus {
  fill: var(--coin-hover);
  outline: none;
}
.coin-map-country.is-selected {
  fill: var(--coin-hover);
}
#coin-world-map .map-country-outline {
  fill: none;
  stroke: var(--coin-outline);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
body[data-collection-mode="coins"]
  #coin-world-map
  .coin-map-country:focus-visible {
  outline: none;
}
.coin-map-graticule {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.4;
  opacity: 0.5;
  pointer-events: none;
}
.coin-map-description {
  position: absolute;
  left: 20px;
  bottom: 12px;
  font-size: 9px;
  max-width: 65%;
  color: var(--muted);
  pointer-events: none;
  line-height: 1.6;
}
.coin-zoom {
  position: absolute;
  right: 17px;
  bottom: 18px;
}
.coin-legend {
  justify-content: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  padding: 16px 20px;
}
.coin-legend > span {
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.coin-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
}
.coin-dot.pale {
  background: var(--coin-none);
}
.coin-dot.medium {
  background: var(--coin-single);
}
.coin-dot.dark {
  background: var(--coin-multiple);
}
.coin-country-panel {
  min-height: 570px;
  overflow: hidden;
}
.coin-welcome-art {
  height: 230px;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, var(--surface-soft), var(--paper));
  overflow: hidden;
}
.coin-welcome-art:before,
.coin-welcome-art:after {
  content: "";
  position: absolute;
  width: 265px;
  height: 265px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.coin-welcome-art:after {
  width: 210px;
  height: 210px;
}
.coin-medallion {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px double #b3a878;
  background: linear-gradient(135deg, #e7dcb0, #cfbf87 55%, #e8dcb1);
  color: #9a8651;
  box-shadow:
    5px 10px 24px #7a693929,
    inset 0 0 0 5px #d3c593;
  position: relative;
  z-index: 1;
  transform: rotate(-14deg);
}
.coin-medallion:before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #b9a76b;
  border-radius: 50%;
}
.coin-medallion .icon {
  width: 70px;
  height: 70px;
  stroke-width: 0.65;
}
.coin-medallion.back {
  position: absolute;
  transform: translate(-45px, 12px) rotate(-25deg);
  background: linear-gradient(135deg, #c4b17d, #e7dabb);
  border-color: #b29a64;
  box-shadow: none;
  color: #8e7544;
}
.coin-medallion.front {
  transform: translate(22px, -4px) rotate(13deg);
}
.coin-art-star {
  position: absolute;
  right: 32px;
  top: 30px;
  font-size: 28px;
  color: #c1aa70;
}
.coin-welcome-body {
  padding: 26px 24px;
}
.coin-welcome-body .eyebrow {
  font-size: 8px;
  color: var(--coin-accent-text);
  letter-spacing: 1.7px;
}
.coin-welcome-body h2 {
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.8px;
  margin: 12px 0;
}
.coin-welcome-body p:not(.eyebrow) {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.coin-welcome-body .button {
  width: 100%;
  margin-top: 12px;
  font-size: 11px;
}
.coin-welcome-body .coin-footnote {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.coin-footnote {
  font-size: 9px;
  line-height: 1.8;
  color: var(--muted);
}
.coin-country-title {
  padding: 23px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.coin-country-title .coin-country-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.coin-country-title .coin-country-top > span {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
.coin-country-title h2 {
  font-size: 25px;
  margin: 0 0 9px;
  letter-spacing: -0.8px;
}
.coin-country-title p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.coin-country-body {
  padding: 20px;
}
.coin-country-body > .button {
  width: 100%;
  margin-top: 15px;
  font-size: 10px;
}
.coin-mini-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  background: none;
}
.coin-mini-card .coin-round-icon {
  width: 35px;
  height: 35px;
}
.coin-mini-card strong {
  font-size: 11px;
  display: block;
  line-height: 1.5;
}
.coin-mini-card small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.coin-round-icon {
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.coin-round-icon .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1;
}
.coin-country-list {
  height: 460px;
  overflow: auto;
  padding: 8px 18px;
}
.coin-country-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  width: 100%;
  background: none;
  padding: 14px 7px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.coin-country-row:hover {
  background: var(--surface-soft);
}
.coin-country-row small {
  font-size: 9px;
  color: var(--muted);
}
.coin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 5px 0 25px;
}
.coin-section-heading h2 {
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -1.1px;
  line-height: 1.3;
  margin: 8px 0 11px;
}
.coin-section-heading h2 span {
  color: #c1a567;
}
.coin-section-heading p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}
.coin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  background: var(--surface);
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.coin-search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  color: var(--muted);
}
.coin-search input {
  width: 100%;
  min-width: 0;
  outline: none;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 11px;
  color: var(--ink);
}
/* The shared dark-theme input rule must not paint a second box inside search. */
:root[data-theme] body[data-collection-mode="coins"] .coin-search input[type="search"] {
  background: transparent;
  border: 0;
  padding: 8px 0;
  margin: 0;
  line-height: 1.5;
}
.coin-search > .icon { flex: 0 0 16px; width: 16px; height: 16px; }
.coin-toolbar select {
  border: 1px solid var(--line);
  background: var(--input);
  color: #806a49;
  padding: 9px;
  border-radius: 7px;
  font-size: 10px;
  max-width: 205px;
}
/* Custom choice wrappers must leave room for the collection search field. */
.coin-toolbar > .choice-control {
  flex: 0 1 205px;
  max-width: 205px;
}
.coin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.coin-list[hidden], .coin-collection-map[hidden] { display: none; }
.coin-collection-view-switch { display: inline-flex; margin-bottom: 16px; }
.coin-catalog-design { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.coin-reference-note { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.coin-reference-note p { margin: 6px 0; }
#coin-catalog-manual { margin-bottom: 16px; }
.coin-collection-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--surface);
}
.coin-collection-map-canvas { position: relative; min-width: 0; }
.coin-collection-map-canvas > svg { display: block; width: 100%; min-height: 320px; height: 100%; }
.coin-collection-map-canvas .coin-map-description { position: absolute; top: 14px; left: 18px; margin: 0; pointer-events: none; }
.coin-collection-map .map-country-outline { fill: none; stroke: var(--coin-outline); stroke-width: 1.8px; vector-effect: non-scaling-stroke; }
.coin-collection-map-sidebar { padding: 20px; border-left: 1px solid var(--line); min-height: 0; }
.coin-collection-map-sidebar h3 { margin: 0 0 10px; font-size: 16px; }
.coin-collection-map-sidebar p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.coin-collection-map-sidebar [data-selection] .button { width: 100%; margin-bottom: 10px; }
.coin-collection-map-countries { overflow: auto; max-height: 310px; }
.coin-collection-map .coin-country-row { width: 100%; text-align: left; }
.coin-collection-map .coin-country-row.selected { background: var(--surface-soft); color: var(--coin-accent-text); }
.coin-collection-map-legend { display: flex; gap: 18px; position: absolute; bottom: 16px; left: 18px; font-size: 11px; color: var(--muted); pointer-events: none; }
.coin-collection-map-legend > span { display: flex; align-items: center; gap: 7px; }
@media (max-width: 780px) {
  .coin-collection-map { grid-template-columns: minmax(0, 1fr); }
  .coin-collection-map-sidebar { border-left: 0; border-top: 1px solid var(--line); }
  .coin-collection-map-countries { max-height: 200px; }
  .coin-collection-map-canvas > svg { min-height: 260px; height: auto; }
  .coin-collection-map-legend { bottom: 8px; font-size: 10px; }
}
.coin-issue-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 15px;
  overflow: hidden;
  align-self: start;
}
.coin-issue-top {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(125deg, var(--coin-map-light), var(--surface-soft));
}
.coin-issue-top h3 {
  font-size: 15px;
  margin: 0 0 6px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  letter-spacing: -0.3px;
}
.coin-issue-top p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}
.coin-issue-meta {
  padding: 12px 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  line-height: 1.5;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--coin-accent-text);
}
.coin-badge.brass {
  background: var(--surface-soft);
  color: var(--muted);
}
.coin-badge.demo {
  background: var(--surface-soft);
  color: var(--muted);
}
.coin-specimen-list {
  padding: 0 20px;
}
.coin-specimen {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.coin-specimen-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.coin-specimen-top strong {
  font-size: 10px;
  line-height: 1.6;
}
.coin-specimen-top small {
  font-size: 9px;
  color: var(--muted);
}
.coin-specimen .coin-note {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 180px;
  overflow: auto;
}
.coin-specimen-story {
  margin-top: 10px;
}
.coin-specimen-story > summary {
  font-size: 10px;
  color: var(--coin-accent-text);
  cursor: pointer;
  line-height: 1.8;
}
.coin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.coin-actions button,
.coin-actions a {
  font-size: 11px;
  color: var(--coin-accent-text);
  background: none;
  padding: 7px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.coin-actions button[data-delete] {
  color: var(--muted);
}
.coin-error-chip {
  display: inline-block;
  font-size: 9px;
  color: #9d8652;
  line-height: 1.6;
  margin-top: 8px;
}
.coin-issue-card > details > summary {
  padding: 0 20px 15px;
  font-size: 10px;
  color: var(--coin-accent-text);
  cursor: pointer;
}
.coin-issue-bottom {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
}
.coin-issue-bottom button {
  background: none;
  color: var(--coin-accent-text);
  font-size: 10px;
}
.coin-photos {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  overflow: auto;
}
.coin-photos img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: zoom-in;
}
.coin-empty {
  grid-column: 1/-1;
  min-height: 230px;
  border: 1px dashed var(--line);
  background: var(--input);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 30px;
  color: var(--muted);
}
.coin-empty h3 {
  font-size: 21px;
  letter-spacing: -0.7px;
  color: var(--coin-accent-text);
  margin: 4px 0;
}
.coin-empty p {
  font-size: 11px;
  line-height: 1.9;
  max-width: 360px;
  margin: 0;
}
.coin-empty .button {
  margin-top: 12px;
}
.coin-goal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.coin-goal-card {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  min-width: 0;
}
.coin-goal-card h3 {
  font-size: 21px;
  letter-spacing: -0.7px;
  line-height: 1.4;
  margin: 13px 0 10px;
  overflow-wrap: anywhere;
}
.coin-goal-card > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.coin-goal-progress-label {
  display: flex;
  justify-content: space-between;
  margin: 22px 0 9px;
  font-size: 10px;
  color: var(--muted);
}
.coin-goal-progress {
  height: 5px;
  background: var(--surface-soft);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 20px;
}
.coin-goal-progress span {
  height: 100%;
  display: block;
  background: #b18f4b;
  border-radius: 5px;
}
.coin-goal-slots {
  list-style: none;
  padding: 0;
  margin: 0;
}
.coin-goal-slots li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  line-height: 1.7;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.coin-goal-slots li small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.coin-goal-slots li strong {
  white-space: nowrap;
  color: var(--muted);
}
.coin-goal-slots li.complete strong {
  color: var(--coin-accent-text);
}
.coin-catalog-banner {
  padding: 28px 30px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}
.coin-catalog-banner > div {
  display: flex;
  align-items: center;
  gap: 25px;
}
.coin-catalog-symbol {
  font-size: 48px;
  color: #c1a567;
}
.coin-catalog-banner h3 {
  font-size: 19px;
  letter-spacing: -0.6px;
  margin: 8px 0;
}
.coin-catalog-banner p:not(.eyebrow) {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.coin-catalog-banner .eyebrow {
  font-size: 8px;
  color: var(--coin-accent-text);
}
.coin-catalog-banner .button {
  font-size: 10px;
  white-space: nowrap;
  background: var(--surface);
}
.coin-load-error {
  border: 1px solid #d2a489;
  padding: 17px;
  background: var(--surface-soft);
  border-radius: 10px;
  margin-bottom: 22px;
  color: var(--coin-warning);
  font-size: 12px;
  line-height: 1.8;
}
.coin-load-error button {
  margin-left: 12px;
  text-decoration: underline;
  background: none;
}
.coin-editor {
  width: 760px;
  padding: 28px;
}
.coin-editor h2,
.coin-goal-editor h2,
.coin-catalog-dialog h2 {
  font-size: 25px;
}
.coin-editor form,
.coin-goal-editor form {
  min-width: 0;
}
.coin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.coin-field {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
  min-width: 0;
}
.coin-field input,
.coin-field select,
.coin-field textarea {
  display: block;
  width: 100%;
  padding: 10px 11px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink);
  margin-top: 6px;
  min-width: 0;
}
.coin-field textarea {
  resize: vertical;
  min-height: 75px;
}
.coin-field small {
  display: block;
  font-size: 9px;
  line-height: 1.8;
  margin-top: 6px;
  color: var(--muted);
}
.coin-field.wide {
  grid-column: 1/-1;
}
.coin-date-inputs {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}
.coin-form-details {
  border-top: 1px solid var(--line);
  margin: 8px 0 17px;
  padding-top: 15px;
}
.coin-form-details > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--coin-accent-text);
  line-height: 1.6;
}
.coin-form-note {
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 18px;
}
.coin-error-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  margin: 12px 0;
}
.coin-error-row .coin-form-grid {
  gap: 0 10px;
}
.coin-error-row .coin-field {
  margin-bottom: 10px;
}
.coin-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--muted);
}
.coin-checkbox input {
  accent-color: var(--green);
}
.coin-axis-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px;
  background: var(--surface-soft);
  border-radius: 10px;
  margin: 0 0 18px;
  min-height: 86px;
}
.coin-axis-dial {
  height: 53px;
  width: 53px;
  border: 2px double #bcaa76;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ab955a;
  font-size: 25px;
  flex-shrink: 0;
  background: var(--surface-soft);
  position: relative;
}
.coin-axis-preview p {
  margin: 0;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.coin-photo-editor {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}
.coin-photo-editor figure {
  margin: 0;
  width: 100px;
}
.coin-photo-editor img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.coin-photo-editor button {
  background: none;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.coin-form-status {
  font-size: 11px;
  line-height: 1.8;
  margin: 13px 0;
  color: var(--coin-warning);
  white-space: pre-wrap;
}
.coin-form-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: -28px;
  background: var(--surface);
  margin-bottom: -4px;
  padding-bottom: 5px;
  z-index: 2;
}
.coin-goal-editor {
  width: 850px;
}
.coin-goal-slot-editor {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  margin: 14px 0;
  background: var(--surface);
}
.coin-goal-slot-editor > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
  font-size: 11px;
  color: var(--muted);
}
.coin-goal-slot-editor > header button {
  background: none;
  font-size: 10px;
  color: var(--muted);
}
.coin-catalog-dialog {
  width: 760px;
}
.coin-catalog-note {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.coin-catalog-dialog > .coin-search {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 9px;
  margin: 20px 0;
}
.coin-catalog-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.coin-catalog-result > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.coin-catalog-result h3 {
  font-size: 13px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.coin-catalog-result p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
.coin-catalog-result a {
  font-size: 9px;
  color: var(--coin-accent-text);
  text-decoration: underline;
}
.coin-catalog-result .button {
  font-size: 10px;
  padding: 8px 12px;
  min-height: 36px;
  flex-shrink: 0;
}
@media (min-width: 1600px) {
  .coin-map-view,
  .coin-country-list {
    height: 520px;
  }
  .coin-country-panel {
    min-height: 630px;
  }
}
@media (max-width: 1100px) {
  .coin-workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
  }
  .coin-intro h1 {
    font-size: 38px;
  }
  .coin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .coin-stats .stat {
    padding: 19px 15px;
  }
  .coin-stats .stat-bottom {
    flex-wrap: wrap;
    gap: 5px;
  }
  .coin-stats .stat-bottom > span {
    flex-basis: 100%;
  }
  .coin-stats .stat-bottom strong {
    font-size: 31px;
  }
  .coin-welcome-body {
    padding: 22px;
  }
  .coin-welcome-body h2 {
    font-size: 21px;
  }
}
@media (max-width: 850px) {
  .coin-workspace {
    grid-template-columns: 1fr;
  }
  .coin-country-panel {
    min-height: auto;
  }
  .coin-country-panel:has(.coin-welcome-art) {
    display: grid;
    grid-template-columns: 220px 1fr;
  }
  .coin-welcome-art {
    height: 100%;
    min-height: 220px;
  }
  .coin-country-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
  }
  .coin-country-body > * {
    flex: 1 1 45%;
  }
  .coin-country-title {
    padding: 20px;
  }
  .coin-goal-list {
    grid-template-columns: 1fr;
  }
  .coin-catalog-banner {
    padding: 23px;
    align-items: flex-start;
  }
  .coin-catalog-symbol {
    display: none;
  }
  .coin-catalog-banner h3 {
    font-size: 17px;
  }
  .coin-catalog-banner .button {
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 620px) {
  .coin-main {
    padding: 27px 5% 80px;
  }
  .coin-intro {
    display: block;
    margin-bottom: 24px;
  }
  .coin-intro h1 {
    font-size: 34px;
    letter-spacing: -1.3px;
    max-width: none;
  }
  .coin-intro .subtitle {
    font-size: 10px;
  }
  .coin-intro-right {
    margin-top: 20px;
    align-items: flex-start;
    gap: 0;
  }
  .coin-intro-right .personal-tag {
    display: none;
  }
  .coin-intro-right .button {
    font-size: 11px;
    padding: 10px 17px;
    min-height: 40px;
  }
  .coin-stats {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 23px;
  }
  .coin-stats .stat {
    padding: 16px;
  }
  .coin-stats .stat-top {
    font-size: 9px;
  }
  .coin-stats .stat-bottom strong {
    font-size: 28px;
  }
  .coin-stats .stat:nth-child(3),
  .coin-stats .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .coin-stats .stat:nth-child(3):before {
    display: none;
  }
  .coin-stats .stat-top > .icon {
    display: block;
    width: 15px;
    height: 15px;
  }
  .coin-map-view,
  .coin-country-list {
    height: 340px;
  }
  .coin-map-description {
    font-size: 8px;
    left: 13px;
    max-width: 58%;
    bottom: 10px;
  }
  .coin-legend {
    gap: 12px;
    padding: 14px;
  }
  .coin-legend > span {
    font-size: 8px;
  }
  .coin-country-panel:has(.coin-welcome-art) {
    display: block;
  }
  .coin-welcome-art {
    display: none;
  }
  .coin-welcome-body {
    padding: 23px;
  }
  .coin-welcome-body h2 {
    font-size: 23px;
  }
  .coin-welcome-body .coin-footnote {
    margin-top: 15px;
  }
  .coin-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .coin-section-heading h2 {
    font-size: 26px;
  }
  .coin-toolbar {
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  .coin-toolbar > .coin-search {
    flex-basis: 100%;
  }
  .coin-toolbar > select {
    flex: 1;
    max-width: none;
    min-width: 0;
    font-size: 9px;
  }
  .coin-toolbar > .choice-control {
    flex: 1 1 calc(50% - 5px);
    max-width: none;
  }
  .coin-list {
    grid-template-columns: 1fr;
  }
  .coin-issue-top {
    padding: 17px;
  }
  .coin-goal-card {
    padding: 21px;
  }
  .coin-goal-card h3 {
    font-size: 20px;
  }
  .coin-catalog-banner {
    margin-top: 25px;
    display: block;
    padding: 22px;
  }
  .coin-catalog-banner .button {
    margin-top: 17px;
    min-height: 37px;
  }
  .coin-catalog-banner h3 {
    font-size: 18px;
    line-height: 1.5;
  }
  .coin-main footer {
    display: block;
  }
  .coin-main footer .coin-footnote {
    display: block;
    margin-top: 10px;
  }
  .coin-editor,
  .coin-goal-editor,
  .coin-catalog-dialog {
    padding: 21px;
    max-height: 92dvh;
    max-width: calc(100vw - 20px);
  }
  .coin-editor h2,
  .coin-goal-editor h2,
  .coin-catalog-dialog h2 {
    font-size: 22px;
  }
  .coin-form-grid {
    grid-template-columns: 1fr;
  }
  .coin-date-inputs {
    grid-template-columns: 1fr 100px;
  }
  .coin-form-footer {
    bottom: -21px;
    flex-wrap: wrap;
  }
  .coin-form-footer .button {
    flex: 1;
    padding: 10px 13px;
    font-size: 11px;
  }
  .coin-field {
    font-size: 10px;
  }
  .coin-catalog-result {
    gap: 10px;
  }
  .coin-catalog-result > .coin-round-icon {
    display: none;
  }
  .coin-catalog-result h3 {
    font-size: 12px;
  }
  .coin-catalog-result .button {
    font-size: 9px;
    padding: 8px;
  }
  .coin-photo-editor figure {
    width: 80px;
  }
  .coin-photo-editor img {
    width: 80px;
    height: 80px;
  }
  .coin-zoom {
    right: 12px;
    bottom: 16px;
  }
}
/* Gold accents stay warm in both modes; all surfaces follow the shared preference. */
:root[data-theme="dark"] body[data-collection-mode="coins"] {
  --selection-light: #514735; --selection-line: #bd9b58; --selection-ink: #f5ebd6;
  --ink: #f5ebd6; --muted: #c4b69b; --green: #d6b372; --line: #514735;
  --paper: #201d17; --surface: #2b271f; --surface-soft: #353023; --input: #26221b;
  --coin-accent-text: #e0bd79; --coin-warning: #e4aa89; --coin-button-ink: #211a10;
  --coin-none: #39372d; --coin-single: #826e45; --coin-multiple: #bd9b58;
  --coin-map-light: #29271f; --coin-map-dark: #211f19; --coin-map-border: #514c3c;
  --coin-hover: #a4874f; --coin-outline: #f0d39a;
}
:root[data-theme="dark"] body[data-collection-mode="coins"] :is(.dialog,.dialog-header,.coin-form-footer,.atlas-panel,.details-panel,.stats,.coin-country-list,.atlas-toolbar,.legend) {
  background: var(--surface); color: var(--ink); border-color: var(--line);
}
:root[data-theme="dark"] body[data-collection-mode="coins"] :is(.toast,.coin-load-error) { background: var(--surface-soft); color: var(--ink); }
:root[data-theme="dark"] body[data-collection-mode="coins"] .button.secondary { background: var(--surface-soft); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] body[data-collection-mode="coins"] :is(.coin-form-details,.coin-field input,.coin-field select,.coin-field textarea) { border-color: var(--line); }
:root[data-theme="dark"] body[data-collection-mode="coins"] #account-content .personal-tag { background: var(--surface-soft); color: var(--coin-accent-text); }
:root[data-theme="dark"] body[data-collection-mode="coins"] .nav-item.active { color: var(--coin-accent-text); border-color: var(--green); }
:root[data-theme="dark"] body[data-collection-mode="coins"] .eyebrow { color: var(--muted); }
:root[data-theme="dark"] body[data-collection-mode="coins"] .view-switch button.selected { background: var(--surface-soft); color: var(--coin-accent-text); }
:root[data-theme="dark"] body[data-collection-mode="coins"] :is(.view-switch, .zoom-controls, .zoom-controls button) { background: var(--surface); color: var(--coin-accent-text); border-color: var(--line); }
:root[data-theme="dark"] body[data-collection-mode="coins"] .map-topline { color: var(--muted); }
body[data-collection-mode="coins"] .theme-toggle { background: var(--surface); border-color: var(--line); color: var(--coin-accent-text); }
/* Keep the map ocean on the coin page's warm canvas, above shared atlas theme rules. */
:root[data-theme] body[data-collection-mode="coins"] .coin-map-view {
  background: radial-gradient(ellipse at 50% 40%, var(--coin-map-light), var(--paper));
}

.coin-country-status-picker { display:grid; gap:8px; margin-bottom:22px; }
.coin-country-status-picker > span { font-size:11px; color:var(--ink); font-weight:600; }
.coin-country-status-picker select { width:100%; background:var(--input); color:var(--ink); border:1px solid var(--line); border-radius:9px; padding:11px; font-size:11px; }
.coin-country-status-picker small { font-size:10px; color:var(--muted); line-height:1.7; }
body[data-collection-mode=coins] { --coin-excluded:#d2b9a0; }
:root[data-theme=dark] body[data-collection-mode=coins] { --coin-excluded:#6d5946; }

.coin-publish { display:flex; align-items:start; gap:12px; margin:20px 0; padding:16px; background:var(--surface-soft); border:1px solid var(--line); border-radius:12px; font-size:12px; line-height:1.7; }
.coin-publish input { width:17px; height:17px; flex:0 0 17px; margin-top:2px; accent-color:var(--coin-accent-text); }
.coin-publish small { display:block; color:var(--muted); margin-top:5px; }
