: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: absolute;
  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;
}

.projection-pull {
  --projection-note-height: var(--projection-note-measured-height, 166px);
  --projection-tab-tuck: 7px;
  position: absolute;
  top: calc(var(--projection-tab-tuck) * -1);
  left: 314px;
  z-index: 6;
  width: 32px;
  height: 37px;
  padding: 0;
  background: transparent;
  border: 0;
  opacity: 0.88;
  transition:
    opacity 160ms ease,
    transform 320ms cubic-bezier(0.22, 0.86, 0.2, 1),
    box-shadow 180ms ease;
}

.projection-pull::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 13px;
  height: 37px;
  background: rgba(132, 17, 22, 0.78);
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%);
  box-shadow: 0 10px 22px rgba(87, 35, 23, 0.12);
  transform: translateX(-50%);
}

.projection-pull:hover,
.projection-pull:focus-visible {
  opacity: 1;
  outline: none;
}

.projection-pull:focus-visible {
  box-shadow: none;
}

.projection-pull:focus-visible::before {
  background: rgba(132, 17, 22, 0.92);
  box-shadow:
    0 10px 22px rgba(87, 35, 23, 0.12),
    0 0 0 2px rgba(132, 17, 22, 0.12);
}

body.projection-screen-open .projection-pull {
  opacity: 1;
  transform: translateY(var(--projection-note-height));
}

.projection-pull-line {
  display: none;
}

.projection-pull-knob {
  position: absolute;
  display: none;
}

.projection-screen {
  --projection-note-height: var(--projection-note-measured-height, 166px);
  position: absolute;
  top: calc(var(--projection-note-height) * -1);
  left: 22px;
  z-index: 7;
  width: min(336px, calc(100vw - 56px));
  height: auto;
  color: var(--ink);
  pointer-events: none;
  transform-origin: top center;
  transition: transform 320ms cubic-bezier(0.22, 0.86, 0.2, 1);
}

body.projection-screen-open .projection-screen {
  z-index: 9;
  pointer-events: auto;
  transform: translateY(var(--projection-note-height));
}

.projection-screen-rod {
  display: none;
}

.projection-screen-paper {
  position: relative;
  margin: 0;
  height: auto;
  padding: 14px 18px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 245, 240, 0.72), transparent 36%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 249, 244, 0.96)),
    rgba(255, 252, 248, 0.97);
  border: 0;
  border-radius: 8px;
  box-shadow:
    0 16px 34px rgba(87, 35, 23, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

.projection-screen-paper::before {
  display: none;
}

.projection-screen-paper::after {
  display: none;
}

.projection-screen-eyebrow {
  margin: 0 0 5px;
  color: rgba(132, 17, 22, 0.66);
  font-size: 0.76rem;
  font-weight: 780;
}

.projection-screen h2 {
  margin: 0;
  color: var(--red-deep);
  font-size: 1.02rem;
  font-weight: 860;
  line-height: 1.26;
}

.projection-screen p:last-child {
  margin: 8px 0 0;
  color: rgba(65, 39, 37, 0.78);
  font-size: 0.88rem;
  line-height: 1.62;
}

.top-controls {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 8;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.bgm-control {
  --bgm-size: 28px;
  --bgm-expanded-height: 128px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--bgm-size);
  height: var(--bgm-size);
  overflow: hidden;
  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);
  opacity: 0.72;
  transition:
    height 180ms ease,
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.bgm-control:hover,
.bgm-control:focus-within {
  height: var(--bgm-expanded-height);
  opacity: 1;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(170, 23, 28, 0.24);
  transform: translateY(-1px);
}

.language-toggle,
.manual-review-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  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;
}

.bgm-toggle {
  position: relative;
  flex: 0 0 var(--bgm-size);
  width: var(--bgm-size);
  height: var(--bgm-size);
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.bgm-toggle:focus-visible {
  outline: none;
}

.language-toggle,
.manual-review-toggle {
  padding: 0 10px;
}

.manual-review-toggle {
  min-width: 44px;
}

.bgm-toggle .bgm-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translate(-50%, -50%);
}

.bgm-icon-muted {
  display: none;
}

.bgm-control.is-playing {
  color: rgba(132, 17, 22, 0.58);
}

.bgm-control.is-muted {
  color: rgba(118, 98, 92, 0.56);
}

.bgm-control.is-muted .bgm-icon-on {
  display: none;
}

.bgm-control.is-muted .bgm-icon-muted {
  display: block;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.manual-review-toggle:hover,
.manual-review-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);
}

.bgm-volume-rail {
  flex: 1 1 auto;
  width: 20px;
  height: calc(var(--bgm-expanded-height) - var(--bgm-size) - 12px);
  margin: 2px 0 10px;
  accent-color: var(--red);
  opacity: 0;
  pointer-events: none;
  writing-mode: bt-lr;
  appearance: slider-vertical;
  transition: opacity 140ms ease;
}

.bgm-control:hover .bgm-volume-rail,
.bgm-control:focus-within .bgm-volume-rail {
  opacity: 1;
  pointer-events: auto;
}

.bgm-audio {
  display: none;
}

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(24em, 68vw);
  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 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  isolation: isolate;
  min-height: 70vh;
  overflow: hidden;
  padding: 82px 18px 72px;
  text-align: center;
}

.total-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: min(100%, calc(100vw - 32px));
  max-width: 100%;
  min-width: 0;
}

.total-receipt {
  --total-scale: 1;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  max-width: min(100%, calc(100vw - 32px));
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  transform: scale(var(--total-scale, 1));
  transform-origin: center;
  user-select: none;
  white-space: nowrap;
  will-change: transform;
}

.currency {
  flex: 0 0 auto;
  font-size: clamp(6.2rem, 4.5vw, 8.4rem);
  font-weight: 900;
  line-height: 1;
}

.total-window {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.total-number {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  max-width: none;
  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;
  flex: 0 0 auto;
  height: 1em;
  overflow: hidden;
  vertical-align: baseline;
}

.total-char.is-digit {
  width: 0.72em;
}

.total-char.is-mark {
  width: 0.28em;
  overflow: visible;
}

.digit-window {
  display: block;
  width: 100%;
  height: 1em;
  overflow: hidden;
}

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

.digit-cell {
  display: block;
  width: 100%;
  height: 1em;
  line-height: 1;
  text-align: center;
}

.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 {
  position: relative;
  z-index: 2;
  gap: 9px;
  margin-top: clamp(108px, 15vh, 150px);
}

.intake-notice {
  display: none;
}

.intake-notice[hidden] {
  display: none;
}

.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);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.submit-button:disabled:hover {
  background: var(--red-deep);
  transform: none;
  box-shadow: none;
}

.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(310px, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  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-fields {
  display: grid;
  grid-column: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.upload-panel .field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.security-note {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  padding: 12px 14px;
  color: rgba(118, 98, 92, 0.9);
  background: rgba(253, 248, 241, 0.72);
  border: 1px solid rgba(234, 215, 206, 0.82);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 680;
  line-height: 1.65;
}

.upload-fields .security-note,
.upload-fields .source-note-field,
.upload-fields .amount-field,
.upload-fields .wide-field,
.upload-fields .form-state {
  grid-column: 1 / -1;
}

.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 textarea[name="blessing"] {
  min-height: 220px;
}

.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 {
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  min-width: 0;
}

.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: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(234, 215, 206, 0.94);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(87, 35, 23, 0.13);
  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;
  scrollbar-gutter: stable;
}

.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:focus-visible,
.source-options button[aria-selected="true"],
.currency-options button:hover,
.currency-options button:focus-visible,
.currency-options button[aria-selected="true"] {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.07);
  outline: none;
}

.upload-dropzone {
  display: grid;
  align-content: start;
  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;
  outline: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.file-field .upload-dropzone {
  height: 100%;
  min-height: clamp(280px, 38vh, 440px);
}

.upload-dropzone:has(.receipt-preview:empty) {
  align-content: center;
}

.upload-dropzone:focus-visible,
.upload-dropzone.is-dragging {
  background: rgba(255, 247, 243, 0.92);
  border-color: rgba(170, 23, 28, 0.58);
  box-shadow:
    0 0 0 3px rgba(170, 23, 28, 0.08),
    0 16px 34px rgba(132, 17, 22, 0.08);
}

.upload-dropzone.is-dragging .upload-pick {
  border-color: rgba(170, 23, 28, 0.58);
  box-shadow: 0 12px 22px rgba(132, 17, 22, 0.12);
  transform: translateY(-1px);
}

.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;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
  max-height: min(440px, 48vh);
  overflow: auto;
  padding-right: 2px;
}

.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);
}

.submit-button {
  grid-column: 1;
  align-self: end;
  justify-self: start;
}

.form-state {
  grid-column: 1;
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.manual-review-dialog {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: grid;
  width: auto;
  margin: 0;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  color: var(--ink);
  background: rgba(248, 241, 234, 0.52);
  backdrop-filter: blur(16px) saturate(0.86);
}

.manual-review-dialog[hidden] {
  display: none;
}

.manual-review-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  border: 0;
}

.manual-review-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(760px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(87, 35, 23, 0.18);
}

.manual-review-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: rgba(118, 98, 92, 0.82);
  background: rgba(170, 23, 28, 0.06);
  border: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  line-height: 1;
}

.manual-review-close:hover,
.manual-review-close:focus-visible {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.12);
  outline: none;
}

.manual-review-header {
  display: grid;
  gap: 7px;
  padding-right: 34px;
}

.manual-review-header p {
  margin: 0;
  color: var(--red-deep);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0;
}

.manual-review-header h2 {
  margin: 0;
  font-size: clamp(1.28rem, 3vw, 1.78rem);
  line-height: 1.16;
}

.manual-review-header span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.65;
}

.manual-review-fields {
  display: grid;
  gap: 14px;
}

.manual-review-fields .field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

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

.manual-review-fields input:not(.file-input) {
  min-height: 44px;
  padding: 0 11px;
}

.manual-review-fields textarea {
  padding: 10px 11px;
  resize: vertical;
}

.manual-review-fields input:not(.file-input):focus,
.manual-review-fields textarea:focus,
.manual-review-dropzone:focus-visible {
  border-color: rgba(170, 23, 28, 0.48);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.manual-review-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.28fr);
  gap: 10px;
}

.manual-review-amount-note,
.manual-review-state {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.55;
}

.manual-review-state[data-tone="error"] {
  color: var(--red-deep);
}

.manual-review-state[data-tone="success"] {
  color: #4e684d;
}

.manual-review-dropzone {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(170, 23, 28, 0.34);
  border-radius: 8px;
  outline: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.manual-review-dropzone.is-dragging {
  background: rgba(255, 247, 243, 0.92);
  border-color: rgba(170, 23, 28, 0.58);
  box-shadow:
    0 0 0 3px rgba(170, 23, 28, 0.08),
    0 16px 34px rgba(132, 17, 22, 0.08);
}

.manual-review-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
  max-height: min(300px, 34vh);
  overflow: auto;
  padding-right: 2px;
}

.manual-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.manual-review-submit,
.manual-review-cancel {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 780;
}

.manual-review-submit {
  color: #fff;
  background: var(--red-deep);
  border: 1px solid var(--red-deep);
}

.manual-review-cancel {
  color: rgba(132, 17, 22, 0.72);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(234, 215, 206, 0.92);
}

.manual-review-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

body.manual-review-open {
  overflow: hidden;
}

body.manual-review-open .paper-page,
body.manual-review-open .site-watermark,
body.manual-review-open .projection-pull,
body.manual-review-open .projection-screen,
body.manual-review-open .background-danmaku {
  filter: blur(2px);
}

.share-card {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  width: auto;
  margin: 0;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  color: var(--ink);
  background: rgba(248, 241, 234, 0.48);
  backdrop-filter: blur(16px) saturate(0.82);
}

.share-card-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(430px, calc(100vw - 48px));
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: shareCardRise 220ms cubic-bezier(0.16, 0.88, 0.2, 1) both;
}

.share-card-close {
  --share-close-line: 13px;
  --share-close-stroke: 2.2px;
  position: absolute;
  top: 7px;
  right: 4px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  color: rgba(118, 98, 92, 0.78);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0;
  line-height: 0;
  box-shadow: none;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.share-card-close::before,
.share-card-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--share-close-line);
  height: var(--share-close-stroke);
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.share-card-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.share-card-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.share-card-close:hover {
  color: rgba(132, 17, 22, 0.76);
  transform: translateY(-1px);
}

.share-card-close:focus-visible {
  outline: 2px solid rgba(170, 23, 28, 0.28);
  outline-offset: 3px;
}

.share-card-art {
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 420px;
  padding: 34px 32px 30px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 248, 241, 0.96)),
    #fffaf6;
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 6px;
  box-shadow:
    0 22px 54px rgba(87, 35, 23, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.share-card[hidden] {
  display: none;
}

.share-card-title {
  margin: 0;
  padding-right: 42px;
  color: rgba(118, 98, 92, 0.78);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.5;
}

.share-card-message {
  align-self: center;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 3vw, 1.52rem);
  font-weight: 760;
  line-height: 1.78;
  text-wrap: pretty;
}

.share-card-domain {
  align-self: end;
  justify-self: end;
  width: max-content;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
}

.share-card-domain:hover {
  color: var(--red-deep);
}

.share-card-hint {
  max-width: 34em;
  margin: 0;
  color: rgba(118, 98, 92, 0.86);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1.6;
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.share-card-action {
  min-height: 36px;
  padding: 0 14px;
  color: rgba(132, 17, 22, 0.9);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(234, 215, 206, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(87, 35, 23, 0.07);
  font-size: 0.82rem;
  font-weight: 760;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.share-card-action.is-primary {
  color: #fff;
  background: var(--red-deep);
  border-color: var(--red-deep);
  box-shadow: 0 12px 24px rgba(132, 17, 22, 0.16);
}

.share-card-action:hover {
  background: rgba(255, 247, 243, 0.94);
  border-color: rgba(170, 23, 28, 0.28);
  transform: translateY(-1px);
}

.share-card-action.is-primary:hover {
  background: #701015;
  box-shadow: 0 16px 28px rgba(132, 17, 22, 0.2);
}

.share-card-state {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.share-card-state[data-tone="error"] {
  color: var(--red-deep);
}

.share-card-copy-fallback {
  display: grid;
  gap: 6px;
  margin: -4px 0 0;
  color: rgba(118, 98, 92, 0.82);
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.5;
}

.share-card-copy-fallback[hidden] {
  display: none;
}

.share-card-copy-fallback textarea {
  width: 100%;
  min-height: 86px;
  padding: 9px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(234, 215, 206, 0.88);
  border-radius: 6px;
  outline: none;
  resize: vertical;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.55;
}

.share-card-copy-fallback textarea:focus {
  border-color: rgba(170, 23, 28, 0.38);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.cards-section {
  width: min(2140px, 100%);
  margin: 0 auto;
  padding-block: 28px 76px;
}

.cards-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-height: 34px;
  margin-bottom: 18px;
}

.receipt-search {
  position: relative;
  z-index: 2;
}

.receipt-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.receipt-search-box {
  display: flex;
  align-items: center;
  width: min(320px, 46vw);
  min-height: 32px;
  padding: 0 8px 0 11px;
  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);
}

.receipt-search-box svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.68;
}

.receipt-search-box input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 0.82rem;
  font-weight: 680;
}

.receipt-search-box input::placeholder {
  color: rgba(118, 98, 92, 0.62);
}

.receipt-search-box input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.receipt-search-box:focus-within {
  border-color: rgba(170, 23, 28, 0.34);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.receipt-search-clear {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  color: rgba(132, 17, 22, 0.62);
  background: rgba(255, 240, 239, 0.88);
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 720;
  line-height: 1;
}

.receipt-search-clear[hidden] {
  display: none;
}

.receipt-filter {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 3px;
  overflow-x: auto;
  color: rgba(118, 98, 92, 0.88);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(234, 215, 206, 0.66);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(87, 35, 23, 0.04);
  scrollbar-width: none;
}

.receipt-filter::-webkit-scrollbar {
  display: none;
}

.receipt-filter-button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  color: rgba(118, 98, 92, 0.82);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.receipt-filter-button:hover,
.receipt-filter-button:focus-visible,
.receipt-filter-button[aria-pressed="true"] {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.08);
  outline: none;
}

.receipt-filter-button[data-review-filter="manualData"] {
  position: relative;
  color: rgba(118, 98, 92, 0.56);
  background: transparent;
  border-color: transparent;
}

.receipt-filter-button[data-review-filter="manualData"]:hover,
.receipt-filter-button[data-review-filter="manualData"]:focus-visible,
.receipt-filter-button[data-review-filter="manualData"][aria-pressed="true"] {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.08);
  border-color: transparent;
  outline: none;
}

.manual-data-panel {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}

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

.manual-data-note {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(760px, 100%);
  padding: 9px 10px 9px 12px;
  color: rgba(82, 63, 58, 0.72);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(234, 215, 206, 0.62);
  border-radius: 4px;
  box-shadow:
    0 6px 14px rgba(87, 35, 23, 0.028),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
  transform: rotate(-0.12deg);
}

.manual-data-note::before {
  content: "";
  position: absolute;
  left: 24px;
  top: -6px;
  width: 42px;
  height: 9px;
  background: rgba(255, 244, 231, 0.62);
  border: 1px solid rgba(224, 202, 185, 0.34);
  box-shadow: 0 2px 5px rgba(87, 35, 23, 0.022);
  transform: rotate(-1.1deg);
}

.manual-data-note p {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  font-size: 0.73rem;
  font-weight: 620;
  line-height: 1.52;
}

.manual-data-preview-toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  color: #fff;
  background: var(--red-deep);
  border: 1px solid var(--red-deep);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(132, 17, 22, 0.12);
  font-size: 0.73rem;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.manual-data-preview-toggle:hover,
.manual-data-preview-toggle:focus-visible,
.manual-data-preview-toggle[aria-pressed="true"] {
  color: #fff;
  background: #701015;
  border-color: #701015;
  box-shadow: 0 14px 24px rgba(132, 17, 22, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.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;
  max-height: min(240px, 42vh);
  overflow: auto;
  padding: 5px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(234, 215, 206, 0.94);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(87, 35, 23, 0.13);
  scrollbar-gutter: stable;
}

.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:focus-visible,
.sort-option[aria-selected="true"] {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.07);
  outline: none;
}

.receipt-masonry {
  --masonry-gap: 28px;
  display: grid;
  grid-template-columns: repeat(var(--masonry-columns, 1), minmax(0, 1fr));
  gap: var(--masonry-gap);
  align-items: start;
}

.receipt-masonry.is-compact-results {
  width: min(100%, var(--masonry-compact-width, 100%));
  margin-inline: auto;
}

.load-more-receipts {
  display: block;
  min-height: 42px;
  margin: 28px auto 0;
  padding: 0 18px;
  color: rgba(132, 17, 22, 0.82);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(234, 215, 206, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(87, 35, 23, 0.08);
  font-weight: 760;
}

.load-more-receipts[hidden] {
  display: none;
}

.load-more-receipts:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.receipt-load-state {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.receipt-scroll-sentinel {
  height: 1px;
}

.masonry-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-content: start;
  min-width: 0;
}

.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 {
  position: relative;
  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;
}

.receipt-card.is-manual-data {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(224, 202, 185, 0.68);
  border-style: dashed;
  box-shadow:
    0 14px 34px rgba(87, 35, 23, 0.055),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.receipt-card.is-manual-data:hover {
  box-shadow:
    0 24px 54px rgba(87, 35, 23, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.receipt-open-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.receipt-open-button:focus-visible {
  outline: 2px solid rgba(132, 17, 22, 0.34);
  outline-offset: 4px;
}

.receipt-card.is-pending {
  color: rgba(39, 21, 21, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(243, 239, 236, 0.94)),
    rgba(248, 246, 244, 0.92);
  border-color: rgba(205, 196, 190, 0.82);
  box-shadow:
    0 18px 46px rgba(87, 35, 23, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.receipt-card.is-pending::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(238, 234, 231, 0.58)),
    rgba(246, 244, 242, 0.3);
  backdrop-filter: blur(2.4px) saturate(0.68);
}

.receipt-card.is-pending::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.52), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(202, 193, 188, 0.2));
}

.receipt-card.is-pending .card-image,
.receipt-card.is-pending .card-meta {
  opacity: 0.62;
}

.receipt-review-note {
  position: absolute;
  left: 10px;
  top: 26px;
  z-index: 3;
  display: grid;
  gap: 7px;
  width: min(268px, calc(100% - 56px));
  margin: 0;
  padding: 13px 14px 14px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 247, 0.96)),
    #fff;
  border: 1px solid rgba(234, 215, 206, 0.96);
  border-radius: 4px;
  box-shadow:
    0 14px 28px rgba(87, 35, 23, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.98) inset;
  transform: rotate(var(--review-note-tilt, -0.7deg));
  pointer-events: none;
}

.receipt-review-note::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 64px;
  height: 18px;
  background: rgba(255, 244, 231, 0.82);
  border: 1px solid rgba(224, 202, 185, 0.55);
  box-shadow: 0 5px 12px rgba(87, 35, 23, 0.08);
  transform: translateX(-50%) rotate(var(--review-tape-tilt, 1.5deg));
}

.receipt-review-note-title,
.receipt-review-note-body,
.receipt-review-note-footnote {
  position: relative;
  z-index: 1;
}

.receipt-review-note-title {
  color: var(--red-deep);
  font-size: 0.83rem;
  font-weight: 860;
  line-height: 1.1;
}

.receipt-review-note-body {
  margin: 0;
  color: rgba(65, 39, 37, 0.78);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.55;
}

.receipt-review-note-footnote {
  display: block;
  justify-self: end;
  max-width: 18em;
  margin-top: -2px;
  color: rgba(87, 71, 68, 0.48);
  font-size: 0.6rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: right;
}

.receipt-card.is-pending .card-image {
  filter: blur(5.5px) grayscale(0.82) contrast(0.88) saturate(0.72);
  transform: scale(1.018);
}

.receipt-card.is-pending .card-meta {
  user-select: none;
}

.receipt-card.is-pending .player-name,
.receipt-card.is-pending .date,
.receipt-card.is-pending .source-row,
.receipt-card.is-pending .blessing {
  filter: blur(2.2px) grayscale(0.72);
  opacity: 0.58;
}

.receipt-card.is-pending .amount {
  color: rgba(132, 17, 22, 0.72);
  filter: blur(1.1px);
  opacity: 0.76;
}

.pending-status {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 32px);
  color: rgba(132, 17, 22, 0.84);
  border-radius: inherit;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.68);
}

.card-image {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  max-height: min(var(--image-limit, 620px), 72vh);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.card-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(var(--image-limit, 620px), 72vh);
  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;
}

.receipt-card:not(.is-pending) .card-meta {
  padding-bottom: 42px;
}

.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 {
  --amount-size: 2.95rem;
  display: block;
  max-width: 100%;
  min-width: 0;
  color: var(--red);
  font-size: var(--amount-size);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.amount-stack {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.amount-row {
  justify-content: flex-start;
  min-width: 0;
}

.amount[data-amount-size="long"] {
  --amount-size: clamp(1.95rem, 8.6vw, 2.35rem);
}

.amount[data-amount-size="huge"] {
  --amount-size: clamp(1.55rem, 7vw, 1.95rem);
  line-height: 1.06;
}

.amount[data-amount-size="tiny"] {
  --amount-size: clamp(1.25rem, 5.8vw, 1.6rem);
  line-height: 1.08;
}

.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 {
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(234, 215, 206, 0.78);
}

.source-value-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  line-height: 1.2;
  text-align: right;
}

.source-value-marker {
  display: inline-grid;
  gap: 2px;
  min-width: 0;
  color: rgba(132, 17, 22, 0.54);
  font-size: inherit;
  font-weight: 720;
  line-height: inherit;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.source-value-marker::after {
  content: "";
  display: none;
}

.source-value-marker-kind,
.source-value-marker-amount {
  min-width: 0;
}

.source-value-marker-kind {
  white-space: nowrap;
}

.source-value-marker-amount {
  color: rgba(132, 17, 22, 0.7);
  font-weight: 780;
  overflow-wrap: anywhere;
}

.receipt-card.is-manual-data .source-row {
  align-items: flex-start;
}

.receipt-card.is-manual-data .source-row > span:first-child {
  flex: 0 0 auto;
}

.receipt-card.is-manual-data .source-value-stack {
  flex: 1 1 0;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 3px 6px;
  min-width: 0;
}

.receipt-card.is-manual-data .source-value-marker + .source-value::before {
  content: "\00b7";
  margin-right: 6px;
  color: rgba(132, 17, 22, 0.34);
  font-weight: 680;
}

.source-value {
  min-width: 0;
  color: var(--muted);
  font-weight: 760;
  line-height: inherit;
  overflow-wrap: anywhere;
}

.receipt-like {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 28px;
  padding: 2px 0;
  color: rgba(132, 17, 22, 0.72);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  font-weight: 820;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    color 160ms ease;
}

.receipt-like:hover,
.receipt-like:focus-visible {
  color: var(--red);
  transform: translateY(-1px);
}

.receipt-like:disabled,
.receipt-like.is-updating {
  cursor: wait;
}

.receipt-like:focus-visible {
  outline: 2px solid rgba(132, 17, 22, 0.34);
  outline-offset: 3px;
}

.receipt-like.is-liked {
  color: #841116;
}

.receipt-like-icon {
  display: block;
  width: 24px;
  height: 24px;
  color: currentColor;
  overflow: visible;
  flex: 0 0 24px;
}

.receipt-like-icon path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  transition:
    fill 160ms ease,
    stroke 160ms ease;
}

.receipt-like.is-liked .receipt-like-icon path {
  fill: currentColor;
  stroke: currentColor;
}

.receipt-like-count {
  min-width: 1ch;
  height: 24px;
  color: rgba(132, 17, 22, 0.72);
  font-size: 1.12rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 24px;
}

.receipt-like.is-liked .receipt-like-count,
.receipt-like:hover .receipt-like-count,
.receipt-like:focus-visible .receipt-like-count {
  color: currentColor;
}

.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 {
  --detail-body-width: 520px;
  --detail-resizer-width: 12px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 5.5fr) var(--detail-resizer-width) minmax(360px, var(--detail-body-width));
  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-resizer {
  position: relative;
  z-index: 3;
  min-width: var(--detail-resizer-width);
  cursor: col-resize;
  background: transparent;
  border-inline: 0;
  outline: none;
  touch-action: none;
  transition: background 160ms ease;
}

.detail-resizer::before {
  display: none;
}

.detail-resizer:hover,
.detail-resizer:focus-visible,
.dialog-panel.is-resizing .detail-resizer {
  background: rgba(234, 215, 206, 0.26);
}

body.is-resizing-detail,
body.is-resizing-detail * {
  cursor: col-resize !important;
  user-select: none;
}

.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-picker {
  position: relative;
  min-width: 0;
}

.detail-image-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 12px 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(234, 215, 206, 0.92);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(87, 35, 23, 0.06);
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1;
  outline: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.detail-image-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-image-trigger svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.62;
  transition: transform 160ms ease;
}

.detail-image-trigger:hover,
.detail-image-trigger:focus-visible,
.detail-image-picker.is-open .detail-image-trigger {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(170, 23, 28, 0.36);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.detail-image-picker.is-open .detail-image-trigger svg {
  transform: rotate(180deg);
}

.detail-image-trigger:disabled {
  cursor: default;
  color: rgba(118, 98, 92, 0.76);
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(234, 215, 206, 0.62);
  box-shadow: none;
}

.detail-image-trigger:disabled svg {
  opacity: 0.22;
}

.detail-image-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 8;
  display: grid;
  gap: 4px;
  max-height: min(240px, 42vh);
  overflow: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(234, 215, 206, 0.94);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(87, 35, 23, 0.14);
}

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

.detail-image-option {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.detail-image-option:hover,
.detail-image-option:focus-visible,
.detail-image-option[aria-selected="true"] {
  color: var(--red-deep);
  background: #fff0ef;
  outline: none;
}

#detail-image-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.detail-image-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 18px;
  scrollbar-gutter: stable;
}

.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);
}

.detail-image-frame,
.detail-body,
.detail-images,
.detail-image-menu,
.source-options,
.currency-options,
.currency-option-list,
.sort-menu {
  scrollbar-color: rgba(132, 17, 22, 0.32) rgba(255, 255, 255, 0.24);
  scrollbar-width: thin;
}

.detail-image-frame::-webkit-scrollbar,
.detail-body::-webkit-scrollbar,
.detail-images::-webkit-scrollbar,
.detail-image-menu::-webkit-scrollbar,
.source-options::-webkit-scrollbar,
.currency-options::-webkit-scrollbar,
.currency-option-list::-webkit-scrollbar,
.sort-menu::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.detail-image-frame::-webkit-scrollbar-track,
.detail-body::-webkit-scrollbar-track,
.detail-images::-webkit-scrollbar-track,
.detail-image-menu::-webkit-scrollbar-track,
.source-options::-webkit-scrollbar-track,
.currency-options::-webkit-scrollbar-track,
.currency-option-list::-webkit-scrollbar-track,
.sort-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.detail-image-frame::-webkit-scrollbar-thumb,
.detail-body::-webkit-scrollbar-thumb,
.detail-images::-webkit-scrollbar-thumb,
.detail-image-menu::-webkit-scrollbar-thumb,
.source-options::-webkit-scrollbar-thumb,
.currency-options::-webkit-scrollbar-thumb,
.currency-option-list::-webkit-scrollbar-thumb,
.sort-menu::-webkit-scrollbar-thumb {
  background: rgba(132, 17, 22, 0.28);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 999px;
}

.detail-image-frame::-webkit-scrollbar-thumb:hover,
.detail-body::-webkit-scrollbar-thumb:hover,
.detail-images::-webkit-scrollbar-thumb:hover,
.detail-image-menu::-webkit-scrollbar-thumb:hover,
.source-options::-webkit-scrollbar-thumb:hover,
.currency-options::-webkit-scrollbar-thumb:hover,
.currency-option-list::-webkit-scrollbar-thumb:hover,
.sort-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(132, 17, 22, 0.42);
  background-clip: padding-box;
}

.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: flex;
  flex-direction: column;
  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;
  scrollbar-gutter: stable;
}

.detail-body > * {
  flex: 0 0 auto;
}

.detail-main {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.detail-amount {
  --detail-amount-size: 3.4rem;
  display: block;
  max-width: 100%;
  min-width: 0;
  color: var(--red);
  font-size: var(--detail-amount-size);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-amount[data-amount-size="long"] {
  --detail-amount-size: clamp(2.25rem, 4.6vw, 2.75rem);
}

.detail-amount[data-amount-size="huge"] {
  --detail-amount-size: clamp(1.95rem, 4vw, 2.35rem);
  line-height: 1.06;
}

.detail-amount[data-amount-size="tiny"] {
  --detail-amount-size: clamp(1.65rem, 3.4vw, 2rem);
  line-height: 1.08;
}

.detail-message {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: max-content;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 8px;
}

.detail-message.has-overflow.is-collapsed::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 56px;
  left: 18px;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 252, 248, 0.96));
}

.detail-blessing {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-message.is-collapsed .detail-blessing {
  max-height: calc(1.85em * 5);
  overflow: hidden;
}

.detail-message.is-expanded .detail-blessing {
  max-height: none;
}

.detail-message-toggle {
  position: relative;
  z-index: 1;
  justify-self: start;
  min-height: 30px;
  padding: 0 2px;
  color: rgba(132, 17, 22, 0.9);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(132, 17, 22, 0.22);
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 780;
  letter-spacing: 0;
}

.detail-message-toggle:hover,
.detail-message-toggle:focus-visible {
  color: var(--red-deep);
  border-color: rgba(132, 17, 22, 0.48);
  outline: none;
}

.detail-message-toggle[hidden] {
  display: none;
}

.detail-message.is-expanded .detail-message-toggle {
  order: -1;
  justify-self: end;
}

.detail-feedback-notes {
  display: grid;
  gap: 10px;
  min-height: max-content;
  padding: 0 0 4px;
}

.detail-feedback-notes[hidden] {
  display: none;
}

.detail-amount-notes {
  justify-self: end;
  max-width: min(100%, 320px);
  margin: 0;
  padding: 0 2px 1px;
  color: rgba(82, 63, 58, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.detail-amount-notes[hidden] {
  display: none;
}

.detail-amount-note {
  display: inline;
  color: inherit;
  font: inherit;
}

.detail-amount-note::before {
  content: "\203B";
  margin-right: 4px;
  color: rgba(132, 17, 22, 0.52);
  font-weight: 760;
}

.detail-review-clue {
  --review-clue-bg: #fff;
  --review-clue-border: rgba(234, 215, 206, 0.96);
  --review-clue-title: var(--red-deep);
  --review-clue-tape: rgba(255, 244, 231, 0.7);
  --review-clue-tape-border: rgba(224, 202, 185, 0.42);
  position: relative;
  display: grid;
  gap: 9px;
  width: min(calc(100% - 2px), 420px);
  min-width: 0;
  margin: 0;
  padding: 13px 14px 14px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.32)),
    var(--review-clue-bg);
  border: 1px solid var(--review-clue-border);
  border-radius: 4px;
  box-shadow:
    0 6px 14px rgba(87, 35, 23, 0.045),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
  transform: rotate(var(--review-clue-note-tilt, 0deg));
}

.detail-review-clue::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 62px;
  height: 16px;
  background: var(--review-clue-tape);
  border: 1px solid var(--review-clue-tape-border);
  box-shadow: 0 3px 7px rgba(87, 35, 23, 0.04);
  transform: translateX(-50%) rotate(var(--review-clue-tape-tilt, 0deg));
}

.detail-review-clue[data-clue-type="image"] {
  --review-clue-border: rgba(189, 207, 197, 0.76);
  --review-clue-tape: rgba(235, 245, 239, 0.8);
  --review-clue-tape-border: rgba(181, 203, 192, 0.44);
}

.detail-review-clue[data-clue-type="amount"] {
  --review-clue-border: rgba(226, 193, 180, 0.78);
  --review-clue-tape: rgba(255, 239, 232, 0.82);
  --review-clue-tape-border: rgba(217, 185, 172, 0.44);
}

.detail-review-clue .detail-feedback-note-type {
  color: var(--review-clue-title);
}

.detail-review-clue-source {
  position: relative;
  z-index: 1;
  color: rgba(87, 71, 68, 0.52);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.2;
}

.detail-review-clue p {
  position: relative;
  z-index: 1;
  display: grid;
  margin: 0;
  gap: 5px;
  overflow-wrap: anywhere;
  color: rgba(65, 39, 37, 0.8);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.52;
}

.detail-review-clue-target {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(65, 39, 37, 0.86);
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.42;
}

.detail-review-clue-target-meta {
  display: inline;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-review-clue-message {
  display: block;
  margin-top: 1px;
  max-width: 100%;
  overflow: hidden;
  color: rgba(65, 39, 37, 0.76);
  font-size: 0.79rem;
  font-weight: 650;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-feedback-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 1px;
}

.detail-feedback-head strong {
  color: var(--red-deep);
  font-size: 0.86rem;
  font-weight: 860;
  line-height: 1.2;
}

.detail-feedback-head span {
  flex: 0 0 auto;
  color: rgba(87, 71, 68, 0.54);
  font-size: 0.76rem;
  font-weight: 760;
}

.detail-feedback-stack {
  display: grid;
  align-items: start;
  gap: 10px;
}

.detail-feedback-note {
  position: relative;
  display: grid;
  gap: 7px;
  width: min(calc(100% - 2px), 420px);
  min-width: 0;
  margin: 0;
  padding: 13px 14px 13px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 247, 0.96)),
    #fff;
  border: 1px solid rgba(234, 215, 206, 0.96);
  border-radius: 4px;
  box-shadow:
    0 6px 14px rgba(87, 35, 23, 0.045),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transform: rotate(var(--feedback-note-tilt, 0deg));
}

.detail-feedback-note::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 62px;
  height: 16px;
  background: rgba(255, 244, 231, 0.7);
  border: 1px solid rgba(224, 202, 185, 0.42);
  box-shadow: 0 3px 7px rgba(87, 35, 23, 0.045);
  transform: translateX(-50%) rotate(var(--feedback-tape-tilt, 0deg));
}

.detail-feedback-note:nth-child(even)::before {
  left: 50%;
  right: auto;
  transform: translateX(-50%) rotate(var(--feedback-tape-tilt, 0deg));
}

.detail-feedback-note-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.detail-feedback-note-type {
  color: var(--red-deep);
  font-size: 0.76rem;
  font-weight: 840;
  line-height: 1.2;
}

.detail-feedback-note time {
  color: rgba(87, 71, 68, 0.48);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.2;
}

.detail-feedback-note p {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(65, 39, 37, 0.82);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.58;
  white-space: pre-wrap;
}

.detail-data {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: max-content;
  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;
}

.report-actions {
  display: grid;
  gap: 10px;
  min-height: max-content;
  padding: 22px 0 4px;
}

.report-action-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.report-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 8px;
}

.report-panel[hidden] {
  display: none;
}

.feedback-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.55;
}

.feedback-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feedback-option {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: rgba(132, 17, 22, 0.86);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(234, 215, 206, 0.9);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 760;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.feedback-option:hover,
.feedback-option:focus-visible {
  background: rgba(170, 23, 28, 0.12);
  border-color: rgba(170, 23, 28, 0.24);
  transform: translateY(-1px);
  outline: none;
}

.report-reason-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.report-reason-field textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(234, 215, 206, 0.86);
  border-radius: 7px;
  outline: none;
  resize: vertical;
  line-height: 1.5;
}

.report-reason-field textarea:focus {
  border-color: rgba(170, 23, 28, 0.42);
  box-shadow: 0 0 0 3px rgba(170, 23, 28, 0.08);
}

.report-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 94px;
  min-height: 40px;
  padding: 0 22px;
  color: #fff;
  background: var(--red-deep);
  border: 1px solid var(--red-deep);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(132, 17, 22, 0.12);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.report-action[hidden] {
  display: none;
}

.report-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-submit,
.report-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
}

.report-submit {
  color: #fff;
  background: var(--red-deep);
  border: 1px solid var(--red-deep);
  box-shadow: 0 10px 20px rgba(132, 17, 22, 0.12);
}

.report-cancel {
  color: rgba(118, 98, 92, 0.92);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(234, 215, 206, 0.9);
}

.report-action:hover,
.report-action:focus-visible {
  color: #fff;
  background: #701015;
  border-color: #701015;
  box-shadow: 0 13px 24px rgba(132, 17, 22, 0.15);
  transform: translateY(-1px);
  outline: none;
}

.report-cancel:hover,
.report-cancel:focus-visible {
  color: var(--red-deep);
  background: rgba(170, 23, 28, 0.1);
  outline: none;
}

.report-submit:hover,
.report-submit:focus-visible {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 14px 24px rgba(132, 17, 22, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.report-action:disabled,
.report-submit:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.report-action[aria-expanded="true"]:disabled {
  cursor: default;
  opacity: 0.78;
  box-shadow: none;
}

.report-actions [data-report-state] {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.5;
}

.report-actions [data-report-state][data-tone="success"] {
  color: #47743f;
}

.report-actions [data-report-state][data-tone="error"] {
  color: var(--red-deep);
}

.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;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.owner-action:hover,
.owner-action:focus-visible {
  background: rgba(170, 23, 28, 0.12);
  border-color: rgba(170, 23, 28, 0.24);
  transform: translateY(-1px);
  outline: none;
}

.owner-action.is-danger {
  color: #fff;
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.owner-action.is-danger:hover,
.owner-action.is-danger:focus-visible {
  background: var(--red);
  border-color: var(--red);
}

.owner-actions small {
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.5;
}

.dialog-open {
  overflow: hidden;
}

.share-dialog-open {
  overflow: hidden;
}

body.share-dialog-open .background-danmaku,
body.share-dialog-open .paper-page,
body.share-dialog-open .site-watermark,
body.share-dialog-open .projection-pull,
body.share-dialog-open .projection-screen {
  filter: blur(8px);
}

@keyframes digitWheelRoll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(var(--roll-steps) * -1em));
  }
}

@keyframes shareCardRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@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(280px, 0.9fr) minmax(320px, 1.1fr);
  }

  .file-field {
    grid-column: 2;
    grid-row: 1;
  }

}

@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;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }

  .upload-fields,
  .file-field,
  .wide-field,
  .form-state,
  .submit-button {
    grid-column: 1;
  }

  .file-field {
    grid-row: auto;
  }

  .file-field .upload-dropzone {
    min-height: 0;
  }

  .receipt-preview {
    max-height: 360px;
  }

  .dialog-panel {
    grid-template-columns: 1fr;
  }

  .detail-resizer {
    display: none;
  }

  .detail-media,
  .detail-body {
    max-height: none;
  }

  .detail-media {
    min-height: auto;
  }

  .detail-image-frame {
    max-height: 62vh;
  }

  .detail-body {
    border-top: 1px solid rgba(234, 215, 206, 0.9);
    padding-top: 28px;
  }

  .dialog-panel {
    overflow: auto;
  }

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

  .projection-pull {
    --projection-note-height: var(--projection-note-measured-height, 184px);
    --projection-tab-tuck: 6px;
    top: calc(var(--projection-tab-tuck) * -1);
    left: 190px;
    width: 32px;
    height: 29px;
    padding: 0;
  }

  html[data-lang="en"] .projection-pull {
    left: 180px;
  }

  .projection-pull::before {
    height: 29px;
  }

  .projection-pull-line {
    display: none;
  }

  .projection-pull-knob {
    display: none;
  }

  .projection-screen {
    --projection-note-height: var(--projection-note-measured-height, 184px);
    top: calc(var(--projection-note-height) * -1);
    left: 10px;
    width: min(246px, calc(100vw - 44px));
    height: auto;
  }

  .projection-screen-rod {
    top: -6px;
    left: 50%;
    width: 48px;
    height: 11px;
  }

  .projection-screen-paper {
    padding: 13px 16px 15px;
  }

  .top-controls {
    top: 14px;
    right: 14px;
    gap: 6px;
  }

  body.projection-screen-open .top-controls {
    opacity: 0;
    pointer-events: none;
  }

  .manual-review-toggle {
    min-width: 40px;
    padding-inline: 9px;
  }

  .manual-review-dialog {
    padding: 14px;
  }

  .manual-review-panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    padding: 18px;
  }

  .manual-review-amount-row {
    grid-template-columns: 1fr;
  }

  .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-fields {
    grid-template-columns: 1fr;
  }

  .upload-section,
  .cards-section {
    padding-inline: 14px;
  }

  .cards-toolbar {
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .receipt-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .receipt-search-box {
    width: 100%;
  }

  .receipt-filter {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .manual-data-panel {
    justify-content: stretch;
    margin: -4px 0 18px;
  }

  .manual-data-note {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }

  .manual-data-preview-toggle {
    justify-self: end;
  }

  .sort-control {
    flex: 0 0 auto;
  }

  .sort-menu {
    right: 0;
    max-width: calc(100vw - 28px);
  }

  .receipt-masonry {
    gap: 18px;
  }

  .masonry-column {
    gap: 18px;
  }

  .masonry-column:nth-child(n) {
    padding-top: 0;
  }

  .receipt-card {
    overflow: hidden;
    padding: 14px;
    transform: none;
  }

  .receipt-review-note {
    left: 6px;
    top: 22px;
    width: min(242px, calc(100% - 44px));
    padding: 12px 13px 13px;
  }

  .receipt-card:hover {
    transform: translateY(-2px);
  }

  .card-image {
    max-height: min(var(--image-limit, 620px), 70vh);
  }

  .card-image img {
    max-height: min(var(--image-limit, 620px), 70vh);
  }

  .card-meta {
    gap: 12px;
    padding: 16px 0 0;
  }

  .card-row,
  .source-row {
    min-width: 0;
    gap: 8px;
  }

  .date {
    flex: 0 0 auto;
  }

  .amount {
    max-width: 100%;
    --amount-size: clamp(2.1rem, 13vw, 2.65rem);
    overflow-wrap: anywhere;
  }

  .source-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .upload-panel {
    padding: 16px;
  }

  .share-card {
    padding: 14px;
  }

  .share-card-dialog {
    width: 100%;
    padding: 0;
  }

  .security-note,
  .share-card-art {
    padding: 14px;
  }

  .share-card-message {
    font-size: 1rem;
  }

  .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-feedback-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

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

  .detail-amount[data-amount-size="long"] {
    --detail-amount-size: clamp(1.95rem, 10vw, 2.35rem);
  }

  .detail-amount[data-amount-size="huge"] {
    --detail-amount-size: clamp(1.65rem, 8.8vw, 2rem);
  }

  .detail-amount[data-amount-size="tiny"] {
    --detail-amount-size: clamp(1.4rem, 7.5vw, 1.75rem);
  }
}

body[data-home-mode="intake"] {
  background: var(--paper);
}

body[data-home-mode="intake"] .background-danmaku {
  opacity: 0.42;
}

body[data-home-mode="intake"] .danmaku-line {
  color: rgba(132, 17, 22, 0.34);
}

body[data-home-mode="intake"] .total-stage {
  display: grid;
  width: min(1760px, calc(100vw - 36px));
  margin: clamp(10px, 4vh, 42px) auto 0;
}

body[data-home-mode="intake"] .total-receipt {
  gap: clamp(6px, 1.4vw, 18px);
  max-width: min(100%, calc(100vw - 36px));
}

body[data-home-mode="intake"] .currency {
  font-size: clamp(2.8rem, 8vw, 7rem);
}

body[data-home-mode="intake"] .total-number {
  font-size: clamp(4.4rem, 16.6vw, 15.8rem);
}

body[data-home-mode="intake"] .cards-section {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 5vw, 76px) 76px;
}

body[data-home-mode="intake"] .cards-toolbar {
  margin-bottom: 22px;
}

body[data-home-mode="intake"] .paper-page {
  min-height: 100svh;
  background: transparent;
}

body[data-home-mode="intake"] .hero {
  row-gap: 28px;
  min-height: 100svh;
  padding: 32px 18px;
}

body[data-home-mode="intake"]:not(.upload-open) .hero {
  padding-bottom: clamp(104px, 14vh, 150px);
}

body[data-home-mode="intake"] .intake-notice:not([hidden]) {
  position: relative;
  z-index: 2;
  display: block;
  width: min(860px, calc(100vw - 36px));
  margin: 0;
  color: rgba(39, 21, 21, 0.64);
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.95;
  text-wrap: balance;
  white-space: pre-line;
}

html:not([data-lang="en"]) body[data-home-mode="intake"] .intake-notice:not([hidden]) {
  width: min(900px, calc(100vw - 72px));
}

@media (min-width: 760px) {
  html:not([data-lang="en"]) body[data-home-mode="intake"] .intake-notice:not([hidden]) {
    white-space: pre;
  }
}

@media (max-width: 520px) {
  body[data-home-mode="intake"] .total-stage {
    width: min(100%, calc(100vw - 28px));
    margin-top: 22px;
  }

  body[data-home-mode="intake"] .currency {
    font-size: 2rem;
  }

  body[data-home-mode="intake"] .total-number {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  body[data-home-mode="intake"] .intake-notice:not([hidden]) {
    width: min(100%, calc(100vw - 32px));
    font-size: 0.92rem;
    line-height: 1.86;
  }
}

body[data-home-mode="intake"] .primary-action {
  min-width: 144px;
  margin-top: 0;
}

body[data-home-mode="intake"].upload-open .hero {
  min-height: auto;
  padding: 22px 18px 10px;
}

body[data-home-mode="intake"].upload-open .intake-notice {
  display: none;
}

body[data-home-mode="intake"] .upload-section {
  padding-inline: clamp(14px, 5vw, 76px);
  padding-block: 0 42px;
}

body[data-home-mode="intake"] .upload-section:not(.is-collapsed) {
  max-height: none;
  overflow: visible;
}

body[data-home-mode="intake"] .upload-panel {
  margin-block: clamp(18px, 5vh, 48px);
}
