.membership-chip { min-height: 32px; padding: 0 12px; border: 1px solid #000; border-radius: 999px; background: #000; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.membership-chip.is-member { background: #fff; color: #000; }
.membership-chip[hidden] { display: none; }

.membership-panel { position: relative; width: min(520px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow-y: auto; text-align: left; padding: 24px; }
.membership-panel h3 { font-size: 20px; margin-bottom: 14px; }
.membership-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #555; }
.membership-notice { margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; background: #fff4dc; color: #6b4700; font-size: 14px; }
.membership-state { padding: 14px; border-radius: 10px; background: #f5f5f5; margin-bottom: 16px; }
.membership-state-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.membership-state-row span { color: #555; font-size: 13px; }
.membership-meter { height: 6px; margin: 10px 0 8px; border-radius: 3px; background: #ddd; overflow: hidden; }
.membership-meter span { display: block; height: 100%; width: 0; background: #000; transition: width .3s; }
#membership-usage { font-size: 13px; color: #555; }
.membership-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.membership-plan { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 14px; border: 1.5px solid #ccc; border-radius: 10px; background: #fff; color: #000; cursor: pointer; text-align: left; }
.membership-plan.selected { border-color: #000; box-shadow: inset 0 0 0 1px #000; }
.plan-name { font-size: 14px; font-weight: 600; }
.plan-price { font-size: 26px; font-weight: 700; }
.plan-detail { font-size: 12.5px; color: #555; }
.membership-pay { width: 100%; justify-content: center; min-height: 46px; font-size: 16px; }
.membership-pay:disabled { opacity: .5; cursor: default; }
.membership-error { margin-top: 10px; color: #b00020; font-size: 14px; }
.membership-foot { margin-top: 12px; font-size: 12.5px; color: #555; line-height: 1.6; }
.membership-orders { margin-top: 12px; font-size: 13px; }
.membership-orders summary { cursor: pointer; color: #333; }
.membership-orders ul { list-style: none; margin-top: 8px; }
.membership-orders li { padding: 5px 0; border-bottom: 1px solid #eee; color: #444; }

@media (max-width: 560px) {
    .main-header { flex-wrap: wrap; gap: 8px; }
    .membership-panel { padding: 20px 16px; }
}

.membership-panel { width: min(560px, calc(100vw - 24px)); }
.membership-group { font-size: 13.5px; font-weight: 600; color: var(--text-muted); margin: 4px 0 8px; letter-spacing: .02em; }
.membership-notice b { font-size: 15.5px; }
.membership-plan { position: relative; }
.membership-plan.selected { border-color: var(--gold-deep, #d9952c); box-shadow: inset 0 0 0 1px var(--gold-deep, #d9952c); background: #fffaf0; }
.membership-plan:disabled { opacity: .55; cursor: default; }
.plan-tag { position: absolute; top: -9px; right: 10px; padding: 1px 9px; border-radius: 999px; background: var(--gold, #f2b552); color: #14182e; font-size: 11.5px; font-weight: 700; }
.plan-hint { font-size: 12.5px; color: #a8701a; font-weight: 600; }
.membership-pack { margin-top: 4px; font-size: 13px; color: #6b4700; }
.membership-channel { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.membership-channel button { padding: 6px 14px; border-radius: 999px; border: 1px solid #ccc; background: #fff; font-size: 13.5px; cursor: pointer; color: inherit; }
.membership-channel button.on { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.membership-soon { width: 100%; font-size: 13px; color: var(--text-muted); }
.membership-promise { margin-top: 12px; font-size: 13.5px; font-weight: 600; text-align: center; }
.membership-after { margin-top: 12px; padding: 12px; border-radius: 10px; background: #f3f3f3; font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.membership-after[hidden] { display: none; }
.membership-after.is-success { background: #eaf7ec; color: #17602a; font-weight: 600; }
.membership-chip.is-low { box-shadow: 0 0 0 2px var(--gold, #f2b552); }

.billing-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #fff4dc; color: #4f3a12; font-size: 14px; }
.billing-banner span { flex: 1; }
.billing-banner-cta { flex: none; min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--primary-color); color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.billing-banner-close { flex: none; width: 28px; height: 28px; border: 0; background: none; font-size: 20px; line-height: 1; color: #8a7443; cursor: pointer; }
.share-invite { margin-left: auto; font-size: 14px; font-weight: 600; color: inherit; }
.lang-toggle { min-height: 32px; padding: 0 10px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.login-container .lang-toggle { position: absolute; top: 14px; right: 14px; }

.membership-preview { margin-top: 8px; background: #fff; border: 1.5px solid #14182e; color: #14182e; font-weight: 600; }
.membership-invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f4ecdb; font-size: 13.5px; }
.membership-invite button { flex: none; padding: 5px 12px; border: 1px solid #14182e; border-radius: 8px; background: transparent; color: #14182e; font-size: 13px; cursor: pointer; }
.share-gate-note { margin-bottom: 12px; }
