.account-page { min-height: 100vh; }
.account-header { position: fixed; }
.account-nav { display: flex; align-items: center; gap: 14px; }
.account-nav a { color: #d7d0df; font-weight: 700; font-size: .9rem; }
.account-main { padding-top: 82px; }
.account-hero { padding: 78px 0 42px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 75% 20%, rgba(244,198,61,.11), transparent 34%); }
.account-hero-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: end; }
.account-hero h1 { margin: 12px 0 14px; max-width: 780px; font-size: clamp(2.5rem, 5vw, 5.2rem); line-height: .98; letter-spacing: -.055em; }
.account-hero p { margin: 0; max-width: 720px; color: var(--muted); font-size: 1.05rem; }
.safe-note { padding: 20px; border: 1px solid rgba(35,199,105,.25); background: rgba(35,199,105,.06); border-radius: 18px; display: grid; gap: 6px; }
.safe-note strong { color: #7ff0ac; }
.safe-note span { color: var(--muted); font-size: .9rem; }
.account-shell { padding-top: 36px; padding-bottom: 90px; }
.hidden { display: none !important; }
.notice { margin-bottom: 18px; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #e7e1ef; }
.notice.success { border-color: rgba(35,199,105,.35); background: rgba(35,199,105,.08); color: #99f0bb; }
.notice.error { border-color: rgba(255,92,122,.35); background: rgba(255,92,122,.08); color: #ffafbf; }
.auth-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.portal-card { border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.card-heading span { color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.card-heading h2 { margin: 5px 0 4px; font-size: 1.55rem; line-height: 1.2; }
.card-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.portal-form { margin-top: 18px; display: grid; gap: 13px; }
.portal-form label { display: grid; gap: 7px; color: #dcd5e6; font-size: .84rem; font-weight: 700; }
.portal-form input, .portal-form select { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5,5,7,.62); color: #fff; outline: none; padding: 0 13px; font: inherit; }
.portal-form input:focus, .portal-form select:focus { border-color: rgba(244,198,61,.65); box-shadow: 0 0 0 3px rgba(244,198,61,.08); }
.primary-btn, .secondary-btn, .ghost-btn { min-height: 44px; border-radius: 12px; border: 0; padding: 0 16px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.primary-btn { color: #211900; background: var(--gold); box-shadow: 0 10px 28px rgba(244,198,61,.18); }
.secondary-btn { color: #fff; background: linear-gradient(135deg,#6d38d9,#9f45d8); }
.ghost-btn { color: #eee8f7; background: rgba(255,255,255,.055); border: 1px solid var(--line); }
.primary-btn:hover,.secondary-btn:hover,.ghost-btn:hover { transform: translateY(-1px); }
.primary-btn:disabled,.secondary-btn:disabled,.ghost-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.profile-strip { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; display: grid; place-items: center; background: var(--gold); color: #1b1400; font-weight: 900; font-size: 1.2rem; }
.profile-copy { display: grid; min-width: 0; }
.profile-copy span { color: var(--muted); font-size: .72rem; }
.profile-copy strong { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: #8f879c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-strip .ghost-btn { margin-left: auto; }
.subscription-box { margin-top: 16px; }
.sub-active { padding: 16px; border-radius: 16px; border: 1px solid rgba(35,199,105,.35); background: rgba(35,199,105,.07); display: grid; gap: 7px; }
.sub-active strong { color: #8aefb1; font-size: 1.05rem; }
.sub-active span { color: var(--muted); font-size: .9rem; }
.sub-inactive { padding: 16px; border-radius: 16px; border: 1px dashed rgba(244,198,61,.3); color: var(--muted); }
.history-list { margin-top: 14px; display: grid; gap: 9px; max-height: 240px; overflow: auto; }
.history-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.history-item strong { font-size: .88rem; }
.history-item span, .history-item small { color: var(--muted); font-size: .76rem; }
.portal-section { padding-top: 56px; }
.section-row { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 20px; }
.section-row h2 { margin: 5px 0 0; font-size: clamp(1.8rem,3vw,2.65rem); }
.section-row > p { margin: 0; max-width: 480px; color: var(--muted); text-align: right; }
.plans-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.plan-card { padding: 21px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(244,198,61,.055), rgba(255,255,255,.018)); display: grid; gap: 12px; }
.plan-card h3 { margin: 0; font-size: 1.18rem; }
.plan-price { color: var(--gold-2); font-size: 1.55rem; font-weight: 900; }
.plan-card p { margin: 0; color: var(--muted); font-size: .86rem; min-height: 42px; }
.plan-card .primary-btn { width: 100%; }
.stories-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.web-story-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); display: flex; flex-direction: column; }
.web-story-thumb { aspect-ratio: 16/10; width: 100%; object-fit: cover; background: var(--surface); }
.web-story-body { padding: 15px; display: grid; gap: 9px; flex: 1; }
.web-story-body h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.web-story-body p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-meta { display: flex; flex-wrap: wrap; gap: 7px; color: #d6cfe0; font-size: .72rem; }
.meta-chip { border: 1px solid var(--line); padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.025); }
.story-actions { display: grid; gap: 8px; margin-top: auto; }
.story-actions button { width: 100%; }
.load-more-wrap { display: grid; place-items: center; padding-top: 22px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.74); backdrop-filter: blur(9px); }
.portal-modal { position: relative; width: min(520px,100%); max-height: 88vh; overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: #12101b; box-shadow: var(--shadow); padding: 24px; }
.large-modal { width: min(760px,100%); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: #fff; background: rgba(255,255,255,.05); font-size: 1.35rem; cursor: pointer; }
.episodes-list { margin-top: 18px; display: grid; gap: 10px; }
.episode-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.episode-row strong { font-size: .9rem; }
.episode-row span { color: var(--muted); font-size: .78rem; }
.episode-access { color: #8aefb1 !important; font-weight: 800; }
.payment-status { padding: 12px; border-radius: 12px; border: 1px solid rgba(244,198,61,.26); background: rgba(244,198,61,.06); color: #f9eaa7; font-size: .86rem; }
.payment-status.success { border-color: rgba(35,199,105,.35); background: rgba(35,199,105,.08); color: #99f0bb; }
.payment-status.error { border-color: rgba(255,92,122,.35); background: rgba(255,92,122,.08); color: #ffafbf; }
.account-footer { margin-top: 30px; }
@media (max-width: 980px) {
  .account-hero-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stories-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .account-main { padding-top: 76px; }
  .account-hero { padding-top: 54px; }
  .auth-grid,.dashboard-grid { grid-template-columns: 1fr; }
  .plans-grid,.stories-grid { grid-template-columns: 1fr; }
  .section-row { display: grid; align-items: start; }
  .section-row > p { text-align: left; }
  .profile-strip { align-items: flex-start; flex-wrap: wrap; }
  .profile-strip .ghost-btn { margin-left: 66px; }
  .portal-card { padding: 18px; }
  .account-nav a { display: none; }
}
