:root {
  --rose-950: #5c263d;
  --rose-800: #8f3657;
  --rose-650: #bd4a70;
  --rose-500: #e06f94;
  --blush-200: #f9c7d7;
  --blush-100: #ffe5ed;
  --porcelain: #fffaf5;
  --gold: #c69a50;
  --sage: #5f745e;
  --shadow: 0 28px 64px rgba(112, 41, 67, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { background: #f8dbe5; }

body {
  min-block-size: 100vh;
  margin: 0;
  color: var(--rose-950);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.86) 0 4.5rem, transparent 4.6rem),
    radial-gradient(circle at 92% 30%, rgba(255,255,255,.55) 0 6rem, transparent 6.1rem),
    linear-gradient(155deg, #f6b9cc 0%, #ffe7ee 46%, #fff7f0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  inset-block-start: -10rem;
  z-index: 20;
  padding: .75rem 1rem;
  color: white;
  background: var(--rose-950);
  border-radius: .75rem;
}
.skip-link:focus { inset-block-start: 1rem; }

.page-shell {
  inline-size: min(100%, 31rem);
  margin-inline: auto;
  padding:
    max(1rem, env(safe-area-inset-top))
    1rem
    max(2rem, env(safe-area-inset-bottom));
}

.ticket {
  position: relative;
  overflow: hidden;
  background: var(--porcelain);
  border: 1px solid rgba(143, 54, 87, .2);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.ticket::after {
  content: "";
  position: absolute;
  inset: .65rem;
  z-index: 3;
  pointer-events: none;
  border: 1px dashed rgba(189, 74, 112, .36);
  border-radius: 1.3rem;
}

.ticket__cover {
  position: relative;
  min-block-size: 17.5rem;
  overflow: hidden;
}

.ticket__cover img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.ticket__cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,250,245,.98) 0 42%, rgba(255,250,245,.82) 58%, rgba(255,250,245,.08) 100%);
}

.ticket__heading {
  position: relative;
  z-index: 2;
  inline-size: 64%;
  padding: 3.1rem 0 2rem 2rem;
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--rose-650);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--rose-800);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.lead {
  margin: 1rem 0 0;
  color: rgba(92,38,61,.78);
  font-size: .92rem;
  line-height: 1.65;
}

.wax-seal {
  position: absolute;
  inset-inline-end: 1.1rem;
  inset-block-end: 1rem;
  z-index: 4;
  display: grid;
  place-items: center;
  inline-size: 4.75rem;
  block-size: 4.75rem;
  color: #fff8ef;
  background: radial-gradient(circle at 35% 25%, #eb8cab 0 8%, var(--rose-650) 36%, var(--rose-800) 100%);
  border: .3rem double rgba(255,248,239,.7);
  border-radius: 50%;
  box-shadow: 0 .7rem 1.5rem rgba(92,38,61,.28);
  transform: rotate(6deg);
}
.wax-seal::before { content: "♥"; position: absolute; inset-block-start: .5rem; opacity: .7; font-size: .7rem; }
.wax-seal span { margin-block-start: .45rem; font-family: "Songti SC", serif; font-size: .8rem; font-weight: 800; }

.ticket__body { position: relative; z-index: 2; padding: 1.15rem 1.35rem 1.65rem; }

.recipient-note,
.ownership-strip {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--blush-200);
  border-radius: 1rem;
}
.recipient-note__heart,
.ownership-strip > span { color: var(--rose-500); font-size: 1.35rem; }
.recipient-note strong,
.ownership-strip strong { display: block; font-size: .92rem; }
.recipient-note p,
.ownership-strip small { display: block; margin: .25rem 0 0; color: rgba(92,38,61,.66); font-size: .78rem; line-height: 1.5; }

.promise-list { display: grid; gap: .35rem; margin: 1rem 0; padding: 0; list-style: none; }
.promise-list li { display: flex; gap: .85rem; align-items: center; padding: .78rem .65rem; border-bottom: 1px dashed rgba(189,74,112,.24); }
.promise-list li > span { color: var(--gold); font-family: ui-monospace, monospace; font-size: .75rem; letter-spacing: .08em; }
.promise-list strong, .promise-list small { display: block; }
.promise-list strong { font-size: .9rem; }
.promise-list small { margin-top: .2rem; color: rgba(92,38,61,.62); font-size: .75rem; line-height: 1.45; }

.primary-action,
.secondary-action {
  display: inline-grid;
  place-items: center;
  inline-size: 100%;
  min-block-size: 48px;
  padding: .9rem 1.2rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: .95rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary-action { color: white; background: linear-gradient(135deg, var(--rose-500), var(--rose-800)); box-shadow: 0 .9rem 1.7rem rgba(143,54,87,.25); }
.secondary-action { color: var(--rose-800); background: white; border: 1px solid var(--blush-200); }
.primary-action:hover, .secondary-action:hover { transform: translateY(-1px); }
.primary-action:focus-visible, .secondary-action:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #5b72d8; outline-offset: 3px; }

.microcopy, .card-pending, .status-copy { color: rgba(92,38,61,.62); font-size: .75rem; line-height: 1.55; text-align: center; }
.status-copy:not(:empty) { padding: .75rem; color: var(--sage); background: rgba(95,116,94,.09); border-radius: .8rem; }

.service-form { margin-top: 1rem; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: .7rem; font-family: "Songti SC", serif; font-size: 1.25rem; font-weight: 800; }
.service-option { position: relative; display: grid; grid-template-columns: 1.15rem minmax(0, 1fr); gap: .55rem; align-items: center; min-block-size: 48px; margin-bottom: .55rem; padding: .72rem; background: #fff; border: 1px solid rgba(189,74,112,.18); border-radius: .9rem; cursor: pointer; }
.service-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.service-option__mark { inline-size: 1rem; block-size: 1rem; border: 1px solid var(--rose-500); border-radius: 50%; }
.service-option input:checked + .service-option__mark { background: radial-gradient(circle, white 0 28%, var(--rose-650) 31% 100%); }
.service-option strong, .service-option small { display: block; }
.service-option strong { font-size: .86rem; }
.service-option small { margin-top: .16rem; color: rgba(92,38,61,.58); font-size: .72rem; }
.service-form .primary-action { margin-top: .7rem; }

.card-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 .85rem; color: rgba(92,38,61,.5); font-size: .72rem; }
.card-divider::before, .card-divider::after { content: ""; flex: 1; border-top: 1px dashed rgba(189,74,112,.3); }

.message-panel { margin: .5rem 0 1rem; padding: 1rem; text-align: center; background: white; border: 1px solid var(--blush-200); border-radius: 1rem; }
.message-panel p { margin: 0; line-height: 1.7; }
.message-panel small { display: block; margin-top: .4rem; color: rgba(92,38,61,.62); }
.message-panel--error { color: #8b283f; background: #fff2f4; }

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-shell {
  position: relative;
  inline-size: min(100%, 76rem);
  min-block-size: 100vh;
  margin-inline: auto;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    clamp(1rem, 3vw, 2.5rem)
    max(3rem, env(safe-area-inset-bottom));
}

.admin-shell--login {
  display: grid;
  place-items: center;
  inline-size: min(100%, 34rem);
}

.admin-login-card {
  position: relative;
  overflow: hidden;
  inline-size: 100%;
  padding: clamp(2rem, 7vw, 3.5rem);
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(255,250,245,.97)),
    var(--porcelain);
  border: 1px solid rgba(143, 54, 87, .22);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
}

.admin-login-card::after {
  content: "";
  position: absolute;
  inset: .7rem;
  pointer-events: none;
  border: 1px dashed rgba(189, 74, 112, .32);
  border-radius: 1.25rem;
}

.admin-login-card > * { position: relative; z-index: 1; }
.admin-login-card h1 { font-size: clamp(2.4rem, 10vw, 4.25rem); }

.admin-login-mark {
  position: absolute;
  inset-block-start: 2rem;
  inset-inline-end: 2rem;
  display: grid;
  place-items: center;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  color: #fff8ef;
  background: radial-gradient(circle at 35% 25%, #eb8cab 0 8%, var(--rose-650) 36%, var(--rose-800) 100%);
  border: .28rem double rgba(255,248,239,.72);
  border-radius: 50%;
  box-shadow: 0 .7rem 1.5rem rgba(92,38,61,.24);
  transform: rotate(7deg);
}

.admin-login-mark span { font-size: 1.25rem; }

.admin-login-lead {
  max-inline-size: 27rem;
  margin: 1rem 0 1.75rem;
  color: rgba(92,38,61,.68);
  line-height: 1.75;
}

.admin-login-form { display: grid; gap: .7rem; }
.admin-login-form label { font-size: .82rem; font-weight: 760; }
.admin-login-form input {
  inline-size: 100%;
  min-block-size: 50px;
  padding: .8rem 1rem;
  color: var(--rose-950);
  background: white;
  border: 1px solid rgba(143,54,87,.3);
  border-radius: .85rem;
  font: inherit;
}
.admin-login-form .primary-action { margin-block-start: .35rem; }

.admin-alert {
  margin-block: 1rem;
  padding: .8rem 1rem;
  color: #86263f;
  background: #fff0f3;
  border: 1px solid #efb9c8;
  border-radius: .8rem;
  font-size: .82rem;
  line-height: 1.55;
}

.admin-privacy-note {
  margin: 1.25rem 0 0;
  color: rgba(92,38,61,.56);
  font-size: .72rem;
  line-height: 1.6;
}

.admin-masthead {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-block: 1rem 1.4rem;
}

.admin-masthead h1 { font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: .96; }
.admin-masthead p:last-child { max-inline-size: 38rem; margin: 1rem 0 0; color: rgba(92,38,61,.68); line-height: 1.7; }
.admin-masthead form { flex: 0 0 auto; }

.admin-logout {
  min-block-size: 44px;
  padding: .7rem 1rem;
  color: var(--rose-800);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(143,54,87,.24);
  border-radius: 999px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-logout:focus-visible { outline: 3px solid #5b72d8; outline-offset: 3px; }

.ledger-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.4rem;
  align-items: center;
  padding: .9rem 1.1rem;
  color: rgba(92,38,61,.74);
  background: rgba(255,250,245,.74);
  border: 1px solid rgba(143,54,87,.16);
  border-radius: 1rem;
  font-size: .75rem;
}

.ledger-status-strip span:first-child { color: var(--sage); font-weight: 760; }
.ledger-status-strip i { display: inline-block; inline-size: .5rem; block-size: .5rem; margin-inline-end: .35rem; background: #5d8a62; border-radius: 50%; box-shadow: 0 0 0 .25rem rgba(93,138,98,.12); }
.ledger-status-strip time { margin-inline-start: auto; }

.ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-block: .75rem;
}

.ledger-stat {
  min-block-size: 9rem;
  padding: 1.15rem;
  background: rgba(255,250,245,.9);
  border: 1px solid rgba(143,54,87,.15);
  border-radius: 1.1rem;
  box-shadow: 0 .8rem 2rem rgba(112,41,67,.07);
}

.ledger-stat span, .ledger-stat small { display: block; }
.ledger-stat span { color: rgba(92,38,61,.66); font-size: .75rem; }
.ledger-stat strong { display: block; margin-block: .4rem .3rem; color: var(--rose-800); font-family: "Songti SC", serif; font-size: 2.35rem; line-height: 1; }
.ledger-stat small { color: rgba(92,38,61,.5); font-size: .68rem; line-height: 1.45; }

.system-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: .75rem 1.4rem;
  overflow: hidden;
  color: #fff8f1;
  background: linear-gradient(125deg, var(--rose-950), #7e304e 70%, #9d4566);
  border-radius: 1.1rem;
  box-shadow: 0 1rem 2.4rem rgba(92,38,61,.17);
}

.system-ledger > div { padding: 1.15rem; border-inline-end: 1px solid rgba(255,255,255,.12); }
.system-ledger > div:last-child { border-inline-end: 0; }
.system-ledger span, .system-ledger strong, .system-ledger small { display: block; }
.system-ledger span { color: rgba(255,248,241,.66); font-size: .69rem; }
.system-ledger strong { margin-block: .35rem; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1.25rem; }
.system-ledger small { color: rgba(255,248,241,.52); font-size: .65rem; line-height: 1.45; }

.voucher-ledger-list { display: grid; gap: 1.25rem; }

.voucher-ledger {
  position: relative;
  overflow: hidden;
  padding: clamp(1.15rem, 3vw, 2rem);
  background:
    linear-gradient(rgba(255,250,245,.93), rgba(255,250,245,.93)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 39.5h40M39.5 0v40' stroke='%23bd4a70' stroke-opacity='.1'/%3E%3C/svg%3E");
  border: 1px solid rgba(143,54,87,.2);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.voucher-ledger::after {
  content: "";
  position: absolute;
  inset: .55rem;
  pointer-events: none;
  border: 1px dashed rgba(189,74,112,.24);
  border-radius: 1rem;
}

.voucher-ledger > * { position: relative; z-index: 1; }

.voucher-ledger__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: .35rem .25rem 1.2rem;
  border-bottom: 1px dashed rgba(143,54,87,.22);
}

.voucher-ledger__header h2 { margin: 0 0 .4rem; font-family: "Songti SC", serif; font-size: clamp(1.8rem, 4vw, 2.65rem); line-height: 1.05; }
.public-id { color: rgba(92,38,61,.55); font-size: .72rem; overflow-wrap: anywhere; }

.status-chip {
  flex: 0 0 auto;
  padding: .48rem .75rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 780;
}
.status-chip--claimed { color: #315b39; background: #e5f3e6; border: 1px solid #b9d4bb; }
.status-chip--ready { color: #855f16; background: #fff4d5; border: 1px solid #ead39a; }
.status-chip--revoked, .status-chip--expired, .status-chip--unknown { color: #7b2b3d; background: #fae4e8; border: 1px solid #e8b6c1; }

.ledger-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: .8rem; margin-block: .8rem; }
.ledger-panel { padding: 1rem; background: rgba(255,255,255,.72); border: 1px solid rgba(143,54,87,.13); border-radius: 1rem; }
.ledger-panel--full { margin-block-start: .8rem; }
.ledger-panel__heading { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; margin-block-end: .8rem; }
.ledger-panel__heading span { font-family: "Songti SC", serif; font-size: 1.06rem; font-weight: 800; }
.ledger-panel__heading small { color: rgba(92,38,61,.48); font-size: .65rem; }

.ledger-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ledger-step { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .7rem; min-block-size: 3.5rem; }
.ledger-step:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: .79rem; inset-block-start: 1.75rem; block-size: calc(100% - .45rem); border-inline-start: 1px dashed rgba(143,54,87,.28); }
.ledger-step > span { position: relative; z-index: 1; display: grid; place-items: center; inline-size: 1.6rem; block-size: 1.6rem; color: rgba(92,38,61,.52); background: #fff; border: 1px solid rgba(143,54,87,.24); border-radius: 50%; font-family: ui-monospace, monospace; font-size: .62rem; }
.ledger-step--done > span { color: #fff; background: var(--rose-650); border-color: var(--rose-650); }
.ledger-step--active > span { color: #fff; background: var(--sage); border-color: var(--sage); }
.ledger-step strong, .ledger-step small, .ledger-step time { display: block; }
.ledger-step strong { font-size: .78rem; }
.ledger-step small, .ledger-step time { margin-block-start: .16rem; color: rgba(92,38,61,.52); font-size: .66rem; }

.ledger-facts { display: grid; gap: 0; margin: 0; }
.ledger-facts > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .6rem; padding-block: .72rem; border-bottom: 1px dashed rgba(143,54,87,.17); }
.ledger-facts > div:last-child { border-bottom: 0; }
.ledger-facts dt { color: rgba(92,38,61,.58); font-size: .7rem; }
.ledger-facts dd { min-inline-size: 0; margin: 0; text-align: end; }
.ledger-facts dd strong, .ledger-facts dd code, .ledger-facts dd small { display: block; }
.ledger-facts dd strong, .ledger-facts dd code { color: var(--rose-950); font-size: .75rem; overflow-wrap: anywhere; }
.ledger-facts dd small { margin-block-start: .18rem; color: rgba(92,38,61,.46); font-size: .61rem; line-height: 1.4; }

.ledger-owner { display: flex; gap: .7rem; align-items: center; margin-block-end: .55rem; padding: .7rem; background: linear-gradient(135deg, #fff7fa, #fff); border: 1px solid rgba(143,54,87,.14); border-radius: .85rem; }
.ledger-owner > img, .ledger-owner > span { flex: 0 0 auto; inline-size: 2.6rem; block-size: 2.6rem; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 .25rem .7rem rgba(92,38,61,.14); }
.ledger-owner > img { object-fit: cover; }
.ledger-owner > span { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ef8cab, #a83d63); font-size: .54rem; font-weight: 780; }
.ledger-owner small, .ledger-owner strong { display: block; }
.ledger-owner small { color: rgba(92,38,61,.5); font-size: .6rem; }
.ledger-owner strong { margin-block-start: .15rem; font-size: .78rem; }

.redemption-list { display: grid; gap: .5rem; }
.redemption-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .78rem; background: #fff; border: 1px solid rgba(95,116,94,.2); border-radius: .75rem; }
.redemption-row strong, .redemption-row__kicker { display: block; }
.redemption-row__kicker { margin-block-end: .18rem; color: var(--sage); font-size: .61rem; font-weight: 700; }
.redemption-row strong { font-size: .78rem; }
.redemption-row time { flex: 0 0 auto; color: rgba(92,38,61,.52); font-size: .65rem; }

.ledger-empty, .admin-empty-state { padding: 1.35rem; text-align: center; background: rgba(255,255,255,.58); border: 1px dashed rgba(143,54,87,.23); border-radius: .8rem; }
.ledger-empty strong, .ledger-empty span { display: block; }
.ledger-empty strong, .admin-empty-state strong { font-family: "Songti SC", serif; }
.ledger-empty span, .admin-empty-state p { margin: .35rem 0 0; color: rgba(92,38,61,.5); font-size: .7rem; }

.admin-footer { margin-block-start: 1.25rem; padding: 1rem 1.15rem; color: rgba(92,38,61,.64); background: rgba(255,250,245,.6); border: 1px solid rgba(143,54,87,.12); border-radius: 1rem; }
.admin-footer strong { color: var(--rose-800); font-size: .75rem; }
.admin-footer p { margin: .35rem 0 0; font-size: .67rem; line-height: 1.6; }

.claim-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-block-end: 1rem;
}
.claim-facts > div { padding: .9rem; background: #fff; border: 1px solid var(--blush-200); border-radius: .85rem; }
.claim-facts span, .claim-facts strong { display: block; }
.claim-facts span { color: rgba(92,38,61,.56); font-size: .68rem; }
.claim-facts strong { margin-block-start: .3rem; font-size: .82rem; }
.privacy-explainer { margin-block-start: 1rem; padding: 1rem; background: rgba(198,154,80,.09); border: 1px solid rgba(198,154,80,.28); border-radius: .9rem; }
.privacy-explainer strong { font-size: .8rem; }
.privacy-explainer p { margin: .35rem 0 0; color: rgba(92,38,61,.62); font-size: .72rem; line-height: 1.55; }

.holder-nav { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-block-end: .8rem; font-size: .7rem; }
.holder-nav a { color: var(--rose-800); font-weight: 750; text-decoration: none; }
.holder-nav span { color: rgba(92,38,61,.55); text-align: end; }
.request-state { margin-block: 1rem; padding: 1.1rem; background: #fff; border: 1px solid var(--blush-200); border-radius: 1rem; }
.request-state h2 { margin: .55rem 0 .35rem; font-family: "Songti SC", serif; font-size: 1.3rem; }
.request-state p { margin: 0; color: rgba(92,38,61,.68); font-size: .8rem; line-height: 1.65; }
.request-state small { display: block; margin-block-start: .55rem; color: rgba(92,38,61,.5); font-size: .68rem; line-height: 1.5; }
.request-state--confirmed { border-color: rgba(95,116,94,.34); background: #f8fcf7; }
.request-state--completed { border-color: rgba(95,116,94,.34); background: linear-gradient(145deg, #f5fbf3, #fff); }
.request-state--closed { background: #fff3f5; }
.text-action { min-block-size: 42px; margin-block-start: .7rem; padding: .55rem .8rem; color: var(--rose-800); background: transparent; border: 1px solid rgba(143,54,87,.25); border-radius: 999px; font: inherit; font-size: .72rem; font-weight: 730; cursor: pointer; }
.text-action:focus-visible { outline: 3px solid #5b72d8; outline-offset: 3px; }
.request-chip { display: inline-block; padding: .32rem .55rem; border-radius: 999px; font-size: .62rem; font-weight: 760; }
.request-chip--pending { color: #835f18; background: #fff1c9; }
.request-chip--confirmed { color: #315b39; background: #e4f2e5; }
.request-chip--completed { color: #315b39; background: #d9edda; }
.request-chip--rejected, .request-chip--cancelled, .request-chip--unknown { color: #7b2b3d; background: #f8e5e9; }
.holder-history { margin-block-start: 1.1rem; padding-block-start: 1rem; border-top: 1px dashed rgba(143,54,87,.25); }
.holder-history h2 { margin: 0 0 .65rem; font-family: "Songti SC", serif; font-size: 1rem; }
.holder-history__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: .75rem 0; border-bottom: 1px dashed rgba(143,54,87,.17); }
.holder-history__item strong { display: block; margin-block-start: .28rem; font-size: .76rem; }
.holder-history__item time { color: rgba(92,38,61,.5); font-size: .64rem; }
.holder-history__item p { grid-column: 1 / -1; margin: 0; color: rgba(92,38,61,.62); font-size: .7rem; }

.wallet-shell { inline-size: min(100%, 44rem); min-block-size: 100vh; margin-inline: auto; padding: max(1rem, env(safe-area-inset-top)) 1rem max(3rem, env(safe-area-inset-bottom)); }
.wallet-header { position: relative; overflow: hidden; margin-block-end: 1rem; padding: clamp(1.25rem, 5vw, 2rem); color: #fff9f2; background: linear-gradient(138deg, #572239 0%, #913855 52%, #c1557b 100%); border: 1px solid rgba(255,255,255,.22); border-radius: 1.65rem; box-shadow: 0 1.5rem 3.6rem rgba(92,38,61,.23); isolation: isolate; }
.wallet-header::before, .wallet-header::after { content: ""; position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.wallet-header::before { inset-block-start: -6rem; inset-inline-end: -3rem; inline-size: 13rem; block-size: 13rem; box-shadow: 0 0 0 2rem rgba(255,255,255,.035), 0 0 0 4rem rgba(255,255,255,.025); }
.wallet-header::after { inset-block-end: -4.5rem; inset-inline-start: -3rem; inline-size: 8rem; block-size: 8rem; }
.wallet-header .eyebrow { margin-block-start: 1.35rem; color: #ffd2df; }
.wallet-header h1 { max-inline-size: 29rem; color: #fffaf5; font-size: clamp(2.15rem, 9vw, 3.75rem); line-height: 1.04; text-wrap: balance; }
.wallet-header > p:last-child { max-inline-size: 34rem; margin: .9rem 0 0; color: rgba(255,249,242,.72); font-size: .8rem; line-height: 1.7; }
.wallet-identity { display: flex; gap: .75rem; align-items: center; inline-size: fit-content; max-inline-size: 100%; padding: .55rem .8rem .55rem .58rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; backdrop-filter: blur(8px); }
.wallet-identity > img, .wallet-identity__fallback { flex: 0 0 auto; inline-size: 2.5rem; block-size: 2.5rem; border: 2px solid rgba(255,255,255,.74); border-radius: 50%; box-shadow: 0 .4rem 1rem rgba(42,10,25,.22); }
.wallet-identity > img { object-fit: cover; }
.wallet-identity__fallback { display: grid; place-items: center; color: #9f3e61; background: #ffe3eb; }
.wallet-identity div { min-inline-size: 0; }
.wallet-identity small, .wallet-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-identity small { color: rgba(255,249,242,.66); font-size: .58rem; letter-spacing: .04em; }
.wallet-identity strong { margin-block-start: .14rem; font-size: .78rem; }
.wallet-list { display: grid; gap: 1rem; }
.wallet-card { overflow: hidden; background: rgba(255,250,245,.97); border: 1px solid rgba(143,54,87,.18); border-radius: 1.55rem; box-shadow: 0 1.15rem 2.7rem rgba(112,41,67,.13); }
.wallet-card__cover { position: relative; overflow: hidden; block-size: clamp(10rem, 34vw, 14rem); background: #efd0d8; }
.wallet-card__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(83,29,52,.77) 0%, rgba(83,29,52,.23) 52%, rgba(83,29,52,.02) 100%); }
.wallet-card__cover img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 70% center; }
.wallet-card__cover .status-chip { position: absolute; z-index: 2; inset-block-start: 1rem; inset-inline-end: 1rem; background: rgba(255,250,245,.92); box-shadow: 0 .35rem .9rem rgba(67,17,39,.14); backdrop-filter: blur(8px); }
.wallet-card__mark { position: absolute; z-index: 2; inset-inline-start: 1.1rem; inset-block-end: 1rem; color: #fff9f2; font-family: "Songti SC", serif; font-size: 1.25rem; font-weight: 800; letter-spacing: .08em; text-shadow: 0 .2rem .7rem rgba(52,12,31,.35); }
.wallet-card__body { padding: 1.15rem; }
.wallet-card h2 { margin: .15rem 0 .9rem; color: var(--rose-950); font-family: "Songti SC", serif; font-size: clamp(1.7rem, 6vw, 2.25rem); line-height: 1.08; }
.wallet-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; overflow: hidden; background: #fff; border: 1px solid rgba(143,54,87,.14); border-radius: .95rem; }
.wallet-card__facts > div { min-inline-size: 0; padding: .8rem .7rem; border-inline-end: 1px dashed rgba(143,54,87,.18); }
.wallet-card__facts > div:last-child { border-inline-end: 0; }
.wallet-card__facts dt, .wallet-card__facts dd { overflow-wrap: anywhere; }
.wallet-card__facts dt { color: rgba(92,38,61,.52); font-size: .61rem; }
.wallet-card__facts dd { margin: .3rem 0 0; color: var(--rose-950); font-size: .72rem; font-weight: 760; line-height: 1.35; }
.wallet-card__activity { margin: .75rem 0; padding: .7rem .8rem; color: rgba(92,38,61,.62); background: rgba(198,154,80,.08); border-radius: .75rem; font-size: .7rem; line-height: 1.5; }
.wallet-card .secondary-action { background: transparent; }
.wallet-empty { padding: 2rem 1.25rem; text-align: center; background: rgba(255,250,245,.84); border: 1px dashed rgba(143,54,87,.28); border-radius: 1.4rem; }
.wallet-empty > span { color: var(--rose-500); font-size: 2rem; }
.wallet-empty h2 { margin: .65rem 0 .35rem; font-family: "Songti SC", serif; font-size: 1.35rem; }
.wallet-empty p { margin: 0; color: rgba(92,38,61,.58); font-size: .75rem; line-height: 1.65; }

.admin-shell--issued { display: grid; place-items: center; inline-size: min(100%, 70rem); }
.issued-card { inline-size: 100%; padding: clamp(1.4rem, 4vw, 2.5rem); background: rgba(255,250,245,.97); border: 1px solid rgba(143,54,87,.2); border-radius: 1.5rem; box-shadow: var(--shadow); }
.issued-card h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); }
.issued-lead { max-inline-size: 42rem; color: rgba(92,38,61,.67); line-height: 1.7; }
.issued-grid { display: grid; grid-template-columns: minmax(19rem, .95fr) minmax(0, 1.05fr); gap: 1.2rem; align-items: start; margin-block: 1.3rem; }
.poster-sheet, .issued-details { padding: 1.1rem; background: #fff; border: 1px solid var(--blush-200); border-radius: 1rem; }
.poster-stage { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: linear-gradient(145deg, #f4b2c8, #ffe9ef 52%, #fff6ee); border: 1px solid rgba(143,54,87,.14); border-radius: .9rem; box-shadow: 0 1rem 2.2rem rgba(112,41,67,.12); }
.poster-loading { position: absolute; inset: 0; display: grid; place-content: center; gap: .65rem; color: rgba(92,38,61,.68); text-align: center; }
.poster-loading span { color: var(--rose-500); font-family: "Songti SC", serif; font-size: 2.6rem; animation: poster-heart 1.4s ease-in-out infinite; }
.poster-loading strong { font-size: .76rem; }
.poster-loading[hidden], .claim-poster-preview[hidden], [data-poster-qr-source][hidden], .poster-fallback[hidden] { display: none; }
.claim-poster-preview { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.poster-download { margin-block-start: .9rem; }
.poster-download[aria-disabled="true"] { opacity: .56; pointer-events: none; }
.poster-fallback { inline-size: 100%; justify-content: center; }
.poster-save-note, .poster-noscript { margin: .65rem 0 0; color: rgba(92,38,61,.55); font-size: .66rem; line-height: 1.55; text-align: center; }
.issued-details__label { margin: 0; color: var(--rose-800); font-family: "Songti SC", serif; font-size: 1.15rem; font-weight: 800; }
.issued-steps { display: grid; gap: .55rem; margin: .8rem 0 0; padding-inline-start: 1.35rem; color: rgba(92,38,61,.72); font-size: .78rem; line-height: 1.55; }
.issued-details dl { margin-block-start: 1.2rem; }
.issued-details dl > div { display: flex; gap: 1rem; justify-content: space-between; padding-block: .65rem; border-bottom: 1px dashed rgba(143,54,87,.2); }
.issued-details dt { color: rgba(92,38,61,.56); font-size: .7rem; }
.issued-details dd { margin: 0; font-size: .75rem; font-weight: 740; text-align: end; }

@keyframes poster-heart { 0%, 100% { opacity: .52; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }

.issue-station { display: grid; grid-template-columns: .72fr 1.28fr; gap: 1.2rem; margin-block: .8rem; padding: clamp(1.1rem, 3vw, 1.7rem); color: #fff8f1; background: linear-gradient(125deg, var(--rose-950), #7e304e 70%, #9d4566); border-radius: 1.2rem; box-shadow: 0 1rem 2.4rem rgba(92,38,61,.17); }
.issue-station__intro h2 { margin: 0; font-family: "Songti SC", serif; font-size: clamp(1.6rem, 3vw, 2.5rem); }
.issue-station__intro > p:last-child { color: rgba(255,248,241,.65); font-size: .75rem; line-height: 1.65; }
.issue-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.issue-form label, .admin-action label { font-size: .68rem; font-weight: 720; }
.issue-form input, .admin-action input { display: block; inline-size: 100%; min-block-size: 44px; margin-block-start: .3rem; padding: .65rem .75rem; color: var(--rose-950); background: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: .7rem; font: inherit; }
.issue-form .primary-action { grid-column: 1 / -1; margin-block-start: .2rem; background: linear-gradient(135deg, #ec82a3, #c14c72); box-shadow: none; }
.status-chip--used { color: #315b39; background: #d9edda; border: 1px solid #a9cbaa; }
.voucher-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-block-start: .8rem; padding-block-start: .8rem; border-top: 1px dashed rgba(143,54,87,.2); }
.admin-action { display: grid; gap: .45rem; align-items: end; }
.admin-action button { min-block-size: 40px; padding: .55rem .75rem; color: var(--rose-800); background: #fff; border: 1px solid rgba(143,54,87,.26); border-radius: .65rem; font: inherit; font-size: .7rem; font-weight: 730; cursor: pointer; }
.admin-action--danger button { color: #842e43; background: #fff1f3; border-color: #e6b1bd; }
.admin-action--complete button { color: #315b39; background: #eef8ed; border-color: #b8d3ba; }
.redemption-row--operational { display: grid; grid-template-columns: minmax(12rem, .7fr) minmax(0, 1.3fr); align-items: end; }
.redemption-row__summary time, .redemption-row__summary p { display: block; margin: .25rem 0 0; color: rgba(92,38,61,.5); font-size: .65rem; }
.redemption-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }

@media (min-width: 48rem) {
  .page-shell { padding-block-start: 3rem; }
  .ticket { border-radius: 2rem; }
}

@media (max-width: 47.99rem) {
  .admin-login-mark { inset-block-start: 1.5rem; inset-inline-end: 1.5rem; inline-size: 3.5rem; block-size: 3.5rem; }
  .admin-masthead { display: block; }
  .admin-masthead form { margin-block-start: 1rem; }
  .ledger-status-strip { align-items: flex-start; }
  .ledger-status-strip time { inline-size: 100%; margin-inline-start: 0; }
  .ledger-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-stat { min-block-size: 7.5rem; }
  .system-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-ledger > div:nth-child(2) { border-inline-end: 0; }
  .system-ledger > div:nth-child(-n+2) { border-block-end: 1px solid rgba(255,255,255,.12); }
  .ledger-grid { grid-template-columns: minmax(0, 1fr); }
  .voucher-ledger__header { align-items: center; }
  .ledger-facts > div { grid-template-columns: 5rem minmax(0, 1fr); }
  .redemption-row { align-items: flex-start; }
  .claim-facts, .issued-grid, .issue-station, .issue-form, .redemption-row--operational, .redemption-actions { grid-template-columns: minmax(0, 1fr); }
  .wallet-card { grid-template-columns: minmax(0, 1fr); }
  .issue-form .primary-action { grid-column: 1; }
  .voucher-actions { display: grid; }
  .voucher-actions .admin-action { inline-size: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: ticket-arrive .55s cubic-bezier(.2,.7,.2,1) both; }
  .wax-seal { animation: seal-arrive .7s .18s cubic-bezier(.2,.8,.2,1) both; }
  .primary-action, .secondary-action { transition: transform .16s ease, box-shadow .16s ease; }
  @keyframes ticket-arrive { from { opacity: 0; transform: translateY(1rem) scale(.985); } }
  @keyframes seal-arrive { from { opacity: 0; transform: rotate(18deg) scale(.6); } }
}

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