@import 'normalize.css';
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300..700&display=swap');

:root {
    --bg: #f9f6ee;
    --card: #ffffff;
    --text: #3a3a3a;
    --muted: #9a9a9a;
    --border: #ece8de;
    --accent: #8fbc8f;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    padding: 10vh 16px;
    background: var(--bg);
    color: var(--text);
    font-family: "Roboto Condensed", sans-serif;
}

.card {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card__title {
    margin: 0 0 16px;
    font-weight: 600;
}

.add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.add-form__input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.add-form__input:focus {
    outline: none;
    border-color: var(--accent);
}

.add-form__button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

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

.todo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.todo:last-child {
    border-bottom: none;
}

.todo__handle {
    color: var(--muted);
    letter-spacing: -2px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.todo__handle:active {
    cursor: grabbing;
}

.todo--ghost {
    opacity: 0.4;
}

.todo input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.todo label {
    cursor: pointer;
}

.todo input:checked + label {
    color: var(--muted);
    text-decoration: line-through;
}

.card p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.button:disabled {
    opacity: 0.5;
    cursor: default;
}

.button--secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.recovery {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.recovery__code {
    flex: 1;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 15px;
    line-height: 1.6;
    word-spacing: 4px;
    overflow-wrap: anywhere;
}

.confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    cursor: pointer;
}

.confirm input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.error {
    margin-top: 12px;
    color: #b4232f;
}

.card__footer {
    margin-top: 16px;
    text-align: center;
}

.link-button {
    padding: 0;
    border: none;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover {
    color: var(--text);
}

.steps {
    margin: 0 0 16px;
    padding-left: 20px;
    line-height: 1.5;
}

.link__qr {
    width: min(240px, 100%);
    margin: 0 auto 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.link__qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.card .link__code {
    margin-bottom: 16px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 24px;
    letter-spacing: 2px;
    text-align: center;
}

.link__form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.link__input {
    font-family: ui-monospace, Menlo, monospace;
    text-transform: uppercase;
}

.link__confirm {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.card .status {
    color: var(--muted);
}

.card .status--error {
    color: #b4232f;
}

.card .status--success {
    color: #3d7a3d;
}
