.member-page, .member-entry, .member-security {
  --member-ink: #2d201a;
  --member-muted: #71665d;
  --member-paper: #fffbf6;
  --member-border: #ded5ca;
  --member-wash: #fff0e4;
  --member-accent: #a73922;
  color: var(--member-ink);
}
body.member-gate { background: #fffbf6; }
.member-gate .layout { display: block; }
.member-gate .rail { display: none; }
.member-gate .work { padding: 0; }
.member-gate main { min-height: 100dvh; max-width: 1040px; padding: clamp(16px, 4vw, 56px); display: grid; align-content: center; }
.member-wait { text-align: center; color: #71665d; }
.member-entry { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid var(--member-border); border-radius: 24px; background: var(--member-paper); }
.member-art { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 30px; padding: clamp(24px,4vw,46px); background: #ffe0ce; }
.member-intro { min-width: 0; }
.member-intro h1 { margin: 0; color: var(--member-ink); font-size: clamp(26px,4vw,44px); line-height: 1.2; font-weight: 850; letter-spacing: -.055em; text-wrap: balance; }
.member-intro p, .member-auth > p { font-size: 14px; line-height: 1.6; color: #66584f; }
.member-intro p { margin: 9px 0 0; }
.member-illustration { width: min(100%,250px); height: auto; align-self: flex-end; object-fit: contain; }
.member-auth { padding: clamp(24px,4vw,46px); align-self: center; }
.member-auth h2 { font-size: 26px; margin: 0; }
.member-auth > p { margin: 8px 0 20px; }
.member-auth form, .member-security form { display: grid; gap: 15px; }
.member-field { display: grid; gap: 6px; color: var(--member-ink); font-size: 14px; font-weight: 650; }
.member-field input, .shop-code input {
  display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid #cbbfb2; border-radius: 10px; color: var(--member-ink); background: #fffdf9;
  font: inherit; font-size: 16px; font-weight: 400; line-height: 1.4;
}
.member-field input::placeholder, .shop-code input::placeholder { color: #82766b; }
.member-login-input { text-align: center; }
.member-field .member-login-input::placeholder { color: #727272; opacity: 1; }
.member-field .member-login-input:focus { outline: none; border-color: var(--member-accent); }
.member-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; padding: 10px 20px; border-radius: 99px; background: #352218; color: #fffbf5; font-weight: 680; }
.member-primary:hover { background: #513123; }
.member-primary:disabled, .member-signout:disabled { opacity: .55; }
.member-error { margin: 0; color: #a62c1c; font-size: 13px; }
.member-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--member-muted); font-size: 12px; line-height: 1.65; }
.member-consent input, .shop-check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #a73922; }
.member-consent a, .shop-check a, .shop-actions button { color: var(--member-accent); text-decoration: underline; text-underline-offset: 3px; }

.member-page { width: 100%; max-width: 700px; margin: 0 auto; padding: 12px 0 24px; }
.member-shop { background: url('/assets/soda/account-checks.webp') right top / 98px auto no-repeat; background-blend-mode: multiply; }
.member-title { margin: 0; font-weight: 830; font-size: clamp(28px,4.7vw,35px); line-height: 1.25; letter-spacing: -.055em; }
.member-overview { display: grid; gap: 12px; max-width: 580px; padding-top: 0; }
.member-profile { --profile-inset: clamp(12px,3vw,20px); min-width: 0; display: grid; gap: 12px; padding-bottom: 12px; border: 1px solid #e2d4c7; border-radius: 18px; background: #fffdf9; }
.member-identity { display: flex; gap: 14px; align-items: center; padding: 14px var(--profile-inset); border-radius: 17px 17px 0 0; background: #ffebdc; }
.member-monogram { position: relative; display: grid; place-items: center; flex: none; width: 54px; height: 54px; border: 2px solid #fffaf3; border-radius: 50%; background: #ffd2b5; color: #593125; font-size: 25px; font-weight: 750; }
.member-monogram img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.member-monogram::after { content: ""; position: absolute; top: -8%; right: -10%; width: 31%; aspect-ratio: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fa7757' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='m4 10 2.5-6m3 9 4.8-5m-.9 10 6-2'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.member-identity-text { min-width: 0; }
.member-identity h1 { overflow-wrap: anywhere; margin: 0; color: var(--member-ink); font-size: clamp(23px,5.8vw,28px); line-height: 1.25; letter-spacing: -.035em; }
.member-id-meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 2px 0 0; color: #68594f; font-size: 12px; line-height: 1.5; }
.member-id-meta > span { min-width: 0; overflow-wrap: anywhere; }
.member-pass-link { display: inline-flex; align-items: center; justify-content: center; gap: 3px; margin-left: auto; flex: none; color: var(--member-ink); font-size: 14px; font-weight: 650; }
.member-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 var(--profile-inset); }
.member-metrics div { position: relative; display: flex; flex-direction: column-reverse; align-items: center; min-width: 0; gap: 2px; padding-inline: 4px; text-align: center; }
.member-metrics div + div::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 4px; width: 1px; background: #e1d7cc; }
.member-metrics dt { color: #5c4a3d; font-size: 13px; line-height: 1.6; }
.member-metrics dd { max-width: 100%; margin: 0; font: 780 26px/1.15 "Avenir Next","PingFang SC",system-ui,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.06em; overflow-wrap: anywhere; }
.member-metrics small { margin-left: 4px; font: 680 15px/1.2 "PingFang SC",sans-serif; letter-spacing: 0; }
.member-pass { display: flex; align-items: center; position: relative; isolation: isolate; overflow: hidden; gap: 12px; min-height: 110px; margin: 14px 0 22px; padding: 15px 24px; border: 0; border-radius: 14px; background: url('/assets/soda/account-pass.webp') center / 100% 100% no-repeat; color: var(--member-ink); }
a.member-pass:hover .member-pass-link { text-decoration: underline; text-underline-offset: 3px; }
.member-pass-copy { position: relative; z-index: 1; display: grid; gap: 6px; min-width: 0; }
.member-pass-copy strong { font-size: clamp(24px,5.5vw,32px); font-weight: 810; line-height: 1.15; }
.member-pass-copy small { color: #574127; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.member-pass-art { display: block; object-fit: contain; position: absolute; pointer-events: none; z-index: -1; bottom: 1px; right: clamp(70px,17%,104px); height: 94%; max-width: 34%; }
.member-pass-detail .member-pass-art { right: 22px; max-width: 42%; }
.member-pass-detail .member-pass-copy { max-width: 57%; }
.member-profile .member-pass { min-height: 67px; margin: 0 var(--profile-inset); border-radius: 0; padding: 0 clamp(17px,4.8%,24px); container-type: inline-size; }
.member-profile .member-pass::before, .member-profile .member-pass::after { content: ""; position: absolute; z-index: -1; bottom: 2px; pointer-events: none; }
.member-profile .member-pass::before { left: 40%; width: 37%; height: 72%; border-radius: 100% 54% 0 0; background: linear-gradient(120deg,#ffb86c 8%,#ffbc77 72%,#ffd388); }
.member-profile .member-pass::after { right: 9%; width: 17%; height: 36%; background: url('/assets/soda/account-checks.webp') right top / cover no-repeat; opacity: .8; transform: rotate(180deg); mask-image: linear-gradient(125deg,transparent 4%,#000 55%); }
.member-profile .member-pass-art { z-index: 0; inset: auto auto 2px 40%; width: 37%; max-width: 154px; height: 91%; object-position: center bottom; }
.member-profile .member-pass-copy { gap: 3px; }
.member-profile .member-pass-copy strong { font: 900 clamp(20px,6.9cqw,26px)/1.2 var(--soda-display); letter-spacing: -.05em; }
.member-profile .member-pass-copy small, .member-profile .member-pass-link { font-size: clamp(12px,3.7cqw,15px); line-height: 1.3; }
.member-profile .member-pass-link { position: relative; }
.basic-card, .shop-card { padding: 0 16px; border: 1px solid var(--member-border); border-radius: 16px; background: #fffdf9; }
.member-menu { padding: 0 14px; border: 1px solid #e1d5c9; border-radius: 16px; background: #fffcf8; }
.member-menu-row { display: flex; align-items: center; width: 100%; min-height: 47px; gap: 14px; padding: 5px; color: var(--member-ink); text-align: left; font-size: 16px; font-weight: 670; line-height: 1.4; }
.member-menu-row + .member-menu-row { border-top: 1px solid #e8e0d7; }
.member-menu-row:hover { color: var(--member-accent); }
.member-row-icon { width: 29px; height: 29px; flex: none; fill: none; stroke: #211c19; stroke-width: 2.15; stroke-linejoin: round; stroke-linecap: round; }
.member-menu-row > svg:last-child { margin-left: auto; color: #77675b; }
.member-overview :is(a,button):focus-visible { outline: 2px solid #a73922; outline-offset: 2px; }
.member-signout, .shop-card form[data-buy] .member-primary { display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px; min-height: 47px; margin: 18px 0 0; border: 1px solid #df785b; border-radius: 12px; background: #fff1e7; color: #a73922; font-size: 16px; font-weight: 680; }
.member-signout:hover, .shop-card form[data-buy] .member-primary:hover { background: #ffe5d5; }
.member-signout { min-height: 46px; margin: 0; border-color: #ee8869; border-radius: 10px; background: #fff3e9; color: #b43e25; letter-spacing: .035em; }
.member-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--member-muted); font-size: 14px; }
.member-back svg { transform: rotate(180deg); }
.member-detail-head { display: flex; align-items: center; gap: 5px; min-height: 48px; }
.member-detail-head .member-back { width: 40px; justify-content: center; color: var(--member-ink); }
.member-detail-head h1 { font-size: clamp(25px,4vw,31px); }
.member-shop .member-pass { margin: 17px 0 14px; }
.shop-allowance { padding: 4px 8px 0; }
.shop-card { margin: 14px 0 0; padding: 16px 18px; }
.shop-card h2, .shop-allowance h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.shop-card p, .shop-allowance p { margin: 7px 0 0; color: var(--member-muted); font-size: 13px; line-height: 1.55; }
.shop-quota { display: block; margin-top: 5px; font-size: 29px; font-weight: 780; }
.shop-quota small { font-size: 16px; font-weight: 620; }
.shop-benefits { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; }
.shop-benefits li { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 10px; background: #ffebca; color: #473022; font-size: 13px; font-weight: 650; }
.shop-benefits li:nth-child(2) { background: #dcece3; }
.shop-benefits li:nth-child(3) { background: #eee3f4; }
.shop-benefits img { width: 21px; height: 21px; object-fit: contain; }
.shop-allowance .shop-remaining { margin-top: 12px; color: var(--member-ink); }
.shop-meter { display: block; width: 100%; height: 12px; margin-top: 8px; overflow: hidden; appearance: none; border: 1px solid #3a2c22; border-radius: 99px; background: #fffaf0; }
.shop-meter::-webkit-progress-bar { background: #fffaf0; }
.shop-meter::-webkit-progress-value { background: #ffdb70; }
.shop-meter::-moz-progress-bar { background: #ffdb70; }
.shop-code { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-top: 10px; }
.member-renewal { margin: -6px 8px 12px; color: var(--member-muted); font-size: 13px; }
.shop-offers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 9px; min-width: 0; margin: 12px 0 9px; padding: 0; border: 0; }
.shop-offer { position: relative; min-width: 0; cursor: pointer; }
.shop-offer > span { display: grid; gap: 4px; height: 100%; padding: 12px; border: 1px solid var(--member-border); border-radius: 13px; background: #fffaf3; }
.shop-offer input { position: absolute; top: 12px; right: 10px; margin: 0; width: 14px; height: 14px; accent-color: var(--member-accent); }
.shop-offer strong { padding-right: 17px; font-size: 14px; }
.shop-offer b { color: var(--member-accent); font-size: clamp(18px,5vw,24px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.shop-offer small { color: var(--member-muted); font-size: 12px; }
.shop-offer input:checked + span { border-color: #a74b2a; background: #fff0da; }
.shop-offer input:focus-visible + span { outline: 2px solid #a74b2a; outline-offset: 2px; }
@media (max-width: 520px) {
  .shop-offers:has(> .shop-offer:nth-child(3)) { grid-auto-flow: row; }
  .shop-offers:has(> .shop-offer:nth-child(3)) .shop-offer > span {
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    padding-right: 34px;
  }
  .shop-offers:has(> .shop-offer:nth-child(3)) .shop-offer b { grid-column: 2; grid-row: 1 / 3; }
  .shop-offers:has(> .shop-offer:nth-child(3)) .shop-offer input { top: 50%; transform: translateY(-50%); }
}
.member-go-shop { margin-top: 8px; }
.shop-card .shop-paused, .shop-instructions { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #fff0de; }
.shop-instructions, .shop-facts dd, .shop-status { white-space: pre-wrap; overflow-wrap: anywhere; }
.shop-card .shop-status:empty { display: none; }
.shop-card .shop-status { color: var(--member-accent); }
.shop-check { display: block; margin: 15px 0 8px; color: #574e45; font-size: 13px; line-height: 1.65; }
.shop-check input { margin: 0 7px 0 0; vertical-align: -.2em; }
.shop-card form[data-buy] .member-primary { margin-top: 8px; }
.shop-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.shop-actions button { min-height: 44px; }
.shop-facts { margin: 10px 0; }
.shop-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; font-size: 14px; }
.shop-facts dd { margin: 0; text-align: right; }

.basic-page .member-title { margin: 3px 0 17px; }
.basic-controls { display: grid; min-width: 0; margin: 0; padding: 0; border: 0; gap: 14px; }
.basic-card { min-width: 0; margin: 0; padding: 20px; }
.basic-save { width: 100%; min-height: 46px; }
.basic-save:disabled { opacity: .55; }

body dialog.action-confirm { color: #302219; border-color: #d9cbbb; background: #fffbf6; }
body dialog.action-confirm p { color: #69594c; }
body dialog.action-confirm .action-confirm-ack { background: #f7eee3; }
body dialog.action-confirm .action-confirm-ack input { accent-color: #a73922; }
body dialog.action-confirm .action-confirm-cancel { color: #504238; border-color: #d9cbbb; background: #fffdf9; }
body dialog.action-confirm .action-confirm-accept { background: #39251c; }
body dialog.action-confirm .action-confirm-accept.destructive { background: #a43e29; }
body dialog.action-confirm :focus-visible { outline-color: #a43e29; }
@media (max-width:700px) {
  .member-entry { width: 100%; max-width: 460px; justify-self: center; grid-template-columns: 1fr; border-radius: 18px; }
  .member-art { flex-direction: row; align-items: center; gap: 10px; padding: 20px; }
  .member-intro p { margin-top: 5px; font-size: 12px; }
  .member-illustration { flex: none; width: min(26%,95px); align-self: center; }
  .member-auth { padding: 21px; }
  .member-page { padding: 9px 0; }
  .member-overview { padding: 0 0 9px; }
  .member-shop { background-size: 83px auto; }
  .member-pass { padding: 14px 17px; min-height: 100px; margin: 16px 0 20px; }
  .member-pass-detail .member-pass-art { right: 12px; }
  .shop-card, .basic-card { padding: 14px 15px; }
  .shop-code { grid-template-columns: 1fr; }
  .shop-code button { min-height: 40px; }
}
@media (min-width:701px) {
  .member-overview { gap: 14px; }
  .member-profile { gap: 14px; padding-bottom: 14px; }
  .member-profile .member-pass { min-height: 78px; }
  .member-menu-row { min-height: 50px; }
}
@media (max-width:370px) {
  .member-art { padding: 16px; }
  .member-auth { padding: 16px; }
  .member-intro h1 { font-size: 24px; }
  .member-pass { gap: 4px; padding-inline: 13px; }
  .member-pass-art { max-width: 29%; right: 59px; }
  .member-pass-copy strong { font-size: 22px; }
}

.member-auth-links { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.member-auth-link { min-height: 44px; padding: 0 4px; font-size: 14px; color: var(--member-accent); text-underline-offset: 4px; }
.member-auth-link:hover { text-decoration: underline; }
.member-auth-divider { height: 13px; width: 1px; background: #d7c4b4; }
.member-auth-submit { position: relative; isolation: isolate; overflow: hidden; gap: 0; min-height: 47px; transition: transform .18s cubic-bezier(.2,.8,.2,1), background .2s, box-shadow .2s; }
.member-auth-submit:not(:disabled):active { transform: scale(.975); }
.member-auth-submit:not(:disabled):hover { box-shadow: 0 4px 12px #35221818; }
.member-auth-submit[data-state=loading], .member-auth-submit[data-state=success] { opacity: 1; cursor: progress; }
.member-auth-submit[data-state=loading] { background: #513123; }
.member-auth-submit[data-state=success] { background: #49614c; }
.member-auth-submit::after { content: ""; position: absolute; z-index: -1; inset: -90% -20%; pointer-events: none; border-radius: 50%; background: #ffdeb530; transform: scale(0); opacity: 0; }
.member-auth-submit[data-state=loading]::after { animation: member-button-ripple .55s ease-out both; }
.member-submit-icon { position: relative; width: 0; height: 18px; margin-right: 0; opacity: 0; transition: width .18s, margin-right .18s, opacity .18s; }
.member-auth-submit[data-state=loading] .member-submit-icon, .member-auth-submit[data-state=success] .member-submit-icon { width: 18px; margin-right: 9px; opacity: 1; }
.member-auth-submit[data-state=loading] .member-submit-icon::before { content: ""; position: absolute; inset: 1px; border: 2px solid #fffbf54d; border-top-color: currentColor; border-radius: 50%; animation: member-button-spin .7s linear infinite; }
.member-auth-submit[data-state=success] .member-submit-icon::before { content: ""; position: absolute; left: 5px; top: 2px; width: 6px; height: 11px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes member-button-ripple { 0% { transform: scale(.15); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes member-button-spin { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion:reduce) {
  .member-auth-submit, .member-submit-icon { transition: none; }
  .member-auth-submit:not(:disabled):active { transform: none; }
  .member-auth-submit::after { animation: none !important; }
  .member-auth-submit[data-state=loading] .member-submit-icon::before { animation: none; }
}
.member-code-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.member-code-line button { min-width: 96px; padding: 0 12px; color: #713822; background: #ffead3; border-radius: 10px; }
.member-code-line button:disabled { color: #71665d; background: #f1ebe3; cursor: default; }
.member-sms-hint { margin: -5px 0 0; color: var(--member-muted); font-size: 13px; line-height: 1.5; }
.member-phone-binding { margin-top: 18px; border-top: 1px dashed #d5c5b8; padding-top: 14px; }
.member-phone-binding:empty { display: none; }
.member-phone-binding summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--member-accent); }
.member-bound-number { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.member-bound-number strong { font-variant-numeric: tabular-nums; }
.member-phone-binding h3 { font-size: 16px; margin: 0; }
.member-phone-binding p:not(.member-error) { color: var(--member-muted); font-size: 14px; }

.member-registration-fields { display: grid; gap: 15px; min-width: 0; margin: 0; padding: 0; border: 0; }
.member-registration-fields:disabled .member-field { opacity: .65; }
.member-registration-fields:disabled input { cursor: not-allowed; }
.member-registration-unavailable { padding: 13px 15px; margin: 0 0 18px; border: 1px solid #e8c6ae; border-radius: 12px; color: #8e4c2d; background: #fff0de; }
.member-registration-unavailable strong { display: block; font-size: 14px; }
.member-registration-unavailable p { margin: 5px 0 0; font-size: 13px; line-height: 1.65; }
.member-auth .member-primary:disabled:not([data-state=loading]):not([data-state=success]) { cursor: not-allowed; }
