:root {
    --bg: #0c0c0c;
    --surface: #141414;
    --surface-2: #1c1c1c;
    --surface-3: #232323;
    --border: #2a2a2a;
    --accent: #d4f57a;
    --accent-soft: #7af5c8;
    --text: #f0ede8;
    --muted: #b8b8b8;
    --danger: #ff8d7a;
    --warning: #f5cf7a;
    --success: #7af5c8;
    --scrollbar-thumb: rgba(212, 245, 122, 0.24);
    --scrollbar-thumb-hover: rgba(212, 245, 122, 0.42);
    --scrollbar-track: rgba(255, 255, 255, 0.03);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --glow: 0 0 20px rgba(212, 245, 122, 0.18);
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 0;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(122, 245, 200, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(212, 245, 122, 0.14), transparent 30%),
        linear-gradient(180deg, #0c0c0c 0%, #101010 50%, #0c0c0c 100%);
    color: var(--text);
    font-family: "Instrument Sans", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 3px 3px, 3px 3px;
    mix-blend-mode: soft-light;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

button:hover,
.list-row:hover,
.content-card:hover,
.detail-panel:hover,
.panel:hover,
.status-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    padding: 14px 16px;
    outline: none;
}

.settings-card input,
.settings-card select {
    min-height: 52px;
    line-height: 1.2;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset;
    transition: background-color 5000s ease-in-out 0s;
}

body.modal-open {
    overflow: hidden;
}

.video-preview-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 80;
}

.member-email-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    opacity: 1;
    pointer-events: auto;
    z-index: 90;
}

.video-preview-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.video-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.video-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 56px));
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(12, 12, 12, 0.94);
    box-shadow: var(--shadow);
}

.member-email-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100vw - 56px));
    max-height: min(860px, calc(100vh - 56px));
    overflow-y: auto;
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(12, 12, 12, 0.96);
    box-shadow: var(--shadow);
}

.monetization-setup-dialog {
    border-color: var(--accent);
}

.creator-support-dialog {
    width: min(820px, calc(100vw - 56px));
    border-color: var(--accent);
}

.creator-support-launcher {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 18px 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(212, 245, 122, 0.34);
    background: rgba(12, 12, 12, 0.94);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34), var(--glow);
    color: var(--text);
}

.creator-support-launcher.is-active {
    border-color: var(--accent);
    background: rgba(212, 245, 122, 0.12);
}

.creator-support-launcher-icon {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex: 0 0 auto;
}

.creator-support-launcher-label {
    font-family: "DM Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .creator-support-launcher {
        right: 16px;
        bottom: 84px;
        padding-right: 14px;
    }

    .creator-support-launcher-label {
        display: none;
    }
}

.creator-support-context-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-support-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.86rem;
}

.creator-support-thread {
    display: grid;
    gap: 14px;
    max-height: min(420px, 42vh);
    overflow-y: auto;
    padding: 4px 2px 4px 0;
}

.creator-support-empty-state {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.creator-support-prompt-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-support-prompt {
    text-align: left;
}

.creator-support-message {
    display: grid;
    gap: 8px;
    max-width: min(100%, 640px);
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.creator-support-message.is-user {
    justify-self: end;
    background: rgba(230, 185, 87, 0.12);
    border-color: rgba(230, 185, 87, 0.28);
}

.creator-support-message-role {
    margin: 0;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.creator-support-message-body {
    white-space: pre-wrap;
    line-height: 1.6;
}

.creator-support-input {
    min-height: 120px;
}

.creator-support-actions {
    align-items: center;
}

.concept-extraction-dialog {
    width: min(820px, calc(100vw - 56px));
}

.concept-extraction-form {
    gap: 16px;
}

.concept-extraction-matched-list,
.concept-extraction-proposals,
.concept-extraction-card {
    display: grid;
    gap: 12px;
}

.concept-proposal-row {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.concept-proposal-check {
    justify-items: end;
}

.monetization-channel-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.monetization-channel-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.monetization-channel-table th,
.monetization-channel-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.monetization-channel-table thead th {
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

.monetization-channel-table tbody th {
    width: 170px;
    color: var(--muted);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.01);
}

.monetization-channel-table tbody tr:last-child th,
.monetization-channel-table tbody tr:last-child td {
    border-bottom: 0;
}

.member-email-form {
    display: grid;
    gap: 16px;
}

.member-email-recipient-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
    align-items: start;
}

.member-email-note {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    line-height: 1.5;
}

.member-email-body {
    min-height: 220px;
}

.video-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.video-preview-head h3 {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: 28px;
    font-weight: 400;
}

.video-preview-frame-wrap {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #050505;
}

.video-preview-iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: min(38vh, 320px);
    border: 0;
    background: #000;
}

textarea::placeholder {
    color: #707070;
}

textarea {
    min-height: 180px;
    resize: vertical;
}

a {
    color: inherit;
}

.app-shell {
    position: relative;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    overflow-x: hidden;
}

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

.marketing-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(14px);
}

.marketing-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.marketing-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.marketing-brand strong {
    display: block;
    font-family: "DM Serif Display", serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.marketing-nav-links,
.marketing-nav-actions,
.marketing-hero-actions,
.marketing-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.marketing-nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 11px;
}

.marketing-nav-links a:hover {
    color: var(--text);
}

.marketing-main {
    display: grid;
    gap: 32px;
    padding: 0 32px 48px;
}

.marketing-hero,
.marketing-section,
.marketing-cta-band,
.auth-shell-standalone {
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.9);
    box-shadow: var(--shadow);
}

.marketing-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    padding: 36px 48px 48px;
    min-height: clamp(520px, 68vh, 760px);
    align-items: start;
}

.marketing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(212, 245, 122, 0.12), transparent 28%),
        radial-gradient(circle at 88% 16%, rgba(122, 245, 200, 0.12), transparent 24%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: auto, auto, 52px 52px, 52px 52px;
    pointer-events: none;
    opacity: 0.9;
}

.marketing-hero-copy,
.marketing-hero-panel {
    position: relative;
    z-index: 1;
}

.marketing-hero-copy h1,
.marketing-section-head h2,
.marketing-cta-band h2 {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    line-height: 0.98;
}

.marketing-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(54px, 7vw, 96px);
    margin-top: 10px;
}

.marketing-subcopy {
    max-width: 560px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.marketing-hero-actions {
    margin-top: 28px;
}

.marketing-hero-primary,
.marketing-hero-secondary {
    min-height: 52px;
    padding-inline: 20px;
    text-decoration: none;
}

.marketing-hero-meta {
    margin-top: 20px;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.marketing-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.marketing-hero-meta span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(212, 245, 122, 0.08);
}

.marketing-terminal {
    border: 1px solid rgba(212, 245, 122, 0.2);
    background: rgba(12, 12, 12, 0.88);
    box-shadow: var(--shadow), var(--glow);
}

.marketing-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.marketing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.marketing-dot.is-red { background: #ff8d7a; }
.marketing-dot.is-yellow { background: #f5cf7a; }
.marketing-dot.is-green { background: #7af5c8; }

.marketing-terminal-title,
.marketing-terminal-label,
.marketing-card-kicker {
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.marketing-terminal-body,
.marketing-card-grid,
.marketing-feature-list {
    display: grid;
    gap: 16px;
}

.marketing-terminal-body {
    padding: 20px;
}

.marketing-terminal-step {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.marketing-terminal-step h3,
.marketing-card h3,
.marketing-feature-item strong {
    margin: 10px 0 0;
    font-size: 24px;
    line-height: 1.18;
    font-weight: 500;
}

.marketing-terminal-step h3 {
    font-size: 20px;
    font-weight: 100;
}

.marketing-section {
    padding: 28px;
}

.marketing-section-head {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.marketing-section-head h2,
.marketing-cta-band h2 {
    font-size: clamp(34px, 4vw, 52px);
}

.marketing-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-card,
.marketing-feature-item {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.marketing-card::before,
.marketing-feature-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.marketing-card:hover,
.marketing-feature-item:hover {
    border-color: rgba(212, 245, 122, 0.35);
    background: rgba(212, 245, 122, 0.03);
}

.marketing-card:hover::before,
.marketing-feature-item:hover::before {
    transform: scaleX(1);
}

.marketing-card p,
.marketing-feature-item p {
    margin: 12px 0 0;
    color: var(--muted);
}

.marketing-section-split .marketing-feature-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
}

.auth-shell-standalone {
    min-height: 100vh;
    padding: 28px;
}

.auth-shell-head {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.marketing-back-button {
    min-height: 44px;
}

.startup-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.startup-card {
    width: min(420px, 100%);
    display: grid;
    gap: 18px;
    justify-items: center;
    padding: 32px 28px;
    border: 1px solid rgba(212, 245, 122, 0.28);
    background: rgba(12, 12, 12, 0.78);
    box-shadow: var(--shadow), var(--glow);
    backdrop-filter: blur(14px);
    text-align: center;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 20px;
    border-right: 1px solid var(--border);
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(12px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    scrollbar-gutter: stable;
}

.sidebar::-webkit-scrollbar,
.sidebar-copy::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-copy::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-copy::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(212, 245, 122, 0.34), rgba(122, 245, 200, 0.26));
    border-radius: 999px;
    border: 2px solid rgba(12, 12, 12, 0);
    background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-copy::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(212, 245, 122, 0.52), rgba(122, 245, 200, 0.38));
    background-clip: padding-box;
}

.sidebar-brand {
    display: grid;
    gap: 14px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}

.sidebar-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.auth-brand-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin: 0 auto 14px;
}

.eyebrow,
.section-label,
.sidebar-caption,
.status-chip,
.tab-button,
.nav-button,
.meta-kicker,
.pill,
.timeline-time,
.list-head,
.small-label,
.auth-tab {
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
}

.eyebrow,
.section-label,
.status-chip,
.pill {
    color: var(--accent);
}

.sidebar h1,
.auth-card h1,
.client-picker-card h1,
.empty-state h2,
.detail-header h2,
.settings-view h2 {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    line-height: 0.98;
}

.sidebar-copy,
.empty-copy,
.auth-copy,
.timeline-copy,
.setting-copy {
    color: var(--muted);
    line-height: 1.6;
}

.sidebar-copy {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding: 2px 0 8px;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    align-content: start;
}

.nav-button {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    box-shadow: none;
    transform: none;
}

.nav-button:hover,
.nav-button:focus-visible {
    border-color: rgba(212, 245, 122, 0.2);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    transform: none;
}

.nav-button.is-active,
.tab-button.is-active,
.auth-tab.is-active,
.client-button.is-active {
    border-color: var(--accent);
    background: rgba(212, 245, 122, 0.08);
    color: var(--text);
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    flex: 0 0 auto;
    padding-top: 4px;
}

.sidebar-footer-card {
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
}

.sidebar-context-card {
    background: linear-gradient(180deg, rgba(212, 245, 122, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(212, 245, 122, 0.3);
}

.sidebar-user-email {
    margin-top: 8px;
    font-family: "Instrument Sans", sans-serif;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.main-shell {
    grid-column: 2 / 3;
    min-width: 0;
    padding: 28px;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.topbar-title h2 {
    margin: 6px 0 0;
    font-family: "DM Serif Display", serif;
    font-weight: 400;
    font-size: 42px;
}

.topbar-actions {
    display: flex;
    max-width: 900px;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 10px 14px;
    min-height: 40px;
    border-radius: 3px;
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #0c0c0c;
}

.create-app-button {
    border-radius: 3px;
}

.save-app-content-button {
    border-radius: 3px;
}

.app-add-item-button {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 999;
    box-shadow: 2px 2px 10px black;
    border-radius: 3px;
}

.app-resort-items-button,
.app-scroll-toggle-button {
    position: fixed;
    right: 28px;
    z-index: 999;
    border-color: var(--accent-soft);
    background: black;
    color: white;
    font-size: 14px;
    padding: 10px;
    padding-bottom: 0;
    padding-top: 0;
    box-shadow: 2px 2px 10px black;
    border-radius: 3px;
}

.app-resort-items-button {
    top: 28px;
}

.app-scroll-toggle-button {
    top: 70px;
    margin-top: 10px;
}

#selected_app_item_generate_button {
    border-radius: 3px;
}

.button-secondary {
    border-color: var(--border);
}

.button-danger {
    border-color: rgba(255, 141, 122, 0.5);
    color: var(--danger);
}

.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
    gap: 20px;
    align-items: start;
}

.panel,
.detail-panel,
.content-card,
.status-tile,
.client-picker-card,
.auth-card,
.empty-state {
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.92);
    box-shadow: var(--shadow);
}

.panel,
.detail-panel,
.content-card,
.auth-card,
.client-picker-card,
.empty-state {
    padding: 20px;
}

.panel-head,
.detail-header,
.list-head,
.tab-row,
.status-grid,
.timeline,
.settings-grid,
.output-actions,
.detail-meta-grid,
.form-grid,
.composer-grid,
.preview-grid,
.client-list,
.auth-tabs,
.auth-actions-row {
    display: grid;
    gap: 12px;
}

.panel-head,
.detail-header {
    margin-bottom: 16px;
}

.composer-grid,
.detail-meta-grid,
.settings-grid,
.preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid {
    align-items: start;
}

.settings-section {
    display: grid;
    gap: 18px;
}

.settings-section-head {
    display: grid;
    gap: 6px;
}

.settings-grid-account,
.settings-grid-app {
    display: block;
    column-count: 2;
    column-gap: 12px;
}

.settings-section-divider {
    margin: 10px 0 2px;
}

.field-stack,
.output-editor,
.settings-card,
.output-card,
.timeline-item,
.status-tile,
.client-button,
.content-card,
.list-row {
    display: grid;
    gap: 10px;
}

.settings-card {
    align-content: start;
    break-inside: avoid;
    margin-bottom: 12px;
}

.settings-card-wide {
    width: 100%;
}

.settings-handle-field {
    margin-top: 6px;
}

.field-stack textarea.full-height,
.output-editor textarea,
#community_notes,
#personal_notes {
    min-height: 220px;
}

.list-panel {
    display: grid;
    gap: 14px;
}

.filters-row,
.tab-row,
.detail-actions,
.output-actions,
.status-grid,
.list-head,
.list-row,
.detail-summary-actions,
.auth-tabs,
.auth-actions-row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.list-head,
.list-row {
    align-items: center;
}

.members-head,
.member-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.8fr);
    gap: 14px;
    align-items: center;
}

.members-head {
    color: var(--muted);
    padding: 0 14px;
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
}

.member-row {
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.members-toolbar,
.members-status-bar,
.members-pagination,
.member-status-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.members-toolbar {
    margin-bottom: 14px;
}

.members-toolbar .field-stack {
    flex: 1;
}

.members-toolbar-actions {
    margin-top: 20px;
}

.members-status-bar,
.members-pagination {
    margin: 12px 0 16px;
}

.member-status-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.member-status-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    min-width: 0;
}

.member-inline-action {
    white-space: nowrap;
}

.member-status-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.member-status-control.is-disabled {
    opacity: 0.64;
}

.member-status-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.member-status-track {
    position: relative;
    width: 48px;
    height: 28px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.member-status-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text);
    transition: transform 140ms ease, background 140ms ease;
}

.member-status-control input:checked + .member-status-track {
    border-color: var(--accent);
    background: rgba(212, 245, 122, 0.14);
}

.member-status-control input:checked + .member-status-track::after {
    transform: translateX(20px);
    background: var(--accent);
}

.member-status-label {
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: var(--accent);
}

.save-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid currentColor;
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    gap: 10px;
}

.save-state.is-saving {
    color: var(--warning);
}

.save-state.is-saved {
    color: var(--success);
}

.save-state.is-failed {
    color: var(--danger);
}

.save-state.is-generating {
    min-width: min(100%, 280px);
}

.save-state-loader {
    position: relative;
    flex: 1 1 110px;
    min-width: 90px;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 214, 102, 0.16);
}

.save-state-loader::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: currentColor;
    animation: save-state-loader-slide 1.1s ease-in-out infinite;
}

@keyframes save-state-loader-slide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(260%);
    }
}

.ai-generation-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
}

.ai-generation-overlay-backdrop {
    display: none;
}

.ai-generation-loader {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: min(100%, 320px);
    padding: 28px 24px;
    pointer-events: none;
}

.ai-generation-cup-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}

.ai-generation-cup {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 52px;
    background: #1c1c1c;
    border: 1.5px solid #2a2a2a;
    border-radius: 4px 4px 14px 14px;
    overflow: hidden;
}

.ai-generation-cup-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 65%;
    background: #3a2a1a;
    animation: ai-generation-fill-slosh 4s ease-in-out infinite;
}

.ai-generation-cup-shine {
    position: absolute;
    top: 8px;
    left: 10px;
    width: 3px;
    height: 18px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.ai-generation-handle {
    position: absolute;
    top: 50%;
    right: -17px;
    transform: translateY(-50%);
    width: 16px;
    height: 26px;
    border: 1.5px solid #2a2a2a;
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: transparent;
}

.ai-generation-saucer {
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 7px;
    background: #1c1c1c;
    border: 1.5px solid #2a2a2a;
    border-radius: 0 0 8px 8px;
}

.ai-generation-steam {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
}

.ai-generation-steam-line {
    width: 2px;
    height: 18px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transform-origin: bottom center;
    animation: ai-generation-steam-rise 2.4s ease-in-out infinite;
}

.ai-generation-steam-line:nth-child(2) {
    height: 24px;
    animation-delay: 0.4s;
}

.ai-generation-steam-line:nth-child(3) {
    animation-delay: 0.8s;
}

.ai-generation-text-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.ai-generation-headline {
    color: #f0ede8;
    font-family: "DM Mono", monospace;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

.ai-generation-action {
    min-height: 22px;
    color: var(--warning);
    font-family: "DM Mono", monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.ai-generation-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.ai-generation-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #2a2a2a;
    animation: ai-generation-dot-pulse 1.6s ease-in-out infinite;
}

.ai-generation-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-generation-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ai-generation-fill-slosh {
    0%,
    100% {
        transform: rotate(-1.5deg) translateY(1px);
    }

    50% {
        transform: rotate(1.5deg) translateY(-1px);
    }
}

@keyframes ai-generation-steam-rise {
    0% {
        opacity: 0;
        transform: translateY(0) scaleX(1);
    }

    20% {
        opacity: 0.7;
        transform: translateY(-4px) scaleX(1.2);
    }

    60% {
        opacity: 0.4;
        transform: translateY(-14px) scaleX(0.8);
    }

    100% {
        opacity: 0;
        transform: translateY(-22px) scaleX(1.1);
    }
}

@keyframes ai-generation-dot-pulse {
    0%,
    100% {
        background: #2a2a2a;
        transform: scale(1);
    }

    50% {
        background: var(--accent);
        transform: scale(1.5);
    }
}

.app-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid currentColor;
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
}

.app-pill.is-active {
    color: var(--success);
}

.app-pill.is-archived {
    color: var(--muted);
}

.client-button.is-archived {
    opacity: 0.74;
}

.list-head {
    color: var(--muted);
    padding: 0 14px;
}

.list-row {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
}

.list-row.is-selected {
    border-color: var(--accent);
    background: rgba(212, 245, 122, 0.08);
}

.row-title {
    font-weight: 600;
}

.row-subtitle,
.status-caption,
.helper-copy,
.detail-stat-copy {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid currentColor;
}

.status-chip.is-ready,
.status-chip.is-complete {
    color: var(--success);
}

.status-chip.is-processing {
    color: var(--warning);
}

.status-chip.is-error,
.status-chip.is-failed {
    color: var(--danger);
}

.detail-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.detail-header h2 {
    font-size: 36px;
}

.detail-actions {
    margin-top: 12px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.action-row .button,
.topbar-actions .button,
.app-item-row-actions .button {
    flex: 0 0 auto;
}

.settings-inline-actions {
    margin-top: 16px;
}

.learning-goals-list {
    display: grid;
    gap: 12px;
}

.learning-goal-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.learning-goal-row-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.learning-goal-row-actions {
    margin-top: 0;
}

.learning-goals-card textarea {
    min-height: 96px;
    resize: vertical;
}

.billing-status-copy {
    margin-top: 14px;
}

.creator-billing-embed {
    margin-top: 16px;
    min-height: 420px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
}

.detail-meta-grid,
.composer-grid,
.form-grid {
    margin-top: 16px;
}

.output-card,
.settings-card,
.status-tile,
.timeline-item {
    padding: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.timeline {
    margin-top: 16px;
}

.timeline-item {
    grid-template-columns: 110px 1fr;
    align-items: start;
}

.timeline-time {
    color: var(--muted);
}

.rich-preview,
.code-preview,
.community-preview {
    border: 1px solid var(--border);
    background: #101010;
    padding: 16px;
    min-height: 180px;
    overflow: auto;
}

.code-preview {
    white-space: pre-wrap;
    font-family: "DM Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.tree-preview-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.tree-preview-list li {
    border-left: 1px solid rgba(122, 245, 200, 0.25);
    padding-left: 12px;
}

.empty-state,
.auth-shell,
.client-picker {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.client-picker-card,
.auth-card {
    width: min(960px, 100%);
}

.client-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 20px;
}

.client-button {
    padding: 18px;
    text-align: left;
}

.auth-card {
    display: grid;
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
    gap: 20px;
}

.auth-brand-block {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    text-align: center;
}

.auth-form,
.auth-confirm-wrap {
    display: grid;
    gap: 12px;
}

.auth-tabs {
    justify-content: center;
    grid-template-columns: repeat(2, max-content);
}

.auth-tabs .auth-tab {
    font-size: 15px;
}

.auth-actions-row {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
}

.auth-actions-row .button {
    border-radius: 3px;
}

.auth-confirm-wrap.is-hidden {
    display: none;
}

.is-hidden {
    display: none !important;
}

.field-label {
    color: var(--muted);
    font-size: 14px;
}

.password-field {
    position: relative;
}

.field-input.with-icon {
    padding-right: 86px;
}

.ghost-icon-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
}

.settings-logo-preview {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.settings-logo-preview-empty {
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--muted);
    font-size: 13px;
}

.ghost-icon-button svg {
    width: 18px;
    height: 18px;
}

.ghost-icon-button.is-active {
    color: var(--accent);
}

.auth-status {
    min-height: 22px;
    color: var(--accent-soft);
    text-align: center;
}

.auth-status.is-error,
.error-copy {
    color: var(--danger);
}

.forgot-password-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    z-index: 95;
}

.forgot-password-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.forgot-password-modal-card {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 40px));
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(12, 12, 12, 0.96);
    box-shadow: var(--shadow);
}

.forgot-password-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 10px;
}

.forgot-password-modal-kicker,
.forgot-password-modal-label {
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.forgot-password-modal-kicker {
    color: var(--accent);
}

.forgot-password-modal-title {
    font-family: "DM Serif Display", serif;
    font-size: clamp(32px, 6vw, 44px);
    line-height: 0.96;
}

.forgot-password-modal-copy {
    color: var(--muted);
    line-height: 1.6;
}

.forgot-password-modal-status {
    min-height: 24px;
    padding: 10px 12px;
    border: 1px solid transparent;
    color: var(--text);
    line-height: 1.5;
}

.forgot-password-modal-status[data-state="pending"] {
    border-color: rgba(var(--theme-accent-rgb, 212, 245, 122), 0.22);
    color: var(--warning);
}

.forgot-password-modal-status[data-state="success"] {
    border-color: rgba(122, 245, 200, 0.28);
    color: var(--success);
}

.forgot-password-modal-status[data-state="error"] {
    border-color: rgba(255, 141, 122, 0.34);
    color: var(--danger);
}

.forgot-password-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.notice-banner,
.spinner-overlay {
    position: fixed;
    z-index: 1200;
}

.notice-banner {
    top: 20px;
    right: 20px;
    max-width: 360px;
    padding: 14px 16px;
    border: 1px solid var(--accent);
    background: rgba(12, 12, 12, 0.96);
    box-shadow: var(--shadow);
}

.spinner-overlay {
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.spinner-overlay.is-visible {
    display: grid;
}

.spinner-card {
    min-width: 220px;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 18px 22px;
    border: 1px solid var(--accent);
    background: rgba(12, 12, 12, 0.95);
    box-shadow: var(--glow);
}

.spinner-loader {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(212, 245, 122, 0.18);
    border-top-color: var(--accent);
    border-right-color: var(--accent-soft);
    animation: app-manager-spin 0.85s linear infinite;
}

.spinner-label {
    font-family: "DM Mono", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
}

@keyframes app-manager-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.settings-view {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.apps-hub {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.apps-browser-panel,
.apps-create-panel,
.apps-section-block,
.apps-section-head,
.apps-stat-card,
.app-browser-card-shell,
.app-browser-button,
.app-browser-button-top,
.app-browser-meta,
.apps-create-note {
    display: grid;
    gap: 12px;
}

.apps-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 8px;
}

.apps-stat-card {
    padding: 14px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(212, 245, 122, 0.07), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
}

.apps-stat-card strong {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

.apps-client-list {
    margin-top: 0;
    overflow: visible;
}

.apps-empty-state {
    min-height: 280px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 24px;
    text-align: center;
}

.apps-section-head {
    margin-top: 8px;
}

.app-browser-button {
    grid-area: unset;
    padding: 18px;
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top right, rgba(122, 245, 200, 0.1), transparent 32%),
        rgba(255, 255, 255, 0.02);
    text-align: left;
    cursor: pointer;
}

.app-browser-button:hover {
    transform: none;
    transition: none;
}

.app-browser-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    position: absolute;
    right: 14px;
    bottom: 14px;
}

.app-browser-card-shell {
    position: relative;
    overflow: visible;
}

.app-browser-card-shell:hover,
.app-browser-card-shell:focus-within {
    z-index: 8;
}

.app-browser-card-shell.is-selected .app-browser-button {
    border-color: var(--accent);
    background:
        radial-gradient(circle at top right, rgba(122, 245, 200, 0.14), transparent 32%),
        rgba(212, 245, 122, 0.07);
}

.app-browser-button-top {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
}

.app-browser-button-top strong {
    font-size: 18px;
    line-height: 1.3;
}

.app-browser-meta {
    color: var(--muted);
}

.app-browser-cta {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid rgba(212, 245, 122, 0.35);
    color: var(--accent);
    font-family: "DM Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
}

.app-card-action {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    overflow: visible;
    will-change: transform;
    transition: border-color 140ms ease;
}

.app-card-action:hover {
    transform: none;
}

.app-card-action img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: invert(0);
    opacity: 0.86;
    pointer-events: none;
}

.app-card-action::after {
    content: attr(data-tooltip-label);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(12, 12, 12, 0.94);
    color: var(--text);
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease;
    z-index: 9999;
}

.app-card-action:hover::after,
.app-card-action:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.app-card-action-archive:hover,
.app-card-action-archive:focus-visible {
    border-color: rgba(122, 245, 200, 0.5);
}

.app-card-action-delete:hover,
.app-card-action-delete:focus-visible {
    border-color: rgba(255, 141, 122, 0.5);
}



.apps-create-panel {
    position: sticky;
    top: 28px;
}

.apps-create-note {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.app-item-editor-panel,
.app-item-editor-topbar,
.app-item-editor-head,
.app-item-form-grid,
.app-content-workspace,
.app-editor-screen,
.app-page-screen,
.app-editor-page-header,
.app-editor-page-copy,
.app-editor-page-actions,
.app-content-header,
.app-content-header-actions,
.content-page-banner,
.content-page-banner-buttons,
.app-page-header,
.app-page-header-copy,
.app-page-header-actions,
.app-page-mode-toggle,
.app-page-preview,
.app-page-preview-hero,
.app-page-preview-hero-copy,
.app-page-preview-meta,
.app-page-preview-sections,
.app-page-preview-sections-social,
.app-page-section,
.app-page-section-callout-head,
.app-items-browser,
.app-items-browser-topbar,
.app-items-browser-list,
.app-item-browser-copy {
    display: grid;
    gap: 12px;
}

.content-page-banner {
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.9), rgba(12, 12, 12, 0.86));
    border-color: rgba(255, 255, 255, 0.06);
    align-items: center;
}

.app-content-workspace {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(122, 245, 200, 0.04), transparent 24%),
        radial-gradient(circle at top right, rgba(212, 245, 122, 0.04), transparent 26%),
        linear-gradient(180deg, rgba(8, 8, 8, 0.98), rgba(10, 10, 10, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 20px 48px rgba(0, 0, 0, 0.26);
}

.app-content-workspace > .settings-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(122, 245, 200, 0.07), transparent 30%),
        radial-gradient(circle at top right, rgba(212, 245, 122, 0.07), transparent 32%),
        linear-gradient(180deg, rgba(10, 10, 10, 0.97), rgba(14, 14, 14, 0.95));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 42px rgba(0, 0, 0, 0.24);
}

.app-content-workspace > .settings-card .panel {
    background: rgba(10, 10, 10, 0.72);
}

.content-page-banner-buttons {
    grid-auto-flow: column;
    justify-content: start;
    gap: 12px;
}

.app-page-editor-panel {
    display: grid;
    gap: 18px;
    max-height: 1000px;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-page-editor-panel .output-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: 14px;
    padding-bottom: 6px;
    background: linear-gradient(180deg, rgba(12, 12, 12, 0), rgba(12, 12, 12, 0.96) 28%);
}

.app-page-json-editor {
    min-height: 720px;
    font-family: "DM Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.app-page-preview {
    gap: 24px;
}

.app-page-preview-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
    gap: 20px;
    padding: 24px;
    border: 1px solid rgba(212, 245, 122, 0.18);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(212, 245, 122, 0.08), rgba(255, 255, 255, 0.02));
    align-items: start;
}

.app-page-preview-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.app-page-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-page-preview-media {
    min-height: 180px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 16px;
    color: var(--muted);
    text-align: center;
}

.app-page-preview-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-page-preview-media-file,
.app-page-preview-media-empty {
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-page-preview-sections {
    gap: 16px;
}

.app-page-preview-sections-social {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-page-section {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
    gap: 14px;
}

.app-page-section h3,
.app-page-preview h2 {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-weight: 400;
}

.app-page-preview-link {
    width: fit-content;
    text-decoration: none;
}

.app-page-section-type,
.app-page-icon-chip {
    display: inline-flex;
    width: fit-content;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-page-section-text.is-intro p {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text);
}

.app-page-section-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

.app-page-section-quote {
    border-left: 3px solid rgba(212, 245, 122, 0.55);
}

.app-page-section-quote p {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: 28px;
    line-height: 1.35;
}

.app-page-section-quote footer {
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-page-section-callout {
    background: linear-gradient(180deg, rgba(122, 245, 200, 0.08), rgba(255, 255, 255, 0.02));
}

.app-page-section-callout-head {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 12px;
}

.app-page-section-cta {
    align-content: start;
}

.app-content-header {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
}

.app-content-header-actions {
    justify-items: end;
}

.app-items-browser {
    margin-bottom: 12px;
    gap: 18px;
}

.app-items-dendrogram {
    width: 100%;
    height: 520px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

.app-items-browser-topbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
}

.app-items-browser-warning {
    color: var(--warning);
}

.app-items-tree-wrap,
.app-items-tree-list,
.app-item-tree-node,
.app-item-tree-copy,
.app-item-tree-children {
    display: grid;
    gap: 14px;
}

.app-items-tree-wrap {
    margin-top: 8px;
    gap: 18px;
}

.app-items-tree-list,
.app-items-tree-orphans {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-item-tree-children {
    margin-left: 12px;
    padding: 6px 0 0 18px;
    border-left: 1px solid rgba(212, 245, 122, 0.14);
    border-radius: 0;
    background: transparent;
}

.app-items-tree-orphans {
    margin-top: 18px;
}

.app-items-tree-section-head {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.app-item-tree-node {
    position: relative;
    padding-left: calc(var(--level, 0) * 18px);
}

.app-item-tree-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(212, 245, 122, 0.08), transparent 32%),
        rgba(24, 24, 24, 0.94);
    box-shadow: inset 0 1px 0 rgba(212, 245, 122, 0.12);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.app-item-tree-card::before,
.app-item-tree-card::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    opacity: 0;
    transition: opacity 160ms ease, background 160ms ease, box-shadow 160ms ease;
    pointer-events: none;
}

.app-item-tree-card::before {
    top: -7px;
}

.app-item-tree-card::after {
    bottom: -7px;
}

.app-item-tree-card-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.app-item-tree-card:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 245, 122, 0.28);
    box-shadow: inset 0 1px 0 rgba(212, 245, 122, 0.18), 0 12px 30px rgba(0, 0, 0, 0.2);
}

.app-item-tree-card.is-selected {
    border-color: rgba(212, 245, 122, 0.48);
    box-shadow: inset 0 1px 0 rgba(212, 245, 122, 0.28), 0 0 0 1px rgba(212, 245, 122, 0.08), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.app-item-tree-card.is-new {
    border-color: rgba(122, 245, 200, 0.64);
    box-shadow: inset 0 1px 0 rgba(122, 245, 200, 0.32), 0 0 0 1px rgba(122, 245, 200, 0.18), 0 0 28px rgba(122, 245, 200, 0.24);
    animation: app-item-tree-card-pulse 1.4s ease-out 1;
}

.app-item-tree-card.is-dragging {
    opacity: 0.56;
    transform: scale(0.99);
    border-color: rgba(212, 245, 122, 0.4);
}

.app-item-tree-card.is-drop-before::before,
.app-item-tree-card.is-drop-after::after {
    opacity: 1;
    background: rgba(212, 245, 122, 0.95);
    box-shadow: 0 0 0 1px rgba(212, 245, 122, 0.28), 0 0 24px rgba(212, 245, 122, 0.26);
}

@keyframes app-item-tree-card-pulse {
    0% {
        transform: translateY(0);
        box-shadow: inset 0 1px 0 rgba(122, 245, 200, 0.48), 0 0 0 0 rgba(122, 245, 200, 0.44);
    }

    35% {
        transform: translateY(-2px);
        box-shadow: inset 0 1px 0 rgba(122, 245, 200, 0.4), 0 0 0 8px rgba(122, 245, 200, 0.12), 0 0 34px rgba(122, 245, 200, 0.22);
    }

    100% {
        transform: translateY(0);
        box-shadow: inset 0 1px 0 rgba(122, 245, 200, 0.32), 0 0 0 1px rgba(122, 245, 200, 0.18), 0 0 28px rgba(122, 245, 200, 0.24);
    }
}

.app-item-tree-main {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    align-items: start;
}

.app-item-tree-drag-handle {
    width: 18px;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    grid-template-columns: repeat(2, 3px);
    justify-content: center;
    align-content: center;
    gap: 3px 4px;
    cursor: grab;
    flex-shrink: 0;
}

.app-item-tree-drag-handle span {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: rgba(212, 245, 122, 0.72);
}

body.app-tree-saving,
body.app-tree-saving * {
    cursor: progress !important;
}

body.app-tree-saving #app,
body.app-tree-saving #notice_banner,
body.app-tree-saving #video_preview_modal {
    pointer-events: none !important;
    user-select: none;
}

body.app-tree-dragging .app-item-tree-main {
    pointer-events: none;
}

body.app-tree-dragging .app-item-tree-drag-handle {
    cursor: grabbing;
}

.app-item-tree-main:hover,
.app-item-tree-main:focus-visible {
    background: transparent;
    box-shadow: none;
    transform: none;
}

.app-item-tree-main:focus-visible {
    outline: 2px solid rgba(212, 245, 122, 0.34);
    outline-offset: 8px;
    border-radius: 18px;
}

.app-item-tree-image-wrap {
    width: 88px;
    height: 88px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-item-tree-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-item-tree-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Mono", monospace;
    font-size: 20px;
    color: var(--accent);
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 245, 122, 0.26), transparent 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.app-item-tree-copy {
    min-width: 0;
    align-content: center;
    gap: 8px;
}

.app-item-tree-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.app-item-tree-title {
    font-family: "DM Serif Display", serif;
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.app-item-tree-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 245, 122, 0.08);
    border: 1px solid rgba(212, 245, 122, 0.14);
    color: var(--accent);
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Which tab of the show a top-level item is in. Episodes stay quiet; the other two stand out. */
.app-item-tree-section {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-item-tree-section.is-technique {
    color: #8fd3ff;
    border-color: rgba(143, 211, 255, 0.4);
}

.app-item-tree-section.is-qa {
    color: #ffc27a;
    border-color: rgba(255, 194, 122, 0.4);
}

.app-item-tree-path,
.app-item-tree-meta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.app-item-tree-path {
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.66);
}

.app-item-tree-actions {
    display: grid;
    gap: 10px;
    align-content: start;
    justify-items: end;
}

.app-item-tree-actions .button {
    min-width: 112px;
}

.app-item-editor-panel {
    margin-top: 0;
}

.app-editor-page-actions {
    justify-items: end;
    align-content: start;
}

.app-editor-page-copy {
    gap: 8px;
    max-width: 900px;
}

.app-editor-page-header {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.app-editor-page-app {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.app-editor-page-path {
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: 24px;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.02em;
}

.app-item-editor-topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.app-item-editor-head {
    gap: 6px;
}

.app-item-editor-head .panel-head {
    margin-bottom: 0;
}

.field-stack-checkbox {
    align-content: start;
}

.field-stack-checkbox input {
    width: auto;
    justify-self: start;
}

.app-item-image-preview {
    width: 150px;
    height: 150px;
    max-width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    object-fit: cover;
}

.icon-action-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.icon-action-button img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: invert(1);
}

.icon-action-danger {
    border-color: rgba(255, 141, 122, 0.35);
}

.icon-action-danger img {
    filter: invert(75%) sepia(27%) saturate(558%) hue-rotate(314deg) brightness(101%) contrast(101%);
}

.app-item-form-grid {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    align-items: end;
}

.app-item-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.app-item-add-flow {
    max-width: 340px;
}

.app-output-field {
    gap: 12px;
}

.app-output-field + .app-output-field {
    position: relative;
    margin-top: 18px;
    padding-top: 28px;
}

.app-output-field + .app-output-field::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(212, 245, 122, 0.82), rgba(122, 245, 200, 0.52), rgba(212, 245, 122, 0.18));
    box-shadow: 0 0 0 1px rgba(212, 245, 122, 0.08), 0 0 18px rgba(122, 245, 200, 0.14);
}

.app-outputs-block {
    display: grid;
    gap: 12px;
}

.app-outputs-block-with-divider {
    position: relative;
    margin-top: 18px;
    padding-top: 28px;
}

.app-outputs-block-with-divider::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(212, 245, 122, 0.82), rgba(122, 245, 200, 0.52), rgba(212, 245, 122, 0.18));
    box-shadow: 0 0 0 1px rgba(212, 245, 122, 0.08), 0 0 18px rgba(122, 245, 200, 0.14);
}

.app-outputs-block.is-generating {
    pointer-events: none;
    opacity: 0.5;
    user-select: none;
}

.app-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-output-toggle {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.app-output-toggle .button {
    min-width: 88px;
}

.app-output-toggle .button.is-active {
    border-color: rgba(122, 245, 200, 0.4);
    background: rgba(122, 245, 200, 0.12);
    color: var(--text);
}

.app-output-preview {
    min-height: 220px;
}

.app-output-preview-rich {
    line-height: 1.7;
}

.ui-editor-stack,
.ui-editor-list,
.ui-editor-grid,
.ui-editor-subsection {
    display: grid;
    gap: 12px;
}

.ui-editor-section,
.ui-editor-card {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
}

.ui-editor-card-nested {
    background: rgba(255, 255, 255, 0.015);
}

.ui-editor-card-head,
.ui-editor-subhead,
.ui-editor-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ui-editor-card-head,
.ui-editor-subhead {
    align-items: flex-start;
}

.ui-editor-card-head h4,
.ui-editor-card-head h5,
.ui-editor-subhead h3,
.ui-editor-subhead h5,
.ui-editor-subhead h6 {
    margin: 0;
}

.ui-editor-card-actions {
    margin-top: 0;
    margin-left: auto;
    justify-content: flex-end;
}

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

.ui-editor-grid .field-stack,
.ui-editor-section,
.ui-editor-card {
    align-content: start;
}

.ui-editor-inline-row {
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.ui-editor-inline-row input[type="text"] {
    flex: 1;
    min-width: 180px;
}

.ui-editor-empty {
    color: var(--muted);
    font-size: 14px;
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.study-space-editor,
.study-space-editor-card-list,
.study-space-editor-grid,
.study-space-editor-quick-check,
.study-space-editor-option-list {
    display: grid;
    gap: 12px;
}

.app-output-editor-surface,
.app-output-textarea,
.app-transcript-textarea {
    height: 220px;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
}

.app-output-editor-surface.is-populated,
.app-output-textarea.is-populated,
.app-transcript-textarea.is-populated {
    height: 220px;
    max-height: 220px;
}

.study-space-editor {
    gap: 16px;
}

.study-space-editor-section,
.study-space-editor-card {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
}

.study-space-editor-section {
    gap: 14px;
}

.study-space-editor-section-head,
.study-space-editor-card-head,
.study-space-editor-subhead,
.study-space-editor-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.study-space-editor-card-head,
.study-space-editor-subhead {
    align-items: flex-start;
}

.study-space-editor-section-head h3,
.study-space-editor-card-head h4,
.study-space-editor-subhead h5 {
    margin: 0;
}

.study-space-editor-section-kicker,
.study-space-editor-card-kicker {
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.study-space-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.study-space-editor-grid .field-stack {
    align-content: start;
}

.study-space-editor-grid textarea,
.study-space-editor-quick-check textarea,
.ui-editor-grid textarea {
    min-height: 90px;
}

.study-space-editor-option-row {
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.study-space-editor-option-row input[type="text"] {
    flex: 1;
    min-width: 180px;
}

.study-space-editor-option-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.study-space-editor-empty {
    color: var(--muted);
    font-size: 14px;
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.preview-empty-copy {
    color: var(--muted);
    font-size: 14px;
}

.learning-map-preview-frame,
.fundamentals-preview-frame,
.slides-preview-frame,
.summary-preview-frame,
.techniques-preview-frame,
.about-page-preview-frame {
    width: 100%;
    min-height: 560px;
    border: 1px solid var(--border);
    background: #0c0c0c;
}

.inline-note {
    color: var(--muted);
    font-size: 13px;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

@media (max-width: 1180px) {
    .marketing-nav,
    .marketing-cta-band {
        align-items: start;
        flex-direction: column;
    }

    .study-space-editor-grid {
        grid-template-columns: 1fr;
    }

    .ui-editor-grid {
        grid-template-columns: 1fr;
    }

    .study-space-editor-section-head,
    .study-space-editor-card-head,
    .study-space-editor-subhead,
    .ui-editor-card-head,
    .ui-editor-subhead,
    .ui-editor-inline-row,
    .study-space-editor-option-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .marketing-hero,
    .marketing-card-grid,
    .marketing-section-split .marketing-feature-list {
        grid-template-columns: 1fr;
    }

    .marketing-hero {
        min-height: 0;
        padding: 32px;
    }

    .marketing-hero-copy h1 {
        max-width: 12ch;
    }

    .content-layout,
    .auth-card,
    .app-shell,
    .apps-hub,
    .app-item-form-grid {
        grid-template-columns: 1fr;
    }

    .apps-create-panel {
        position: static;
    }

    .sidebar {
        position: relative;
        left: auto;
        bottom: auto;
        width: auto;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-footer {
        position: static;
        margin-top: 24px;
    }

    .main-shell {
        grid-column: auto;
        padding: 20px;
    }

    .app-output-header {
        align-items: start;
        flex-direction: column;
    }

    .app-content-header,
    .content-page-banner-buttons,
    .app-items-browser-topbar,
    .app-editor-page-header,
    .app-item-tree-card,
    .app-item-tree-card-main,
    .app-item-tree-main,
    .app-page-preview-hero,
    .app-page-preview-sections-social {
        grid-template-columns: 1fr;
    }

    .app-item-tree-drag-handle {
        width: 100%;
        min-height: 18px;
        grid-template-columns: repeat(6, 3px);
        justify-content: center;
    }

    .app-content-header-actions {
        justify-items: start;
    }

    .content-page-banner-buttons {
        grid-auto-flow: row;
    }

    .app-item-tree-actions {
        justify-items: start;
    }

    .app-item-tree-actions .button {
        min-width: 0;
        width: 100%;
    }

    .app-item-tree-image-wrap {
        width: 100px;
        height: 100px;
    }

    .auth-brand-block {
        padding-bottom: 20px;
    }
}

@media (max-width: 720px) {
    .marketing-main {
        padding: 0 16px 28px;
    }

    .marketing-nav,
    .marketing-section,
    .marketing-cta-band,
    .auth-shell-standalone {
        padding: 18px;
    }

    .marketing-nav-links,
    .marketing-nav-actions,
    .marketing-hero-actions,
    .marketing-hero-meta {
        width: 100%;
    }

    .marketing-nav-actions .button,
    .marketing-hero-actions .button {
        width: 100%;
    }

    .marketing-hero {
        padding: 22px;
    }

    .marketing-brand strong {
        font-size: 20px;
    }

    .topbar {
        align-items: start;
        flex-direction: column;
    }

    .app-add-item-button,
    .app-resort-items-button,
    .app-scroll-toggle-button {
        right: 16px;
    }

    .app-resort-items-button {
        top: 16px;
    }

    .app-scroll-toggle-button {
        top: 58px;
    }

    .video-preview-modal {
        padding: 16px;
    }

    .video-preview-dialog {
        width: min(100vw - 32px, 560px);
        padding: 16px;
    }

    .member-email-modal {
        padding: 16px;
    }

    .member-email-dialog {
        width: min(100vw - 32px, 720px);
        padding: 16px;
    }

    .member-email-recipient-row {
        grid-template-columns: 1fr;
    }

    .video-preview-head {
        align-items: start;
        flex-direction: column;
    }

    .composer-grid,
    .detail-meta-grid,
    .settings-grid,
    .preview-grid,
    .apps-stats-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid-account,
    .settings-grid-app {
        column-count: 1;
    }

    .topbar-title h2 {
        font-size: 34px;
    }

    .detail-header h2 {
        font-size: 28px;
    }

    .members-head,
    .member-row {
        grid-template-columns: 1fr;
    }

    .members-toolbar,
    .members-status-bar,
    .members-pagination,
    .member-status-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .member-status-actions {
        width: 100%;
    }

    .members-toolbar-actions {
        margin-top: 0;
    }
}

.summary-infographic-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.summary-infographic-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-infographic-preview {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border, #2a2a2a);
}

/* "See steps" editor on technique videos. */
.technique-steps-block {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.technique-steps-editor {
    display: grid;
    gap: 12px;
}

.technique-step-editor {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.technique-step-editor > div {
    display: grid;
    gap: 8px;
}

.technique-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #0c0c0c;
    font-weight: 700;
}

/* The mechanism (an episode's diagram) */
.mechanism-block .action-row {
    margin: 10px 0;
}

.mechanism-editor > .field-label {
    margin-top: 6px;
}

.mechanism-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    font-size: 14px;
    line-height: 1.45;
}
