@font-face {
  font-family: "MoonRealm Sans";
  src: url("./fonts/noto-sans-sc-mw-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "MoonRealm Sans";
  src: url("./fonts/noto-sans-sc-mw-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "MoonRealm Serif";
  src: url("./fonts/noto-serif-sc-mw-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

.photo-page {
  --w-canvas: #F4F2EE;
  --w-card: #FFFFFF;
  --w-card-line: #E7E3DC;
  --w-inset: #FDFCFA;
  --w-thumb-bg: #EFEBE4;
  --w-ink: #2B2620;
  --w-sub: #6B645A;
  --w-faint: #7A7365;
  --w-ph: #98917F;
  --w-cta: #2B2620;
  --w-cta-hover: #171310;
  --w-cta-text: #FFF9EE;
  --w-cta-disabled: #CFC9BE;
  --w-gold: #C9A25E;
  --w-gold-deep: #8A6A2F;
  --w-gold-wash: #FBF6EA;
  --w-ok: #2E7D5B;
  --w-ok-bg: #EAF4EF;
  --w-ok-line: #CBE3D6;
  --w-err: #B54334;
  --w-err-bg: #FAEDEA;
  --w-err-line: #EDCDC5;
  --w-line-input: #E0DBD2;
  --w-focus: 0 0 0 3px rgba(201, 162, 94, .35);
  --w-r-card: 16px;
  --w-r-ctl: 10px;
  --w-r-thumb: 6px;
  --w-shadow-card: 0 1px 2px rgba(43, 38, 32, .05), 0 8px 24px rgba(43, 38, 32, .06);
  --w-shadow-photo: 0 3px 10px rgba(43, 38, 32, .14);
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: var(--w-canvas);
  color: var(--w-ink);
  font-family: "MoonRealm Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.photo-page *,
.photo-page *::before,
.photo-page *::after {
  box-sizing: border-box;
}

.photo-page a {
  color: inherit;
}

.photo-page button,
.photo-page input,
.photo-page select {
  font: inherit;
}

.photo-page button,
.photo-page label,
.photo-page a {
  -webkit-tap-highlight-color: transparent;
}

.photo-page .photo-shell {
  min-height: 100vh;
  overflow: clip;
}

.photo-page .photo-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100vw;
  min-height: 56px;
  margin-left: calc(50% - 50vw);
  padding: 0 max(20px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid var(--w-card-line);
  background:
    radial-gradient(390px 94px at 24% 0%, rgba(201, 162, 94, .12), transparent 70%),
    var(--w-card);
}

.photo-page .photo-brand,
.photo-page .photo-back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.photo-page .photo-brand {
  gap: 7px;
  color: var(--w-ink);
  font-family: "MoonRealm Serif", "Songti SC", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.photo-page .photo-brand-mark {
  width: 17px;
  height: 17px;
  color: var(--w-gold-deep);
  flex: 0 0 auto;
}

.photo-page .photo-header-trust {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--w-card-line);
  border-radius: 999px;
  color: var(--w-sub);
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}

.photo-page .photo-header-trust-mark {
  color: var(--w-gold-deep);
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1;
}

.photo-page .photo-back {
  color: var(--w-sub);
  font-size: 12px;
  font-weight: 400;
  transition: color 160ms ease;
}

.photo-page .photo-back:hover {
  color: var(--w-ink);
}

.photo-page .photo-main {
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.photo-page .photo-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin: 0 0 12px;
}

.photo-page .photo-title-row h1 {
  margin: 0;
  color: var(--w-ink);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

.photo-page .photo-title-row p {
  margin: 0;
  color: var(--w-sub);
  font-size: 12px;
  line-height: 1.45;
}

.photo-page .photo-workbench,
.photo-page .photo-feedback {
  border: 1px solid var(--w-card-line);
  border-radius: var(--w-r-card);
  background: var(--w-card);
  box-shadow: var(--w-shadow-card);
}

.photo-page .photo-workbench {
  position: relative;
  padding: 20px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.photo-page .photo-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 280px;
  max-height: 320px;
  padding: 44px;
  overflow: hidden;
  border: 2px dashed #D8CFC0;
  border-radius: 12px;
  background: var(--w-inset);
  color: var(--w-ink);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, min-height 160ms ease;
}

.photo-page.photo-batch-page .photo-drop {
  min-height: 240px;
}

.photo-page .photo-drop:hover,
.photo-page .photo-drop.is-over {
  border-color: var(--w-gold);
  background: var(--w-gold-wash);
}

.photo-page .photo-drop-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 370px;
  text-align: center;
}

.photo-page .photo-drop-empty[hidden],
.photo-page .photo-file-selected[hidden],
.photo-page .photo-processing-progress[hidden],
.photo-page .photo-result-preview[hidden],
.photo-page .photo-feedback-complete[hidden],
.photo-page .photo-failure[hidden] {
  display: none;
}

.photo-page .photo-drop-art {
  width: 48px;
  height: 48px;
}

.photo-page .photo-drop strong {
  color: var(--w-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.photo-page .photo-drop-copy {
  color: var(--w-faint);
  font-size: 12.5px;
  line-height: 1.5;
}

.photo-page .photo-file-selected {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
}

.photo-page .photo-selected-thumb {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 40px;
  height: 40px;
  border-radius: var(--w-r-thumb);
  background: var(--w-thumb-bg);
  object-fit: cover;
}

.photo-page .photo-selected-thumb[hidden],
.photo-page .photo-original-panel img[hidden] {
  display: none;
}

.photo-page .photo-preview-empty {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--w-r-thumb);
  background: var(--w-thumb-bg);
  color: var(--w-ph);
}

.photo-page .photo-file-selected > .photo-preview-empty {
  grid-column: 1;
  grid-row: 1;
}

.photo-page .photo-preview-empty[hidden] {
  display: none;
}

.photo-page .photo-preview-empty svg {
  width: 19px;
  height: 19px;
}

.photo-page .photo-selected-copy {
  display: grid;
  grid-column: 2;
  min-width: 0;
  gap: 2px;
}

.photo-page .photo-selected-name {
  overflow: hidden;
  color: var(--w-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-page .photo-selected-info {
  color: var(--w-sub);
  font-size: 12px;
  line-height: 1.3;
}

.photo-page .photo-replace-note {
  grid-column: 3;
  color: var(--w-gold-deep);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.photo-page .photo-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-page .photo-drop:has(+ .photo-file:focus-visible) {
  outline: none;
  box-shadow: var(--w-focus);
}

.photo-page .photo-exam-workspace {
  display: grid;
  grid-template-columns: minmax(190px, 38fr) minmax(0, 62fr);
  gap: 18px;
  margin-top: 16px;
}

.photo-page .photo-original-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 296px;
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--w-thumb-bg);
}

.photo-page .photo-original-panel img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--w-r-thumb);
  box-shadow: var(--w-shadow-photo);
  object-fit: contain;
}

.photo-page .photo-workspace-preview-empty {
  width: min(100%, 240px);
  height: 180px;
}

.photo-page .photo-original-panel figcaption {
  margin-top: 9px;
  color: var(--w-faint);
  font-size: 11.5px;
}

.photo-page .photo-settings-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.photo-page .photo-action-note {
  display: none;
  margin: 0;
  color: var(--w-faint);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.photo-page .photo-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.photo-page .photo-preset {
  position: relative;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid var(--w-card-line);
  border-radius: var(--w-r-ctl);
  background: var(--w-card);
  color: var(--w-sub);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.photo-page .photo-preset small {
  display: block;
  margin-top: 3px;
  color: var(--w-ph);
  font-size: 11px;
  line-height: 1.25;
}

.photo-page .photo-preset:hover {
  border-color: var(--w-gold);
}

.photo-page .photo-preset.is-selected {
  padding: 8px 9px;
  border: 2px solid var(--w-gold);
  background: var(--w-gold-wash);
  color: var(--w-ink);
  font-weight: 500;
}

.photo-page .photo-preset.is-selected::after {
  position: absolute;
  top: 8px;
  right: 9px;
  color: var(--w-gold-deep);
  content: "✓";
  font-size: 12px;
  font-weight: 600;
}

.photo-page .photo-preset.is-selected small {
  color: var(--w-gold-deep);
}

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

.photo-page .photo-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.photo-page .photo-field > span:first-child {
  color: var(--w-faint);
  font-size: 11.5px;
  line-height: 1.25;
}

.photo-page .photo-field input,
.photo-page .photo-field select {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--w-line-input);
  border-radius: var(--w-r-ctl);
  outline: none;
  background: var(--w-card);
  color: var(--w-ink);
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.photo-page .photo-field input:focus,
.photo-page .photo-field select:focus {
  border-color: var(--w-gold);
  box-shadow: var(--w-focus);
}

.photo-page .photo-input-with-unit {
  position: relative;
  display: block;
}

.photo-page .photo-input-with-unit input {
  padding-right: 37px;
}

.photo-page .photo-input-unit {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--w-ph);
  font-size: 12px;
  transform: translateY(-50%);
}

.photo-page .photo-action-row {
  display: grid;
  gap: 6px;
}

.photo-page .photo-action-row:has(.photo-button:disabled:not(.is-loading)) .photo-action-note {
  display: block;
}

.photo-page .photo-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--w-r-ctl);
  background: var(--w-cta);
  color: var(--w-cta-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.photo-page .photo-button:hover {
  background: var(--w-cta-hover);
}

.photo-page .photo-button:active {
  transform: translateY(1px);
}

.photo-page .photo-button:disabled {
  background: var(--w-cta-disabled);
  color: #FFFFFF;
  cursor: not-allowed;
}

.photo-page .photo-button[hidden] {
  display: none;
}

.photo-page .photo-button.secondary,
.photo-page .photo-link-button {
  border-color: var(--w-card-line);
  background: var(--w-card);
  color: var(--w-sub);
}

.photo-page .photo-button.secondary:hover,
.photo-page .photo-link-button:hover {
  border-color: var(--w-gold);
  background: var(--w-gold-wash);
  color: var(--w-ink);
}

.photo-page .photo-button-primary {
  width: 100%;
  min-height: 48px;
}

.photo-page .photo-button-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--w-gold);
  opacity: .88;
}

.photo-page .photo-button.is-loading .photo-button-progress {
  width: 78%;
  animation: photo-button-fill 1200ms ease-in-out infinite alternate;
}

.photo-page .photo-button-label,
.photo-page .photo-spinner {
  position: relative;
  z-index: 1;
}

.photo-page .photo-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  animation: photo-spin 800ms linear infinite;
}

.photo-page .photo-button.is-loading .photo-spinner {
  display: block;
}

.photo-page .photo-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-page .photo-status-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: -2px;
}

.photo-page .photo-status-icon svg {
  width: 100%;
  height: 100%;
}

.photo-page .photo-failure {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--w-err-line);
  border-radius: 12px;
  background: var(--w-err-bg);
}

.photo-page .photo-failure strong {
  color: var(--w-err);
  font-size: 13px;
  font-weight: 500;
}

.photo-page .photo-failure p {
  margin: 0;
  color: var(--w-err);
  font-size: 12px;
}

.photo-page .photo-failure .photo-button {
  justify-self: start;
  min-height: 36px;
  margin-top: 3px;
}

.photo-page .photo-result {
  margin-top: 2px;
}

.photo-page .photo-result-card {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 26px minmax(150px, 1fr) auto minmax(132px, auto);
  align-items: center;
  gap: 13px;
}

.photo-page .photo-result-source,
.photo-page .photo-result-output {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.photo-page .photo-result-label {
  color: var(--w-sub);
  font-size: 12px;
  line-height: 1.3;
}

.photo-page .photo-result-source img {
  display: block;
  width: 100%;
  height: 112px;
  border-radius: var(--w-r-thumb);
  background: var(--w-thumb-bg);
  object-fit: contain;
  opacity: .55;
}

.photo-page .photo-result-arrow {
  width: 22px;
  height: 22px;
  color: var(--w-ph);
}

.photo-page .photo-output-paper {
  display: grid;
  min-height: 112px;
  padding: 5px;
  border: 1px solid var(--w-card-line);
  border-radius: var(--w-r-thumb);
  background: var(--w-card);
  box-shadow: var(--w-shadow-photo);
}

.photo-page .photo-output-paper img {
  display: block;
  width: 100%;
  height: 100px;
  border-radius: 3px;
  object-fit: contain;
}

.photo-page .photo-result-reduction {
  color: var(--w-ok);
  font-family: Georgia, "MoonRealm Serif", "Songti SC", serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.photo-page .photo-result-reduction.is-larger,
.photo-page .photo-result-reduction.is-neutral {
  color: var(--w-sub);
}

.photo-page .photo-result-download {
  width: 100%;
  min-width: 132px;
}

.photo-page .photo-result-detail-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.photo-page .photo-result-name {
  overflow: hidden;
  color: var(--w-ink);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-page .photo-result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.photo-page .photo-meta-chip {
  padding: 3px 7px;
  border: 1px solid var(--w-card-line);
  border-radius: 999px;
  color: var(--w-sub);
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.photo-page .photo-result-compare {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-page .photo-result-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0 0;
  color: var(--w-faint);
  font-size: 11.5px;
  line-height: 1.45;
}

.photo-page .photo-link-button {
  display: inline-flex;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--w-gold-deep);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
}

.photo-page .photo-result-preview-hint {
  margin: 5px 0 0;
  color: var(--w-faint);
  font-size: 11.5px;
}

.photo-page .photo-processing-progress {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.photo-page .photo-progress-copy {
  color: var(--w-sub);
  font-size: 12px;
  white-space: nowrap;
}

.photo-page .photo-progress-track {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--w-thumb-bg);
}

.photo-page .photo-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--w-gold);
  transition: width 160ms ease;
}

.photo-page .photo-batch-controls {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 0;
  background: var(--w-card);
}

.photo-page .photo-batch-parameter-detail {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.photo-page .photo-batch-parameter-detail .photo-field input,
.photo-page .photo-batch-parameter-detail .photo-field select {
  height: 40px;
  padding-right: 9px;
}

.photo-page .photo-batch-parameter-detail .photo-input-with-unit input {
  padding-right: 30px;
}

.photo-page .photo-batch-parameter-detail .photo-input-unit {
  right: 8px;
}

.photo-page .photo-batch-param-toggle {
  display: none;
}

.photo-page .photo-batch-controls .photo-action-row {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  justify-items: end;
}

.photo-page .photo-batch-controls .photo-button-primary {
  width: 220px;
  min-width: 220px;
  min-height: 48px;
}

.photo-page .photo-batch-controls .photo-action-note {
  width: 220px;
}

.photo-page .photo-batch-controls .photo-processing-progress {
  grid-column: 1 / -1;
  grid-row: 3;
}

.photo-page .photo-batch-queue {
  display: grid;
  gap: 11px;
}

.photo-page .photo-queue-list,
.photo-page .photo-list {
  display: grid;
  border-top: 1px solid #F0ECE5;
}

.photo-page .photo-batch-queue .photo-queue-list {
  border-top: 0;
}

.photo-page .photo-queue-row,
.photo-page .photo-list-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(110px, 190px) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 0;
  border-bottom: 1px solid #F0ECE5;
}

.photo-page .photo-queue-thumb,
.photo-page .photo-list-thumbnail,
.photo-page .photo-row-placeholder {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: var(--w-r-thumb);
  background: var(--w-thumb-bg);
  object-fit: cover;
}

.photo-page .photo-row-placeholder {
  place-items: center;
  color: var(--w-ph);
}

.photo-page .photo-row-placeholder svg {
  width: 18px;
  height: 18px;
}

.photo-page .photo-queue-copy,
.photo-page .photo-list-details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.photo-page .photo-queue-copy strong,
.photo-page .photo-list-details strong {
  overflow: hidden;
  color: var(--w-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-page .photo-queue-copy span,
.photo-page .photo-list-details p {
  margin: 0;
  color: var(--w-ph);
  font-size: 12px;
  line-height: 1.25;
}

.photo-page .photo-queue-status,
.photo-page .photo-row-output {
  min-width: 0;
  color: var(--w-ph);
  font-size: 12px;
  line-height: 1.3;
}

.photo-page .photo-queue-row.is-processing .photo-queue-status {
  display: grid;
  grid-template-columns: minmax(50px, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--w-gold-deep);
}

.photo-page .photo-queue-status-progress {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--w-thumb-bg);
}

.photo-page .photo-queue-status-progress::after {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: var(--w-gold);
  content: "";
  animation: photo-queue-progress 900ms ease-in-out infinite alternate;
}

.photo-page .photo-queue-row.is-complete .photo-queue-status,
.photo-page .photo-row-output.is-ok {
  color: var(--w-ok);
}

.photo-page .photo-queue-row.is-output-larger .photo-queue-status,
.photo-page .photo-row-output.is-larger {
  color: var(--w-sub);
}

.photo-page .photo-queue-row.is-failed .photo-queue-status,
.photo-page .photo-list-row.error .photo-row-output {
  color: var(--w-err);
}

.photo-page .photo-list-row.error {
  background: var(--w-err-bg);
}

.photo-page .photo-list-row .photo-row-button {
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--w-ok-line);
  color: var(--w-ok);
  font-size: 12px;
}

.photo-page .photo-list-row .photo-row-button:hover {
  border-color: var(--w-ok);
  background: var(--w-ok-bg);
}

.photo-page .photo-batch-summary-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 11px;
  padding: 12px 13px;
  border: 1px solid var(--w-ok-line);
  border-radius: 12px;
  background: var(--w-ok-bg);
}

.photo-page .photo-batch-summary {
  margin: 0;
  color: var(--w-ok);
  font-size: 13.5px;
  font-weight: 500;
}

.photo-page .photo-ios-save-hint {
  margin: 0;
  color: var(--w-faint);
  font-size: 11px;
}

.photo-page .photo-batch-utility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.photo-page .photo-safety {
  margin: 10px 0 0;
  color: var(--w-faint);
  font-size: 11.5px;
}

.photo-page .photo-feedback {
  margin-top: 18px;
  padding: 18px;
}

.photo-page .photo-feedback-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.photo-page .photo-feedback-heading h2 {
  margin: 0;
  color: var(--w-ink);
  font-size: 15px;
  font-weight: 600;
}

.photo-page .photo-moon-icon {
  width: 17px;
  height: 17px;
  color: var(--w-gold-deep);
}

.photo-page .photo-feedback > .photo-feedback-content > p {
  margin: 0 0 14px;
  color: var(--w-sub);
  font-size: 12px;
  line-height: 1.65;
}

.photo-page .photo-feedback-grid {
  display: grid;
  gap: 13px;
}

.photo-page .photo-feedback-grid > div,
.photo-page .photo-feedback-grid > label {
  display: grid;
  gap: 7px;
}

.photo-page .photo-feedback-grid strong {
  color: var(--w-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.photo-page .photo-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-page .photo-choice {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--w-card-line);
  border-radius: 999px;
  color: var(--w-sub);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.photo-page .photo-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-page .photo-choice.is-selected,
.photo-page .photo-choice:has(input:checked) {
  border-color: var(--w-gold);
  background: var(--w-gold-wash);
  color: var(--w-ink);
  font-weight: 600;
}

.photo-page .photo-choice:focus-within {
  box-shadow: var(--w-focus);
}

.photo-page .photo-text {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--w-line-input);
  border-radius: var(--w-r-ctl);
  outline: none;
  background: var(--w-card);
  color: var(--w-ink);
  font-size: 13px;
}

.photo-page .photo-text:focus {
  border-color: var(--w-gold);
  box-shadow: var(--w-focus);
}

.photo-page .photo-feedback-submit {
  justify-self: start;
  min-height: 42px;
}

.photo-page .photo-feedback-content.is-fading {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.photo-page .photo-feedback-complete {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--w-ok);
  font-size: 13px;
  font-weight: 600;
  animation: photo-success-in 160ms ease both;
}

.photo-page.photo-batch-page .photo-desktop-interest[hidden] {
  display: none;
}

.photo-page.photo-batch-page .photo-desktop-interest {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 12;
  width: min(400px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid var(--w-card-line);
  border-radius: 16px;
  background: var(--w-card);
  box-shadow: 0 18px 42px rgba(83, 62, 33, 0.2);
}

.photo-page.photo-batch-page .photo-desktop-interest > p {
  margin: 0;
  padding-right: 24px;
  color: var(--w-sub);
  font-size: 13px;
  line-height: 1.7;
}

.photo-page.photo-batch-page .photo-desktop-interest-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--w-faint);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.photo-page.photo-batch-page .photo-desktop-interest-close:hover {
  background: var(--w-inset);
  color: var(--w-ink);
}

.photo-page.photo-batch-page .photo-desktop-interest-close:focus-visible,
.photo-page.photo-batch-page .photo-desktop-interest-skip:focus-visible {
  outline: none;
  box-shadow: var(--w-focus);
}

.photo-page.photo-batch-page .photo-desktop-interest-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.photo-page.photo-batch-page .photo-desktop-interest-form label {
  display: grid;
  gap: 6px;
}

.photo-page.photo-batch-page .photo-desktop-interest-form label > span {
  color: var(--w-ink);
  font-size: 12px;
  font-weight: 600;
}

.photo-page.photo-batch-page .photo-desktop-interest-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-page.photo-batch-page .photo-desktop-interest-submit {
  min-height: 38px;
  padding: 0 17px;
}

.photo-page.photo-batch-page .photo-desktop-interest-skip {
  min-height: 38px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--w-sub);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.photo-page.photo-batch-page .photo-desktop-interest-skip:hover {
  color: var(--w-ink);
  text-decoration: underline;
}

.photo-page.photo-batch-page .photo-desktop-interest-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--w-ok);
  font-size: 12px;
  line-height: 1.5;
}

.photo-page .photo-footnote {
  margin: 14px 0 0;
  color: var(--w-faint);
  font-size: 12px;
  text-align: center;
}

.photo-page .photo-footnote a {
  color: var(--w-gold-deep);
  font-weight: 600;
  text-decoration: none;
}

.photo-page .photo-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid var(--w-card-line);
  color: var(--w-ph);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.photo-page .photo-footer .photo-moon-icon {
  width: 14px;
  height: 14px;
  color: var(--w-gold);
}

.photo-page .photo-hidden {
  display: none !important;
}

.photo-page .photo-workbench[data-state="s0"] .photo-exam-workspace {
  grid-template-columns: 1fr;
}

.photo-page .photo-workbench[data-state="s0"] .photo-original-panel {
  display: none;
}

.photo-page .photo-workbench[data-state="s1"] .photo-drop,
.photo-page .photo-workbench[data-state="s2"] .photo-drop,
.photo-page .photo-workbench[data-state="s4"] .photo-drop {
  min-height: 64px;
  padding: 11px 13px;
}

.photo-page .photo-workbench[data-state="s3"] .photo-selection-stage,
.photo-page .photo-workbench[data-state="s3"] .photo-exam-workspace,
.photo-page .photo-workbench[data-state="s3"] .photo-failure {
  display: none;
}

.photo-page.photo-batch-page .photo-batch-queue {
  display: none;
}

.photo-page.photo-batch-page .photo-workbench[data-state="s1"] .photo-batch-queue,
.photo-page.photo-batch-page .photo-workbench[data-state="s2"] .photo-batch-queue {
  display: grid;
}

.photo-page.photo-batch-page .photo-workbench[data-state="s0"] .photo-selection-stage,
.photo-page.photo-batch-page .photo-workbench[data-state="s1"] .photo-selection-stage,
.photo-page.photo-batch-page .photo-workbench[data-state="s2"] .photo-selection-stage {
  margin-bottom: 24px;
}

.photo-page.photo-batch-page .photo-workbench[data-state="s1"] .photo-drop,
.photo-page.photo-batch-page .photo-workbench[data-state="s2"] .photo-drop {
  min-height: 60px;
  padding: 10px 13px;
}

.photo-page.photo-batch-page .photo-workbench[data-state="s3"] .photo-selection-stage,
.photo-page.photo-batch-page .photo-workbench[data-state="s3"] .photo-batch-controls,
.photo-page.photo-batch-page .photo-workbench[data-state="s3"] .photo-batch-queue {
  display: none;
}

.photo-page.photo-batch-page .photo-workbench[data-state="s2"] .photo-batch-controls {
  pointer-events: none;
}

.photo-page :focus-visible {
  outline: none;
  box-shadow: var(--w-focus);
}

@keyframes photo-spin {
  to { transform: rotate(360deg); }
}

@keyframes photo-button-fill {
  from { width: 28%; }
  to { width: 84%; }
}

@keyframes photo-queue-progress {
  from { transform: translateX(-8%); }
  to { transform: translateX(42%); }
}

@keyframes photo-success-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .photo-page .photo-main,
  .photo-page .photo-footer {
    width: min(100% - 28px, 620px);
  }

  .photo-page .photo-header {
    padding: 0 14px;
  }

  .photo-page .photo-result-card {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  }

  .photo-page .photo-result-reduction {
    grid-column: 1 / 2;
  }

  .photo-page .photo-result-download {
    grid-column: 2 / 4;
  }

  .photo-page .photo-batch-controls {
    grid-template-columns: 1fr;
  }

  .photo-page .photo-batch-controls .photo-action-row {
    grid-column: auto;
    grid-row: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .photo-page .photo-header {
    gap: 7px;
    min-height: 56px;
  }

  .photo-page .photo-brand {
    gap: 5px;
    font-size: 13px;
  }

  .photo-page .photo-brand-mark {
    width: 15px;
    height: 15px;
  }

  .photo-page .photo-header-trust {
    gap: 3px;
    min-height: 23px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .photo-page .photo-header-trust-mark {
    font-size: 12px;
  }

  .photo-page .photo-back {
    font-size: 11px;
  }

  .photo-page .photo-main {
    padding-top: 13px;
    padding-bottom: 20px;
  }

  .photo-page .photo-title-row {
    display: grid;
    gap: 2px;
    margin-bottom: 9px;
  }

  .photo-page .photo-title-row h1 {
    font-size: 15px;
  }

  .photo-page .photo-title-row p {
    font-size: 11.5px;
  }

  .photo-page .photo-workbench,
  .photo-page .photo-feedback {
    border-radius: 12px;
  }

  .photo-page .photo-workbench {
    padding: 12px;
  }

  .photo-page .photo-drop {
    min-height: 200px;
    padding: 30px 20px;
  }

  .photo-page.photo-batch-page .photo-drop {
    min-height: 200px;
  }

  .photo-page .photo-drop-art {
    width: 48px;
    height: 48px;
  }

  .photo-page .photo-drop strong {
    font-size: 15px;
  }

  .photo-page .photo-drop-copy {
    font-size: 12px;
  }

  .photo-page .photo-file-selected {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .photo-page .photo-selected-info {
    font-size: 11.5px;
  }

  .photo-page .photo-exam-workspace {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-top: 12px;
  }

  .photo-page .photo-original-panel {
    min-height: 0;
    padding: 12px;
  }

  .photo-page .photo-original-panel img {
    max-width: 60vw;
    max-height: 44vw;
  }

  .photo-page .photo-presets {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .photo-page .photo-preset {
    min-height: 48px;
  }

  .photo-page .photo-preset small {
    display: inline;
    margin: 0 0 0 5px;
  }

  .photo-page .photo-fields {
    gap: 9px;
  }

  .photo-page .photo-field input,
  .photo-page .photo-field select {
    height: 42px;
    font-size: 16px;
  }

  .photo-page .photo-action-row {
    width: 100%;
  }

  .photo-page .photo-exam-page .photo-settings-panel .photo-action-row,
  .photo-page .photo-exam-page .photo-result-download {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    background: var(--w-card);
  }

  .photo-page .photo-button-primary,
  .photo-page .photo-feedback-submit {
    min-height: 52px;
    font-size: 15px;
  }

  .photo-page .photo-result-card {
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    gap: 8px;
  }

  .photo-page .photo-result-source img,
  .photo-page .photo-output-paper {
    min-height: 82px;
    height: 82px;
  }

  .photo-page .photo-output-paper img {
    height: 70px;
  }

  .photo-page .photo-result-label {
    font-size: 10.5px;
  }

  .photo-page .photo-result-reduction {
    font-size: 23px;
  }

  .photo-page .photo-result-detail-line {
    display: grid;
    gap: 7px;
  }

  .photo-page .photo-result-name {
    white-space: normal;
  }

  .photo-page .photo-batch-controls {
    position: relative;
    top: auto;
    gap: 9px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .photo-page .photo-batch-param-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--w-line-input);
    border-radius: var(--w-r-ctl);
    background: var(--w-card);
    color: var(--w-sub);
    cursor: pointer;
    font-size: 12.5px;
    text-align: left;
  }

  .photo-page .photo-batch-param-toggle span:last-child {
    color: var(--w-gold-deep);
    font-size: 15px;
    transition: transform 160ms ease;
  }

  .photo-page .photo-batch-controls.is-expanded .photo-batch-param-toggle span:last-child {
    transform: rotate(180deg);
  }

  .photo-page .photo-batch-parameter-detail {
    grid-column: auto;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-page .photo-batch-controls.is-expanded .photo-batch-parameter-detail {
    display: grid;
  }

  .photo-page .photo-batch-controls .photo-button-primary {
    width: 100%;
    min-height: 52px;
  }

  .photo-page .photo-batch-controls .photo-action-row {
    justify-items: stretch;
  }

  .photo-page .photo-batch-controls .photo-action-note {
    width: 100%;
  }

  .photo-page .photo-batch-controls .photo-processing-progress {
    grid-column: auto;
    grid-row: auto;
  }

  .photo-page.photo-batch-page .photo-workbench[data-state="s1"] .photo-drop,
  .photo-page.photo-batch-page .photo-workbench[data-state="s2"] .photo-drop,
  .photo-page .photo-workbench[data-state="s1"] .photo-drop,
  .photo-page .photo-workbench[data-state="s2"] .photo-drop,
  .photo-page .photo-workbench[data-state="s4"] .photo-drop {
    min-height: 56px;
    padding: 8px 10px;
  }

  .photo-page .photo-queue-row,
  .photo-page .photo-list-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 58px;
  }

  .photo-page .photo-queue-thumb,
  .photo-page .photo-list-thumbnail,
  .photo-page .photo-row-placeholder {
    width: 40px;
    height: 40px;
  }

  .photo-page .photo-queue-status,
  .photo-page .photo-row-output {
    grid-column: 2 / 3;
    font-size: 11px;
  }

  .photo-page .photo-row-button {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .photo-page .photo-batch-summary-bar {
    align-items: stretch;
    padding: 10px;
  }

  .photo-page .photo-batch-summary-bar .photo-button {
    width: 100%;
    min-height: 42px;
  }

  .photo-page .photo-feedback {
    margin-top: 14px;
    padding: 14px;
  }

  .photo-page.photo-batch-page .photo-desktop-interest {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-width: none;
    padding: 14px;
    border-radius: 14px;
  }

  .photo-page.photo-batch-page .photo-desktop-interest > p {
    font-size: 12.5px;
  }

  .photo-page .photo-choice-group {
    gap: 6px;
  }

  .photo-page .photo-choice {
    min-height: 34px;
    font-size: 11.5px;
  }

  .photo-page .photo-text {
    font-size: 16px;
  }

  .photo-page .photo-footer {
    padding: 16px 0 20px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-page *,
  .photo-page *::before,
  .photo-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
