:root {
  --paper: #fdf8f1;
  --card: #ffffff;
  --ink: #271515;
  --muted: #76625c;
  --faint: #aa9288;
  --line: #ead7ce;
  --red: #aa171c;
  --red-deep: #841116;
  --shadow: 0 14px 34px rgba(87, 35, 23, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    ui-serif, "Noto Serif SC", "Songti SC", SimSun, Georgia, "Times New Roman",
    serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.site-watermark {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 2;
  display: block;
  max-width: calc(100vw - 140px);
  overflow: hidden;
  color: rgba(132, 17, 22, 0.46);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 680;
  line-height: 1;
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.language-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  color: rgba(132, 17, 22, 0.58);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(234, 215, 206, 0.56);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(87, 35, 23, 0.06);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1;
  opacity: 0.72;
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(170, 23, 28, 0.24);
  outline: none;
  transform: translateY(-1px);
}

html[data-lang="zh"] [data-lang-zh],
html[data-lang="en"] [data-lang-en] {
  color: var(--red-deep);
}

.background-danmaku {
  position: fixed;
  inset: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.52;
}

.background-danmaku::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(253, 248, 241, 0.28) 44%, rgba(255, 255, 255, 0.52)),
    var(--paper);
}

.danmaku-line {
  position: absolute;
  display: inline-block;
  left: 100%;
  max-width: min(32em, 72vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(132, 17, 22, 0.68);
  font-size: var(--size, 1.2rem);
  font-weight: 680;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity, top;
}

.paper-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(253, 248, 241, 0.28), rgba(253, 248, 241, 0.58));
}

.hero {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 70vh;
  padding: 82px 18px 72px;
  text-align: center;
}

.total-receipt {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  user-select: none;
}

.currency {
  font-size: clamp(6.2rem, 4.5vw, 8.4rem);
  font-weight: 900;
  line-height: 1;
}

.total-window {
  display: inline-block;
  overflow: visible;
  padding: 0;
}

.total-number {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  color: var(--red-deep);
  font-size: clamp(13.4rem, 11.2vw, 19rem);
  font-weight: 900;
  line-height: 1;
}

.total-char {
  position: relative;
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: baseline;
}

.total-char.is-digit {
  width: 0.58em;
}

.total-char.is-mark {
  width: 0.28em;
  overflow: visible;
}

.digit-window {
  display: block;
  height: 1em;
  overflow: hidden;
}

.digit-strip {
  display: grid;
  grid-auto-rows: 1em;
  transform: translateY(0);
  will-change: transform;
}

.digit-cell {
  display: block;
  height: 1em;
  line-height: 1;
}

.total-char.is-rolling .digit-strip {
  animation: digitWheelRoll var(--roll-duration, 720ms) cubic-bezier(0.16, 0.88, 0.2, 1) both;
}

.primary-action,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  color: #fff;
  background: var(--red-deep);
  border: 1px solid var(--red-deep);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(132, 17, 22, 0.14);
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-action {
  gap: 9px;
  margin-top: clamp(108px, 15vh, 150px);
}

.primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-action:hover,
.submit-button:hover {
  transform: translateY(-2px);
  background: #701015;
  box-shadow: 0 16px 28px rgba(132, 17, 22, 0.18);
}

.upload-section,
.cards-section {
  padding-inline: clamp(16px, 5vw, 76px);
}

.upload-section {
  padding-block: 10px 34px;
  overflow: hidden;
  opacity: 1;
  transition:
    max-height 260ms ease,
    opacity 180ms ease,
    padding 260ms ease;
}

.upload-section.is-collapsed {
  max-height: 0;
  padding-block: 0;
  opacity: 0;
  pointer-events: none;
}

.upload-section:not(.is-collapsed) {
  max-height: 2200px;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 16px;
  align-items: start;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.upload-panel .field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.upload-panel input:not(.file-input),
.upload-panel textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.upload-panel input:not(.file-input) {
  min-height: 46px;
  padding: 0 11px;
}

.upload-panel textarea {
  min-height: 132px;
  padding: 11px;
  resize: vertical;
}

.upload-panel input:not(.file-input):focus,
.upload-panel textarea:focus {
  border-color: rgba(170, 23, 28, 0.48);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.file-field,
.wide-field {
  grid-column: 1;
}

.file-field {
  grid-column: 2;
  grid-row: 1 / span 5;
}

.amount-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 0.38fr);
  gap: 8px;
}

.amount-converted {
  min-height: 1.2em;
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 650;
}

.source-select,
.currency-select {
  position: relative;
}

.source-select-button,
.currency-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
  font-weight: 760;
}

.source-select-button svg,
.currency-select-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.source-select.is-open .source-select-button,
.currency-select.is-open .currency-select-button {
  border-color: rgba(170, 23, 28, 0.48);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.source-select.is-open .source-select-button svg,
.currency-select.is-open .currency-select-button svg {
  transform: rotate(180deg);
}

.source-options,
.currency-options {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 5;
  display: grid;
  gap: 4px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(234, 215, 206, 0.96);
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(87, 35, 23, 0.14);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.source-select.is-open .source-options,
.currency-select.is-open .currency-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.currency-options {
  max-height: min(390px, 58vh);
  overflow: hidden;
}

.currency-search {
  display: grid;
  gap: 5px;
  padding: 4px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 720;
}

.currency-search input {
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid rgba(234, 215, 206, 0.96);
  border-radius: 6px;
}

.currency-option-list {
  display: grid;
  gap: 4px;
  max-height: 286px;
  overflow: auto;
  padding-right: 2px;
}

.source-options button,
.currency-options button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 720;
}

.currency-empty {
  margin: 0;
  padding: 10px;
  color: var(--faint);
  font-size: 0.78rem;
}

.source-options button:hover,
.source-options button[aria-selected="true"],
.currency-options button:hover,
.currency-options button[aria-selected="true"] {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.08);
}

.upload-dropzone {
  display: grid;
  gap: 12px;
  min-height: 214px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(170, 23, 28, 0.34);
  border-radius: 8px;
}

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

.upload-pick {
  display: grid;
  min-height: 126px;
  place-items: center;
  gap: 6px;
  padding: 18px;
  color: var(--red-deep);
  text-align: center;
  background: rgba(255, 250, 246, 0.86);
  border: 1px solid rgba(234, 215, 206, 0.92);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.upload-pick:hover {
  border-color: rgba(170, 23, 28, 0.48);
  box-shadow: 0 12px 22px rgba(132, 17, 22, 0.1);
  transform: translateY(-1px);
}

.upload-pick svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.upload-pick span {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 850;
}

.upload-pick small {
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 650;
}

.receipt-preview {
  display: grid;
  gap: 9px;
}

.upload-thumb {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(234, 215, 206, 0.88);
  border-radius: 7px;
}

.upload-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  object-position: top center;
  border-radius: 5px;
}

.upload-thumb div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.upload-thumb strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.upload-thumb span {
  min-width: 0;
  overflow: hidden;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-thumb button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--muted);
  background: rgba(170, 23, 28, 0.06);
  border: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
}

.upload-thumb button:hover {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.12);
}

.add-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.08);
  border: 1px solid rgba(170, 23, 28, 0.18);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.add-image-button[hidden] {
  display: none;
}

.add-image-button:hover {
  background: rgba(170, 23, 28, 0.12);
}

.submit-button {
  grid-column: 1;
  align-self: end;
}

.form-state {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cards-section {
  width: min(2140px, 100%);
  margin: 0 auto;
  padding-block: 28px 76px;
}

.cards-toolbar {
  display: flex;
  justify-content: flex-end;
  min-height: 34px;
  margin-bottom: 18px;
}

.sort-control {
  position: relative;
  z-index: 3;
}

.sort-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  color: rgba(118, 98, 92, 0.88);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(234, 215, 206, 0.72);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(87, 35, 23, 0.05);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1;
}

.sort-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.sort-control.is-open .sort-trigger svg {
  transform: rotate(180deg);
}

.sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  min-width: 118px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(87, 35, 23, 0.13);
}

.sort-menu[hidden] {
  display: none;
}

.sort-option {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 680;
}

.sort-option:hover,
.sort-option[aria-selected="true"] {
  color: var(--red-deep);
  background: #fff0ef;
}

.receipt-masonry {
  display: grid;
  grid-template-columns: repeat(var(--masonry-columns, 1), minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.masonry-column {
  display: grid;
  gap: 28px;
  align-content: start;
}

.masonry-column:nth-child(4n + 2) {
  padding-top: 18px;
}

.masonry-column:nth-child(4n + 4) {
  padding-top: 12px;
}

.masonry-column:nth-child(5n) {
  padding-top: 28px;
}

.receipt-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 18px 18px 22px;
  overflow: visible;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(248, 238, 233, 0.96);
  border-radius: 4px;
  box-shadow:
    0 22px 54px rgba(87, 35, 23, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transform: rotate(var(--tilt, 0deg));
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.receipt-card:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow:
    0 28px 62px rgba(87, 35, 23, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.card-image {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  max-height: var(--image-limit, 620px);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.card-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--image-limit, 620px);
  object-fit: contain;
  object-position: top center;
}

.card-image::after {
  display: none;
}

.multi-count {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
  min-width: 30px;
  height: 26px;
  padding: 0 9px;
  color: #fff;
  background: rgba(39, 21, 21, 0.72);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
}

.card-meta {
  display: grid;
  gap: 14px;
  padding: 20px 4px 0;
}

.card-row,
.source-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.player-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date,
.source-row {
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.amount {
  color: var(--red);
  font-size: 2.95rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.blessing {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.source-row {
  padding-top: 8px;
  border-top: 1px solid rgba(234, 215, 206, 0.78);
}

.source-value {
  color: var(--muted);
  font-weight: 760;
}

.receipt-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
}

.receipt-dialog.is-open {
  display: grid;
  place-items: center;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 18, 14, 0.52);
  border: 0;
}

.dialog-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  background: #fffaf6;
  border: 1px solid rgba(234, 215, 206, 0.94);
  border-radius: 8px;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.28);
  outline: none;
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.detail-media {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 36px);
  min-height: min(760px, calc(100vh - 36px));
  min-width: 0;
  background: #f5eee8;
}

.detail-toolbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(234, 215, 206, 0.88);
}

.image-nav {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.image-nav:disabled {
  cursor: default;
  opacity: 0.38;
}

.image-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

#detail-image-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.detail-image-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 18px;
}

.detail-image-frame img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  border: 1px solid rgba(234, 215, 206, 0.94);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(87, 35, 23, 0.1);
}

.detail-images {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(234, 215, 206, 0.88);
}

.thumb-button {
  flex: 0 0 72px;
  height: 86px;
  padding: 3px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 6px;
}

.thumb-button.is-active {
  border-color: rgba(170, 23, 28, 0.62);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.1);
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.detail-body {
  display: grid;
  align-content: start;
  gap: 20px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 72px 26px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(253, 248, 241, 0.96)),
    #fffaf6;
  border-left: 1px solid rgba(234, 215, 206, 0.9);
}

.detail-main {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
}

.detail-amount {
  color: var(--red);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
}

.detail-blessing {
  margin: 0;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.85;
}

.detail-data {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 8px;
  overflow: hidden;
}

.detail-data dt {
  padding: 12px 16px 3px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 760;
}

.detail-data dd {
  margin: 0;
  min-width: 0;
  padding: 0 16px 12px;
  overflow-wrap: anywhere;
  color: var(--ink);
  border-bottom: 1px solid rgba(234, 215, 206, 0.58);
  font-weight: 720;
}

.detail-data dd:last-child {
  border-bottom: 0;
}

.owner-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 8px;
}

.owner-actions[hidden] {
  display: none;
}

.owner-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.08);
  border: 1px solid rgba(170, 23, 28, 0.18);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 820;
}

.owner-action:hover {
  background: rgba(170, 23, 28, 0.12);
}

.owner-action.is-danger {
  color: #fff;
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.owner-actions small {
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.5;
}

.dialog-open {
  overflow: hidden;
}

@keyframes digitWheelRoll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(var(--roll-steps) * -1em));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .currency {
    font-size: 4.8rem;
  }

  .total-number {
    font-size: 9.2rem;
  }

  .upload-panel {
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  }

  .file-field,
  .wide-field {
    grid-column: auto;
  }

  .form-state {
    grid-column: 1 / -1;
  }

  .file-field {
    grid-column: 2;
    grid-row: 1 / span 5;
  }

}

@media (max-width: 820px) {
  .hero {
    min-height: 46vh;
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .currency {
    font-size: 4rem;
  }

  .total-number {
    font-size: 6.4rem;
  }

  .primary-action {
    margin-top: 66px;
  }

  .dialog-panel {
    grid-template-columns: 1fr;
  }

  .detail-media,
  .detail-body {
    max-height: none;
  }

  .detail-media {
    min-height: auto;
  }

  .detail-image-frame {
    max-height: 62vh;
  }

  .detail-body {
    border-left: 0;
    border-top: 1px solid rgba(234, 215, 206, 0.9);
    padding-top: 28px;
  }

  .dialog-panel {
    overflow: auto;
  }
}

@media (max-width: 640px) {
  .site-watermark {
    top: 18px;
    left: 14px;
    max-width: calc(100vw - 116px);
    font-size: 0.66rem;
  }

  .hero {
    min-height: 42vh;
    padding-bottom: 42px;
  }

  .currency {
    font-size: 2.5rem;
  }

  .total-number {
    font-size: 4rem;
  }

  .primary-action {
    margin-top: 52px;
  }

  .amount-entry {
    grid-template-columns: 1fr;
  }

  .upload-section,
  .cards-section {
    padding-inline: 14px;
  }

  .upload-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .file-field,
  .wide-field,
  .form-state,
  .submit-button {
    grid-column: auto;
  }

  .file-field {
    grid-row: auto;
  }

  .dialog-panel {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .detail-toolbar {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    padding: 12px;
  }

  .image-nav {
    width: 34px;
    height: 34px;
  }

  .detail-image-frame {
    max-height: 56vh;
    padding: 12px;
  }

  .detail-body {
    padding-inline: 18px;
  }

  .detail-amount {
    font-size: 2.7rem;
  }
}
