/* 钱币列表、详情、图片、设置项通用组件。 */

body[data-mode="admin"] .coin-form-section {
  border-color: var(--admin-line);
  background: #fff;
}

body[data-mode="admin"] .coin-internal-form-section {
  border-color: #d8d0c4;
  background: #fffaf3;
}

body[data-mode="admin"] .coin-flow-form-section {
  border-color: #d7e0e6;
  background: #fbfdff;
}

body[data-mode="admin"] .coin-flow-form-section textarea,
.flow-record-modal-panel textarea {
  min-height: 92px;
  line-height: 1.55;
  resize: vertical;
}

body[data-mode="admin"] .coin-basic-form-section .add-image-card {
  margin-top: 2px;
}

.image-submit-proxy {
  display: none !important;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

body[data-mode="admin"] button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

body[data-mode="admin"] .admin-tabs button,
body[data-mode="admin"] .mode-switch button {
  min-height: 34px;
  padding: 0 12px;
}

body[data-mode="admin"] .top-actions {
  gap: 8px;
}

body[data-mode="admin"] .top-actions button {
  min-height: 34px;
}

body[data-mode="admin"] .form-actions {
  align-items: center;
  gap: 8px;
}

body[data-mode="admin"] .form-actions button,
body[data-mode="admin"] .account-actions button {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-mode="admin"] .panel-title button,
body[data-mode="admin"] .actions button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-mode="admin"] .danger {
  min-width: 54px;
}

.coin-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coin-form-head h3 {
  margin-bottom: 0;
}

.coin-delete-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
}

.coin-editor-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.coin-editor-actions #createCoinBtn {
  margin-left: 0;
}

.current-flow-entry-section {
  border-color: #d8e6e3;
  background: #f7fbfa;
}

.current-flow-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.current-flow-entry-head h4 {
  margin: 0;
}

.current-flow-entry-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.current-flow-entry-item {
  display: grid;
  gap: 4px;
  margin: 0;
  border: 1px solid #dbe8e5;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
}

.current-flow-entry-item strong {
  color: var(--admin-muted);
  font-size: 12px;
}

.current-flow-entry-item span {
  overflow-wrap: anywhere;
  color: var(--admin-ink);
  font-size: 13px;
  font-weight: 800;
}

body[data-mode="admin"] #uploadImageBtn {
  justify-self: start;
  min-width: 86px;
  min-height: 30px;
  border: 1px solid #8fbfb6;
  background: #e9f5f2;
  color: #0b5f59;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

body[data-mode="admin"] #uploadImageBtn:hover {
  background: #d9eee9;
}

body[data-mode="admin"] #createCoinBtn,
body[data-mode="admin"] #saveRecordBtn {
  min-width: 150px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
}

body[data-mode="admin"] #createCoinBtn.is-saving,
body[data-mode="admin"] #saveRecordBtn.is-saving {
  cursor: wait;
  opacity: 0.78;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 8px 18px rgba(37, 99, 83, 0.18);
}

.records-head {
  margin: 22px 0 12px;
}

.coin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.coin-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.coin-pagination-info {
  color: var(--muted);
  font-size: 13px;
}

.coin-pagination strong {
  min-width: 56px;
  text-align: center;
  color: var(--text);
  font-size: 13px;
}

.coin-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

body[data-mode="front"] .coin-card {
  overflow: hidden;
  padding-bottom: 46px;
  border-color: #ded1ba;
  background:
    radial-gradient(circle at 50% -20%, rgba(214, 177, 106, 0.16), transparent 42%),
    repeating-linear-gradient(0deg, rgba(154, 106, 36, 0.018) 0, rgba(154, 106, 36, 0.018) 1px, transparent 1px, transparent 18px),
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 10px 24px rgba(32, 33, 36, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

body[data-mode="front"] .coin-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--bronze), rgba(15, 118, 110, 0.62));
}

body[data-mode="front"] .coin-card:hover {
  border-color: #c5aa78;
  box-shadow: 0 18px 36px rgba(69, 54, 29, 0.12);
  transform: translateY(-2px);
}

body[data-mode="front"] .coin-thumb {
  border-color: #e1d2b7;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent),
    #fbf7ee;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.coin-open-target,
.coin-title-link {
  cursor: pointer;
}

.coin-open-target:focus-visible,
.coin-title-link:focus-visible {
  outline: 2px solid rgba(156, 106, 34, 0.45);
  outline-offset: 3px;
}

.coin-thumb {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

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

.coin-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
}

body[data-mode="front"] .coin-card h4 {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #24352f;
  font-weight: 800;
}

body[data-mode="front"] .coin-card h4::after {
  content: "";
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: #c6a15d;
}

.coin-card.no-thumb {
  grid-template-rows: 1fr auto;
  min-height: 112px;
}

.coin-card.no-thumb h4 {
  align-self: center;
}

.coin-card p {
  min-height: 34px;
}

.search-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.match-badge {
  justify-self: center;
  border: 1px solid #cfd6df;
  border-radius: 999px;
  background: #f6f7f9;
  color: #56616d;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.private-coin-badge {
  justify-self: center;
  align-self: center;
  color: #c21f12;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

.coin-card button {
  align-self: end;
  justify-self: center;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

body[data-mode="front"] .coin-card button {
  border: 1px solid #b7d2cb;
  background: linear-gradient(180deg, #f4fbf8, #e9f5f2);
  color: #0b5f59;
  font-weight: 800;
}

body[data-mode="front"] .coin-card button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.coin-detail {
  display: grid;
  gap: 16px;
}

.coin-detail-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  border-bottom: 1px solid #d8e2df;
  padding-bottom: 12px;
}

.detail-head-actions {
  position: absolute;
  top: 50%;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  transform: translateY(-50%);
}

.detail-head-actions .ghost-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.detail-head-actions .ghost-button.active {
  border-color: #9c6a22;
  background: #fff4dd;
  color: #6f4812;
  font-weight: 900;
}

.coin-detail h3 {
  margin: 0;
  color: #163d39;
  font-size: 26px;
  font-weight: 850;
  line-height: 1.2;
  padding: 0 220px;
  text-align: center;
}

.coin-compare-card-button {
  justify-self: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-mode="front"] .coin-card .coin-compare-card-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: auto;
  min-width: 0;
  min-height: 24px;
  padding: 0 8px;
  border-color: #d49a3d;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff4d8, #f6d69a);
  color: #854b05;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(132, 81, 12, 0.12);
}

body[data-mode="front"] .coin-card .coin-compare-card-button:hover,
body[data-mode="front"] .coin-card .coin-compare-card-button:focus-visible {
  border-color: #b8690b;
  background: #c9791a;
  color: #fff;
}

.compare-panel {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid #d9c8a8;
  border-radius: 12px;
  background: #fffdf8;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(28, 24, 18, 0.28);
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #eadcc1;
  padding-bottom: 10px;
}

.compare-head h3 {
  margin: 0;
  color: #2f261a;
  font-size: 18px;
}

.compare-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.compare-close-icon {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  align-items: start;
}

.compare-scroll-hint {
  display: none;
  margin: 0 0 8px;
  border: 1px solid #eadcc1;
  border-radius: 999px;
  background: #fff8e8;
  color: #8a5a18;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
  text-align: center;
}

.compare-scroll-arrow {
  color: #b8690b;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.compare-mobile-pager,
.compare-hint-mobile {
  display: none;
}

.compare-coin-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid #eadcc1;
  border-radius: 10px;
  background: #fffaf0;
  padding: 38px 10px 10px;
}

.compare-images {
  position: relative;
  display: grid;
  height: 300px;
  min-height: 300px;
  overflow: hidden;
  place-items: center;
}

.compare-thumb {
  display: grid;
  appearance: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4d1ab;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent),
    #fbf3e4;
  color: #9a7a45;
  font-size: 12px;
  font-weight: 800;
  padding: 6px;
  cursor: zoom-in;
}

.compare-thumb img {
  align-self: center;
  justify-self: center;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.compare-thumb-empty {
  min-height: 300px;
}

.compare-image-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 36px;
  border: 1px solid rgba(154, 106, 34, 0.32);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: #7b4f12;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(45, 35, 19, 0.14);
  transform: translateY(-50%);
}

.compare-image-prev {
  left: 8px;
}

.compare-image-next {
  right: 8px;
}

.compare-image-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  border: 1px solid rgba(154, 106, 34, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: #6a4617;
  font-size: 11px;
  font-weight: 850;
  padding: 3px 7px;
}

.compare-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 24px;
  border: 1px solid #d9c8a8;
  border-radius: 7px;
  background: #fffdf8;
  color: #8a4b2a;
  font-size: 12px;
  font-weight: 850;
}

.compare-field {
  display: grid;
  align-content: start;
  gap: 3px;
  border: 1px solid #eadcc1;
  border-radius: 7px;
  background: #fffdf8;
  padding: 7px;
  height: 62px;
  overflow: hidden;
}

.compare-field-grading_company,
.compare-field-grading_number,
.compare-field-gradings,
.compare-field-note {
  height: 88px;
}

.compare-field strong {
  color: #806036;
  font-size: 11px;
}

.compare-field span {
  display: -webkit-box;
  overflow: hidden;
  color: #2f261a;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compare-field-grading_company span,
.compare-field-grading_number span,
.compare-field-gradings span,
.compare-field-note span {
  -webkit-line-clamp: 3;
}

.compare-workbench-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
  border: 1px solid #dfd2bb;
  border-radius: 8px;
  background: #f8f5ed;
  padding: 8px 10px;
}

.compare-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  overflow: hidden;
  border: 1px solid #bba985;
  border-radius: 7px;
  background: #fffdf8;
}

.compare-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-mode-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #66553b;
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
}

.compare-mode-switch button + button {
  border-left: 1px solid #d8c7a8;
}

.compare-mode-switch button.active {
  background: #2f615b;
  color: #fff;
}

.compare-layer-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #68583f;
  font-size: 12px;
  font-weight: 800;
}

.compare-layer-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 3px;
  border: 1px solid #c9b894;
  border-radius: 7px;
  background: #fffdf8;
  padding: 3px;
}

.compare-layer-switch.layer-count-3 {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}

.compare-layer-switch.layer-count-4 {
  grid-template-columns: repeat(4, minmax(72px, 1fr));
}

.compare-layer-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #66553b;
  font-size: 11px;
  font-weight: 850;
  padding: 0 8px;
}

.compare-layer-switch button.active {
  border-color: #bba985;
  background: #fff2d6;
  color: #6f4812;
  box-shadow: 0 2px 6px rgba(78, 56, 25, 0.1);
}

.compare-range-control {
  display: inline-grid;
  grid-template-columns: auto 116px 38px;
  align-items: center;
  gap: 6px;
  color: #68583f;
  font-size: 12px;
  font-weight: 800;
}

.compare-range-control input {
  width: 116px;
  margin: 0;
  accent-color: #2f615b;
}

.compare-range-control output {
  color: #2f615b;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.compare-operation-hint {
  margin: 0 0 9px;
  color: #7d6a4b;
  font-size: 12px;
  line-height: 1.45;
}

.compare-image-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid #e4d1ab;
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(211, 194, 159, 0.12) 25%, transparent 25%, transparent 75%, rgba(211, 194, 159, 0.12) 75%),
    linear-gradient(45deg, rgba(211, 194, 159, 0.12) 25%, #fffdf8 25%, #fffdf8 75%, rgba(211, 194, 159, 0.12) 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
  cursor: grab;
  touch-action: none;
}

.compare-image-viewport:active {
  cursor: grabbing;
}

.compare-image-viewport.allow-carousel-swipe {
  touch-action: pan-x pan-y;
}

.compare-image-viewport.is-annotating,
.compare-image-viewport.is-annotating:active {
  border-color: #b83a2d;
  cursor: crosshair;
  box-shadow: inset 0 0 0 2px rgba(184, 58, 45, 0.14);
}

.compare-transform-layer {
  position: absolute;
  inset: 0;
  transform-origin: center;
  will-change: transform;
}

.compare-transform-layer > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.compare-preview-trigger {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  min-height: 26px;
  border: 1px solid rgba(95, 76, 43, 0.35);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.94);
  color: #60451e;
  font-size: 11px;
  font-weight: 850;
  padding: 0 9px;
  transform: translateX(-50%);
}

.compare-annotation-marker {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 25px;
  height: 25px;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c23a2b;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 8px rgba(80, 26, 18, 0.34);
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(var(--compare-marker-scale, 1));
  transform-origin: center;
}

.compare-annotation-marker:hover,
.compare-annotation-marker:focus-visible {
  border-color: #fff;
  background: #8f2117;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(194, 58, 43, 0.18), 0 2px 8px rgba(80, 26, 18, 0.34);
}

.compare-overlay-workbench {
  display: grid;
  gap: 10px;
}

.compare-overlay-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #493b27;
  font-size: 13px;
  font-weight: 800;
}

.compare-overlay-labels span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px;
}

.compare-overlay-labels span.active {
  border-color: #d7c49f;
  background: #fff2d6;
}

.compare-layer-swatch {
  width: 12px;
  height: 12px;
  border: 2px solid #2f615b;
  border-radius: 3px;
}

.compare-layer-swatch.layer-two {
  border-color: #c37a19;
}

.compare-layer-swatch.layer-three {
  border-color: #3b74a8;
}

.compare-layer-swatch.layer-four {
  border-color: #a04465;
}

.compare-overlay-stage {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 340px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.compare-overlay-stage.active-layer-1 {
  border-color: #75958f;
  box-shadow: inset 0 0 0 2px rgba(47, 97, 91, 0.12);
}

.compare-overlay-stage.active-layer-2 {
  border-color: #d19a50;
  box-shadow: inset 0 0 0 2px rgba(195, 122, 25, 0.12);
}

.compare-overlay-stage.active-layer-3 {
  border-color: #7098bc;
  box-shadow: inset 0 0 0 2px rgba(59, 116, 168, 0.12);
}

.compare-overlay-stage.active-layer-4 {
  border-color: #b7798f;
  box-shadow: inset 0 0 0 2px rgba(160, 68, 101, 0.12);
}

.compare-overlay-stage.is-annotating {
  border-color: #b83a2d;
  box-shadow: inset 0 0 0 2px rgba(184, 58, 45, 0.14);
}

.compare-overlay-layer-one {
  z-index: 1;
}

.compare-overlay-layer-two {
  z-index: 2;
}

.compare-overlay-layer-three {
  z-index: 3;
}

.compare-overlay-layer-four {
  z-index: 4;
}

.compare-annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.compare-annotation-layer .compare-annotation-marker {
  pointer-events: auto;
}

.compare-overlay-top-image {
  mix-blend-mode: multiply;
}

.compare-overlay-image-selectors {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-overlay-selector {
  display: inline-grid;
  grid-template-columns: auto 30px minmax(52px, auto) 30px;
  align-items: center;
  gap: 4px;
  border: 1px solid #dfd2bb;
  border-radius: 7px;
  background: #fffdf8;
  padding: 5px 7px;
}

.compare-overlay-selector strong {
  color: #6f5834;
  font-size: 11px;
}

.compare-image-nav-inline {
  display: grid;
  min-height: 27px;
  place-items: center;
  border: 1px solid #d4c09b;
  border-radius: 5px;
  background: #fff8e8;
  color: #754e17;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

.compare-overlay-selector span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.record-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
  border: 1px solid #cad8d4;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 14px 16px;
}

.detail-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #eadcc6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(154, 106, 36, 0.08), transparent 42%),
    linear-gradient(180deg, #fffdfa, #fffaf1);
  box-shadow: 0 8px 18px rgba(69, 54, 29, 0.045);
}

.detail-module-head h4 {
  margin: 0;
  color: #163d39;
  font-size: 14px;
  font-weight: 850;
}

.detail-collapse-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

body[data-mode="front"] .record-summary {
  border-color: #d9c8a8;
  background:
    linear-gradient(180deg, #fffdf8, #f8fbfa);
  box-shadow: 0 12px 28px rgba(69, 54, 29, 0.065);
}

.private-coin-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d92d20;
  border-radius: 6px;
  background: #fff0ee;
  color: #b42318;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.08);
}

.private-coin-notice strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
}

.private-coin-notice span {
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

body[data-mode="front"] .record-summary-row {
  border-color: #eadfc9;
  background: #fff;
}

.record-summary-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.record-summary-row {
  display: grid;
  gap: 5px;
  margin: 0;
  border: 1px solid #dce6e3;
  border-radius: 6px;
  background: #fff;
  color: #3f454c;
  font-size: 14px;
  line-height: 1.55;
  padding: 10px 12px;
}

body[data-mode="front"] .record-summary-meta {
  gap: 0;
  overflow: hidden;
  border: 1px solid #eadfc9;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fffdf8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-mode="front"] .record-summary-meta .record-summary-row {
  min-height: 46px;
  height: auto;
  border-width: 0 1px 1px 0;
  border-color: #efe4d0;
  border-radius: 0;
  background: transparent;
  padding: 7px 10px;
}

body[data-mode="front"] .record-summary-meta .record-summary-row strong {
  color: #72531e;
  font-size: 12px;
}

body[data-mode="front"] .record-summary-meta .record-summary-row span {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.multi-line-value {
  display: block;
  color: inherit;
  font-style: normal;
  line-height: 1.45;
}

.multi-line-value + .multi-line-value {
  margin-top: 3px;
}

.coin-description-info {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 1px solid #eadfc9;
  border-radius: 8px;
  background: #fffdf8;
  padding: 9px 11px;
}

.coin-description-info h4 {
  margin: 0;
  color: #72531e;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.coin-description-info .internal-note-inline {
  display: block;
  min-width: 0;
  flex: none;
  width: 100%;
}

.flow-history-grid .record-summary-row {
  align-content: start;
}

.record-summary-row strong {
  color: #163d39;
  font-size: 13px;
  font-weight: 800;
}

.record-summary-row span {
  min-width: 0;
}

.record-internal-info {
  display: grid;
  gap: 9px;
  border: 1px solid #e2d3b7;
  border-radius: 8px;
  background: #fffaf2;
  padding: 8px 10px;
}

.record-internal-warning {
  margin: 0;
  color: #a33a32;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.record-internal-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.internal-authenticity-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-width: 0;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
  padding: 5px 10px;
}

.internal-authenticity-row strong {
  font-size: 12px;
}

.internal-authenticity-row span {
  font-size: 14px;
  font-weight: 800;
}

.internal-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #3f454c;
  font-size: 13px;
  line-height: 1.4;
}

.internal-rating-inline > strong {
  color: #163d39;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.internal-authenticity-row.is-authentic {
  border-color: #14823f;
  background: #1f9d55;
  color: #fff;
}

body[data-mode="front"] .record-summary-row.internal-authenticity-row.is-authentic {
  border-color: #14823f;
  background: #1f9d55;
  color: #fff;
}

.internal-authenticity-row.is-fake {
  border-color: #b3261e;
  background: #d83a2e;
  color: #fff;
}

body[data-mode="front"] .record-summary-row.internal-authenticity-row.is-fake {
  border-color: #b3261e;
  background: #d83a2e;
  color: #fff;
}

.internal-authenticity-row.is-uncertain {
  border-color: #b98300;
  background: #f0b429;
  color: #352400;
}

body[data-mode="front"] .record-summary-row.internal-authenticity-row.is-uncertain {
  border-color: #b98300;
  background: #f0b429;
  color: #352400;
}

.internal-authenticity-row.is-empty,
body[data-mode="front"] .record-summary-row.internal-authenticity-row.is-empty {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.internal-note-inline {
  display: inline-flex;
  align-items: baseline;
  flex: 1 1 320px;
  gap: 8px;
  min-width: 180px;
  margin: 0;
  color: #3f454c;
  font-size: 13px;
  line-height: 1.4;
}

.internal-note-inline strong {
  flex: 0 0 auto;
  color: #163d39;
  font-size: 12px;
  font-weight: 800;
}

.internal-note-inline span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.records {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.flow-history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.flow-history h4 {
  margin: 0;
  color: #163d39;
  font-size: 14px;
  font-weight: 850;
}

.flow-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eadcc6;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #fffaf1);
}

.flow-history-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.flow-history-head-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.flow-history-body {
  display: grid;
  gap: 8px;
}

.flow-history-grid {
  margin-top: 0;
}

.flow-history-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.flow-history-summary {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 1px solid #eadcc6;
  border-radius: 8px;
  background: #fffdfa;
  overflow: hidden;
}

.flow-history-summary-cell {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  max-width: 240px;
  margin: 0;
  padding: 8px 10px;
  border-right: 1px solid #efe4d0;
  color: #3f3427;
  font-size: 12px;
  line-height: 1.35;
}

.flow-history-summary-cell:last-child {
  border-right: 0;
}

.flow-history-summary-ellipsis {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 10px 2px;
  color: #9b7b4a;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.flow-history-summary-cell strong {
  color: #80653b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.flow-history-summary-cell span {
  min-width: 0;
  overflow: hidden;
  color: #2f2a23;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-history-summary-restricted {
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fffdfa, #fff9ef);
}

.flow-history-summary-restricted .flow-history-summary-cell {
  padding: 0;
  border-right: 0;
}

.flow-history-time-cell span {
  color: #173b35;
  font-size: 13px;
}

.flow-history-restricted-tip {
  justify-self: end;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid rgba(154, 106, 36, 0.2);
  border-radius: 999px;
  background: rgba(154, 106, 36, 0.08);
  color: #8a5c1c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.flow-history-list {
  display: grid;
  gap: 8px;
}

.flow-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.flow-history-item::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: -8px;
  left: 14px;
  width: 1px;
  background: #e2d3b7;
}

.flow-history-item:last-child::before {
  display: none;
}

.flow-history-marker {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #caa86d;
  border-radius: 999px;
  background: #fff8e8;
  color: #71501d;
  font-size: 12px;
  font-weight: 850;
}

.flow-history-toggle {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
}

.flow-history-more-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-left: 40px;
  border: 1px dashed #d6bd8c;
  border-radius: 999px;
  background: #fffaf0;
  color: #8a5c1c;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.flow-history-more-dots {
  color: #b98300;
  font-size: 18px;
  font-weight: 950;
  line-height: 0.8;
}

.flow-trend-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.flow-trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.flow-trend-head strong {
  color: #173d39;
  font-size: 14px;
}

.flow-trend-head span,
.flow-trend-currency {
  color: #74807d;
  font-size: 11px;
  font-weight: 700;
}

.flow-trend-chart-card {
  min-width: 0;
  border-top: 1px solid #e1e9e6;
  padding-top: 9px;
}

.flow-trend-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 250px;
  overflow: visible;
}

.flow-chart-grid {
  stroke: #dce6e3;
  stroke-width: 1;
}

.flow-chart-line {
  fill: none;
  stroke: #2f7a70;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.flow-chart-point {
  fill: #b36a23;
  stroke: #fff;
  stroke-width: 3;
}

.flow-chart-axis,
.flow-chart-date {
  fill: #697773;
  font-family: inherit;
  font-size: 11px;
}

.record-summary-grading {
  min-height: 62px;
}

@media (max-width: 760px) {
  .flow-trend-section {
    padding: 10px 8px;
  }

  .flow-trend-chart {
    min-width: 520px;
  }

  .flow-trend-chart-card {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

body.force-mobile .flow-trend-section {
  padding: 10px 8px;
}

body.force-mobile .flow-trend-chart {
  min-width: 520px;
}

body.force-mobile .flow-trend-chart-card {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.flow-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 2px;
}

.flow-history-actions button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.permission-denied-row span {
  color: #9b6d31;
  font-weight: 800;
}

.front-home {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
  margin-top: 56px;
}

.front-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.record-card {
  display: grid;
  align-content: start;
  gap: 9px;
  border: 1px solid #d7dee5;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-mode="front"] .record-card {
  border-color: #ded1ba;
  background:
    linear-gradient(180deg, #fffdf8, #fff);
  box-shadow: 0 8px 20px rgba(69, 54, 29, 0.045);
}

.record-card:hover {
  border-color: #b8c7c2;
  box-shadow: 0 10px 24px rgba(32, 33, 36, 0.08);
}

body[data-mode="front"] .record-card:hover {
  border-color: #c5aa78;
  box-shadow: 0 14px 30px rgba(69, 54, 29, 0.09);
}

.record-image-frame {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f6f8;
}

body[data-mode="front"] .record-image-frame {
  border: 1px solid #eadfc9;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 58%),
    linear-gradient(135deg, #fbf7ee, #f4ecdc);
}

.record-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}

.record-card h4 {
  margin: 0;
  font-size: 16px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.api-key-result {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid #c9d8d4;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.api-key-result code {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #163d39;
  font-size: 13px;
  padding: 8px;
}

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

.api-key-field {
  display: grid;
  gap: 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.035);
}

.api-key-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.api-key-heading span {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.api-key-heading strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  padding: 0 9px;
}

.api-key-create {
  display: grid;
  grid-template-columns: 176px minmax(280px, 480px) auto;
  align-items: end;
  justify-content: start;
  column-gap: 10px;
  row-gap: 10px;
}

.api-key-create label,
.api-key-meta label,
.api-key-main label {
  display: grid;
  gap: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.api-key-create input,
.api-key-meta input,
.api-key-main select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--admin-ink);
  font: inherit;
  padding: 7px 9px;
}

.api-key-scope-picker .setting-switch {
  width: fit-content;
  min-width: 176px;
  min-height: 32px;
  border-color: #b7c8d7;
  background: #eef5f7;
  padding: 3px;
  box-shadow: inset 0 0 0 1px rgba(37, 94, 103, 0.08);
}

.api-key-scope-picker .setting-choice {
  min-width: 78px;
  min-height: 24px;
  border-radius: 999px;
  color: #37606a;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.api-key-scope-picker .setting-choice.active {
  border-color: #2b7a78;
  background: #2b7a78;
  color: #fff;
  box-shadow: 0 5px 12px rgba(43, 122, 120, 0.24);
}

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

.api-key-item {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.api-key-main,
.api-key-meta {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(120px, .7fr) minmax(120px, .7fr);
  align-items: end;
  gap: 10px;
}

.api-key-meta {
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
}

.api-key-meta span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.api-key-prefix {
  display: grid;
  gap: 5px;
}

.api-key-prefix span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.api-key-prefix code {
  display: block;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.api-key-row-actions button {
  min-height: 34px;
  padding: 0 12px;
}

#apiSettingsForm {
  display: grid;
  align-items: stretch;
  gap: 14px;
}

#apiSettingsForm .access-form-grid {
  flex: none;
  width: 100%;
}

.api-settings-actions {
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 1px solid #e1e7ef;
  margin-top: 0;
  padding-top: 14px;
}

.api-settings-actions .primary-action {
  min-width: 180px;
  min-height: 38px;
  font-weight: 800;
}

.record-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

.admin-panel {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}
