#shop-page {
  max-width: 1100px;
  margin-inline: auto;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.shop-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 5px 0 24px; }
.shop-heading .page-heading { margin: 0; }
.shop-heading .page-heading h1 { margin-bottom: 7px; }
.shop-heading .page-heading p { font-size: 1rem; }
.shop-wallet {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-height: 48px; padding: 10px 17px;
  border: 1px solid #c8a47052; border-radius: 12px; background: #241f1b; color: var(--gold);
}
.shop-wallet span { color: #d2c4b9; font-size: .8125rem; }
.shop-wallet strong { font-variant-numeric: tabular-nums; font-size: 1rem; }
.shop-delivery {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border: 1px solid #ecd4b122; border-radius: 14px; background: linear-gradient(115deg, #2c251e, #211d21 70%);
}
.shop-envelope { flex: 0 0 40px; display: grid; place-items: center; height: 40px; color: var(--gold); font: 2rem/1 Georgia, serif; }
.shop-delivery h2 { margin: 0 0 3px; font-size: 1.0625rem; }
.shop-delivery p { margin: 0; font-size: .875rem; line-height: 1.65; color: #d4c9c5; }
.shop-delivery p span { display: inline-block; }
.shop-tabs { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0; border-bottom: 1px solid var(--line); }
.shop-tabs nav { display: flex; gap: 24px; }
.shop-tabs nav button {
  position: relative; min-height: 50px; padding: 5px 0; border: 0; background: transparent;
  color: var(--muted); font-size: 1rem; font-weight: 700;
}
.shop-tabs nav button[aria-pressed="true"] { color: var(--ink); }
.shop-tabs nav button[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--gold); }
#shop-operator-link { padding: 10px 0; font-size: .875rem; color: var(--gold); text-decoration: none; }
#shop-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem; color: var(--gold); font-size: .875rem; }
#shop-notice { margin: 0; }
#shop-notice:not(:empty), #shop-recovery {
  padding: 11px 14px; margin-bottom: 15px; background: #282320; border: 1px solid #c8a47050;
  border-radius: 10px; color: var(--gold); font-size: .875rem; line-height: 1.6;
}
#shop-recovery:not([hidden]) { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 8px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shop-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.shop-ticket {
  --ticket-color: #d2b488;
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: 142px; border-radius: 8px; color: #262019;
  background: linear-gradient(115deg, #ffffff38, transparent 64%), var(--ticket-color);
}
.shop-ticket[data-palette="ruby"] { --ticket-color: #ddaaa3; }
.shop-ticket[data-palette="jade"] { --ticket-color: #a9c8ae; }
.shop-ticket[data-palette="blue"] { --ticket-color: #a1c3d9; }
.shop-ticket-copy { position: relative; z-index: 1; min-width: 0; flex: 1; padding: 20px 10px 20px 18px; }
.shop-ticket h3 { margin: 0 0 8px; font-size: clamp(.95rem, 1.2vw, 1.1rem); line-height: 1.4; letter-spacing: -.04em; }
.shop-ticket-copy > span { display: block; font-size: clamp(1.3rem, 2.1vw, 1.85rem); line-height: 1.1; font-weight: 800; letter-spacing: -.055em; }
.shop-ticket-stub {
  width: 15%; max-width: 48px; align-self: stretch; border-left: 2px dashed #3d3a341f;
  background: repeating-linear-gradient(138deg, transparent, transparent 7px, #fff3 7px, #fff3 8px);
}
.shop-ticket-stub::before, .shop-ticket-stub::after {
  content: ""; position: absolute; right: -6px; top: calc(50% - 7px); width: 13px; height: 14px;
  border-radius: 50%; background: var(--surface);
}
.shop-ticket-stub::after { right: auto; left: -6px; }
.shop-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 14px 2px 2px; }
.shop-card-footer small, .shop-card-footer strong { display: block; }
.shop-card-footer small { margin-bottom: 2px; color: var(--muted); font-size: .75rem; }
.shop-card-footer strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.shop-card-footer .secondary-button { min-height: 44px; padding-inline: 14px; color: var(--gold); font-size: .875rem; }
.shop-empty { display: grid; justify-items: center; align-content: center; min-height: 185px; gap: 7px; text-align: center; padding: 22px; border: 1px dashed #ffffff29; border-radius: 14px; }
.shop-empty h3 { margin: 0; font-size: 1.0625rem; }
.shop-empty p { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.shop-empty button { margin-top: 8px; }
.shop-orders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shop-order { padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.shop-order header, .shop-order footer, .shop-totals div, .shop-check-product { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; }
.shop-order-state { color: var(--gold); font-weight: 750; font-size: .875rem; }
[data-order-status="sent"] .shop-order-state { color: #a9d7bd; }
[data-order-status="cancelled"] .shop-order-state { color: #d6bdcc; }
.shop-order time, .shop-order footer small { font-size: .75rem; color: var(--muted); }
.shop-order h3 { margin: 12px 0 2px; font-size: 1.0625rem; }
.shop-order h3 span { display: inline-block; font-size: .875rem; }
.shop-order p { margin: 6px 0 12px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.shop-order p strong { color: var(--ink); overflow-wrap: anywhere; }
.shop-order footer { border-top: 1px solid var(--line); padding-top: 10px; font-size: .8125rem; }
.shop-more { display: flex; margin: 16px auto 0; }
.shop-check-product { gap: 4px; align-items: center; }
.shop-check-product strong { color: var(--ink); font-size: 1.0625rem; }
.shop-check-product span { font-size: .9375rem; }
.shop-totals { display: grid; gap: 5px; margin: 12px 0 18px; padding: 14px; border-radius: 10px; background: #ffffff08; }
.shop-totals div { font-size: .875rem; }
.shop-totals dt, .shop-recipient span { color: var(--muted); }
.shop-totals dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.shop-totals div:last-child dd { color: var(--gold); }
#shop-order-form label, .shop-recipient span { display: block; margin-bottom: 5px; font-size: .875rem; }
#shop-email { display: block; width: 100%; min-height: 46px; background: #151216; color: var(--ink); border: 1px solid #ffffff36; border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 1rem; }
#shop-checkout .shop-field-hint, #shop-checkout .shop-terms, #shop-checkout .shop-retry-note { margin: 6px 0 15px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.shop-recipient { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 5px; }
.shop-recipient span { grid-column: 1 / -1; }
.shop-recipient strong { overflow-wrap: anywhere; color: var(--ink); }
.shop-recipient button { min-height: 36px; padding-inline: 8px; }
#shop-form-status:empty { display: none; }
#shop-checkout #shop-form-status { margin: 10px 0 0; font-size: .875rem; color: var(--gold); }
#shop-checkout button:disabled { opacity: .65; }
@media (max-width: 810px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 550px) {
  .shop-heading { align-items: flex-start; margin-bottom: 17px; gap: 10px; }
  .shop-heading .page-heading p { font-size: .875rem; }
  .shop-wallet { align-self: center; flex-direction: column; align-items: flex-end; gap: 2px; padding: 7px 10px; }
  .shop-wallet span { font-size: .72rem; }
  .shop-wallet strong { font-size: .9375rem; }
  .shop-delivery { align-items: flex-start; gap: 8px; padding: 13px; }
  .shop-envelope { flex-basis: 25px; height: 22px; font-size: 1.35rem; }
  .shop-delivery h2 { font-size: .9375rem; }
  .shop-delivery p { font-size: .8125rem; }
  .shop-tabs { margin: 12px 0 14px; }
  .shop-grid { gap: 10px; }
  .shop-card { padding: 7px; border-radius: 12px; }
  .shop-ticket { min-height: 112px; }
  .shop-ticket-copy { padding: 12px 3px 12px 9px; }
  .shop-ticket h3 { font-size: .8125rem; }
  .shop-ticket-copy > span { font-size: 1.16rem; }
  .shop-card-footer { flex-wrap: wrap; padding: 8px 1px 1px; }
  .shop-card-footer .secondary-button { flex: 1 1 100%; padding: 5px; }
  .shop-card-footer strong { font-size: .9375rem; }
  .shop-orders { grid-template-columns: 1fr; }
}
