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

:root {
    color-scheme: light;
    --paper: #fdfcf9;
    --ink: #1c1b18;
    --you: #9a958b;
    --faint: #c3beb3;
}

html,
body {
    background: var(--paper);
}

html {
    scrollbar-gutter: stable;
}

body {
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", serif;
    font-size: clamp(19px, 15px + 0.6vw, 25px);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#text {
    max-width: 30em;
    margin: 0 auto;
    padding: 26vh 24px 55vh;
}

p {
    margin-bottom: 1.15em;
}

.you {
    color: var(--you);
    font-style: italic;
}

.opening {
    animation: arrive 1.6s ease both;
}

@keyframes arrive {
    from { opacity: 0; }
}

.w {
    opacity: 0;
    transition: opacity 0.9s ease;
}

.w.on {
    opacity: 1;
}

.field {
    display: inline-block;
    min-width: 1ch;
    max-width: 100%;
    outline: none;
    caret-color: var(--ink);
    cursor: text;
}

.field:empty:not(:focus)::after,
.unfocused .field:empty::after {
    content: '_';
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

#back {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--faint);
    text-decoration: none;
    font-size: 12px;
    font-style: normal;
    transition: color 0.3s ease;
}

#back:hover {
    color: var(--ink);
}

::selection {
    background: var(--ink);
    color: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
    .w,
    .opening {
        transition: none;
        animation: none;
    }
}
