:root {
    --bg: #f5f6fb;
    --surface: #ffffff;
    --surface-soft: #f8f8fd;
    --ink: #191b2b;
    --muted: #6a6f85;
    --border: #e9e9f2;
    --accent: #6d5efc;
    --accent-soft: #efedff;
    --accent-2: #a78bfa;
    --danger: #e5484d;
    --danger-soft: #fef0f0;
    --ok: #12805c;
    --ok-soft: #e9f8f1;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(20, 20, 50, 0.06);
    --shadow: 0 12px 34px rgba(24, 24, 60, 0.08);
    --shadow-lg: 0 24px 60px rgba(24, 24, 60, 0.12);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.bg-blob--one {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, #c9c2ff, transparent 70%);
}

.bg-blob--two {
    width: 460px;
    height: 460px;
    bottom: -180px;
    right: -140px;
    background: radial-gradient(circle at 60% 40%, #ffd9ec, transparent 70%);
}

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 20px 40px;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar-ring {
    display: grid;
    place-items: center;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    box-shadow: var(--shadow);
    padding: 5px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
    border: 4px solid var(--surface);
    display: block;
}

.name {
    margin: 22px 0 0;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.bio {
    margin: 10px 0 0;
    max-width: 46ch;
    color: var(--muted);
    font-size: 1.02rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.board {
    margin-top: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 22px 22px;
}

.board-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.board-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.composer {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.field {
    display: grid;
    gap: 6px;
}

.label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

input[type="text"],
textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
    resize: vertical;
    min-height: 84px;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #a4a8bd;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.15);
}

.composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.counter {
    font-size: 0.78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.btn {
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 0;
    border-radius: 10px;
    padding: 11px 26px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(109, 94, 252, 0.28);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(109, 94, 252, 0.34);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:focus-visible {
    outline: 3px solid rgba(109, 94, 252, 0.4);
    outline-offset: 2px;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.status {
    margin-top: 14px;
    padding: 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

.status.show {
    display: block;
    padding: 11px 14px;
}

.status.error {
    background: var(--danger-soft);
    color: var(--danger);
}

.status.ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.messages {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 14px 16px 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    animation: rise 0.3s ease both;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #dedcf5;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-mini {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    text-transform: uppercase;
    user-select: none;
}

.card-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.card-date {
    font-size: 0.76rem;
    color: var(--muted);
}

.card-body {
    margin: 10px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.like {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 11px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.like:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.like:active {
    transform: scale(0.95);
}

.like .heart {
    font-size: 0.95rem;
    line-height: 1;
}

.like[data-liked="1"] {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.like:focus-visible {
    outline: 3px solid rgba(109, 94, 252, 0.35);
    outline-offset: 2px;
}

.empty {
    margin: 20px 0 4px;
    text-align: center;
    color: var(--muted);
}

.card-body,
.card-name {
    padding-right: 66px;
}

.footer {
    margin-top: 36px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer p {
    margin: 0;
}

@media (max-width: 520px) {
    .page {
        padding: 36px 14px 28px;
    }

    .board {
        padding: 20px 15px 18px;
    }

    .avatar-ring {
        width: 138px;
        height: 138px;
    }

    .card-body,
    .card-name {
        padding-right: 0;
    }

    .like {
        position: static;
        margin-top: 12px;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
