.profile-view { padding-bottom: 100px; }
.profile-top { height: 197px; background: linear-gradient(180deg, #202025, #17171a); }
.profile-top > h1 { height: 48px; margin: 0; padding-top: 15px; font-size: 17px; text-align: center; }
.account-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 16px; margin-top: 17px; padding-left: 19px; }
.profile-avatar { display: grid; width: 64px; height: 64px; place-items: center; border: 2px solid #4d4d55; border-radius: 50%; background: #2c2c31; color: var(--accent); font-size: 22px; font-weight: 800; }
.account-copy { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.account-copy strong, .account-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 16px; }
.account-copy span { margin-top: 6px; color: #85858d; font-size: 12px; }
.credit-ribbon { display: flex; min-width: 104px; height: 42px; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 16px 0 28px; border: 0; border-radius: 22px 0 0 22px; background: linear-gradient(90deg, #48362a, #29231f); }
.credit-ribbon strong { font-size: 17px; }
.profile-content { min-height: calc(100vh - 197px); padding: 19px 19px 100px; background: #17171a; }

.auth-view { min-height: 100dvh; padding: 0; background: #121212; }
.auth-toolbar { position: sticky; top: 0; z-index: 5; height: 48px; background: #121212; }
.auth-content { width: 100%; padding: 44px 24px calc(36px + env(safe-area-inset-bottom)); }
.auth-brand { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 24px; border: 1px solid #4c4c55; border-radius: 50%; background: #232329; color: var(--accent); font-size: 24px; font-weight: 800; }
.auth-content h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.auth-content > p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 44px; margin-top: 28px; padding: 4px; border: 1px solid #33333a; border-radius: 8px; background: #1c1c20; }
.auth-tabs button { border: 0; border-radius: 6px; background: transparent; color: #8e8e96; font-size: 14px; font-weight: 700; }
.auth-tabs button.active { background: #34343a; color: #fff; }
#auth-form { margin-top: 22px; }
.auth-field { display: block; margin-bottom: 15px; }
.auth-field > span:first-child { display: block; margin-bottom: 7px; color: #d8d8dc; font-size: 12px; font-weight: 700; }
.auth-field > input, .password-input { width: 100%; height: 52px; border: 1px solid #37373f; border-radius: 8px; background: #202024; color: #fff; }
.auth-field > input { padding: 0 14px; }
.password-input { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; }
.password-input input { min-width: 0; height: 50px; padding: 0 14px; border: 0; outline: 0; background: transparent; color: #fff; }
.password-input button { height: 38px; margin-right: 7px; padding: 0 8px; border: 0; background: transparent; color: #a4a4ad; font-size: 12px; }
.auth-field input::placeholder { color: #9a9aa3; }
.auth-field input:focus, .password-input:focus-within { border-color: var(--accent); outline: 2px solid rgba(255,107,138,.2); outline-offset: 0; }
.forgot-password { display: block; margin: -2px 0 0 auto; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; }
.auth-status { min-height: 38px; margin: 9px 0 6px; color: #ff9caf; font-size: 12px; line-height: 1.45; }
.auth-status.success { color: #65d99a; }
.auth-submit { width: 100%; height: 52px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 800; }
.auth-submit:disabled, .social-login button:disabled { cursor: not-allowed; opacity: .55; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 25px 0 16px; color: #777780; font-size: 11px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #313138; content: ""; }
.social-login { display: grid; gap: 10px; }
.social-login button { position: relative; width: 100%; height: 52px; border: 1px solid #3b3b43; border-radius: 8px; background: #202024; color: #fff; font-size: 14px; font-weight: 700; }
.social-login button span { position: absolute; left: 16px; top: 50%; display: grid; width: 24px; height: 24px; place-items: center; transform: translateY(-50%); font-size: 17px; font-weight: 800; }
.google-mark { color: #fff; }
.facebook-mark { border-radius: 50%; background: #1877f2; color: #fff; font-family: Arial, sans-serif; }
.auth-terms { margin: 20px auto 0 !important; max-width: 290px; color: var(--muted) !important; font-size: 11px !important; text-align: center; }

@media (max-height: 700px) {
  .auth-content { padding-top: 16px; }
  .auth-brand { width: 44px; height: 44px; margin-bottom: 16px; }
  .auth-tabs { margin-top: 18px; }
}
@media (max-height: 850px) {
  .auth-content { padding-top: 12px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .auth-brand { width: 42px; height: 42px; margin-bottom: 12px; font-size: 19px; }
  .auth-content h1 { font-size: 24px; }
  .auth-content > p { margin-top: 5px; font-size: 13px; }
  .auth-tabs { height: 40px; margin-top: 14px; }
  #auth-form { margin-top: 12px; }
  .auth-field { margin-bottom: 10px; }
  .auth-field > span:first-child { margin-bottom: 4px; }
  .auth-field > input, .password-input { height: 46px; }
  .password-input input { height: 44px; }
  .auth-status { min-height: 20px; margin: 5px 0 4px; }
  .auth-submit { height: 48px; }
  .auth-divider { margin: 12px 0; }
  .social-login { gap: 8px; }
  .social-login button { height: 46px; }
  .auth-terms { margin-top: 10px !important; }
}
.member-banner { display: grid; width: 100%; min-height: 78px; grid-template-columns: 56px 1fr 16px; align-items: center; gap: 16px; padding: 11px 27px; border: 0; border-radius: 8px; background: linear-gradient(120deg, #473726, #2b241e); text-align: left; }
.member-gem { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 50%; background: rgba(255,211,90,.12); color: var(--gold); font-size: 24px; }
.member-banner strong, .member-banner small { display: block; }
.member-banner strong { font-size: 16px; }
.member-banner small { margin-top: 5px; color: #c5a97a; font-size: 11px; }
.profile-menu { margin-top: 16px; overflow: hidden; border-radius: 8px; background: #202024; }
.profile-menu button { display: grid; width: 100%; height: 52px; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 0 15px; border: 0; border-bottom: 1px solid #303036; background: transparent; text-align: left; font-size: 13px; }
.profile-menu button:last-child { border-bottom: 0; }
.profile-menu button > span:last-child, .profile-menu button > strong { color: #85858d; font-size: 18px; font-weight: 400; }
.menu-icon { display: grid; width: 24px; height: 24px; place-items: center; color: #a4a4a5; font-size: 18px; }
.secondary-menu { margin-top: 16px; }
.app-version { margin: 20px 0 0; color: #5f5f66; font-size: 11px; text-align: center; }

.modal-layer { position: fixed; z-index: 100; top: var(--visual-viewport-top, 0); right: 0; bottom: auto; left: 0; display: none; height: var(--visual-viewport-height, 100dvh); align-items: end; justify-content: center; }
.modal-layer.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(100%, 375px); max-height: calc(var(--visual-viewport-height, 100dvh) - 12px); overflow: auto; overscroll-behavior: contain; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; background: #202024; animation: modal-in .2s ease-out; }
@keyframes modal-in { from { transform: translateY(25px); opacity: 0; } }
.modal-handle { width: 34px; height: 3px; margin: -9px auto 18px; border-radius: 2px; background: #56565e; }
.modal h2 { margin: 0 0 8px; font-size: 20px; }
.modal p { margin: 0 0 16px; color: #a4a4a5; font-size: 12px; line-height: 1.55; }
.modal-art, .modal-media { display: block; width: 100%; height: 280px; margin-bottom: 17px; border-radius: 8px; background: #111; object-fit: cover; }
.template-modal .modal-art { object-fit: contain; }
.modal-actions { display: flex; gap: 9px; }
.modal-actions button, .save-link { display: grid; flex: 1; height: 44px; place-items: center; border: 1px solid #414149; border-radius: 7px; background: transparent; text-decoration: none; font-weight: 700; }
.modal-actions .primary, .save-link.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.section-kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: 9px; font-weight: 800; }
.progress-track { height: 5px; margin: 18px 0 9px; overflow: hidden; border-radius: 3px; background: #303038; }
.progress-bar { width: 8%; height: 100%; background: var(--accent); transition: width .5s ease; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.price-card { padding: 14px 7px; border: 1px solid #3b3b42; border-radius: 7px; background: #17171a; text-align: center; }
.price-card.featured { border-color: var(--gold); }
.price-card strong, .price-card span { display: block; }
.price-card span { margin-top: 4px; color: #85858d; font-size: 10px; }
.model-picker-head { position: sticky; z-index: 2; top: -22px; margin: -22px -18px 10px; padding: 19px 18px 10px; background: #202024; }
.model-search { display: flex; height: 40px; align-items: center; gap: 8px; margin-top: 12px; padding: 0 11px; border-radius: 7px; background: #17171a; }
.model-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.model-list { display: grid; gap: 7px; }
.model-option { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 66px; padding: 10px 12px; border: 1px solid #3b3b42; border-radius: 7px; background: #17171a; text-align: left; }
.model-option.selected { border-color: var(--accent); background: rgba(255,107,138,.06); }
.model-option strong, .model-option small, .model-option span { display: block; }
.model-option strong { font-size: 12px; }
.model-option small { margin-top: 4px; color: #85858d; font-size: 9px; line-height: 1.35; }
.model-option > span:last-child { color: var(--gold); font-size: 9px; white-space: nowrap; }
.model-empty { padding: 42px 12px; color: #85858d; font-size: 12px; text-align: center; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: max(92px, calc(env(safe-area-inset-bottom) + 72px)); width: min(calc(100vw - 32px), 343px); transform: translate(-50%, 12px); padding: 11px 14px; border: 1px solid #414149; border-radius: 8px; background: #2a2a30; color: #fff; font-size: 12px; line-height: 1.4; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
