:root {
    color-scheme: dark;
    font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
    color: #f4f6ff;
    background: #0c1120;
    --ink: #f4f6ff;
    --muted: #aab6d0;
    --blue: #a9baff;
    --line: #2b3858;
    --panel: #151f38;
}
* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
main { flex: 1; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #b9c6ff; outline-offset: 4px; }

.masthead {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid #6c8af074;
    background: linear-gradient(110deg, #00479e, #193c95 62%, #3d53bb);
}
.masthead-inner, .content-section, .footer-inner { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.masthead-inner { min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(1.5rem, 4vw, 3.25rem); }
.wordmark { display: inline-flex; align-items: center; justify-self: start; gap: 10px; white-space: nowrap; font-size: 1.3rem; font-weight: 760; letter-spacing: -.03em; }
.wordmark img { display: block; border-radius: 10px; }
.socials { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(1.05rem, 4vw, 2.4rem); }
.socials :is(a, span) { font-size: .94rem; font-weight: 600; }
.socials a:hover { text-decoration: underline; text-underline-offset: 4px; }
.socials span { color: #bdc9f1; }
.menu-wrap { position: relative; justify-self: end; }
.menu-toggle { width: 46px; height: 46px; display: grid; place-content: center; gap: 5px; padding: 0; border: 1px solid #bcc9ff66; border-radius: 12px; color: #fff; background: #0a24645c; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: #162958; border-color: #b9c6ff; }
.menu-toggle span { width: 19px; height: 2px; border-radius: 2px; background: currentColor; }
.site-menu { position: absolute; top: calc(100% + 10px); right: 0; width: min(244px, calc(100vw - 30px)); padding: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 16px 40px #0007; }
.menu-group { padding: 3px; }
.menu-group + .menu-group { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 9px; }
.site-menu :is(button, a) { display: block; width: 100%; padding: 9px 10px; color: var(--ink); background: none; border: 0; border-radius: 8px; text-align: left; font-size: .94rem; }
.site-menu :is(button, a):hover { background: #253356; color: #fff; }
.site-menu p { margin: 5px 10px; overflow-wrap: anywhere; }
.site-menu #account-profile { display: grid; gap: 2px; margin-bottom: 4px; padding: 9px 11px; border: 1px solid #526bc3; border-radius: 9px; background: #293e79; }
.site-menu #account-profile:hover { background: #354d90; }
#account-name { color: #fff; font-size: 1.08rem; overflow-wrap: anywhere; }
#account-profile > span { color: #d0d9ff; font-size: .85rem; }
.menu-sites h2 { margin: 0 10px 2px; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.menu-sites a { display: flex; justify-content: space-between; }
.menu-sites a span { color: var(--blue); }

.content-section { padding-block-start: clamp(2.9rem, 7vw, 5.25rem); }
.about-section { padding-block-start: clamp(1.75rem, 4vw, 3.25rem); }
.about-section h2 { padding-bottom: .8rem; border-bottom: 1px solid #596173; text-transform: uppercase; }
.about-section p { max-width: 70ch; margin: 0 0 .85rem; color: var(--muted); }
.about-source { color: var(--blue); font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
#projects { padding-block-start: clamp(1.75rem, 4vw, 3.25rem); }
.content-section h2 { margin: 0 0 1.25rem; font-size: clamp(1.55rem, 4vw, 2.15rem); line-height: 1.2; letter-spacing: -.025em; }
#projects-title { text-transform: uppercase; }
.project-grid, .team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card, .team-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #141d32; }
.project-card { display: flex; flex-direction: column; transition: border-color .18s ease; }
.project-card:hover { border-color: #839cff; }
.project-art { position: relative; display: grid; place-items: center; min-height: 165px; overflow: hidden; background: radial-gradient(ellipse at 62% 100%, #334c9e, #192a58 77%); }
.board-preview { position: relative; display: block; width: 65%; height: 118px; border: 1px solid #738acd; border-radius: 10px; background: radial-gradient(circle, #4b5e92 1px, transparent 1.5px) 0 0 / 12px 12px, #131f3d; transform: rotate(-7deg); box-shadow: 4px 10px 24px #080e2c8c; }
.board-toolbar { position: absolute; top: 12px; left: 12px; width: 15px; height: 58px; border-radius: 4px; background: radial-gradient(circle, #93a9f4 1px, transparent 2px) center / 10px 11px repeat-y, #2a3b69; }
.board-note { position: absolute; left: 21%; top: 28px; width: 24%; height: 48px; border-radius: 5px; background: linear-gradient(#b1c2ff 0 0) 8px 12px / 50% 2px no-repeat, linear-gradient(#b1c2ff 0 0) 8px 21px / 63% 2px no-repeat, #4362c4; transform: rotate(8deg); }
.board-graph { position: absolute; right: 10%; top: 25px; width: 39%; height: 62px; border: 1px solid #657eb5; border-radius: 4px; background: linear-gradient(90deg, transparent 41%, #7794d1 41% 43%, transparent 43%), linear-gradient(transparent 57%, #7794d1 57% 59%, transparent 59%), #1c2c56; }
.board-graph::after { content: ""; position: absolute; inset: 8px 4px 0; background: #a5baff; clip-path: polygon(0 74%, 15% 61%, 29% 53%, 42% 53%, 56% 60%, 69% 65%, 82% 56%, 100% 20%, 100% 26%, 84% 61%, 69% 70%, 55% 65%, 41% 58%, 30% 58%, 17% 66%, 0 80%); }
.project-copy { display: grid; gap: 7px; padding: 17px 19px 20px; }
.project-copy h3, .team-copy h3 { margin: 0; font-size: 1.23rem; overflow-wrap: anywhere; }
.project-copy p, .team-copy p { margin: 0; color: var(--muted); font-size: .95rem; }
.project-action { margin-top: 5px; color: var(--blue); font-size: .92rem; font-weight: 700; }
.project-action span { margin-left: 4px; }

.team-grid { margin: 0; padding: 0; list-style: none; }
.team-profile { display: block; height: 100%; }
.team-card:hover { border-color: #839cff; }
.team-profile:focus-visible { outline-offset: -4px; border-radius: 15px; }
.skin-stage { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; height: 244px; overflow: hidden; border-bottom: 1px solid #2b3858; background: radial-gradient(ellipse at 50% 45%, #263864, #17223b 73%); }
.skin-stage img { display: block; width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.team-copy { display: grid; align-content: start; gap: 3px; min-height: 83px; padding: 14px 18px 15px; }

.profile-section :is(.profile-card, .profile-comments) { width: min(100%, 580px); }
.profile-back { display: inline-block; margin-bottom: 1rem; color: var(--blue); }
.profile-back:hover { text-decoration: underline; }
.profile-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #141d32; }
.profile-copy { padding: clamp(1.25rem, 4vw, 2rem); }
.profile-identity { display: flex; align-items: center; gap: clamp(.75rem, 3vw, 1.35rem); }
.profile-name { min-width: 0; }
.profile-avatar { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: clamp(58px, 16vw, 96px); aspect-ratio: 1; overflow: hidden; border: 1px solid #536ba7; border-radius: 50%; background: #243966; color: #dae5ff; font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 750; }
.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-copy h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.35rem); line-height: 1.2; overflow-wrap: anywhere; }
.profile-copy p { margin: .6rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.profile-copy > button { margin-top: 1.2rem; }
#profile-avatar-form { display: grid; justify-items: start; gap: .55rem; margin-top: .85rem; }
#profile-avatar-file { width: 100%; min-width: 0; }
#avatar-help { color: var(--muted); }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
#profile-avatar-status { margin: 0; }
#profile-avatar-status.error { color: #ffa5b1; }
.profile-role { display: inline-block; margin-top: .55rem; padding: .2rem .65rem; border: 1px solid #52658d; border-radius: 999px; color: #dbe6ff; background: #233452; font-size: .83rem; font-weight: 700; }
.profile-role[data-role="OWNER"] { color: #ffe8aa; border-color: #9b762c; background: #422e0d; }
.profile-role[data-role="ADMIN"] { color: #ffd6e9; border-color: #935580; background: #48223f; }
.profile-role[data-role="DEVELOPER"] { color: #beedff; border-color: #377d94; background: #173b52; }
.profile-role-form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.profile-role-form :is(select, input), #profile-comment-body { color: inherit; background: #10192d; border: 1px solid #485c85; border-radius: 8px; font: inherit; }
.profile-role-form :is(select, input) { min-height: 43px; max-width: 100%; padding: .4rem .6rem; }
.profile-comments { margin-top: 1.15rem; padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 16px; background: #141d32; }
.profile-comments h2 { margin-bottom: .85rem; font-size: 1.4rem; }
#profile-comment-form { display: grid; gap: .55rem; justify-items: start; }
#profile-comment-body { width: 100%; min-height: 6rem; padding: .65rem .75rem; resize: vertical; }
#profile-comment-list { display: grid; gap: .65rem; margin: .9rem 0 0; padding: 0; list-style: none; }
#profile-comment-list li { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
#profile-comment-list header { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
#profile-comment-list a { color: var(--blue); font-weight: 650; overflow-wrap: anywhere; }
#profile-comment-list a:hover { text-decoration: underline; }
#profile-comment-list time, #profile-no-comments { color: var(--muted); font-size: .9rem; }
#profile-comment-list p { margin: .4rem 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-secondary { padding: .35rem .65rem; border: 1px solid #485c85; border-radius: 8px; background: #1d2b47; color: var(--ink); font-size: .88rem; }
.profile-secondary:hover { background: #2a3e64; }
#profile-comment-list header button { margin-inline-start: auto; }
#profile-more-comments { margin-top: .75rem; }

.site-footer { margin-top: clamp(3rem, 7vw, 5.4rem); background: #080808; border-top: 1px solid #272727; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 1.5rem 2.5rem; padding-block: 2.4rem 1.7rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem 1.2rem; color: #ddd; font-size: .92rem; }
.footer-inner nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-inner small { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid #272727; color: #a8a8a8; }

:is(#account-dialog, #profile-settings) { width: min(425px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: clamp(1.1rem, 5vw, 1.8rem); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 24px 75px #0008; }
:is(#account-dialog, #profile-settings)::backdrop { background: #080e23b8; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-head h2 { margin: 0; font-size: 1.53rem; letter-spacing: -.04em; line-height: 1.2; }
.close { flex: 0 0 35px; height: 35px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: #263452; font-size: 1.4rem; line-height: 1; }
#account-form { display: grid; gap: 12px; margin-top: 18px; }
#account-form label { display: grid; gap: 4px; color: var(--muted); font-size: .91rem; font-weight: 600; }
#account-form input { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #485c85; border-radius: 8px; color: var(--ink); background: #10192d; font-size: 1rem; font-weight: 400; }
.primary { min-height: 43px; border: 0; border-radius: 8px; padding: 7px 14px; background: #4261e1; color: #fff; font-weight: 650; }
.primary:hover { background: #4e6ded; }
.primary:disabled { opacity: .65; cursor: wait; }
.account-switch { color: var(--muted); font-size: .93rem; margin: 14px 0 0; }
.account-switch button { padding: 0; border: 0; background: none; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.help, .error { margin: 0; font-size: .87rem; }
.help { color: var(--muted); }
.error { color: #ffa5b1; }

@media (max-width: 850px) {
    .project-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .masthead-inner, .content-section, .footer-inner { width: calc(100% - 30px); }
    .masthead-inner { min-height: 0; padding-block: 10px 12px; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 8px; }
    .socials { grid-column: 1 / -1; grid-row: 2; }
    .menu-wrap { grid-column: 2; grid-row: 1; }
    .project-grid { grid-template-columns: 1fr; }
    .team-grid { gap: 11px; }
    .skin-stage { height: clamp(154px, 43vw, 220px); }
    .team-copy { padding-inline: 11px; }
    .team-copy h3 { font-size: clamp(.94rem, 3.55vw, 1.2rem); }
    .footer-inner { grid-template-columns: 1fr; gap: 1rem; }
    .footer-inner nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .project-card { transition: none; }
}

/* Studio front page */
.masthead { background: #101f55; border-bottom-color: #5066a8; }
.menu-toggle { border-radius: 50%; }
#home-content { background: #edf0fa; color: #101e4b; padding-bottom: clamp(3rem, 7vw, 6rem); }
body:has(#home-content:not([hidden])) .site-footer { margin-top: 0; }
.studio-cover { overflow: hidden; background: #244dd3; color: #fff; }
.studio-inner { width: min(1160px, calc(100% - 64px)); margin: auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 4%; align-items: center; padding-block: clamp(3rem, 6vw, 6rem); }
.studio-intro h1 { margin: 0; font-family: Arial, sans-serif; font-size: clamp(5.5rem, 10vw, 9.5rem); line-height: .8; letter-spacing: -.085em; }
.studio-intro h1 i { font-family: Georgia, serif; font-weight: normal; color: #d8e0ff; }
.studio-intro p { max-width: 29ch; margin: 1.8rem 0 1.4rem; font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.cover-link { display: inline-flex; align-items: center; gap: 1.8rem; border-radius: 2rem; padding: .7rem 1.15rem; background: #fff; color: #193cab; font-weight: 650; }
.cover-link:hover { background: #d9e4ff; }
.studio-portraits { position: relative; isolation: isolate; aspect-ratio: 1.38; }
.studio-portraits figure { position: absolute; margin: 0; width: 55%; padding: 2% 2% 0; background: #fbfaff; color: #152959; box-shadow: 0 12px 28px #10266555; }
.studio-portraits figure:first-child { left: 3%; top: 0; transform: rotate(-7deg); }
.studio-portraits figure:last-child { right: 1%; bottom: 0; width: 45%; transform: rotate(8deg); background: #d5ddff; }
.studio-portraits img { display: block; width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; }
.studio-portraits figcaption { padding: .35em .1em .5em; font: italic clamp(.95rem, 2vw, 1.35rem) Georgia, serif; }
#home-content .content-section { padding-top: clamp(3rem, 7vw, 6rem); }
#home-content .content-section h2 { font-size: clamp(2rem, 5vw, 4.4rem); letter-spacing: -.055em; line-height: 1; text-transform: none; }
.about-section { display: grid; grid-template-columns: .9fr 1.55fr; gap: .85rem 7%; }
.about-section h2 { grid-row: span 3; border: 0; }
.about-section p, .about-source { grid-column: 2; margin: 0; color: #314269; }
.about-source { color: #2048a4; }
#home-content .project-grid { grid-template-columns: 1fr; }
#home-content .project-card { display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border: 0; color: #101e4b; }
.project-art { min-height: 245px; background: #c4ceff; }
.board-preview { max-width: 320px; height: 145px; }
.project-copy { padding: clamp(1.5rem, 4vw, 3.5rem); align-content: center; }
.project-copy h3 { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.06em; }
.project-copy p, .team-copy p { color: #47577b; }
.project-action { color: #244dd3; }
.trailer-section { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 5%; }
.trailer-copy { border-top: 2px solid #244dd3; padding-top: 1rem; }
.trailer-copy > span { color: #2848a0; font-weight: 650; }
#home-content #trailer-title { font-size: clamp(3rem, 6.5vw, 6rem); margin: 1rem 0; }
.trailer-copy p { color: #47577b; }
.trailer-section video { width: 100%; aspect-ratio: 4 / 3; background: #081023; border-radius: 12px; }
.team-card { background: white; border-color: #d2d9ed; }
.skin-stage { background: #dae1fb; border-color: #cbd4ee; }
.team-card:nth-child(even) .skin-stage { background: #c2cdf7; }
@media (max-width: 650px) {
    .studio-inner { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 2rem; }
    .studio-portraits { width: min(92%, 410px); justify-self: center; }
    .about-section, .trailer-section, #home-content .project-card { grid-template-columns: 1fr; }
    .about-section h2, .about-section p, .about-source { grid-column: 1; grid-row: auto; }
    .trailer-section { gap: 1rem; }
    .trailer-copy h2 br { display: none; }
    .project-art { min-height: 200px; }
}

/* Profile uses the studio cover and paper surfaces of the home page. */
body:has(#profile:not([hidden])) { background: #edf0fa; }
#profile, #profile-settings, #people-dialog {
    --ink: #101e4b; --muted: #47577b; --blue: #244dd3; --line: #cbd4ee;
    color: var(--ink); color-scheme: light;
}
#profile { padding-top: clamp(1.5rem, 4vw, 3.25rem); }
.profile-card { background: white; border-color: var(--line); }
.profile-identity { margin: calc(-1 * clamp(1.25rem, 4vw, 2rem)); margin-bottom: 0; padding: clamp(1.25rem, 4vw, 2rem); background: #244dd3; color: white; }
.profile-identity .profile-avatar { border: 4px solid white; color: #152959; background: #d5ddff; }
.profile-copy #profile-description { color: #eef2ff; white-space: pre-wrap; }
#profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 1rem; border-bottom: 1px solid var(--line); }
#profile-stats > * { display: grid; text-align: left; padding: .65rem 0; background: none; color: var(--muted); border: 0; font: inherit; font-size: clamp(.75rem, 2vw, .9rem); }
#profile-stats strong { color: var(--ink); font-size: 1.55rem; }
#profile-stats button:hover { color: var(--blue); text-decoration: underline; }
.profile-comments { background: white; }
#profile :is(select,input,textarea), #profile-settings :is(input:not([type=file]),textarea) { border: 1px solid #9caaca; background: #f8f9ff; color: #101e4b; border-radius: 8px; font: inherit; padding: .65rem; }
:is(#profile,#profile-settings,#people-dialog) .profile-secondary { background: #eef1fd; color: #163ca9; border-color: #bbc8ee; border-radius: 2rem; }
:is(#profile,#profile-settings) .primary { border-radius: 2rem; background: #244dd3; padding-inline: 1.15rem; }
#profile-settings, #people-dialog { background: #fff; border: 1px solid var(--line); }
#people-dialog { width: min(425px, calc(100% - 28px)); padding: 1.5rem; border-radius: 17px; max-height: 80dvh; }
#people-dialog::backdrop { background: #080e23b8; }
#people-list { padding: 0; list-style: none; }
#people-list a { display: block; padding: .65rem 0; color: var(--blue); border-bottom: 1px solid var(--line); }
#profile-settings > form { display: grid; gap: .5rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#profile-settings form > button { justify-self: start; }
#profile-settings h3 { margin: 0; }
#profile-settings textarea { resize: vertical; }
#profile-settings :is(input,textarea) { width: 100%; min-width: 0; }
#profile-settings .close, #people-dialog .close { background: #e7ecfc; color: #193cab; }
#profile-avatar-status.error { color: #932140; }

.profile-layout { display:grid; grid-template-columns: minmax(260px, .8fr) minmax(0,1.35fr); gap:clamp(1.1rem,3vw,3rem); align-items:start; }
.profile-sidebar { min-width:0; }
#profile .profile-card, #profile .profile-comments { width:100%; }
#post-feed { min-width:0; }
#post-feed h2 { font-size:clamp(2rem,4vw,3rem); margin:0 0 1rem; letter-spacing:-.055em; }
.paper-block { padding:clamp(1rem,2.6vw,2rem); border:1px solid var(--line); border-radius:16px; background:white; }
#post-compose,.post-card form { display:grid; gap:.75rem; }
#post-compose > button,.post-card form button { justify-self:start; }
#post-compose label:first-child { font-size:1.25rem; font-weight:700; }
#post-compose input[type=file] { width:100%; }
#post-compose details { color:var(--muted); }
#post-compose summary { color:var(--blue); cursor:pointer; }
#post-feed textarea { resize:vertical; width:100%; }
#post-list { display:grid; gap:1rem; }
.post-card header,.post-actions { display:flex; flex-wrap:wrap; gap:.6rem 1rem; align-items:center; }
.post-card header a { font-weight:700; color:var(--blue); }
.post-card time { color:var(--muted); font-size:.85rem; }
.post-body { white-space:pre-wrap; overflow-wrap:anywhere; }
.post-body:empty { display:none; }
.post-card img { display:block; max-width:100%; max-height:520px; margin:1rem auto; border-radius:10px; }
.post-actions { margin-top:1rem; }
.post-actions button[aria-pressed=true] { color:white !important; background:#244dd3 !important; }
.post-card section { border-top:1px solid var(--line); margin-top:1rem; padding-top:.8rem; }
.post-card section article { border-bottom:1px solid var(--line); padding-block:.6rem; }
.post-card form { margin-top:.8rem; }
.comment-quote { background:transparent; border:0; padding:.25rem .5rem; color:var(--blue); font-size:1.1rem; cursor:pointer; }
.post-card section article:focus { outline:2px solid var(--blue); outline-offset:2px; }
.settings-tabs { display:flex; gap:.4rem; padding:.3rem; background:#edf0fa; border-radius:2rem; margin-top:1rem; }
.settings-tabs button { flex:1; border:0; color:#233867; background:transparent; border-radius:2rem; padding:.55rem; }
.settings-tabs button[aria-pressed=true] { background:#244dd3; color:white; }
#avatar-crop { width:100%; }
#crop-preview { display:block; width:min(100%,210px); height:auto; border-radius:50%; background:#dde4f4; margin:.7rem auto; touch-action:none; cursor:grab; }
#avatar-crop label { display:block; }
@media(max-width:760px){ .profile-layout { grid-template-columns:minmax(0,1fr); } }

.profile-badges { display:flex; flex-wrap:wrap; gap:.35rem; }
#manage-roles { display:inline-block; margin-top:1rem; }
.admin-page { background:#edf0fa; color:#101e4b; color-scheme:light; }
.admin-page header { color:white; }
.admin-page main { padding-bottom:3rem; }
.admin-page h1 { font-size:clamp(2.4rem,5vw,4rem); letter-spacing:-.055em; }
.admin-grid { display:grid; grid-template-columns:1.15fr 1fr; gap:1.5rem; align-items:start; }
.admin-grid fieldset { border:0; margin:0; padding:0; }
.admin-grid label { display:block; margin:.85rem 0; }
.admin-grid input:not([type=checkbox]), .admin-grid select { display:block; padding:.6rem; margin:.25rem 0; width:100%; border:1px solid #aab6d0; border-radius:8px; background:#f8f9ff; color:inherit; font:inherit; }
.admin-grid button,.admin-grid output { display:block; margin-top:1rem; }
.admin-grid output { color:#314269; }
.admin-grid input[type=checkbox] { accent-color:#244dd3; }
@media(max-width:750px){ .admin-grid { grid-template-columns:minmax(0,1fr); } }

.menu-toggle.has-notices { position:relative; }
.menu-toggle.has-notices::after { content:''; position:absolute; top:1px; right:1px; width:9px; height:9px; border:2px solid #172b62; border-radius:50%; background:#d0d9ff; }
#notice-count:not(:empty) { border-radius:1rem; padding:1px 7px; background:#4361c3; color:white; }
#notifications { color-scheme:light; width:min(480px,calc(100% - 28px)); max-height:80dvh; border:1px solid #cbd4ee; border-radius:17px; padding:1.5rem; color:#101e4b; background:white; }
#notifications::backdrop { background:#080e23b8; }
#notice-list { padding:0; list-style:none; }
#notice-list a { display:block; padding:.8rem; border-bottom:1px solid #dae0ef; overflow-wrap:anywhere; }
#notice-list a:hover,.new-notice { background:#edf1ff; }
#notice-list time { display:block; color:#47577b; font-size:.82rem; }
#notice-list p { margin:.25rem 0; }

.menu-wrap { display:flex; align-items:center; gap:clamp(10px,2vw,24px); }
.notice-wrap { position:relative; }
#notifications-open { position:relative; display:grid; place-items:center; width:44px; height:44px; border:1px solid #bcc9ff66; border-radius:50%; color:white; background:transparent; }
#notifications-open:hover,#notifications-open[aria-expanded=true] { background:#26396f; }
#notice-count:not(:empty) { position:absolute; right:-5px; top:-4px; font-size:.7rem; }
#notifications { position:absolute; z-index:5; right:0; top:calc(100% + 10px); width:min(390px,calc(100vw - 32px)); max-height:min(65vh,520px); overflow:auto; box-shadow:0 12px 35px #07112d38; }
@media(max-width:620px){ #notifications { right:-56px; } }
.comment-branch { margin:.6rem 0 0 min(2vw,16px); padding-left:.7rem; border-left:2px solid #cad5f7; }
.comment-branch .comment-branch .comment-branch { margin-left:0; padding-left:0; border-left:0; }
.post-pin { color:#244dd3; font-size:.85rem; font-weight:700; }

.vibe-art { background:#253e88; }
.vibe-art pre { padding:1.4rem; background:#141d34; color:#e1e7ff; border:1px solid #627ab2; border-radius:12px; transform:rotate(-4deg); font:clamp(.9rem,2vw,1.35rem)/1.7 Consolas,monospace; }
.vibe-art em { color:#a6aaff; }.vibe-art b { color:#8edccf; font-weight:500; }
