:root {
    --blue: #1769e8;
    --blue-dark: #0b4fb9;
    --blue-soft: #eaf3ff;
    --ink: #162033;
    --muted: #6f7b8f;
    --line: #e4e9f1;
    --surface: #ffffff;
    --page: #f5f7fa;
    --green: #12805c;
    --green-soft: #e9f8f2;
    --red: #d74747;
    --orange: #c66a17;
    --shadow: 0 12px 36px rgba(30, 52, 82, 0.12);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    background: #e9edf3;
}

body {
    margin: 0;
    color: var(--ink);
    background: #e9edf3;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

button,
input,
textarea,
select {
    font: inherit;
    letter-spacing: 0;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(23, 105, 232, 0.22);
    outline-offset: 2px;
}

.site-shell {
    min-height: 100vh;
}

.app-shell {
    position: relative;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--page);
}

.app-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(228, 233, 241, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.brand-button,
.quota-button,
.icon-button,
.nav-item,
.text-button,
.filter-chip,
.quick-question,
.list-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.brand-button {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 0;
    text-align: left;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--blue);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(23, 105, 232, 0.23);
}

.brand-button strong,
.brand-button small {
    display: block;
}

.brand-button strong {
    font-size: 16px;
}

.brand-button small {
    overflow: hidden;
    max-width: 180px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.quota-button {
    min-width: 78px;
    padding: 7px 10px;
    border: 1px solid #cfe0fa;
    border-radius: 6px;
    color: var(--blue-dark);
    background: var(--blue-soft);
    text-align: right;
}

.quota-button span,
.quota-button strong {
    display: block;
    line-height: 1.25;
}

.quota-button span {
    font-size: 10px;
}

.quota-button strong {
    font-size: 13px;
}

.main-view {
    min-height: calc(100vh - 132px);
    padding: 16px 14px calc(82px + var(--safe-bottom));
}

.bottom-nav {
    position: fixed;
    z-index: 30;
    right: auto;
    bottom: 0;
    left: 50%;
    display: grid;
    width: min(430px, 100vw);
    grid-template-columns: repeat(3, 1fr);
    min-height: calc(64px + var(--safe-bottom));
    padding: 7px 8px var(--safe-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -6px 22px rgba(29, 45, 72, 0.06);
    transform: translateX(-50%);
}

.nav-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #8590a1;
    font-size: 11px;
}

.nav-icon {
    display: grid;
    width: 28px;
    height: 26px;
    place-items: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.nav-item.is-active {
    color: var(--blue);
    font-weight: 700;
}

.nav-item.is-active .nav-icon {
    background: var(--blue-soft);
}

.page-heading {
    margin: 2px 2px 14px;
}

.page-heading h1,
.page-heading h2,
.page-heading p {
    margin: 0;
}

.page-heading h1 {
    font-size: 22px;
}

.page-heading h2 {
    font-size: 19px;
}

.page-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 2px 10px;
}

.section-title h2,
.section-title h3,
.section-title p {
    margin: 0;
}

.section-title h2 {
    font-size: 17px;
}

.section-title h3 {
    font-size: 15px;
}

.section-title p,
.section-title .text-button {
    color: var(--muted);
    font-size: 12px;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 4px 18px rgba(38, 56, 82, 0.04);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 20px;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(125deg, #0c5bd4, #2687ea);
}

.hero-panel::after {
    position: absolute;
    right: -24px;
    bottom: -54px;
    width: 150px;
    height: 150px;
    border: 22px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.hero-panel h1,
.hero-panel p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.hero-panel h1 {
    max-width: 360px;
    font-size: 21px;
}

.hero-panel p {
    max-width: 440px;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

.hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero-meta span {
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 11px;
}

.quick-grid,
.tool-grid,
.stat-grid,
.service-grid {
    display: grid;
    gap: 10px;
}

.quick-grid {
    grid-template-columns: 1fr;
}

.quick-question {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    text-align: left;
}

.quick-question:hover {
    border-color: #a8c9f7;
    background: #fafdff;
}

.question-index {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 6px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 11px;
    font-weight: 800;
}

.chat-panel {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(38, 56, 82, 0.04);
}

.message-list {
    display: flex;
    max-height: 54vh;
    min-height: 180px;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 6px;
    color: #fff;
    background: var(--blue);
    font-size: 11px;
    font-weight: 800;
}

.message.user .message-avatar {
    background: #263f64;
}

.message-bubble {
    max-width: calc(100% - 48px);
    padding: 10px 12px;
    border-radius: 7px;
    background: #f0f5fb;
    white-space: pre-wrap;
    word-break: break-word;
}

.message.user .message-bubble {
    color: #fff;
    background: var(--blue);
}

.message-bubble p {
    margin: 0;
}

.message-note {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    color: var(--muted);
    border-top: 1px solid rgba(111, 123, 143, 0.18);
    font-size: 11px;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 6px 0;
}

.typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7f8ca1;
    animation: bounce 1.1s infinite ease-in-out;
}

.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.recommendations {
    display: grid;
    gap: 8px;
    margin: 12px 0 2px 38px;
}

.deep-analysis-button {
    width: max-content;
}

.recommendation-link {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--ink);
    border: 1px solid #cfe0fa;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.recommendation-card {
    padding: 11px;
    border-left: 3px solid var(--blue);
    background: #f6faff;
}

.recommendation-card strong,
.recommendation-card span {
    display: block;
}

.recommendation-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.recommendation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.chat-composer {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.chat-input,
.form-control,
.search-input {
    width: 100%;
    border: 1px solid #d8dfe9;
    border-radius: 6px;
    color: var(--ink);
    background: #fff;
}

.chat-input {
    min-width: 0;
    height: 42px;
    padding: 0 12px;
}

.icon-button {
    display: grid;
    width: 38px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: #fff;
    font-weight: 800;
}

.send-button {
    width: 42px;
    color: #fff;
    border-color: var(--blue);
    background: var(--blue);
}

.tool-grid,
.service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card,
.service-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

button.tool-card,
button.service-card {
    cursor: pointer;
    text-align: left;
}

.tool-card strong,
.tool-card span,
.service-card strong,
.service-card span {
    display: block;
}

.tool-card span,
.service-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.tool-symbol {
    display: grid;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 7px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 13px;
    font-weight: 800;
}

.tool-card:nth-child(2) .tool-symbol {
    color: var(--green);
    background: var(--green-soft);
}

.search-bar {
    position: relative;
    margin-bottom: 12px;
}

.search-input {
    height: 44px;
    padding: 0 14px;
}

.filter-block {
    margin-bottom: 12px;
}

.filter-label {
    display: block;
    margin: 0 2px 7px;
    color: var(--muted);
    font-size: 11px;
}

.filter-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
    min-height: 32px;
    flex: 0 0 auto;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #566176;
    background: #fff;
    font-size: 12px;
}

.filter-chip.is-active {
    color: var(--blue-dark);
    border-color: #a8c9f7;
    background: var(--blue-soft);
    font-weight: 700;
}

.lawyer-list,
.record-list,
.menu-list,
.document-list,
.law-list {
    display: grid;
    gap: 10px;
}

.lawyer-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
}

.lawyer-avatar,
.profile-avatar {
    display: grid;
    place-items: center;
    color: #fff;
    background: #315d91;
    font-weight: 800;
}

.lawyer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 7px;
    font-size: 18px;
}

.lawyer-main {
    min-width: 0;
}

.lawyer-title,
.lawyer-meta,
.lawyer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lawyer-title h3 {
    margin: 0;
    font-size: 16px;
}

.verified {
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 10px;
}

.lawyer-firm,
.lawyer-intro {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.tag {
    padding: 2px 6px;
    border-radius: 3px;
    color: #365476;
    background: #eef3f8;
    font-size: 10px;
}

.lawyer-footer {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.rating {
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
}

.price {
    color: var(--red);
    font-weight: 800;
}

.button,
.button-secondary,
.button-quiet,
.button-danger {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.button {
    color: #fff;
    background: var(--blue);
}

.button:hover { background: var(--blue-dark); }

.button-secondary {
    color: var(--blue-dark);
    border-color: #b9d3f7;
    background: var(--blue-soft);
}

.button-quiet {
    color: #526076;
    border-color: var(--line);
    background: #fff;
}

.button-danger {
    color: var(--red);
    border-color: #f0caca;
    background: #fff6f6;
}

.button.small,
.button-secondary.small,
.button-quiet.small {
    min-height: 31px;
    padding: 5px 9px;
    font-size: 12px;
}

.button.full,
.button-secondary.full,
.button-quiet.full,
.button-danger.full {
    width: 100%;
}

.profile-card {
    padding: 17px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    font-size: 20px;
}

.profile-head h1,
.profile-head p {
    margin: 0;
}

.profile-head h1 {
    font-size: 18px;
}

.profile-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.membership-strip {
    margin-top: 14px;
    padding: 13px;
    border-radius: 7px;
    color: #f5e9c8;
    background: #283a58;
}

.membership-strip strong,
.membership-strip span {
    display: block;
}

.membership-strip span {
    margin-top: 3px;
    color: #cfd8e6;
    font-size: 11px;
}

.stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.stat-item {
    min-width: 0;
    padding: 11px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    text-align: center;
}

.stat-item strong,
.stat-item span {
    display: block;
}

.stat-item strong {
    font-size: 18px;
}

.stat-item span {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.menu-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    gap: 0;
}

.list-button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.list-button:last-child { border-bottom: 0; }

.list-symbol {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 6px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 11px;
    font-weight: 800;
}

.list-copy {
    min-width: 0;
    flex: 1;
}

.list-copy strong,
.list-copy span {
    display: block;
}

.list-copy span {
    overflow: hidden;
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chevron {
    color: #9ba6b6;
    font-size: 18px;
}

.modal-backdrop,
.onboarding {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(14, 25, 43, 0.55);
}

.modal {
    width: min(100%, 520px);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.modal.wide { width: min(100%, 720px); }

.modal-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.modal-header h2,
.modal-header p {
    margin: 0;
}

.modal-header h2 { font-size: 17px; }
.modal-header p { color: var(--muted); font-size: 11px; }

.close-button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: #f1f3f6;
    cursor: pointer;
    font-size: 20px;
}

.modal-body { padding: 17px; }
.modal-footer {
    display: flex;
    gap: 9px;
    padding: 14px 17px;
    border-top: 1px solid var(--line);
}

.modal-footer > * { flex: 1; }

.form-group { margin-bottom: 13px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.form-control {
    min-height: 42px;
    padding: 9px 11px;
}

textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #566176;
    font-size: 12px;
}

.checkbox-row input { margin-top: 3px; }

.payment-amount {
    padding: 18px;
    border-radius: 7px;
    background: #f4f7fb;
    text-align: center;
}

.payment-amount span,
.payment-amount strong { display: block; }
.payment-amount span { color: var(--muted); font-size: 12px; }
.payment-amount strong { margin-top: 3px; color: var(--red); font-size: 28px; }

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin: 14px 0;
}

.payment-method {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.payment-method.is-active {
    color: var(--blue-dark);
    border-color: var(--blue);
    background: var(--blue-soft);
    font-weight: 700;
}

.plan-list {
    display: grid;
    gap: 10px;
}

.plan-card {
    position: relative;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.plan-card.recommended { border-color: #e5b657; }
.plan-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 8px;
    color: #71470b;
    border-radius: 0 6px 0 6px;
    background: #ffe8aa;
    font-size: 10px;
}

.plan-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.plan-title h3,
.plan-title p { margin: 0; }
.plan-title h3 { font-size: 16px; }
.plan-title p { color: var(--red); font-size: 19px; font-weight: 800; }
.plan-title p small { font-size: 11px; }

.benefit-list {
    display: grid;
    gap: 6px;
    margin: 11px 0 13px;
    padding: 0;
    list-style: none;
    color: #526076;
    font-size: 12px;
}

.benefit-list li::before {
    margin-right: 7px;
    color: var(--green);
    content: "\2713";
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.detail-hero .lawyer-avatar {
    width: 72px;
    height: 72px;
    font-size: 24px;
}

.detail-hero h2,
.detail-hero p { margin: 0; }
.detail-hero p { margin-top: 3px; color: var(--muted); font-size: 12px; }

.detail-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.detail-section h3 { margin: 0 0 8px; font-size: 14px; }
.detail-section p { margin: 0; color: #526076; }

.service-price-row,
.record-card,
.document-card,
.law-card {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.service-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.record-card h3,
.record-card p,
.document-card h3,
.document-card p,
.law-card h3,
.law-card p { margin: 0; }

.record-card p,
.document-card p,
.law-card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 11px;
}

.status {
    color: var(--green);
    font-weight: 700;
}

.document-actions {
    display: flex;
    gap: 8px;
    margin-top: 11px;
}

.empty-state {
    padding: 42px 20px;
    border: 1px dashed #cbd4e0;
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.empty-state strong,
.empty-state span { display: block; }
.empty-state strong { color: var(--ink); font-size: 16px; }
.empty-state span { margin-top: 4px; font-size: 12px; }

.onboarding {
    z-index: 150;
    background: #f3f7fc;
}

.onboarding-card {
    width: min(100%, 480px);
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.onboarding-cover {
    position: relative;
    min-height: 270px;
    padding: 30px 26px;
    overflow: hidden;
    color: #fff;
    background: #0d5fd8;
}

.onboarding-cover::before,
.onboarding-cover::after {
    position: absolute;
    border: 24px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    content: "";
}

.onboarding-cover::before { right: -48px; bottom: -74px; width: 210px; height: 210px; }
.onboarding-cover::after { right: 72px; bottom: 20px; width: 70px; height: 70px; }

.onboarding-logo {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 23px;
    font-weight: 800;
}

.onboarding-cover h1,
.onboarding-cover p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.onboarding-cover h1 { margin-top: 34px; max-width: 320px; font-size: 27px; }
.onboarding-cover p { margin-top: 9px; max-width: 350px; color: rgba(255,255,255,.82); }

.onboarding-body { padding: 22px; }
.onboarding-body h2,
.onboarding-body p { margin: 0; }
.onboarding-body h2 { font-size: 19px; }
.onboarding-body > p { margin-top: 6px; color: var(--muted); }

.identity-points {
    display: grid;
    gap: 9px;
    margin: 17px 0;
}

.identity-point {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.identity-point strong,
.identity-point span { display: block; }
.identity-point span { margin-top: 2px; color: var(--muted); font-size: 11px; }

.toast-root {
    position: fixed;
    z-index: 300;
    top: 18px;
    left: 50%;
    display: grid;
    width: min(calc(100% - 32px), 420px);
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    padding: 11px 14px;
    color: #fff;
    border-radius: 6px;
    background: #1e2c40;
    box-shadow: var(--shadow);
    animation: toast-in 0.2s ease-out;
}

.toast.error { background: #963b3b; }
.toast.success { background: #176c50; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
}

.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.danger { color: var(--red); }
.success { color: var(--green); }
.divider { height: 1px; margin: 14px 0; background: var(--line); }

@media (min-width: 700px) {
    .site-shell { padding: 22px; }
    .app-shell {
        max-width: 430px;
        min-height: calc(100vh - 44px);
        border: 1px solid #dce2ea;
        border-radius: 8px;
        box-shadow: 0 16px 50px rgba(34, 51, 74, 0.12);
    }
    .app-header { border-radius: 8px 8px 0 0; }
    .main-view { padding: 16px 14px 92px; }
    .bottom-nav {
        right: auto;
        left: 50%;
        width: 430px;
        bottom: 22px;
        border: 1px solid var(--line);
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 390px) {
    .app-header { padding-inline: 12px; }
    .main-view { padding-inline: 10px; }
    .brand-button small { max-width: 145px; }
    .hero-panel { padding: 17px; }
    .tool-grid,
    .service-grid { grid-template-columns: 1fr; }
    .stat-item strong { font-size: 16px; }
    .chat-panel { padding: 11px; }
    .recommendations { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
