/* J’AIME V48 — passwordless membership, account and staff member lookup */
.member-header-link {
  flex: 0 0 auto;
  padding: .5rem 0;
  border-bottom: 1px solid transparent;
  color: #4b3a30;
  font-family: var(--serif);
  font-size: .67rem;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.member-header-link:hover,
.member-header-link:focus-visible { border-color: var(--gold); }
.mobile-nav .member-mobile-link { color: var(--plum); }

.member-page {
  min-height: 70svh;
  padding: clamp(68px, 9vw, 132px) clamp(20px, 5vw, 72px) clamp(90px, 10vw, 150px);
  background:
    radial-gradient(circle at 10% 10%, rgba(174,134,80,.08), transparent 32%),
    linear-gradient(135deg, #fbf8f3, #f3e9df);
}
.member-shell { width: min(1180px, 100%); margin: 0 auto; }
.member-auth-shell { width: min(980px, 100%); }
.member-page-heading { max-width: 790px; margin: 0 auto clamp(36px, 5vw, 62px); text-align: center; }
.member-page-heading h1 {
  margin: 0 0 1rem;
  color: var(--plum);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.member-page-heading > p:last-child {
  max-width: 650px;
  margin: 0 auto;
  color: #6d6057;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.7;
}
.member-preview-notice {
  width: min(840px,100%);
  margin: 0 auto 24px;
  padding: 13px 16px;
  border: 1px solid rgba(174,134,80,.32);
  background: rgba(255,253,250,.82);
  color: #6a5748;
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}
.member-auth-card {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  min-height: 610px;
  border: 1px solid var(--line);
  background: rgba(255,253,250,.94);
  box-shadow: 0 30px 75px rgba(53,16,31,.09);
}
.member-auth-art {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(42px, 6vw, 80px);
  background: linear-gradient(150deg, #35101f, #6a1e3e);
  color: #fff8f2;
  text-align: center;
}
.member-auth-art img { width: min(190px, 55%); margin-bottom: 32px; filter: brightness(0) invert(1); opacity: .76; }
.member-auth-art h2 { margin: 0 0 16px; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1; }
.member-auth-art p { max-width: 320px; margin: 0; font-family: var(--serif); line-height: 1.75; opacity: .86; }
.member-auth-panel { padding: clamp(34px, 5vw, 72px); }
.member-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.member-tab {
  padding: 14px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #75665c;
  background: transparent;
  font-family: var(--serif);
  font-size: .73rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.member-tab.is-active { border-bottom-color: var(--gold); color: var(--plum); }
.member-form { display: grid; gap: 18px; }
.member-form[hidden] { display: none; }
.member-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.member-field { display: grid; gap: 8px; }
.member-field label,
.member-field > span {
  color: #4c3930;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.member-field input,
.member-field select {
  width: 100%;
  min-height: 49px;
  padding: 12px 13px;
  border: 1px solid #d8ccc1;
  border-radius: 0;
  color: #392b25;
  background: #fffdfa;
  font: inherit;
}
.member-field input:focus,
.member-field select:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.member-check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; color: #675a51; font-size: .8rem; line-height: 1.55; }
.member-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--plum); }
.member-check a { color: var(--plum); }
.member-help { margin: -6px 0 0; color: #84756a; font-size: .78rem; line-height: 1.55; }
.member-submit { width: 100%; margin-top: 5px; cursor: pointer; }
.member-submit:disabled { opacity: .58; cursor: wait; }
.member-message { min-height: 22px; margin: 0; color: #6a5748; font-size: .82rem; line-height: 1.55; }
.member-message.is-error { color: #a13232; }
.member-message.is-success { color: #466c53; }
.member-otp-box { display: grid; gap: 18px; }
.member-otp-box[hidden] { display: none; }
.member-otp-code { letter-spacing: .24em; text-align: center; font-size: 1.1rem !important; }
.member-back-button { justify-self: start; padding: 3px 0 5px; border: 0; border-bottom: 1px solid var(--gold); color: var(--plum); background: transparent; cursor: pointer; }

.account-topbar { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 34px; }
.account-topbar h1 { margin: 0; color: var(--plum); font-size: clamp(2.8rem, 5vw, 5rem); line-height: 1; }
.account-topbar p { margin: 0 0 9px; color: var(--gold); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; }
.account-logout { flex: 0 0 auto; }
.account-summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.account-stat { padding: 26px; border: 1px solid var(--line); background: rgba(255,253,250,.84); }
.account-stat span { display: block; margin-bottom: 10px; color: #7d6f65; font-size: .67rem; letter-spacing: .13em; text-transform: uppercase; }
.account-stat strong { display: block; color: var(--plum); font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.65rem); font-weight: 400; }
.account-main-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.membership-card {
  position: sticky;
  top: 145px;
  overflow: hidden;
  min-height: 520px;
  padding: 34px;
  border: 1px solid rgba(174,134,80,.4);
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,.14), transparent 25%),
    linear-gradient(150deg, #35101f, #6b203f);
  color: #fff8f2;
  box-shadow: 0 22px 55px rgba(53,16,31,.16);
}
.membership-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(222,185,125,.22);
  transform: rotate(45deg);
}
.membership-card-logo { width: 150px; margin-bottom: 35px; filter: brightness(0) invert(1); opacity: .82; }
.membership-card h2 { margin: 0 0 8px; font-size: clamp(2rem, 3vw, 3rem); }
.membership-number { margin: 0 0 25px; color: #e2c18b; font-size: .72rem; letter-spacing: .18em; }
.membership-qr-wrap { width: 230px; max-width: 100%; padding: 12px; background: #fffaf5; }
.membership-qr-wrap canvas { display: block; width: 100% !important; height: auto !important; }
.membership-card-note { max-width: 310px; margin: 18px 0 0; font-family: var(--serif); font-size: .9rem; line-height: 1.6; opacity: .8; }
.account-sections { display: grid; gap: 24px; }
.account-section { padding: clamp(25px, 4vw, 42px); border: 1px solid var(--line); background: rgba(255,253,250,.9); }
.account-section-header { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 24px; }
.account-section h2 { margin: 0; color: var(--plum); font-size: clamp(1.75rem, 3vw, 2.7rem); }
.account-section-header span { color: #8a7b70; font-size: .72rem; }
.account-empty { padding: 28px 0; border-top: 1px solid var(--line); color: #7c6d63; font-family: var(--serif); line-height: 1.7; }
.order-list { display: grid; gap: 0; }
.order-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.order-row h3 { margin: 0 0 7px; color: #4b342a; font-size: 1.18rem; }
.order-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: #806f63; font-size: .78rem; }
.order-amount { color: var(--plum); font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }
.recent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.recent-card { border: 1px solid var(--line); background: #fffdfa; text-decoration: none; }
.recent-card img { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #f4eee6; }
.recent-card-copy { padding: 15px; }
.recent-card h3 { margin: 0 0 6px; color: #4b342a; font-size: 1rem; line-height: 1.25; }
.recent-card p { margin: 0; color: #88776b; font-size: .72rem; }

.staff-shell { width: min(1040px,100%); }
.staff-access-card,
.staff-member-card,
.staff-order-form { padding: clamp(28px, 5vw, 50px); border: 1px solid var(--line); background: rgba(255,253,250,.94); }
.staff-access-card { max-width: 650px; margin: 0 auto; }
.staff-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 22px; align-items: start; }
.staff-member-card h2 { margin: 0 0 8px; color: var(--plum); font-size: clamp(2rem,4vw,3.6rem); }
.staff-member-details { display: grid; gap: 0; margin: 28px 0 0; }
.staff-detail { display: grid; grid-template-columns: 155px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.staff-detail dt { color: #89786c; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.staff-detail dd { margin: 0; color: #44342d; }
.staff-order-form h2 { margin: 0 0 24px; color: var(--plum); font-size: 2rem; }
.staff-purchase-list { margin-top: 22px; }

.member-privacy-section { border-top: 1px solid var(--line); padding-top: 1.7rem; }

@media (max-width: 1180px) {
  .member-header-link { font-size: .62rem; letter-spacing: .07em; }
  .header-right { gap: .75rem; }
  .nav-right { gap: 1rem; }
}
@media (max-width: 920px) {
  .member-header-link:not(.member-mobile-link) { display: none; }
  .member-auth-card { grid-template-columns: 1fr; }
  .member-auth-art { min-height: 300px; }
  .member-auth-art img { width: 125px; margin-bottom: 20px; }
  .account-main-grid, .staff-grid { grid-template-columns: 1fr; }
  .membership-card { position: relative; top: auto; }
}
@media (max-width: 700px) {
  .member-page { padding-left: 16px; padding-right: 16px; }
  .member-auth-panel { padding: 30px 22px 36px; }
  .member-form-row { grid-template-columns: 1fr; }
  .account-topbar { align-items: start; flex-direction: column; }
  .account-summary-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .membership-card { padding: 28px 24px; }
  .staff-detail { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 430px) {
  .recent-grid { grid-template-columns: 1fr; }
}
