:root {
    --color-bg: #071018;
    --color-surface: #101b25;
    --color-surface-soft: #172735;
    --color-paper: #f5efe4;
    --color-paper-soft: #fffaf0;
    --color-primary: #d7b46a;
    --color-primary-soft: rgba(215, 180, 106, 0.16);
    --color-primary-action: #b85b16;
    --color-primary-action-hover: #9f480d;
    --color-text: #f5f0e8;
    --color-text-dark: #1c252d;
    --color-text-muted: #aeb9c4;
    --color-accent: #8fb8a8;
    --color-success: #79c7a1;
    --radius-card: 18px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.28);
    --bottom-nav-height: 76px;
}

.mud-journey-theme {
    color-scheme: dark;
}

.mud-journey-theme .mud-input-control {
    margin-top: 4px;
}

.mud-journey-theme .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.14);
}

.mud-journey-theme .mud-input-control:hover .mud-input-outlined-border {
    border-color: rgba(215, 180, 106, 0.7);
}

.mud-journey-theme .mud-input-label,
.mud-journey-theme .mud-input-helper-text {
    letter-spacing: 0;
}

.journey-button.mud-button-root {
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0;
    min-height: 50px;
    text-transform: none;
}

.journey-primary-button.mud-button-root {
    background-color: var(--color-primary-action);
    box-shadow: 0 8px 20px rgba(184, 91, 22, 0.24);
    color: #ffffff;
}

.journey-primary-button.mud-button-root:hover,
.journey-primary-button.mud-button-root:focus-visible {
    background-color: var(--color-primary-action-hover);
    color: #ffffff;
}

.journey-primary-button.mud-button-root:focus-visible {
    outline: 3px solid rgba(236, 174, 82, 0.42);
    outline-offset: 2px;
}

.journey-primary-button.mud-button-root:active {
    box-shadow: 0 4px 12px rgba(184, 91, 22, 0.2);
    transform: translateY(1px);
}

.journey-primary-button.mud-button-root.mud-disabled {
    background-color: rgba(184, 91, 22, 0.38);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.62);
}

.journey-text-field textarea,
.journey-select .mud-input-slot {
    line-height: 1.55;
}

.exercise-prompt-field {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.exercise-question-card {
    transition: background-color 160ms ease, border-color 160ms ease;
}

.exercise-question-card.is-favorite {
    background: rgba(75, 61, 31, 0.28);
    border-color: rgba(236, 174, 82, 0.48);
}

.exercise-favorite-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 5px;
    justify-self: end;
    padding: 2px;
}

.exercise-favorite-button .mud-button-label,
.diary-highlight-button .mud-button-label {
    gap: 5px;
    text-transform: none;
}

.exercise-favorite-button:hover,
.exercise-favorite-button:focus-visible,
.exercise-favorite-button.is-favorite {
    color: #f0bd55;
}

.exercise-favorite-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.form-field-heading {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.form-field-label {
    color: var(--color-text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.form-field-help,
.exercise-instruction {
    color: var(--color-text-muted);
}

.form-field-help {
    line-height: 1.5;
}

.required-marker {
    color: #ffb5bd;
}

.form-field-heading.has-error .form-field-label {
    color: #ffb5bd;
}

.app-form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.diary-field {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 18px;
}

.diary-field.is-highlighted {
    background: rgba(75, 61, 31, 0.28);
    border-color: rgba(236, 174, 82, 0.48);
}

.diary-highlight-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 5px;
    justify-self: end;
    padding: 2px;
}

.diary-highlight-button:hover,
.diary-highlight-button:focus-visible,
.diary-highlight-button.is-highlighted {
    color: #f0bd55;
}

.diary-highlight-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.exercise-prompt-field.has-validation-error,
.diary-field.has-validation-error {
    background: rgba(91, 31, 39, 0.18);
    border: 1px solid rgba(239, 124, 137, 0.72);
    border-radius: var(--radius-card);
    box-shadow: 0 0 0 2px rgba(239, 124, 137, 0.08);
    padding: 14px;
}

.field-validation-message {
    color: #ff9da8;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.exercise-instruction {
    line-height: 1.7;
}

.choice-surface.mud-paper {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}

.single-checkbox-surface.mud-paper {
    padding: 10px 12px;
}

.gentle-alert.mud-alert {
    background: rgba(143, 184, 168, 0.07);
    border-color: rgba(143, 184, 168, 0.32);
    border-radius: 8px;
    color: var(--color-text);
}

.gentle-alert .mud-alert-icon {
    color: var(--color-accent);
}

.offline-save-notice.mud-alert {
    background: rgba(215, 180, 106, 0.09);
    border-color: rgba(215, 180, 106, 0.42);
}

.offline-save-notice .mud-alert-icon {
    color: var(--color-primary);
}

.reminder-setting-heading {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
}

.reminder-setting-heading h2 {
    margin: 0;
}

.reminder-grid {
    display: grid;
    gap: 16px;
}

.reminder-time-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: var(--color-text);
    font: inherit;
    min-height: 48px;
    padding: 0 12px;
    width: 100%;
}

.reminder-time-input:focus-visible {
    border-color: rgba(215, 180, 106, 0.7);
    outline: 3px solid rgba(215, 180, 106, 0.18);
}

.reminder-time-input:disabled {
    color: rgba(245, 240, 232, 0.48);
    opacity: 0.72;
}

.reminder-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.reminder-action-row .mud-button-label {
    text-transform: none;
}

.notice-content {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 4px;
}

.empty-state.mud-paper {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 22px 18px;
}

.journey-checkbox.mud-checkbox {
    min-height: 46px;
}

* {
    box-sizing: border-box;
}

html,
body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    overflow-wrap: break-word;
}

:where(a, button, input, select, textarea, summary, [role="button"], .mud-button-root, .mud-icon-button, .mud-input-root, .mud-checkbox, .mud-switch-base, .mud-slider-container) {
    touch-action: manipulation;
}

:where(a, button, input, select, textarea, summary, [role="button"], .mud-button-root, .mud-icon-button, .mud-checkbox, .mud-switch-base, .mud-slider-container):focus-visible {
    outline: 3px solid rgba(236, 174, 82, 0.56);
    outline-offset: 3px;
}

.mud-input-control:focus-within .mud-input-outlined-border {
    border-color: rgba(215, 180, 106, 0.78);
}

a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link,
.mini-link,
.back-link.mud-button-root,
.mud-icon-button {
    min-height: 44px;
    min-width: 44px;
}

#app:empty {
    background: var(--color-bg);
    min-height: 100dvh;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.auth-shell {
    align-items: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(215, 180, 106, 0.15), transparent 34%),
        var(--color-bg);
    display: flex;
    min-height: 100dvh;
    padding: 28px 18px;
}

.auth-surface {
    margin: 0 auto;
    max-width: 430px;
    width: 100%;
}

.auth-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-header h1 {
    color: var(--color-text);
    font-size: 2rem;
    margin: 10px 0;
}

.auth-header > p:last-child {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 360px;
}

.auth-mark {
    align-items: center;
    background: var(--color-primary);
    border-radius: 8px;
    color: #211c13;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 900;
    height: 52px;
    justify-content: center;
    margin-bottom: 20px;
    width: 52px;
}

.auth-form {
    background: rgba(16, 27, 37, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    padding: 24px 20px;
}

.auth-form .mud-input-control {
    margin-top: 0;
}

.auth-switch {
    color: var(--color-text-muted);
    margin: 22px 0 0;
    text-align: center;
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 800;
}

.auth-switch-stack {
    display: grid;
    gap: 8px;
}

.subtle-skip-link {
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    cursor: pointer;
    display: block;
    font-size: 0.8rem;
    margin: 14px auto 0;
    padding: 7px 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.subtle-skip-link:hover,
.subtle-skip-link:focus-visible {
    color: var(--color-primary);
}

.subtle-skip-link .mud-button-label,
.notebook-filter .mud-button-label,
.mini-link .mud-button-label,
.back-link .mud-button-label {
    text-transform: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
textarea {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1:focus {
    outline: none;
}

.phone-frame {
    background:
        radial-gradient(circle at top left, rgba(215, 180, 106, 0.18), transparent 34%),
        linear-gradient(180deg, #09131d 0%, #071018 55%, #101820 100%);
    min-height: 100vh;
}

.skip-to-content {
    background: var(--color-primary);
    border-radius: 8px;
    color: #1b1710;
    font-size: 0.92rem;
    font-weight: 900;
    left: 50%;
    max-width: calc(100% - 24px);
    padding: 10px 14px;
    position: absolute;
    text-align: center;
    top: 10px;
    transform: translate(-50%, -150%);
    transition: transform 160ms ease;
    width: max-content;
    z-index: 80;
}

.skip-to-content:focus-visible {
    transform: translate(-50%, 0);
}

.app-surface {
    margin: 0 auto;
    max-width: 520px;
    min-height: 100vh;
    position: relative;
}

.app-content {
    min-height: 100vh;
    padding: 28px 18px calc(var(--bottom-nav-height) + 28px);
}

.app-content:focus {
    outline: none;
}

.page-header {
    margin-bottom: 22px;
}

.page-header h1 {
    color: var(--color-text);
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 12px;
}

.page-header p,
.card p,
.hero-card p,
.notice p,
.result-card p,
.audio-card p,
.difficult-card p,
.task-card small {
    color: var(--color-text-muted);
    line-height: 1.58;
}

.card h2,
.hero-card h2,
.result-card h2,
.current-journey h2,
.current-step h2,
.task-card span,
.form-section h2,
.journey-option-card h2 {
    color: var(--color-text);
}

.eyebrow {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 9px;
    text-transform: uppercase;
}

.card,
.hero-card,
.result-card,
.profile-card,
.notice,
.audio-card,
.player-card,
.difficult-card,
.empty-state {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
    padding: 18px;
}

.hero-card {
    background: linear-gradient(145deg, rgba(23, 39, 53, 0.96), rgba(69, 72, 70, 0.72));
}

.weekly-progress-card {
    background:
        radial-gradient(circle at 88% 12%, rgba(121, 199, 161, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(26, 52, 56, 0.96), rgba(16, 27, 37, 0.94));
    border: 1px solid rgba(143, 184, 168, 0.3);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
    overflow: hidden;
    padding: 18px;
}

.weekly-progress-top {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.weekly-progress-card h2 {
    color: var(--color-text);
    font-size: 1.16rem;
    line-height: 1.3;
    margin: 0;
}

.weekly-progress-card p {
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 7px 0 0;
}

.weekly-progress-ring {
    align-items: center;
    display: grid;
    height: 76px;
    justify-items: center;
    position: relative;
    width: 76px;
}

.weekly-progress-ring .mud-progress-circular {
    height: 76px !important;
    width: 76px !important;
}

.weekly-progress-ring strong {
    color: var(--color-text);
    font-size: 0.86rem;
    position: absolute;
}

.weekly-progress-bar {
    margin: 18px 0 12px;
}

.weekly-progress-summary {
    align-items: center;
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 8px 16px;
}

.weekly-progress-summary span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.weekly-progress-summary .mud-icon-root {
    color: var(--color-accent);
}

.weekly-activity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.weekly-activity-list span {
    background: rgba(143, 184, 168, 0.12);
    border: 1px solid rgba(143, 184, 168, 0.2);
    border-radius: 999px;
    color: #d7eee3;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 9px;
}

.hero-card-top,
.progress-meta,
.player-progress,
.button-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.hero-card-top strong,
.recommendation strong,
.profile-card strong {
    color: var(--color-text);
}

.progress-block {
    margin: 10px 0 16px;
}

.progress-meta {
    color: var(--color-text-muted);
    font-size: 0.86rem;
    margin-bottom: 8px;
}

.progress-meta strong {
    color: var(--color-success);
}

.progress-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--color-success), var(--color-primary));
    border-radius: inherit;
    height: 100%;
    transition: width 180ms ease;
}

.button,
.button-primary,
.button-secondary,
.mini-link,
.play-button {
    align-items: center;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    text-align: center;
    width: 100%;
}

.button-primary {
    background: var(--color-primary);
    color: #1b1710;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.button-row {
    margin: 16px 0;
}

.button-row .button {
    width: 50%;
}

.button-stack {
    display: grid;
    gap: 12px;
}

.text-link,
.mini-link {
    color: var(--color-primary);
    font-weight: 700;
}

.mini-link {
    background: var(--color-primary-soft);
    min-height: 42px;
    padding: 0 14px;
    width: auto;
}

.day-uncomplete-link.mud-button-root {
    color: var(--color-muted);
    display: flex;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 8px auto 0;
    min-height: 40px;
    text-transform: none;
    width: fit-content;
}

.day-uncomplete-link.mud-button-root:hover,
.day-uncomplete-link.mud-button-root:focus-visible {
    background-color: transparent;
    color: var(--color-primary);
}

.shortcut-grid,
.task-list,
.audio-list,
.difficult-grid,
.diary-stack,
.day-list,
.diagnostic-options,
.settings-list {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.shortcut-card,
.task-card,
.diagnostic-option,
.settings-list button,
.settings-list .profile-menu-item {
    background: var(--color-surface-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    color: var(--color-text);
    display: grid;
    gap: 6px;
    min-height: 76px;
    padding: 16px;
    text-align: left;
}

.profile-menu-item {
    align-items: center;
    color: var(--color-text);
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr auto;
    text-decoration: none;
    width: 100%;
}

.profile-menu-item > .mud-icon-root:first-child {
    color: var(--color-primary);
}

.profile-menu-item > .mud-icon-root:last-child {
    color: var(--color-text-muted);
}

.profile-menu-item span {
    display: grid;
    gap: 3px;
}

.profile-menu-item strong {
    color: var(--color-text);
    font-size: 0.96rem;
}

.profile-menu-item small {
    color: var(--color-text-muted);
    line-height: 1.4;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
    border-color: rgba(215, 180, 106, 0.42);
}

.bottom-nav-item:focus-visible,
.journey-day-card:focus-visible,
.profile-menu-item:focus-visible,
.support-topic:focus-visible,
.shortcut-card.mud-button-root:focus-visible,
.mini-link:focus-visible,
.back-link.mud-button-root:focus-visible {
    box-shadow: 0 0 0 3px rgba(236, 174, 82, 0.18);
}

.profile-logout {
    cursor: pointer;
    font: inherit;
}

.profile-logout .mud-button-label {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr auto;
    text-align: left;
    text-transform: none;
    width: 100%;
}

.profile-logout .mud-button-label > .mud-icon-root:first-child {
    color: var(--color-primary);
}

.profile-logout .mud-button-label > .mud-icon-root:last-child {
    color: var(--color-text-muted);
}

.shortcut-card-content,
.task-card span,
.journey-day-card h3,
.audio-card h3,
.difficult-card h2 {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.shortcut-card .mud-button-label {
    display: block;
    text-align: left;
    width: 100%;
}

.shortcut-card-content {
    display: grid;
    gap: 6px;
}

.shortcut-card-content strong {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 800;
}

.shortcut-card-content small,
.status-pill,
.day-number,
.audio-card small,
.profile-card span {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}

.journey-summary {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 16px;
}

.journey-summary span {
    background: var(--color-primary-soft);
    border-radius: 999px;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 11px;
    text-align: center;
}

.journey-day-card {
    align-items: center;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr auto;
    min-height: 86px;
    padding: 14px 15px;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.journey-day-card:hover,
.journey-day-card:focus-visible {
    transform: translateY(-1px);
}

.journey-day-card.is-completed {
    background: rgba(27, 61, 52, 0.48);
    border-color: rgba(121, 199, 161, 0.46);
}

.journey-day-card.is-current {
    background: rgba(54, 63, 50, 0.58);
    border-color: rgba(215, 180, 106, 0.65);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.journey-day-card.is-available {
    background: rgba(19, 34, 45, 0.72);
    border-color: rgba(255, 255, 255, 0.06);
}

.journey-day-index {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--color-text-muted);
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    height: 46px;
    justify-content: center;
    line-height: 1;
    width: 44px;
}

.journey-day-index small {
    font-size: 0.64rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.journey-day-index strong {
    color: inherit;
    font-size: 0.92rem;
}

.journey-day-card.is-completed .journey-day-index {
    background: rgba(121, 199, 161, 0.15);
    border-color: rgba(121, 199, 161, 0.35);
    color: var(--color-success);
}

.journey-day-card.is-current .journey-day-index {
    background: rgba(215, 180, 106, 0.18);
    border-color: rgba(215, 180, 106, 0.42);
    color: var(--color-primary);
}

.journey-day-content {
    min-width: 0;
}

.journey-day-content h3 {
    line-height: 1.22;
}

.journey-day-content p {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.2;
    margin: 4px 0 0;
}

.journey-day-card.is-completed .status-pill {
    color: var(--color-success);
}

.status-pill {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 7px 9px;
}

.status-pill.is-current {
    background: rgba(76, 211, 194, 0.16);
    color: #7ee2d5;
}

.status-pill.is-completed {
    background: rgba(121, 199, 161, 0.13);
    color: var(--color-success);
}

.status-pill.is-available {
    color: var(--color-text-muted);
}

@media (max-width: 380px) {
    .journey-day-card {
        gap: 10px;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .journey-day-card .status-pill {
        grid-column: 2;
        justify-self: start;
        padding: 5px 8px;
    }
}

.task-card-disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.task-card.is-task-completed {
    background: rgba(31, 71, 58, 0.72);
    border-color: rgba(121, 199, 161, 0.76);
    box-shadow: 0 14px 32px rgba(41, 122, 89, 0.16);
}

.task-card .task-check {
    color: var(--color-success);
    display: inline-block;
    font-size: 1.28rem;
    font-weight: 900;
    line-height: 1;
    margin-left: 6px;
    transform: translateY(1px);
}

.task-card em {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.clarity-task-card {
    border-color: rgba(215, 180, 106, 0.22);
}

.clarity-card-button {
    justify-self: start;
    margin-top: 6px;
}

.clarity-page {
    padding-bottom: 6px;
}

.clarity-tone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 4px;
}

.clarity-tone-list span {
    background: rgba(143, 184, 168, 0.13);
    border: 1px solid rgba(143, 184, 168, 0.28);
    border-radius: 999px;
    color: #b6d7ca;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 7px 10px;
}

.clarity-card {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    display: grid;
    gap: 9px;
    padding: 18px;
}

.clarity-card h2 {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0;
}

.clarity-card p {
    color: var(--color-text-muted);
    line-height: 1.68;
    margin: 0;
}

.clarity-opening {
    background: rgba(28, 42, 38, 0.88);
    border-color: rgba(143, 184, 168, 0.28);
}

.clarity-keep {
    background: rgba(66, 52, 28, 0.46);
    border-color: rgba(215, 180, 106, 0.32);
}

.clarity-keep p {
    color: var(--color-text);
    font-size: 1.03rem;
    font-weight: 800;
}

.diagnostic-option {
    justify-content: flex-start;
    min-height: 68px;
    text-align: left;
}

.diagnostic-option .mud-button-label {
    justify-content: flex-start;
    text-transform: none;
    white-space: normal;
}

.diagnostic-question-panel {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 8px;
    margin: 16px 0;
    padding: 18px;
}

.diagnostic-question-panel .eyebrow {
    margin-bottom: 2px;
}

.diagnostic-question-panel.has-validation-error {
    background: rgba(91, 31, 39, 0.18);
    border-color: rgba(239, 124, 137, 0.72);
    box-shadow: 0 0 0 2px rgba(239, 124, 137, 0.08);
}

.diagnostic-option.has-validation-error:not(.selected) {
    border-color: rgba(239, 124, 137, 0.5);
}

.diagnostic-option.selected {
    background: var(--color-primary-soft);
    border-color: rgba(215, 180, 106, 0.75);
}

.recommendation {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 14px;
}

.recommendation span {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.reading-page {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    color: var(--color-text);
    margin: -8px -4px 16px;
    padding: 24px 20px;
}

.form-page {
    display: grid;
    gap: 18px;
}

.content-page {
    min-width: 0;
}

.daily-content-header {
    background: #10251f;
    border: 1px solid rgba(91, 168, 137, 0.24);
    border-radius: 8px;
    display: grid;
    margin-bottom: 22px;
    padding: 18px;
}

.daily-content-header .daily-content-back {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.daily-content-header .eyebrow {
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.content-page .daily-content-header h1 {
    color: var(--color-text);
    font-size: 1.75rem;
    line-height: 1.18;
    margin: 0;
}

.daily-content-header .daily-content-subtitle {
    color: var(--color-text-muted);
    font-size: 0.98rem;
    line-height: 1.58;
    margin: 12px 0 0;
}

.reading-page.content-page {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

.form-page h1,
.form-section h2 {
    color: var(--color-text);
}

.form-section {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.back-link {
    background: transparent;
    border: 0;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 0;
    justify-self: start;
    text-align: left;
    width: auto;
}

.reading-page .eyebrow {
    color: var(--color-primary);
}

.reading-page h1 {
    color: var(--color-text);
    font-size: 2rem;
    line-height: 1.12;
}

.reading-page h2 {
    color: var(--color-text);
    font-size: 1.2rem;
    line-height: 1.28;
    margin-top: 18px;
}

.reading-page p {
    color: var(--color-text-muted);
    font-size: 1.04rem;
    line-height: 1.72;
}

.reading-page blockquote {
    background: rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    color: var(--color-text);
    font-weight: 800;
    line-height: 1.5;
    margin: 22px 0;
    padding: 16px;
}

.reading-tools {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 8px;
}

.reading-tools .mud-icon-button {
    color: var(--color-text-muted);
}

.reading-content {
    --reading-font-size: 1.04rem;
}

.reading-content.font-small {
    --reading-font-size: 0.94rem;
}

.reading-content.font-large {
    --reading-font-size: 1.18rem;
}

.reading-content .reading-block {
    border: 1px solid transparent;
    border-radius: 8px;
    margin: 0 -10px;
    padding: 1px 10px;
    position: relative;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.reading-content .reading-block:not(.reading-block-heading) {
    cursor: pointer;
}

.reading-content .reading-block:focus-visible {
    border-color: rgba(215, 180, 106, 0.55);
    outline: 2px solid rgba(215, 180, 106, 0.2);
}

.reading-content .reading-block.is-highlighted {
    background: rgba(184, 123, 35, 0.14);
    border-color: rgba(225, 170, 77, 0.34);
}

.reading-content .reading-block.is-active {
    border-color: rgba(215, 180, 106, 0.42);
}

.reading-content .reading-block p {
    font-size: var(--reading-font-size);
    line-height: 1.58;
    margin: 8px 0;
}

.reading-content .reading-block blockquote {
    font-size: var(--reading-font-size);
    line-height: 1.46;
    margin: 14px 0;
}

.reading-block-indicators {
    display: flex;
    gap: 5px;
    position: absolute;
    right: 7px;
    top: 7px;
}

.reading-block-indicator {
    align-items: center;
    background: rgba(215, 180, 106, 0.15);
    border-radius: 50%;
    color: var(--color-primary);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.reading-block-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 0 4px;
}

.reading-block-actions .mud-button-root {
    color: var(--color-primary);
    font-size: 0.76rem;
    letter-spacing: 0;
    text-transform: none;
}

.reading-note-editor {
    background: #10251f;
    border: 1px solid rgba(91, 168, 137, 0.28);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    bottom: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    left: max(18px, calc(50% - 225px));
    margin: 0;
    max-height: calc(100dvh - 36px);
    max-width: 450px;
    overflow-y: auto;
    padding: 16px;
    position: fixed;
    right: max(18px, calc(50% - 225px));
    z-index: 1300;
}

.reading-note-editor h3 {
    color: var(--color-text);
    font-size: 1rem;
    margin: 2px 0 0;
}

.reading-note-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.reading-note-actions .mud-button-root {
    letter-spacing: 0;
    text-transform: none;
}

.diary-reading-reference {
    background: rgba(215, 180, 106, 0.09);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    padding: 16px;
}

.diary-reading-reference blockquote {
    color: var(--color-text);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 8px 0 12px;
}

.diary-reading-reference-list {
    display: grid;
    gap: 10px;
    margin: 8px 0 12px;
}

.diary-reading-reference-list blockquote {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    margin: 0;
    padding: 12px;
}

.diary-reading-reference > p:last-child {
    color: var(--color-text-muted);
    margin: 0;
}

.reading-end {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin: 20px 0;
    padding: 14px;
}

.reading-end p {
    margin-bottom: 0;
}

.diary-field {
    display: grid;
    gap: 8px;
}

.diary-field span {
    color: var(--color-text);
    font-weight: 800;
    line-height: 1.35;
}

.diary-field textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    color: var(--color-text);
    min-height: 130px;
    padding: 14px;
    resize: vertical;
    width: 100%;
}

.select-field {
    display: grid;
    gap: 8px;
}

.select-field span {
    color: var(--color-text);
    font-weight: 800;
}

.select-field select {
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    color: var(--color-text);
    min-height: 48px;
    padding: 0 14px;
}

.select-field option {
    color: #1c252d;
}

.choice-grid {
    display: grid;
    gap: 9px;
}

.choice-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--color-text);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 12px;
}

.diary-field textarea::placeholder {
    color: rgba(245, 240, 232, 0.48);
}

.audio-card {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto;
}

.audio-card-progress {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    height: 6px;
    margin-top: 10px;
    overflow: hidden;
    width: 100%;
}

.audio-card-progress span {
    background: linear-gradient(90deg, var(--color-success), var(--color-primary));
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0;
}

.audio-listened {
    color: var(--color-success);
}

.audio-listened.is-completed {
    font-weight: 800;
}

.journey-options {
    display: grid;
    gap: 12px;
}

.journey-option-card {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    padding: 18px;
}

.journey-option-card.recommended {
    border-color: rgba(126, 226, 213, 0.55);
}

.journey-option-card div {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.journey-confirmation-backdrop {
    align-items: center;
    background: rgba(4, 10, 16, 0.72);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 1300;
}

.journey-confirmation {
    background: rgba(16, 27, 37, 0.98);
    border: 1px solid rgba(215, 180, 106, 0.4);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 12px;
    max-width: 460px;
    padding: 22px;
    width: 100%;
}

.journey-confirmation h2 {
    color: var(--color-text);
    font-size: 1.3rem;
    margin: -2px 0 0;
}

.journey-confirmation p {
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
}

.journey-confirmation p strong {
    color: var(--color-text);
}

.journey-confirmation-actions {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.journey-preview {
    max-height: min(720px, calc(100vh - 44px));
}

.journey-preview-days {
    display: grid;
    gap: 7px;
    max-height: min(480px, calc(100vh - 310px));
    overflow-y: auto;
    padding-right: 2px;
}

.journey-preview-days > div {
    align-items: baseline;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 1fr;
    padding: 10px 11px;
}

.journey-preview-days span {
    color: var(--color-primary);
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.journey-preview-days strong {
    color: var(--color-text);
    font-size: 0.86rem;
    line-height: 1.35;
}

.option-index {
    color: var(--color-primary);
    font-weight: 900;
}

.player-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.player-cover {
    align-items: center;
    background: linear-gradient(145deg, var(--color-primary), var(--color-accent));
    border-radius: 26px;
    color: #18212a;
    display: inline-flex;
    font-size: 2rem;
    font-weight: 900;
    height: 130px;
    justify-content: center;
    margin-bottom: 18px;
    width: 130px;
}

.play-button {
    background: var(--color-primary);
    color: #18130b;
    gap: 6px;
    margin: 0;
    max-width: 178px;
}

.play-button .mud-button-label {
    gap: 6px;
    text-transform: none;
}

.player-progress {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    width: 100%;
}

.player-progress .progress-track {
    flex: 1;
}

.player-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.audio-status-pill {
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 7px 10px;
}

.audio-status-pill.is-progress {
    background: rgba(255, 255, 255, 0.07);
    color: var(--color-text-muted);
}

.audio-status-pill.is-completed {
    background: rgba(121, 199, 161, 0.13);
    color: var(--color-success);
}

.audio-status-pill.is-offline {
    background: rgba(215, 180, 106, 0.16);
    color: var(--color-primary);
}

.player-controls {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 46px minmax(0, 178px) 46px;
    justify-content: center;
    width: 100%;
}

.player-icon-button.mud-icon-button {
    background: rgba(255, 255, 255, 0.07);
    color: var(--color-text);
    height: 46px;
    width: 46px;
}

.player-icon-button.mud-icon-button:hover,
.player-icon-button.mud-icon-button:focus-visible {
    background: rgba(215, 180, 106, 0.18);
    color: var(--color-primary);
}

.audio-seek {
    cursor: pointer;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.audio-seek.mud-disabled {
    cursor: wait;
    opacity: 0.55;
}

.player-progress-summary {
    align-items: center;
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.76rem;
    font-weight: 800;
    gap: 8px 14px;
    justify-content: center;
    margin-top: -6px;
    width: 100%;
}

.player-speed-row {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 320px;
    padding: 4px;
    width: 100%;
}

.player-speed-button.mud-button-root {
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
    min-height: 38px;
    padding: 4px;
    text-transform: none;
}

.player-speed-button.is-active.mud-button-root {
    background: rgba(143, 184, 168, 0.16);
    color: #d7eee3;
}

.player-offline-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
    text-align: left;
    width: 100%;
}

.player-offline-panel strong {
    color: var(--color-text);
    display: block;
    font-size: 0.92rem;
}

.player-offline-panel p {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 4px 0 0;
}

.player-offline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.audio-offline-button.mud-button-root {
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    min-height: 42px;
    text-transform: none;
}

.audio-offline-button .mud-button-label {
    gap: 6px;
    text-transform: none;
}

@media (max-width: 420px) {
    .player-offline-panel {
        grid-template-columns: 1fr;
    }

    .player-offline-actions {
        justify-content: stretch;
    }

    .audio-offline-button.mud-button-root {
        flex: 1 1 auto;
    }
}

.profile-card {
    display: grid;
    gap: 14px;
}

.profile-security-panel {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    margin-bottom: 16px;
    padding: 18px;
}

.profile-security-panel .section-heading {
    margin-top: 0;
}

.profile-security-form {
    display: grid;
    gap: 14px;
}

.profile-card div {
    display: grid;
    gap: 4px;
}

.profile-journey-overview-list {
    display: grid;
    gap: 12px;
}

.profile-journey-overview-card {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    display: grid;
    gap: 12px;
    padding: 16px;
    text-decoration: none;
}

.profile-journey-overview-card.is-current {
    border-color: rgba(126, 226, 213, 0.48);
}

.profile-journey-overview-card:hover,
.profile-journey-overview-card:focus-visible {
    border-color: rgba(215, 180, 106, 0.56);
}

.profile-journey-overview-heading {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.profile-journey-overview-heading .eyebrow {
    margin: 0 0 4px;
}

.profile-journey-overview-heading h2 {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.profile-journey-overview-card > p {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.settings-list button,
.settings-list .profile-menu-item {
    min-height: 56px;
}

.profile-detail-page {
    min-width: 0;
}

.profile-progress-overview {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    margin-bottom: 14px;
    padding: 18px;
}

.profile-progress-main {
    align-items: baseline;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.profile-progress-main strong {
    color: var(--color-primary);
    font-size: 1.8rem;
}

.profile-progress-main span,
.profile-progress-overview > p {
    color: var(--color-text-muted);
    font-size: 0.86rem;
}

.profile-progress-overview > p {
    margin: 12px 0 0;
}

.profile-progress-overview > p strong {
    color: var(--color-text);
}

.profile-summary-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.profile-summary-grid div {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 13px;
}

.profile-summary-grid strong {
    color: var(--color-text);
    font-size: 1.25rem;
}

.profile-summary-grid span {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.section-heading {
    margin: 24px 0 12px;
}

.section-heading h2 {
    color: var(--color-text);
    font-size: 1.2rem;
    margin: 4px 0 0;
}

.profile-journey-days {
    display: grid;
    gap: 10px;
}

.profile-day-record {
    background: var(--color-surface-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.profile-day-record summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    list-style: none;
    padding: 14px;
}

.profile-day-record summary::-webkit-details-marker {
    display: none;
}

.profile-day-number {
    align-items: center;
    background: rgba(215, 180, 106, 0.14);
    border-radius: 50%;
    color: var(--color-primary);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.profile-day-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.profile-day-title strong {
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.35;
}

.profile-day-title small {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

.profile-status,
.profile-activity-status {
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 7px;
    white-space: nowrap;
}

.profile-status.is-completed,
.profile-activity-status.is-completed {
    background: rgba(121, 199, 161, 0.13);
    color: var(--color-success);
}

.profile-status.is-current,
.profile-activity-status.is-current {
    background: rgba(76, 211, 194, 0.13);
    color: #7ee2d5;
}

.profile-activity-status.is-pending {
    color: var(--color-text-muted);
}

.profile-activity-list {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: grid;
    padding: 8px 14px 4px;
}

.profile-activity {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 1fr auto;
    min-height: 40px;
}

.profile-activity .mud-icon-root {
    color: var(--color-text-muted);
}

.profile-activity > span {
    color: var(--color-text);
    font-size: 0.82rem;
}

.profile-day-link {
    color: var(--color-primary);
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    margin: 4px 14px 14px 46px;
}

.notebook-page {
    min-width: 0;
}

.notebook-story-summary {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 14px;
}

.notebook-story-summary div {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 12px 8px;
    text-align: center;
}

.notebook-story-summary strong {
    color: var(--color-text);
    font-size: 1.05rem;
}

.notebook-story-summary span {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
}

.notebook-controls-card {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
}

.notebook-search-field .mud-input-control,
.notebook-controls-card .notebook-journey-select .mud-input-control {
    margin: 0;
}

.notebook-search-field .mud-input-root {
    background: rgba(255, 255, 255, 0.045);
    border-radius: 8px;
    color: var(--color-text);
}

.notebook-search-field .mud-input-adornment .mud-icon-root {
    color: var(--color-primary);
}

.notebook-view-tabs {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 4px;
}

.notebook-view-tab.mud-button-root {
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    min-height: 40px;
    padding: 5px;
    text-transform: none;
}

.notebook-view-tab.is-active.mud-button-root {
    background: rgba(143, 184, 168, 0.16);
    color: #d7eee3;
}

.notebook-controls-card .notebook-filters {
    margin: 0;
}

.notebook-clear-search.mud-button-root {
    justify-self: start;
}

.notebook-filters {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 6px 0 18px;
}

.notebook-filter {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--color-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
    min-height: 36px;
    overflow-wrap: anywhere;
    padding: 7px 6px;
    text-align: center;
}

.notebook-filter.is-active {
    background: rgba(215, 180, 106, 0.18);
    border-color: rgba(215, 180, 106, 0.46);
    color: var(--color-primary);
}

.notebook-journey-filter {
    margin: -6px 0 18px;
}

.notebook-journey-filter .mud-input-control {
    margin: 0;
}

.notebook-journey-select .mud-input-label {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.notebook-journey-select .mud-input-root {
    background: rgba(16, 27, 37, 0.88);
    border-radius: 8px;
    color: var(--color-text);
}

.notebook-journey-select .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.16);
}

.notebook-journey-select:hover .mud-input-outlined-border,
.notebook-journey-select .mud-input-control:focus-within .mud-input-outlined-border {
    border-color: rgba(215, 180, 106, 0.62);
}

.notebook-journey-select .mud-select-input {
    color: var(--color-text);
    font-weight: 700;
}

.notebook-journey-select .mud-select-input ~ .mud-icon-root {
    color: var(--color-primary);
}

.notebook-journey-select-popover {
    background: rgba(16, 27, 37, 0.99);
    border: 1px solid rgba(215, 180, 106, 0.28);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.notebook-journey-select-popover .mud-list-item {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    min-height: 44px;
}

.notebook-journey-select-popover .mud-list-item:hover,
.notebook-journey-select-popover .mud-selected-item {
    background: rgba(215, 180, 106, 0.14);
    color: var(--color-primary);
}

.notebook-journey {
    display: grid;
    gap: 12px;
}

.notebook-day {
    background: rgba(16, 27, 37, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.notebook-day summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    list-style: none;
    padding: 14px;
}

.notebook-day summary::-webkit-details-marker {
    display: none;
}

.notebook-activity {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 14px;
}

.notebook-activity h3 {
    color: var(--color-primary);
    font-size: 0.86rem;
    margin: 0 0 10px;
}

.notebook-items {
    display: grid;
    gap: 10px;
}

.notebook-item {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 13px;
}

.notebook-item-meta {
    align-items: center;
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.72rem;
    gap: 6px;
}

.notebook-badge {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 7px;
}

.notebook-badge.is-highlight {
    background: rgba(215, 180, 106, 0.16);
    color: var(--color-primary);
}

.notebook-badge.is-note {
    background: rgba(126, 226, 213, 0.13);
    color: #7ee2d5;
}

.notebook-badge.is-clarity {
    background: rgba(143, 184, 168, 0.16);
    color: #d7eee3;
}

.notebook-item blockquote {
    border-left: 3px solid rgba(215, 180, 106, 0.55);
    color: var(--color-text);
    line-height: 1.58;
    margin: 0;
    padding-left: 12px;
}

.notebook-answer,
.notebook-note {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 7px;
    display: grid;
    gap: 5px;
    padding: 10px;
}

.notebook-answer span,
.notebook-note span {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.notebook-answer p,
.notebook-note p {
    color: var(--color-text);
    line-height: 1.55;
    margin: 0;
}

.notebook-clarities-section {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

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

.notebook-clarity-card {
    background: var(--color-surface-soft);
    border: 1px solid rgba(215, 180, 106, 0.18);
    border-radius: var(--radius-card);
    color: var(--color-text);
    cursor: pointer;
    display: grid;
    gap: 6px;
    padding: 16px;
    text-align: left;
    width: 100%;
}

.notebook-clarity-card:hover,
.notebook-clarity-card:focus-visible {
    border-color: rgba(215, 180, 106, 0.48);
}

.notebook-clarity-day {
    color: var(--color-text);
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.35;
}

.notebook-clarity-card small,
.notebook-clarity-meta-card small {
    color: var(--color-text-muted);
    font-size: 0.76rem;
}

.notebook-clarity-card p {
    color: var(--color-text);
    line-height: 1.58;
    margin: 6px 0 0;
}

.notebook-clarity-card-tones {
    color: #b6d7ca;
    font-size: 0.74rem;
    font-weight: 800;
    margin-top: 4px;
}

.notebook-history-entry.is-clarity {
    border-color: rgba(143, 184, 168, 0.24);
}

.notebook-entry-action.mud-button-root {
    justify-self: start;
}

.notebook-timeline {
    display: grid;
    gap: 0;
    position: relative;
}

.notebook-timeline::before {
    background: rgba(215, 180, 106, 0.22);
    bottom: 0;
    content: "";
    left: 13px;
    position: absolute;
    top: 7px;
    width: 2px;
}

.notebook-timeline-day {
    display: grid;
    gap: 12px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding-bottom: 16px;
    position: relative;
}

.notebook-timeline-marker {
    background: var(--color-primary);
    border: 4px solid var(--color-bg);
    border-radius: 999px;
    height: 18px;
    margin-top: 6px;
    width: 18px;
    z-index: 1;
}

.notebook-timeline-content {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.notebook-timeline-header {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    justify-content: space-between;
}

.notebook-timeline-header h2 {
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.notebook-timeline-header span {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.notebook-calendar-section,
.notebook-retrospectives,
.notebook-grouped {
    display: grid;
    gap: 14px;
}

.notebook-calendar-month {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 12px;
    padding: 16px;
}

.notebook-calendar-month header {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.notebook-calendar-month h2 {
    color: var(--color-text);
    font-size: 1.02rem;
    margin: 0;
    text-transform: capitalize;
}

.notebook-calendar-month header span {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.notebook-calendar-weekdays,
.notebook-calendar-days {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.notebook-calendar-weekdays span {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
}

.notebook-calendar-day {
    align-items: center;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    color: var(--color-text-muted);
    display: grid;
    font-size: 0.76rem;
    justify-items: center;
    min-width: 0;
    position: relative;
}

.notebook-calendar-day strong {
    color: inherit;
    font-size: 0.78rem;
}

.notebook-calendar-day small {
    align-items: center;
    background: rgba(7, 16, 24, 0.82);
    border-radius: 999px;
    color: var(--color-text);
    display: inline-flex;
    font-size: 0.58rem;
    font-weight: 900;
    height: 16px;
    justify-content: center;
    min-width: 16px;
    padding: 0 4px;
    position: absolute;
    right: 3px;
    top: 3px;
}

.notebook-calendar-day.is-empty {
    background: transparent;
    border-color: transparent;
}

.notebook-calendar-day.is-active {
    background: rgba(215, 180, 106, 0.16);
    border-color: rgba(215, 180, 106, 0.42);
    color: var(--color-primary);
    font-weight: 900;
}

.notebook-calendar-day.intensity-2,
.notebook-calendar-day.intensity-3,
.notebook-calendar-day.intensity-4 {
    background: rgba(143, 184, 168, 0.18);
    border-color: rgba(143, 184, 168, 0.42);
    color: #d7eee3;
}

.notebook-retrospective-grid {
    display: grid;
    gap: 10px;
}

.notebook-retrospective-card {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-card);
    display: grid;
    gap: 10px;
    padding: 16px;
}

.notebook-retrospective-card header {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.notebook-retrospective-card h3 {
    color: var(--color-text);
    font-size: 1.02rem;
    margin: 0;
    text-transform: capitalize;
}

.notebook-retrospective-card header span,
.notebook-retrospective-stats span {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.notebook-retrospective-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.notebook-retrospective-stats span {
    background: rgba(255, 255, 255, 0.055);
    border-radius: 999px;
    padding: 5px 8px;
}

.notebook-retrospective-card p {
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

.notebook-retrospective-card blockquote {
    border-left: 3px solid rgba(143, 184, 168, 0.55);
    color: var(--color-text);
    line-height: 1.58;
    margin: 0;
    padding-left: 12px;
}

.notebook-clarity-detail-page {
    display: grid;
    gap: 14px;
}

.notebook-clarity-meta-card,
.notebook-clarity-block {
    background: rgba(16, 27, 37, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    display: grid;
    gap: 8px;
    padding: 18px;
}

.notebook-clarity-meta-card h2,
.notebook-clarity-block h2 {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0;
}

.notebook-clarity-block p {
    color: var(--color-text-muted);
    line-height: 1.68;
    margin: 0;
}

.notebook-clarity-block:first-of-type {
    background: rgba(66, 52, 28, 0.46);
    border-color: rgba(215, 180, 106, 0.32);
}

.notebook-clarity-block:first-of-type p {
    color: var(--color-text);
    font-weight: 800;
}

.notebook-clarity-tones {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 5px;
}

.notebook-clarity-tones span {
    background: rgba(143, 184, 168, 0.13);
    border: 1px solid rgba(143, 184, 168, 0.28);
    border-radius: 999px;
    color: #b6d7ca;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 6px 9px;
}

.notebook-full-analysis-link {
    justify-self: start;
}

.support-topics {
    display: grid;
    gap: 10px;
}

.support-topic {
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr;
    padding: 14px 2px;
    text-decoration: none;
}

.support-whatsapp-card {
    align-items: center;
    background: rgba(16, 37, 31, 0.95);
    border: 1px solid rgba(121, 199, 161, 0.35);
    border-radius: var(--radius-card);
    display: grid;
    gap: 16px;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 18px;
    padding: 18px;
}

.support-whatsapp-icon {
    align-items: center;
    background: rgba(121, 199, 161, 0.14);
    border-radius: 8px;
    color: var(--color-success);
    display: grid;
    height: 48px;
    justify-items: center;
    width: 48px;
}

.support-whatsapp-card h2 {
    color: var(--color-text);
    font-size: 1.2rem;
    margin: 0;
}

.support-whatsapp-card p {
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 6px 0;
}

.support-whatsapp-card strong {
    color: var(--color-success);
}

.support-whatsapp-button {
    justify-self: end;
    text-decoration: none;
}

.support-topic .mud-icon-root {
    color: var(--color-primary);
}

.support-topic strong,
.terms-section h2 {
    color: var(--color-text);
}

.support-topic p,
.terms-section p,
.support-faq p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 5px 0 0;
}

.crisis-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.crisis-link {
    text-decoration: none;
}

.crisis-resource {
    border-color: rgba(230, 122, 85, 0.24);
}

.support-faq .mud-expand-panel {
    background: var(--color-surface-soft);
    color: var(--color-text);
}

.support-faq .mud-expand-panel-header {
    font-weight: 700;
}

@media (max-width: 680px) {
    .support-whatsapp-card {
        grid-template-columns: auto 1fr;
    }

    .support-whatsapp-button {
        grid-column: 1 / -1;
        justify-self: stretch;
    }
}

.terms-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 18px 2px;
}

.terms-section h2 {
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 380px) {
    .profile-day-record summary {
        grid-template-columns: auto 1fr;
    }

    .profile-status {
        grid-column: 2;
        justify-self: start;
    }
}

.notice {
    background: rgba(143, 184, 168, 0.12);
    border-color: rgba(143, 184, 168, 0.22);
}

.notice strong {
    color: var(--color-accent);
    display: block;
    margin-bottom: 5px;
}

.notice p {
    margin-bottom: 0;
}

.empty-state {
    text-align: center;
}

.bottom-navigation {
    align-items: center;
    backdrop-filter: blur(16px);
    background: rgba(7, 16, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px 22px 0 0;
    bottom: 0;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--bottom-nav-height);
    left: 50%;
    max-width: 520px;
    padding: 8px 6px 10px;
    position: fixed;
    transform: translateX(-50%);
    width: 100%;
    z-index: 20;
}

.bottom-nav-item {
    align-items: center;
    border-radius: 15px;
    color: var(--color-text-muted);
    display: grid;
    font-size: 0.66rem;
    gap: 2px;
    justify-items: center;
    min-height: 54px;
    min-width: 0;
    padding: 0 2px;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus-visible {
    color: var(--color-primary);
}

.bottom-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav-item.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.nav-icon {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
}

#blazor-error-ui {
    background: #fff7d6;
    bottom: 0;
    box-sizing: border-box;
    color: #171717;
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.error-screen {
    align-items: center;
    background: var(--color-bg);
    display: flex;
    min-height: 100dvh;
    padding: 24px 18px;
}

.error-panel {
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
}

.error-panel h1 {
    color: var(--color-text);
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    margin-bottom: 12px;
}

.error-panel p:not(.eyebrow) {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.loading-state {
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-card);
    display: flex;
    gap: 14px;
    padding: 18px;
}

.loading-state strong {
    color: var(--color-text);
    display: block;
    font-size: 0.98rem;
}

.loading-state p {
    color: var(--color-text-muted);
    margin: 4px 0 0;
}

.loading-spinner {
    animation: spin 0.85s linear infinite;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    border-top-color: var(--color-primary);
    flex: 0 0 auto;
    height: 28px;
    width: 28px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .journey-day-card:hover,
    .journey-day-card:focus-visible,
    .journey-primary-button.mud-button-root:active {
        transform: none;
    }
}

@media (min-width: 720px) {
    .phone-frame {
        padding: 28px 0;
    }

    .app-surface {
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 34px;
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
        min-height: calc(100vh - 56px);
        overflow: hidden;
    }

    .bottom-navigation {
        border-radius: 22px 22px 34px 34px;
        bottom: 28px;
    }
}
