:root {
    color-scheme: light;
    font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17181c;
    background: #f7f9fd;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded' !important;
}

/* ================= NATIVE MOBILE FEEL (NO BLUE TAP OR TEXT SELECTION) ================= */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Still allow typing & selecting inside actual text inputs and notes */
input, textarea, [contenteditable="true"], .selectable-text {
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Prevent blue focus outline box on mobile tap while keeping keyboard tabbing clean */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 50% -12%, rgba(72, 133, 239, .14), transparent 48%),
        #f7f9fd;
}

button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.account-shell {
    width: min(100% - 32px, 500px);
    min-height: 100vh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
}

.account-topbar {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.account-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.3px; }
.account-brand img { width: 34px; height: 34px; border-radius: 11px; }
.account-back { color: #667085; font-size: 14px; font-weight: 600; }

.account-panel {
    position: relative;
    margin: auto 0;
    padding: clamp(24px, 7vw, 36px);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 32px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 24px 70px rgba(31, 53, 91, .10), 0 2px 8px rgba(22, 32, 54, .03);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.account-eyebrow {
    margin: 0 0 12px;
    color: #3475e5;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.account-panel h1 { margin: 0; font-size: clamp(30px, 8vw, 38px); letter-spacing: -1.3px; line-height: 1.08; }
.account-copy { margin: 12px 0 24px; color: #6d7481; font-size: 15px; line-height: 1.55; }

.account-button {
    min-height: 52px;
    width: 100%;
    border: 0;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 20px;
    background: #111216;
    color: white;
    font-size: 15px;
    font-weight: 650;
    transition: transform .18s ease, opacity .18s ease;
}

.account-button:active { transform: scale(.98); }
.account-button:disabled { cursor: wait; opacity: .6; }
.account-button.secondary { background: #eef3fc; color: #245ebd; }
.account-button.danger { background: #d83d4d; color: white; }
.account-button.google-button {
    min-height: 44px;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #111216;
    color: #fff;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .1px;
    box-shadow: none;
}
.account-button.google-button:hover { background: #25262b; }
.account-button.google-button:active { background: #08090b; transform: scale(.99); }
.google-mark { width: 20px; height: 20px; flex: 0 0 20px; }

.account-legal, .account-note {
    color: #818896;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}
.account-legal { margin: 16px 0 0; }

.billing-toggle {
    width: fit-content;
    display: flex;
    gap: 3px;
    margin: 0 auto 22px;
    padding: 4px;
    border-radius: 99px;
    background: #eff2f7;
}

.billing-toggle button {
    border: 0;
    padding: 8px 15px;
    border-radius: 99px;
    background: transparent;
    color: #747c89;
    font-size: 13px;
    font-weight: 650;
}

.billing-toggle button.active { background: white; color: #17181c; box-shadow: 0 2px 8px rgba(22, 32, 54, .1); }
.pricing-title { font-size: 23px; font-weight: 750; }
.pricing-amount { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.pricing-amount strong { font-size: 42px; letter-spacing: -1.5px; }
.pricing-cadence { color: #687180; font-size: 14px; }
.pricing-savings { min-height: 20px; margin-top: 3px; color: #2870df; font-size: 13px; font-weight: 750; }
.pricing-tax { margin: 5px 0 18px; color: #7e8591; font-size: 12px; }

.feature-table { display: grid; grid-template-columns: minmax(0, 1fr) 60px 60px; gap: 0 8px; align-items: center; }
.feature-table > * { min-height: 42px; display: flex; align-items: center; border-bottom: 1px solid #eef0f4; }
.feature-table .feature-head { min-height: 30px; color: #858c98; font-size: 11px; font-weight: 650; justify-content: center; }
.feature-table .feature-label { color: #3c414a; font-size: 13px; line-height: 1.25; }
.feature-value { justify-content: center; color: #727987; font-size: 11px; text-align: center; }
.feature-value.plus { color: #276cda; font-weight: 700; }
.feature-value.check { color: #159a68; font-size: 17px; font-weight: 800; }
.feature-value.unavailable { color: #a4aab4; font-size: 16px; }

.account-message {
    display: none;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(196, 49, 65, .16);
    border-radius: 15px;
    background: #fff3f4;
    color: #a32232;
    font-size: 13px;
    line-height: 1.45;
}
.account-message.active { display: block; }
.account-message.success { border-color: rgba(23, 151, 99, .18); background: #effaf5; color: #16744e; }

.account-footer { margin-top: auto; padding-top: 22px; text-align: center; color: #8a909b; font-size: 12px; line-height: 1.5; }
.account-footer a { color: #536274; text-decoration: underline; text-underline-offset: 3px; }

.profile-card { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.profile-avatar, .profile-avatar-fallback { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #e8effa; }
.profile-avatar-fallback { display: grid; place-items: center; color: #3975d9; font-size: 22px; font-weight: 700; }
.profile-name { font-size: 16px; font-weight: 700; }
.profile-email { margin-top: 4px; color: #737b88; font-size: 13px; overflow-wrap: anywhere; }

.settings-list { overflow: hidden; border: 1px solid #edf0f4; border-radius: 21px; background: #fff; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid #edf0f4; }
.settings-row:last-child { border-bottom: 0; }
.settings-label { color: #777f8d; font-size: 13px; }
.settings-value { text-align: right; font-size: 14px; font-weight: 650; }
.settings-actions { display: grid; gap: 10px; margin-top: 18px; }
.delete-copy { margin: 22px 0 12px; color: #7a818e; font-size: 12px; line-height: 1.55; }

.settings-hero { text-align: center; }
.settings-hero .profile-card { justify-content: center; flex-direction: column; gap: 10px; margin: 18px 0 24px; }
.settings-hero .profile-avatar, .settings-hero .profile-avatar-fallback { width: 78px; height: 78px; }
.settings-hero .profile-name { font-size: 20px; letter-spacing: -.4px; }
.settings-hero .profile-email { font-size: 13px; }
.settings-section { margin-top: 22px; }
.settings-section-title { margin: 0 0 10px 4px; color: #737b88; font-size: 14px; font-weight: 600; }
.settings-list { border-radius: 20px; box-shadow: 0 5px 18px rgba(28, 42, 68, .035); }
.settings-row { min-height: 54px; padding: 13px 16px; }
.settings-row.plan-row { background: linear-gradient(100deg, #f4f8ff, #fff); }
.settings-row.plan-row .settings-value { color: #286ac8; }
.usage-card { padding: 17px; border: 1px solid #edf0f4; border-radius: 21px; background: #fff; }
.usage-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.usage-heading strong { font-weight: 650; }
.usage-value { color: #667085; white-space: nowrap; }
.usage-track { height: 7px; margin: 13px 0 10px; overflow: hidden; border-radius: 99px; background: #e9edf3; }
.usage-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3878eb, #79a9ff); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.usage-reset { color: #737b88; font-size: 12px; line-height: 1.45; }
.usage-detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #edf0f4; font-size: 14px; }
.usage-detail:last-child { border: 0; }
.usage-detail span:last-child { color: #656e7b; }
.settings-plan-action { margin-top: 12px; min-height: 46px; }
.settings-actions { grid-template-columns: 1fr 1fr; }
.settings-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.settings-actions .account-button { min-height: 47px; padding: 0 14px; font-size: 14px; }
.delete-copy { margin-top: 26px; }

.confirm-overlay {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(17, 22, 32, .3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.confirm-overlay.active { opacity: 1; visibility: visible; }
.confirm-card {
    width: min(100%, 360px);
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 30px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 24px 80px rgba(15, 24, 40, .2);
    transform: translateY(10px) scale(.97);
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.confirm-overlay.active .confirm-card { transform: translateY(0) scale(1); }
.confirm-card h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.confirm-card p { margin: 10px 0 20px; color: #6e7582; font-size: 14px; line-height: 1.55; }
.confirm-actions { display: grid; gap: 9px; }

.account-loading {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
    padding: 24px;
    background: rgba(244, 247, 252, .62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.account-loading.active { opacity: 1; visibility: visible; }
.account-loading-card {
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(100%, 250px);
    padding: 25px 22px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 28px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 20px 60px rgba(25,40,70,.16);
    color: #353a43;
    font-size: 14px;
    font-weight: 600;
}
.account-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #dce6f6;
    border-top-color: #3475e5;
    border-radius: 50%;
    animation: account-spin .7s linear infinite;
}
@keyframes account-spin { to { transform: rotate(360deg); } }

.checkout-status {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(20, 27, 39, .32);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.checkout-status[hidden] { display: none; }
.checkout-status.active { opacity: 1; visibility: visible; }
.checkout-status-card {
    width: min(100%, 390px);
    padding: 30px 26px 24px;
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 30px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 28px 90px rgba(12, 21, 39, .24);
    text-align: center;
    transform: translateY(10px) scale(.98);
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.checkout-status.active .checkout-status-card { transform: translateY(0) scale(1); }
.checkout-status-card h2 { margin: 12px 0 8px; font-size: 22px; letter-spacing: -.55px; }
.checkout-status-card p { margin: 0; color: #687180; font-size: 14px; line-height: 1.55; }
.checkout-status-card .account-spinner { margin: 0 auto; }
.checkout-status-icon {
    color: #178b5a;
    font-size: 38px;
    font-variation-settings: 'FILL' 1;
}
.checkout-status-icon.error { color: #bb3847; }
.checkout-status-actions { display: grid; gap: 9px; margin-top: 22px; }
.checkout-status-actions .account-button { min-height: 48px; }
.checkout-status-actions .account-button[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 390px) {
    .feature-table { grid-template-columns: minmax(0, 1fr) 54px 54px; gap: 0 5px; }
    .feature-table .feature-label { font-size: 12px; }
    .feature-value { font-size: 10px; }
    .settings-actions { grid-template-columns: 1fr; }
    .settings-actions > :last-child:nth-child(odd) { grid-column: auto; }
}
