/* Shared application shell. Business layouts remain owned by their applications. */
.yuna-app .site-shell { width:min(1600px,calc(100% - 48px)); }
.yuna-app .topbar { gap:20px; }
.yuna-app :is(.top-meta,.primary-nav,.wiki-actions) { min-width:0; }
.yuna-app :is(input,select,textarea,button) { font-family:inherit; }
.yuna-app :is(.page-main,.studio,.studio-grid,.controls,.preview-panel,.auth-intro,.auth-panel,.wiki-main,.wiki-sidebar,.wiki-workspace,.catalog-hero-copy,.assessment-hero > div,.inventory-hero > div) { min-width:0; }
.yuna-app :is(.question-text,.auth-copy,.catalog-card-copy,.item-name,.inner-heading h1) { overflow-wrap:anywhere; }
.yuna-app .appearance-controls { flex-shrink:0; }
.yuna-app .wiki-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.yuna-app .primary-nav { flex-wrap:wrap; }
.yuna-app.yuna-service :is(.auth-topbar,.auth-shell) { width:min(1600px,calc(100% - 48px)); margin-inline:auto; }
.yuna-app.yuna-service .auth-shell { grid-template-columns:minmax(0,1fr) minmax(320px,.75fr); }
.yuna-app.yuna-service .auth-field { grid-template-columns:90px minmax(0,1fr); }
.yuna-app.yuna-service :is(.form-control,.form-select,.modal-content) { color:var(--ink); background-color:var(--surface); border-color:var(--line); }
.yuna-app.yuna-service .modal { z-index:1055; }
.yuna-app.yuna-service .lightbox-overlay { z-index:1100; }
.yuna-app.yuna-service :is(.auth-field input,input[type="text"],textarea):focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
:root[data-skin="arknights"] .yuna-service :is(.assessment-hero,.inventory-hero,.catalog-hero,.wiki-hero) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; align-items:center; padding:36px 0; min-height:0; }
:root[data-skin="arknights"] .yuna-service :is(.assessment-hero,.inventory-hero,.catalog-hero,.wiki-hero) h1 { color:var(--ink); font-style:normal; font-size:clamp(2.5rem,5vw,5.5rem); line-height:1.05; letter-spacing:-.035em; }
:root[data-skin="arknights"] .yuna-service :is(.assessment-hero,.inventory-hero,.catalog-hero,.wiki-hero) h1 em { margin:12px 0 0; color:var(--muted); -webkit-text-stroke:0; filter:none; white-space:normal; font-size:.62em; }
:root[data-skin="arknights"] .yuna-service :is(.assessment-hero,.inventory-hero) .hero-copy { grid-column:auto; grid-row:auto; }
:root[data-skin="arknights"] .yuna-service :is(.question-card,.test-progress,.results-container,.control-section,.catalog-card,.guide-callout,.wiki-workspace,.item-card,.group-section,.modal-content) { color:var(--ink); border:1px solid var(--line); border-radius:0; background:var(--surface); box-shadow:none; backdrop-filter:none; }
:root[data-skin="arknights"] .yuna-service :is(.studio-grid,.auth-shell) { border:1px solid var(--line); background:var(--surface); box-shadow:none; backdrop-filter:none; }
:root[data-skin="arknights"] .yuna-service :is(.auth-submit,.submit-btn,.generate-btn,.btn-primary,.primary-button) { color:#10252b; border-color:var(--ark-cyan); background:var(--ark-cyan); box-shadow:none; }
:root[data-skin="arknights"] .yuna-service :is(.auth-mode-tab.active,.primary-nav .nav-add,.wiki-tabs a.active) { color:#10252b; background:var(--ark-cyan); border-color:var(--ark-cyan); }
:root[data-skin="arknights"] .yuna-service .auth-copy h1 span { color:var(--muted); -webkit-text-stroke:0; }
:root[data-skin="arknights"] .yuna-service .catalog-card:is(:hover,:focus-visible) { border-color:var(--blue); transform:none; }
:root[data-skin="arknights"] .yuna-service .catalog-card::before { background:var(--surface-2); }
:root[data-skin="arknights"] .yuna-service .catalog-card:hover { color:var(--ink); }
:root[data-skin="arknights"] .yuna-service .catalog-card:hover :is(small,.catalog-card-copy span) { color:var(--muted); }
:root[data-skin="arknights"] .yuna-service .wiki-hero .emblem-frame { min-height:0; }
:root[data-skin="scarlet"] .yuna-service :is(.assessment-hero,.inventory-hero,.catalog-hero,.wiki-hero) h1 { font-family:Georgia,"Noto Serif CJK SC",serif; }
/* Assessment introductions reuse the space for the existing description. */
:root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr); grid-template-rows:auto; align-items:center; gap:clamp(32px,5vw,84px); min-height:0; padding:64px 0 58px; }
:root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero > div:first-child { grid-column:1; grid-row:1; }
:root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero .hero-copy { grid-column:2; grid-row:1; width:100%; max-width:520px; margin:0; padding:0; }
:root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero h1 { font-size:clamp(3.4rem,6.4vw,7rem); line-height:1.08; }
:root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero h1 em { margin:.38em 0 0; font-size:.62em; line-height:1.1; white-space:normal; }
:root[data-skin="scarlet"] .yuna-service--assessment .assessment-hero h1 em { color:var(--pink); -webkit-text-stroke:0; }
/* The technical title face matches the implemented Arknights homepage. */
:root[data-skin="arknights"] .yuna-service--assessment .assessment-hero h1 { font-family:"Barlow Condensed",Archivo,"Noto Sans SC",sans-serif; font-weight:700; }
:root[data-skin="arknights"] .yuna-service--assessment .assessment-hero h1 em { font-family:"Barlow Condensed",Archivo,"Noto Sans SC",sans-serif; font-weight:500; }
@media(max-width:800px) {
  :root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero { grid-template-columns:minmax(0,1fr); gap:26px; padding:42px 0 38px; }
  :root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero > div:first-child { grid-column:1; grid-row:1; }
  :root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero .hero-copy { grid-column:1; grid-row:2; max-width:560px; }
  :root:is([data-skin="102"],[data-skin="scarlet"]) .yuna-service--assessment .assessment-hero h1 { font-size:clamp(3rem,13vw,5.5rem); }
}
/* Shared Scarlet controls: keep operational status and destructive colours intact. */
:root[data-skin="scarlet"] .yuna-service :is(.button,.text-button,.btn-primary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-info,.auth-submit,.submit-btn,.retry-btn,.generate-btn,.primary-button,.remote-button:not(.danger),.cal-btn:not(.cal-btn-danger)) { color:var(--ink); background:var(--surface-2); border:1px solid var(--scarlet-frame); border-radius:3px; box-shadow:inset 0 0 0 3px var(--surface-2),inset 0 0 0 4px color-mix(in srgb,var(--scarlet-frame) 45%,transparent); transform:none; }
:root[data-skin="scarlet"] .yuna-service :is(.button-primary,.btn-primary,.auth-submit,.submit-btn,.retry-btn,.generate-btn,.primary-button,.remote-button.primary,.cal-btn-primary,.cal-btn-accent) { color:#fff1e9; background:#65182f; border-color:#b58c5d; box-shadow:inset 0 0 0 3px #65182f,inset 0 0 0 4px #b58c5d; }
:root[data-skin="scarlet"] .yuna-service :is(.button,.text-button,.btn-primary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-info,.auth-submit,.submit-btn,.retry-btn,.generate-btn,.primary-button,.remote-button:not(.danger),.cal-btn:not(.cal-btn-danger)):is(:hover,:focus-visible,.active):not(:disabled) { color:#fff1e9; background:#65182f; border-color:#dfbe82; box-shadow:inset 0 0 0 3px #65182f,inset 0 0 0 4px #b58c5d; transform:none; }
:root[data-skin="scarlet"] .yuna-service :is(.button,.text-button,.btn,.auth-submit,.submit-btn,.retry-btn,.generate-btn,.primary-button,.remote-button,.cal-btn):focus-visible { outline:2px solid var(--scarlet-gold); outline-offset:2px; }
:root[data-skin="scarlet"] .yuna-service :is(.button,.text-button,.btn,.auth-submit,.submit-btn,.retry-btn,.generate-btn,.primary-button,.remote-button,.cal-btn):disabled { color:var(--muted); background:var(--surface); border-color:var(--line); box-shadow:none; opacity:.65; cursor:not-allowed; }
:root[data-skin="scarlet"] .yuna-service--inventory .primary-nav .nav-add { color:#fff1e9; background:#65182f; border-color:var(--scarlet-frame); box-shadow:inset 0 0 0 3px #65182f,inset 0 0 0 4px #b58c5d; }
:root[data-skin="scarlet"] .yuna-service--inventory .primary-nav .nav-add:is(:hover,:focus-visible,.active) { color:#fff1e9; background:#7d203b; border-color:#dfbe82; box-shadow:inset 0 0 0 3px #7d203b,inset 0 0 0 4px #dfbe82; transform:none; }
@media(max-width:1100px) {
  .yuna-app.yuna-service .topbar { height:auto; min-height:84px; flex-wrap:wrap; padding-block:14px; gap:12px; }
  .yuna-app .primary-nav { gap:6px; }
  .yuna-app .primary-nav .appearance-controls { margin-left:auto; }
  .yuna-app .wiki-actions .back-link { font-size:.7rem; }
}
@media(max-width:900px) {
  .yuna-app.yuna-service .auth-shell { grid-template-columns:minmax(0,1fr); }
  .yuna-app.yuna-service .auth-intro { border-right:0; border-bottom:1px solid var(--line); }
  .yuna-app.yuna-service .auth-copy { margin:34px 0; }
  .yuna-app.yuna-service .studio-grid { grid-template-columns:minmax(0,1fr); }
  .yuna-app.yuna-service .controls { border-right:0; }
}
@media(max-width:700px) {
  .yuna-app :is(.site-shell,.auth-topbar,.auth-shell) { width:calc(100% - 24px); }
  .yuna-app.yuna-service .topbar { min-height:72px; }
  .yuna-app.yuna-service .top-meta { margin-left:auto; }
  .yuna-app .primary-nav { width:100%; }
  .yuna-app .wiki-actions { gap:8px; }
  .yuna-app.yuna-service .auth-field { grid-template-columns:minmax(0,1fr); gap:10px; padding-block:14px; }
  .yuna-app.yuna-service .auth-field input { min-height:36px; }
  .yuna-app.yuna-service :is(.auth-intro,.auth-panel) { padding:26px 18px; }
  .yuna-app.yuna-service .auth-meta { flex-wrap:wrap; }
  :root[data-skin="arknights"] .yuna-service :is(.assessment-hero,.inventory-hero,.catalog-hero,.wiki-hero) { grid-template-columns:minmax(0,1fr); gap:24px; }
  .yuna-app.yuna-service :is(.assessment-hero h1,.inventory-hero h1,.hero h1,.catalog-hero h1) { overflow-wrap:anywhere; }
}
.yuna-app.yuna-service { --bs-body-font-family:Archivo,"Noto Sans SC",system-ui,sans-serif; font-family:var(--bs-body-font-family); --bs-body-bg:var(--bg); --bs-body-color:var(--ink); --bs-border-color:var(--line); color:var(--ink); background-color:var(--bg); }
.yuna-app.yuna-service :is(.inventory-hero,.assessment-hero,.catalog-hero,.wiki-hero,.guide-hero) > * { min-width:0; }
.yuna-app.yuna-service .hero-copy::after { pointer-events:none; }
@media(max-width:1000px) { :root[data-skin="arknights"] .yuna-service .wiki-emblem { display:none; } }
/* Reset old twelve-column placements when a service adopts the new two-column header. */
:root[data-skin="arknights"] .yuna-service .inventory-hero { grid-template-rows:auto auto; }
:root[data-skin="arknights"] .yuna-service .inventory-hero .hero-title { grid-column:1; grid-row:1; }
:root[data-skin="arknights"] .yuna-service .inventory-hero .hero-copy { grid-column:1; grid-row:2; }
:root[data-skin="arknights"] .yuna-service .inventory-hero .hero-mark { grid-column:2; grid-row:1/3; width:100%; max-width:400px; min-width:0; color:var(--ink); background:var(--surface); border:1px solid var(--line); box-shadow:none; transform:none; }
:root[data-skin="arknights"] .yuna-service .inventory-hero .hero-mark strong { color:var(--blue); -webkit-text-stroke:0; font-size:clamp(3rem,6vw,6rem); }
:root[data-skin="arknights"] .yuna-service .wiki-hero > div:first-child { grid-column:1; grid-row:1; }
:root[data-skin="arknights"] .yuna-service .wiki-hero .wiki-aside { grid-column:1; grid-row:2; }
:root[data-skin="arknights"] .yuna-service .wiki-hero .wiki-emblem { grid-column:2; grid-row:1/3; max-width:300px; justify-self:end; box-shadow:none; }
:root[data-skin="arknights"] .yuna-service .wiki-title span { color:var(--muted); -webkit-text-stroke:0; }
@media(max-width:1000px) { :root[data-skin="arknights"] .yuna-service .wiki-hero { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) {
  :root[data-skin="arknights"] .yuna-service .inventory-hero .hero-mark { display:none; }
  .yuna-app.yuna-service .primary-nav .nav-link { flex-shrink:0; }
  .yuna-app.yuna-service .catalog-hero h1 { font-size:clamp(2.8rem,15vw,4.5rem); overflow-wrap:anywhere; }
}
.yuna-app.yuna-service .auth-copy h1 { line-height:1.05; }
.yuna-app.yuna-service .auth-copy h1 span { margin-top:12px; }
:root[data-skin="arknights"] .yuna-service .catalog-cover { max-width:300px; justify-self:end; transform:none; box-shadow:6px 6px 0 var(--ark-shadow); }
:root[data-skin="arknights"] .yuna-service .primary-nav .nav-add { box-shadow:none; }
.yuna-app.yuna-service .color-card[aria-pressed="false"] .choice-mark { color:transparent; background:transparent; border-color:var(--line-strong); }
.yuna-app.yuna-service .color-card[aria-pressed="true"] .choice-mark { color:var(--white); background:var(--blue); border-color:var(--blue); }

/* Remaining native service pages share the same shell and appearance controls. */
.yuna-service--identity .shell { width:min(1600px,calc(100% - 48px)); }
.yuna-service--identity .identity-hero { min-width:0; }
.yuna-service--identity .identity-hero h1 { font-size:clamp(3rem,6.8vw,7rem); line-height:1.05; overflow-wrap:anywhere; }
.yuna-service--identity .identity-hero h1 span { margin-top:12px; }
.yuna-service--identity .top-actions { min-width:0; flex-wrap:wrap; justify-content:flex-end; }
.yuna-service--identity .panel { min-width:0; }
.yuna-service--identity .field { grid-template-columns:62px minmax(0,1fr); }
.yuna-service--identity .register-grid .field { grid-template-columns:50px minmax(0,1fr); }
.yuna-service--identity .brand-logo { background:transparent; border:0; }
.yuna-service--calibration .slider-line input[type="range"] { min-width:0; }
.yuna-service--calibration :is(.cal-hero h1,.control-card h3,.cal-note) { overflow-wrap:anywhere; }
.yuna-service--calibration .cal-panel-head { flex-wrap:wrap; }
.yuna-service--calibration .control-card { min-width:0; }
.yuna-service--calibration .control-card code { white-space:normal; overflow-wrap:anywhere; }
.yuna-service--remote :is(.remote-stage,.remote-heading,.remote-console) { min-width:0; }
.yuna-service--remote .remote-heading h1 { overflow-wrap:anywhere; }
.yuna-service--remote .remote-button { font-family:inherit; }
.yuna-service--calibration :is(.cal-btn,.cal-select,.slider-line input[type="number"]) { font-family:inherit; }
:root[data-skin="arknights"] :is(.yuna-service--remote .remote-heading,.yuna-service--calibration .cal-hero,.yuna-service--identity .identity-hero) h1 { font-family:"Barlow Condensed",Archivo,"Noto Sans SC",sans-serif; font-style:normal; line-height:1.05; letter-spacing:-.035em; }
:root[data-skin="arknights"] :is(.yuna-service--remote .remote-heading h1 em,.yuna-service--calibration .cal-hero h1 span,.yuna-service--identity .identity-hero h1 span) { color:var(--muted); -webkit-text-stroke:0; filter:none; margin-left:0; }
:root[data-skin="arknights"] :is(.yuna-service--remote .remote-console,.yuna-service--calibration .cal-panel,.yuna-service--identity .panel) { background:var(--surface); border:1px solid var(--line); box-shadow:none; backdrop-filter:none; }
:root[data-skin="arknights"] .yuna-service--identity .panel::after { display:none; }
:root[data-skin="arknights"] .yuna-service--identity :is(.primary,.tab.active),
:root[data-skin="arknights"] .yuna-service--remote .remote-button.primary,
:root[data-skin="arknights"] .yuna-service--calibration :is(.cal-btn-primary,.cal-btn-accent) { color:#10252b; background:var(--ark-cyan); border-color:var(--ark-cyan); box-shadow:none; }
:root[data-skin="arknights"] .yuna-service--remote .remote-button.danger { color:var(--ink); border-color:var(--ark-highlight); }
:root[data-skin="arknights"] .yuna-service--remote .remote-button.danger:hover:not(:disabled) { color:var(--ink); background:var(--surface-2); }
:root[data-skin="scarlet"] :is(.yuna-service--remote .remote-heading,.yuna-service--calibration .cal-hero,.yuna-service--identity .identity-hero) h1 { font-family:Georgia,"Noto Serif CJK SC",serif; }
@media(max-width:1100px) {
  .yuna-service--identity .status { display:none; }
}
@media(max-width:700px) {
  .yuna-service--identity .shell { width:calc(100% - 24px); }
  .yuna-service--identity main { grid-template-columns:minmax(0,1fr); gap:28px; padding-top:30px; }
  .yuna-service--identity .register-grid { grid-template-columns:minmax(0,1fr); }
  .yuna-service--identity .identity-hero { min-height:0; }
  .yuna-service--identity .identity-copy { margin-top:24px; }
  .yuna-service--identity .identity-hero h1 span { margin-left:0; }
  .yuna-service--identity .panel { padding:30px 18px; }
  .yuna-service--identity .brand { letter-spacing:.04em; }
  .yuna-service--calibration .slider-line { gap:8px; }
  .yuna-service--calibration .control-row { grid-template-columns:minmax(0,1fr); }
  .yuna-service--calibration .slider-line input[type="number"] { width:72px; }
}

/* Service landing pages reuse the homepage hero and directory-card components. */
.yuna-home-layout .service-directory { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:32px 0 64px; }
.yuna-home-layout .service-directory .domain-link { color:var(--ink); border:1px solid var(--line); }
.yuna-home-layout .service-note { display:grid; grid-template-columns:220px minmax(0,1fr); gap:32px; padding:34px 0; border-top:1px solid var(--line); }
.yuna-home-layout .service-note > span { color:var(--pink); font-size:.63rem; font-weight:800; letter-spacing:.14em; }
.yuna-home-layout .service-note p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.85; }
@media(max-width:1000px) { .yuna-home-layout .service-directory { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .yuna-home-layout .service-directory { grid-template-columns:minmax(0,1fr); }
  .yuna-home-layout .service-note { grid-template-columns:minmax(0,1fr); gap:14px; }
}

/* Compact service introductions keep the shared type system without a poster card. */
.yuna-home-layout--compact .hero,
:root[data-skin] .yuna-home-layout--compact .hero { min-height:0; grid-template-columns:repeat(12,minmax(0,1fr)); grid-template-rows:auto; align-items:center; margin:0 0 32px; padding:52px 0 46px; gap:28px; }
.yuna-home-layout--compact .hero > div:first-child,
:root[data-skin] .yuna-home-layout--compact .hero > div:first-child { grid-column:1 / 8; grid-row:1; align-self:center; }
.yuna-home-layout--compact .hero h1,
:root[data-skin] .yuna-home-layout--compact .hero h1 { font-size:clamp(3.2rem,5.4vw,5.8rem); }
.yuna-home-layout--compact .hero-copy,
:root[data-skin] .yuna-home-layout--compact .hero-copy { grid-column:9 / 13; grid-row:1; align-self:center; width:100%; max-width:480px; margin:0; padding:0; border:0; background:none; }
.yuna-home-layout--compact .hero::after,
.yuna-home-layout--compact .hero-copy::after { display:none; }
:root[data-skin="arknights"] .yuna-home-layout--compact .hero h1 em { margin-top:16px; font-size:max(1rem,.3em); }
.yuna-app.yuna-service--inventory .primary-nav .nav-link:not(.nav-add):is(:hover,.active) { color:var(--ink); background:var(--surface); border-color:var(--line); }
@media(max-width:700px) {
  .yuna-home-layout--compact .hero,
  :root[data-skin] .yuna-home-layout--compact .hero { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; padding:32px 0 28px; gap:24px; }
  .yuna-home-layout--compact .hero > div:first-child,
  :root[data-skin] .yuna-home-layout--compact .hero > div:first-child { grid-column:1; grid-row:1; }
  .yuna-home-layout--compact .hero-copy,
  :root[data-skin] .yuna-home-layout--compact .hero-copy { grid-column:1; grid-row:2; max-width:none; }
  .yuna-home-layout--compact .hero h1,
  :root[data-skin] .yuna-home-layout--compact .hero h1 { font-size:clamp(2.6rem,11.5vw,4.2rem); }
}
