:root {
    color-scheme: light;
    --ink: #1e2a25;
    --muted: #66716b;
    --paper: #fffdf8;
    --canvas: #f3f0e8;
    --line: #dcd8cd;
    --accent: #166b50;
    --accent-dark: #0d523c;
    --recording: #bd3e35;
    --error: #a6302a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100svh;
    color: var(--ink);
    background:
        radial-gradient(circle at 100% 0, rgba(22, 107, 80, .1), transparent 35%),
        var(--canvas);
}

button, textarea { font: inherit; }

.app-shell {
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.card {
    width: min(100%, 620px);
    margin: auto;
    padding: 28px 20px 24px;
    background: var(--paper);
    border: 1px solid rgba(30, 42, 37, .08);
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(49, 54, 45, .1);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

h1 {
    max-width: 14em;
    margin: 0;
    font-size: clamp(1.8rem, 8vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.intro {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
    padding: 24px 14px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #faf8f2;
}

.status {
    min-height: 1.5em;
    margin: 0 0 16px;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.status[data-state="recording"], .status[data-state="error"] { color: var(--error); }
.status[data-state="success"] { color: var(--accent); }

.record-button {
    min-width: 210px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 14px 21px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 7px 18px rgba(22, 107, 80, .23);
    cursor: pointer;
    font-weight: 750;
    touch-action: manipulation;
    transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.record-button:hover { background: var(--accent-dark); }
.record-button:active { transform: scale(.98); }
.record-button:focus-visible { outline: 3px solid rgba(22, 107, 80, .3); outline-offset: 3px; }
.record-button:disabled { cursor: wait; opacity: .6; }
.record-button.is-recording { background: var(--recording); animation: pulse 1.7s ease-in-out infinite; }
.record-button__icon { font-size: .95rem; line-height: 1; }

.hint {
    max-width: 340px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
    text-align: center;
}

.report label {
    display: block;
    margin-bottom: 9px;
    font-weight: 750;
}

textarea {
    display: block;
    width: 100%;
    min-height: clamp(250px, 36svh, 390px);
    resize: vertical;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
    line-height: 1.55;
}

textarea::placeholder { color: #929991; }
textarea:focus { border-color: var(--accent); outline: 3px solid rgba(22, 107, 80, .12); }
noscript { display: block; margin-top: 16px; color: var(--error); }

@keyframes pulse {
    50% { box-shadow: 0 0 0 10px rgba(189, 62, 53, .12); }
}

@media (min-width: 600px) {
    .app-shell { padding: 36px; }
    .card { padding: 42px; }
}

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