:root {
  color-scheme: dark;
  --bg: #0b1423;
  --surface: #101d30;
  --surface-raised: #142338;
  --ink: #f4f3ef;
  --muted: #b2bfd0;
  --line: #2a3a50;
  --brass: #d6b67a;
  --brass-bright: #e8c990;
  --thai: "Anuphan", sans-serif;
  --serif: "Manrope", "Anuphan", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.7 var(--thai);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
svg {
  display: block;
  flex-shrink: 0;
}
h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
::selection {
  color: var(--bg);
  background: var(--brass);
}
:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 4px;
}
.portal-header {
  width: min(1200px, calc(100% - 80px));
  margin: auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand b {
  font: 800 14px/1.4 var(--serif);
  letter-spacing: 0.1em;
}
.brand small {
  display: block;
  font: 600 9px/1.9 var(--serif);
  letter-spacing: 0.3em;
  color: var(--brass);
}
.back-link {
  font-size: 13px;
  margin-left: auto;
  color: var(--muted);
}
.back-link span {
  margin-left: 12px;
  color: var(--brass);
}
.back-link:hover,
.home:hover {
  color: var(--brass-bright);
}
.hidden {
  display: none !important;
}
/* Login: a short form, supported by a quiet introduction. */
.login-page {
  min-height: 100vh;
}
.login-layout {
  width: min(1050px, calc(100% - 80px));
  margin: 80px auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 90px;
  align-items: center;
}
.login-intro h2 {
  font-size: 42px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.login-intro h2 span {
  color: var(--brass-bright);
}
.login-intro > p {
  font-size: 16px;
  color: var(--muted);
  margin-top: 26px;
  line-height: 1.95;
}
.intro-foot {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding-top: 22px;
  font: 600 11px/1.8 var(--serif);
  letter-spacing: 0.12em;
  color: var(--brass);
}
.intro-foot span {
  display: block;
  margin-top: 7px;
  font: 400 12px/1.7 var(--thai);
  color: var(--muted);
  letter-spacing: 0;
}
.card {
  padding: 36px 38px;
  background: var(--surface);
  border-radius: 16px;
  min-width: 0;
}
.card h1 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 9px;
  margin-bottom: 26px;
}
.card label {
  display: block;
  font-size: 14px;
  margin: 20px 0 8px;
}
.card input {
  min-width: 0;
  width: 100%;
  height: 52px;
  padding: 12px 14px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid #40506a;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.15s;
}
.card input::placeholder {
  color: #93a5bd;
}
.card input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-color: var(--brass);
}
.pw-field {
  position: relative;
}
.pw-field input {
  padding-right: 52px;
}
.pw-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  height: 44px;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.pw-toggle:hover {
  background: var(--surface-raised);
  color: var(--ink);
}
.pw-toggle svg {
  width: 20px;
  height: 20px;
}
.pw-toggle .off {
  display: none;
}
.pw-toggle[aria-pressed="true"] .on {
  display: none;
}
.pw-toggle[aria-pressed="true"] .off {
  display: block;
}
.btn,
.claim,
.retry {
  background: var(--brass);
  color: #101b2a;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn:hover,
.claim:hover,
.retry:hover {
  background: var(--brass-bright);
}
.card .btn {
  width: 100%;
  min-height: 52px;
  font-size: 15px;
  margin-top: 28px;
}
.btn:disabled,
.claim:disabled {
  opacity: 0.6;
  cursor: wait;
}
.msg {
  display: none;
  font-size: 13px;
  margin-top: 20px;
  border-radius: 8px;
  padding: 12px 14px;
}
.msg.err,
.bmsg.err {
  display: block;
  color: #f1b2b2;
  background: #331f2b;
}
.msg.info,
.bmsg.info {
  display: block;
  color: var(--brass-bright);
  background: #302b23;
}
.foot {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 22px;
}
.home {
  font-size: 13px;
  color: var(--brass);
}
.card .home {
  display: block;
  margin-top: 20px;
  text-align: center;
}
.card #code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.15em;
}
/* Member overview: account facts first, rewards as clear divided rows. */
.member-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}
.member-nav a:hover {
  color: var(--brass-bright);
}
.logout {
  min-height: 40px;
  padding: 8px 15px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.logout:hover {
  border-color: var(--brass);
  color: var(--ink);
}
.wrap {
  width: min(1050px, calc(100% - 80px));
  margin: auto;
  padding: 48px 0 50px;
}
.hello h1 {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hello p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.hello b {
  font-weight: 400;
  color: var(--ink);
}
.rankcard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  background: var(--surface);
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 28px;
}
.rank-info {
  display: flex;
  align-items: center;
  gap: 25px;
}
.rankcard .lab {
  color: var(--muted);
  font-size: 14px;
  max-width: 10ch;
}
.rank {
  font: 600 38px/1.2 var(--serif);
  color: var(--brass-bright);
  letter-spacing: -0.03em;
}
.qwv {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}
.qwv dt {
  color: var(--muted);
  font-size: 12px;
}
.qwv dt span {
  font-size: 11px;
}
.qwv dd {
  font: 600 29px/1.45 var(--serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.sechead {
  margin-top: 40px;
}
.sechead h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sechead p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 7px;
}
.summary {
  margin-top: 26px;
}
.sumtop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 0 0 18px;
}
.sumlead {
  font-size: 14px;
  color: var(--muted);
}
.sumlead b {
  font: 600 22px/1.5 var(--serif);
  color: var(--ink);
  margin-right: 4px;
}
.sumchips {
  display: flex;
  gap: 22px;
}
.chip {
  font-size: 13px;
  color: var(--muted);
}
.c-eligible {
  color: var(--brass-bright);
}
.c-activated {
  color: #a8d7be;
}
.sbar {
  height: 4px;
  overflow: hidden;
  background: var(--line);
  border-radius: 4px;
}
.sbar > span {
  display: block;
  height: 100%;
  background: var(--brass);
  border-radius: 4px;
}
.pvnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
}
.tier {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.tierhead {
  display: grid;
  grid-template-columns: 1fr auto 20px;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.tierhead::-webkit-details-marker {
  display: none;
}
.tierhead h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 600 20px/1.4 var(--serif);
  letter-spacing: -0.015em;
}
.tstate {
  font: 400 11px/1.6 var(--thai);
  color: var(--muted);
  letter-spacing: 0;
}
.tstate.on {
  color: var(--brass-bright);
}
.thr {
  font-size: 12px;
  color: var(--muted);
}
.tier-chevron {
  color: var(--muted);
  width: 20px;
  height: 20px;
}
.tier[open] .tier-chevron {
  transform: rotate(180deg);
}
.bmain {
  min-width: 0;
}
.btitle {
  font-size: 16px;
  font-weight: 500;
}
.bdesc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 5px;
}
.bnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.8;
}
.bgrace {
  color: #e8c990;
}
/* Per-benefit quota (Phase F): a quiet pill-style line + a blocked note. */
.bquota {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.bquota-global {
  margin-left: 6px;
  color: #e8c990;
  border-color: #7e7156;
}
.bquota-block {
  color: #e8c990;
  margin-top: 7px;
}
.badge {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.b-eligible {
  color: var(--brass-bright);
}
.b-activated,
.b-redeemed {
  color: #a8d7be;
}
.b-grace {
  color: #e8c990;
}
.b-lapsed {
  text-decoration: line-through;
}
.claim,
.retry {
  font-size: 13px;
  min-height: 40px;
  padding: 9px 16px;
  white-space: nowrap;
}
.claim.preview {
  color: var(--brass-bright);
  background: transparent;
  border: 1px solid #7e7156;
}
.claim.preview:hover {
  background: #242b34;
}
.soon {
  font-size: 11px;
}
.pvtag {
  display: none;
}
.bmsg {
  grid-column: 2/-1;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
}
.bmsg:empty {
  display: none;
}
.bmsg.ok {
  color: #a8d7be;
  background: #18352e;
}
.member-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 24px;
}
.member-footer > span {
  font: 500 11px/1.5 var(--serif);
  color: var(--muted);
}
.loading {
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.benefits-loading,
.empty {
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.errbox {
  margin-top: 24px;
  padding: 24px;
  background: #331f2b;
  border-radius: 12px;
}
.errbox p {
  color: #f1b2b2;
  font-size: 14px;
  margin-bottom: 16px;
}
@media (max-width: 1000px) {
  .login-layout {
    gap: 45px;
    grid-template-columns: 1fr 420px;
  }
  .login-intro h2 {
    font-size: 34px;
  }
  .rank-info {
    gap: 18px;
  }
  .rankcard {
    gap: 24px;
  }
  .rank {
    font-size: 34px;
  }
}
@media (max-width: 760px) {
  .portal-header {
    width: calc(100% - 40px);
    min-height: 76px;
    gap: 20px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .brand b {
    font-size: 12px;
  }
  .brand small {
    font-size: 8px;
  }
  .back-link {
    font-size: 12px;
  }
  .login-layout {
    display: block;
    width: min(440px, calc(100% - 40px));
    margin: 40px auto;
  }
  .login-intro {
    display: none;
  }
  .card {
    padding: 28px 24px;
  }
  .card h1 {
    font-size: 25px;
  }
  .card .home {
    display: none;
  }
  .member-nav {
    display: none;
  }
  .logout {
    margin-left: auto;
    font-size: 12px;
    padding: 7px 12px;
  }
  .wrap {
    width: calc(100% - 40px);
    padding-top: 30px;
  }
  .hello h1 {
    font-size: 26px;
  }
  .hello p {
    font-size: 13px;
  }
  .rankcard {
    padding: 23px 24px;
    gap: 20px;
  }
  .rank-info {
    display: block;
  }
  .rankcard .lab {
    font-size: 12px;
    max-width: none;
    margin-bottom: 10px;
  }
  .rank {
    font-size: 32px;
  }
  .qwv {
    padding-left: 22px;
  }
  .qwv dt {
    font-size: 11px;
    max-width: 17ch;
  }
  .qwv dd {
    font-size: 24px;
  }
  .sechead {
    margin-top: 32px;
  }
  .sechead h2 {
    font-size: 23px;
  }
  .sechead p {
    font-size: 13px;
  }
  .sumtop {
    display: block;
  }
  .sumchips {
    margin-top: 12px;
    gap: 20px;
  }
  .pvnote {
    font-size: 12px;
    line-height: 1.8;
  }
  .tier {
    margin-top: 26px;
  }
  .tierhead {
    grid-template-columns: 1fr 20px;
    gap: 8px 12px;
    padding: 20px 0;
  }
  .tierhead h3 {
    font-size: 20px;
    gap: 12px;
  }
  .thr {
    grid-column: 1;
    font-size: 11px;
  }
  .tier-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .btitle {
    font-size: 16px;
  }
  .bdesc {
    font-size: 13px;
  }
  .member-footer > span {
    font-size: 10px;
  }
}
@media (max-width: 370px) {
  .portal-header,
  .wrap {
    width: calc(100% - 32px);
  }
  .login-layout {
    width: calc(100% - 32px);
    margin-top: 28px;
  }
  .card {
    padding: 25px 20px;
  }
  .rankcard {
    padding: 20px 18px;
    gap: 16px;
  }
  .rank {
    font-size: 29px;
  }
  .qwv {
    padding-left: 16px;
  }
  .qwv dd {
    font-size: 21px;
  }
  .rankcard .lab {
    font-size: 11px;
  }
  .qwv dt {
    font-size: 10px;
  }
  .sumchips {
    gap: 16px;
  }
  .chip {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Reward coupons: illustrated ticket face and a perforated action stub. */
.blist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 6px 0 12px;
}
.coupon {
  --coupon-ink: #f4f3ef;
  --coupon-muted: #b2bfd0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38%;
  grid-template-rows: 1fr auto;
  align-items: stretch;
  gap: 0;
  position: relative;
  background: #142338;
  color: var(--coupon-ink);
  border: 0;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 25px -20px #020813;
}
.coupon.st-eligible {
  --coupon-ink: #152338;
  --coupon-muted: #585f69;
  background: #f3efe6;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
@media (hover: hover) {
  .coupon.st-eligible:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 30px -18px #020813;
  }
}
.coupon:focus-within {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}
.coupon-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 23px 18px 24px 23px;
}

.coupon .btitle {
  color: var(--coupon-ink);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.coupon .bdesc {
  color: var(--coupon-muted);
  font-size: 13px;
  line-height: 1.8;
  margin-top: 10px;
}
.coupon .bnote {
  color: var(--coupon-muted);
  font-size: 11px;
  margin-top: 12px;
}
.coupon-media {
  position: relative;
  min-height: 192px;
  margin: 0;
  overflow: hidden;
  background: #1d334a;
  display: grid;
  place-items: center;
}
.coupon-fallback {
  display: grid;
  place-items: center;
  color: var(--brass);
}
.coupon-fallback svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.1;
}
.coupon-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coupon-photo[hidden] {
  display: none;
}
.has-image .coupon-fallback {
  visibility: hidden;
}
.coupon-media figcaption {
  position: absolute;
  bottom: 7px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  background: #0b1423bf;
  font-size: 8px;
}
.coupon-media:not(.has-image) figcaption {
  display: none;
}
.coupon.st-locked .coupon-photo,
.coupon.st-lapsed .coupon-photo {
  filter: grayscale(1);
  opacity: 0.5;
}
.coupon-footer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 13px 22px;
  border-top: 1px dashed #526179;
  position: relative;
}
.st-eligible .coupon-footer {
  border-top-color: #c8c0af;
}
.coupon-footer::before,
.coupon-footer::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: absolute;
  top: -9px;
  background: var(--bg);
}
.coupon-footer::before {
  left: -9px;
}
.coupon-footer::after {
  right: -9px;
}
.coupon .badge {
  font-size: 12px;
  font-weight: 500;
}
.coupon.st-eligible .b-eligible {
  color: #756032;
}
.coupon .claim,
.coupon .claim.preview {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: var(--brass);
  color: #101b2a;
  padding: 10px 14px;
  font-size: 13px;
}
.coupon.st-eligible .claim,
.coupon.st-eligible .claim.preview {
  background: #152b43;
  color: #f8f5ee;
}
.coupon .claim:hover {
  background: var(--brass-bright);
}
.coupon.st-eligible .claim:hover {
  background: #25415f;
}
.coupon .claim:focus-visible {
  outline-color: var(--brass);
}
/* Access link for a claimed (activated/redeemed) benefit — rendered as an
   <a> but styled to match the claim button, with an external-link affordance. */
.coupon a.benefit-action,
a.benefit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  background: var(--brass);
  color: #101b2a;
}
.coupon a.benefit-action:hover {
  background: var(--brass-bright);
}
.coupon a.benefit-action:focus-visible {
  outline-color: var(--brass);
}
.coupon .soon {
  font-size: 10px;
}
.coupon .pvtag {
  display: none;
}
.coupon .bmsg {
  grid-column: 1/-1;
  margin: 0 16px 16px;
  line-height: 1.7;
}
.coupon .bmsg:empty {
  display: none;
}
.coupon.st-eligible .bmsg.info {
  background: #e7dfcf;
  color: #564521;
}
@media (max-width: 850px) {
  .blist {
    grid-template-columns: 1fr;
  }
  .coupon {
    grid-template-columns: minmax(0, 1fr) 40%;
  }
}
@media (max-width: 760px) {
  .blist {
    gap: 16px;
  }
  .coupon-copy {
    padding: 21px 16px 22px 21px;
  }
  .coupon .btitle {
    font-size: 21px;
  }
  .coupon .bdesc {
    font-size: 13px;
  }
  .coupon-media {
    min-height: 178px;
  }
  .coupon-footer {
    padding: 12px 20px;
    min-height: 66px;
  }
}
@media (max-width: 370px) {
  .coupon {
    grid-template-columns: minmax(0, 1fr) 34%;
  }
  .coupon-copy {
    padding: 20px 13px 21px 17px;
  }
  .coupon .btitle {
    font-size: 19px;
  }
  .coupon .claim,
  .coupon .claim.preview {
    font-size: 12px;
    padding: 9px 11px;
  }
  .coupon-footer {
    padding-inline: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .coupon.st-eligible {
    transition: none;
  }
  .coupon.st-eligible:hover {
    transform: none;
  }
}
/* Phase C: one-time tier-change notices + QWV freshness stamp. */
#tcNotice:empty {
  display: none;
}
.tierup-banner,
.downgrade-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.tierup-banner {
  background: linear-gradient(118deg, #1b2a20, var(--surface-raised) 62%);
  border-color: var(--brass);
  box-shadow: 0 16px 36px -26px var(--brass);
}
.tierup-banner .tc-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: var(--brass-bright);
}
.downgrade-notice {
  background: var(--surface-raised);
}
.tc-body {
  flex: 1 1 auto;
  min-width: 0;
}
.tc-title {
  font: 600 17px/1.5 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tierup-banner .tc-title {
  color: var(--brass-bright);
}
.downgrade-notice .tc-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}
.tc-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.tc-dismiss {
  flex-shrink: 0;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  background: var(--brass);
  color: #101b2a;
  transition: background 0.15s;
}
.tc-dismiss:hover {
  background: var(--brass-bright);
}
.downgrade-notice .tc-dismiss {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.downgrade-notice .tc-dismiss:hover {
  border-color: var(--brass);
  color: var(--ink);
  background: transparent;
}
.tc-dismiss:disabled {
  opacity: 0.6;
  cursor: wait;
}
/* Coway end-of-term / return notice (Phase F Feature B) — informational,
   non-alarming, no dismiss (self-clears server-side). Navy theme. */
.coway-return-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  background: var(--surface-raised);
}
.coway-return-notice .cr-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brass-bright);
  background: rgba(214, 182, 122, 0.12);
}
.coway-return-notice .cr-body {
  flex: 1 1 auto;
  min-width: 0;
}
.coway-return-notice .cr-title {
  font: 600 15px/1.55 var(--serif);
  color: var(--ink);
}
.coway-return-notice .cr-fee {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.coway-return-notice .cr-status {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font: 600 11.5px/1.5 var(--serif);
  color: var(--brass);
  white-space: nowrap;
}
@media (max-width: 760px) {
  .coway-return-notice {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 18px;
  }
  .coway-return-notice .cr-status {
    margin-left: auto;
  }
}
.qwv-freshness {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.qwv-refresh {
  color: var(--brass);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.qwv-refresh:hover {
  color: var(--brass-bright);
  border-bottom-color: var(--brass-bright);
}
@media (max-width: 760px) {
  .tierup-banner,
  .downgrade-notice {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 18px;
  }
  .tierup-banner .tc-icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }
  .tc-dismiss {
    margin-left: auto;
  }
}

/* Focus the illustrative trading robot within the narrow coupon thumbnail. */
.coupon[aria-labelledby="bt-bot-free"] .coupon-photo {
  object-position: 25% center;
}
/* Keep both subscription-service marks visible in the narrow image well. */
.coupon[aria-labelledby="bt-tech-subscription"] .coupon-photo {
  object-fit: contain;
  background: #e8e0d2;
}
/* Preserve the complete front-and-back phone image supplied by the owner. */
.coupon[aria-labelledby="bt-iphone-latest"] .coupon-photo {
  object-fit: contain;
  background: #000;
}

/* ---------- Phase D: consent modal ---------- */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(4, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: consent-fade 0.16s ease;
}
@keyframes consent-fade {
  from {
    opacity: 0;
  }
}
.consent-dialog {
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px -20px #000;
  outline: none;
}
.consent-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.consent-titles {
  flex: 1 1 auto;
  min-width: 0;
}
.consent-head h2 {
  font: 600 20px/1.45 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.consent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}
.consent-ver,
.consent-code {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--brass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
.consent-x {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.consent-x:hover {
  color: var(--ink);
  border-color: var(--brass);
}
.consent-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 24px 8px;
}
.consent-body:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: -4px;
}
.consent-terms {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}
.consent-terms p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.consent-empty {
  font-style: italic;
}
.coway-block {
  margin: 18px 0;
  padding: 16px 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.coway-block h4 {
  font: 600 15px/1.5 var(--serif);
  color: var(--brass-bright);
}
.coway-fee {
  font-size: 13.5px;
  margin-top: 10px;
  color: var(--ink);
}
.coway-fee b {
  color: var(--brass-bright);
}
.coway-sched {
  margin-top: 12px;
}
.coway-sched-head {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.coway-sched-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
}
.coway-sched-empty {
  font-size: 13px;
  color: #e8c990;
  line-height: 1.75;
}
.coway-gate {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #f1c99a;
  background: #302b23;
  border-radius: 8px;
}
.coway-notice {
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
  background: #1a2740;
  border: 1px solid var(--brass);
  border-radius: 8px;
}
.coway-notice b {
  color: var(--brass-bright);
}
.consent-form fieldset {
  margin: 16px 0 4px;
  padding: 0;
  border: 0;
}
.consent-leg {
  padding: 0;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.consent-checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  transition: background 0.12s;
}
.consent-check:hover {
  background: var(--surface-raised);
}
.consent-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--brass);
  cursor: pointer;
}
.consent-check label {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  cursor: pointer;
}
.consent-check.missing {
  background: #331f2b;
}
.consent-check.missing label {
  color: #f1b2b2;
}
.req {
  color: #e8a0a0;
}
/* Fixed service location — read-only info row (not an input). */
.consent-location {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 18px;
  padding: 13px 15px;
  background: #11203a;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.consent-loc-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--brass);
  margin-top: 1px;
}
.consent-loc-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.consent-loc-label {
  color: var(--muted);
}
.consent-loc-name {
  font-weight: 600;
}
.consent-loc-map {
  display: inline-block;
  margin-left: 4px;
  color: var(--brass-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-loc-map:hover,
.consent-loc-map:focus-visible {
  color: var(--ink);
}
.consent-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}
.consent-field label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--ink);
}
.consent-field input,
.consent-field textarea,
.consent-field select {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid #40506a;
  border-radius: 8px;
  font-size: 15px;
}
.consent-field textarea {
  resize: vertical;
  line-height: 1.6;
}
.consent-field input:focus,
.consent-field textarea:focus,
.consent-field select:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-color: var(--brass);
}
.consent-field.missing input,
.consent-field.missing textarea,
.consent-field.missing select {
  border-color: #c56b6b;
}

/* ── Thai cascading address (type:"th_address") ─────────────────────────────── */
.consent-field.th-address {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
}
.th-grp-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.th-loading {
  font-size: 12.5px;
  color: var(--brass-bright);
  margin: 0 0 10px;
}
.th-loading[hidden] {
  display: none;
}
.th-loading-error {
  color: #f1b2b2;
}
/* Two-column grid on wider viewports; single column on phones. address_line and
   postcode each span the full row for readability. */
.th-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.th-row {
  min-width: 0;
}
.th-row-line,
.th-row-pc {
  grid-column: 1 / -1;
}
.th-address .th-row label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--muted, #9fb0c9);
}
.th-address .th-row input,
.th-address .th-row textarea,
.th-address .th-row select {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid #40506a;
  border-radius: 8px;
  font-size: 15px;
}
.th-address .th-row input:focus,
.th-address .th-row textarea:focus,
.th-address .th-row select:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-color: var(--brass);
}
.th-address .th-row select:disabled,
.th-address .th-row input[readonly] {
  opacity: 0.72;
  cursor: not-allowed;
}
.th-row-pc input[readonly] {
  max-width: 180px;
}
.th-err {
  font-size: 11.5px;
  line-height: 1.5;
  color: #f1b2b2;
  margin: 5px 0 0;
}
.th-err:empty {
  display: none;
}
.th-err-hier {
  margin-top: 10px;
}
.consent-field.th-address.missing {
  border-color: #c56b6b;
}
@media (max-width: 520px) {
  .th-address-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .th-row-pc input[readonly] {
    max-width: none;
  }
}

/* ── Map location picker (type:"geo_location") ──────────────────────────────── */
.consent-field.geo-location {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
}
.geo-grp-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
/* Search-first: the primary control is a big, obvious search box. */
.geo-search {
  position: relative;
  margin-bottom: 12px;
}
.geo-search-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.geo-search-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 13px 15px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid #40506a;
  border-radius: 10px;
  font-size: 16px;
}
.geo-search-input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-color: var(--brass);
}
/* Google Places Autocomplete predictions dropdown. Google injects `.pac-container`
   directly onto <body>, so it is OUTSIDE the modal in the DOM — it needs a z-index
   above the consent overlay (z-index:60) or the modal would clip/bury it. Restyled
   to match the dark portal surface so it doesn't look like a stray white box. */
.pac-container {
  z-index: 10000; /* above .consent-overlay (60) */
  margin-top: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.9);
  font-family: inherit;
  overflow: hidden;
}
.pac-item {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
}
.pac-item:first-child {
  border-top: 0;
}
.pac-item:hover,
.pac-item-selected,
.pac-item-selected:hover {
  background: rgba(214, 182, 122, 0.14);
}
.pac-item-query,
.pac-matched {
  color: var(--ink);
}
.pac-matched {
  color: var(--brass-bright);
}
.pac-icon {
  filter: grayscale(1) brightness(1.4);
}
.pac-logo::after {
  margin: 6px 12px;
}
.geo-status {
  font-size: 12px;
  color: var(--brass-bright);
  margin: 6px 0 0;
}
.geo-status:empty {
  display: none;
}
/* Chosen-point readout / confirmation. */
.geo-readout {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 8px;
  background: rgba(214, 182, 122, 0.06);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.geo-readout:empty {
  display: none;
}
.geo-label-row {
  margin-top: 12px;
}
.geo-label-row label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--muted);
}
.geo-label-input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid #40506a;
  border-radius: 8px;
  font-size: 15px;
}
.geo-label-input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-color: var(--brass);
}
/* Secondary actions: reveal-map toggle + current-location. Both 44px targets. */
.geo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.geo-map-toggle,
.geo-locate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--brass);
  border-radius: 8px;
  background: transparent;
  color: var(--brass-bright);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.geo-map-toggle:hover,
.geo-locate:hover {
  background: rgba(214, 182, 122, 0.12);
}
.geo-map-toggle:focus-visible,
.geo-locate:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}
.geo-map-toggle svg,
.geo-locate svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
/* Map panel — hidden by default, revealed by the toggle. */
.geo-map-panel {
  margin-top: 12px;
}
.geo-map-panel[hidden] {
  display: none;
}
.geo-map-hint {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}
/* The Google Maps container — rounded, fits the modal. Google renders its own
   tiles inside; we only size + clip the frame. */
.geo-map {
  height: 260px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8eaed;
}
.geo-map .gm-style,
.geo-map .gm-style * {
  font-family: inherit;
}
.geo-err {
  margin-top: 8px;
}
.consent-field.geo-location.missing {
  border-color: #c56b6b;
}
.consent-field.geo-location.missing .geo-search-input,
.consent-field.geo-location.missing .geo-label-input {
  border-color: #c56b6b;
}
@media (max-width: 520px) {
  .geo-map-toggle,
  .geo-locate {
    flex: 1 1 100%;
  }
}
.consent-foot {
  flex-shrink: 0;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}
.consent-error {
  font-size: 13px;
  color: #f1b2b2;
  line-height: 1.6;
  margin-bottom: 12px;
}
.consent-error:empty {
  display: none;
}
.consent-gate-msg,
.consent-preview-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--brass-bright);
  background: #302b23;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 14px;
}
.consent-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.consent-cancel {
  min-height: 46px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.consent-cancel:hover {
  color: var(--ink);
  border-color: var(--brass);
}
.consent-submit {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #101b2a;
  background: var(--brass);
  border: 0;
  border-radius: 8px;
  transition: background 0.15s;
}
.consent-submit:hover:not(:disabled) {
  background: var(--brass-bright);
}
.consent-submit:disabled,
.consent-submit[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (min-width: 640px) {
  .consent-overlay {
    align-items: center;
    padding: 24px;
  }
  .consent-dialog {
    border-radius: 16px;
    max-height: calc(100% - 48px);
  }
}
@media (max-width: 639px) {
  .consent-dialog {
    max-height: 92vh;
  }
  .consent-head {
    padding: 18px 18px 14px;
  }
  .consent-head h2 {
    font-size: 18px;
  }
  .consent-body {
    padding: 16px 18px 6px;
  }
  .consent-foot {
    padding: 14px 18px 18px;
  }
  .consent-actions {
    flex-direction: column-reverse;
  }
  .consent-cancel,
  .consent-submit {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .consent-overlay {
    animation: none;
  }
}

/* ---------- Phase E: events teaser (app.html) + events page ---------- */
.events-teaser {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.events-teaser:hover {
  border-color: var(--brass);
  background: var(--surface-raised);
}
.events-teaser .et-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: var(--brass-bright);
  background: #1a2740;
}
.events-teaser .et-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.events-teaser .et-copy b {
  display: block;
  font: 600 16px/1.5 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.events-teaser .et-copy small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.events-teaser .et-go {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--brass);
}
.events-teaser:hover .et-go {
  color: var(--brass-bright);
}

/* Events page: view tabs */
.ev-tabs {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}
.ev-tab {
  min-height: 44px;
  padding: 10px 6px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: -1px;
}
.ev-tab:hover {
  color: var(--ink);
}
.ev-tab.on {
  color: var(--brass-bright);
  border-bottom-color: var(--brass);
}

/* Event list grid + cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
}
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 25px -22px #020813;
}
.event-card:focus-within {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}
.event-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: #1d334a;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.event-fallback {
  color: var(--brass);
}
.event-fallback svg {
  width: 46px;
  height: 46px;
  stroke-width: 1.1;
}
.event-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-photo[hidden] {
  display: none;
}
.event-media.has-image .event-fallback {
  visibility: hidden;
}
.event-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  flex: 1 1 auto;
  min-width: 0;
}
.event-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.event-title {
  font: 600 19px/1.4 var(--serif);
  letter-spacing: -0.015em;
  color: var(--ink);
  min-width: 0;
}
.event-tier {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.event-tier.ok {
  color: var(--brass-bright);
  border-color: var(--brass);
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.event-meta .emi {
  flex-shrink: 0;
  color: var(--brass);
  display: inline-grid;
  place-items: center;
}
.event-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 12px;
}
.seats {
  font-size: 13px;
  color: var(--muted);
}
.seats b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.seats-full {
  color: #e8a0a0;
}
.bk-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.bk-booked {
  color: #a8d7be;
  border-color: #2f5244;
}
.bk-attended {
  color: var(--brass-bright);
  border-color: var(--brass);
}
.bk-cancelled {
  color: var(--muted);
  text-decoration: line-through;
}
.event-acts {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.ev-book,
.ev-detail,
.ev-cancel {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}
.ev-book {
  background: var(--brass);
  color: #101b2a;
  border: 0;
  transition: background 0.15s;
}
.ev-book:hover:not(:disabled) {
  background: var(--brass-bright);
}
.ev-book:disabled,
.ev-book[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: not-allowed;
  font-weight: 500;
}
.ev-detail {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.ev-detail:hover {
  color: var(--ink);
  border-color: var(--brass);
}
.ev-cancel {
  background: transparent;
  color: #e8a0a0;
  border: 1px solid #503040;
}
.ev-cancel:hover:not(:disabled) {
  border-color: #c56b6b;
  color: #f1b2b2;
}
.ev-book:disabled,
.ev-cancel:disabled {
  opacity: 0.7;
  cursor: wait;
}
/* Preview lock: same treatment as the benefit-claim preview button. */
.ev-book.preview {
  color: var(--brass-bright);
  background: transparent;
  border: 1px solid #7e7156;
  font-weight: 600;
}
.ev-book.preview:hover:not(:disabled) {
  background: #242b34;
}
.ev-book .soon {
  font-size: 11px;
}
.event-acts .pvtag,
.detail-actions .pvtag {
  display: none;
}
.event-msg {
  font-size: 13px;
  line-height: 1.7;
  padding: 0;
  margin-top: 4px;
}
.event-msg:empty {
  display: none;
}
.event-msg.ok {
  color: #a8d7be;
}
.event-msg.err {
  color: #f1b2b2;
}
.event-msg.info {
  color: var(--brass-bright);
}

/* Event detail panel */
.event-detail {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  padding-bottom: 24px;
}
.event-detail .event-media {
  border-radius: 0;
}
.detail-back {
  display: inline-block;
  margin: 18px 24px 0;
  padding: 8px 4px;
  background: transparent;
  border: 0;
  color: var(--brass);
  font-size: 14px;
}
.detail-back:hover {
  color: var(--brass-bright);
}
.event-detail .event-media {
  order: -1;
}
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 4px;
}
.detail-head h2 {
  font: 600 26px/1.35 var(--serif);
  letter-spacing: -0.02em;
}
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 24px 0;
}
.detail-body {
  padding: 18px 24px 4px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}
.detail-body p {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.detail-body .muted {
  font-style: italic;
}
.detail-note {
  margin: 8px 24px 0;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--surface-raised);
  border-radius: 10px;
}
.detail-note.ok {
  color: #a8d7be;
}
.detail-actions {
  padding: 18px 24px 0;
}
.detail-actions .ev-book {
  min-width: 180px;
}
.detail-msg {
  padding: 8px 24px 0;
}

@media (max-width: 850px) {
  .event-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .events-teaser {
    padding: 16px 18px;
    gap: 14px;
  }
  .ev-tabs {
    gap: 4px;
  }
  .ev-tab {
    flex: 1 1 auto;
    text-align: center;
    font-size: 14px;
  }
  .event-grid {
    gap: 16px;
    margin-top: 22px;
  }
  .detail-head h2 {
    font-size: 22px;
  }
  .event-acts {
    width: 100%;
  }
  .event-acts .ev-book,
  .event-acts .ev-cancel {
    flex: 1 1 auto;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .events-teaser {
    transition: none;
  }
}

/* ========================================================================
   Appointments (Phase G) — booked-card note, my-appointments section,
   and the slot-picker modal. Additive; reuses the navy/brass tokens and
   the consent modal's layout patterns.
   ======================================================================== */

/* Booked-slot note + the card's book / cancel buttons */
.bnote.bappt {
  color: var(--brass-bright);
}
.bnote.bappt b {
  color: var(--ink);
}
.coupon .claim.book-appt {
  background: var(--brass);
  color: #101b2a;
}
.coupon .claim.book-appt:hover:not(:disabled) {
  background: var(--brass-bright);
}
.coupon .appt-cancel {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.coupon .appt-cancel:hover {
  color: var(--ink);
  border-color: var(--brass);
}

/* My-appointments section */
.my-appts {
  margin: 10px 0 28px;
}
.my-appts[hidden] {
  display: none;
}
.myappt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.myappt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ma-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ma-title {
  font: 600 15px/1.4 var(--serif);
  color: var(--ink);
}
.ma-when {
  font-size: 13px;
  color: var(--brass-bright);
}
.ma-locked {
  font-size: 12px;
  color: var(--muted);
}
.appt-cancel.sm {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.appt-cancel.sm:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--brass);
}
.appt-cancel.sm:disabled {
  opacity: 0.6;
  cursor: wait;
}
#myApptsMsg {
  font-size: 13px;
  color: #f1b2b2;
  margin-bottom: 10px;
}
#myApptsMsg:empty {
  display: none;
}

/* Slot-picker modal */
.appt-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: consent-fade 0.16s ease;
}
.appt-dialog {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px -20px #000;
  outline: none;
}
.appt-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.appt-titles {
  flex: 1 1 auto;
  min-width: 0;
}
.appt-head h2 {
  font: 600 19px/1.4 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.appt-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.appt-x {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.appt-x:hover {
  color: var(--ink);
  border-color: var(--brass);
}
.appt-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 24px 8px;
}
.appt-body > :first-child {
  margin-top: 16px;
}
.appt-loading,
.appt-empty,
.appt-note {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}
.appt-note,
.appt-preview-note {
  color: var(--brass-bright);
  background: #302b23;
  border-radius: 8px;
  padding: 11px 14px;
}
.appt-preview-note {
  font-size: 12.5px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.appt-quota {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.appt-err {
  color: #f1b2b2;
}
.appt-err .appt-retry {
  margin-top: 12px;
  min-height: 42px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.appt-err .appt-retry:hover {
  border-color: var(--brass);
}
.appt-day {
  margin-bottom: 20px;
}
.appt-date {
  font: 600 14px/1.5 var(--serif);
  color: var(--brass-bright);
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  /* full-bleed to the dialog edge so slots scrolling underneath are fully
     masked, and sit flush with the modal's top instead of peeking through */
  margin: 0 -24px 10px;
  padding: 12px 24px 10px;
  border-bottom: 1px solid var(--line);
}
.appt-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}
.appt-slot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.appt-slot:hover:not(.full) {
  border-color: var(--brass);
}
.appt-slot input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.appt-slot:has(input:checked) {
  border-color: var(--brass);
  background: #152b43;
}
.appt-slot:has(input:focus-visible) {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}
.appt-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.appt-seats {
  font-size: 11.5px;
  color: var(--muted);
}
.appt-slot.full {
  opacity: 0.5;
  cursor: not-allowed;
}
.appt-slot.full .appt-seats {
  color: #e8a0a0;
}
.appt-foot {
  flex-shrink: 0;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
}
.appt-error {
  font-size: 13px;
  color: #f1b2b2;
  line-height: 1.6;
  margin-bottom: 12px;
}
.appt-error:empty {
  display: none;
}
.appt-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.appt-btn-cancel {
  min-height: 46px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.appt-btn-cancel:hover {
  color: var(--ink);
  border-color: var(--brass);
}
.appt-submit {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #101b2a;
  background: var(--brass);
  border: 0;
  border-radius: 8px;
  transition: background 0.15s;
}
.appt-submit:hover:not(:disabled) {
  background: var(--brass-bright);
}
.appt-submit:disabled,
.appt-submit[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (min-width: 640px) {
  .appt-overlay {
    align-items: center;
    padding: 24px;
  }
  .appt-dialog {
    border-radius: 16px;
    max-height: calc(100% - 48px);
  }
}
@media (max-width: 480px) {
  .myappt {
    flex-direction: column;
    align-items: stretch;
  }
  .appt-cancel.sm {
    width: 100%;
  }
}

/* ---- "สถานะการรับสิทธิ์ / คำขอของฉัน" (my claims) ---- */
.my-claims {
  margin-top: 36px;
}
.claims-loading {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.claims-empty {
  padding: 40px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 8px;
}
.claims-empty strong {
  color: var(--ink);
  font: 500 17px/1.5 var(--serif);
}
.claims-empty span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.claims-list {
  display: grid;
  gap: 16px;
}
.claim-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  display: grid;
  gap: 10px;
}
.claim-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.claim-title {
  margin: 0;
  font: 500 17px/1.4 var(--serif);
  color: var(--ink);
}
.claim-badge {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.claim-badge.cb-requested {
  color: var(--brass-bright);
  border-color: color-mix(in srgb, var(--brass-bright) 45%, var(--line));
}
.claim-badge.cb-in_progress {
  color: #8fc7ec;
  border-color: color-mix(in srgb, #8fc7ec 45%, var(--line));
}
.claim-badge.cb-fulfilled {
  color: #a8d7be;
  border-color: color-mix(in srgb, #a8d7be 45%, var(--line));
}
.claim-badge.cb-cancelled {
  color: #e2a6a6;
  border-color: color-mix(in srgb, #e2a6a6 45%, var(--line));
}
.claim-date,
.claim-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.claim-appt {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
}
.claim-appt .ca-lab {
  color: var(--muted);
}
.claim-appt .ca-val {
  color: var(--ink);
  font-weight: 500;
}
.claim-track {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ct-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.ct-lab {
  color: var(--muted);
  min-width: 68px;
}
.ct-val {
  color: var(--ink);
}
.ct-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ct-num code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  user-select: all;
}
.ct-copy {
  font-size: 12px;
  font-weight: 600;
  color: var(--brass-bright);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--brass-bright) 45%, var(--line));
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  min-height: 32px;
}
.ct-copy:hover,
.ct-copy:focus-visible {
  background: color-mix(in srgb, var(--brass-bright) 14%, transparent);
  color: var(--ink);
}
.ct-copy.copied {
  color: #a8d7be;
  border-color: color-mix(in srgb, #a8d7be 45%, var(--line));
}
.claim-timeline {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.claim-timeline .cl-step {
  position: relative;
  padding: 0 0 14px 22px;
}
.claim-timeline .cl-step:last-child {
  padding-bottom: 0;
}
.claim-timeline .cl-dot {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
}
.claim-timeline .cl-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.claim-timeline .cl-body {
  display: grid;
  gap: 2px;
}
.claim-timeline .cl-label {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
}
.claim-timeline .cl-when {
  color: var(--muted);
  font-size: 12px;
}
.claim-timeline .cl-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 2px;
}
@media (max-width: 640px) {
  .claim-head {
    flex-direction: column;
    gap: 6px;
  }
}
