@font-face {
    font-family: Muli;
    src: url("muli-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Muli;
    src: url("muli-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --canvas: #f5f4f2;
    --paper: #fff;
    --ink: #202020;
    --muted: #666360;
    --line: #e4e1dd;
    --red: #d60912;
    --red-deep: #b50009;
    --red-soft: #fff0ef;
    --radius: 14px;
    font-family: Muli, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; flex: none; }
h1, h2, h3, p { margin: 0; }
button, summary { cursor: pointer; }
summary::marker, summary::-webkit-details-marker { display: none; content: ""; }
:focus-visible { outline: 3px solid #1e61ac; outline-offset: 4px; }
.skip {
    position: absolute;
    z-index: 4;
    left: .8rem;
    top: .8rem;
    padding: .65rem 1rem;
    transform: translateY(-170%);
    background: var(--paper);
    border-radius: .5rem;
}
.skip:focus { transform: translateY(0); }
.topbar { background: var(--paper); border-top: 4px solid #fe0002; border-bottom: 1px solid var(--line); }
.top-inner {
    width: min(100% - 2rem, 72rem);
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-inline: auto;
}
.logo { display: inline-flex; flex: none; align-items: center; min-height: 44px; }
.logo img { width: 125px; height: auto; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .48rem .85rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font-weight: 800;
    font-size: .875rem;
    line-height: 1.25;
    text-align: center;
    transition: background-color .16s, border-color .16s, color .16s;
}
.button:hover { border-color: #bbb5ad; background: #f8f7f6; }
.button:disabled { opacity: .4; cursor: default; }
.button.primary { background: var(--red); color: white; border-color: var(--red); }
.button.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.button.danger { color: var(--red-deep); }
.button.danger:hover { background: var(--red-soft); border-color: #f4c7c5; }
.icon-button { width: 44px; padding: 0; flex: none; }
.share-button svg { width: 1.1rem; height: 1.1rem; }

.public-shell { width: min(100% - 2rem, 72rem); margin: 1.1rem auto 0; }
.profile-card {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: end;
    min-height: clamp(235px, 58vw, 345px);
    overflow: hidden;
    border-radius: var(--radius);
    background: #242321;
    color: white;
}
.profile-card::after {
    position: absolute;
    z-index: -1;
    content: "";
    inset: 0;
    background: linear-gradient(180deg, rgb(19 17 15 / .05) 5%, rgb(19 17 15 / .30) 33%, rgb(19 17 15 / .91) 100%);
}
.profile-photo {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 36% 36%;
}
.profile-copy { padding: clamp(1.05rem, 5vw, 2.05rem); }
.location {
    display: inline-flex;
    align-items: center;
    gap: .37rem;
    margin-bottom: .67rem;
    padding: .34rem .57rem;
    border: 1px solid rgb(255 255 255 / .40);
    border-radius: 6px;
    background: rgb(25 24 23 / .70);
    color: white;
    font-weight: 800;
    font-size: .8125rem;
}
.location svg { width: .95rem; height: .95rem; color: #ff7979; }
.profile h1 {
    max-width: 13ch;
    font-weight: 900;
    font-size: clamp(2.05rem, 8vw, 4rem);
    letter-spacing: -.055em;
    line-height: 1.04;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.intro { max-width: 31ch; margin-top: .55rem; font-size: 1rem; color: #fff; }
.social-block { padding: .75rem 0 .45rem; }
.handle { display: block; margin-bottom: .48rem; font-size: .875rem; color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.social-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.social-links a {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--paper);
    transition: color .16s, background .16s, border-color .16s;
}
.social-links a:hover { color: var(--red-deep); border-color: #f2b9b6; background: var(--red-soft); }
.jump-links { display: flex; flex-wrap: wrap; gap: 0 .95rem; border-top: 1px solid var(--line); margin-top: .45rem; }
.jump-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 800; color: var(--muted); }
.jump-links a:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }

.link-section { scroll-margin-top: 1rem; }
.link-section + .link-section { margin-top: 2.1rem; }
.link-section h2 {
    display: flex;
    gap: .6rem;
    align-items: center;
    font-weight: 900;
    letter-spacing: -.035em;
    font-size: clamp(1.45rem, 4vw, 1.85rem);
    margin: 0 0 .7rem;
    line-height: 1.18;
}
.link-section h2::before { display: block; width: .24rem; height: .9em; border-radius: 2px; background: var(--red); content: ""; }
.content { margin-top: .9rem; min-width: 0; }
.link-list { list-style: none; display: grid; gap: .58rem; padding: 0; margin: 0; }
.feature-link, .link-row, .person-row {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--paper);
    transition: background-color .18s, border-color .18s, box-shadow .18s;
}
.feature-link:hover, a.link-row:hover, .person-row:hover { border-color: #d8a4a1; box-shadow: 0 5px 14px #251b1710; }
.feature-link { display: block; overflow: hidden; }
.feature-media { position: relative; display: block; aspect-ratio: 1.95; background: #383224; overflow: hidden; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 43%; }
.play-mark {
    position: absolute;
    right: .8rem;
    bottom: .8rem;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: white;
    background: var(--red);
    border-radius: 10px;
    box-shadow: 0 3px 14px rgb(0 0 0 / .2);
}
.play-mark svg { width: 25px; height: 25px; }
.feature-text { display: flex; justify-content: space-between; gap: .65rem; align-items: center; padding: .76rem .85rem .83rem; }
.feature-text strong { font-size: clamp(1.05rem, 3.9vw, 1.35rem); letter-spacing: -.028em; }
.row-label { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.row-label strong, .row-label small { display: block; }
.row-label strong { line-height: 1.32; font-weight: 800; }
.row-label small { color: var(--muted); font-size: .875rem; margin-top: .15rem; line-height: 1.35; }
.link-row {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: .76rem;
    padding: .55rem .8rem;
}
.row-icon, .row-art {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
}
.row-icon { color: var(--red-deep); background: var(--red-soft); }
.row-art { background: #eae8e4; }
.row-art img { height: 100%; width: 100%; object-fit: cover; object-position: center 35%; }
.row-end { line-height: 0; color: #6a655f; margin-left: auto; flex: none; }
.row-end svg { width: 1.08rem; height: 1.08rem; }
.person-row summary { background: none; border: 0; }
.person-row[open] summary .row-end { transform: rotate(180deg); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .45rem; padding: .6rem .8rem .8rem; margin-inline: .1rem; border-top: 1px solid var(--line); }
.contact-actions a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .25rem .55rem; font-size: .875rem; border-radius: 8px; background: var(--canvas); font-weight: 800; }
.contact-actions a:hover { background: var(--red-soft); color: var(--red-deep); }
.contact-actions svg { width: 1rem; height: 1rem; }
.public-footer {
    width: min(100% - 2rem, 72rem);
    margin: 2.3rem auto 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0 1.15rem;
    font-size: .875rem;
    color: var(--muted);
}
.public-footer a { display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; color: var(--ink); font-weight: 800; }
.public-footer a:hover { color: var(--red-deep); }
.public-footer svg { width: 1rem; height: 1rem; }

.share-dialog { position: fixed; width: min(100% - 2rem, 26rem); padding: 1.3rem; border: 0; border-radius: var(--radius); box-shadow: 0 24px 100px #1c15145e; }
.share-dialog::backdrop { background: #1816199e; }
.share-dialog h2 { margin: .2rem 2.7rem 1.1rem 0; font-size: 1.45rem; }
.share-dialog .close-dialog { position: absolute; top: .75rem; right: .75rem; }
.share-dialog .primary { margin-top: .85rem; }
.share-status { color: var(--muted); margin-top: .6rem; }

.empty, .muted { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: .45rem; }
.login-shell { display: grid; justify-items: center; width: min(100% - 2rem, 72rem); margin: clamp(1.4rem, 8vw, 5rem) auto; }
.login-card { width: min(100%, 29rem); padding: clamp(1.1rem, 5vw, 2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px #1c15140b; }
.login-icon { width: 51px; height: 51px; display: grid; place-items: center; margin-bottom: .85rem; border-radius: 11px; background: var(--red-soft); color: var(--red-deep); }
.login-card h1, .admin-heading h1 { font-size: clamp(1.75rem, 5vw, 2.45rem); letter-spacing: -.055em; line-height: 1.12; }
.login-card > p { margin-top: .55rem; color: var(--muted); }
.login-form { display: grid; gap: .8rem; margin-top: 1.2rem; }
.admin-shell { width: min(100% - 2rem, 69rem); margin: 1.1rem auto 3rem; }
.admin-sidebar { margin-bottom: 1.25rem; }
.admin-sidebar nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.dashboard-brand { display: none; color: var(--muted); font-size: .875rem; font-weight: 800; }
.side-link { display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .38rem .65rem; border-radius: 8px; font-size: .875rem; font-weight: 800; color: var(--muted); }
.side-link[aria-current="page"], .side-link:hover { color: var(--red-deep); background: var(--red-soft); }
.side-link svg { width: 1rem; height: 1rem; }
.admin-main { min-width: 0; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem; margin-bottom: 1rem; }
.admin-heading p { margin-top: .35rem; color: var(--muted); font-size: .875rem; }
.admin-panel, .admin-entry { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-panel { margin-bottom: .75rem; scroll-margin-top: .85rem; }
.admin-panel.empty, .group-create, .group-editor, .profile-form { padding: .9rem; }
.create-panel > summary, .entry-details summary { display: flex; align-items: center; justify-content: flex-start; gap: .45rem; font-weight: 800; }
.create-panel > summary { padding: .75rem .8rem; min-height: 48px; }
.create-panel > summary > svg:last-child, .entry-details summary svg { margin-left: auto; }
details[open] > summary > svg:last-child { transform: rotate(180deg); }
.create-panel .edit-form, .entry-details .edit-form { border-top: 1px solid var(--line); padding: .85rem; }
.edit-form { display: grid; gap: .8rem; }
.edit-form > .button { justify-self: start; }
.field-grid { display: grid; gap: .75rem .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; color: var(--ink); font-size: .875rem; font-weight: 800; }
input:not([type="hidden"], [type="checkbox"]), select {
    width: 100%;
    min-height: 44px;
    max-width: 100%;
    padding: .55rem .65rem;
    background: var(--paper);
    border: 1px solid #c7c2bb;
    border-radius: 8px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 400;
}
select { appearance: none; padding-right: 2rem; background-image: url("chevron.svg"); background-repeat: no-repeat; background-size: 1rem; background-position: right .6rem center; }
.checkbox { display: flex; align-items: center; min-height: 44px; gap: .55rem; }
.checkbox input { appearance: auto; width: 1.15rem; height: 1.15rem; accent-color: var(--red); }
.search-field { margin-top: 1rem; }
.admin-group { margin-top: 1.3rem; }
.admin-group h2 { margin-bottom: .5rem; font-size: 1.15rem; }
.admin-group h2 span { color: var(--muted); font-size: .8125rem; margin-left: .2rem; }
.admin-entry { margin-bottom: .5rem; }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; padding: .68rem .72rem .42rem; }
.entry-title { flex: 1 1 13rem; min-width: 0; overflow-wrap: anywhere; }
.entry-title h3 { font-size: .96rem; line-height: 1.32; }
.entry-state { color: var(--muted); font-size: .8125rem; font-weight: 800; }
.entry-state.is-live { color: #176041; }
.entry-controls { display: flex; flex-wrap: wrap; gap: .33rem; }
.entry-details summary { min-height: 44px; padding: .25rem .72rem; color: var(--red-deep); font-size: .875rem; }
.entry-details summary:hover { background: var(--red-soft); border-radius: 0 0 var(--radius) var(--radius); }
.entry-details summary svg { width: .95rem; }
.archive-form { padding: 0 .85rem .85rem; }
.group-create, .group-editor, .group-editor form { display: flex; align-items: end; flex-wrap: wrap; gap: .45rem; }
.group-create label, .group-editor form:first-child, .group-editor label { flex: 1; min-width: 10rem; }
.group-create, .profile-form, .admin-main > .muted { margin-bottom: .85rem; }
.notice { display: flex; align-items: center; gap: .45rem; padding: .62rem .73rem; margin: .65rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: .94rem; }
.notice.error { border-color: #efb2ae; color: #8a1616; background: var(--red-soft); }
.notice.success { border-color: #b7d7c8; color: #176041; background: #edf8f2; }

@media (min-width: 600px) {
    .top-inner, .public-shell, .public-footer { width: min(100% - 3rem, 72rem); }
    .top-inner { min-height: 75px; }
    .logo img { width: 146px; }
    .public-shell { margin-top: 1.6rem; }
    .feature-text { padding-inline: 1rem; }
    .link-row { padding-inline: .93rem; }
    .admin-shell { width: min(100% - 3rem, 69rem); }
}
@media (min-width: 810px) {
    .public-shell { display: grid; grid-template-columns: minmax(0, .71fr) minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3.7rem); align-items: start; margin-top: 2.3rem; }
    .profile { position: sticky; top: 1.2rem; }
    .profile-card { min-height: clamp(340px, 35vw, 445px); }
    .profile-photo { object-position: 31% 39%; }
    .profile h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); max-width: 10ch; }
    .profile-copy { padding: clamp(1.25rem, 3vw, 2.05rem); }
    .content { margin-top: 0; }
    .social-block { padding-top: .9rem; }
    .link-section + .link-section { margin-top: 2.35rem; }
    .admin-shell { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 1.6rem; margin-top: 1.75rem; }
    .admin-sidebar { border-right: 1px solid var(--line); padding-right: .8rem; min-height: 62vh; margin: 0; }
    .admin-sidebar nav { display: grid; }
    .dashboard-brand { display: block; margin: .3rem 0 .5rem .65rem; }
}
@media (min-width: 1040px) {
    .row-art { flex-basis: 48px; width: 48px; }
    .entry-head { flex-wrap: nowrap; }
}
@media (max-width: 450px) {
    .admin-top .logo img { width: 110px; }
    .logout-button { width: 44px; padding: 0; }
    .logout-button span { display: none; }
}
@media (max-width: 370px) {
    .top-inner, .public-shell, .public-footer, .admin-shell { width: calc(100% - 1.2rem); }
    .admin-top .logo img { width: 96px; }
    .top-actions .button { font-size: .8125rem; padding-inline: .55rem; }
    .field-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; }
}
