:root {
    color-scheme: light;
    font-family: Inter, system-ui, sans-serif;
    color: #202239;
    background: #f5f6fb;
    --accent: #4936b0;
    --muted: #545a74;
    --line: #dedfed;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
    outline: 3px solid #735cff;
    outline-offset: 3px;
}

.shell {
    width: min(100% - 2rem, 66rem);
    margin-inline: auto;
    padding-block: clamp(2.5rem, 7vw, 5rem) 4rem;
}

.catalog-header { margin-bottom: clamp(1.75rem, 5vw, 3rem); }
h1 {
    font-size: clamp(2.75rem, 7vw, 5.25rem);
    letter-spacing: -.065em;
    line-height: 1;
    margin: 0;
    overflow-wrap: anywhere;
}
.catalog-header p { color: var(--muted); font-size: 1.125rem; margin: .85rem 0 0; }
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 2vw, 1.4rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.user-card:hover { border-color: var(--accent); box-shadow: 0 8px 25px #27214d13; }
.user-card span { font-size: 1.1rem; font-weight: 650; padding: 1rem 1.1rem; overflow-wrap: anywhere; }
.portrait {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: #e8e7f6;
    overflow: hidden;
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait--placeholder {
    background: linear-gradient(140deg, #e1ddfa, #eceffc);
    color: #51438a;
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 650;
    letter-spacing: -.055em;
}

.catalog-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.notice, .feedback { color: var(--muted); }
.feedback { margin: .25rem 0 0; line-height: 1.45; }
.feedback:empty { display: none; }
.button {
    display: inline-block;
    width: fit-content;
    padding: .65rem 1rem;
    border-radius: .6rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.button--plain { background: #fff; color: var(--accent); }
.button:hover { filter: brightness(.92); }

.back-link { display: inline-block; font-weight: 600; margin-bottom: 1.5rem; }
.profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.5rem, 5vw, 3.5rem);
    padding: clamp(1rem, 4vw, 2.5rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.35rem;
}
.profile > .portrait { aspect-ratio: 1; border-radius: .9rem; }
.profile .portrait img { object-fit: contain; }
.profile h1 { font-size: clamp(2rem, 5vw, 4rem); }
.profile dl { margin: 1.5rem 0; }
.profile dl div { padding: .75rem 0; border-top: 1px solid var(--line); }
.profile dt { color: var(--muted); font-size: .9rem; }
.profile dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.profile-id { font-family: ui-monospace, monospace; }
.editor summary { width: fit-content; color: var(--accent); cursor: pointer; font-weight: 650; }
.editor form { margin-top: 1rem; }
.editor fieldset { display: grid; gap: .55rem; margin: 0 0 .75rem; padding: 0; border: 0; min-width: 0; }
.editor label { font-size: .9rem; font-weight: 600; }
.editor input {
    min-width: 0;
    width: 100%;
    margin-bottom: .4rem;
    padding: .65rem .75rem;
    border: 1px solid #aeb1c8;
    border-radius: .5rem;
    background: #fff;
    color: inherit;
    font: inherit;
}
.editor fieldset:disabled { opacity: .7; }

@media (max-width: 46rem) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile { grid-template-columns: 1fr; }
}
@media (max-width: 24rem) {
    .user-card span { padding: .7rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .user-card { transition: none; }
}
