/* Compact screening desk, with the original artwork visible in full. */
body.portfolio-edition :is(h1,h2,h3) { text-wrap:balance; orphans:2; widows:2; }
body.portfolio-edition :is(p,li,strong,small) { text-wrap:pretty; orphans:2; widows:2; }
html[lang='ja'] body.portfolio-edition :is(h1,h2,h3,p,li,strong,small) { line-break:strict; word-break:normal; }
body.portfolio-edition[data-page='videos'] main { margin-top:28px; }
body.portfolio-edition .intro { margin-bottom:20px; gap:24px; }
body.portfolio-edition .intro h1 { font-size:44px; line-height:1.15; letter-spacing:-.045em; }
body.portfolio-edition .intro p { font-size:14px; max-width:390px; }
body.portfolio-edition .browsing-tools { margin-bottom:20px; gap:18px; }
body.portfolio-edition .filters { padding:3px; }
body.portfolio-edition .filters button { padding:9px 15px; }
body.portfolio-edition .screening { grid-template-columns:minmax(0,1.9fr) minmax(300px,.85fr); gap:24px; }
body.portfolio-edition .current { padding:24px; border-radius:20px; background:var(--project-bg,#0b2025); --current-muted:var(--project-muted,#b7c9cd); --current-line:var(--project-line,#385057); }
body.portfolio-edition .current[data-project] { background:var(--project-bg,#0b2025); --current-muted:var(--project-muted,#b7c9cd); --current-line:var(--project-line,#385057); }
body.portfolio-edition .work-heading { margin-bottom:18px; gap:14px; }
body.portfolio-edition .work-heading h2 { margin-top:5px; font-size:36px; line-height:1.15; }
body.portfolio-edition #work-type { font-size:11px; }
body.portfolio-edition .media { border-radius:9px; }
body.portfolio-edition .work-role { font-size:11px; margin-top:16px; line-height:1.7; }
body.portfolio-edition .work-description { font-size:21px; line-height:1.5; margin-top:12px; max-width:68ch; }
html[lang='ja'] body.portfolio-edition .work-description { font-size:18px; line-height:1.85; }
body.portfolio-edition .work-note { font-size:12px; line-height:1.75; margin-top:12px; }
body.portfolio-edition .source-link { margin-top:8px; font-size:12px; }
body.portfolio-edition .festival-panel { margin-top:16px; padding-top:16px; }
body.portfolio-edition .festival-panel h3 { margin-bottom:8px; font-size:12px; }
body.portfolio-edition .festival-panel ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 20px; }
body.portfolio-edition .festival-panel li { margin:0; font-size:11px; line-height:1.7; }
body.portfolio-edition .festival-panel li:first-child { grid-column:1/-1; }
body.portfolio-edition .festival-panel a { font-size:11px; }
body.portfolio-edition .selection>h2 { font-size:21px; margin-bottom:12px; }
body.portfolio-edition .work-button { grid-template-columns:118px minmax(0,1fr); gap:14px; padding:10px 8px; min-height:92px; }
body.portfolio-edition .thumb { height:70px; }
body.portfolio-edition .work-button strong { font-size:15px; line-height:1.35; }
body.portfolio-edition .work-button small { margin-top:5px; font-size:10px; }
body.portfolio-edition .current[data-orientation='portrait'] { gap:0 22px; }
body.portfolio-edition .current[data-orientation='portrait'] .work-heading h2 { font-size:31px; }
body.portfolio-edition .current[data-orientation='portrait'] .work-description { font-size:19px; }
html[lang='ja'] body.portfolio-edition .current[data-orientation='portrait'] .work-description { font-size:17px; }
body.portfolio-edition footer { margin-top:48px; padding-top:22px; padding-bottom:22px; }
@media(max-width:1150px) {
 body.portfolio-edition .screening { grid-template-columns:minmax(0,1.7fr) minmax(270px,.9fr); gap:20px; }
 body.portfolio-edition .current { padding:22px; }
 body.portfolio-edition .work-button { grid-template-columns:95px minmax(0,1fr); gap:12px; }
 body.portfolio-edition .thumb { height:60px; }
}
@media(max-width:900px) {
 body.portfolio-edition .screening { display:block; }
 body.portfolio-edition .selection { margin-top:30px; }
 body.portfolio-edition #works { gap:14px; }
 body.portfolio-edition .work-button { display:flex; padding:8px; gap:10px; }
 body.portfolio-edition .work-button:first-child { padding-top:8px; }
 body.portfolio-edition .thumb { height:auto; }
}
@media(max-width:680px) {
 body.portfolio-edition[data-page='videos'] main { margin-top:20px; }
 body.portfolio-edition .intro { margin-bottom:18px; gap:10px; }
 body.portfolio-edition .intro h1,html[lang='ja'] body.portfolio-edition .intro h1 { font-size:31px; line-height:1.2; }
 body.portfolio-edition .intro p { font-size:13px; line-height:1.7; }
 body.portfolio-edition .browsing-tools { margin-bottom:18px; gap:6px; }
 body.portfolio-edition .filters button { font-size:11px; padding-inline:13px; }
 body.portfolio-edition .current { padding:18px; border-radius:15px; }
 body.portfolio-edition .work-heading { margin-bottom:14px; }
 body.portfolio-edition .work-heading h2,body.portfolio-edition .current[data-orientation='portrait'] .work-heading h2 { font-size:27px; line-height:1.2; }
 body.portfolio-edition .current[data-orientation='portrait'] .media { margin-top:14px; }
 body.portfolio-edition .current[data-orientation='portrait'] .work-description,body.portfolio-edition .work-description { font-size:18px; line-height:1.55; }
 html[lang='ja'] body.portfolio-edition .current[data-orientation='portrait'] .work-description,html[lang='ja'] body.portfolio-edition .work-description { font-size:16px; line-height:1.9; }
 body.portfolio-edition .current[data-orientation='portrait']>.media { max-height:57dvh; }
 body.portfolio-edition .work-role { margin-top:14px; }
 body.portfolio-edition .festival-panel ul { display:block; }
 body.portfolio-edition .festival-panel li+li { margin-top:10px; }
 body.portfolio-edition .selection { margin-top:28px; }
 body.portfolio-edition .selection>h2 { font-size:20px; }
 body.portfolio-edition #works { gap:12px 8px; }
 body.portfolio-edition .work-button { padding:7px; gap:8px; }
 body.portfolio-edition .work-button:first-child { padding-top:7px; }
 body.portfolio-edition .work-button strong { font-size:14px; }
 body.portfolio-edition .work-button small { font-size:10px; line-height:1.55; }
 body.portfolio-edition footer { margin-top:32px; gap:14px; padding-block:18px; }
}

/* Project tones sampled by eye from the adopted authentic stills. */
body.portfolio-edition .current[data-project="out-trailer"] { --project-bg:#081F23; --project-muted:#B9CDCD; --project-line:#708B8D; }
body.portfolio-edition .current[data-project="moonlight-poc"] { --project-bg:#2A1B16; --project-muted:#D5BDA5; --project-line:#8E7461; }
body.portfolio-edition .current[data-project="recipe-sample"] { --project-bg:#1E2A36; --project-muted:#AEC3CE; --project-line:#71869B; }
body.portfolio-edition .current[data-project="brother"] { --project-bg:#242424; --project-muted:#B8B8B8; --project-line:#7B7B7B; }
body.portfolio-edition .current[data-project="sparks"] { --project-bg:#2A2B1B; --project-muted:#BFB7A3; --project-line:#83825D; }
body.portfolio-edition .current[data-project="relic"] { --project-bg:#29211D; --project-muted:#C8B9A7; --project-line:#897B6B; }
body.portfolio-edition .current[data-project="man"] { --project-bg:#252B2A; --project-muted:#BEC9C5; --project-line:#7B8983; }
body.portfolio-edition .current[data-project="qms2go-brand-film"] { --project-bg:#162B2B; --project-muted:#B8CDCA; --project-line:#718D87; }
body.portfolio-edition .current[data-project="spec-cascade"] { --project-bg:#25343B; --project-muted:#BECDD3; --project-line:#7B919B; }
body.portfolio-edition .current[data-project="spec-semble"] { --project-bg:#30271E; --project-muted:#CDBEA7; --project-line:#8D7A60; }
body.portfolio-edition .current[data-project="spec-bluwave"] { --project-bg:#252D29; --project-muted:#C5C7B6; --project-line:#819078; }
body.portfolio-edition .current[data-project="spec-keith"] { --project-bg:#332D24; --project-muted:#CFC3AE; --project-line:#918671; }
body.portfolio-edition .current[data-project="spec-dili"] { --project-bg:#142E41; --project-muted:#B9CAD4; --project-line:#6D8BA1; }
body.portfolio-edition .current[data-project="spec-noxmetals"] { --project-bg:#222B30; --project-muted:#C2CCD2; --project-line:#81939D; }
body.portfolio-edition .current[data-project="spec-lunabill"] { --project-bg:#343026; --project-muted:#D4C8B5; --project-line:#968A74; }


/* Music-video tones follow their exact adopted frames. */

/* Full QMS explainer presentations follow their actual master frames. */
body.portfolio-edition .current[data-project="qms2go-what-is-api"] { --project-bg:#242b1f; --project-muted:#c8cfb9; --project-line:#808b71; }
body.portfolio-edition .current[data-project="qms2go-quality-defence"] { --project-bg:#10242c; --project-muted:#bfd0d8; --project-line:#78909b; }

/* Keep Japanese semantic units intact in compact QMS labels and descriptions. */
body.portfolio-edition .keep-phrase { display:inline-block; white-space:nowrap; }

/* Tohiko: the approved warm still determines the work background. */
body.portfolio-edition .current[data-project="tohiko"] { --project-bg:#3A1D16; --project-muted:#DAC1B1; --project-line:#8B5A42; }

/* Preserve the complete wide Tohiko composition without extra letterboxing. */
body.portfolio-edition .current[data-project="tohiko"]>.media { aspect-ratio:var(--frame-aspect,1280/513); }

/* Keep five compact work filters visible on small phones. */
@media(max-width:360px){body.portfolio-edition .filters button{padding-inline:10px;}}

/* Angelic Whistle: deep stadium green follows the inspected original title frame. */
body.portfolio-edition .current[data-project="angelic-whistle"] { --project-bg:#15291f; --project-muted:#ccd7b9; --project-line:#829676; }

/* Episodes stay grouped within their series, with one player and at most five columns. */
body.portfolio-edition .episode-panel { margin-top:18px; padding-top:16px; border-top:1px solid var(--current-line); }
body.portfolio-edition .episode-heading { display:flex; flex-wrap:wrap; gap:4px 14px; align-items:baseline; }
body.portfolio-edition .episode-heading h3 { margin:0; font:400 12px/1.6 var(--sans); }
body.portfolio-edition .episode-heading>span { color:var(--current-muted); font-size:10px; }
body.portfolio-edition #episode-links { display:grid; grid-template-columns:repeat(auto-fit,minmax(90px,1fr)); gap:6px; list-style:none; padding:0; margin:10px 0 0; }
body.portfolio-edition #episode-links a { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:8px 10px; border:1px solid var(--current-line); border-radius:7px; font-size:11px; white-space:nowrap; }
body.portfolio-edition #episode-links a:hover { background:rgba(255,255,255,.09); }
body.portfolio-edition #episode-links a:focus-visible { outline-color:#fff; }
body.portfolio-edition .episode-panel[data-playback="local"] #episode-links { grid-template-columns:repeat(var(--episode-count,5),minmax(0,1fr)); }
body.portfolio-edition #episode-links li { min-width:0; }
body.portfolio-edition #episode-links button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; width:100%; min-width:44px; min-height:48px; padding:6px 2px; border:1px solid var(--current-line); border-radius:7px; background:transparent; color:#fff; font-size:11px; line-height:1.45; white-space:nowrap; }
body.portfolio-edition #episode-links button small { color:var(--current-muted); font-size:9px; font-variant-numeric:tabular-nums; }
body.portfolio-edition #episode-links button[data-state="pending"] small { letter-spacing:0; }
body.portfolio-edition #episode-links button:hover { background:rgba(255,255,255,.09); }
body.portfolio-edition #episode-links button[aria-pressed="true"] { background:#f5f5f7; border-color:#f5f5f7; color:#172124; }
body.portfolio-edition #episode-links button[aria-pressed="true"] small { color:#4f5a60; }
body.portfolio-edition #episode-links button:focus-visible { outline-color:#fff; }
body.portfolio-edition .current[data-project="iamai"] { --project-bg:#102c37; --project-muted:#bdd5db; --project-line:#72929c; }
body.portfolio-edition .current[data-project="ksk"] { --project-bg:#161c3b; --project-muted:#c3c8e5; --project-line:#7b83b2; }

/* Three full music videos: tones follow inspected source frames. */
body.portfolio-edition .current[data-project="mv-nirvana"] { --project-bg:#241C46; --project-muted:#CFC6E8; --project-line:#77669E; }
body.portfolio-edition .current[data-project="mv-kill-switch-kiss"] { --project-bg:#103E43; --project-muted:#B8D8D7; --project-line:#477D7E; }
body.portfolio-edition .current[data-project="mv-weekend"] { --project-bg:#3A3D20; --project-muted:#D3D1AA; --project-line:#7D8050; }
body.portfolio-edition .current[data-project="mv-nirvana"]>.media { aspect-ratio:var(--frame-aspect,1512/648); }
html[lang='ja'] body.portfolio-edition .current:is([data-project="mv-nirvana"],[data-project="mv-kill-switch-kiss"]) .work-description { text-wrap:balance; }

/* Error: the muted green of its verified window-side still. */
body.portfolio-edition .current[data-project="error"] { --project-bg:#202A23; --project-muted:#B6BEA9; --project-line:#788469; }

/* Match full-bleed mobile frames to the compact panel padding. */
@media(max-width:680px) {
 body.portfolio-edition .current:not([data-orientation='portrait'])>.media { margin-inline:-18px; }
}
