.friend-theme-sky { --friend-wash:#e8f6ff; --friend-dot:#78beda; }
.friend-theme-pink { --friend-wash:#fff0f4; --friend-dot:#e995b2; }
.friend-theme-amber { --friend-wash:#fff6db; --friend-dot:#e6be4d; }
.friend-theme-violet { --friend-wash:#f0ebff; --friend-dot:#b4a0dd; }
.friend-theme-peach { --friend-wash:#fff0e6; --friend-dot:#efa268; }
.friend-theme-mint { --friend-wash:#ebf5e9; --friend-dot:#89b47b; }
.friend-theme-sand { --friend-wash:#f5f1eb; --friend-dot:#c9b397; }
.friend-theme-rose { --friend-wash:#ffedec; --friend-dot:#df7e79; }
.friends-page { padding-bottom:80px; }
.friends-welcome { display:grid; grid-template-columns:.9fr 1.1fr; gap:55px; align-items:center; padding:25px 0 75px; }
.friends-no-stage { grid-template-columns:minmax(0,1fr); }
.friends-welcome h1 { font-size:clamp(33px,3.5vw,53px); line-height:1.48; font-weight:800; letter-spacing:-.025em; }
.friends-welcome-copy>p { max-width:42ch; font-size:16px; line-height:2; color:var(--muted); margin:22px 0 27px; }
.friends-welcome .button-row { gap:24px; flex-wrap:wrap; }
.friends-welcome-note { display:flex; gap:17px; align-items:center; margin-top:35px; font-size:12px; line-height:1.8; color:var(--muted); }
.friends-welcome-note>span:first-child { font-size:38px; line-height:1; color:#42788b; }
.friends-stage { position:relative; isolation:isolate; height:430px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; align-items:end; }
.friends-stage:before { content:""; position:absolute; inset:75px -8px 10px; background:var(--blue-light); border-radius:50%; z-index:-1; }
.friends-stage-buddy { position:relative; display:flex; flex-direction:column; align-items:center; min-width:0; padding-top:15px; transition:transform .3s cubic-bezier(.22,1,.36,1); }
.friends-stage-buddy:hover { transform:translateY(-7px); }
.friends-stage-buddy-0 { order:2; z-index:2; margin-bottom:8px; }
.friends-stage-buddy-1 { order:1; margin-bottom:20px; }
.friends-stage-buddy-2 { order:3; margin-bottom:28px; }
.friends-stage-art { width:150%; pointer-events:none; }
.friends-stage-art>img { width:100%; height:340px; object-fit:contain; }
.friends-stage-buddy-0 .friends-stage-art>img { height:385px; }
.friends-stage-buddy>span { position:relative; background:white; padding:5px 12px; border-radius:5px; font-size:12px; font-weight:600; margin-top:-15px; }
.friends-stage-spark { position:absolute; top:20px; right:22px; color:#4a7c91; font-size:48px; line-height:1; }
.friends-collection { padding-top:40px; border-top:1px solid var(--line); scroll-margin-top:15px; }
.friends-toolbar { display:flex; justify-content:space-between; align-items:center; gap:25px; margin-bottom:25px; }
.friends-toolbar h2 { font-size:30px; line-height:1.5; font-weight:750; letter-spacing:-.015em; }
.friends-toolbar p { font-size:13px; color:var(--muted); margin-top:8px; }
.friends-search { display:flex; gap:10px; align-items:center; width:390px; max-width:100%; }
.friends-search .search-field { min-width:0; flex:1; }
.friends-search .search-field input { width:100%; min-width:0; }
.friends-search .button { padding-inline:18px; }
.friends-filter { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:34px; }
.friends-filter>a { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--line); border-radius:6px; font-size:12px; }
.friends-filter>a:hover,.friends-filter>a[aria-current] { background:var(--ink); border-color:var(--ink); color:white; }
.friend-color-dot { background:var(--friend-dot); width:10px; height:10px; border-radius:50%; display:inline-block; }
.friends-filter .friends-reset { border:0; margin-left:auto; text-decoration:underline; }
.friends-reset svg { width:14px; height:14px; }
.friends-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:44px 25px; }
.friend-card { min-width:0; }
.friend-card-link { display:block; }
.friend-art { background:var(--friend-wash,#e8f6ff); border-radius:12px; overflow:hidden; position:relative; display:flex; align-items:center; justify-content:center; height:300px; }
.friend-art>img { width:100%; height:100%; object-fit:contain; padding:15px 9px; transition:transform .4s cubic-bezier(.22,1,.36,1); }
.friend-card-link:hover .friend-art>img { transform:translateY(-5px) scale(1.035); }
.friend-card-info { position:relative; padding:20px 38px 0 2px; }
.friend-card-info h3 { font-size:23px; font-weight:750; letter-spacing:-.015em; line-height:1.5; overflow-wrap:anywhere; }
.friend-card-info p { font-size:12px; line-height:1.85; margin-top:7px; color:var(--muted); }
.friend-english { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
.friend-card-arrow { display:flex; align-items:center; justify-content:center; position:absolute; top:22px; right:0; width:28px; height:28px; border:1px solid var(--line); border-radius:50%; transition:background-color .2s; }
.friend-card-arrow svg { width:15px; height:15px; }
.friend-card-link:hover .friend-card-arrow { background:var(--blue-light); }
.friends-origin { margin-top:85px; background:#eee9ff; border-radius:12px; padding:45px 65px; display:grid; grid-template-columns:1fr 240px; gap:50px; align-items:center; }
.friends-origin>div>span { display:block; color:var(--muted); font-size:13px; margin-bottom:14px; }
.friends-origin h2 { font-size:32px; font-weight:750; line-height:1.6; letter-spacing:-.02em; }
.friends-origin p { font-size:14px; line-height:2; color:var(--muted); margin:15px 0 22px; }
.friends-origin>img { width:210px; height:250px; object-fit:cover; border-radius:8px; transform:rotate(4deg); }
.friend-detail .character-portrait { background:var(--friend-wash,#e8f6ff); }
.friend-detail .character-portrait img { height:520px; padding:24px; }
.page-characters .character-more .character-directory-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media(max-width:1150px) {
    .friends-welcome { gap:25px; }
    .friends-welcome h1 { font-size:38px; }
    .friends-stage { height:390px; }
    .friends-stage-art { width:130%; }
    .friends-stage-art>img { height:290px; }
    .friends-stage-buddy-0 .friends-stage-art>img { height:335px; }
    .friends-grid,.page-characters .character-more .character-directory-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .friends-toolbar { align-items:flex-start; }
    .friends-search { width:330px; }
    .friends-toolbar h2 { font-size:27px; }
}
@media(max-width:850px) {
    .friends-welcome { grid-template-columns:minmax(0,1fr); gap:15px; padding-bottom:50px; }
    .friends-welcome-copy>p { max-width:60ch; }
    .friends-welcome-note { display:none; }
    .friends-stage { width:100%; max-width:620px; margin-inline:auto; height:390px; }
    .friends-toolbar { flex-direction:column; align-items:stretch; gap:20px; }
    .friends-search { width:100%; max-width:500px; }
    .friends-origin { grid-template-columns:1fr 190px; padding:35px; gap:25px; }
    .friends-origin h2 { font-size:27px; }
    .friends-origin>img { width:175px; height:225px; }
}
@media(max-width:650px) {
    .friends-page { padding-bottom:45px; }
    .friends-welcome { padding-top:5px; }
    .friends-welcome h1 { font-size:clamp(31px,8vw,42px); }
    .friends-welcome-copy>p { font-size:15px; margin-block:18px 23px; }
    .friends-welcome .button-row { gap:18px; }
    .friends-stage { height:auto; min-height:250px; padding:35px 18px 0; }
    .friends-stage:before { inset:55px -2px 6px; }
    .friends-stage-art { width:130%; }
    .friends-stage-art>img { height:auto; max-height:235px; }
    .friends-stage-buddy-0 .friends-stage-art>img { height:auto; max-height:265px; }
    .friends-stage-buddy-1 { margin-bottom:10px; }
    .friends-stage-buddy-2 { margin-bottom:16px; }
    .friends-stage-buddy>span { font-size:10px; padding:4px 7px; margin-top:-18px; }
    .friends-stage-spark { font-size:32px; top:10px; right:10px; }
    .friends-collection { padding-top:30px; }
    .friends-toolbar h2 { font-size:26px; }
    .friends-filter { gap:8px; margin-bottom:25px; }
    .friends-filter>a { font-size:11px; padding:8px 11px; }
    .friends-filter .friends-reset { margin-left:0; }
    .friends-grid,.page-characters .character-more .character-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 14px; }
    .friend-art { height:230px; border-radius:9px; }
    .friend-art>img { padding:8px 0; }
    .friend-card-info { padding:13px 0 0; }
    .friend-card-info h3 { font-size:19px; }
    .friend-card-info p { font-size:11px; margin-top:5px; }
    .friend-card-arrow { display:none; }
    .friends-origin { margin-top:50px; padding:27px; grid-template-columns:minmax(0,1fr); gap:28px; }
    .friends-origin h2 { font-size:26px; }
    .friends-origin>img { width:130px; height:160px; justify-self:end; }
    .friend-detail .character-portrait img { height:400px; padding:15px; }
}
@media(max-width:380px) { .friend-art { height:190px; } .friend-card-info h3 { font-size:17px; } }
@media(prefers-reduced-motion:reduce) { .friends-stage-buddy,.friend-art>img { transition:none; } .friends-stage-buddy:hover,.friend-card-link:hover .friend-art>img { transform:none; } }
