/* Storyfellow — Writing Identity page */

#screen-writing-identity {
    padding: 0;
    align-items: stretch;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
}

#screen-writing-identity > .brand-bar {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: var(--st-page-pad-y) var(--st-page-pad-x) 8px;
    background: var(--st-bg, #fff);
}

#screen-writing-identity > .writing-identity-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: var(--st-header-content-gap, 24px) var(--st-page-pad-x) 64px;
    text-align: left;
    animation: st-fade-in var(--st-duration-slow) var(--st-ease) both;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    #screen-writing-identity > .writing-identity-layout {
        max-width: var(--st-workspace-standard);
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.writing-identity-header {
    margin: 0 0 32px;
}

.writing-identity-title {
    margin: 0 0 16px;
}

.writing-identity-lead {
    margin: 0;
    max-width: 36em;
    font-size: var(--st-size-lead, 1.125rem);
    line-height: 1.55;
    color: var(--st-text);
}

.writing-identity-scope {
    margin: 0 0 28px;
    padding: 20px 0;
    border-top: 1px solid var(--st-border-subtle, rgba(0, 0, 0, 0.08));
    border-bottom: 1px solid var(--st-border-subtle, rgba(0, 0, 0, 0.08));
}

.writing-identity-scope-label {
    margin: 0 0 10px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--st-text-muted, #666);
}

.writing-identity-scope-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.writing-identity-scope-btn {
    flex: 1 1 140px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--st-border, rgba(0, 0, 0, 0.15));
    background: var(--st-surface, #fff);
    color: var(--st-ink);
    font: inherit;
    cursor: pointer;
}

.writing-identity-scope-btn.is-active {
    border-color: var(--st-ink);
    background: var(--st-ink);
    color: var(--st-surface, #fff);
}

.writing-identity-scope-help {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--st-text);
}

.writing-identity-chapter-picker {
    margin-top: 8px;
}

.writing-identity-chapter-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--st-ink);
}

.writing-identity-chapter-select,
.writing-identity-axis-select {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-top: 8px;
    padding: 10px 12px;
    font: inherit;
    border-radius: 8px;
    border: 1px solid var(--st-border, rgba(0, 0, 0, 0.15));
    background: var(--st-surface, #fff);
    box-sizing: border-box;
}

.writing-identity-effective {
    margin: 0 0 28px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--st-fill-subtle, rgba(0, 0, 0, 0.04));
}

.writing-identity-effective-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--st-ink);
}

.writing-identity-effective-list {
    margin: 0 0 10px;
    padding-left: 1.2em;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.writing-identity-effective-source {
    color: var(--st-text-muted, #666);
    font-weight: 400;
}

.writing-identity-effective-note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--st-text-muted, #666);
}

.writing-identity-groups {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 24px;
}

.writing-identity-group-title {
    margin: 0 0 6px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--st-ink);
}

.writing-identity-group-desc {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--st-text);
}

.writing-identity-field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--st-text-muted, #666);
}

.writing-identity-save-status {
    min-height: 1.5em;
    margin: 0 0 16px;
    font-size: 0.9375rem;
    color: var(--st-text);
}

.writing-identity-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.writing-identity-reset-auto {
    margin-left: auto;
}

@media (max-width: 767px) {
    .writing-identity-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .writing-identity-reset-auto {
        margin-left: 0;
    }

    .writing-identity-scope-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }
}

.writing-identity-save {
    min-width: 120px;
}
