:root {
    --bg-color: #f2f6f4;
    --card-bg: #ffffff;
    --paper-bg: #fffdf7;
    --warm-bg: #fff7db;
    --primary-color: #367f73;
    --primary-hover: #28665c;
    --primary-soft: #dff1ec;
    --text-color: #20332f;
    --subtext-color: #64756f;
    --border-color: #d8e3df;
    --focus-color: #f2ae2e;
    --shadow: 0 18px 45px rgba(32, 51, 47, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    padding: 32px 20px 48px;
    color: var(--text-color);
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 221, 128, 0.28), transparent 28rem),
        radial-gradient(circle at 85% 40%, rgba(126, 201, 187, 0.2), transparent 26rem),
        var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--primary-color);
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--text-color);
    color: #fff;
    font-weight: 750;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

button,
input,
textarea {
    font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

.container {
    display: flex;
    width: min(100%, 720px);
    margin: 0 auto;
    flex-direction: column;
    gap: 24px;
}

.site-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-header {
    max-width: 660px;
    margin: 0 auto 4px;
    text-align: center;
}

.eyebrow,
.card-kicker {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.main-title {
    margin: 0 0 14px;
    color: var(--text-color);
    font-family: "Caveat", cursive;
    font-size: clamp(3.6rem, 12vw, 5.2rem);
    line-height: 0.95;
    text-shadow: 2px 3px 0 rgba(32, 51, 47, 0.08);
    transform: rotate(-2deg);
}

.verb-line {
    display: inline-flex;
    margin: 6px auto 14px;
    padding: 9px 14px;
    align-items: center;
    gap: 10px;
    border: 1px solid #cce2dc;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #265f56;
    font-size: 0.9rem;
}

.verb-line strong {
    font-size: 1rem;
}

.verb-line span {
    color: #52716a;
}

.sub-title {
    max-width: 570px;
    margin: 0 auto;
    color: var(--subtext-color);
    font-size: 1.05rem;
}

.card,
.movement-section,
.contribute-section {
    padding: 38px 34px;
    border: 1px solid rgba(216, 227, 223, 0.9);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.card {
    text-align: center;
}

.handwritten-box {
    display: flex;
    min-height: 190px;
    margin-bottom: 24px;
    padding: 30px;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--text-color);
    border-radius: 3px 28px 4px 28px / 28px 3px 28px 4px;
    background: var(--paper-bg);
    box-shadow: 5px 5px 0 rgba(32, 51, 47, 0.14);
    color: #1d2926;
    font-family: "Caveat", cursive;
    font-size: clamp(1.8rem, 7vw, 2.35rem);
    line-height: 1.35;
    white-space: pre-line;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

button {
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 11px;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 750;
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 7px 18px rgba(40, 102, 92, 0.18);
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background: #f0f5f3;
    color: var(--text-color);
}

.btn-secondary:hover:not(:disabled) {
    background: #e4eeeb;
}

.toast {
    min-height: 1.4em;
    margin-top: 11px;
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 200ms ease;
}

.toast.visible {
    opacity: 1;
}

.toast.error {
    color: #8b2c34;
}

.movement-section {
    border-color: #f0df9f;
    background: var(--warm-bg);
    text-align: center;
}

.movement-section h2,
.contribute-section h2 {
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 5vw, 2rem);
    line-height: 1.2;
}

.movement-intro,
.form-intro {
    margin: 0 auto 24px;
    color: var(--subtext-color);
}

.chain-steps {
    display: grid;
    margin: 24px 0;
    padding: 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    list-style: none;
    text-align: left;
}

.chain-steps li {
    display: flex;
    min-width: 0;
    padding: 16px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid rgba(224, 196, 100, 0.55);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.64);
}

.step-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--text-color);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.chain-steps strong,
.chain-steps li div span {
    display: block;
}

.chain-steps strong {
    margin-bottom: 4px;
    line-height: 1.3;
}

.chain-steps li div span {
    color: #6f7066;
    font-size: 0.86rem;
    line-height: 1.4;
}

.text-link {
    display: inline-block;
    color: var(--text-color);
    font-weight: 800;
    text-underline-offset: 4px;
}

.contribute-section {
    text-align: center;
}

.contribute-section form {
    margin-top: 24px;
}

.radio-group {
    display: grid;
    margin: 0 0 22px;
    padding: 0;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 0;
    text-align: left;
}

.radio-group legend {
    width: 100%;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 750;
}

.radio-group label {
    display: grid;
    padding: 13px;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 700;
}

.radio-group label:has(input:checked) {
    border-color: var(--primary-color);
    background: var(--primary-soft);
}

.radio-group input {
    margin-top: 4px;
    accent-color: var(--primary-color);
}

.radio-group label span {
    grid-column: 2;
    color: var(--subtext-color);
    font-size: 0.79rem;
    font-weight: 450;
}

.form-field {
    margin-bottom: 17px;
    text-align: left;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 750;
}

.form-field textarea,
.form-field input[type="text"] {
    width: 100%;
    border: 1px solid #bdcdc8;
    border-radius: 11px;
    background: #fff;
    color: var(--text-color);
}

.form-field textarea {
    min-height: 130px;
    padding: 16px;
    border: 2px dashed #91aaa3;
    background: var(--paper-bg);
    font-family: "Caveat", cursive;
    font-size: 1.55rem;
    line-height: 1.35;
    resize: vertical;
}

.form-field input[type="text"] {
    padding: 12px 13px;
}

.field-hint {
    display: block;
    margin-top: 4px;
    color: var(--subtext-color);
    font-size: 0.76rem;
    text-align: right;
}

.submit-button {
    width: 100%;
    margin-top: 3px;
    font-size: 1.03rem;
}

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

.status-msg {
    margin: 18px 0 22px;
    padding: 15px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.93rem;
    font-weight: 600;
    text-align: left;
}

.status-msg.success {
    border-color: #a6d7b4;
    background: #e5f6e9;
    color: #205e31;
}

.status-msg.error {
    border-color: #edbdc1;
    background: #fbe8ea;
    color: #7f252d;
}

.private-view-status {
    margin: 0 0 22px;
}

.private-link-wrapper {
    display: flex;
    margin-top: 14px;
    align-items: center;
    gap: 8px;
}

.private-link-wrapper input {
    min-width: 0;
    flex: 1;
    padding: 10px;
    border: 1px dashed #4b9160;
    border-radius: 7px;
    background: #fff;
    color: #205e31;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
}

.btn-copy-small {
    min-height: 42px;
    padding: 9px 13px;
    background: #347c49;
    white-space: nowrap;
}

.site-footer {
    padding: 8px 12px 0;
    color: var(--subtext-color);
    font-size: 0.88rem;
    text-align: center;
}

.site-footer a {
    display: inline-block;
    margin-top: 5px;
    color: var(--subtext-color);
    text-underline-offset: 3px;
}

@media (max-width: 640px) {
    body {
        padding: 24px 14px 38px;
    }

    .container {
        gap: 18px;
    }

    .site-main {
        gap: 18px;
    }

    .verb-line {
        flex-direction: column;
        gap: 1px;
        border-radius: 16px;
    }

    .card,
    .movement-section,
    .contribute-section {
        padding: 28px 19px;
        border-radius: 18px;
    }

    .handwritten-box {
        min-height: 170px;
        padding: 24px 18px;
    }

    .actions button {
        width: 100%;
    }

    .chain-steps,
    .radio-group {
        grid-template-columns: 1fr;
    }

    .chain-steps li {
        padding: 14px;
    }

    .private-link-wrapper {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-copy-small {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    button,
    .toast {
        transition: none;
    }
}
