:root {
    --ink: #1D1D1F;
    --ink-soft: #6E6E73;
    --ink-faint: #A1A1A6;
    --paper: #F5F5F7;
    --paper-deep: #E8E8ED;
    --line: rgba(0, 0, 0, 0.08);
    --line-soft: rgba(0, 0, 0, 0.05);
    --blue: #0088FF;
    --blue-deep: #0066CC;
    --blue-tint: #EAF4FF;
    --green: #0B8A5F;
    --green-tint: #E4F7EE;
    --danger: #E11D48;
    --danger-tint: rgba(225, 29, 72, 0.08);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #FFFFFF;
    color: var(--ink);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: inline-block; vertical-align: middle; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
}

.container-large { max-width: 73rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.container-medium { max-width: 42rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.container-small { max-width: 36rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* ================================================================
   HEADER & FOOTER
   ================================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    padding: 1rem 1rem 0;
}
@media (min-width: 768px) {
    .site-header { padding: 1.25rem 1.5rem 0; }
}

.header-container {
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.625rem 0 1.25rem;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 9999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
@media (min-width: 768px) {
    .header-container { padding: 0 0.75rem 0 1.5rem; }
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.brand-icon {
    border-radius: 6px;
}
.brand-text {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.025em;
    color: var(--ink);
}
.brand-stack {
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-account-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-deep);
    background-color: var(--blue-tint);
    padding: 2px 6px;
    border-radius: 5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.account-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 640px) {
    .account-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.account-footer-copyright {
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.account-footer-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.account-footer-links a {
    color: var(--ink-soft);
    transition: color 0.15s ease;
}

.account-footer-links a:hover {
    color: var(--ink);
}

/* Auth Segmented Mode Tabs */
.auth-mode-tabs {
    display: flex;
    background-color: var(--paper);
    border-radius: 0.625rem;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.auth-mode-tab {
    flex: 1;
    border: none;
    padding: 0.5rem;
    border-radius: 0.4375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--ink-soft);
    text-align: center;
    transition: all 0.15s ease;
}

.auth-mode-tab.is-active {
    background: #FFFFFF;
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.footer-credit a {
    color: var(--ink);
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-credit a:hover {
    color: var(--blue-deep);
}

/* ================================================================
   BUTTONS, FORMS & ACCOUNT UI
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-weight: 500;
    transition: color 0.25s, background-color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    border-radius: 9999px;
    height: 2.375rem;
    padding: 0 1.125rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-small {
    height: auto;
    padding: 0.5rem 1rem;
    font-size: 13px;
    background-color: var(--ink);
    color: #FFFFFF;
}
.btn-small:hover:not(:disabled) {
    background-color: rgba(29, 29, 31, 0.85);
}

.btn-submit {
    width: 100%;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    background-color: var(--ink);
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 500;
}
.btn-submit:hover:not(:disabled) {
    background-color: rgba(29, 29, 31, 0.88);
}

.btn-google {
    width: 100%;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    background-color: #FFFFFF;
    color: var(--ink);
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.625rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.btn-google:hover:not(:disabled) {
    background-color: var(--paper);
    border-color: rgba(0, 0, 0, 0.18);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    user-select: none;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--line);
}

.btn-primary {
    background-color: var(--ink);
    color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) {
    background-color: rgba(29, 29, 31, 0.85);
}

.btn-outline {
    background-color: #FFFFFF;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-outline:hover:not(:disabled) {
    background-color: var(--paper);
    border-color: rgba(0, 0, 0, 0.14);
}

.btn-danger-ghost {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid rgba(225, 29, 72, 0.25);
    height: 2rem;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    border-radius: 9999px;
}
.btn-danger-ghost:hover:not(:disabled) {
    background-color: var(--danger-tint);
}

.btn-sm {
    height: 2rem;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    border-radius: 9999px;
}

.inner-hero {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
}

.inner-title {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .inner-title { font-size: 2rem; line-height: 1.15; }
}

.inner-subtitle {
    color: var(--ink-soft);
    font-size: 0.875rem;
    max-width: 26rem;
    margin: 0 auto;
}

.form-wrapper {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    padding: 0 1.25rem 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink);
}

.form-input,
.input {
    width: 100%;
    height: 2.5rem;
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.form-input::placeholder,
.input::placeholder {
    color: var(--ink-faint);
}
.form-input:focus,
.input:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--ink);
    box-shadow: 0 0 0 2px rgba(29, 29, 31, 0.08);
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    margin-bottom: 0.625rem;
    padding-left: 0.25rem;
}

.page-wrap {
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

.auth-wrap {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    transition: max-width 0.2s ease;
}

.auth-wrap:has(.paddle-inline-wrap) {
    max-width: 31rem;
}

.card {
    background-color: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 640px) {
    .card { padding: 1.5rem 1.75rem; }
}

.auth-card {
    padding: 1.5rem;
}

.title-lg {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 0.375rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.text-sm {
    font-size: 0.8125rem;
}

.text-muted {
    color: var(--ink-soft);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stack-lg {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.row-list {
    display: flex;
    flex-direction: column;
}

.row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.row-item:first-child { padding-top: 0; }
.row-item:last-child { padding-bottom: 0; border-bottom: none; }

.row-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.row-desc {
    font-size: 0.8125rem;
    color: var(--ink-soft);
    margin-top: 0.125rem;
    line-height: 1.5;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink-soft);
    background-color: var(--paper);
    border: 1px solid var(--line);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: var(--ink-faint);
}

.status-pill.is-active {
    color: var(--green);
    background-color: var(--green-tint);
    border-color: rgba(11, 138, 95, 0.2);
}

.status-pill.is-active .status-dot {
    background-color: var(--green);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
    color: var(--green);
    background-color: var(--green-tint);
    border: 1px solid rgba(11, 138, 95, 0.18);
    user-select: none;
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--blue-tint);
    color: var(--blue-deep);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    display: block;
}

.notice {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    background-color: var(--blue-tint);
    color: var(--blue-deep);
}

.notice-error {
    background-color: var(--danger-tint);
    color: var(--danger);
}

.billing-banner-success {
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    background-color: var(--green-tint);
    color: var(--green);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-toggle-wrap {
    display: flex;
    background-color: var(--paper);
    border-radius: 0.5rem;
    padding: 0.25rem;
    gap: 0.25rem;
    width: 100%;
}

.plan-toggle-btn {
    flex: 1;
    border: none;
    padding: 0.45rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.plan-toggle-btn.is-active {
    background: #FFFFFF;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.plan-save-pill {
    font-size: 0.6875rem;
    background-color: var(--green);
    color: #FFFFFF;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.plan-detail-card {
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
    background: var(--paper);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.plan-detail-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-detail-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
}

.plan-detail-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--green);
    border: 1px solid var(--green);
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    letter-spacing: 0.02em;
}

.plan-detail-price {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
}

.plan-detail-sub {
    font-size: 0.78125rem;
    color: var(--ink-soft);
}

/* ================================================================
   PADDLE INLINE CHECKOUT & ORDER SUMMARY
   ================================================================ */
.inline-summary-card {
    gap: 0.45rem;
}

.inline-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.inline-summary-meta {
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.inline-summary-divider {
    height: 1px;
    background-color: var(--line);
    margin: 0.15rem 0;
}

.inline-summary-total {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink);
}

.paddle-frame-shell {
    position: relative;
    min-height: 220px;
}

.paddle-frame-loading {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ink-soft);
    background-color: var(--paper);
    border-radius: 0.625rem;
}

.paddle-inline-frame {
    width: 100%;
}

.paddle-frame-shell.is-completed {
    min-height: 0;
}

.inline-post-actions {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.inline-post-status {
    display: flex;
    justify-content: center;
}

.inline-post-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.inline-post-buttons .btn {
    flex: 1;
    min-width: 150px;
}

/* ================================================================
   MINIMAL EDIT MODAL (Clean, Focused, Straightforward)
   ================================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 1000;
    animation: modalFadeIn 0.15s ease-out;
}

.modal-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 26rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: modalScaleIn 0.15s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.modal-close-btn {
    color: var(--ink-soft);
    padding: 0.375rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.modal-close-btn:hover {
    color: var(--ink);
    background-color: var(--paper);
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
