.table-reward-panel {
  background: #fffdf8;
  border: 1px solid #c9c6bb;
  border-top: 3px solid #b5975c;
  color: #1b2c4b;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.customer-card .table-reward-panel { margin-block: 1.25rem }
.table-reward-panel h2,
.table-reward-panel h3 { color: #304885; margin: 0 }
.table-reward-panel progress { width: 100%; accent-color: #304885 }

.table-reward-qr { margin-top: 1rem; text-align: center }
.table-reward-qr canvas { display: block; max-width: 100%; height: auto; margin-inline: auto }
.table-reward-qr code { overflow-wrap: anywhere }
.table-stamp-layout .table-reward-dialog {
  margin: auto;
  width: min(91vw, 29rem);
  max-height: 90dvh;
  overflow: auto;
}
.table-reward-dialog::backdrop { background: rgb(26 39 61 / 48%) }
.table-reward-dialog-head { display: flex; justify-content: space-between; align-items: start; gap: .75rem }
.table-reward-dialog-head button { flex-shrink: 0 }

.table-stamp-layout {
  --stamp-blue: #193b6c;
  --stamp-deep: #14294b;
  --stamp-gold: #b2925d;
  --stamp-paper: #faf7ee;
  --stamp-line: #d7cebb;
  --stamp-muted: #48566b;
  color: #1d2b42;
}
.table-stamp-layout h2,
.table-stamp-layout h3,
.table-stamp-layout h4 {
  margin: 0;
  color: var(--stamp-blue);
  font: 400 clamp(1.38rem, 3vw, 1.95rem)/1.13 Georgia, serif;
  letter-spacing: -.015em;
}
.table-stamp-layout p { margin: 0 }
.table-stamp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--stamp-gold);
}
.table-stamp-header .customer-eyebrow { color: var(--stamp-blue); margin-bottom: .45rem }
.table-stamp-header h2 { font-size: clamp(2.15rem, 5.3vw, 4.1rem); letter-spacing: -.035em }
.table-stamp-emblem {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .25rem;
  flex: 0 0 auto;
  width: clamp(3.2rem, 9vw, 5.5rem);
  aspect-ratio: 1;
  border: 1px solid var(--stamp-gold);
  border-radius: 50%;
  background: #eee1c5;
  color: var(--stamp-blue);
  transform: rotate(-8deg);
}
.table-stamp-emblem span { color: #705222; font-size: .65rem; letter-spacing: .2em }
.table-stamp-m {
  display: block;
  width: 58%;
  aspect-ratio: 1.85;
  background: currentColor;
  clip-path: polygon(0 70%,11% 78%,22% 81%,26% 80%,27% 4%,50% 34%,73% 4%,74% 80%,78% 81%,89% 78%,100% 70%,100% 88%,90% 95%,78% 98%,66% 97%,65% 35%,50% 55%,35% 35%,34% 97%,22% 98%,10% 95%,0 88%);
}
.table-stamp-emblem .table-stamp-m { width: clamp(1.65rem, 5vw, 3.2rem) }
.table-stamp-dashboard { display: grid; gap: 1.1rem; align-items: start }
.table-stamp-tracks { display: grid; gap: .9rem; min-width: 0 }
.table-stamp-track,
.table-stamp-past { padding: clamp(.85rem, 2.4vw, 1.25rem); background: var(--stamp-paper); border: 1px solid var(--stamp-line) }
.table-stamp-track-head,
.table-stamp-history-head { display: flex; justify-content: space-between; align-items: start; gap: .65rem }
.table-stamp-meta,
.table-stamp-history-head p { color: var(--stamp-muted); font-size: .84rem; margin-top: .2rem }
.table-stamp-count,
.table-stamp-history-total { color: var(--stamp-blue); white-space: nowrap; text-align: right; font-size: .85rem }
.table-stamp-count strong { font: 400 clamp(1.55rem, 4vw, 2.2rem)/1 Georgia, serif }
.table-stamp-history-total strong { display: block; color: var(--stamp-blue) }
.table-stamp-scale { position: relative; height: 4.5rem; margin: .25rem 1.4rem 0 }
.table-stamp-rail {
  position: absolute;
  inset: 1.52rem 0 auto;
  width: 100%;
  height: .4rem;
  appearance: none;
  border: 0;
  border-radius: .4rem;
  background: #dce1e8;
  color: var(--stamp-blue);
}
.table-stamp-rail::-webkit-progress-bar { background: #dce1e8; border-radius: .4rem }
.table-stamp-rail::-webkit-progress-value { background: var(--stamp-blue); border-radius: .4rem; transition: width .3s ease }
.table-stamp-rail::-moz-progress-bar { background: var(--stamp-blue); border-radius: .4rem }
.table-stamp-markers { position: absolute; inset: 0 }
.table-stamp-point,
.table-stamp-day {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .25rem;
  min-height: 3.65rem;
  padding: .7rem .18rem .2rem;
  color: var(--stamp-muted);
  font: 600 .78rem/1.2 Arial, sans-serif;
}
.table-stamp-point { min-width: 44px; border: 0; background: transparent; cursor: pointer; white-space: nowrap }
.table-stamp-markers .table-stamp-point { position: absolute; top: .1rem; transform: translateX(-50%) }
.table-stamp-day-markers { display: grid; align-items: start; margin: .4rem 0 .25rem }
.table-stamp-day-markers > * { justify-self: center }
.table-stamp-seal {
  display: grid;
  place-items: center;
  width: 1.8rem;
  aspect-ratio: 1;
  border: 1px solid #b9b4a7;
  border-radius: 50%;
  background: var(--stamp-paper);
  color: #59677a;
  transition: background .2s, color .2s;
}
.table-stamp-day-markers .table-stamp-seal { width: clamp(1.3rem, 4vw, 2.05rem) }
.table-stamp-seal.is-earned { color: #fffdf8; background: var(--stamp-blue); border-color: var(--stamp-blue) }
.table-stamp-point[aria-pressed="true"] { color: var(--stamp-blue); font-weight: 700 }
.table-stamp-point[aria-pressed="true"] .table-stamp-seal { outline: 2px solid var(--stamp-gold); outline-offset: 2px }
.table-stamp-point[aria-pressed="true"] .table-stamp-seal:not(.is-earned) { background: #eee1c5; color: var(--stamp-blue) }
.table-stamp-detail { border-top: 1px solid var(--stamp-line); padding-top: .65rem; min-height: 6rem }
.table-stamp-detail h4 { margin: .15rem 0; font-size: clamp(1.16rem, 3vw, 1.5rem) }
.table-stamp-state { color: #715022; font-size: .85rem; font-weight: 700 }
.table-stamp-components { font-size: .92rem }
.table-stamp-ready {
  padding: clamp(1rem, 2.4vw, 1.4rem);
  color: #fdf9f0;
  background: var(--stamp-deep);
  border-top: 3px solid #c3a16a;
}
.table-stamp-ready h3,
.table-stamp-ready h4 { color: inherit }
.table-stamp-ready h4 { font-size: clamp(1.45rem, 3.2vw, 2rem); margin: .22rem 0 .35rem }
#table-stamp-feature { margin-top: 1rem }
#table-stamp-feature p { font-size: .92rem }
.table-stamp-prize-key { display: flex; align-items: center; gap: .4rem; color: #f5d69c }
.table-stamp-prize-key .table-stamp-m { width: 1.05rem }
.table-stamp-ready .table-stamp-expiry { color: #f5d69c; font-weight: 700; margin-top: .6rem }
.table-stamp-qr-action {
  min-height: 44px;
  margin-top: .85rem;
  padding: .65rem .8rem;
  border: 1px solid #e8c88d;
  border-radius: 2px;
  color: var(--stamp-deep);
  background: #f4e3bf;
  font: 700 .9rem/1.3 Arial, sans-serif;
  cursor: pointer;
}
.table-stamp-ready :focus-visible { outline-color: #f5d69c }
.table-stamp-ready details { margin-top: .9rem; border-top: 1px solid #6c7f9d }
.table-stamp-ready summary, .table-stamp-past summary { cursor: pointer; min-height: 44px; line-height: 1.35; padding: .8rem 0 .55rem }
.table-stamp-ready ul, .table-stamp-past ul, .table-stamp-days, .table-stamp-days ul { list-style: none; margin: 0; padding: 0 }
.table-stamp-ready li button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .55rem 0;
  border: 0;
  border-top: 1px solid #6c7f9d;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.table-stamp-ready li small { display: block; color: #f5d69c }
.table-stamp-past summary { color: var(--stamp-blue); font-weight: 700 }
.table-stamp-past li { padding: .55rem 0; border-top: 1px solid var(--stamp-line) }
.table-stamp-history { margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid var(--stamp-gold) }
.table-stamp-history-head { margin-bottom: .65rem }
.table-stamp-day-group {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, 3fr);
  align-items: start;
  gap: .45rem 1rem;
  padding: .48rem 0;
  border-top: 1px solid var(--stamp-line);
}
.table-stamp-day-group time { font-size: .9rem; font-weight: 700; line-height: 1.4; padding-top: .47rem }
.table-stamp-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.8fr);
  align-items: center;
  gap: .5rem;
  min-height: 2.2rem;
  font-size: .88rem;
}
.table-stamp-entry-status { color: var(--stamp-muted); font-size: .81rem; text-align: right }
.table-stamp-history-actions { display: flex; flex-wrap: wrap; gap: 0 1.1rem; margin-top: .3rem }
.table-stamp-link {
  min-height: 44px;
  padding: .45rem 0;
  border: 0;
  background: transparent;
  color: var(--stamp-blue);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .25em;
  cursor: pointer;
}
.table-stamp-link:disabled { opacity: .6; cursor: wait }

@media (min-width: 780px) {
  .table-stamp-dashboard { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr) }
}
@media (max-width: 550px) {
  .table-stamp-day-group { grid-template-columns: 1fr }
  .table-stamp-day-group time { padding-top: 0 }
  .table-stamp-count strong { display: block }
}
@media (prefers-reduced-motion: reduce) {
  .table-stamp-rail::-webkit-progress-value, .table-stamp-seal { transition: none }
}

.table-reward-form { display: grid; gap: 1.1rem; max-width: 52rem; margin-top: 1rem }
.table-reward-scan, .table-reward-manual { display: grid; align-content: start; gap: .65rem }
.table-reward-scan summary { color: #304885; font-weight: 600; cursor: pointer; min-height: 36px }
.table-reward-scan label { display: block; margin: .4rem 0 }
#table-reward-products label { margin-top: .8rem }
.table-reward-form input,
.table-reward-form select {
  min-height: 44px;
  width: 100%;
  color: inherit;
  background: #fff;
  border: 1px solid #9fa9b8;
  padding: .65rem;
  font: inherit;
}
.table-reward-form video { width: min(100%, 20rem); background: #1b2c4b }
.table-reward-form button { justify-self: start }
.table-reward-actions { display: flex; flex-wrap: wrap; gap: .65rem }
#table-reward-counter-status:not(:empty) {
  margin-top: 1rem;
  padding: .75rem;
  background: #eaf0f9;
  font-weight: 600;
}
#table-reward-counter-status[role="alert"] { color: #812b2b; background: #f8ebe7 }

@media (min-width: 720px) {
  .table-reward-form { grid-template-columns: 1fr 1fr }
  .table-reward-manual { padding-left: 1.1rem; border-left: 1px solid #c9c6bb }
}
