:root[data-experience="field"] {
  --accent: #ffc15b;
  --wash: #342c20;
  --on: #252015;
  --deep: #31291c;
}
.aletai-banner {
  color: #fff;
  background: #122d45 linear-gradient(90deg, #091d35dd, transparent 76%);
  background-image:
    linear-gradient(90deg, #081c36e8 0%, #14263d9e 35%, transparent 74%),
    url(/aletai.webp);
  background-position:
    center,
    center 58%;
  background-size: cover;
}
.aletai-banner::before {
  display: none;
}
.aletai-banner p,
.aletai-banner > div > span {
  color: #f2f7fc;
}
.aletai-banner .primary {
  background: #ebf7ff;
  color: #183652;
}
.xp-paper + .xp-paper,
.member-shop + .xp-paper,
.ledger-total + .xp-paper {
  margin-top: 16px;
}
.xp-paper h2 + .xp-search {
  margin-top: 14px;
}
.xp-search input {
  min-width: 0;
}
.player-clock,
.duty-hero {
  border-radius: 22px;
  padding: clamp(20px, 4vw, 46px);
  color: #f2ffff;
  margin-bottom: 16px;
  background:
    linear-gradient(100deg, #10282cf7, #17403ce6 60%, #1b454180),
    url(/studio.webp) center 55% / cover;
}
.player-clock h1,
.duty-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 4px 0 12px;
}
.player-clock strong,
.duty-hero p b {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}
.player-clock span {
  margin-left: 18px;
  color: #b5d3cd;
}
.duty-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: clamp(184px, 22vw, 260px);
  gap: 12px;
  color: #fff3dc;
  background:
    linear-gradient(90deg, #29221bf2, #30261e48 68%, #1e171837),
    #29221b url(/field.webp) center / cover;
}
.duty-hero p {
  margin: 0;
}
.duty-hero small,
.duty-hero :is(h1, p) {
  text-shadow: 0 1px 4px #201814;
}
/* 场控上班/下班开关（Uiverse checkbox-wrapper-41 视觉还原，button 载体走 data-act） */
.duty-switch {
  --size: 76px;
  flex: none;
  appearance: none;
  padding: 0;
  margin: 0;
  width: var(--size);
  height: calc(var(--size) / 2);
  background-color: #fff;
  border: 3px solid #222;
  border-radius: 30px 100px 100px 100px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.5s;
  -webkit-tap-highlight-color: transparent;
}
.duty-switch::before {
  content: "";
  position: absolute;
  width: calc(var(--size) / 2);
  height: calc(var(--size) / 2);
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.7);
  border: 3px solid #222;
  border-radius: 30px 100px 100px 100px;
  background-color: #fde881;
  box-sizing: border-box;
  transition: all 0.5s;
}
.duty-switch.on {
  background-color: #fde881;
  border-radius: 100px 100px 30px 100px;
}
.duty-switch.on::before {
  left: 50%;
  background-color: #fff;
  border-radius: 100px 100px 30px 100px;
}
.duty-switch:active {
  transform: scale(0.95);
}
.work-row,
.sheet-title,
.booking-seal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.work-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.manage-links {
  display: flex;
  gap: 10px;
  margin: 8px 0 16px;
}
.member-search {
  padding: 0 16px;
}
.work-row:last-child {
  border-bottom: 0;
}
.work-row > div {
  min-width: 0;
}
.work-row strong,
.work-row small,
.report-sheet small {
  display: block;
  overflow-wrap: anywhere;
}
.work-row small,
.report-sheet small,
.quote {
  color: var(--muted);
}
.work-row > button,
.work-row > b {
  flex-shrink: 0;
}
.member-shop {
  border-radius: 22px;
  padding: clamp(20px, 3vw, 35px);
  color: #ffedd5;
  background:
    linear-gradient(115deg, #261c2cdd, #3a2237ce 50%, #62452aab),
    url(/prism.webp) center/cover;
  box-shadow: inset 0 0 0 1px #caac7d77;
  margin: 12px 0 20px;
}
.member-shop h2 {
  font-size: clamp(27px, 4vw, 40px);
  margin: 12px 0 3px;
}
.member-shop p {
  color: #e5d6cc;
}
.booking-seal {
  justify-content: flex-start;
  font-weight: 700;
  color: #ffdfab;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(110deg, #322031, #64443a);
}
.booking-seal small {
  margin-left: auto;
}
.member-shop .booking-seal {
  background: none;
  padding: 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 6px;
}
.plan-grid button {
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid #d3b38f88;
  color: #ffe6bc;
  background: linear-gradient(125deg, #f3c88725, #ffffff06);
  border-radius: 12px;
  padding: 14px;
}
.plan-grid button:hover {
  border-color: #ffe2ba;
}
.plan-grid strong {
  font-size: clamp(20px, 3vw, 30px);
}
.plan-grid span {
  font-size: 12px;
}
dialog fieldset {
  margin: 15px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
dialog legend {
  color: var(--text);
  font-weight: 650;
  padding: 0 5px;
}
.roster-picker .choice-list {
  max-height: 210px;
  overflow-y: auto;
  margin-top: 8px;
}
.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  min-height: 42px;
}
.pick:has(:checked) {
  border-color: var(--accent, var(--gold));
  background: var(--wash);
}
.pick input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent, var(--gold));
}
.pick small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
[hidden] {
  display: none !important;
}
.quote {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: var(--panel2);
  font-weight: 650;
  margin: 10px 0;
}
.sheet-title b {
  font-size: 17px;
}
.sheet-title span {
  color: var(--gold);
  font-size: 12px;
}
.report-sheet {
  border: 1px solid var(--border);
  padding: 12px;
  margin: 12px 0;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.report-sheet > p,
.report-line p {
  margin: 5px 0;
}
.report-line {
  background: var(--panel2);
  margin: 9px 0;
  border-radius: 8px;
  padding: 10px;
}
.report-line.focused {
  border-inline-start: 3px solid var(--accent, var(--gold));
}
.report-line p strong {
  float: right;
}
.prism-foot small {
  max-width: 60%;
  overflow-wrap: anywhere;
  font-size: 9px;
}
@media (max-width: 760px) {
  .duty-hero {
    min-height: 168px;
    padding: 16px;
    background-position:
      center,
      55% center;
  }
  .duty-hero h1 {
    margin: 4px 0 7px;
  }
  .duty-hero p b {
    font-size: 26px;
  }
  .aletai-banner {
    min-height: 225px;
    background-position:
      center,
      60% center;
  }
  .xp-mobile button {
    min-height: 44px;
    min-width: 0;
  }
  .xp-mobile {
    background: var(--panel);
  }
  .xp-shell {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .xp-paper,
  .member-shop,
  .duty-hero,
  .player-clock {
    border-radius: 16px;
  }
  .plan-grid {
    gap: 6px;
  }
  .plan-grid button {
    padding: 10px 6px;
  }
  .xp-paper .work-row .tiny,
  .work-row .task-action {
    min-height: 40px;
  }
  dialog {
    max-height: 88dvh;
    width: min(100%, 560px);
    border-radius: 18px 18px 0 0;
    margin: auto auto 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  dialog .form-actions {
    position: sticky;
    bottom: 0;
    background: var(--panel);
    padding: 10px 0;
  }
  dialog .form-actions button {
    min-height: 42px;
  }
  .xp-guest .xp-nav,
  .xp-player .xp-nav,
  .xp-manager .xp-nav {
    display: none;
  }
}

/* One order per card. Long team reports scroll inside the card. */
#dialog:is([data-kind="settlement"], [data-kind="finance-review"])[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: min(620px, calc(100vw - 24px));
  height: min(900px, 90dvh);
}
#dialog[data-kind="order"]:has(.finance-receipt) {
  width: min(620px, calc(100vw - 24px));
}
#dialog:is([data-kind="settlement"], [data-kind="finance-review"])
  .dialog-head {
  flex: none;
  position: static;
}
#dialog:is([data-kind="settlement"], [data-kind="finance-review"])
  .dialog-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
}
.deck-pager,
.deck-footer {
  padding: 10px 18px;
  background: var(--panel);
}
.deck-pager {
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.deck-pager > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.deck-pager small {
  display: block;
  font-size: 10px;
}
.deck-pager button,
.deck-footer button {
  min-height: 40px;
}
.deck-pager button:disabled {
  opacity: 0.38;
  cursor: default;
}
.deck-scroll {
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  background: var(--panel2);
  padding: 12px;
}
.deck-scroll:focus {
  outline: none;
}
.deck-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.deck-footer {
  grid-row: 3;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.deck-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--border);
}
.deck-stats > div {
  padding: 8px 10px;
  background: var(--panel2);
  overflow-wrap: anywhere;
}
.deck-stats > div:last-child {
  color: var(--accent);
  background: var(--wash);
}
.deck-stats dd {
  margin: 0;
}
.deck-stats b {
  display: block;
  font-size: 23px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.deck-stats dt,
.deck-footer small,
.finance-receipt small {
  color: var(--muted);
  font-size: 12px;
}
.deck-stats > div:last-child dt {
  color: inherit;
  font-weight: 700;
}
.deck-pay-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--wash);
  color: var(--accent);
}
.deck-pay-total small {
  display: block;
}
.deck-pay-total strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.deck-actions > button {
  width: 100%;
}
.finance-queue .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin-bottom: 12px;
}
.finance-queue .tabs > button {
  min-height: 40px;
  padding-inline: 4px;
}
.finance-review-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.finance-review-actions > button {
  flex: 1;
  width: auto;
}
.payment-total {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 9px;
  background: var(--wash);
  color: var(--accent);
}
.payment-total strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.payment-split {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 13px;
}
.payment-split > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.payment-split dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.payment-note,
.payment-breakdown small {
  font-size: 13px;
  color: var(--muted);
}
.payment-breakdown {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  max-height: 38dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-block: 1px solid var(--border);
}
.payment-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
}
.payment-breakdown li + li {
  border-top: 1px solid var(--border);
}
.payment-breakdown small {
  display: block;
}
.payment-breakdown strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.finance-receipt {
  overflow-wrap: anywhere;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.receipt-heading {
  padding: 14px 16px 12px;
}
.receipt-ident,
.receipt-overview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.receipt-ident h3 {
  margin: 0;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.receipt-boss {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
}
.receipt-badge,
.line-paid {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}
.receipt-badge {
  background: var(--wash);
  color: var(--accent);
}
.receipt-payment.is-vip {
  background: #fff0c9;
  color: #704000;
  box-shadow: inset 0 0 0 1px #e8c880;
}
.receipt-badge.audit-stamp,
.line-paid.paid {
  color: #1a614d;
  background: #e5f4ec;
}
.receipt-audit-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
/* Checkmark reveal adapted from Uiverse.io by kyle1dev. */
.receipt-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 5px;
  color: var(--accent);
  background: var(--panel);
}
.receipt-check.is-checked {
  border-color: #217653;
  background: #217653;
  color: #fff;
}
.receipt-check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}
.receipt-check.is-checked svg {
  visibility: visible;
}
@media (prefers-reduced-motion: no-preference) {
  .receipt-check.is-new {
    animation: receipt-check-pop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .receipt-check.is-new path {
    stroke-dasharray: 40;
    animation: receipt-check-draw 0.28s ease 0.08s backwards;
  }
  @keyframes receipt-check-pop {
    50% {
      scale: 1.15;
    }
  }
  @keyframes receipt-check-draw {
    from {
      stroke-dashoffset: 40;
    }
    to {
      stroke-dashoffset: 0;
    }
  }
}
.line-paid {
  color: #795122;
  background: #f6eddf;
}
.receipt-overview {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.receipt-overview b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.receipt-person {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.receipt-person.is-payee {
  background: var(--wash);
  box-shadow: inset 3px 0 var(--accent);
}
.receipt-person-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.receipt-person-head h4 {
  font-size: 17px;
  margin: 0;
}
.receipt-person-head > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
}
.receipt-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 5px 0 0;
  font-size: 13px;
}
.receipt-fields > div {
  display: flex;
  gap: 5px;
}
.receipt-fields dt,
.receipt-amounts dt {
  color: var(--muted);
}
.receipt-fields dd,
.receipt-amounts dd {
  margin: 0;
}
.receipt-description {
  color: var(--text);
  font-size: 13px;
  margin: 6px 0 0;
}
.receipt-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  font-size: 13px;
}
.receipt-amounts > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 5px;
}
.receipt-amounts dd b {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.receipt-amounts > div:last-child b {
  color: var(--accent);
}
.receipt-amounts dd small {
  margin-inline-start: 4px;
}
.receipt-person .proofs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}
.receipt-person .proofs a:only-child {
  grid-column: 1/-1;
}
.receipt-person .proofs img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 350px;
  border: 1px solid var(--border);
  border-radius: 6px;
  object-fit: contain;
  background: var(--panel2);
}
.receipt-foot {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
}
.receipt-foot dl,
.receipt-disclosure dl {
  display: grid;
  gap: 5px;
  margin: 0;
}
.receipt-foot dl > div,
.receipt-disclosure dl > div {
  display: grid;
  grid-template-columns: 5.1em 1fr;
  gap: 8px;
  font-size: 12px;
}
.receipt-foot dt,
.receipt-disclosure dt {
  color: var(--muted);
}
.receipt-foot dd,
.receipt-disclosure dd {
  margin: 0;
}
.receipt-disclosure {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
}
.receipt-disclosure summary {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.receipt-disclosure[open] summary {
  margin-bottom: 8px;
}
.receipt-history {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
@media (prefers-reduced-motion: no-preference) {
  .deck-scroll[data-motion="1"] .finance-receipt {
    animation: receipt-in-right 0.22s ease-out;
  }
  .deck-scroll[data-motion="-1"] .finance-receipt {
    animation: receipt-in-left 0.22s ease-out;
  }
  @keyframes receipt-in-right {
    from {
      opacity: 0.45;
      transform: translateX(-30px);
    }
  }
  @keyframes receipt-in-left {
    from {
      opacity: 0.45;
      transform: translateX(30px);
    }
  }
}
@media (max-width: 760px) {
  #dialog:is([data-kind="settlement"], [data-kind="finance-review"])[open] {
    width: 100%;
    max-width: 100%;
    height: 92dvh;
    max-height: 92dvh;
    margin: auto auto 0;
  }
  .deck-pager,
  .deck-footer {
    padding: 8px 14px;
  }
  .deck-pager button,
  .deck-footer button {
    min-height: 44px;
  }
  .deck-stats > div {
    padding-inline: 7px;
  }
  .deck-stats b {
    font-size: 18px;
  }
  .receipt-heading,
  .receipt-person {
    padding-inline: 12px;
  }
}
