:root {
    --ink: #193543;
    --muted: #647780;
    --paper: #f7fcfd;
    --surface: #ffffff;
    --line: #d1e3e8;
    --green: #167b73;
    --green-dark: #125f59;
    --green-soft: #dceff5;
    --yellow: #ffcf62;
    --coral: #ff8b72;
    --blue: #5ec9db;
    --lime: #c4ed67;
    --shadow: 0 18px 60px rgb(25 53 67 / 9%);
    --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
    --font-display: ui-rounded, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(circle at 8% 2%, rgb(94 201 219 / 22%), transparent 28rem),
        radial-gradient(circle at 96% 14%, rgb(196 237 103 / 17%), transparent 24rem),
        radial-gradient(circle at 72% 96%, rgb(255 207 98 / 14%), transparent 28rem),
        var(--paper);
}

button,
textarea,
input {
    font: inherit;
}

button,
a,
label {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.app-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px max(24px, calc((100vw - 1240px) / 2));
    border-bottom: 1px solid rgb(25 53 67 / 10%);
    background: rgb(247 252 253 / 88%);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 12px 12px 12px 4px;
    object-fit: contain;
}

.prototype-badge,
.live-status {
    padding: 7px 10px;
    border-radius: 99px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.72rem;
    font-weight: 750;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--coral);
}

.header-action,
.text-link {
    color: var(--green-dark);
    font-size: 0.88rem;
    font-weight: 700;
}

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

.help-link {
    display: inline-grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgb(255 255 255 / 72%);
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.help-link:hover,
.help-link:focus-visible {
    border-color: var(--green);
    background: var(--green-soft);
    outline: none;
}

.mobile-label {
    display: none;
}

.page-context {
    display: grid;
    max-width: min(52vw, 560px);
    justify-items: center;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgb(255 253 249 / 72%);
}

.page-context span {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.78rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-context small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.64rem;
}

.capture-context {
    border-color: #bdd8cc;
    background: var(--green-soft);
}

.organizer-context {
    border-color: #e6c879;
    background: #fbf0cf;
}

.review-context {
    border-color: #b9d0d7;
    background: #e6f0f3;
}

.public-context {
    border-color: #e8bcaf;
    background: #f9e8e3;
}

.help-context {
    border-color: #b9d9df;
    background: #e8f6f8;
}

.help-shell {
    width: min(100% - 40px, 980px);
    margin: 0 auto;
    padding: 72px 0 110px;
}

.help-intro {
    max-width: 760px;
}

.help-intro h1 {
    margin: 14px 0 24px;
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 5vw, 3.9rem);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.help-intro > p:last-child {
    max-width: 720px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.9;
}

.help-index {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 42px 0 54px;
}

.help-index a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgb(255 255 255 / 74%);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.help-index span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.68rem;
}

.help-sections {
    display: grid;
    gap: 18px;
}

.help-card {
    scroll-margin-top: 96px;
    padding: clamp(26px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgb(255 255 255 / 90%);
    box-shadow: 0 14px 42px rgb(25 53 67 / 5%);
}

.help-card h2 {
    margin: 8px 0 24px;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.25;
}

.help-card ol,
.help-card ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 1.4em;
    color: var(--muted);
    line-height: 1.75;
}

.help-note {
    margin: 26px 0 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.86rem;
    line-height: 1.7;
}

.help-definitions {
    display: grid;
    gap: 0;
    margin: 0;
}

.help-definitions > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.help-definitions dt {
    font-weight: 750;
}

.help-definitions dd {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.help-safety {
    border-color: #e8cf8d;
    background: #fffaf0;
}

.help-safety .text-link {
    display: inline-block;
    margin-top: 26px;
}

.demo-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 24px 0;
    padding: 16px 20px;
    border: 1px solid #e6c879;
    border-radius: 16px;
    background: #fff5d9;
}

.demo-notice div {
    display: grid;
    gap: 3px;
}

.demo-notice strong {
    font-size: 0.9rem;
}

.demo-notice span {
    color: var(--muted);
    font-size: 0.78rem;
}

.demo-notice a,
.flow-edit-link {
    color: var(--green-dark);
    font-size: 0.8rem;
    font-weight: 750;
}

.sample-only-label {
    color: var(--muted);
    font-size: 0.7rem;
}

.app-shell,
.recap-shell {
    width: min(100% - 40px, 1240px);
    margin-inline: auto;
}

.auth-shell,
.policy-shell {
    width: min(100% - 32px, 760px);
    margin: 44px auto 72px;
}

.auth-card,
.policy-card {
    padding: clamp(26px, 5vw, 52px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgb(255 255 255 / 92%);
    box-shadow: var(--shadow);
}

.auth-card h1,
.policy-card h1 {
    max-width: 680px;
    font-size: clamp(1.75rem, 4.5vw, 2.8rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.auth-card .eyebrow,
.policy-card .eyebrow {
    margin-bottom: 8px;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
}

.auth-lead,
.policy-card > p,
.policy-card li {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.auth-card .prototype-form,
.policy-card form {
    margin-top: 32px;
}

.development-code {
    display: grid;
    gap: 18px;
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--yellow);
    border-radius: 20px;
    background: #fff7df;
    text-align: center;
}

.development-code strong,
.code-input {
    font-size: clamp(2rem, 9vw, 3.4rem);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--green-soft);
    line-height: 1.6;
}

.agreement-check input {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.account-shell {
    width: min(100% - 32px, 1080px);
    margin: 52px auto 90px;
}

.account-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 32px;
}

.account-heading h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.account-heading > div > p:last-child,
.account-workshop-copy > p,
.account-empty > p {
    color: var(--muted);
}

.account-heading .primary-button,
.account-empty .primary-button {
    width: auto;
    text-decoration: none;
}

.account-list {
    display: grid;
    gap: 16px;
}

.account-workshop-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.account-delete-link {
    color: #a34d40;
    font-size: 0.72rem;
    font-weight: 700;
}

.trash-panel {
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgb(255 255 255 / 70%);
}

.trash-panel summary {
    cursor: pointer;
    font-weight: 750;
}

.trash-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.trash-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.trash-list article > div {
    display: grid;
    gap: 4px;
}

.trash-list small {
    color: var(--muted);
}

.trash-list .secondary-button {
    width: auto;
}

.deletion-explanation {
    margin: 28px 0;
    padding: 20px;
    border: 1px solid #edc1b8;
    border-radius: 18px;
    background: #fff2ef;
}

.deletion-explanation ul {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.8;
}

.deletion-card .danger-button {
    width: 100%;
    margin-bottom: 12px;
}

.account-workshop-date {
    display: grid;
    justify-items: center;
    padding: 14px 8px;
    border-radius: 18px;
    background: var(--green-soft);
}

.account-workshop-date strong {
    color: var(--green-dark);
    font-size: 1.35rem;
}

.account-workshop-date span,
.account-status,
.account-workshop-counts {
    color: var(--muted);
    font-size: 0.7rem;
}

.account-workshop-copy h2 {
    margin-top: 5px;
}

.account-workshop-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.account-workshop-card .secondary-button {
    width: auto;
    text-decoration: none;
}

.account-empty {
    padding: clamp(28px, 7vw, 72px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow);
}

.account-admin-nav {
    margin-bottom: 24px;
}

.account-admin-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border: 1px solid #b8d5c9;
    border-radius: 16px;
    background: var(--green-soft);
    color: var(--green-dark);
    text-decoration: none;
}

.account-admin-nav span {
    color: var(--muted);
    font-size: 0.75rem;
}

.users-shell {
    width: min(100% - 32px, 980px);
    margin: 52px auto 90px;
}

.users-heading {
    margin-bottom: 28px;
}

.users-heading h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.users-heading > p:last-child {
    color: var(--muted);
}

.invite-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.invite-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 14px;
    align-items: end;
}

.invite-form label {
    display: grid;
    gap: 7px;
}

.invite-form label > span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.invite-form input,
.invite-form select {
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
}

.invite-form .primary-button {
    min-height: 48px;
    white-space: nowrap;
}

.local-mail-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.6;
}

.user-list-section {
    margin-top: 38px;
}

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

.user-list article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto 150px;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.user-list article > div:nth-child(2) {
    display: grid;
    gap: 2px;
}

.user-list small,
.user-list article > span:not(.user-status) {
    color: var(--muted);
    font-size: 0.7rem;
}

.user-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-weight: 800;
    place-items: center;
}

.user-status {
    padding: 6px 9px;
    border-radius: 99px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.68rem;
    font-weight: 750;
}

.status-invited {
    background: #fff1cb;
    color: #7d5b0c;
}

.status-suspended {
    background: #f7dfda;
    color: #98493c;
}

@media (max-width: 700px) {
    .account-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .account-workshop-card {
        grid-template-columns: 64px 1fr;
        gap: 16px;
        padding: 18px;
    }

    .account-workshop-card .secondary-button {
        grid-column: 1 / -1;
    }

    .account-delete-link {
        grid-column: 1 / -1;
    }

    .account-admin-nav a,
    .trash-list article {
        align-items: flex-start;
        flex-direction: column;
    }

    .invite-form {
        grid-template-columns: 1fr;
    }

    .user-list article {
        grid-template-columns: 44px 1fr auto;
    }

    .user-list article > span:not(.user-status),
    .user-list article > small {
        grid-column: 2 / -1;
    }
}

.session-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 48px;
    padding: 64px 0 40px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.session-meta {
    min-width: min(100%, 330px);
    margin: 0;
}

.session-meta div {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.session-meta dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.session-meta dd {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 650;
}

.recording-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.capture-panel,
.program-panel,
.reflection-card {
    border: 1px solid rgb(32 50 44 / 12%);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.capture-panel {
    padding: clamp(24px, 4vw, 42px);
}

.program-panel {
    position: sticky;
    top: 94px;
    padding: 28px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading.compact {
    margin-bottom: 20px;
}

.current-program {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 18px;
    background: var(--green-soft);
}

.current-program strong {
    display: block;
    margin-top: 3px;
    font-size: 0.94rem;
}

.current-time {
    color: var(--green-dark);
    font-size: 1.35rem;
    font-weight: 800;
}

.field-label {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.field-label em {
    font-style: normal;
    font-weight: 500;
}

.text-button,
.icon-button {
    border: 0;
    background: transparent;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 750;
}

.media-drop {
    display: grid;
    min-height: 190px;
    padding: 28px;
    border: 1.5px dashed #a8b9b1;
    border-radius: 20px;
    background: #fbfaf6;
    cursor: pointer;
    text-align: center;
    place-content: center;
}

.media-drop:hover {
    border-color: var(--green);
    background: #f6faf7;
}

.media-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.media-drop > span:last-of-type {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

.camera-icon {
    position: relative;
    display: block;
    width: 48px;
    height: 36px;
    margin: 0 auto 16px;
    border: 2px solid var(--green);
    border-radius: 10px;
}

.camera-icon::before {
    position: absolute;
    inset: 8px 14px;
    border: 2px solid var(--green);
    border-radius: 50%;
    content: "";
}

.camera-icon::after {
    position: absolute;
    top: -7px;
    left: 9px;
    width: 16px;
    height: 7px;
    border-radius: 4px 4px 0 0;
    background: var(--green);
    content: "";
}

.field-group {
    display: block;
    margin-top: 26px;
}

.field-group > .field-label {
    margin-bottom: 11px;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tag-option span,
.mini-tags span {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: white;
    color: #53605b;
    font-size: 0.79rem;
}

.tag-option span {
    padding: 8px 10px;
    cursor: pointer;
}

.tag-option input:checked + span {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

textarea {
    width: 100%;
    padding: 15px 16px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: white;
    color: var(--ink);
    line-height: 1.6;
}

textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgb(31 122 87 / 10%);
}

.capture-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
}

.keep-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 750;
    text-decoration: none;
}

.primary-button {
    border: 1px solid var(--green);
    background: var(--green);
    color: white;
}

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

.secondary-button {
    width: 100%;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
}

.moment-count {
    color: var(--muted);
    font-size: 0.72rem;
}

.moment-count strong {
    color: var(--ink);
    font-size: 1.15rem;
}

.story-progress {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 16px;
    background: #f5f3ed;
}

.progress-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.progress-copy span,
.story-progress p {
    color: var(--muted);
    font-size: 0.75rem;
}

.progress-copy strong {
    font-size: 1rem;
}

.progress-copy b {
    color: var(--green);
    font-size: 1.35rem;
}

.progress-track {
    position: relative;
    height: 7px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 99px;
    background: #dfe3df;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transition: width 240ms ease;
}

.progress-track i {
    position: absolute;
    z-index: 2;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgb(32 50 44 / 34%);
}

.progress-scale {
    position: relative;
    height: 15px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.56rem;
}

.progress-scale span {
    position: absolute;
    transform: translateX(-50%);
}

.progress-scale .recommended-mark {
    color: var(--green-dark);
    font-weight: 800;
}

.progress-scale .scale-end {
    right: 0;
    transform: none;
}

.story-progress p {
    margin: 9px 0 0;
}

.program-list {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.program-list li {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 13px 0 13px 16px;
    border-left: 1px solid var(--line);
    color: var(--muted);
}

.program-list li::before {
    position: absolute;
    top: 19px;
    left: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    content: "";
}

.program-list time {
    font-size: 0.76rem;
    font-weight: 750;
}

.program-list li > span {
    font-size: 0.84rem;
    font-weight: 650;
}

.program-list .done {
    opacity: 0.58;
}

.program-list .current {
    border-left: 2px solid var(--green);
    color: var(--ink);
}

.program-list .current::before {
    left: -5px;
    width: 8px;
    height: 8px;
    background: var(--green);
}

.program-list small {
    grid-column: 2;
    color: var(--green);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.program-signals {
    display: flex;
    grid-column: 2;
    gap: 7px;
    align-items: center;
    margin-top: 2px;
}

.photo-signal,
.memo-label,
.skipped-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border-radius: 99px;
    background: #eceeea;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.photo-signal.complete {
    background: var(--green-soft);
    color: var(--green-dark);
}

.memo-signal {
    color: var(--yellow);
    font-size: 0.65rem;
}

.recent-moments {
    padding: 72px 0;
}

.moment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.moment-card {
    overflow: hidden;
    border: 1px solid rgb(32 50 44 / 10%);
    border-radius: 20px;
    background: var(--surface);
}

.moment-placeholder,
.story-image {
    position: relative;
    display: grid;
    min-height: 180px;
    place-items: center;
}

.moment-photo {
    position: relative;
    min-height: 180px;
    background: #e6ebe8;
}

.moment-photo img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.moment-photo > span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 8px;
    border-radius: 99px;
    background: rgb(255 255 255 / 88%);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 750;
}

.empty-records {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px;
    border: 1px dashed #a8b9b1;
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.staff-guidance {
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.76rem;
    line-height: 1.6;
}

.moment-placeholder::after,
.story-image::after {
    width: 42%;
    aspect-ratio: 1.35;
    border: 2px solid rgb(255 255 255 / 65%);
    border-radius: 50% 46% 54% 44%;
    content: "";
    transform: rotate(-8deg);
}

.tone-1 {
    background: #4f8576;
}

.tone-2 {
    background: #d9a847;
}

.tone-3 {
    background: #7699a6;
}

.tone-4 {
    background: #bd705e;
}

.moment-placeholder > span,
.story-image > span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 8px;
    border-radius: 99px;
    background: rgb(255 255 255 / 88%);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 750;
}

.moment-body {
    min-height: 130px;
    padding: 18px;
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tags span {
    padding: 5px 8px;
}

.moment-body p {
    margin: 14px 0 0;
    color: #48534f;
    font-size: 0.88rem;
    line-height: 1.65;
}

.program-dialog {
    width: min(560px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 28px 90px rgb(20 35 29 / 28%);
}

.program-dialog::backdrop {
    background: rgb(21 30 27 / 56%);
    backdrop-filter: blur(5px);
}

.program-dialog form {
    padding: 28px;
}

.dialog-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.icon-button {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
}

.program-choice-list {
    display: grid;
    gap: 6px;
}

.program-choice-list button {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    background: #f5f3ed;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.program-choice-list button:hover {
    background: var(--green-soft);
}

.program-choice-list time {
    color: var(--green-dark);
    font-weight: 750;
}

.toast {
    position: fixed;
    z-index: 30;
    right: 20px;
    bottom: 20px;
    padding: 13px 18px;
    border-radius: 12px;
    background: var(--ink);
    color: white;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: 180ms ease;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Recap */

.recap-shell {
    width: min(100% - 40px, 1060px);
}

.recap-hero {
    padding: 92px 0 64px;
}

.recap-hero h1 {
    max-width: 880px;
    font-size: clamp(3rem, 9vw, 7.2rem);
}

.recap-lead {
    margin: 30px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.recap-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 32px;
}

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

.recap-stats strong {
    margin-right: 4px;
    color: var(--ink);
    font-size: 1.4rem;
}

.filter-bar {
    position: sticky;
    z-index: 10;
    top: 72px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    background: var(--paper);
    scrollbar-width: none;
}

.filter-bar button {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.filter-bar .active {
    border-color: var(--ink);
    background: var(--ink);
    color: white;
}

.story-timeline {
    padding: 42px 0;
}

.story-chapter {
    display: grid;
    grid-template-columns: 72px 1fr;
}

.chapter-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--green-dark);
    font-size: 0.72rem;
    font-weight: 750;
}

.chapter-marker span {
    flex: 1;
    width: 1px;
    min-height: 60px;
    margin-top: 12px;
    background: var(--line);
}

.chapter-content {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.4fr);
    gap: 36px;
    padding: 0 0 72px 20px;
}

.chapter-copy {
    padding-top: 3px;
}

.chapter-number {
    margin: 0 0 24px;
    color: var(--yellow);
    font-size: 2.2rem;
    font-weight: 850;
}

.chapter-copy > p:not(.chapter-number) {
    color: var(--muted);
    line-height: 1.8;
}

.chapter-copy .mini-tags {
    margin-top: 22px;
}

.chapter-gallery {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 12px;
}

.story-image {
    min-height: 310px;
    border-radius: 22px;
}

.story-image:nth-child(2) {
    min-height: 220px;
    margin-top: 64px;
}

.reflection-card {
    margin: 12px 0 32px;
    padding: clamp(28px, 6vw, 64px);
}

.reflection-card h2 {
    max-width: 720px;
    font-size: clamp(2rem, 5vw, 4rem);
}

.reflection-card p:not(.eyebrow) {
    max-width: 700px;
    color: var(--muted);
    line-height: 1.9;
}

.reflection-card .secondary-button {
    width: auto;
    margin-top: 14px;
}

.prototype-note {
    padding: 32px 0 64px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

/* Organizer */

.manage-shell {
    width: min(100% - 40px, 1240px);
    margin-inline: auto;
}

.expiry-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 18px 22px;
    border: 1px solid rgb(32 50 44 / 10%);
    border-radius: 18px;
    background: var(--surface);
}

.expiry-banner .eyebrow {
    margin-bottom: 3px;
}

.expiry-banner > div:first-child > strong {
    font-size: 1.05rem;
}

.countdown {
    text-align: right;
}

.countdown span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
}

.countdown strong {
    display: block;
    margin-top: 3px;
    color: var(--green-dark);
    font-size: 1.05rem;
}

.public-expiry .countdown strong {
    color: #9c4c3d;
}

.manage-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 42px;
    align-items: center;
    padding: 44px 0 34px;
}

.capture-summary {
    width: min(100%, 300px);
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgb(255 253 249 / 58%);
}

.capture-summary-copy {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.capture-summary-copy > span {
    color: var(--muted);
    font-size: 0.72rem;
}

.capture-summary-copy strong {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 1.45rem;
}

.capture-summary-copy small {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 600;
}

.capture-summary-track {
    position: relative;
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: #dfe5e1;
}

.capture-summary-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.capture-summary-track i {
    position: absolute;
    z-index: 2;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgb(32 50 44 / 34%);
}

.capture-scale {
    position: relative;
    height: 16px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.58rem;
}

.capture-scale span {
    position: absolute;
    transform: translateX(-50%);
}

.capture-scale .recommended-mark {
    color: var(--green-dark);
    font-weight: 800;
}

.capture-scale .scale-end {
    right: 0;
    transform: none;
}

.capture-summary p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.5;
}

.manage-heading h1 {
    max-width: 760px;
    font-size: clamp(2rem, 4vw, 3.7rem);
}

.manage-heading .workshop-status {
    max-width: 680px;
    margin: 14px 0 4px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.7;
}

.manage-heading > div:first-child > p:last-child {
    color: var(--muted);
    line-height: 1.75;
}

.completion-ring {
    display: grid;
    width: 156px;
    height: 156px;
    border-radius: 50%;
    background: conic-gradient(var(--green) var(--progress), #dfe3de 0);
    place-items: center;
}

.completion-ring::before {
    position: absolute;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: var(--paper);
    content: "";
}

.completion-ring div {
    position: relative;
    display: flex;
    align-items: baseline;
}

.completion-ring strong {
    font-size: 2.6rem;
}

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

.manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.manage-card {
    padding: 28px;
    border: 1px solid rgb(32 50 44 / 12%);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.manage-flow-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.manage-flow-list li {
    display: grid;
    grid-template-columns: 52px 18px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.manage-flow-list li:last-child {
    border-bottom: 0;
}

.manage-flow-list time {
    padding-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.flow-state {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border: 2px solid var(--line);
    border-radius: 50%;
}

.complete .flow-state {
    border-color: var(--green);
    background: var(--green);
    box-shadow: inset 0 0 0 2px white;
}

.partial .flow-state {
    border-color: var(--yellow);
    background: var(--yellow);
}

.skipped .flow-state {
    position: relative;
}

.skipped .flow-state::after {
    position: absolute;
    top: 3px;
    left: -2px;
    width: 10px;
    height: 2px;
    background: var(--muted);
    content: "";
    transform: rotate(-45deg);
}

.manage-flow-list li > div > strong {
    display: block;
    font-size: 0.9rem;
}

.flow-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.memo-label {
    color: #87651c;
}

.skipped-label {
    background: transparent;
    text-decoration: line-through;
}

.manage-flow-list button {
    border: 0;
    background: transparent;
    color: var(--green-dark);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 750;
}

.share-stack {
    display: grid;
    gap: 22px;
}

.share-card-heading {
    display: flex;
    gap: 13px;
    align-items: center;
}

.share-card-heading .eyebrow {
    margin-bottom: 2px;
}

.share-card-heading h2 {
    font-size: 1.3rem;
}

.share-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 1.3rem;
    font-weight: 750;
    place-items: center;
}

.share-icon.warm {
    background: #f8e9c2;
    color: #805d10;
}

.share-card > p {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.65;
}

.capture-access-panel {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #b8d5c9;
    border-radius: 16px;
    background: var(--green-soft);
}

.capture-access-panel.closed {
    border-color: var(--line);
    background: #f2f2ee;
}

.capture-access-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.6;
}

.capture-access-panel .text-button {
    justify-self: start;
    padding: 0;
}

.qr-row {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 18px;
    align-items: center;
    margin-top: 20px;
}

.qr-row img {
    width: 128px;
    height: 128px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    image-rendering: pixelated;
}

.qr-code {
    display: grid;
    width: 144px;
    height: 144px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    place-items: center;
}

.qr-code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.live-qr {
    grid-template-columns: 144px 1fr;
    margin-top: 4px;
}

.live-qr > div:last-child > span {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.organizer-review {
    margin-top: 28px;
}

.organizer-review .section-heading > span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.review-guidance {
    margin: 6px 0 22px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.7;
}

.organizer-moment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.organizer-moment {
    overflow: hidden;
    scroll-margin-top: 96px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.organizer-moment > img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.organizer-moment-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.organizer-moment-body > div:first-child {
    display: flex;
    gap: 8px;
    align-items: baseline;
    color: var(--muted);
    font-size: 0.72rem;
}

.organizer-moment-body > div:first-child time {
    color: var(--ink);
    font-weight: 750;
}

.organizer-moment-body > p {
    min-height: 2.8em;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.visibility-form label {
    display: grid;
    gap: 6px;
}

.visibility-form label > span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.visibility-form select {
    width: 100%;
    padding: 9px 32px 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8faf8;
    color: var(--ink);
    font: inherit;
    font-size: 0.76rem;
}

.delete-moment-form {
    margin-top: 12px;
    text-align: right;
}

.delete-moment-form .danger-text-button {
    font-size: 0.72rem;
}

.viewer-selection-count {
    margin: 16px 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.viewer-selection-count strong {
    color: var(--ink);
}

.staff-view-link {
    width: 100%;
    margin-top: 14px;
}

.publication-status {
    display: grid;
    grid-template-columns: 9px auto;
    gap: 2px 9px;
    align-items: center;
    margin-top: 16px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f5f5f1;
}

.publication-status > span {
    grid-row: 1 / 3;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa39f;
}

.publication-status strong {
    font-size: 0.78rem;
}

.publication-status small {
    color: var(--muted);
    font-size: 0.66rem;
}

.publication-status.active {
    border-color: #abd2bf;
    background: var(--green-soft);
}

.publication-status.active > span {
    background: var(--green);
    box-shadow: 0 0 0 4px rgb(32 132 92 / 12%);
}

.share-actions form {
    flex: 0 0 auto;
}

.qr-row > div {
    display: grid;
    justify-items: start;
    gap: 9px;
}

.access-state {
    padding: 6px 9px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 750;
}

.access-state.active {
    background: var(--green-soft);
    color: var(--green-dark);
}

.compact-countdown {
    text-align: left;
}

.compact-countdown strong {
    color: #9c4c3d;
}

.danger-text-button {
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a14e40;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 750;
}

.share-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.share-actions .secondary-button {
    width: auto;
    flex: 1;
}

.share-actions .danger-text-button {
    flex: 0 0 auto;
    margin-top: 0;
}

/* Public story */

.public-story-shell {
    width: min(100% - 40px, 1040px);
    margin-inline: auto;
}

.public-story-hero {
    padding: 84px 0 64px;
}

.public-story-hero h1 {
    max-width: 930px;
    font-size: clamp(3rem, 8vw, 7rem);
}

.public-story-hero > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.8;
}

.celebration-note {
    display: flex;
    gap: 16px;
    align-items: center;
    max-width: 560px;
    margin-top: 38px;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--green-soft);
}

.celebration-note > span {
    color: var(--green);
    font-size: 2rem;
}

.celebration-note p {
    margin: 0;
    color: #51615a;
    font-size: 0.85rem;
    line-height: 1.6;
}

.celebration-note strong {
    color: var(--ink);
    font-size: 1rem;
}

.public-chapters {
    display: grid;
    gap: 34px;
    padding: 28px 0 100px;
}

.public-chapters article {
    display: grid;
    grid-template-columns: minmax(300px, 1.15fr) minmax(280px, 0.85fr);
    gap: 48px;
    align-items: center;
}

.public-chapters .public-scene-card {
    position: relative;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgb(202 146 61 / 24%);
    border-radius: 34px;
    background:
        radial-gradient(circle at 100% 0%, rgb(255 255 255 / 72%), transparent 34%),
        #fff4d9;
    box-shadow: 0 18px 48px rgb(93 65 24 / 10%);
}

.public-chapters .public-scene-card:nth-child(even) {
    border-color: rgb(222 118 74 / 22%);
    background:
        radial-gradient(circle at 0% 100%, rgb(255 255 255 / 70%), transparent 36%),
        #ffe7d2;
}

.public-scene-heading {
    display: grid;
    gap: 8px;
}

.public-scene-heading .eyebrow,
.public-scene-heading h2 {
    margin: 0;
}

.public-scene-card .public-chapter-image,
.public-scene-card:nth-child(even) .public-chapter-image {
    grid-row: auto;
    grid-column: auto;
}

.public-scene-card .public-chapter-copy,
.public-scene-card:nth-child(even) > .public-chapter-copy {
    grid-row: auto;
    grid-column: auto;
}

.public-chapters article:not(.public-scene-card):nth-child(even) .public-chapter-image {
    grid-column: 2;
}

.public-chapters article:not(.public-scene-card):nth-child(even) > div:last-child {
    grid-row: 1;
}

.public-chapter-image {
    position: relative;
    min-height: 390px;
    border-radius: 28px;
}

.public-chapter-image.photo {
    overflow: hidden;
    background: #e8ece9;
}

.public-chapter-image.photo > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
}

.public-chapter-image.photo::after {
    display: none;
}

.public-chapter-image::after {
    position: absolute;
    inset: 22% 26%;
    border: 2px solid rgb(255 255 255 / 60%);
    border-radius: 48% 52% 42% 58%;
    content: "";
    transform: rotate(-8deg);
}

.public-chapter-image > span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    padding: 6px 9px;
    border-radius: 99px;
    background: white;
    font-size: 0.75rem;
    font-weight: 750;
}

.public-chapters h2 {
    margin: 8px 0 18px;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    line-height: 1.2;
}

.public-chapter-copy {
    min-width: 0;
}

.public-comment {
    position: relative;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    align-items: start;
    margin: 4px 0 18px;
    padding: 20px 22px;
    border: 1px solid rgb(255 255 255 / 82%);
    border-radius: 26px 26px 26px 8px;
    background:
        radial-gradient(circle at 92% 18%, rgb(255 255 255 / 72%) 0 5px, transparent 6px),
        radial-gradient(circle at 86% 29%, rgb(255 255 255 / 52%) 0 3px, transparent 4px),
        linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 225 162 / 82%));
    box-shadow:
        0 12px 28px rgb(180 92 44 / 14%),
        inset 0 1px 0 rgb(255 255 255 / 88%);
    transform: rotate(-0.35deg);
}

.public-comment::before {
    position: absolute;
    top: -19px;
    left: 46px;
    width: 0;
    height: 0;
    border-right: 16px solid transparent;
    border-bottom: 20px solid rgb(255 248 224 / 98%);
    border-left: 16px solid transparent;
    content: "";
    filter: drop-shadow(0 -3px 2px rgb(180 92 44 / 12%));
}

.public-comment > span {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f47d66, #ffb44f);
    box-shadow: 0 6px 14px rgb(206 93 52 / 24%);
    color: white;
    font-size: 1rem;
    place-items: center;
    transform: rotate(8deg);
}

.public-comment small {
    display: block;
    margin-bottom: 5px;
    color: #b2593c;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.public-comment p {
    margin: 0;
    color: #403a33;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.7;
}

.public-scene-card:nth-child(even) .public-comment {
    background:
        radial-gradient(circle at 92% 18%, rgb(255 255 255 / 72%) 0 5px, transparent 6px),
        radial-gradient(circle at 86% 29%, rgb(255 255 255 / 52%) 0 3px, transparent 4px),
        linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 210 188 / 78%));
    transform: rotate(0.35deg);
}

.public-story-footer {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 32px 0 64px;
    border-top: 1px solid var(--line);
}

.public-story-footer p {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.logo-preview-shell {
    width: min(100% - 40px, 1180px);
    margin-inline: auto;
    padding: 70px 0 90px;
}

.logo-preview-heading {
    max-width: 760px;
    margin-bottom: 42px;
}

.logo-preview-heading h1 {
    margin: 0 0 16px;
    font-size: clamp(2.2rem, 6vw, 5rem);
    letter-spacing: -0.055em;
}

.logo-preview-heading > p:last-child,
.logo-concept-title p,
.logo-preview-note {
    color: var(--muted);
    line-height: 1.8;
}

.theme-preview-shell {
    width: min(100% - 40px, 1360px);
    margin-inline: auto;
    padding: 70px 0 100px;
}

.theme-preview-heading {
    max-width: 900px;
    margin-bottom: 46px;
}

.theme-preview-heading h1 {
    margin: 0 0 20px;
    font-size: clamp(2.5rem, 6.5vw, 5.8rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.theme-preview-heading > p:last-child {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.9;
}

.theme-study-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.theme-study {
    overflow: hidden;
    border: 1px solid rgb(32 50 44 / 12%);
    border-radius: 30px;
    background: white;
    box-shadow: var(--shadow);
}

.theme-study > header {
    min-height: 190px;
    padding: 26px 28px 22px;
    background: var(--theme-paper);
}

.theme-study > header > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-id,
.theme-recommend {
    display: inline-grid;
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 99px;
    background: var(--theme-accent-soft);
    color: var(--theme-ink);
    font-size: 0.72rem;
    font-weight: 850;
    place-items: center;
}

.theme-recommend {
    background: var(--theme-accent);
}

.theme-study h2 {
    margin: 20px 0 8px;
    font-family: var(--theme-font);
    font-size: 1.35rem;
}

.theme-study > header p {
    margin: 0;
    color: var(--theme-muted);
    font-size: 0.78rem;
    line-height: 1.7;
}

.theme-window {
    min-height: 580px;
    padding: 18px;
    background:
        radial-gradient(circle at 88% 10%, var(--theme-glow), transparent 14rem),
        var(--theme-bg);
    color: var(--theme-ink);
    font-family: var(--theme-font);
}

.theme-mini-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px -2px 34px;
}

.theme-mini-header img {
    width: 28px;
    height: 28px;
}

.theme-mini-header strong {
    font-size: 0.76rem;
}

.theme-mini-header > span {
    margin-left: auto;
    padding: 7px 9px;
    border-radius: 99px;
    background: var(--theme-accent-soft);
    font-size: 0.55rem;
    font-weight: 750;
}

.theme-hero-sample {
    padding: 4px 6px 28px;
}

.theme-hero-sample p {
    margin: 0 0 12px;
    color: var(--theme-green);
    font-size: 0.57rem;
    font-weight: 850;
    letter-spacing: 0.17em;
}

.theme-hero-sample h3 {
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    line-height: 1.18;
    letter-spacing: -0.055em;
}

.theme-hero-sample > span {
    color: var(--theme-muted);
    font-size: 0.72rem;
    line-height: 1.8;
}

.theme-card-sample {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--theme-line);
    border-radius: 22px;
    background: var(--theme-surface);
    box-shadow: 0 14px 40px rgb(32 50 44 / 8%);
}

.theme-card-sample > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.theme-card-sample > div span {
    color: var(--theme-green);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.theme-card-sample > div strong {
    font-size: 0.88rem;
}

.theme-card-sample label {
    display: grid;
    gap: 7px;
    color: var(--theme-muted);
    font-size: 0.62rem;
    font-weight: 750;
}

.theme-input {
    padding: 12px 13px;
    border: 1px solid var(--theme-line);
    border-radius: 12px;
    background: white;
    color: var(--theme-ink);
    font-size: 0.78rem;
}

.theme-card-sample button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
    border: 0;
    border-radius: 13px;
    background: var(--theme-button);
    color: var(--theme-button-text);
    font-size: 0.75rem;
    font-weight: 800;
}

.theme-card-sample button span {
    font-size: 1rem;
}

.theme-swatches {
    display: flex;
    gap: 8px;
    padding: 20px 4px 4px;
}

.theme-swatches i {
    width: 24px;
    height: 24px;
    border: 2px solid rgb(255 255 255 / 80%);
    border-radius: 50%;
    background: var(--swatch-1);
    box-shadow: 0 0 0 1px rgb(32 50 44 / 9%);
}

.theme-swatches i:nth-child(2) { background: var(--swatch-2); }
.theme-swatches i:nth-child(3) { background: var(--swatch-3); }
.theme-swatches i:nth-child(4) { background: var(--swatch-4); }
.theme-swatches i:nth-child(5) { background: var(--swatch-5); }

.theme-morning {
    --theme-font: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
    --theme-paper: #f7f2e8;
    --theme-bg: #fffaf0;
    --theme-surface: #fffefa;
    --theme-ink: #17372f;
    --theme-muted: #62766f;
    --theme-green: #16805e;
    --theme-accent: #ffd66b;
    --theme-accent-soft: #dcf3e8;
    --theme-glow: rgb(255 214 107 / 34%);
    --theme-line: #cfe1d9;
    --theme-button: #16805e;
    --theme-button-text: white;
    --swatch-1: #fffaf0;
    --swatch-2: #16805e;
    --swatch-3: #70cfa8;
    --swatch-4: #ffd66b;
    --swatch-5: #ff8b72;
}

.theme-table {
    --theme-font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
    --theme-paper: #fbf0df;
    --theme-bg: #fff7ea;
    --theme-surface: #fffdf8;
    --theme-ink: #3a3027;
    --theme-muted: #756b62;
    --theme-green: #377c68;
    --theme-accent: #ffad78;
    --theme-accent-soft: #f7df9b;
    --theme-glow: rgb(255 173 120 / 28%);
    --theme-line: #e5d7c7;
    --theme-button: #3a3027;
    --theme-button-text: white;
    --swatch-1: #fff7ea;
    --swatch-2: #377c68;
    --swatch-3: #f7df9b;
    --swatch-4: #ffad78;
    --swatch-5: #8cbdd0;
}

.theme-future {
    --theme-font: "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
    --theme-paper: #eef6f8;
    --theme-bg: #f7fcfd;
    --theme-surface: #ffffff;
    --theme-ink: #193543;
    --theme-muted: #647780;
    --theme-green: #167b73;
    --theme-accent: #c4ed67;
    --theme-accent-soft: #dceff5;
    --theme-glow: rgb(94 201 219 / 25%);
    --theme-line: #d1e3e8;
    --theme-button: #193543;
    --theme-button-text: white;
    --swatch-1: #f7fcfd;
    --swatch-2: #193543;
    --swatch-3: #5ec9db;
    --swatch-4: #c4ed67;
    --swatch-5: #ffcf62;
}

.theme-type-note {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
    gap: 40px;
    align-items: end;
    margin-top: 28px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}

.theme-type-note h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    letter-spacing: -0.05em;
}

.theme-type-note > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.logo-concept-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.logo-concept-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.logo-concept-title {
    display: flex;
    gap: 14px;
    min-height: 116px;
}

.logo-concept-title > span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green-dark);
    font-weight: 850;
    place-items: center;
}

.logo-concept-title h2 {
    margin: 3px 0 8px;
    font-size: 1.15rem;
}

.logo-concept-title p {
    margin: 0;
    font-size: 0.78rem;
}

.logo-size-study {
    display: grid;
    gap: 18px;
}

.logo-large {
    display: grid;
    min-height: 220px;
    border-radius: 22px;
    background: #f4f0e8;
    place-items: center;
}

.logo-large img {
    width: 132px;
    height: 132px;
}

.logo-header-sample {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.logo-header-sample img {
    width: 36px;
    height: 36px;
}

.logo-small-study {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.logo-small-study span {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.65rem;
    justify-items: center;
}

.logo-small-study span:nth-child(1) img {
    width: 36px;
    height: 36px;
}

.logo-small-study span:nth-child(2) img {
    width: 24px;
    height: 24px;
}

.logo-small-study span:nth-child(3) img {
    width: 16px;
    height: 16px;
}

.logo-preview-note {
    margin: 30px 0 0;
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 860px) {
    .session-heading {
        display: grid;
        align-items: start;
        padding-top: 42px;
    }

    .recording-layout {
        grid-template-columns: 1fr;
    }

    .program-panel {
        position: static;
    }

    .moment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chapter-content {
        grid-template-columns: 1fr;
    }

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

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

    .public-chapters article {
        gap: 28px;
    }

    .logo-concept-grid {
        grid-template-columns: 1fr;
    }

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

    .logo-concept-title {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .app-header {
        min-height: 62px;
        padding: 10px 18px;
    }

    .app-header .brand > span:last-child {
        display: none;
    }

    .organizer-moment-grid {
        grid-template-columns: 1fr;
    }

    .demo-notice {
        align-items: flex-start;
        margin: 14px 0;
        padding: 13px 15px;
    }

    .demo-notice a {
        display: none;
    }

    .page-context {
        margin-left: auto;
        padding: 5px 9px;
    }

    .page-context small {
        display: none;
    }

    .capture-context small {
        display: block;
        font-size: 0.55rem;
    }

    .app-header .header-action,
    .app-header .prototype-badge {
        display: none;
    }

    .app-header .header-actions {
        gap: 8px;
    }

    .app-header .organizer-header-action {
        display: inline-flex;
        flex: 0 0 auto;
        padding: 7px 9px;
        border: 1px solid #b8d5c9;
        border-radius: 10px;
        background: var(--green-soft);
        font-size: 0.72rem;
        text-decoration: none;
    }

    .organizer-header-action .desktop-label {
        display: none;
    }

    .organizer-header-action .mobile-label {
        display: inline;
    }

    .app-shell,
    .recap-shell,
    .manage-shell,
    .public-story-shell {
        width: min(100% - 24px, 1240px);
    }

    .logo-preview-shell {
        width: min(100% - 24px, 1180px);
        padding: 42px 0 70px;
    }

    .theme-preview-shell {
        width: min(100% - 24px, 1360px);
        padding: 42px 0 70px;
    }

    .theme-type-note {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px;
    }

    .logo-concept-card {
        padding: 20px;
    }

    .session-heading {
        gap: 18px;
        padding: 18px 2px 16px;
    }

    .session-heading > div:first-child {
        display: none;
    }

    .session-meta div {
        gap: 10px;
        padding: 9px 0;
    }

    .session-meta dd {
        font-size: 0.82rem;
    }

    .capture-panel,
    .program-panel {
        border-radius: 20px;
    }

    .capture-panel {
        padding: 20px 16px;
    }

    .section-heading {
        align-items: start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .capture-panel .section-heading h2 {
        font-size: 1.38rem;
        line-height: 1.2;
    }

    .capture-panel .section-heading .eyebrow {
        margin-bottom: 6px;
        font-size: 0.64rem;
    }

    .live-status {
        flex: 0 0 auto;
        padding: 6px 8px;
        font-size: 0.66rem;
        white-space: nowrap;
    }

    .current-program {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 12px;
    }

    .current-program .text-button {
        grid-column: auto;
        justify-self: end;
        padding: 0;
        font-size: 0.74rem;
    }

    .current-time {
        font-size: 1.12rem;
    }

    .current-program strong {
        font-size: 0.84rem;
    }

    .media-drop {
        min-height: 140px;
        padding: 20px;
    }

    .tag-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .tag-option span {
        justify-content: center;
        padding: 8px 6px;
        text-align: center;
    }

    .capture-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button {
        width: 100%;
    }

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

    .recent-moments {
        padding: 48px 0;
    }

    .recap-hero {
        padding: 56px 0 40px;
    }

    .filter-bar {
        top: 62px;
    }

    .story-chapter {
        grid-template-columns: 48px 1fr;
    }

    .chapter-content {
        gap: 24px;
        padding: 0 0 56px 10px;
    }

    .chapter-gallery {
        grid-template-columns: 1fr 0.55fr;
    }

    .story-image {
        min-height: 230px;
    }

    .story-image:nth-child(2) {
        min-height: 155px;
        margin-top: 42px;
    }

    .expiry-banner {
        align-items: center;
        flex-direction: row;
        gap: 12px;
        margin-top: 12px;
        padding: 12px 14px;
    }

    .countdown {
        margin-left: auto;
        text-align: right;
    }

    .expiry-banner .eyebrow {
        display: none;
    }

    .expiry-banner > div:first-child > strong {
        font-size: 0.82rem;
    }

    .countdown strong {
        font-size: 0.9rem;
    }

    .manage-heading {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 0 24px;
    }

    .manage-heading h1 {
        font-size: 2.25rem;
        line-height: 1.15;
    }

    .manage-heading .workshop-status {
        font-size: 0.86rem;
        line-height: 1.65;
    }

    .manage-heading > div:first-child > p:last-child {
        font-size: 0.84rem;
    }

    .qr-row,
    .live-qr {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
    }

    .qr-row img,
    .qr-code {
        width: 110px;
        height: 110px;
    }

    .share-card-heading h2 {
        font-size: 1.16rem;
    }

    .completion-ring {
        width: 132px;
        height: 132px;
    }

    .completion-ring::before {
        width: 106px;
        height: 106px;
    }

    .manage-card {
        padding: 20px 16px;
    }

    .manage-flow-list li {
        grid-template-columns: 44px 14px 1fr;
    }

    .manage-flow-list li > button {
        grid-column: 3;
        justify-self: start;
        padding: 0;
    }

    .qr-row {
        grid-template-columns: 108px 1fr;
        gap: 12px;
    }

    .qr-row img {
        width: 108px;
        height: 108px;
    }

    .share-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .public-story-hero {
        padding: 52px 0 42px;
    }

    .public-story-hero h1 {
        font-size: 3.1rem;
    }

    .public-chapters {
        gap: 24px;
    }

    .public-chapters article {
        grid-template-columns: 1fr;
    }

    .public-chapters .public-scene-card {
        gap: 18px;
        padding: 14px;
        border-radius: 24px;
    }

    .public-chapters article:nth-child(even) .public-chapter-image,
    .public-chapters article:nth-child(even) > div:last-child {
        grid-row: auto;
        grid-column: auto;
    }

    .public-chapter-image {
        min-height: 280px;
    }

    .public-chapter-image.photo > img {
        min-height: 280px;
    }

    .public-chapters h2 {
        margin-bottom: 14px;
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .public-comment {
        grid-template-columns: 34px 1fr;
        padding: 15px 16px;
        border-radius: 21px 21px 21px 6px;
    }

    .public-comment > span {
        width: 34px;
        height: 34px;
    }

    .public-comment p {
        font-size: 1.05rem;
        font-weight: 600;
        line-height: 1.75;
    }

    .public-comment small {
        font-size: 0.72rem;
        font-weight: 700;
    }
}

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

/* About / new StoryFlow */
.about-context {
    border-color: #d9c6e2;
    background: #f1e9f4;
}

.setup-context {
    border-color: #b8d5c9;
    background: #e5f1eb;
}

.about-shell,
.setup-shell {
    width: min(100% - 40px, 1120px);
    margin-inline: auto;
}

.about-hero {
    padding: clamp(72px, 11vw, 140px) 0 clamp(64px, 9vw, 112px);
}

.about-hero h1 {
    max-width: 940px;
    font-size: clamp(3.2rem, 7vw, 5.15rem);
}

.about-lead,
.setup-lead {
    max-width: 760px;
    margin: 32px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.9;
}

.setup-lead {
    margin-top: 24px;
    font-size: clamp(0.95rem, 1.6vw, 1.08rem);
    line-height: 1.85;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-block: 1px solid var(--line);
}

.philosophy-grid article {
    min-height: 390px;
    padding: 46px 34px;
}

.philosophy-grid article + article {
    border-left: 1px solid var(--line);
}

.philosophy-grid article > span {
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 800;
}

.philosophy-grid h2 {
    margin-top: 72px;
    line-height: 1.3;
}

.philosophy-grid p {
    margin: 22px 0 0;
    color: var(--muted);
    line-height: 1.85;
}

.credits-card,
.feedback-card {
    display: grid;
    grid-template-columns: minmax(250px, 0.72fr) 1.28fr;
    gap: clamp(36px, 8vw, 96px);
    margin: clamp(70px, 10vw, 120px) 0;
    padding: clamp(28px, 6vw, 72px);
    border-radius: 34px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.credits-logo-wrap {
    display: grid;
    place-items: center;
}

.credits-logo-wrap img {
    display: block;
    width: min(100%, 340px);
    border-radius: 50%;
}

.credits-copy dl {
    margin: 38px 0 0;
}

.credits-copy dl > div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.credits-copy dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.credits-copy dd {
    margin: 0;
    font-weight: 750;
    line-height: 1.5;
}

.credits-copy dd small {
    color: var(--muted);
    font-weight: 550;
}

.credit-blank {
    display: block;
    width: min(100%, 180px);
    height: 1.3em;
    border-bottom: 1px solid var(--line);
}

.codex-credit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.codex-credit span {
    display: grid;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--ink);
    color: white;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    place-items: center;
}

.partner-note {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.feedback-card {
    align-items: end;
    background: var(--ink);
    color: white;
}

.feedback-card .eyebrow {
    color: #9dd7bc;
}

.feedback-card p {
    color: #d2ddd8;
    line-height: 1.8;
}

.feedback-card .primary-button {
    display: inline-flex;
    margin-top: 16px;
    background: var(--yellow);
    color: var(--ink);
    text-decoration: none;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px max(24px, calc((100vw - 1120px) / 2));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
}

.site-footer nav {
    display: flex;
    gap: 20px;
}

.setup-hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: clamp(40px, 8vw, 100px);
    align-items: end;
    padding: clamp(48px, 7vw, 82px) 0 48px;
}

.setup-hero h1 {
    max-width: 720px;
    font-size: clamp(2.15rem, 3.8vw, 3.1rem);
    line-height: 1.18;
}

.desktop-notice {
    display: flex;
    gap: 18px;
    padding: 24px;
    border: 1px solid #b8d5c9;
    border-radius: 24px;
    background: var(--green-soft);
}

.desktop-notice p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.device-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 25px;
    border: 2px solid var(--green-dark);
    border-radius: 4px;
}

.device-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    margin: 28px auto 0;
    background: var(--green-dark);
    content: "";
}

.setup-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.setup-steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
    padding: 15px;
    border-bottom: 3px solid var(--line);
}

.setup-steps li.active {
    border-color: var(--green);
}

.setup-steps li > span {
    display: grid;
    grid-row: span 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e8ebe8;
    font-size: 0.75rem;
    font-weight: 800;
    place-items: center;
}

.setup-steps li.active > span {
    background: var(--green);
    color: white;
}

.setup-steps strong {
    font-size: 0.84rem;
}

.setup-steps small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
}

.setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 24px;
}

.setup-card,
.privacy-card,
.review-preview {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgb(32 50 44 / 12%);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.prototype-form {
    display: grid;
    gap: 18px;
    margin: 30px 0;
}

.setup-submit {
    justify-self: start;
}

.form-errors,
.success-banner {
    margin: 24px 0;
    padding: 16px 18px;
    border: 1px solid #e5afa4;
    border-radius: 14px;
    background: #fae9e5;
    color: #783a2e;
}

.form-errors ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.success-banner {
    display: flex;
    gap: 8px 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    border-color: #b8d5c9;
    background: var(--green-soft);
    color: var(--green-dark);
}

.success-banner span {
    color: var(--muted);
    font-size: 0.82rem;
}

.prototype-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.prototype-form input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
}

.prototype-form input.invalid {
    border-color: var(--coral);
    background: #fff8f6;
    box-shadow: 0 0 0 3px rgb(223 118 95 / 14%);
}

.field-error {
    min-height: 1.2em;
    color: #a34432;
    font-size: 0.74rem;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    gap: 16px;
}

.form-row.time-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
}

.document-area {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1.5px dashed #a8b9b1;
    border-radius: 18px;
    background: #fbfaf6;
}

.document-area > div {
    flex: 1;
}

.document-area p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.document-area small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.68rem;
}

.document-area button {
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
}

.document-icon {
    display: grid;
    width: 42px;
    height: 52px;
    border: 2px solid var(--green);
    border-radius: 7px;
    color: var(--green);
    font-size: 1.4rem;
    place-items: center;
}

.privacy-card {
    background: var(--ink);
    color: white;
}

.privacy-card h2 {
    max-width: 18em;
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
    line-height: 1.4;
    letter-spacing: -0.015em;
}

.privacy-card .eyebrow {
    color: #9dd7bc;
}

.privacy-card > p,
.privacy-card li,
.privacy-status p {
    color: #d2ddd8;
    line-height: 1.75;
}

.privacy-card ul {
    display: grid;
    gap: 13px;
    margin: 28px 0;
    padding-left: 20px;
}

.privacy-status {
    padding: 18px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 16px;
    background: rgb(255 255 255 / 7%);
}

.privacy-status p {
    margin: 8px 0 0;
    font-size: 0.78rem;
}

.review-preview {
    margin: 24px 0 100px;
}

.new-storyflow-guide {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 60px;
    padding: 18px 22px;
    border: 1px solid #b8d5c9;
    border-radius: 18px;
    background: rgb(219 237 229 / 46%);
}

.new-storyflow-guide > div {
    flex: 1 1 520px;
    min-width: 0;
}

.new-storyflow-guide h2 {
    font-size: 1.15rem;
}

.new-storyflow-guide p:last-child {
    max-width: 600px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.7;
}

.new-storyflow-guide .secondary-button {
    flex: 0 0 auto;
    width: auto;
    max-width: 240px;
    padding: 11px 16px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.review-preview > p {
    color: var(--muted);
}

.review-rows {
    margin-top: 26px;
}

.review-rows > div {
    display: grid;
    grid-template-columns: 70px 1fr 90px 60px;
    gap: 18px;
    align-items: center;
    padding: 17px 0;
    border-top: 1px solid var(--line);
}

.review-rows span {
    color: var(--green-dark);
    font-size: 0.72rem;
    font-weight: 750;
}

.review-rows button {
    border: 0;
    background: transparent;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 750;
}

.program-editor-shell {
    width: min(100% - 40px, 1120px);
    margin-inline: auto;
}

.editor-heading {
    display: flex;
    gap: 48px;
    align-items: end;
    justify-content: space-between;
    padding: 70px 0 34px;
}

.editor-heading h1 {
    font-size: clamp(2.8rem, 6vw, 5.3rem);
}

.editor-heading > div > p:last-child {
    color: var(--muted);
}

.editor-guidance {
    max-width: 350px;
    padding: 20px;
    border-radius: 18px;
    background: var(--green-soft);
}

.editor-guidance p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.7;
}

.save-confirmation {
    width: fit-content;
    margin: 16px 0;
    padding: 9px 14px;
    border-radius: 99px;
    background: var(--green-soft);
    color: var(--green-dark);
    font-size: 0.78rem;
    font-weight: 750;
}

.program-editor-card {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgb(32 50 44 / 12%);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.item-total {
    color: var(--muted);
    font-size: 0.8rem;
}

.empty-program {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px dashed #a8b9b1;
    border-radius: 16px;
    background: #fbfaf6;
    text-align: center;
}

.empty-program p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.editable-program-row {
    scroll-margin-top: 96px;
    display: grid;
    grid-template-columns: 34px 120px minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.editable-program-row label,
.add-program-row label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 750;
}

.editable-program-row input,
.add-program-row input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--ink);
}

.program-time-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.row-number {
    align-self: center;
    color: var(--muted);
    font-size: 0.75rem;
}

.row-actions {
    display: flex;
    gap: 6px;
}

.row-actions button {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--green-dark);
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 750;
}

.row-actions button:disabled {
    cursor: default;
    opacity: 0.3;
}

.row-actions .save-row {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

.row-actions .delete-row {
    border: 0;
    color: #a34432;
}

.add-program-row {
    scroll-margin-top: 96px;
    display: grid;
    grid-template-columns: 120px minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 18px;
    padding: 22px;
    border-radius: 18px;
    background: var(--green-soft);
}

.editor-next {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: flex-end;
    padding: 30px 0 90px;
}

.editor-next p {
    max-width: 590px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.editor-next .primary-button {
    flex: 0 0 auto;
    text-decoration: none;
}

@media (max-width: 820px) {
    .help-index {
        overflow-x: auto;
        grid-template-columns: repeat(5, minmax(132px, 1fr));
        padding-bottom: 6px;
    }

    .philosophy-grid,
    .credits-card,
    .feedback-card,
    .setup-hero,
    .setup-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-grid article {
        min-height: auto;
    }

    .philosophy-grid article + article {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .philosophy-grid h2 {
        margin-top: 36px;
    }

    .credits-logo-wrap img {
        width: min(70vw, 300px);
    }

    .setup-steps {
        overflow-x: auto;
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .editable-program-row {
        grid-template-columns: 30px 105px 1fr;
    }

    .editable-program-row .row-actions {
        grid-column: 2 / -1;
    }
}

@media (max-width: 560px) {
    .help-shell {
        width: min(100% - 24px, 980px);
        padding: 48px 0 80px;
    }

    .help-intro h1 {
        font-size: 2.7rem;
    }

    .help-index {
        margin: 32px 0 38px;
    }

    .help-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .help-definitions > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .about-shell,
    .setup-shell {
        width: min(100% - 24px, 1120px);
    }

    .about-hero {
        padding: 56px 4px 64px;
    }

    .about-hero h1 {
        font-size: 3.25rem;
    }

    .about-lead br {
        display: none;
    }

    .philosophy-grid article {
        padding: 36px 18px;
    }

    .credits-card,
    .feedback-card {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .credits-copy dl > div {
        grid-template-columns: 110px 1fr;
    }

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

    .site-footer nav {
        flex-wrap: wrap;
    }

    .setup-hero {
        padding: 40px 0 32px;
    }

    .setup-hero h1 {
        font-size: 2.15rem;
    }

    .setup-card,
    .privacy-card,
    .review-preview {
        padding: 22px 16px;
        border-radius: 22px;
    }

    .new-storyflow-guide {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .new-storyflow-guide > div {
        flex-basis: auto;
    }

    .new-storyflow-guide .secondary-button {
        width: 100%;
        max-width: none;
        padding: 10px 12px;
        white-space: normal;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .document-area {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .review-rows > div {
        grid-template-columns: 55px 1fr;
        gap: 8px 14px;
    }

    .review-rows span,
    .review-rows button {
        grid-column: 2;
        justify-self: start;
    }

    .program-editor-shell {
        width: min(100% - 24px, 1120px);
    }

    .editor-heading,
    .editor-next {
        align-items: stretch;
        flex-direction: column;
    }

    .editor-heading {
        padding-top: 46px;
    }

    .editor-heading h1 {
        font-size: 3rem;
    }

    .program-editor-card {
        padding: 22px 14px;
        border-radius: 22px;
    }

    .editable-program-row,
    .add-program-row {
        grid-template-columns: 1fr;
    }

    .editable-program-row .row-number,
    .editable-program-row .row-actions {
        grid-column: 1;
    }

    .row-actions {
        flex-wrap: wrap;
    }

    .add-program-row {
        padding: 16px;
    }
}
