.coupon-panel {
  color: #efe8df;
  --coupon-line: #625952;
  --coupon-muted: #c6bdb5;
}
#view-profile #profileCoupons {
  display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.25fr);
  align-items: center; column-gap: clamp(18px,4vw,46px); row-gap: 8px;
  margin: 0; padding: clamp(18px,3vw,26px);
  border: 0; border-radius: 6px;
  background: #30292b;
}
#profileCoupons > h2 { grid-column: 1; align-self: end; margin: 0; color: #f9e6c9; }
#profileCoupons > p:not(.coupon-message) { grid-column: 1; margin: 0; align-self: start; line-height: 1.6; word-break: keep-all; }
#profileCoupons .coupon-form { grid-column: 2; grid-row: 1 / 3; margin: 0; }
#profileCoupons :is(.coupon-message,#couponWallet) { grid-column: 1 / -1; }
#profileCoupons #couponWallet:empty { display: none; }
#profileCoupons .coupon-controls { align-items: stretch; }
#profileCoupons input { flex: 1 1 10rem; width: 100%; }
#profileCoupons .btn-primary, #couponIssued .btn-primary {
  background: #e5c9a5; color: #2c2124; border: 1px solid #e5c9a5; font-weight: 650;
}
#view-profile .pf-menu-item { padding-inline: 2px 10px; }
#couponIssued h3 { margin: 0; color: #f6e7d4; font: 600 1.2rem/1.55 var(--serif); }
#couponGiftDeadline { margin-block: .2rem 1rem; color: #e4c9a6; }
#couponGiftPreview { margin-top: .9rem; padding-top: .65rem; border-top: 1px solid var(--coupon-line); }
#couponGiftPreview summary { cursor: pointer; box-sizing: border-box; min-height: 44px; padding-block: .65rem; }
#couponGiftText {
  box-sizing: border-box; display: block; width: 100%; margin: .5rem 0 0; padding: 12px;
  border: 1px solid var(--coupon-line); border-radius: 6px; color: #f2ebe4;
  background: #241f22; font: 400 16px/1.65 var(--sans); resize: vertical;
}
@media (max-width: 740px) {
  #view-profile #profileCoupons { display: block; }
  #profileCoupons .coupon-form { margin-top: 14px; }
}
.coupon-panel h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.coupon-panel :is(label,small) { display: block; }
.coupon-panel label { font-weight: 600; line-height: 1.5; }
.coupon-panel :is(p,small) { color: var(--coupon-muted); }
.coupon-panel small { margin-top: .3rem; line-height: 1.55; }
.coupon-form { margin-top: 1rem; }
.coupon-controls, .coupon-issue-form, .coupon-list-head {
  display: flex; align-items: end; gap: .6rem; flex-wrap: wrap;
}
.coupon-controls { margin-top: .4rem; }
.coupon-panel :is(input,select), .report-coupon-entry input {
  box-sizing: border-box; min-width: 0; min-height: 44px; margin: 0;
  padding: .55rem .8rem; border: 1px solid var(--coupon-line); border-radius: 7px;
  font: inherit; font-size: max(16px, 1rem);
}
.coupon-panel :is(input,select) {
  background: #211e21; color: #f0e8de; color-scheme: dark;
}
.coupon-panel input::placeholder { color: #b3a8a4; font-weight: 400; }
.coupon-controls input { flex: 1 1 14rem; }
.coupon-panel .btn, .coupon-panel .text-action {
  min-height: 44px; width: auto; height: auto;
  padding: .55rem .95rem; font-size: .95rem; line-height: 1.45;
  white-space: nowrap; letter-spacing: 0;
}
.coupon-issue-form > label { flex: 1 1 11rem; }
.coupon-issue-form select { display: block; width: 100%; margin-top: .35rem; }
.coupon-issued {
  margin: 1.25rem 0; padding: clamp(16px,4vw,26px); border: 0;
  border-radius: 4px; background: #342d2e;
}
.coupon-issued[hidden] { display: none; }
.coupon-issued p { margin: .3rem 0 .7rem; }
.coupon-issued input { width: 100%; font: 600 1rem/1.6 ui-monospace, monospace; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.coupon-issued .coupon-controls { margin-top: .7rem; }
.coupon-message:empty { display: none; }
.coupon-panel .coupon-message { margin: .75rem 0; line-height: 1.65; color: #e5cba5; overflow-wrap: anywhere; }
.coupon-list-head { align-items: center; justify-content: space-between; border-bottom: 1px solid var(--coupon-line); margin-top: 1.4rem; }
.coupon-list-head h3 { margin: 0; }
.coupon-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem;
  padding: .85rem 0; border-bottom: 1px solid var(--coupon-line);
}
.coupon-row > div { min-width: 0; flex: 1 1 10rem; }
.coupon-row strong { font-size: .96rem; line-height: 1.5; }
.coupon-state { color: var(--coupon-muted); font-size: .88rem; white-space: nowrap; }
.coupon-panel .coupon-action {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .35rem .6rem; border: 0; border-radius: 4px; background: transparent;
  color: #eed2ab; font: inherit; font-size: .9rem; text-decoration: underline;
  text-underline-offset: .24em; cursor: pointer;
}
.coupon-panel :focus-visible, details.report-coupon-use :focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
details.report-coupon-use {
  display: block; min-width: 0; width: 100%; box-sizing: border-box; margin: .8rem 0 0;
  color: inherit; border-block-start: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 26%, transparent);
  text-align: start; font: inherit;
}
details.report-coupon-use > summary {
  display: list-item; padding: .7rem .15rem; min-height: 44px; box-sizing: border-box;
  color: inherit; font-size: .94rem; font-weight: 600; line-height: 1.6; cursor: pointer;
}
.report-coupon-body { display: grid; gap: .6rem; padding: .15rem 0 .8rem; min-width: 0; }
.report-coupon-entry { display: grid; gap: .4rem; min-width: 0; }
.report-coupon-entry { font-size: .9rem; }
.report-coupon-use [hidden] { display: none !important; }
.report-coupon-entry input {
  width: 100%; color: #282326; background: #fffaf4; border-color: #82756a; color-scheme: light;
}
.report-coupon-use .report-coupon-status { margin: 0; color: inherit; font-size: .9rem; line-height: 1.65; overflow-wrap: anywhere; }
.report-coupon-status:empty { display: none; }
.report-coupon-use button {
  justify-self: start; box-sizing: border-box; min-width: 0; min-height: 44px; max-width: 100%;
  padding: .55rem .9rem; border: 1px solid currentColor; border-radius: 7px;
  color: inherit; background: transparent; font: inherit; font-size: .94rem; line-height: 1.45; cursor: pointer;
}
@media (max-width: 480px) {
  .coupon-controls input { flex: 1 1 100%; }
  #couponIssued .coupon-controls { display: grid; grid-template-columns: 1fr 1fr; }
  #couponCopyGift { grid-column: 1 / -1; }
  .coupon-issue-form { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .coupon-form .btn { width: 100%; }
  .report-coupon-use button { justify-self: stretch; }
}
.admin-benefit-dialog {
  width:min(420px,calc(100% - 32px)); max-height:calc(100dvh - 40px);
  margin:auto; padding:0; border:1px solid #5c5049; border-radius:16px;
  background:#292426; color:#f5ede5; box-shadow:0 20px 60px #100d0f66;
}
.admin-benefit-dialog::backdrop {background:#161215b8}
.admin-benefit-dialog [hidden] {display:none!important}
.admin-benefit-dialog .admin-perm-modal {width:100%;box-sizing:border-box;padding:clamp(18px,5vw,28px);border:0;background:transparent;box-shadow:none}
.admin-benefit-dialog .admin-perm-head {align-items:center;padding-bottom:16px;border-bottom:1px solid #52474a}
.admin-benefit-dialog .admin-perm-head h3 {color:#f7edde;font-size:25px}
.admin-benefit-dialog .admin-perm-head small {color:#cfbfb5;font-size:14px}
.admin-benefit-dialog .admin-perm-close {min-width:44px;min-height:44px}
.admin-benefit-dialog .admin-perm-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;background:#201c1e;border-radius:10px}
.admin-benefit-dialog .admin-perm-option {min-height:44px;padding:8px 6px;border:0;border-radius:7px;background:transparent;text-align:center}
.admin-benefit-dialog .admin-perm-option b {margin:0;color:#d2c7c1;font-size:15px}
.admin-benefit-dialog .admin-perm-option.active {background:#483c3c;box-shadow:none}
.admin-benefit-dialog .admin-perm-option.active b {color:#f8e1ba}
.admin-benefit-dialog .admin-perm-count {flex:1;min-height:44px;font-size:14px}
.admin-benefit-dialog .admin-perm-note,.admin-benefit-dialog [data-member-coupon] p {color:#d8cbc2;font-size:14px;line-height:1.65}
.admin-benefit-dialog [data-member-coupon] {display:grid;gap:12px}
.admin-benefit-dialog [data-member-coupon] p {margin:0}
.admin-benefit-dialog [role=status]:empty {display:none}
.admin-benefit-dialog select {width:100%;min-width:0;min-height:46px;border:1px solid #716065;border-radius:6px;padding:8px;background:#241f21;color:#f6ece4;font:inherit;font-size:16px}
.admin-benefit-dialog :is(.admin-perm-actions .btn,.coupon-action) {width:100%;min-height:46px;justify-content:center;border:0;border-radius:7px;background:#e6cda8;color:#30241c;font-weight:700}
.admin-benefit-dialog button:disabled {opacity:.55}
