/* SAINTFALL native field interface: reliquary command wheel + operation menu. */
.sf-native-ui {
  --sfu-ink:#070506;--sfu-panel:rgba(15,10,11,.95);--sfu-bone:#f2e5c7;
  --sfu-dim:rgba(242,229,199,.62);--sfu-brass:#d8a441;--sfu-gold:#f5d88e;
  --sfu-blood:#8a2230;--sfu-threat:#ef633e;--sfu-verd:#76cda7;--sfu-cyan:#78d4f6;
  position:absolute;inset:0;z-index:48;overflow:hidden;color:var(--sfu-bone);
  font-family:"Share Tech Mono",ui-monospace,Menlo,monospace;pointer-events:none;isolation:isolate;
}
.sf-native-ui button,.sf-native-ui a{font:inherit}
.sf-native-ui button:focus-visible,.sf-native-ui a:focus-visible{outline:2px solid var(--sfu-gold);outline-offset:3px}
.sf-native-ui svg{display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.sf-native-ui__live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

.sf-bossbar{
  position:absolute;left:50%;top:max(.72rem,calc(env(safe-area-inset-top) + .38rem));
  z-index:26;width:min(34rem,56vw);transform:translateX(-50%);
  opacity:0;pointer-events:none;transition:opacity .24s ease
}
.sf-bossbar.is-on{opacity:1}
.sf-bossbar[hidden]{display:none!important}
.sf-bossbar__head{
  display:flex;align-items:baseline;margin:0 0 .32rem
}
.sf-bossbar__name{
  flex:1;min-width:0;overflow:hidden;color:#fff6e0;
  font:700 13px/1.1 "Share Tech Mono",monospace;letter-spacing:.14em;
  text-overflow:ellipsis;white-space:nowrap;
  text-shadow:0 1px 6px rgba(0,0,0,.85)
}
.sf-bossbar__track{
  position:relative;height:7px;overflow:hidden;border-radius:999px;
  background:rgba(6,4,5,.62);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 6px 16px rgba(0,0,0,.28)
}
.sf-bossbar__chip,.sf-bossbar__fill{
  position:absolute;inset:0 auto 0 0;display:block;border-radius:inherit
}
.sf-bossbar__chip{background:rgba(255,214,160,.48)}
.sf-bossbar__fill{
  background:linear-gradient(90deg,#7a1c22 0%,#d63d38 52%,#ffb070 100%);
  box-shadow:0 0 10px rgba(214,61,56,.35)
}
.sf-bossbar[data-state="warn"] .sf-bossbar__fill{
  background:linear-gradient(90deg,#8a3a12,#e07a28 60%,#ffd08a)
}
.sf-bossbar[data-state="crit"] .sf-bossbar__fill{
  background:linear-gradient(90deg,#5c1014,#ff3b32 70%,#ffb0a0)
}
.sf-bossbar.is-hurt .sf-bossbar__track{box-shadow:inset 0 0 0 1px rgba(255,180,160,.35),0 0 18px rgba(210,50,40,.28)}
#sf-hud.sf-hud--boss .sf-hud__compass{opacity:0;visibility:hidden}
#sf-hud.sf-hud--boss .sf-hud__district{top:4.4rem}
.sf-stage.sf-intro-active .sf-bossbar,
body.sf-command-open .sf-bossbar,
body.rb-escape-menu-open .sf-bossbar{opacity:0!important}

.sf-menu-trigger{
  position:absolute;top:max(.75rem,calc(env(safe-area-inset-top) + .45rem));left:max(.8rem,calc(env(safe-area-inset-left) + .5rem));z-index:4;
  display:flex;align-items:center;gap:.55rem;min-width:3rem;min-height:3rem;padding:.55rem .72rem;
  border:1px solid rgba(216,164,65,.38);border-radius:2px;
  background:linear-gradient(135deg,rgba(216,164,65,.09),transparent 45%),rgba(7,5,6,.8);
  color:var(--sfu-gold);box-shadow:inset 2px 0 0 rgba(216,164,65,.55),0 .5rem 1.4rem rgba(0,0,0,.26);
  backdrop-filter:blur(7px) saturate(.75);pointer-events:auto;cursor:pointer
}
.sf-menu-trigger svg{width:1.25rem;height:1.25rem}.sf-menu-trigger span{color:var(--sfu-bone);font-size:12px;letter-spacing:.12em}
.sf-menu-trigger kbd{padding:.15rem .28rem;border:1px solid rgba(245,216,142,.32);background:rgba(0,0,0,.28);color:rgba(245,216,142,.66);font:10px/1 "Share Tech Mono",monospace}
.sf-menu-trigger:hover{border-color:rgba(245,216,142,.75);background-color:rgba(39,23,20,.9)}
.sf-stage.sf-intro-active .sf-menu-trigger,.sf-menu-active .sf-menu-trigger{opacity:0;visibility:hidden;pointer-events:none}
.sf-stage:not(.sf-touch-enabled) .sf-hud__objective{left:max(1.4rem,calc(env(safe-area-inset-left) + 1rem));top:4.45rem;width:min(20.5rem,25vw)}

.sf-command-wheel[hidden],.sf-menu[hidden],.sf-menu__page[hidden]{display:none!important}
.sf-command-wheel{position:absolute;inset:0;z-index:70;display:grid;place-items:center;overflow:hidden;pointer-events:none;animation:sfu-wheel-in .18s cubic-bezier(.2,.78,.25,1) both}
.sf-command-wheel__veil{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,rgba(31,20,17,.18) 0 18%,rgba(4,3,4,.58) 58%,rgba(2,2,3,.78)),linear-gradient(90deg,rgba(3,2,3,.45),transparent 25% 75%,rgba(3,2,3,.45));backdrop-filter:blur(2px) saturate(.55) brightness(.74)}
.sf-command-wheel__dial{position:absolute;left:50%;top:50%;width:min(34rem,72vw);aspect-ratio:1;transform:translate(-50%,-50%)}
.sf-command-wheel__ring{position:absolute;left:50%;top:50%;width:20rem;height:20rem;border:1px solid rgba(216,164,65,.4);border-radius:50%;background:repeating-conic-gradient(from -1deg,rgba(216,164,65,.17) 0 1deg,transparent 1deg 30deg),radial-gradient(circle,rgba(9,6,7,.72) 0 31%,transparent 31.5% 48%,rgba(10,6,7,.58) 48.5% 72%,transparent 72.5%);box-shadow:inset 0 0 0 1.65rem rgba(5,4,5,.2),inset 0 0 3rem rgba(216,164,65,.09),0 0 0 .35rem rgba(7,5,6,.38),0 1.8rem 5rem rgba(0,0,0,.58);transform:translate(-50%,-50%)}
.sf-command-wheel__ring:before,.sf-command-wheel__ring:after{content:"";position:absolute;inset:1.25rem;border:1px solid rgba(245,216,142,.16);border-radius:50%}
.sf-command-wheel__ring:after{inset:5.55rem;border-color:rgba(245,216,142,.3);box-shadow:0 0 1.4rem rgba(216,164,65,.12)}
.sf-command-wheel__option{position:absolute;z-index:3;display:grid;grid-template-columns:3.3rem minmax(0,1fr);align-items:center;gap:.72rem;width:15.2rem;min-height:4.9rem;padding:.65rem .72rem;border:1px solid rgba(216,164,65,.28);border-radius:2px;background:linear-gradient(105deg,rgba(216,164,65,.09),transparent 38%),rgba(10,7,8,.91);color:var(--sfu-dim);box-shadow:inset 2px 0 0 rgba(216,164,65,.35),0 .65rem 1.8rem rgba(0,0,0,.42);text-align:left;opacity:.76;pointer-events:auto;cursor:crosshair;transition:opacity .15s,border-color .15s,color .15s,transform .15s,box-shadow .15s}
.sf-command-wheel__option[data-index="0"]{left:50%;top:calc(50% - 12.2rem);transform:translate(-50%,-50%)}
.sf-command-wheel__option[data-index="1"]{left:calc(50% + 13rem);top:calc(50% + 7.2rem);transform:translate(-50%,-50%)}
.sf-command-wheel__option[data-index="2"]{left:calc(50% - 13rem);top:calc(50% + 7.2rem);transform:translate(-50%,-50%)}
.sf-command-wheel__option.is-selected{z-index:4;border-color:var(--sfu-gold);background:linear-gradient(105deg,rgba(138,34,48,.62),rgba(41,15,18,.95) 48%,rgba(12,8,9,.96));color:var(--sfu-bone);opacity:1;box-shadow:inset 3px 0 0 var(--sfu-gold),0 0 1.4rem rgba(216,164,65,.22),0 1rem 2.2rem rgba(0,0,0,.5)}
.sf-command-wheel__option[data-index="0"].is-selected{transform:translate(-50%,-50%) translateY(-.2rem)}
.sf-command-wheel__option[data-index="1"].is-selected{transform:translate(-50%,-50%) translate(.18rem,.12rem)}
.sf-command-wheel__option[data-index="2"].is-selected{transform:translate(-50%,-50%) translate(-.18rem,.12rem)}
.sf-command-wheel__option[data-state="cooldown"]{filter:saturate(.46);opacity:.52}.sf-command-wheel__option[data-state="cooldown"].is-selected{border-color:var(--sfu-threat);opacity:.82}
.sf-command-wheel__sigil{display:grid;place-items:center;width:3.25rem;height:3.25rem;border:1px solid currentColor;background:rgba(0,0,0,.25);color:var(--sfu-brass);transform:rotate(45deg)}
.sf-command-wheel__sigil svg{width:2rem;height:2rem;transform:rotate(-45deg)}
.sf-command-wheel__option[data-command="orbital"] .sf-command-wheel__sigil{color:var(--sfu-cyan)}
.sf-command-wheel__option[data-command="cluster"] .sf-command-wheel__sigil{color:#f4b65b}
.sf-command-wheel__option[data-command="resupply"] .sf-command-wheel__sigil{color:var(--sfu-verd)}
.sf-command-wheel__copy{display:grid;gap:.18rem;min-width:0}.sf-command-wheel__copy strong{padding-right:2.8rem;overflow:visible;color:currentColor;font:600 13px/1.15 "Cinzel",Georgia,serif;letter-spacing:.04em;text-overflow:clip;white-space:normal;text-wrap:balance}.sf-command-wheel__copy small{color:rgba(242,229,199,.54);font-size:11px;letter-spacing:.045em}
.sf-command-wheel__option>b{position:absolute;right:.55rem;top:.5rem;color:var(--sfu-verd);font-size:11px;font-weight:600;letter-spacing:.08em}.sf-command-wheel__option[data-state="cooldown"]>b{color:var(--sfu-threat)}
.sf-command-wheel__core{position:absolute;left:50%;top:50%;z-index:5;display:grid;place-items:center;align-content:center;gap:.12rem;width:7.8rem;height:7.8rem;border:1px solid rgba(245,216,142,.42);border-radius:50%;background:radial-gradient(circle,rgba(53,29,23,.92),rgba(8,6,7,.98) 68%);color:var(--sfu-gold);box-shadow:inset 0 0 1.4rem rgba(216,164,65,.1),0 0 2.2rem rgba(0,0,0,.65);transform:translate(-50%,-50%);pointer-events:auto;cursor:pointer}
.sf-command-wheel__core svg{width:1.8rem;height:1.8rem;margin-bottom:.18rem}.sf-command-wheel__core span{max-width:6.4rem;color:var(--sfu-bone);font-size:11px;letter-spacing:.08em;text-align:center}.sf-command-wheel__core small{color:rgba(242,229,199,.44);font-size:8px;letter-spacing:.04em}
.sf-command-wheel__cursor{position:absolute;left:50%;top:50%;z-index:7;width:.85rem;height:.85rem;border:1px solid var(--sfu-gold);border-radius:50%;background:rgba(245,216,142,.24);box-shadow:0 0 .75rem rgba(245,216,142,.66);transform:translate(-50%,-50%) translate(var(--sf-command-x,0),var(--sf-command-y,0));transition:transform .035s linear}
.sf-command-wheel__instruction{position:absolute;left:50%;bottom:max(2rem,calc(env(safe-area-inset-bottom) + 1.2rem));z-index:3;margin:0;padding:.5rem 1rem;border-top:1px solid rgba(216,164,65,.25);color:rgba(242,229,199,.56);font-size:11px;letter-spacing:.15em;transform:translateX(-50%);white-space:nowrap}
body.sf-command-open .sf-hud__reticle{opacity:0!important}body.sf-command-open #sf-hud{filter:saturate(.7) brightness(.82)}
@keyframes sfu-wheel-in{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}

/* Operation menu */
.sf-menu{position:absolute;inset:0;z-index:100;overflow:hidden;pointer-events:auto;animation:sfu-menu-in .26s cubic-bezier(.2,.78,.22,1) both}
.sf-menu__veil{position:absolute;inset:0;background:linear-gradient(115deg,rgba(4,3,4,.91),rgba(7,5,6,.7) 52%,rgba(19,9,10,.85)),radial-gradient(circle at 72% 18%,rgba(216,164,65,.08),transparent 42%);backdrop-filter:blur(10px) saturate(.42) brightness(.5)}
.sf-menu__frame{position:absolute;inset:0;left:0;top:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;min-height:0;border:none;background:linear-gradient(135deg,rgba(216,164,65,.055),transparent 28%),rgba(8,6,7,.98);box-shadow:inset 0 0 0 1px rgba(242,229,199,.025),inset .3rem 0 0 rgba(138,34,48,.72);transform:none}
.sf-menu__frame:before,.sf-menu__frame:after{content:"";position:absolute;z-index:4;width:2.6rem;height:2.6rem;border-color:var(--sfu-gold);pointer-events:none}.sf-menu__frame:before{left:.5rem;top:.5rem;border-left:2px solid;border-top:2px solid}.sf-menu__frame:after{right:.5rem;bottom:.5rem;border-right:2px solid;border-bottom:2px solid}
.sf-menu__masthead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;min-height:5.5rem;padding:.85rem 1.5rem .8rem 1.75rem;border-bottom:1px solid rgba(216,164,65,.18);background:linear-gradient(90deg,rgba(138,34,48,.2),transparent 36%)}
.sf-menu__crest{display:grid;place-items:center;width:3.65rem;height:3.65rem;border:1px solid rgba(216,164,65,.42);color:var(--sfu-gold);transform:rotate(45deg)}.sf-menu__crest svg{width:2.25rem;height:2.25rem;transform:rotate(-45deg)}
.sf-menu__masthead span{display:block;color:rgba(216,164,65,.68);font-size:11px;letter-spacing:.18em}.sf-menu__masthead h2{margin:.2rem 0 .12rem;color:var(--sfu-bone);font:600 clamp(1.35rem,2.3vw,2rem)/1 "Cinzel",Georgia,serif;letter-spacing:.12em}.sf-menu__masthead p{margin:0;color:rgba(242,229,199,.48);font-size:13px;letter-spacing:.13em}
.sf-menu__close{display:grid;place-items:center;width:3rem;height:3rem;border:1px solid rgba(216,164,65,.3);border-radius:0;background:rgba(0,0,0,.25);color:var(--sfu-gold);font-size:1.7rem!important;cursor:pointer}
.sf-menu__body{display:grid;grid-template-columns:17.5rem minmax(0,1fr);min-width:0;min-height:0}
.sf-menu__rail{display:flex;min-height:0;padding:1rem .85rem;border-right:1px solid rgba(216,164,65,.15);background:linear-gradient(180deg,rgba(138,34,48,.1),transparent 36%),rgba(4,3,4,.44);flex-direction:column;gap:.42rem}
.sf-menu__rail button{position:relative;display:grid;grid-template-columns:1.5rem minmax(0,1fr);align-items:center;gap:.75rem;min-height:3.1rem;padding:.62rem .72rem;border:1px solid transparent;border-radius:0;background:transparent;color:rgba(242,229,199,.62);font-size:12px;letter-spacing:.1em;text-align:left;cursor:pointer}
.sf-menu__rail button svg{width:1.35rem;height:1.35rem;color:rgba(216,164,65,.7)}
.sf-menu__rail button:hover,.sf-menu__rail button.is-active,.sf-menu__rail button[aria-selected="true"]{border-color:rgba(216,164,65,.28);background:linear-gradient(90deg,rgba(138,34,48,.34),rgba(216,164,65,.035));color:var(--sfu-bone);box-shadow:inset 3px 0 0 var(--sfu-brass)}
.sf-menu__rail .sf-menu__resume{grid-template-columns:1.5rem minmax(0,1fr);min-height:4.25rem;margin-bottom:.35rem;border-color:rgba(216,164,65,.43);background:linear-gradient(90deg,rgba(138,34,48,.72),rgba(69,20,26,.44));color:var(--sfu-gold);box-shadow:inset 3px 0 0 var(--sfu-gold)}
.sf-menu__rail [data-career-recovery-nav]{position:absolute;right:.3rem;top:.18rem;padding:.12rem .2rem;border:1px solid rgba(239,99,62,.62);background:#4a151d;color:#ffd0bd;font-size:9px;font-weight:600;line-height:1;letter-spacing:.025em;pointer-events:none}.sf-menu__rail [data-career-recovery-nav][hidden]{display:none!important}.sf-menu__rail button.has-career-conflict{border-color:rgba(239,99,62,.3);box-shadow:inset 3px 0 0 var(--sfu-threat)}
.sf-menu__resume span{display:grid;gap:.15rem}.sf-menu__resume strong{color:var(--sfu-bone);font-family:"Cinzel",Georgia,serif;font-size:13px;letter-spacing:.1em}.sf-menu__resume small{color:rgba(242,229,199,.54);font-size:10px;letter-spacing:.03em}
.sf-menu__rail-spacer{flex:1;min-height:.3rem}.sf-menu__rail button[data-menu-action]{min-height:2.75rem;grid-template-columns:1fr;color:rgba(242,229,199,.48);font-size:11px}.sf-menu__rail button[data-menu-action="maximize"]{grid-template-columns:1.5rem minmax(0,1fr);border-color:rgba(216,164,65,.2);color:var(--sfu-gold)}.sf-menu__rail button[data-menu-action="restart"]{color:rgba(239,99,62,.8)}
.sf-menu__content{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:rgba(216,164,65,.4) rgba(0,0,0,.18)}
.sf-menu__page{min-height:100%;padding:clamp(1.15rem,2.8vw,2.4rem);box-sizing:border-box}
.sf-menu__pagehead{display:grid;gap:.2rem;margin-bottom:1.25rem;padding-bottom:.85rem;border-bottom:1px solid rgba(216,164,65,.18)}.sf-menu__pagehead>span{color:rgba(216,164,65,.72);font-size:11px;letter-spacing:.22em}.sf-menu__pagehead h3{margin:0;color:var(--sfu-bone);font:600 clamp(1.45rem,2.8vw,2.3rem)/1.05 "Cinzel",Georgia,serif;letter-spacing:.1em}.sf-menu__pagehead p{max-width:44rem;margin:.25rem 0 0;color:rgba(242,229,199,.57);font:500 15px/1.35 "Cormorant Garamond",Georgia,serif;letter-spacing:.02em}
.sf-operation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}.sf-operation-card{position:relative;display:grid;align-content:start;min-height:8rem;padding:.85rem;border:1px solid rgba(216,164,65,.19);background:linear-gradient(135deg,rgba(216,164,65,.055),transparent 48%),rgba(17,11,12,.58);box-shadow:inset 2px 0 0 rgba(216,164,65,.28)}
.sf-operation-card--objective,.sf-operation-card--breach{grid-column:span 2}.sf-operation-card small{color:rgba(216,164,65,.68);font-size:10px;letter-spacing:.16em}.sf-operation-card strong{margin-top:.5rem;color:var(--sfu-bone);font:600 15px/1.25 "Cinzel",Georgia,serif;letter-spacing:.04em}.sf-operation-card>span{align-self:end;margin-top:.5rem;color:rgba(242,229,199,.5);font-size:11px}.sf-operation-card--breach strong{color:var(--sfu-verd)}
.sf-menu[data-phase="lost"] .sf-operation-card--objective,.sf-menu[data-phase="lost"] .sf-operation-card--breach{border-color:rgba(239,99,62,.38)}
.sf-menu__callout{margin-top:.85rem;padding:.85rem 1rem;border-left:2px solid var(--sfu-brass);background:rgba(216,164,65,.055)}.sf-menu__callout span{color:var(--sfu-brass);font-size:10px;letter-spacing:.16em}.sf-menu__callout p{margin:.35rem 0 0;color:rgba(242,229,199,.68);font-size:12px;line-height:1.5}
.sf-menu kbd{padding:.15rem .32rem;border:1px solid rgba(216,164,65,.35);background:rgba(0,0,0,.3);color:var(--sfu-gold);font:10px/1 "Share Tech Mono",monospace}

.sf-save-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.sf-save-slot{min-width:0;padding:.85rem;border:1px solid rgba(216,164,65,.18);background:rgba(16,10,11,.6);box-shadow:inset 2px 0 0 rgba(216,164,65,.2)}.sf-save-slot.has-save{border-color:rgba(118,205,167,.35);box-shadow:inset 2px 0 0 rgba(118,205,167,.7)}
.sf-save-slot>header{display:flex;justify-content:space-between;gap:.5rem;color:rgba(216,164,65,.72);font-size:11px;letter-spacing:.12em}.sf-save-slot>header b{color:rgba(242,229,199,.46);font-weight:500}.sf-save-slot.has-save>header b{color:var(--sfu-verd)}
.sf-save-slot__summary{display:grid;gap:.25rem;min-height:5.3rem;margin:.7rem 0;align-content:start}.sf-save-slot__summary strong{overflow:hidden;color:var(--sfu-bone);font:600 14px/1.2 "Cinzel",Georgia,serif;text-overflow:ellipsis;white-space:nowrap}.sf-save-slot__summary span{color:rgba(242,229,199,.57);font-size:11px;line-height:1.35}.sf-save-slot__summary small{margin-top:auto;color:rgba(242,229,199,.38);font-size:10px}
.sf-save-slot__actions{display:flex;gap:.4rem}.sf-save-slot__actions button{flex:1;min-width:0;min-height:2.75rem;padding:.45rem .55rem;border:1px solid rgba(216,164,65,.3);border-radius:0;background:rgba(216,164,65,.06);color:var(--sfu-gold);font-size:11px;letter-spacing:.06em;cursor:pointer}.sf-save-slot__actions button:hover:not(:disabled){border-color:var(--sfu-gold);background:rgba(138,34,48,.36)}.sf-save-slot__actions button:disabled{opacity:.3;cursor:not-allowed}
.sf-save-reason{margin:.8rem 0 0;padding:.55rem .7rem;border-left:2px solid var(--sfu-threat);background:rgba(239,99,62,.055);color:rgba(242,229,199,.64);font-size:11px;letter-spacing:.06em}.sf-save-reason[data-ready="1"]{border-left-color:var(--sfu-verd);color:var(--sfu-verd)}
.sf-career-recovery{position:relative;margin:0 0 1rem;padding:clamp(.8rem,1.7vw,1.05rem);border:1px solid rgba(239,99,62,.42);border-left:3px solid var(--sfu-threat);background:radial-gradient(circle at 90% 8%,rgba(239,99,62,.09),transparent 34%),linear-gradient(125deg,rgba(138,34,48,.14),transparent 52%),rgba(11,7,8,.76);box-shadow:inset 0 0 0 1px rgba(242,229,199,.018)}
.sf-career-recovery:focus{outline:2px solid rgba(245,216,142,.72);outline-offset:2px}
.sf-career-recovery[hidden]{display:none!important}.sf-career-recovery__head{display:flex;align-items:start;justify-content:space-between;gap:1rem}.sf-career-recovery__head>span{display:grid;gap:.18rem}.sf-career-recovery__head small{color:#ff9d7f;font-size:10px;letter-spacing:.15em}.sf-career-recovery__head h4{margin:0;color:var(--sfu-bone);font:600 clamp(1.05rem,2vw,1.35rem)/1.15 "Cinzel",Georgia,serif;letter-spacing:.055em}.sf-career-recovery__head>b{flex:none;padding:.32rem .48rem;border:1px solid rgba(239,99,62,.45);color:#ffab91;font-size:9px;font-weight:500;letter-spacing:.08em}.sf-career-recovery>p{margin:.5rem 0 .75rem;max-width:48rem;color:rgba(242,229,199,.65);font-size:11px;line-height:1.45}
.sf-career-recovery__branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.sf-career-branch{display:grid;grid-template-rows:auto auto minmax(2.4em,auto) auto auto;min-width:0;padding:.7rem;border:1px solid rgba(216,164,65,.18);background:linear-gradient(135deg,rgba(216,164,65,.035),transparent 48%),rgba(5,4,5,.42);transition:border-color .14s,background-color .14s,opacity .14s,box-shadow .14s}.sf-career-branch[data-state="armed"]{border-color:var(--sfu-gold);background-color:rgba(52,32,21,.5);box-shadow:inset 3px 0 0 var(--sfu-gold),0 0 1.2rem rgba(216,164,65,.08)}.sf-career-branch[data-state="unavailable"]{filter:saturate(.35);opacity:.56}.sf-career-branch>header{display:flex;align-items:start;justify-content:space-between;gap:.65rem;padding-bottom:.55rem;border-bottom:1px solid rgba(216,164,65,.12)}.sf-career-branch>header>span{display:grid;gap:.14rem}.sf-career-branch>header small{color:rgba(216,164,65,.55);font-size:9px;letter-spacing:.1em}.sf-career-branch>header strong{color:rgba(248,239,218,.94);font:600 12px/1.2 "Cinzel",Georgia,serif;letter-spacing:.05em}.sf-career-branch>header>b{color:rgba(242,229,199,.46);font-size:9px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.sf-career-branch dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;margin:.6rem 0}.sf-career-branch dl>div{display:grid;gap:.2rem;min-width:0;padding:.35rem .4rem;border-left:1px solid rgba(216,164,65,.18);background:rgba(0,0,0,.18)}.sf-career-branch dt{overflow:hidden;color:rgba(216,164,65,.58);font-size:9px;letter-spacing:.025em;text-overflow:ellipsis;white-space:nowrap}.sf-career-branch dd{margin:0;overflow:hidden;color:var(--sfu-bone);font:600 14px/1.1 "Cinzel",Georgia,serif;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}.sf-career-branch>p{min-width:0;margin:0;color:rgba(242,229,199,.62);font-size:10px;line-height:1.4;overflow-wrap:anywhere}.sf-career-branch>small{align-self:end;margin:.45rem 0;color:rgba(242,229,199,.42);font-size:9px;line-height:1.3}.sf-career-branch>button{width:100%;min-height:44px;padding:.5rem .65rem;border:1px solid rgba(216,164,65,.35);border-radius:0;background:rgba(216,164,65,.055);color:var(--sfu-gold);font-size:10px;line-height:1.25;letter-spacing:.045em;white-space:normal;cursor:pointer}.sf-career-branch>button:hover:not(:disabled){border-color:var(--sfu-gold);background:rgba(138,34,48,.3)}.sf-career-branch[data-state="armed"]>button{border-color:var(--sfu-gold);background:rgba(216,164,65,.13);color:#fff0c8}.sf-career-branch>button:disabled{cursor:not-allowed;filter:saturate(.35);opacity:.4}
.sf-career-recovery .sf-career-recovery__status{min-height:1.4em;margin:.65rem 0 0;padding:.45rem .55rem;border-left:2px solid rgba(216,164,65,.42);background:rgba(216,164,65,.035);color:rgba(242,229,199,.7);font-size:10px;line-height:1.4;letter-spacing:.015em}.sf-career-recovery[data-state="resolving"] .sf-career-recovery__status{border-left-color:var(--sfu-gold);color:var(--sfu-gold)}.sf-career-recovery[data-state="resolved"]{border-color:rgba(118,205,167,.48);border-left-color:var(--sfu-verd);background:rgba(28,69,52,.14)}.sf-career-recovery[data-state="resolved"] .sf-career-recovery__head small,.sf-career-recovery[data-state="resolved"] .sf-career-recovery__head>b,.sf-career-recovery[data-state="resolved"] .sf-career-recovery__status{border-color:var(--sfu-verd);color:var(--sfu-verd)}.sf-career-recovery[data-state="resolved"] .sf-career-recovery__branches,.sf-career-recovery[data-state="resolved"]>p:not(.sf-career-recovery__status){display:none}
.sf-controls-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.sf-controls-grid article{padding:.85rem;border:1px solid rgba(216,164,65,.17);background:rgba(16,10,11,.52)}.sf-controls-grid h4{margin:0 0 .65rem;color:var(--sfu-brass);font-family:"Cinzel",Georgia,serif;font-size:12px;letter-spacing:.14em}
.sf-control-row{display:grid;grid-template-columns:minmax(4.7rem,auto) 1fr;align-items:center;gap:.65rem;min-height:2.75rem;border-top:1px solid rgba(242,229,199,.07)}.sf-control-row kbd{justify-self:start;white-space:nowrap}.sf-control-row>span{display:grid;gap:.1rem}.sf-control-row strong{color:rgba(242,229,199,.84);font-size:11px;font-weight:500}.sf-control-row small{color:rgba(242,229,199,.4);font-size:10px}
/* Rebindable controls. A key slot is a BUTTON that looks like a key:
   the affordance has to read as "press me" without a second legend. */
.sf-bind-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.6rem;min-height:2.9rem;border-top:1px solid rgba(242,229,199,.07)}
.sf-bind-row>span:first-child{display:grid;gap:.1rem;min-width:0}
.sf-bind-row strong{color:rgba(242,229,199,.84);font-size:11px;font-weight:500}
.sf-bind-row small{color:rgba(242,229,199,.4);font-size:10px;line-height:1.35}
.sf-bind-keys{display:flex;gap:.3rem;flex-shrink:0}
.sf-bind-key{display:inline-flex;align-items:center;justify-content:center;min-width:3.1rem;min-height:2rem;padding:.15rem .3rem;border:1px solid rgba(216,164,65,.3);border-radius:0;background:rgba(0,0,0,.24);cursor:pointer}
.sf-bind-key kbd{border:0;background:none;padding:0;color:rgba(242,229,199,.86);font-size:10px;letter-spacing:.06em;white-space:nowrap}
.sf-bind-key:hover,.sf-bind-key:focus-visible{border-color:var(--sfu-gold);background:rgba(216,164,65,.12)}
.sf-bind-key[data-bind-empty="true"] kbd{color:rgba(242,229,199,.3)}
.sf-bind-key[data-bind-listening="true"]{border-color:var(--sfu-gold);background:rgba(216,164,65,.2)}
.sf-bind-key[data-bind-listening="true"] kbd{color:var(--sfu-gold)}
.sf-bind-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.9rem;margin:0 0 .7rem;padding-bottom:.6rem;border-bottom:1px solid rgba(216,164,65,.14)}
.sf-bind-status{margin:0;color:rgba(242,229,199,.52);font-size:11px;min-height:1.3em}
.sf-bind-bar button{min-height:2.75rem;padding:.45rem .9rem;border:1px solid rgba(216,164,65,.3);border-radius:0;background:rgba(0,0,0,.22);color:rgba(242,229,199,.62);font-size:11px;letter-spacing:.08em;cursor:pointer}
.sf-bind-bar button:hover,.sf-bind-bar button:focus-visible{border-color:var(--sfu-gold);color:var(--sfu-gold)}
.sf-controls-grid .sf-bind-fixed .sf-control-row{grid-template-columns:minmax(3.6rem,auto) 1fr}
.sf-settings-list{display:grid;gap:.6rem}.sf-setting{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;min-height:4.6rem;padding:.7rem .8rem;border:1px solid rgba(216,164,65,.17);background:rgba(16,10,11,.5)}.sf-setting>span{display:grid;gap:.22rem}.sf-setting strong{color:var(--sfu-bone);font:600 12px/1.2 "Cinzel",Georgia,serif;letter-spacing:.08em}.sf-setting small{color:rgba(242,229,199,.48);font-size:11px}
.sf-setting>button,.sf-setting__segments button{min-width:4.5rem;min-height:2.75rem;padding:.45rem .65rem;border:1px solid rgba(216,164,65,.3);border-radius:0;background:rgba(0,0,0,.22);color:rgba(242,229,199,.58);font-size:11px;cursor:pointer}.sf-setting>button[aria-checked="true"],.sf-setting__segments button.is-active{border-color:var(--sfu-verd);background:rgba(56,111,87,.18);color:var(--sfu-verd)}.sf-setting__segments{display:flex;gap:.35rem}
.sf-setting--quality .sf-setting__segments,.sf-setting--difficulty .sf-setting__segments{flex-wrap:wrap;justify-content:flex-end;max-width:100%}
.sf-setting--quality .sf-setting__segments button,.sf-setting--difficulty .sf-setting__segments button{min-width:3.9rem}
.sf-setting--slider{grid-template-columns:minmax(0,1fr) minmax(130px, 190px)}.sf-setting--slider>span{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.sf-setting--slider small{color:var(--sfu-gold,#d8a441);font-weight:600;font-variant-numeric:tabular-nums}.sf-slider{width:100%;height:8px;-webkit-appearance:none;appearance:none;background:rgba(216,164,65,.18);border:1px solid rgba(216,164,65,.28);outline:none;border-radius:0;cursor:pointer}.sf-slider:focus-visible{border-color:var(--sfu-gold)}.sf-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:22px;background:var(--sfu-gold,#d8a441);border:1px solid #100a0b;cursor:pointer}.sf-slider::-moz-range-thumb{width:14px;height:22px;background:var(--sfu-gold,#d8a441);border:1px solid #100a0b;cursor:pointer}
.sf-menu__footer{display:flex;justify-content:space-between;gap:1rem;min-height:2.6rem;padding:.65rem 1rem;border-top:1px solid rgba(216,164,65,.16);color:rgba(242,229,199,.42);font-size:10px;letter-spacing:.09em}
@keyframes sfu-menu-in{from{opacity:0}to{opacity:1}}

@media (max-width:880px){
 .sf-command-wheel__dial{width:min(29rem,96vw)}.sf-command-wheel__ring{width:17rem;height:17rem}.sf-command-wheel__option{width:11.8rem;grid-template-columns:2.7rem minmax(0,1fr);min-height:4.4rem;padding:.55rem}.sf-command-wheel__sigil{width:2.65rem;height:2.65rem}.sf-command-wheel__sigil svg{width:1.65rem;height:1.65rem}.sf-command-wheel__copy strong{font-size:11px;padding-right:2.4rem}.sf-command-wheel__option[data-index="0"]{top:calc(50% - 10.2rem)}.sf-command-wheel__option[data-index="1"]{left:calc(50% + 9.1rem);top:calc(50% + 6.3rem)}.sf-command-wheel__option[data-index="2"]{left:calc(50% - 9.1rem);top:calc(50% + 6.3rem)}.sf-command-wheel__core{width:6.6rem;height:6.6rem}
 .sf-menu__frame{width:calc(100% - 1.4rem);height:calc(100% - 1.4rem)}.sf-menu__body{grid-template-columns:14rem minmax(0,1fr)}.sf-operation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sf-operation-card--objective,.sf-operation-card--breach{grid-column:span 2}.sf-controls-grid{grid-template-columns:1fr}
}

@media (max-width:560px),(hover:none) and (pointer:coarse) and (orientation:portrait){
 .sf-menu-trigger{top:max(.55rem,env(safe-area-inset-top));left:max(.55rem,env(safe-area-inset-left));width:3rem;height:3rem;padding:.55rem;justify-content:center}.sf-menu-trigger span,.sf-menu-trigger kbd{display:none}
 .sf-command-wheel__dial{width:100%;height:100%;aspect-ratio:auto}.sf-command-wheel__ring{width:15.5rem;height:15.5rem}.sf-command-wheel__option{box-sizing:border-box;width:min(10.25rem,calc(50vw - 1rem));min-height:5.65rem;padding:.55rem .45rem;grid-template-columns:2.15rem minmax(0,1fr);gap:.35rem}.sf-command-wheel__copy strong{padding-right:0;font-size:10px;line-height:1.25;letter-spacing:.01em;overflow-wrap:normal;word-break:normal}.sf-command-wheel__copy small{padding-right:2.55rem;font-size:10px;line-height:1.18}.sf-command-wheel__option>b{top:auto;right:.42rem;bottom:.38rem;font-size:9px}.sf-command-wheel__sigil{width:2.1rem;height:2.1rem}.sf-command-wheel__sigil svg{width:1.35rem;height:1.35rem}.sf-command-wheel__option[data-index="0"]{top:calc(50% - 10.1rem)}.sf-command-wheel__option[data-index="1"]{left:calc(50% + min(6.3rem,26vw));top:calc(50% + 6.1rem)}.sf-command-wheel__option[data-index="2"]{left:calc(50% - min(6.3rem,26vw));top:calc(50% + 6.1rem)}.sf-command-wheel__core{width:6.2rem;height:6.2rem}.sf-command-wheel__instruction{bottom:max(1rem,env(safe-area-inset-bottom));width:calc(100% - 2rem);padding:.45rem;font-size:10px;letter-spacing:.07em;text-align:center;white-space:normal}
 .sf-menu{overflow:hidden}.sf-menu__frame{inset:0;width:100%;height:100%;transform:none;border:0}.sf-menu__frame:before,.sf-menu__frame:after{display:none}.sf-menu__masthead{min-height:4.6rem;padding:.55rem .65rem;gap:.7rem}.sf-menu__crest{width:2.7rem;height:2.7rem}.sf-menu__crest svg{width:1.65rem;height:1.65rem}.sf-menu__masthead span{font-size:10px}.sf-menu__masthead h2{margin:.12rem 0 .06rem;font-size:1rem;letter-spacing:.08em}.sf-menu__masthead p{font-size:10px}.sf-menu__close{width:2.75rem;height:2.75rem}
 .sf-menu__body{display:flex;flex-direction:column}.sf-menu__rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:none;padding:.45rem .5rem;border-right:0;border-bottom:1px solid rgba(216,164,65,.16);gap:.3rem}.sf-menu__rail button{display:flex;min-width:0;min-height:2.9rem;padding:.4rem .25rem;justify-content:center;text-align:center}.sf-menu__rail button svg{display:none}.sf-menu__rail button span{overflow:visible;font-size:10px;line-height:1.15;letter-spacing:.035em;text-overflow:clip;white-space:normal}.sf-menu__rail .sf-menu__resume{grid-column:1/-1;min-height:3rem;margin:0}.sf-menu__resume span{display:block}.sf-menu__resume small{display:none}.sf-menu__rail-spacer{display:none}.sf-menu__rail button[data-menu-action]{display:flex;grid-column:span 2;min-height:44px;padding:.35rem .45rem;font-size:9px;line-height:1.15}
 .sf-menu__content{flex:1;min-height:0}.sf-menu__page{padding:.8rem .7rem 1.1rem}.sf-menu__pagehead{margin-bottom:.7rem;padding-bottom:.55rem}.sf-menu__pagehead h3{font-size:1.25rem}.sf-menu__pagehead p{font-size:13px}.sf-operation-grid{gap:.45rem}.sf-operation-card{min-height:6.2rem;padding:.65rem}.sf-operation-card strong{font-size:12px}.sf-menu__callout{display:none}.sf-save-grid{grid-template-columns:1fr;gap:.5rem}.sf-save-slot{padding:.65rem}.sf-save-slot__summary{min-height:4.3rem;margin:.5rem 0}.sf-career-recovery{margin-bottom:.7rem;padding:.65rem}.sf-career-recovery__head{gap:.5rem}.sf-career-recovery__head>b{padding:.25rem .32rem;font-size:9px}.sf-career-recovery__branches{grid-template-columns:1fr;gap:.45rem}.sf-career-branch{padding:.6rem}.sf-career-branch>button{min-height:44px}.sf-controls-grid{gap:.5rem}.sf-setting{min-height:4.2rem;padding:.6rem;gap:.55rem}.sf-setting__segments{flex-direction:column}.sf-setting>button,.sf-setting__segments button{min-width:4rem}.sf-menu__footer{display:none}
}

@media (orientation:landscape) and (max-height:500px){
 .sf-command-wheel__dial{width:auto;height:calc(100% - .75rem);aspect-ratio:1}.sf-command-wheel__ring{width:14.5rem;height:14.5rem}.sf-command-wheel__option{width:10rem;min-height:3.65rem;padding:.4rem .5rem;grid-template-columns:2.4rem minmax(0,1fr)}.sf-command-wheel__sigil{width:2.3rem;height:2.3rem}.sf-command-wheel__copy{align-self:stretch;align-content:start;padding-top:.12rem}.sf-command-wheel__copy strong{padding-right:0;font-size:10px;letter-spacing:.02em}.sf-command-wheel__copy small{display:none}.sf-command-wheel__option>b{top:auto;right:.45rem;bottom:.36rem;font-size:9px}.sf-command-wheel__option[data-index="0"]{top:calc(50% - 8rem)}.sf-command-wheel__option[data-index="1"]{left:calc(50% + 8.8rem);top:calc(50% + 4.7rem)}.sf-command-wheel__option[data-index="2"]{left:calc(50% - 8.8rem);top:calc(50% + 4.7rem)}.sf-command-wheel__core{width:5.5rem;height:5.5rem}.sf-command-wheel__core small{display:none}.sf-command-wheel__instruction{bottom:.45rem}
 .sf-menu__frame{width:100%;height:100%;border:0}.sf-menu__masthead{min-height:3.8rem;padding:.4rem .65rem}.sf-menu__crest{width:2.45rem;height:2.45rem}.sf-menu__crest svg{width:1.5rem;height:1.5rem}.sf-menu__masthead h2{font-size:1.05rem}.sf-menu__masthead p,.sf-menu__masthead span{font-size:9px}.sf-menu__close{width:2.75rem;height:2.75rem}.sf-menu__body{grid-template-columns:12.5rem minmax(0,1fr)}
 .sf-menu__rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(44px,auto);align-content:start;padding:.45rem;gap:.2rem}.sf-menu__rail button{display:flex;min-width:0;min-height:44px;padding:.35rem .25rem;justify-content:center;font-size:9px;text-align:center}.sf-menu__rail button svg{display:none}.sf-menu__rail .sf-menu__resume{grid-column:1/-1;min-height:44px;margin:0}.sf-menu__resume span{display:block}.sf-menu__resume small,.sf-menu__rail-spacer{display:none}.sf-menu__rail button[data-menu-action]{min-height:44px;padding:.25rem;font-size:9px}
 .sf-menu__page{padding:.7rem .85rem}.sf-menu__pagehead{margin-bottom:.55rem;padding-bottom:.4rem}.sf-menu__pagehead h3{font-size:1.15rem}.sf-menu__pagehead p{font-size:12px}.sf-operation-card{min-height:5rem;padding:.55rem}.sf-menu__callout{display:none}.sf-save-slot{padding:.55rem}.sf-save-slot__summary{min-height:3.2rem;margin:.35rem 0}.sf-save-slot__actions button{min-height:44px}.sf-controls-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem}.sf-control-row{min-height:2.75rem}.sf-setting{min-height:3.3rem}.sf-menu__footer{min-height:2rem;padding:.4rem .7rem}
}

body.sf-high-contrast .sf-menu__frame,body.sf-high-contrast .sf-command-wheel__option,body.sf-high-contrast .sf-command-wheel__core{border-color:rgba(245,216,142,.72);background-color:#090607}body.sf-high-contrast .sf-native-ui{--sfu-dim:#fff6e1}
body.sf-high-contrast .sf-command-wheel__copy small,body.sf-high-contrast .sf-command-wheel__core small,body.sf-high-contrast .sf-command-wheel__instruction,body.sf-high-contrast .sf-menu__masthead p,body.sf-high-contrast .sf-menu__resume small,body.sf-high-contrast .sf-menu__rail button[data-menu-action],body.sf-high-contrast .sf-menu__pagehead p,body.sf-high-contrast .sf-operation-card>span,body.sf-high-contrast .sf-menu__callout p,body.sf-high-contrast .sf-save-slot>header b,body.sf-high-contrast .sf-save-slot__summary span,body.sf-high-contrast .sf-save-slot__summary small,body.sf-high-contrast .sf-save-reason,body.sf-high-contrast .sf-bind-row small,body.sf-high-contrast .sf-bind-status,body.sf-high-contrast .sf-control-row small,body.sf-high-contrast .sf-setting small,body.sf-high-contrast .sf-setting>button,body.sf-high-contrast .sf-setting__segments button,body.sf-high-contrast .sf-menu__footer{color:#f8edda}
body.sf-high-contrast .sf-menu__masthead span,body.sf-high-contrast .sf-menu__pagehead>span,body.sf-high-contrast .sf-operation-card small,body.sf-high-contrast .sf-menu__callout span,body.sf-high-contrast .sf-save-slot>header{color:#f5d88e}
body.sf-high-contrast .sf-save-slot.has-save>header b,body.sf-high-contrast .sf-save-reason[data-ready="1"]{color:#9be7c5}body.sf-high-contrast .sf-menu__rail button[data-menu-action="restart"]{color:#ff896b}
body.sf-high-contrast .sf-career-recovery,body.sf-high-contrast .sf-career-branch{border-color:#f5d88e;background-color:#090607}body.sf-high-contrast .sf-career-recovery>p,body.sf-high-contrast .sf-career-branch>p,body.sf-high-contrast .sf-career-branch>small,body.sf-high-contrast .sf-career-recovery__status{color:#f8edda}body.sf-high-contrast .sf-career-branch[data-state="unavailable"]{border-color:#ff896b;opacity:.76}
body.sf-reduced-motion .sf-command-wheel,body.sf-reduced-motion .sf-menu,body.sf-reduced-motion .sf-command-wheel__option,body.sf-reduced-motion .sf-command-wheel__cursor,body.sf-reduced-motion #sf-hud,body.sf-reduced-motion .sf-career-branch{animation:none!important;transition:none!important}

@media (max-width:360px){
 .sf-career-branch dl{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sf-menu__rail [data-career-recovery-nav]{right:.08rem;top:.08rem;padding:.1rem .14rem;font-size:9px}
}

.sf-stage:not(.sf-touch-enabled) #sf-hud .sf-hud__objective{
  left:max(.85rem,calc(env(safe-area-inset-left) + .65rem));
  top:max(.72rem,calc(env(safe-area-inset-top) + .5rem));
  width:min(18rem,29cqw)
}

@media (max-width:560px),(hover:none) and (pointer:coarse) and (orientation:portrait){
 .sf-menu__rail button[data-menu-action="maximize"]{grid-column:1/-1}
}

@media (orientation:landscape) and (max-height:500px){
 .sf-menu__rail button[data-menu-action="maximize"]{grid-column:1/-1}
}

/* Tactical hierarchy: the corner instrument is now only a map. Mission and
   Bloom state live in their own compact field-order list at the opposite edge. */
#sf-hud .sf-hud__minimap{
  top:max(.72rem,calc(env(safe-area-inset-top) + .5rem));
  width:6.25rem;
  padding:0;
  border:1px solid rgba(216,164,65,.55);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none
}
#sf-hud .sf-minimap__head{top:.3rem;right:.35rem}
#sf-hud #sf-map-canvas{display:block;border-radius:0;background:transparent;box-shadow:none;filter:none}
#sf-hud .sf-minimap__expand{display:none;align-items:center;justify-content:center;gap:.32rem;margin:.18rem 0 0;color:rgba(242,229,199,.42);font-size:7px;letter-spacing:.12em}
#sf-hud .sf-minimap__expand kbd{display:grid;place-items:center;min-width:1.05rem;height:1rem;padding:0;border:1px solid rgba(216,164,65,.26);border-radius:.18rem;background:rgba(0,0,0,.28);color:rgba(245,216,142,.8);font:7px/1 "Share Tech Mono",monospace}

.sf-stage:not(.sf-touch-enabled) #sf-hud .sf-hud__objective{
  left:max(.85rem,calc(env(safe-area-inset-left) + .65rem));
  top:max(.72rem,calc(env(safe-area-inset-top) + .5rem));
  width:min(18.5rem,28cqw)
}
#sf-hud .sf-hud__objective{
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  text-align:left;
  pointer-events:none
}
#sf-hud .sf-objective__head{
  display:flex;
  align-items:center;
  gap:.35rem;
  margin:0 0 .15rem;
  padding:0;
  border-bottom:none;
  color:rgba(216,164,65,.85);
  font:600 11px/1.2 "Share Tech Mono",monospace;
  letter-spacing:.14em;
  text-shadow:0 1px 4px rgba(0,0,0,.95),0 0 8px rgba(0,0,0,.8)
}
#sf-hud .sf-objective__item{display:flex;align-items:center;justify-content:flex-start;gap:.6rem;min-width:0}
#sf-hud .sf-objective__item>i,#sf-hud .sf-minimap__event-head>i{display:none}
#sf-hud .sf-objective__copy{display:flex;flex-direction:column;gap:.08rem;min-width:0;flex:1 1 auto}
#sf-hud .sf-objective__copy small{color:rgba(216,164,65,.85);font:600 10px/1.2 "Share Tech Mono",monospace;letter-spacing:.14em;text-shadow:0 1px 3px rgba(0,0,0,.95)}
#sf-hud .sf-objective__copy strong{overflow:hidden;color:#fff0bf;font:700 15px/1.22 "Share Tech Mono",monospace;letter-spacing:.04em;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.85)}
#sf-hud .sf-objective__meta{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.12rem;min-width:2.4rem;flex-shrink:0;text-align:center}
#sf-hud .sf-objective__arrow{width:13px;height:13px;color:#ffd875;transform-origin:50% 50%;transition:transform .06s ease-out,opacity .2s ease;filter:drop-shadow(0 1px 3px rgba(0,0,0,.95)) drop-shadow(0 0 4px rgba(245,216,142,.45));display:block}
#sf-hud .sf-objective__item>b,#sf-hud .sf-objective__meta>b{color:#f5d88e;font:700 13px/1.2 "Share Tech Mono",monospace;letter-spacing:.04em;font-variant-numeric:tabular-nums;text-shadow:0 1px 4px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.85);white-space:nowrap}
#sf-hud .sf-hud__objbar{display:none}

#sf-hud .sf-minimap__event{margin:.3rem 0 0;padding:0;border-top:none;background:transparent}
#sf-hud .sf-minimap__event[data-phase="dormant"]{display:none}
#sf-hud .sf-minimap__event-head{display:flex;align-items:baseline;gap:.55rem}
#sf-hud .sf-minimap__event-head>i{display:none}
#sf-hud .sf-minimap__event-title{display:flex;flex-direction:column;gap:.06rem;min-width:0;white-space:normal}
#sf-hud .sf-minimap__event-title small{display:block;color:rgba(239,145,95,.9);font:600 10px/1.2 "Share Tech Mono",monospace;letter-spacing:.12em;text-shadow:0 1px 3px rgba(0,0,0,.95)}
#sf-hud .sf-minimap__event-title strong{overflow:hidden;color:#ff9672;font:700 14px/1.2 "Share Tech Mono",monospace;letter-spacing:.035em;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.85)}
#sf-hud .sf-minimap__event-head>b{color:#ffaa88;font:700 13px/1.2 "Share Tech Mono",monospace;font-variant-numeric:tabular-nums;text-shadow:0 1px 4px rgba(0,0,0,.95)}
#sf-hud .sf-minimap__event>small,#sf-hud .sf-minimap__event>i{display:none}
#sf-hud .sf-hud__objective[data-event="1"]{border:none;background:transparent}

/* Full map panel */
.sf-menu__page--map{display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;overflow:hidden}
.sf-menu__page--map[hidden]{display:none}
.sf-map-page{display:grid;grid-template-columns:minmax(18rem,1.15fr) minmax(16rem,.85fr);gap:1rem;min-height:0}
.sf-map-page__surface{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0;margin:0;padding:.7rem;border:1px solid rgba(216,164,65,.18);border-radius:.65rem;background:radial-gradient(circle at 50% 48%,rgba(216,164,65,.06),transparent 58%),rgba(5,4,5,.52);box-shadow:inset 0 0 2.4rem rgba(0,0,0,.24)}
.sf-map-page__surface>header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:2.4rem;padding:0 .2rem .55rem;border-bottom:1px solid rgba(216,164,65,.12)}
.sf-map-page__surface>header span{display:grid;gap:.08rem}.sf-map-page__surface>header small{color:rgba(216,164,65,.52);font-size:8px;letter-spacing:.16em}.sf-map-page__surface>header strong{color:rgba(242,229,199,.78);font:600 10px/1.2 "Share Tech Mono",monospace;letter-spacing:.1em}.sf-map-page__surface>header b{color:var(--sfu-gold);font:600 10px/1 "Share Tech Mono",monospace;letter-spacing:.06em}
#sf-map-canvas-large{align-self:center;justify-self:center;display:block;width:auto;height:100%;max-width:100%;aspect-ratio:1;border:1px solid rgba(245,216,142,.18);border-radius:.35rem;background:rgba(4,3,4,.82);filter:drop-shadow(0 0 1.2rem rgba(216,164,65,.1))}
.sf-map-page__legend{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;padding:.55rem .15rem 0;border-top:1px solid rgba(216,164,65,.1)}
.sf-map-page__legend span{display:flex;align-items:center;gap:.35rem;min-width:0;color:rgba(242,229,199,.46);font-size:8px;letter-spacing:.06em;white-space:nowrap}.sf-map-page__legend span:before{content:"";width:.45rem;height:.45rem;border:1px solid var(--sfu-gold);transform:rotate(45deg)}.sf-map-page__legend [data-kind="player"]::before{border:0;background:#fff0bf;clip-path:polygon(50% 0,100% 100%,50% 72%,0 100%);transform:none}.sf-map-page__legend [data-kind="relay"]::before{background:#f0ad4b}.sf-map-page__legend [data-kind="breach"]::before{border-radius:50%;border-color:#ff6843;transform:none}
.sf-map-page__orders{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0;padding:.75rem;border:1px solid rgba(216,164,65,.16);border-radius:.65rem;background:linear-gradient(145deg,rgba(138,34,48,.08),transparent 45%),rgba(12,8,9,.58)}
.sf-map-page__orders>header{display:flex;justify-content:space-between;gap:.75rem;padding:.15rem .1rem .65rem;border-bottom:1px solid rgba(216,164,65,.13);color:rgba(216,164,65,.68);font-size:9px;letter-spacing:.16em}.sf-map-page__orders>header b{color:var(--sfu-bone);font-family:"Share Tech Mono",monospace}
.sf-map-page__list{display:grid;align-content:start;gap:.55rem;min-height:0;padding:.65rem 0;overflow:auto}
.sf-map-order{position:relative;display:grid;grid-template-columns:1.8rem minmax(0,1fr) 3px;gap:.65rem;min-height:5.15rem;padding:.65rem .65rem .65rem .55rem;border:1px solid rgba(216,164,65,.12);border-radius:.45rem;background:rgba(7,5,6,.52);box-shadow:inset 2px 0 0 rgba(216,164,65,.34)}
.sf-map-order>i{display:grid;place-items:center;width:1.75rem;height:1.75rem;border:1px solid rgba(216,164,65,.3);border-radius:50%;color:rgba(245,216,142,.78);font:8px/1 "Share Tech Mono",monospace}.sf-map-order>span{display:grid;align-content:start;gap:.18rem;min-width:0}.sf-map-order small{color:rgba(216,164,65,.58);font-size:8px;letter-spacing:.13em}.sf-map-order strong{overflow:hidden;color:rgba(248,239,218,.92);font:600 11px/1.22 "Cinzel",Georgia,serif;letter-spacing:.035em;text-overflow:ellipsis;white-space:nowrap}.sf-map-order em{color:rgba(242,229,199,.46);font:normal 9px/1.3 "Share Tech Mono",monospace}.sf-map-order>b{align-self:stretch;width:3px;border-radius:2px;background:linear-gradient(to top,var(--sfu-gold) calc(var(--sf-order-progress)*100%),rgba(242,229,199,.08) 0)}
.sf-map-order[data-state="complete"]{box-shadow:inset 2px 0 0 rgba(118,205,167,.68)}.sf-map-order[data-state="complete"]>i{border-color:rgba(118,205,167,.46);color:var(--sfu-verd)}.sf-map-order[data-state="threat"]{border-color:rgba(239,99,62,.24);box-shadow:inset 2px 0 0 rgba(239,99,62,.74)}.sf-map-order[data-state="threat"]>i{border-color:rgba(239,99,62,.5);color:#ff9672}.sf-map-order[data-state="idle"]{opacity:.68}
.sf-map-page__orders>p{margin:0;padding:.6rem .1rem 0;border-top:1px solid rgba(216,164,65,.1);color:rgba(242,229,199,.38);font-size:8px;letter-spacing:.08em;text-align:center}

@media (max-width:880px){
 .sf-map-page{grid-template-columns:minmax(15rem,1fr) minmax(14rem,.82fr);gap:.65rem}.sf-map-page__legend{grid-template-columns:repeat(2,minmax(0,1fr))}.sf-map-order{min-height:4.65rem;padding:.55rem}.sf-map-order em{font-size:8px}
}

@container saintfall-playfield (max-width:1180px){
 .sf-menu__masthead{min-height:4.8rem}.sf-menu__footer{min-height:2.25rem;padding:.48rem .8rem}.sf-menu__rail{padding:.6rem .65rem;gap:.24rem;overflow-y:auto}.sf-menu__rail button{min-height:2.5rem;padding:.42rem .58rem}.sf-menu__rail .sf-menu__resume{min-height:3.15rem;margin-bottom:.15rem}.sf-menu__rail button[data-menu-action]{min-height:2.35rem}
}

@media (max-width:560px),(hover:none) and (pointer:coarse) and (orientation:portrait){
 .sf-menu__rail{grid-template-columns:repeat(6,minmax(0,1fr))}.sf-menu__rail button span{font-size:9px}.sf-menu__page--map{height:auto;overflow:visible}.sf-menu__page--map .sf-menu__pagehead{margin-bottom:.45rem;padding-bottom:.4rem}.sf-menu__page--map .sf-menu__pagehead p{font-size:11px}.sf-map-page{grid-template-columns:1fr;gap:.35rem}.sf-map-page__surface{min-height:0;padding:.35rem}.sf-map-page__surface>header{min-height:1.7rem;padding:0 .1rem .3rem}.sf-map-page__surface>header small{display:none}.sf-map-page__surface>header strong,.sf-map-page__surface>header b{font-size:8px}#sf-map-canvas-large{width:min(100%,10.5rem);height:auto;max-height:none}.sf-map-page__legend{display:none}.sf-map-page__orders{min-height:0;padding:.35rem}.sf-map-page__orders>header{padding:.05rem .05rem .35rem}.sf-map-page__list{gap:.25rem;padding:.35rem 0}.sf-map-order{grid-template-columns:1.35rem minmax(0,1fr) 2px;gap:.4rem;min-height:3.25rem;padding:.35rem}.sf-map-order>i{width:1.3rem;height:1.3rem}.sf-map-order small{font-size:7px}.sf-map-order strong{font-size:9px}.sf-map-order em{font-size:7px}.sf-map-page__orders>p{display:none}
 .sf-stage.sf-touch-enabled .sf-bossbar{top:max(.55rem,calc(env(safe-area-inset-top) + .28rem));width:min(22rem,72vw)}
.sf-stage.sf-touch-enabled .sf-bossbar__name{font-size:11px;letter-spacing:.1em}
.sf-stage.sf-touch-enabled .sf-bossbar__track{height:6px}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{left:max(.65rem,env(safe-area-inset-left));top:max(3.65rem,calc(env(safe-area-inset-top) + 3.2rem));width:min(15.5rem,62cqw);padding:.36rem .4rem}.sf-stage.sf-touch-enabled #sf-hud .sf-objective__head{display:none}.sf-stage.sf-touch-enabled #sf-hud .sf-objective__copy strong{font-size:9px}.sf-stage.sf-touch-enabled #sf-hud .sf-hud__minimap{top:max(3.65rem,calc(env(safe-area-inset-top) + 3.2rem));width:4.9rem}.sf-stage.sf-touch-enabled #sf-hud .sf-hud__vitals{top:max(6.3rem,calc(env(safe-area-inset-top) + 5.85rem))}.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__expand{display:none}
}

@media (orientation:landscape) and (max-height:500px){
 .sf-menu__page--map{padding:.55rem .7rem}.sf-menu__page--map .sf-menu__pagehead{display:none}.sf-map-page{grid-template-columns:minmax(14rem,1fr) minmax(13rem,.9fr);gap:.55rem}.sf-map-page__surface,.sf-map-page__orders{padding:.45rem}.sf-map-page__surface>header{min-height:1.8rem;padding-bottom:.35rem}.sf-map-page__legend{padding-top:.35rem}.sf-map-order{min-height:3.6rem;padding:.38rem .45rem;grid-template-columns:1.45rem minmax(0,1fr) 2px;gap:.45rem}.sf-map-order>i{width:1.4rem;height:1.4rem}.sf-map-order em{display:none}.sf-map-page__list{gap:.35rem;padding:.4rem 0}.sf-map-page__orders>p{display:none}
 .sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{width:min(15rem,32cqw);padding:.32rem .38rem}.sf-stage.sf-touch-enabled #sf-hud .sf-objective__head{display:none}.sf-stage.sf-touch-enabled #sf-hud .sf-hud__minimap{width:4.5rem}.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__expand{display:none}.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__event{margin-top:.25rem;padding-top:.25rem}
}

body.sf-high-contrast #sf-hud .sf-hud__objective,body.sf-ui-high-contrast #sf-hud .sf-hud__objective,body[data-sf-contrast="high"] #sf-hud .sf-hud__objective,body.sf-high-contrast .sf-map-page__surface,body.sf-high-contrast .sf-map-page__orders{border-color:rgba(245,216,142,.62);background-color:#090607;backdrop-filter:none}

/* ======================================================================
   MOBILE FIELD RIG

   Touch keeps the complete action vocabulary, but only primary combat
   actions carry full labels and panel weight. Navigation, objective and
   map now share one top rail; survival bars sit beneath it. The menu button
   is deliberately mobile-only so desktop retains the Escape-first contract.
   ====================================================================== */

.sf-menu-trigger--mobile{display:none}

.sf-stage.sf-touch-enabled .sf-menu-trigger--mobile{
  top:max(.5rem,calc(env(safe-area-inset-top) + .35rem));
  left:max(.5rem,calc(env(safe-area-inset-left) + .35rem));
  z-index:58;
  display:grid;
  grid-template-rows:1fr auto;
  place-items:center;
  gap:.05rem;
  width:48px;
  min-width:48px;
  height:48px;
  min-height:48px;
  padding:.38rem;
  border:1px solid rgba(245,216,142,.32);
  border-radius:.85rem;
  background:rgba(7,5,6,.62);
  box-shadow:0 .45rem 1.25rem rgba(0,0,0,.26),inset 0 0 0 1px rgba(255,239,204,.035);
  backdrop-filter:blur(10px) saturate(.7)
}
.sf-stage.sf-touch-enabled .sf-menu-trigger--mobile svg{width:1.2rem;height:1.2rem}
.sf-stage.sf-touch-enabled .sf-menu-trigger--mobile span{
  display:block;
  color:rgba(255,237,201,.78);
  font-size:8px;
  line-height:1;
  letter-spacing:.1em
}
.sf-stage.sf-touch-enabled.sf-intro-active .sf-menu-trigger--mobile,
body.sf-command-open .sf-menu-trigger--mobile,
body.rb-escape-menu-open .sf-menu-trigger--mobile{
  opacity:0;
  visibility:hidden;
  pointer-events:none
}

/* The always-on touch HUD is one quiet instrument rail, not three cards. */
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{
  left:max(4rem,calc(env(safe-area-inset-left) + 3.85rem));
  top:max(.5rem,calc(env(safe-area-inset-top) + .35rem));
  width:calc(100% - max(8.75rem,calc(env(safe-area-inset-left) + env(safe-area-inset-right) + 8.35rem)));
  min-height:auto;
  box-sizing:border-box;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__head{display:none}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__item{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:.4rem
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__item>i{display:none}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__copy{flex:1 1 auto;min-width:0}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__copy small{
  font-size:9px;
  letter-spacing:.1em;
  color:rgba(216,164,65,.88);
  text-shadow:0 1px 3px rgba(0,0,0,.95)
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__copy strong{
  overflow:visible;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  text-overflow:clip;
  white-space:normal;
  color:#fff0bf;
  text-shadow:0 1px 4px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.85)
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__meta{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.08rem;
  min-width:2rem;
  flex-shrink:0
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__arrow{
  width:11px;
  height:11px
}
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__item>b,
.sf-stage.sf-touch-enabled #sf-hud .sf-objective__meta>b{
  font-size:11px;
  font-weight:700;
  color:#f5d88e;
  text-shadow:0 1px 4px rgba(0,0,0,.95)
}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__objbar{
  display:none
}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__event{
  /* The active mission objective already becomes the Bloom order and the
     center alert announces phase changes. A second event card is duplicate
     information on the smallest screen. */
  display:none
}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__event-head{
  display:flex;
  gap:.4rem
}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__event-head>i{display:none}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__event>i{
  display:none
}

.sf-stage.sf-touch-enabled #sf-hud .sf-hud__minimap{
  top:max(.5rem,calc(env(safe-area-inset-top) + .35rem));
  right:max(.5rem,calc(env(safe-area-inset-right) + .35rem));
  width:3.5rem;
  padding:0;
  border:1px solid rgba(216,164,65,.55);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none
}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__head{
  top:.2rem;
  right:.25rem
}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__head span{display:none}
.sf-stage.sf-touch-enabled #sf-hud .sf-minimap__head b{font-size:7px;color:#f2c46e;text-shadow:0 1px 3px rgba(0,0,0,.9)}

.sf-stage.sf-touch-enabled #sf-hud .sf-hud__vitals{
  left:max(.55rem,calc(env(safe-area-inset-left) + .4rem));
  top:max(4rem,calc(env(safe-area-inset-top) + 3.85rem));
  bottom:auto;
  right:auto;
  width:min(8.7rem,42cqw);
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none
}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__vitals::before{display:none}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__charge{
  right:max(.55rem,calc(env(safe-area-inset-right) + .4rem));
  top:max(4rem,calc(env(safe-area-inset-top) + 3.85rem));
  bottom:auto;
  left:auto;
  width:min(8.7rem,42cqw);
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none
}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__hplabel,.sf-hud__jetlabel) span{display:none}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__hplabel,.sf-hud__jetlabel) b{font-size:14px;font-weight:700}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__vitalrow{font-size:9px;margin-top:.24rem}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__hpwrap{height:6px;border:1px solid rgba(216,164,65,.35);border-radius:2px;background:rgba(7,5,6,.6)}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__jet{margin-top:0}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__jettrack{height:6px;border:1px solid rgba(216,164,65,.35);border-radius:2px;background:rgba(7,5,6,.6)}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__boost,.sf-hud__shield){display:none}

/* Secondary touch actions retain 44px hit boxes but shed the dashboard-card
   look. Primary combat actions keep short labels for recognition. */
.sf-stage.sf-touch-enabled .sf-touch__stick{
  left:max(.55rem,calc(env(safe-area-inset-left) + .4rem));
  bottom:max(.55rem,calc(env(safe-area-inset-bottom) + .4rem));
  width:5.9rem;
  opacity:.74
}
.sf-stage.sf-touch-enabled .sf-touch__stack{
  right:max(.55rem,calc(env(safe-area-inset-right) + .4rem));
  bottom:max(.55rem,calc(env(safe-area-inset-bottom) + .4rem));
  width:9rem;
  gap:.22rem
}
.sf-stage.sf-touch-enabled :is(.sf-touch__utility,.sf-touch__mobility,.sf-touch__actions){gap:.22rem}
.sf-stage.sf-touch-enabled :is(.sf-touch__utility,.sf-touch__mobility) .sf-touch__button{
  justify-self:center;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  padding:.14rem .05rem;
  border-color:rgba(245,216,142,.2);
  border-radius:50%;
  background:rgba(7,5,6,.38);
  box-shadow:0 .25rem .7rem rgba(0,0,0,.14);
  backdrop-filter:blur(7px) saturate(.62)
}
.sf-stage.sf-touch-enabled :is(.sf-touch__utility,.sf-touch__mobility) .sf-touch__button b{font-size:.82rem}
.sf-stage.sf-touch-enabled :is(.sf-touch__utility,.sf-touch__mobility) .sf-touch__button span{font-size:8px}
.sf-stage.sf-touch-enabled .sf-touch__utility .sf-touch__button:not(.sf-touch__button--command){opacity:.62}
.sf-stage.sf-touch-enabled .sf-touch__utility [data-touch-action="vent"][data-state="ready"]{opacity:.32}
.sf-stage.sf-touch-enabled .sf-touch__utility [data-touch-action="vent"][data-state="active"],
.sf-stage.sf-touch-enabled .sf-touch__button[data-state="low"],
.sf-stage.sf-touch-enabled .sf-touch__button.is-held,
.sf-stage.sf-touch-enabled .sf-touch__button.is-tapped{opacity:1}
.sf-stage.sf-touch-enabled .sf-touch__button--command{
  border-color:rgba(120,212,246,.42)!important;
  background:rgba(7,20,25,.48)!important
}
.sf-stage.sf-touch-enabled .sf-touch__actions .sf-touch__button{
  height:48px;
  min-height:48px;
  border-radius:.8rem;
  background:rgba(7,5,6,.48)
}
.sf-stage.sf-touch-enabled .sf-touch__actions .sf-touch__button span{font-size:9px}
.sf-stage.sf-touch-enabled .sf-touch__actions .sf-touch__button--fire{
  border-color:rgba(239,99,62,.52);
  background:rgba(72,18,20,.6)
}
.sf-stage.sf-touch-enabled .sf-touch__look span{display:none}

/* Command selection owns the player's attention. Keep the held command
   target alive for pointer capture, but remove the HUD and button noise
   beneath the modal wheel until the gesture resolves. */
body.sf-command-open .sf-stage.sf-touch-enabled #sf-hud :is(
  .sf-hud__banner,.sf-hud__breach-alert,.sf-hud__district
){opacity:0!important}
body.sf-command-open .sf-stage.sf-touch-enabled #sf-touch :is(
  [data-touch-stick],[data-touch-action]
){opacity:.08!important}
.sf-stage.sf-touch-enabled .sf-command-wheel__instruction{display:none}

/* Portrait phones trade the redundant compass for a clearer top rail. */
@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled .sf-menu{animation:none}
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__compass{display:none}
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__district{display:none}
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__breach-alert{top:22%}

  .sf-stage.sf-touch-enabled .sf-menu__masthead{
    grid-template-columns:minmax(0,1fr) auto;
    min-height:calc(3.65rem + env(safe-area-inset-top));
    padding:max(.42rem,calc(env(safe-area-inset-top) + .25rem))
      max(.55rem,calc(env(safe-area-inset-right) + .35rem)) .42rem
      max(.55rem,calc(env(safe-area-inset-left) + .35rem));
    gap:.55rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__crest{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__masthead>div:nth-child(2)>span,
  .sf-stage.sf-touch-enabled .sf-menu__masthead p{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__masthead h2{font-size:.98rem;letter-spacing:.08em}
  .sf-stage.sf-touch-enabled .sf-menu__close{width:44px;height:44px}
  .sf-stage.sf-touch-enabled .sf-menu__rail{
    grid-template-columns:repeat(6,minmax(0,1fr));
    padding:.3rem .35rem;
    gap:.2rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail .sf-menu__resume{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-panel]{
    display:grid;
    grid-template-rows:1.2rem auto;
    gap:.16rem;
    min-height:44px;
    padding:.25rem .08rem;
    place-items:center
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-panel] svg{
    display:block;
    width:1.05rem;
    height:1.05rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-panel] span{
    font-size:8px;
    line-height:1;
    letter-spacing:.015em
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail-spacer{display:none}
  .sf-stage.sf-touch-enabled .sf-menu:not([data-panel="operation"]) .sf-menu__rail button[data-menu-action]{display:none}
  .sf-stage.sf-touch-enabled .sf-menu[data-panel="operation"] .sf-menu__rail button[data-menu-action]{
    display:flex;
    grid-column:auto;
    min-height:44px;
    padding:.3rem .15rem;
    font-size:8px;
    text-align:center
  }
  .sf-stage.sf-touch-enabled .sf-menu[data-panel="operation"] .sf-menu__rail button[data-menu-action="maximize"]{grid-column:span 2}
  .sf-stage.sf-touch-enabled .sf-menu__page{padding:.65rem .6rem .8rem}
  .sf-stage.sf-touch-enabled .sf-menu__pagehead{
    margin-bottom:.5rem;
    padding-bottom:.45rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__pagehead>span{font-size:8px}
  .sf-stage.sf-touch-enabled .sf-menu__pagehead h3{font-size:1.08rem}
  .sf-stage.sf-touch-enabled .sf-menu__pagehead p{font-size:12px;line-height:1.25}
  .sf-stage.sf-touch-enabled .sf-operation-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:.38rem
  }
  .sf-stage.sf-touch-enabled .sf-operation-card{
    min-height:4.6rem;
    padding:.5rem
  }
  .sf-stage.sf-touch-enabled .sf-operation-card--objective,
  .sf-stage.sf-touch-enabled .sf-operation-card--breach{grid-column:1/-1;min-height:4.25rem}
  .sf-stage.sf-touch-enabled .sf-operation-card small{font-size:8px;letter-spacing:.08em}
  .sf-stage.sf-touch-enabled .sf-operation-card strong{margin-top:.3rem;font-size:11px}
  .sf-stage.sf-touch-enabled .sf-operation-card>span{margin-top:.3rem;font-size:9px}
}

/* Short landscape keeps the compass, but reserves the upper-left button rail
   and reduces the menu to one compact navigation column. */
@media (orientation:landscape) and (max-height:500px){
  .sf-stage.sf-touch-enabled .sf-menu{animation:none}
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{
    left:max(4rem,calc(env(safe-area-inset-left) + 3.85rem));
    width:min(13.25rem,27cqw)
  }
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__compass{
    top:max(.5rem,calc(env(safe-area-inset-top) + .35rem));
    width:min(8.5rem,18cqw)
  }
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__vitals{
    top:max(4rem,calc(env(safe-area-inset-top) + 3.85rem));
    width:min(8.7rem,18cqw)
  }
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__breach-alert{top:23%}

  .sf-stage.sf-touch-enabled .sf-menu__masthead{
    grid-template-columns:minmax(0,1fr) auto;
    min-height:3.35rem;
    padding:.3rem max(.55rem,calc(env(safe-area-inset-right) + .35rem)) .3rem
      max(.55rem,calc(env(safe-area-inset-left) + .35rem));
    gap:.5rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__crest{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__masthead>div:nth-child(2)>span,
  .sf-stage.sf-touch-enabled .sf-menu__masthead p{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__masthead h2{font-size:.95rem}
  .sf-stage.sf-touch-enabled .sf-menu__close{width:44px;height:44px}
  .sf-stage.sf-touch-enabled .sf-menu__body{
    grid-template-columns:calc(8.5rem + env(safe-area-inset-left)) minmax(0,1fr)
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-rows:44px;
    align-content:start;
    padding:.3rem .3rem .3rem max(.3rem,calc(env(safe-area-inset-left) + .2rem));
    gap:.18rem
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail .sf-menu__resume{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__rail button{
    min-height:44px;
    padding:.2rem .1rem;
    font-size:8px;
    line-height:1.05
  }
  .sf-stage.sf-touch-enabled .sf-menu__rail button svg{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-action]{font-size:8px}
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-action="maximize"]{grid-column:1/-1}
  .sf-stage.sf-touch-enabled .sf-menu__page{padding:.5rem .65rem}
  .sf-stage.sf-touch-enabled .sf-menu__content{padding-right:env(safe-area-inset-right)}
  .sf-stage.sf-touch-enabled .sf-menu__pagehead{margin-bottom:.38rem;padding-bottom:.32rem}
  .sf-stage.sf-touch-enabled .sf-operation-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.3rem}
  .sf-stage.sf-touch-enabled .sf-operation-card{min-height:3.65rem;padding:.38rem}
  .sf-stage.sf-touch-enabled .sf-operation-card--objective,
  .sf-stage.sf-touch-enabled .sf-operation-card--breach{grid-column:span 3;min-height:3.45rem}
  .sf-stage.sf-touch-enabled .sf-operation-card small{font-size:8px}
  .sf-stage.sf-touch-enabled .sf-operation-card strong{margin-top:.2rem;font-size:9px}
  .sf-stage.sf-touch-enabled .sf-operation-card>span{margin-top:.2rem;font-size:8px}
}

/* ======================================================================
   FIELD DOCTRINE

   Progression stays inside the paused field menu. Five authored Orders
   share one inspection pane, keeping the tree legible without becoming a
   dashboard or adding another persistent HUD cluster.
   ====================================================================== */

.sf-menu__page--doctrine{
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  height:100%;
  min-height:0;
  overflow:hidden
}
.sf-menu__page--doctrine[hidden]{display:none}
.sf-menu__page--doctrine .sf-menu__pagehead{grid-row:1;margin-bottom:.35rem;padding-bottom:.32rem}
.sf-menu__page--doctrine .sf-menu__pagehead p{display:none}
.sf-doctrine__summary{
  grid-row:2;
  display:grid;
  grid-template-columns:5rem minmax(10rem,1fr) 6.5rem minmax(12rem,auto) auto;
  align-items:stretch;
  gap:.5rem;
  margin-bottom:.6rem
}
.sf-doctrine__summary>div,
.sf-doctrine__summary>.sf-doctrine__footer{
  min-width:0;
  min-height:3.65rem;
  padding:.55rem .65rem;
  border-block:1px solid rgba(216,164,65,.14);
  background:linear-gradient(100deg,rgba(216,164,65,.045),transparent 76%)
}
.sf-doctrine__summary small{color:rgba(216,164,65,.64);font-size:8px;letter-spacing:.13em}
.sf-doctrine__rank,.sf-doctrine__points{display:grid;align-content:center;gap:.08rem}
.sf-doctrine__rank strong,.sf-doctrine__points strong{
  color:var(--sfu-bone);
  font:600 1.15rem/1 "Cinzel",Georgia,serif;
  font-variant-numeric:tabular-nums
}
.sf-doctrine__rank strong{color:var(--sfu-gold);font-size:1.5rem}
.sf-doctrine__points>span{color:rgba(242,229,199,.4);font-size:8px;letter-spacing:.08em}
.sf-doctrine__xp{display:grid;align-content:center;gap:.45rem}
.sf-doctrine__xp>span{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.sf-doctrine__xp b{color:rgba(242,229,199,.68);font-size:9px;font-weight:500;font-variant-numeric:tabular-nums}
.sf-doctrine__xp>i{display:block;height:4px;background:rgba(242,229,199,.1);overflow:hidden}
.sf-doctrine__xp>i em{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,#8a2230,var(--sfu-brass),var(--sfu-gold));
  box-shadow:0 0 .55rem rgba(245,216,142,.3);
  transition:width .22s ease-out
}
.sf-doctrine__vow-slots{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem;padding:.35rem!important}
.sf-doctrine__vow-slots>span{display:grid;align-content:center;min-width:0;padding:.32rem .45rem;border-left:2px solid rgba(216,164,65,.25);background:rgba(0,0,0,.18)}
.sf-doctrine__vow-slots>span[data-state="bound"]{border-left-color:var(--sfu-gold);background:rgba(216,164,65,.07)}
.sf-doctrine__vow-slots>span[data-state="locked"]{opacity:.52}
.sf-doctrine__vow-slots strong{overflow:hidden;color:rgba(242,229,199,.78);font:600 9px/1.25 "Cinzel",Georgia,serif;text-overflow:ellipsis;white-space:nowrap}
.sf-doctrine__lock{grid-row:3;margin:0 0 .55rem;padding:.5rem .65rem;border-left:2px solid var(--sfu-threat);background:rgba(239,99,62,.07);color:#ffb092;font-size:10px;line-height:1.35}
.sf-doctrine__lock[hidden]{display:none}

.sf-doctrine__body{grid-row:4;display:grid;grid-template-columns:9.5rem minmax(0,1fr);gap:.7rem;min-height:0}
.sf-doctrine__orders{display:flex;min-height:0;padding:.35rem;border:1px solid rgba(216,164,65,.13);background:rgba(4,3,4,.28);flex-direction:column;gap:.3rem;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.sf-doctrine__orders button{
  --sf-order-accent:var(--sfu-brass);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:.3rem;
  min-height:44px;
  padding:.45rem .55rem;
  border:1px solid transparent;
  border-left:2px solid rgba(216,164,65,.2);
  border-radius:0;
  background:transparent;
  color:rgba(242,229,199,.56);
  text-align:left;
  cursor:pointer
}
.sf-doctrine__orders button[data-accent="cyan"]{--sf-order-accent:var(--sfu-cyan)}
.sf-doctrine__orders button[data-accent="blue"]{--sf-order-accent:#8ba9f2}
.sf-doctrine__orders button[data-accent="green"]{--sf-order-accent:var(--sfu-verd)}
.sf-doctrine__orders button[data-accent="amber"]{--sf-order-accent:#f4b65b}
.sf-doctrine__orders button:hover,.sf-doctrine__orders button[aria-selected="true"]{
  border-color:rgba(216,164,65,.22);
  border-left-color:var(--sf-order-accent);
  background:linear-gradient(90deg,rgba(138,34,48,.26),rgba(216,164,65,.035));
  color:var(--sfu-bone)
}
.sf-doctrine__orders button[aria-selected="true"]{box-shadow:inset 3px 0 0 var(--sf-order-accent)}
.sf-doctrine__orders button span{min-width:0;font:600 10px/1.2 "Cinzel",Georgia,serif;letter-spacing:.04em}
.sf-doctrine__orders button small{color:rgba(242,229,199,.38);font-size:8px;white-space:nowrap}

.sf-doctrine__order{
  --sf-order-accent:var(--sfu-brass);
  min-width:0;
  min-height:0;
  padding:0 .25rem 0 0;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-color:rgba(216,164,65,.48) rgba(0,0,0,.2);
  scrollbar-gutter:stable
}
.sf-doctrine__order::-webkit-scrollbar{width:9px}
.sf-doctrine__order::-webkit-scrollbar-track{background:rgba(0,0,0,.2)}
.sf-doctrine__order::-webkit-scrollbar-thumb{border:2px solid rgba(0,0,0,.2);background:rgba(216,164,65,.46)}
.sf-doctrine__order[data-accent="cyan"]{--sf-order-accent:var(--sfu-cyan)}
.sf-doctrine__order[data-accent="blue"]{--sf-order-accent:#8ba9f2}
.sf-doctrine__order[data-accent="green"]{--sf-order-accent:var(--sfu-verd)}
.sf-doctrine__order[data-accent="amber"]{--sf-order-accent:#f4b65b}
.sf-doctrine__order-head{display:flex;align-items:start;justify-content:space-between;gap:1rem;margin-bottom:.6rem;padding:.15rem .15rem .6rem;border-bottom:1px solid rgba(216,164,65,.15)}
.sf-doctrine__order-head>span{display:grid;gap:.15rem;min-width:0}.sf-doctrine__order-head small{color:var(--sf-order-accent);font-size:8px;letter-spacing:.16em}.sf-doctrine__order-head h4{margin:0;color:var(--sfu-bone);font:600 1.05rem/1.1 "Cinzel",Georgia,serif;letter-spacing:.06em}.sf-doctrine__order-head p{margin:0;color:rgba(242,229,199,.48);font:500 12px/1.3 "Cormorant Garamond",Georgia,serif}.sf-doctrine__order-head>b{flex:none;padding:.35rem .45rem;border:1px solid rgba(216,164,65,.25);color:var(--sf-order-accent);font-size:10px;font-weight:500;font-variant-numeric:tabular-nums}
.sf-doctrine__rites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
.sf-doctrine-talent[data-tier="2"],
.sf-doctrine-talent[data-tier="3"]{grid-column:1/-1}
.sf-doctrine-talent{position:relative;display:grid;grid-template-rows:auto auto auto auto;align-content:start;min-width:0;padding:.65rem;border:1px solid rgba(216,164,65,.13);border-left:2px solid rgba(216,164,65,.24);background:linear-gradient(135deg,rgba(216,164,65,.04),transparent 44%),rgba(12,8,9,.48)}
.sf-doctrine-talent[data-state="available"]{border-left-color:var(--sf-order-accent)}
.sf-doctrine-talent[data-state="owned"],.sf-doctrine-talent[data-state="maxed"]{border-color:rgba(118,205,167,.23);border-left-color:var(--sfu-verd);background:linear-gradient(135deg,rgba(118,205,167,.055),transparent 46%),rgba(12,8,9,.52)}
.sf-doctrine-talent[data-state="locked"]{opacity:.72}
.sf-doctrine-talent[data-state="forthcoming"]{border-left-style:dashed;filter:saturate(.45);opacity:.72}
.sf-doctrine-talent>header{display:flex;align-items:start;justify-content:space-between;gap:.6rem}.sf-doctrine-talent>header>span{display:grid;gap:.12rem;min-width:0}.sf-doctrine-talent>header small{color:var(--sf-order-accent);font-size:8px;letter-spacing:.14em}.sf-doctrine-talent>header strong{color:rgba(248,239,218,.94);font:600 11px/1.25 "Cinzel",Georgia,serif;letter-spacing:.035em}.sf-doctrine-talent>header>b{display:flex;gap:.2rem;flex:none}.sf-doctrine-talent>header>b i{display:block;width:.48rem;height:.48rem;border:1px solid rgba(216,164,65,.34);transform:rotate(45deg)}.sf-doctrine-talent>header>b i[data-state="owned"]{border-color:var(--sfu-verd);background:var(--sfu-verd);box-shadow:0 0 .35rem rgba(118,205,167,.35)}
.sf-doctrine-talent>p{min-height:2.4em;margin:.4rem 0 .55rem;color:rgba(242,229,199,.58);font-size:10px;line-height:1.35}
.sf-doctrine-talent__actions{display:flex;gap:.3rem;align-items:stretch}.sf-doctrine-talent__actions button,.sf-doctrine__vow-action button,.sf-doctrine__footer button{min-height:44px;padding:.45rem .55rem;border:1px solid rgba(216,164,65,.28);border-radius:0;background:rgba(216,164,65,.055);color:var(--sfu-gold);font-size:9px;letter-spacing:.055em;cursor:pointer}.sf-doctrine-talent__actions button{flex:1;min-width:0}.sf-doctrine-talent__actions button[data-talent-action="spend"]{border-color:rgba(118,205,167,.38);color:var(--sfu-verd)}.sf-doctrine-talent__actions button[data-talent-action="refund"]{color:rgba(242,229,199,.56)}.sf-doctrine-talent__actions button:hover:not(:disabled),.sf-doctrine__vow-action button:hover:not(:disabled),.sf-doctrine__footer button:hover:not(:disabled){border-color:var(--sfu-gold);background:rgba(138,34,48,.28)}.sf-doctrine-talent__actions button:disabled,.sf-doctrine__vow-action button:disabled,.sf-doctrine__footer button:disabled{filter:saturate(.4);opacity:.38;cursor:not-allowed}
.sf-doctrine-talent__reason{display:block;margin-top:.4rem;color:rgba(242,229,199,.4);font-size:8px;line-height:1.3}
.sf-doctrine-talent__detail{grid-column:1/-1;margin-top:.55rem;padding-top:.5rem;border-top:1px solid rgba(216,164,65,.12)}.sf-doctrine-talent__detail[hidden]{display:none}.sf-doctrine-talent__detail ol{display:grid;gap:.4rem;margin:0;padding:0;list-style:none}.sf-doctrine-talent__detail li{display:grid;grid-template-columns:3.7rem minmax(0,1fr);gap:.5rem;color:rgba(242,229,199,.44);font-size:9px;line-height:1.35}.sf-doctrine-talent__detail li b{color:rgba(216,164,65,.58);font-size:8px;letter-spacing:.08em}.sf-doctrine-talent__detail li[data-state="owned"]{color:rgba(242,229,199,.76)}.sf-doctrine-talent__detail li[data-state="owned"] b{color:var(--sfu-verd)}.sf-doctrine-talent__detail li[data-state="next"]{color:rgba(242,229,199,.66)}.sf-doctrine-talent__detail p{margin:0;color:rgba(242,229,199,.62);font-size:9px;line-height:1.4}

.sf-doctrine__vow{margin-top:.6rem;padding:.7rem;border:1px solid rgba(216,164,65,.2);border-left:3px solid rgba(216,164,65,.36);background:radial-gradient(circle at 85% 15%,rgba(216,164,65,.08),transparent 34%),rgba(9,6,7,.67)}
.sf-doctrine__vow[data-state="eligible"]{border-left-color:var(--sfu-gold)}.sf-doctrine__vow[data-state="equipped"]{border-color:rgba(118,205,167,.34);border-left-color:var(--sfu-verd);box-shadow:inset 0 0 1.4rem rgba(118,205,167,.035)}.sf-doctrine__vow[data-state="forthcoming"]{border-left-style:dashed;filter:saturate(.5)}
.sf-doctrine__vow>header{display:flex;align-items:start;justify-content:space-between;gap:.75rem}.sf-doctrine__vow>header>span{display:grid;gap:.12rem}.sf-doctrine__vow>header small{color:var(--sf-order-accent);font-size:8px;letter-spacing:.16em}.sf-doctrine__vow>header strong{color:var(--sfu-bone);font:600 14px/1.2 "Cinzel",Georgia,serif;letter-spacing:.06em}.sf-doctrine__vow>header>b{color:var(--sfu-gold);font-size:9px;letter-spacing:.08em;white-space:nowrap}.sf-doctrine__vow>p{margin:.35rem 0;color:rgba(242,229,199,.68);font:600 12px/1.3 "Cormorant Garamond",Georgia,serif}.sf-doctrine__vow-detail{color:rgba(242,229,199,.48);font-size:9px;line-height:1.42}
.sf-doctrine__vow-action{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.7rem;margin-top:.6rem;padding-top:.55rem;border-top:1px solid rgba(216,164,65,.12)}.sf-doctrine__vow-action>small{color:rgba(242,229,199,.42);font-size:8px;line-height:1.3}.sf-doctrine__vow-action button{min-width:8rem}
.sf-doctrine__fusions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;margin:.55rem 0 0;padding:0;list-style:none}.sf-doctrine__fusions li{display:grid;gap:.18rem;padding:.4rem;border-left:1px solid rgba(216,164,65,.2);background:rgba(0,0,0,.18)}.sf-doctrine__fusions b{color:rgba(245,216,142,.76);font-size:8px;letter-spacing:.07em}.sf-doctrine__fusions span{color:rgba(242,229,199,.4);font-size:8px;line-height:1.3}
.sf-doctrine__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:.55rem;min-width:0;margin:0;padding:.35rem .45rem;border:0}.sf-doctrine__footer button{flex:none;min-width:8.5rem;color:rgba(239,99,62,.82);border-color:rgba(239,99,62,.28)}
.sf-doctrine__respec-warn{
  position:absolute;top:calc(100% + .35rem);right:0;z-index:8;
  width:max-content;max-width:min(22rem,72vw);margin:0;padding:.5rem .6rem;
  border:1px solid rgba(239,99,62,.42);border-left:3px solid var(--sfu-threat,#ef633e);
  background:rgba(6,8,10,.96);box-shadow:0 .45rem 1.2rem rgba(0,0,0,.46);
  color:#ffb092;font-size:10px;line-height:1.4;text-align:left;
  white-space:normal;overflow:visible;text-overflow:unset;pointer-events:none
}
.sf-doctrine__respec-warn[hidden]{display:none!important}

.sf-ability-link{display:inline;color:var(--sfu-gold,#f5d88e);text-decoration:underline dashed rgba(216,164,65,.65) 1px;text-underline-offset:3px;cursor:help;transition:color .12s ease,text-decoration-color .12s ease}
.sf-ability-link:hover,.sf-ability-link:focus-visible,.sf-ability-link.is-pinned{color:#fff6dc;text-decoration-color:var(--sfu-verd,#76cda7);text-decoration-style:solid;outline:none}
.sf-ability-popover{position:fixed;z-index:1200;width:max-content;max-width:min(290px,86vw);padding:.65rem .8rem;box-sizing:border-box;border:1px solid rgba(216,164,65,.42);border-left:3px solid var(--sfu-gold,#f5d88e);border-radius:0;background:linear-gradient(135deg,rgba(16,12,14,.98),rgba(8,6,8,.99));box-shadow:0 10px 28px rgba(0,0,0,.85),0 0 10px rgba(216,164,65,.15);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .15s ease,transform .15s ease}
.sf-ability-popover.is-visible{opacity:1;transform:translateY(0);pointer-events:auto}
.sf-ability-popover[hidden]{display:none!important}
.sf-ability-popover__meta{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.25rem}
.sf-ability-popover__saint{color:var(--sfu-verd,#76cda7);font-size:8px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.sf-ability-popover__kbd{display:inline-block;padding:.12rem .35rem;border:1px solid rgba(216,164,65,.45);border-radius:0;background:rgba(216,164,65,.12);color:var(--sfu-gold,#f5d88e);font:700 8.5px/1 "Share Tech Mono",monospace;letter-spacing:.05em}
.sf-ability-popover__title{margin:.15rem 0 .3rem;color:var(--sfu-bone,#f8eed6);font:600 11.5px/1.25 "Cinzel",Georgia,serif;letter-spacing:.05em}
.sf-ability-popover__desc{margin:0;color:rgba(242,229,199,.78);font-size:10px;line-height:1.4}

body.sf-high-contrast .sf-doctrine__summary>div,body.sf-high-contrast .sf-doctrine__orders,body.sf-high-contrast .sf-doctrine-talent,body.sf-high-contrast .sf-doctrine__vow{border-color:rgba(245,216,142,.62);background-color:#090607}
body.sf-high-contrast .sf-doctrine-talent>p,body.sf-high-contrast .sf-doctrine-talent__reason,body.sf-high-contrast .sf-doctrine-talent__detail li,body.sf-high-contrast .sf-doctrine__vow-detail,body.sf-high-contrast .sf-doctrine__vow-action>small,body.sf-high-contrast .sf-doctrine__respec-warn{color:#f8edda}
body.sf-high-contrast .sf-ability-link{color:#fff6dc;text-decoration-color:#fff6dc}
body.sf-high-contrast .sf-ability-popover{border-color:#f5d88e;border-left-color:#fff6dc;background:#090607}
body.sf-high-contrast .sf-ability-popover__desc{color:#f8edda}
body.sf-reduced-motion .sf-doctrine__xp>i em,body.sf-reduced-motion .sf-doctrine-talent,body.sf-reduced-motion .sf-doctrine__vow,body.sf-reduced-motion .sf-ability-popover{transition:none!important;animation:none!important;transform:none!important}

@media (min-width:881px){
  .sf-doctrine__summary small,.sf-doctrine__orders button small,.sf-doctrine__order-head small,.sf-doctrine-talent>header small,.sf-doctrine__vow>header small{font-size:9px}
  .sf-doctrine__xp b,.sf-doctrine__points>span{font-size:9px}
  .sf-doctrine__orders button span{font-size:11px}
  .sf-doctrine-talent>header strong{font-size:12px}
  .sf-doctrine-talent>p{color:rgba(242,229,199,.68);font-size:11px;line-height:1.42}
  .sf-doctrine-talent__actions button,.sf-doctrine__vow-action button,.sf-doctrine__footer button{font-size:10px}
  .sf-doctrine-talent__reason{color:rgba(242,229,199,.52);font-size:9px}
  .sf-doctrine-talent__detail li,.sf-doctrine-talent__detail p,.sf-doctrine__vow-detail{font-size:10px}
  .sf-doctrine__vow-action>small{color:rgba(242,229,199,.53);font-size:9px}
}

@media (max-width:880px){
  .sf-doctrine__summary{grid-template-columns:4.5rem minmax(8rem,1fr) 5.7rem minmax(0,1fr)}.sf-doctrine__vow-slots,.sf-doctrine__footer{grid-column:1/-1}.sf-doctrine__body{grid-template-columns:7.75rem minmax(0,1fr)}.sf-doctrine__rites{grid-template-columns:1fr}.sf-doctrine__fusions{grid-template-columns:1fr}
}

@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled .sf-menu__rail{grid-template-columns:repeat(6,minmax(0,1fr))}
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-panel] span{font-size:0}
  .sf-stage.sf-touch-enabled .sf-menu__rail button[data-menu-panel] span::after{content:attr(data-mobile-label);font-size:8px;line-height:1;letter-spacing:.015em}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine{display:block;height:auto;overflow:visible}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine[hidden]{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead{margin-bottom:.35rem;padding-bottom:.4rem}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead h3{font-size:1.55rem}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead p{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary{
    grid-template-columns:3.5rem minmax(0,1fr) 4.55rem;
    grid-template-areas:"rank xp points" "vows vows vows" "chrome chrome chrome";
    gap:.25rem;
    margin-bottom:.35rem
  }
  .sf-stage.sf-touch-enabled .sf-doctrine__summary>div{min-height:2.8rem;padding:.35rem .42rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__rank{grid-area:rank}
  .sf-stage.sf-touch-enabled .sf-doctrine__xp{grid-area:xp}
  .sf-stage.sf-touch-enabled .sf-doctrine__points{grid-area:points}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-slots{grid-area:vows;min-height:2.7rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer{grid-area:chrome}
  .sf-stage.sf-touch-enabled .sf-doctrine__rank strong{font-size:1.25rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__xp>span{display:grid;gap:.1rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__xp b{font-size:8px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-slots>span{padding:.22rem .38rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__body{display:block}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding:.25rem;gap:.2rem;overflow:visible;scrollbar-gutter:auto}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;place-items:center;min-height:44px;padding:.25rem .08rem;border-left-width:1px;text-align:center}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button span{font-size:8px;letter-spacing:0}.sf-stage.sf-touch-enabled .sf-doctrine__orders button small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order{margin-top:.4rem;padding:0;overflow:visible}
  .sf-stage.sf-touch-enabled .sf-doctrine__rites{grid-template-columns:1fr;gap:.4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent{padding:.55rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>p{min-height:0}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent__actions button{min-height:44px;padding:.35rem .3rem;font-size:8px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action{grid-template-columns:1fr}.sf-stage.sf-touch-enabled .sf-doctrine__vow-action button{width:100%}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer{display:flex;flex-wrap:wrap;justify-content:flex-end}.sf-stage.sf-touch-enabled .sf-doctrine__footer button{min-width:8rem;min-height:44px}
}

@media (orientation:landscape) and (max-height:500px){
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine{grid-template-rows:auto auto auto minmax(0,1fr);height:100%;padding:.45rem .55rem;overflow:hidden}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary{grid-template-columns:3.8rem minmax(7rem,1fr) 4.7rem minmax(9rem,auto) auto;gap:.25rem;margin-bottom:.3rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary>div{min-height:2.65rem;padding:.3rem .4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__rank strong{font-size:1.15rem}.sf-stage.sf-touch-enabled .sf-doctrine__summary small{font-size:7px}.sf-stage.sf-touch-enabled .sf-doctrine__vow-slots{grid-column:auto}
  .sf-stage.sf-touch-enabled .sf-doctrine__body{grid-template-columns:6.2rem minmax(0,1fr);gap:.4rem}
  .sf-stage.sf-touch-enabled .sf-menu:not([data-panel="operation"]) .sf-menu__rail button[data-menu-action]{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders{padding:.2rem;gap:.12rem}.sf-stage.sf-touch-enabled .sf-doctrine__orders button{min-height:44px;padding:.25rem .35rem}.sf-stage.sf-touch-enabled .sf-doctrine__orders button span{font-size:8px}.sf-stage.sf-touch-enabled .sf-doctrine__orders button small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order{padding-right:.15rem}.sf-stage.sf-touch-enabled .sf-doctrine__order-head{margin-bottom:.35rem;padding-bottom:.35rem}.sf-stage.sf-touch-enabled .sf-doctrine__order-head h4{font-size:.9rem}.sf-stage.sf-touch-enabled .sf-doctrine__order-head p{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__rites{grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent{padding:.45rem}.sf-stage.sf-touch-enabled .sf-doctrine-talent>p{min-height:0;margin:.25rem 0 .35rem;font-size:8px}.sf-stage.sf-touch-enabled .sf-doctrine-talent__actions button{min-height:44px;padding:.25rem;font-size:7px}.sf-stage.sf-touch-enabled .sf-doctrine-talent__reason{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow{margin-top:.35rem;padding:.5rem}.sf-stage.sf-touch-enabled .sf-doctrine__vow-detail,.sf-stage.sf-touch-enabled .sf-doctrine__fusions{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action{margin-top:.35rem;padding-top:.35rem}.sf-stage.sf-touch-enabled .sf-doctrine__footer{margin:0;padding:.2rem .3rem}.sf-stage.sf-touch-enabled .sf-doctrine__footer button{min-height:44px}
}

/* ======================================================================
   FIELD MENU REFRESH · SCAN FIRST

   The menu is a paused tactical instrument, not a stack of dashboards.
   Desktop uses more of the playfield, navigation yields to the active page,
   and Doctrine presents every rite before inviting the player into detail.
   ====================================================================== */

.sf-stage:not(.sf-touch-enabled) .sf-menu__frame{
  position:absolute;
  inset:0;
  left:0;
  top:0;
  width:100%;
  height:100%;
  border:none;
  border-radius:0;
  transform:none;
  background:
    radial-gradient(circle at 78% 6%,rgba(216,164,65,.055),transparent 34%),
    linear-gradient(135deg,rgba(138,34,48,.055),transparent 28%),
    rgba(8,6,7,.985);
  box-shadow:inset .3rem 0 0 rgba(138,34,48,.68)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__masthead{
  min-height:5.2rem;
  padding:.75rem 1.35rem .75rem 1.6rem;
  gap:1.15rem;
  background:linear-gradient(90deg,rgba(138,34,48,.18),transparent 31%)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__crest{width:3.25rem;height:3.25rem}
.sf-stage:not(.sf-touch-enabled) .sf-menu__crest svg{width:2rem;height:2rem}
.sf-stage:not(.sf-touch-enabled) .sf-menu__masthead h2{font-size:clamp(1.25rem,2.1vw,1.75rem);letter-spacing:.11em}
.sf-stage:not(.sf-touch-enabled) .sf-menu__masthead span{font-size:10px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__masthead p{font-size:12px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__close{
  width:3rem;height:3rem;border-radius:.45rem;background:rgba(0,0,0,.2)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__body{grid-template-columns:16.5rem minmax(0,1fr)}
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail{
  padding:.85rem .75rem;gap:.35rem;background:linear-gradient(180deg,rgba(138,34,48,.075),transparent 35%),rgba(4,3,4,.36)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail button{
  min-height:3.1rem;padding:.58rem .72rem;border-radius:.48rem;font-size:11px;letter-spacing:.08em
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail button:hover,
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail button.is-active,
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail button[aria-current="page"]{
  border-color:rgba(216,164,65,.18);
  background:linear-gradient(90deg,rgba(138,34,48,.28),rgba(216,164,65,.025));
  box-shadow:inset 2px 0 0 var(--sfu-brass)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail .sf-menu__resume{min-height:3.8rem;margin-bottom:.35rem}
.sf-stage:not(.sf-touch-enabled) .sf-menu__resume strong{font-size:13px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__resume small{font-size:10px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__rail button[data-menu-action]{min-height:2.65rem;font-size:10px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__content{
  background:radial-gradient(circle at 55% 12%,rgba(216,164,65,.025),transparent 46%)
}
.sf-stage:not(.sf-touch-enabled) .sf-menu__page{padding:clamp(1.15rem,2.2vw,2.2rem)}
.sf-stage:not(.sf-touch-enabled) .sf-menu__pagehead{margin-bottom:1rem;padding-bottom:.75rem}
.sf-stage:not(.sf-touch-enabled) .sf-menu__pagehead h3{font-size:clamp(1.35rem,2.3vw,2rem)}
.sf-stage:not(.sf-touch-enabled) .sf-menu__pagehead p{font-size:14px}
.sf-stage:not(.sf-touch-enabled) .sf-menu__footer{min-height:2.5rem;padding:.55rem 1rem;font-size:10px}

.sf-menu[data-panel="doctrine"] .sf-menu__content{overflow:hidden}
.sf-menu__page--doctrine{
  position:relative;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  height:100%;
  min-height:0;
  overflow:hidden
}
.sf-menu__page--doctrine[hidden]{display:none}
.sf-menu__page--doctrine .sf-menu__pagehead{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:"kicker copy" "title copy";
  align-items:end;
  column-gap:1.5rem;
  row-gap:.18rem;
  margin-bottom:.7rem;
  padding-bottom:.6rem
}
.sf-menu__page--doctrine .sf-menu__pagehead>span{grid-area:kicker;font-size:10px;letter-spacing:.2em}
.sf-menu__page--doctrine .sf-menu__pagehead h3{grid-area:title;font-size:1.65rem}
.sf-menu__page--doctrine .sf-menu__pagehead p{
  grid-area:copy;align-self:end;justify-self:end;max-width:44rem;margin:0;font-size:13px;line-height:1.4;text-align:right
}

.sf-doctrine__summary{
  grid-row:2;
  display:grid;
  grid-template-columns:5.5rem minmax(11rem,1fr) 7.5rem minmax(14rem,.9fr) auto;
  align-items:stretch;
  gap:0;
  margin:0 0 .7rem;
  border-block:1px solid rgba(216,164,65,.14);
  border-radius:.5rem;
  background:linear-gradient(100deg,rgba(216,164,65,.045),transparent 82%)
}
.sf-doctrine__summary>div,
.sf-doctrine__summary>.sf-doctrine__footer{
  min-width:0;min-height:3.6rem;padding:.55rem .75rem;border:0;border-right:1px solid rgba(216,164,65,.1);background:none
}
.sf-doctrine__summary>div:last-child,
.sf-doctrine__summary>.sf-doctrine__footer{border-right:0}
.sf-doctrine__summary small{font-size:9px;letter-spacing:.12em}
.sf-doctrine__rank strong{font-size:1.55rem}
.sf-doctrine__points strong{font-size:1.25rem}
.sf-doctrine__xp{gap:.4rem}
.sf-doctrine__xp b{font-size:10px}
.sf-doctrine__vow-slots{gap:.35rem;padding:.35rem!important}
.sf-doctrine__vow-slots>span{padding:.32rem .48rem;border-radius:.3rem}
.sf-doctrine__vow-slots strong{font-size:10px}
.sf-doctrine__lock{grid-row:3;margin:0 0 .55rem;padding:.5rem .75rem;border-radius:.35rem;font-size:11px}

.sf-doctrine__body{
  grid-row:4;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:50px minmax(0,1fr);
  gap:.7rem;
  min-width:0;
  min-height:0
}
.sf-doctrine__orders{
  display:grid;
  /* Column-count agnostic: Vesper fields five Orders, a Kenosis
     operative fields four. `repeat(5, ...)` laid a four-Order rail
     out with a dead fifth column at every breakpoint. */
  grid-auto-flow:column;
  grid-auto-columns:minmax(0,1fr);
  min-width:0;
  min-height:50px;
  padding:0;
  gap:.42rem;
  overflow:visible;
  border:0;
  background:transparent;
  scrollbar-gutter:auto
}
.sf-doctrine__order[data-view="overview"]{grid-template-rows:auto minmax(0,1fr) auto;align-content:start}
.sf-doctrine__orders button{
  display:grid;
  grid-template-columns:1.6rem minmax(0,1fr) auto;
  grid-template-areas:"sigil label points";
  align-items:center;
  column-gap:.5rem;
  min-width:0;
  min-height:50px;
  padding:.5rem .75rem;
  border:1px solid rgba(216,164,65,.14);
  border-left:2px solid rgba(216,164,65,.22);
  border-radius:.45rem;
  background:rgba(5,4,5,.32)
}
.sf-doctrine__sigil{
  display:block;
  aspect-ratio:1;
  object-fit:contain;
  mix-blend-mode:screen;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none
}
.sf-doctrine__sigil[hidden]{display:none}
.sf-doctrine__sigil--tab{
  grid-area:sigil;
  width:1.5rem;
  height:1.5rem;
  justify-self:center;
  opacity:.78;
  filter:saturate(.85) contrast(1.06)
}
.sf-doctrine__orders button:hover,.sf-doctrine__orders button[aria-selected="true"]{
  border-color:color-mix(in srgb,var(--sf-order-accent) 55%,transparent);
  border-left-color:var(--sf-order-accent);
  background:linear-gradient(120deg,rgba(138,34,48,.22),rgba(216,164,65,.035));
  box-shadow:inset 0 -2px 0 var(--sf-order-accent)
}
.sf-doctrine__orders button:hover .sf-doctrine__sigil--tab,
.sf-doctrine__orders button[aria-selected="true"] .sf-doctrine__sigil--tab{
  opacity:1;
  filter:saturate(1.08) contrast(1.08) drop-shadow(0 0 .32rem var(--sf-order-accent))
}
.sf-doctrine__orders button span{grid-area:label;overflow:hidden;font-size:12px;font-weight:600;letter-spacing:.04em;text-overflow:ellipsis;white-space:nowrap}
.sf-doctrine__orders button small{grid-area:points;font-size:10px;color:rgba(242,229,199,.5)}

.sf-doctrine__order{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:.6rem;
  min-width:0;
  min-height:0;
  padding:0;
  overflow:hidden;
  scrollbar-gutter:auto
}
.sf-doctrine__order-head{
  display:grid;
  grid-template-columns:2.5rem minmax(0,1fr) auto;
  align-items:center;
  justify-content:stretch;
  gap:.75rem;
  min-height:2.8rem;margin:0;padding:.15rem .25rem .55rem;
  border-bottom:1px solid rgba(216,164,65,.14)
}
.sf-doctrine__sigil--hero{
  grid-column:1;
  grid-row:1;
  width:2.35rem;
  height:2.35rem;
  opacity:.94;
  filter:saturate(1.02) contrast(1.08) drop-shadow(0 0 .42rem color-mix(in srgb,var(--sf-order-accent) 52%,transparent))
}
.sf-doctrine__order-head>span{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:"kicker kicker" "title focus";
  align-items:baseline;
  column-gap:1rem;
  min-width:0;
}
.sf-doctrine__order-head small{grid-area:kicker;font-size:9px;letter-spacing:.15em}
.sf-doctrine__order-head h4{grid-area:title;font-size:1.2rem;white-space:nowrap}
.sf-doctrine__order-head p{grid-area:focus;overflow:hidden;font-size:13px;color:rgba(242,229,199,.65);text-overflow:ellipsis;white-space:nowrap}
.sf-doctrine__order-head>b{
  grid-column:3;
  grid-row:1;
  justify-self:end;
  padding:.35rem .55rem;
  border-radius:.35rem;
  font-size:11px;
  white-space:nowrap;
}

.sf-doctrine__rites{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:minmax(0,1fr);
  gap:.65rem;
  min-width:0;
  min-height:0
}
.sf-doctrine-talent{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  min-width:0;
  min-height:0;
  padding:.75rem .85rem;
  border:1px solid rgba(216,164,65,.13);
  border-left:2px solid rgba(216,164,65,.24);
  border-radius:.55rem;
  background:linear-gradient(145deg,rgba(216,164,65,.04),transparent 48%),rgba(11,8,9,.55)
}
.sf-doctrine-talent>header strong{
  display:-webkit-box;overflow:hidden;font-size:12.5px;font-weight:600;line-height:1.25;-webkit-box-orient:vertical;-webkit-line-clamp:2
}
.sf-doctrine-talent>header>b i{width:.52rem;height:.52rem}
.sf-doctrine-talent>p{
  display:-webkit-box;min-height:0;margin:.4rem 0 .55rem;overflow:hidden;color:rgba(242,229,199,.76);font-size:11.5px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:4
}
.sf-doctrine-talent__actions{gap:.35rem;margin-top:auto}
.sf-doctrine-talent__actions button,
.sf-doctrine__vow-action button,
.sf-doctrine__footer button{
  min-height:44px;padding:.45rem .6rem;border-radius:.4rem;background:rgba(216,164,65,.055);font-size:10.5px;font-weight:500;letter-spacing:.045em
}
.sf-doctrine-talent__reason{
  overflow:visible;margin-top:.35rem;color:rgba(242,229,199,.55);font-size:10px;line-height:1.3;white-space:normal
}
.sf-doctrine-talent__detail[hidden],.sf-doctrine__vow-detail[hidden]{display:none}

.sf-doctrine__order [data-doctrine-capstone]{min-width:0}
.sf-doctrine__vow{
  display:grid;
  grid-template-columns:minmax(12rem,.72fr) minmax(13rem,1fr) minmax(14rem,auto);
  grid-template-areas:"vow-head vow-summary vow-action";
  align-items:center;
  gap:.85rem;
  min-width:0;
  min-height:5.2rem;
  margin:0;
  padding:.65rem .85rem;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:.58rem;
  background:radial-gradient(circle at 86% 18%,rgba(216,164,65,.08),transparent 35%),rgba(9,6,7,.68)
}
.sf-doctrine__vow>.sf-doctrine__sigil--capstone{
  position:absolute;
  z-index:0;
  top:50%;
  right:22%;
  width:5.75rem;
  height:5.75rem;
  transform:translateY(-50%);
  opacity:.14;
  filter:saturate(.92) contrast(1.08)
}
.sf-doctrine__vow>*:not(.sf-doctrine__sigil--capstone){position:relative;z-index:1}
.sf-doctrine__vow[data-state="locked"]>.sf-doctrine__sigil--capstone{opacity:.065;filter:grayscale(.65) contrast(1.08)}
.sf-doctrine__vow[data-state="eligible"]>.sf-doctrine__sigil--capstone{opacity:.2;filter:saturate(1.08) contrast(1.08) drop-shadow(0 0 .5rem var(--sf-order-accent))}
.sf-doctrine__vow[data-state="equipped"]>.sf-doctrine__sigil--capstone{opacity:.24;filter:saturate(1.15) contrast(1.1) drop-shadow(0 0 .6rem var(--sfu-verd))}
.sf-doctrine__vow>header{grid-area:vow-head;min-width:0}
.sf-doctrine__vow>header>span{min-width:0}
.sf-doctrine__vow>header strong{overflow:hidden;font-size:13.5px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.sf-doctrine__vow>header>b{font-size:9px}
.sf-doctrine__vow>p{
  grid-area:vow-summary;display:-webkit-box;min-width:0;margin:0;overflow:hidden;font-size:12.5px;line-height:1.45;color:rgba(242,229,199,.8);-webkit-box-orient:vertical;-webkit-line-clamp:3
}
.sf-doctrine__vow-detail,.sf-doctrine__fusions{grid-column:1/-1}
.sf-doctrine__vow-action{
  grid-area:vow-action;display:grid;grid-template-columns:minmax(0,1fr);gap:.35rem;margin:0;padding:0;border:0
}
.sf-doctrine__vow-action>small{overflow:hidden;font-size:9px;text-align:right;text-overflow:ellipsis;white-space:nowrap;color:rgba(242,229,199,.55)}
.sf-doctrine__vow-action>span{display:flex;justify-content:flex-end;gap:.35rem}
.sf-doctrine__vow-action button{min-width:7.5rem}
.sf-doctrine__order[data-view="overview"] .sf-doctrine__vow-detail,
.sf-doctrine__order[data-view="overview"] .sf-doctrine__fusions{display:none}

.sf-doctrine__order[data-view="talent"],.sf-doctrine__order[data-view="capstone"]{
  grid-template-rows:auto minmax(0,1fr);
  overflow:auto;
  scrollbar-gutter:stable
}
.sf-doctrine__order[data-view="talent"] .sf-doctrine__rites{grid-template-columns:minmax(0,1fr)}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent:not([data-inspected="true"]),
.sf-doctrine__order[data-view="talent"] [data-doctrine-capstone]{display:none}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent[data-inspected="true"]{min-height:0;padding:1rem 1.15rem}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent[data-inspected="true"]>p{-webkit-line-clamp:unset;font-size:13.5px;line-height:1.55}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent__detail{margin-top:.85rem;padding-top:.75rem}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent__detail li{font-size:12px;line-height:1.5}
.sf-doctrine__order[data-view="talent"] .sf-doctrine-talent__detail p{font-size:12px;line-height:1.5}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__rites{display:none}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow{
  display:block;min-height:0;padding:1.15rem 1.25rem
}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow>.sf-doctrine__sigil--capstone{
  top:.8rem;right:.85rem;width:8rem;height:8rem;transform:none;opacity:.16
}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow>p{display:block;margin:.6rem 0;font-size:14px;line-height:1.5}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow-detail{margin-top:.65rem;padding-top:.65rem;font-size:12px;line-height:1.5;border-top:1px solid rgba(216,164,65,.12)}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__fusions{display:grid;gap:.55rem}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__fusions li{padding:.55rem .65rem}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__fusions b{font-size:11px}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__fusions span{font-size:11px}
.sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow-action{margin-top:.85rem;padding-top:.75rem;border-top:1px solid rgba(216,164,65,.12)}

.sf-doctrine__footer{
  min-height:0;margin:0;padding:.4rem .65rem;border:0
}
.sf-stage:not(.sf-touch-enabled) .sf-doctrine__footer button{min-height:2.5rem;font-size:11px}

body.sf-high-contrast .sf-doctrine__summary,
body.sf-high-contrast .sf-doctrine__orders button,
body.sf-high-contrast .sf-doctrine-talent,
body.sf-high-contrast .sf-doctrine__vow{border-color:rgba(245,216,142,.62);background-color:#090607}

/* A maximised stage leaves the page's original playfield container behind.
   Drop the embedded-size container name so fullscreen uses its real viewport. */
body.rb-game-maxed .saintfall-page .rb-standalone-surface,
body.rb-escape-menu-open .saintfall-page .rb-standalone-surface{container-name:none}

/* The embedded game is sized by its playfield container, not the browser
   around the Rainbot sidebar. This is the screenshot-sized compact tier. */
@container saintfall-playfield (max-width:1180px){
  .sf-stage:not(.sf-touch-enabled) .sf-menu__frame{width:calc(100% - 1rem);height:calc(100% - 1rem);border-radius:.65rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__masthead{grid-template-columns:minmax(0,1fr) auto;min-height:3.35rem;padding:.35rem .55rem .35rem .75rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__crest{display:none}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__masthead>div:nth-child(2)>span,
  .sf-stage:not(.sf-touch-enabled) .sf-menu__masthead p{display:none}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__masthead h2{margin:0;font-size:1.05rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__close{width:2.75rem;height:2.75rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__body{grid-template-columns:8.25rem minmax(0,1fr)}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__rail{padding:.35rem .3rem;gap:.12rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__rail button{grid-template-columns:1.15rem minmax(0,1fr);gap:.4rem;min-height:2.2rem;padding:.28rem .38rem;font-size:9px;letter-spacing:.035em}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__rail button svg{width:1rem;height:1rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__rail .sf-menu__resume{min-height:2.65rem;margin-bottom:.12rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__resume strong{font-size:9px}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__resume small{display:none}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__rail button[data-menu-action]{min-height:2rem;font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__footer{min-height:1.85rem;padding:.34rem .6rem;font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__page--doctrine{padding:.52rem .62rem}
  .sf-stage:not(.sf-touch-enabled) .sf-menu__page--doctrine .sf-menu__pagehead{display:none}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__summary{grid-template-columns:3.7rem minmax(7rem,1fr) 4.8rem minmax(9rem,.8fr) auto;margin-bottom:.35rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__summary>div{min-height:2.7rem;padding:.32rem .42rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__rank strong{font-size:1.15rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__summary small{font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__body{grid-template-rows:42px minmax(0,1fr);gap:.32rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__orders{min-height:42px;gap:.22rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__orders button{grid-template-columns:1.25rem minmax(0,1fr) auto;column-gap:.28rem;min-height:42px;padding:.3rem .4rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__sigil--tab{width:1.125rem;height:1.125rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__orders button span{font-size:10px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__orders button small{font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__order-head{grid-template-columns:1.75rem minmax(0,1fr) auto;gap:.5rem;min-height:2rem;padding:0 .1rem .28rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__sigil--hero{grid-column:1;grid-row:1;width:1.6rem;height:1.6rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__order-head>span{grid-column:2;grid-row:1}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__order-head>b{grid-column:3;grid-row:1}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__order-head h4{font-size:.9rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__order-head p{font-size:10px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__rites{gap:.32rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent{padding:.42rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent>header small{font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent>header strong{font-size:11px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent>p{margin:.24rem 0 .32rem;font-size:10px;-webkit-line-clamp:2}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent__actions button{min-height:36px;padding:.25rem;font-size:10px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine-talent__reason{margin-top:.24rem;font-size:9px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__vow{grid-template-columns:minmax(9rem,.65fr) minmax(8rem,1fr) minmax(12rem,auto);min-height:4rem;padding:.4rem .5rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__vow>header strong{font-size:11px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__vow>p{font-size:10px;-webkit-line-clamp:1}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__vow-action button{min-width:5.5rem;min-height:36px;padding:.25rem;font-size:10px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__vow-action>small{font-size:8px}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__footer{min-height:0;margin:0;padding:.2rem .35rem}
  .sf-stage:not(.sf-touch-enabled) .sf-doctrine__footer button{min-height:32px;font-size:7px}
}

/* Portrait keeps one deliberate scroll owner: the menu content. */
@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled .sf-menu[data-panel="doctrine"] .sf-menu__content{overflow:auto;overscroll-behavior:contain}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine{display:block;height:auto;min-height:100%;overflow:visible;padding:.55rem .5rem max(.8rem,env(safe-area-inset-bottom))}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine[hidden]{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead{display:grid;grid-template-columns:1fr;margin-bottom:.35rem;padding-bottom:.35rem}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead>span{grid-area:auto}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead h3{grid-area:auto;font-size:1.2rem}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead p{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary{grid-template-columns:3.25rem minmax(0,1fr) 4.15rem;grid-template-areas:"rank xp points" "vows vows vows" "chrome chrome chrome";margin-bottom:.35rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary>div{min-height:2.65rem;padding:.32rem .38rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-slots{min-height:2.5rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__body{display:block}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders{position:sticky;top:0;z-index:3;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);min-height:44px;padding:.22rem;gap:.18rem;overflow:visible;border:1px solid rgba(216,164,65,.12);border-radius:.5rem;background:rgba(8,6,7,.96);box-shadow:0 .5rem 1.25rem rgba(0,0,0,.22)}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button{display:grid;grid-template-columns:1.2rem minmax(0,1fr);grid-template-rows:auto auto;grid-template-areas:"sigil label" "sigil points";align-items:center;justify-items:start;column-gap:.1rem;min-height:44px;padding:.22rem .06rem;text-align:left}
  .sf-stage.sf-touch-enabled .sf-doctrine__sigil--tab{grid-row:1/3;width:1.125rem;height:1.125rem;justify-self:center}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button span{font-size:8px;letter-spacing:0}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order{display:block;margin-top:.4rem;overflow:visible}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head{grid-template-columns:2.15rem minmax(0,1fr) auto;gap:.45rem;min-height:2.5rem;margin-bottom:.4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__sigil--hero{width:1.95rem;height:1.95rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head>span{display:grid;grid-template-columns:1fr;grid-template-areas:"kicker" "title" "focus"}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head h4{white-space:normal}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head p{font-size:10px;white-space:normal}
  .sf-stage.sf-touch-enabled .sf-doctrine__rites{grid-template-columns:1fr;gap:.4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent{padding:.55rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>p{min-height:0;-webkit-line-clamp:2}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent__actions button{min-height:44px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow{display:block;min-height:0;margin-top:.45rem;padding:.6rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow>p{display:block;margin:.35rem 0}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action{margin-top:.45rem;padding-top:.45rem;border-top:1px solid rgba(216,164,65,.12)}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action>small{text-align:left;white-space:normal}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action>span{display:grid;grid-template-columns:1fr 1fr}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action button{width:100%;min-width:0;min-height:44px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="talent"],
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"]{overflow:visible}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer{grid-area:chrome;display:flex;flex-wrap:wrap;justify-content:flex-end;margin:0;padding:.3rem .35rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer button{min-width:8rem;min-height:44px}
}

/* Short landscape keeps the complete build ledger in one glance. Rare reset
   stays beside the summary; only an opened detail becomes scrollable. */
@media (orientation:landscape) and (max-height:500px){
  .sf-stage.sf-touch-enabled .sf-menu[data-panel="doctrine"] .sf-menu__content{overflow:hidden}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine{display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;padding:.35rem .5rem;overflow:hidden}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine[hidden]{display:none}
  .sf-stage.sf-touch-enabled .sf-menu__page--doctrine .sf-menu__pagehead{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary{grid-row:1;grid-template-columns:3.4rem minmax(6rem,1fr) 4.2rem minmax(8rem,.8fr) auto;margin:0 0 .22rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary>div{min-height:2.25rem;padding:.22rem .3rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__summary small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__rank strong{font-size:1rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-slots{grid-column:auto;min-height:2.25rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__body{grid-row:2;display:grid;grid-template-columns:1fr;grid-template-rows:44px minmax(0,1fr);gap:.22rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);min-height:44px;padding:0;gap:.18rem;overflow:visible}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button{display:grid;grid-template-columns:1.2rem minmax(0,1fr) auto;grid-template-areas:"sigil label points";column-gap:.2rem;min-height:44px;padding:.2rem .28rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__sigil--tab{width:1.125rem;height:1.125rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button span{font-size:8px;white-space:nowrap}
  .sf-stage.sf-touch-enabled .sf-doctrine__orders button small{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order{display:block;min-height:0;padding-right:.15rem;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head{grid-template-columns:1.4rem minmax(0,1fr) auto;gap:.35rem;min-height:1.5rem;margin:0;padding:0 .08rem .16rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__sigil--hero{width:1.25rem;height:1.25rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head>span{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"title focus";gap:.5rem;align-items:baseline}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head small{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head h4{grid-area:title;font-size:.78rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head p{grid-area:focus;font-size:9px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order-head>b{padding:.18rem .3rem;font-size:8px}
  .sf-stage.sf-touch-enabled .sf-doctrine__rites{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:.22rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent{grid-template-rows:auto minmax(1.15em,auto) auto;min-height:5.35rem;padding:.34rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>header small{font-size:8px}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>header strong{font-size:9px;-webkit-line-clamp:1}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>header>b i{width:.35rem;height:.35rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent>p{margin:.14rem 0 .2rem;font-size:9px;line-height:1.15;-webkit-line-clamp:1}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent__actions{gap:.15rem}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent__actions button{min-height:44px;padding:.16rem;font-size:9px}
  .sf-stage.sf-touch-enabled .sf-doctrine-talent__reason{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="overview"]{overflow:hidden}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="overview"] .sf-doctrine-talent{grid-template-rows:auto auto;min-height:0}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="overview"] .sf-doctrine-talent>p{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow{grid-template-columns:minmax(8rem,.8fr) minmax(9rem,1fr) minmax(12rem,auto);min-height:4rem;margin-top:.28rem;padding:.32rem .4rem;gap:.4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow>header strong{font-size:9px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow>header>b{font-size:7px}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow>p{font-size:9px;-webkit-line-clamp:1}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action>small{display:none}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action>span{gap:.18rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__vow-action button{min-width:5rem;min-height:44px;padding:.16rem;font-size:9px}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer{position:relative;display:flex;width:auto;min-height:0;margin:0;padding:.18rem .28rem;border:0;gap:.35rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__footer button{width:auto;min-width:6.2rem;min-height:44px;padding:.2rem .35rem;font-size:8px}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="talent"],
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"]{overflow:auto}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="talent"] .sf-doctrine-talent>p{display:block}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow{display:block;padding:.6rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow>p{display:block;margin:.35rem 0}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow-detail{display:block;margin-top:.4rem;padding-top:.4rem}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"] .sf-doctrine__fusions{display:grid}
  .sf-stage.sf-touch-enabled .sf-doctrine__order[data-view="capstone"] .sf-doctrine__vow-action{margin-top:.5rem;padding-top:.45rem}
}

/* ======================================================================
   HARDLINE FIELD INTERFACE

   A final, intentionally authoritative cascade for the modern Saintfall
   command surface. Rectangular instrument geometry, cool signal lines and
   stable information density replace the soft card treatment above.
   The radial command selector remains round because its shape communicates
   direction; every conventional HUD/menu surface is hard-edged.
   ====================================================================== */

#sf-native-ui{
  --sfu-ink:#030609;
  --sfu-panel:rgba(5,10,14,.965);
  --sfu-bone:#edf3f2;
  --sfu-dim:rgba(225,236,236,.64);
  --sfu-brass:#c9a457;
  --sfu-gold:#f0d58c;
  --sfu-blood:#9d3040;
  --sfu-threat:#ff6b45;
  --sfu-verd:#75ddb4;
  --sfu-cyan:#73d8ed;
  --sfu-line:rgba(115,216,237,.22);
  --sfu-line-strong:rgba(115,216,237,.58)
}

#sf-native-ui :is(
  .sf-menu-trigger,.sf-menu__frame,.sf-menu__close,.sf-menu__rail button,
  .sf-operation-card,.sf-menu__callout,.sf-save-slot,.sf-save-slot__actions button,
  .sf-save-reason,.sf-career-recovery,.sf-career-branch,.sf-career-branch>button,
  .sf-controls-grid article,.sf-setting,.sf-setting>button,.sf-setting__segments button,
  .sf-bind-key,.sf-bind-bar button,
  .sf-map-page__surface,#sf-map-canvas-large,.sf-map-page__orders,.sf-map-order,
  .sf-doctrine__summary,.sf-doctrine__summary>div,.sf-doctrine__vow-slots>span,
  .sf-doctrine__lock,.sf-doctrine__orders,.sf-doctrine__orders button,
  .sf-doctrine__order-head>b,.sf-doctrine-talent,.sf-doctrine-talent__actions button,
  .sf-doctrine__preview,.sf-doctrine__preview-meta>span,.sf-doctrine__preview-foot button,
  .sf-doctrine__vow,.sf-doctrine__vow-action button,.sf-doctrine__footer button
){border-radius:0!important}

#sf-native-ui .sf-menu{
  position:fixed!important;
  inset:0!important;
  left:0!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:100%!important;
  z-index:999999!important;
}

#sf-native-ui .sf-menu__veil{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:
    linear-gradient(90deg,rgba(1,4,7,.96),rgba(3,7,10,.82) 58%,rgba(2,5,8,.94)),
    radial-gradient(circle at 76% 18%,rgba(115,216,237,.06),transparent 36%);
  backdrop-filter:blur(12px) saturate(.42) brightness(.48)
}

#sf-native-ui .sf-menu__frame,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__frame{
  position:absolute!important;
  inset:0!important;
  left:0!important;
  top:0!important;
  width:100%!important;
  height:100%!important;
  border:none!important;
  border-left:3px solid rgba(157,48,64,.82)!important;
  border-radius:0!important;
  transform:none!important;
  background:
    linear-gradient(rgba(115,216,237,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(115,216,237,.014) 1px,transparent 1px),
    linear-gradient(135deg,rgba(115,216,237,.025),transparent 28%),
    rgba(3,7,10,.985);
  background-size:32px 32px,32px 32px,auto,auto;
  box-shadow:inset 0 1px 0 rgba(237,243,242,.035),0 2rem 7rem rgba(0,0,0,.78)
}

#sf-native-ui .sf-menu__frame:before,
#sf-native-ui .sf-menu__frame:after{
  width:2.4rem;height:2.4rem;border-color:var(--sfu-cyan);opacity:.8
}

#sf-native-ui .sf-menu__masthead,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__masthead{
  min-height:4.8rem;
  padding:.75rem 1.4rem .75rem 1.65rem;
  gap:1.15rem;
  border-bottom:1px solid var(--sfu-line);
  background:linear-gradient(90deg,rgba(157,48,64,.16),transparent 32%)
}

#sf-native-ui .sf-menu__crest{
  width:3rem;height:3rem;border-color:rgba(115,216,237,.42);
  color:var(--sfu-cyan);transform:none
}
#sf-native-ui .sf-menu__crest svg{width:1.85rem;height:1.85rem;transform:none}
#sf-native-ui .sf-menu__masthead span{color:rgba(115,216,237,.72);font-size:10.5px;letter-spacing:.18em}
#sf-native-ui .sf-menu__masthead h2{
  color:#f2f5f3;font:600 clamp(1.25rem,2.1vw,1.75rem)/1 "Share Tech Mono",ui-monospace,monospace;
  letter-spacing:.1em;text-shadow:none
}
#sf-native-ui .sf-menu__masthead p{color:rgba(225,236,236,.5);font-size:12px}
#sf-native-ui .sf-menu__close{
  width:3rem;height:3rem;border-color:rgba(115,216,237,.34);background:rgba(5,12,16,.75);color:var(--sfu-cyan)
}
#sf-native-ui .sf-menu__close:hover{border-color:var(--sfu-cyan);background:rgba(115,216,237,.1)}

#sf-native-ui .sf-menu__body{grid-template-columns:14.5rem minmax(0,1fr)}
#sf-native-ui .sf-menu__rail,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__rail{
  padding:.85rem .65rem;gap:.25rem;border-right:1px solid var(--sfu-line);
  background:linear-gradient(180deg,rgba(115,216,237,.025),transparent 45%),rgba(1,4,7,.54)
}
#sf-native-ui .sf-menu__rail button,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__rail button{
  min-height:3.1rem;padding:.58rem .75rem;border:1px solid transparent;
  border-left:2px solid transparent;background:transparent;color:rgba(225,236,236,.65);
  font-size:11.5px;letter-spacing:.08em
}
#sf-native-ui .sf-menu__rail button svg{color:rgba(115,216,237,.68)}
#sf-native-ui .sf-menu__rail button:hover{
  border-color:rgba(115,216,237,.18);border-left-color:rgba(115,216,237,.55);
  background:rgba(115,216,237,.045);color:#f1f5f4;box-shadow:none
}
#sf-native-ui .sf-menu__rail button:is(.is-active,[aria-selected="true"],[aria-current="page"]){
  border-color:rgba(115,216,237,.26);border-left-color:var(--sfu-cyan);
  background:linear-gradient(90deg,rgba(115,216,237,.11),rgba(115,216,237,.025));
  color:#f6fbfa;box-shadow:inset 3px 0 0 var(--sfu-cyan)
}
#sf-native-ui .sf-menu__rail .sf-menu__resume{
  min-height:3.45rem;border-color:rgba(240,213,140,.3);border-left-color:var(--sfu-gold);
  background:linear-gradient(90deg,rgba(157,48,64,.38),rgba(115,216,237,.025));
  box-shadow:inset 3px 0 0 var(--sfu-gold)
}
#sf-native-ui .sf-menu__resume strong{font-family:"Share Tech Mono",ui-monospace,monospace;font-size:12px}
#sf-native-ui .sf-menu__resume small{font-size:10px}
#sf-native-ui .sf-menu__rail button[data-menu-action="maximize"]{border-color:rgba(115,216,237,.2);color:var(--sfu-cyan)}

#sf-native-ui .sf-menu__content{
  background:linear-gradient(180deg,rgba(115,216,237,.015),transparent 38%);
  scrollbar-color:rgba(115,216,237,.48) rgba(0,0,0,.2)
}
#sf-native-ui .sf-menu__page{padding:clamp(1rem,2vw,1.55rem)}
#sf-native-ui .sf-menu__pagehead{margin-bottom:1rem;padding-bottom:.72rem;border-bottom:1px solid var(--sfu-line)}
#sf-native-ui .sf-menu__pagehead>span{color:rgba(115,216,237,.78);font-size:10px}
#sf-native-ui .sf-menu__pagehead h3{
  color:#f1f5f4;font:600 clamp(1.35rem,2.35vw,1.95rem)/1.05 "Share Tech Mono",ui-monospace,monospace;
  letter-spacing:.075em
}
#sf-native-ui .sf-menu__pagehead p{
  color:rgba(225,236,236,.66);font:400 13px/1.45 "Share Tech Mono",ui-monospace,monospace
}
#sf-native-ui .sf-menu__footer{border-top:1px solid var(--sfu-line);color:rgba(225,236,236,.42)}

#sf-native-ui .sf-operation-grid{gap:.65rem}
#sf-native-ui .sf-operation-card{
  min-height:7.5rem;padding:.85rem;border-color:rgba(115,216,237,.16);
  border-top:2px solid rgba(115,216,237,.34);background:rgba(4,10,14,.58);box-shadow:none
}
#sf-native-ui .sf-operation-card small{color:rgba(115,216,237,.72);font-size:10px}
#sf-native-ui .sf-operation-card strong{
  font-family:"Share Tech Mono",ui-monospace,monospace;font-size:14px;line-height:1.35
}
#sf-native-ui .sf-operation-card>span{color:rgba(225,236,236,.5);font-size:11px}
#sf-native-ui .sf-menu__callout{
  border:1px solid rgba(115,216,237,.14);border-left:2px solid var(--sfu-cyan);
  background:rgba(115,216,237,.035)
}
#sf-native-ui .sf-menu__callout span{color:var(--sfu-cyan)}
#sf-native-ui .sf-menu__callout p{color:rgba(225,236,236,.68);font-size:11px}

/* Doctrine uses a comparison grid plus one stable inspector. */
#sf-native-ui .sf-menu__page--doctrine .sf-menu__pagehead{margin-bottom:.75rem;padding-bottom:.65rem}
#sf-native-ui .sf-doctrine__summary{
  min-height:3.8rem;
  margin-bottom:.75rem;border:1px solid rgba(115,216,237,.14);
  background:linear-gradient(90deg,rgba(115,216,237,.035),transparent 78%)
}
#sf-native-ui .sf-doctrine__summary>div,
#sf-native-ui .sf-doctrine__summary>.sf-doctrine__footer{min-height:3.8rem;padding:.55rem .75rem;border-right-color:rgba(115,216,237,.12)}
#sf-native-ui .sf-doctrine__summary small{color:rgba(115,216,237,.7);font-size:10px}
#sf-native-ui .sf-doctrine__xp>i{height:4px;background:rgba(225,236,236,.1)}
#sf-native-ui .sf-doctrine__xp>i em{background:linear-gradient(90deg,#477f8c,var(--sfu-cyan));box-shadow:none}
#sf-native-ui .sf-doctrine__vow-slots>span{border-left-color:rgba(115,216,237,.25);background:rgba(115,216,237,.025)}

#sf-native-ui .sf-doctrine__orders{gap:.45rem;min-height:48px}
#sf-native-ui .sf-doctrine__orders button{
  min-height:48px;padding:.5rem .75rem;border-color:rgba(115,216,237,.12);
  border-left:2px solid rgba(115,216,237,.16);background:rgba(3,8,11,.58)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__orders button{min-height:48px}
#sf-native-ui .sf-doctrine__orders button span{font-family:"Share Tech Mono",ui-monospace,monospace;font-size:12px;font-weight:600}
#sf-native-ui .sf-doctrine__orders button small{font-size:10px}
#sf-native-ui .sf-doctrine__orders button:hover,
#sf-native-ui .sf-doctrine__orders button[aria-selected="true"]{
  border-color:color-mix(in srgb,var(--sf-order-accent) 58%,transparent);
  border-left-color:var(--sf-order-accent);background:rgba(115,216,237,.055);
  box-shadow:inset 0 -2px 0 var(--sf-order-accent)
}

#sf-native-ui .sf-doctrine__order{grid-template-rows:auto minmax(0,1fr) auto;gap:.65rem}
#sf-native-ui .sf-doctrine__order-head{
  min-height:3rem;padding:.15rem .15rem .55rem;border-bottom-color:rgba(115,216,237,.16)
}
#sf-native-ui .sf-doctrine__order-head h4{
  font-family:"Share Tech Mono",ui-monospace,monospace;font-size:1.25rem;letter-spacing:.055em
}
#sf-native-ui .sf-doctrine__order-head p{color:rgba(225,236,236,.65);font-family:"Share Tech Mono",ui-monospace,monospace;font-size:13px}
#sf-native-ui .sf-doctrine__order-head>b{border-color:rgba(115,216,237,.25);font-size:11px;padding:.35rem .55rem}

#sf-native-ui .sf-doctrine__workspace{
  display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);
  gap:.7rem;width:100%;min-width:0;max-width:100%;min-height:0;overflow:hidden
}
#sf-native-ui .sf-doctrine__tree,
#sf-native-ui .sf-doctrine__preview{min-width:0;width:100%;max-width:100%;overflow:hidden}
#sf-native-ui .sf-doctrine__rites{
  grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;
  grid-auto-rows:minmax(0,auto);gap:.4rem;min-height:0
}
#sf-native-ui .sf-doctrine-talent{
  display:grid;grid-template-columns:4.5rem minmax(0,1fr);
  grid-template-areas:
    "media head"
    "media summary"
    "media badge";
  column-gap:.75rem;row-gap:.3rem;align-content:start;
  min-height:0;padding:.75rem .85rem;border:1px solid rgba(115,216,237,.14);
  border-left:3px solid rgba(115,216,237,.22);background:rgba(4,10,14,.68);
  cursor:pointer;user-select:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease,transform .15s ease
}
#sf-native-ui .sf-doctrine-talent:hover{
  border-color:color-mix(in srgb,var(--sf-order-accent) 55%,rgba(115,216,237,.28));
  background:rgba(8,16,22,.85)
}
#sf-native-ui .sf-doctrine-talent:focus-visible{
  outline:1px solid var(--sfu-cyan);outline-offset:2px
}
#sf-native-ui .sf-doctrine-talent[data-previewed="true"]{
  border-color:var(--sf-order-accent,var(--sfu-cyan));
  border-left-color:var(--sf-order-accent,var(--sfu-cyan));
  background:linear-gradient(135deg,rgba(115,216,237,.08),rgba(4,10,14,.92));
  box-shadow:inset 3px 0 0 var(--sf-order-accent),0 0 14px color-mix(in srgb,var(--sf-order-accent) 32%,transparent)
}
#sf-native-ui .sf-doctrine-talent__media{
  grid-area:media;position:relative;width:4.5rem;height:4.5rem;
  border:1px solid rgba(115,216,237,.22);background:#020508;overflow:hidden
}
#sf-native-ui .sf-doctrine-talent[data-previewed="true"] .sf-doctrine-talent__media{
  border-color:var(--sf-order-accent,var(--sfu-cyan))
}
#sf-native-ui .sf-doctrine-talent__thumb{
  width:100%;height:100%;object-fit:cover;display:block;
  filter:brightness(.92) contrast(1.08);transition:filter .15s ease,transform .2s ease
}
#sf-native-ui .sf-doctrine-talent:hover .sf-doctrine-talent__thumb,
#sf-native-ui .sf-doctrine-talent[data-previewed="true"] .sf-doctrine-talent__thumb{
  filter:brightness(1.05) contrast(1.1);transform:scale(1.04)
}
#sf-native-ui .sf-doctrine-talent__tier{
  position:absolute;bottom:0;right:0;padding:.1rem .3rem;
  background:rgba(2,6,10,.88);border-top:1px solid rgba(115,216,237,.3);
  border-left:1px solid rgba(115,216,237,.3);color:var(--sf-order-accent,var(--sfu-cyan));
  font:700 9px/1 "Share Tech Mono",ui-monospace,monospace;letter-spacing:.06em
}
#sf-native-ui .sf-doctrine-talent>header{
  grid-area:head;display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem
}
#sf-native-ui .sf-doctrine-talent>header strong{
  color:#edf3f2;font-family:"Share Tech Mono",ui-monospace,monospace;font-size:13.5px;
  line-height:1.25;letter-spacing:.02em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
#sf-native-ui .sf-doctrine-talent>header small{display:none}
#sf-native-ui .sf-doctrine-talent>header b{
  display:flex;gap:4px;align-items:center;flex-shrink:0
}
#sf-native-ui .sf-doctrine-talent>header b i{
  width:8px;height:8px;background:rgba(115,216,237,.18);border:1px solid rgba(115,216,237,.35);display:inline-block
}
#sf-native-ui .sf-doctrine-talent>header b i[data-state="owned"]{
  background:var(--sfu-verd,#75ddb4);border-color:var(--sfu-verd,#75ddb4);box-shadow:0 0 4px var(--sfu-verd,#75ddb4)
}
#sf-native-ui .sf-doctrine-talent>p{
  grid-area:summary;margin:0;color:rgba(225,236,236,.75);font-size:11.5px;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden
}
#sf-native-ui .sf-doctrine-talent>.sf-doctrine-talent__meta-row{
  grid-area:badge;display:flex;align-items:center;margin-top:auto
}
#sf-native-ui .sf-doctrine-talent__badge{
  font-family:"Share Tech Mono",ui-monospace,monospace;font-size:9px;font-weight:600;
  letter-spacing:.08em;padding:.12rem .36rem;border:1px solid rgba(115,216,237,.2);
  color:var(--sfu-cyan);background:rgba(115,216,237,.04)
}
#sf-native-ui .sf-doctrine-talent__badge[data-state="maxed"],
#sf-native-ui .sf-doctrine-talent__badge[data-state="owned"]{
  border-color:rgba(117,221,180,.4);color:var(--sfu-verd);background:rgba(117,221,180,.06)
}
#sf-native-ui .sf-doctrine-talent__badge[data-state="locked"],
#sf-native-ui .sf-doctrine-talent__badge[data-state="forthcoming"]{
  border-color:rgba(225,236,236,.14);color:rgba(225,236,236,.42);background:rgba(225,236,236,.02)
}
#sf-native-ui .sf-doctrine-talent__actions button{font-size:11px}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__actions,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__reason{display:none}
#sf-native-ui .sf-doctrine-talent__reason{color:rgba(225,236,236,.55);font-size:10px}

#sf-native-ui .sf-doctrine__preview{
  position:relative;display:flex;flex-direction:column;justify-content:space-between;
  gap:.65rem;min-width:0;min-height:0;padding:1rem 1.15rem;border:1px solid rgba(115,216,237,.22);
  border-top:2px solid var(--sf-order-accent,var(--sfu-cyan));
  background:linear-gradient(145deg,rgba(115,216,237,.055),transparent 42%),rgba(2,7,10,.92);
  overflow:hidden
}
#sf-native-ui .sf-doctrine__preview:after{
  content:"";position:absolute;right:0;top:0;width:2.4rem;height:1px;background:var(--sfu-cyan);opacity:.68
}
#sf-native-ui .sf-doctrine__preview:focus-visible{
  outline:1px solid var(--sfu-cyan);outline-offset:-3px
}
#sf-native-ui .sf-doctrine__preview-empty{
  align-self:center;justify-self:center;color:rgba(115,216,237,.48);font-size:11px;letter-spacing:.14em;text-align:center
}
#sf-native-ui .sf-doctrine__preview-head{display:flex;align-items:center;gap:.75rem;padding-bottom:.65rem;border-bottom:1px solid var(--sfu-line)}
#sf-native-ui .sf-doctrine__preview-art-wrap{
  flex:0 0 4.2rem;width:4.2rem;height:4.2rem;
  border:1px solid var(--sf-order-accent,var(--sfu-cyan));
  background:#020508;overflow:hidden;box-shadow:0 0 10px color-mix(in srgb,var(--sf-order-accent) 40%,transparent)
}
#sf-native-ui .sf-doctrine__preview-art{
  width:100%;height:100%;object-fit:cover;display:block
}
#sf-native-ui .sf-doctrine__preview-titles{
  display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;flex:1;min-width:0
}
#sf-native-ui .sf-doctrine__preview-titles>span{display:grid;gap:.15rem;min-width:0}
#sf-native-ui .sf-doctrine__preview-titles small{color:var(--sf-order-accent);font-size:10px;letter-spacing:.12em}
#sf-native-ui .sf-doctrine__preview-titles h5{
  margin:0;min-width:0;color:#f4f7f6;font:600 16px/1.2 "Share Tech Mono",ui-monospace,monospace;letter-spacing:.04em;
  overflow-wrap:anywhere
}
#sf-native-ui .sf-doctrine__preview-titles>b{
  flex:none;padding:.25rem .45rem;border:1px solid rgba(115,216,237,.24);
  color:var(--sfu-cyan);font-size:9px;font-weight:500;letter-spacing:.08em
}
#sf-native-ui .sf-doctrine__preview-titles>b[data-state="owned"],
#sf-native-ui .sf-doctrine__preview-titles>b[data-state="maxed"]{border-color:rgba(117,221,180,.4);color:var(--sfu-verd)}
#sf-native-ui .sf-doctrine__preview-titles>b[data-state="locked"],
#sf-native-ui .sf-doctrine__preview-titles>b[data-state="forthcoming"]{color:rgba(225,236,236,.46)}
#sf-native-ui .sf-doctrine__preview-summary{margin:.2rem 0 .35rem;color:rgba(225,236,236,.82);font-size:13px;line-height:1.45}
#sf-native-ui .sf-doctrine__preview-meta{display:grid;grid-template-columns:1fr 1fr;border-block:1px solid rgba(115,216,237,.12)}
#sf-native-ui .sf-doctrine__preview-meta>span{display:grid;gap:.15rem;padding:.5rem .6rem;border-right:1px solid rgba(115,216,237,.12)}
#sf-native-ui .sf-doctrine__preview-meta>span:last-child{border-right:0}
#sf-native-ui .sf-doctrine__preview-meta small{color:rgba(115,216,237,.58);font-size:9px;letter-spacing:.09em}
#sf-native-ui .sf-doctrine__preview-meta strong{color:#eff5f3;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
#sf-native-ui .sf-doctrine__preview-ranks{display:grid;align-content:start;gap:.5rem;margin:0;padding:0;overflow:auto;list-style:none}
#sf-native-ui .sf-doctrine__preview-ranks li{
  display:grid;grid-template-columns:1.85rem minmax(0,1fr);gap:.65rem;padding:.5rem 0;border-bottom:1px solid rgba(115,216,237,.09)
}
#sf-native-ui .sf-doctrine__preview-ranks li>b{color:rgba(115,216,237,.38);font-size:13px;font-weight:500}
#sf-native-ui .sf-doctrine__preview-ranks li>span{display:grid;gap:.15rem}
#sf-native-ui .sf-doctrine__preview-ranks small{color:rgba(115,216,237,.6);font-size:9px;letter-spacing:.09em}
#sf-native-ui .sf-doctrine__preview-ranks strong{color:rgba(225,236,236,.75);font-size:12px;font-weight:400;line-height:1.4}
#sf-native-ui .sf-doctrine__preview-ranks li[data-state="owned"]>b,
#sf-native-ui .sf-doctrine__preview-ranks li[data-state="owned"] small{color:var(--sfu-verd)}
#sf-native-ui .sf-doctrine__preview-ranks li[data-state="next"]>b,
#sf-native-ui .sf-doctrine__preview-ranks li[data-state="next"] small{color:var(--sfu-cyan)}
#sf-native-ui .sf-doctrine__preview-foot{display:grid;gap:.5rem;padding-top:.65rem;border-top:1px solid var(--sfu-line);margin-top:auto}
#sf-native-ui .sf-doctrine__preview-foot>small{color:rgba(225,236,236,.6);font-size:11px;line-height:1.35}
#sf-native-ui .sf-doctrine__preview-foot>div{display:flex;gap:.5rem;min-width:0}
#sf-native-ui .sf-doctrine__preview-foot button{
  flex:1 1 0;min-width:0;min-height:46px;padding:.5rem;border:1px solid rgba(115,216,237,.3);
  background:rgba(115,216,237,.055);color:var(--sfu-cyan);font:600 11.5px/1.2 "Share Tech Mono",ui-monospace,monospace;
  letter-spacing:.05em;cursor:pointer
}
#sf-native-ui .sf-doctrine__preview-foot button[data-talent-action="spend"]{border-color:rgba(117,221,180,.38);color:var(--sfu-verd)}
#sf-native-ui .sf-doctrine__preview-foot button:hover:not(:disabled){border-color:var(--sfu-cyan);background:rgba(115,216,237,.12)}
#sf-native-ui .sf-doctrine__preview-foot button:disabled{opacity:.36;cursor:not-allowed}

#sf-native-ui .sf-doctrine__vow{
  display:flex;align-items:stretch;gap:.85rem;
  border:1px solid rgba(115,216,237,.16);border-left:3px solid rgba(240,213,140,.5);
  background:linear-gradient(90deg,rgba(240,213,140,.04),transparent 55%),rgba(3,8,11,.78);
  padding:.75rem 1rem
}
#sf-native-ui .sf-doctrine__vow-media{
  position:relative;flex:0 0 4.2rem;width:4.2rem;height:4.2rem;
  border:1px solid rgba(240,213,140,.4);background:#020508;overflow:hidden
}
#sf-native-ui .sf-doctrine__vow-art{
  width:100%;height:100%;object-fit:cover;display:block
}
#sf-native-ui .sf-doctrine__vow-body{
  display:grid;gap:.35rem;flex:1;min-width:0
}
#sf-native-ui .sf-doctrine__vow-body header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem
}
#sf-native-ui .sf-doctrine__vow-body header strong{font-family:"Share Tech Mono",ui-monospace,monospace}

/* Desktop Details targets the stable inspector; the comparison grid never
   disappears or stretches into a mostly-empty single card. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"]{
  grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"] .sf-doctrine__workspace{display:grid}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"] .sf-doctrine__rites{
  grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(0,auto)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"] .sf-doctrine-talent:not([data-inspected="true"]){display:flex}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"] [data-doctrine-capstone]{display:block}

@container saintfall-playfield (max-width:1180px){
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__frame{border-radius:0}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__body{grid-template-columns:9.25rem minmax(0,1fr)}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__rail button{min-height:2.35rem;font-size:10px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__rail .sf-menu__resume{min-height:2.8rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__page--doctrine{padding:.58rem .7rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__summary small{font-size:8px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__workspace{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:.45rem;width:100%}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent{padding:.38rem .48rem;gap:.45rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__media{flex:0 0 3.2rem;width:3.2rem;height:3.2rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__name{font-size:11px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__summary{
    min-height:0;margin:0;font-size:9.5px;line-height:1.2;-webkit-line-clamp:1
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{
    grid-template-rows:auto auto minmax(0,1fr) auto;padding:.48rem;gap:.25rem
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-head{padding-bottom:.28rem;gap:.45rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-art-wrap{flex:0 0 2.8rem;width:2.8rem;height:2.8rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-titles h5{font-size:13px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-summary{
    display:-webkit-box;overflow:hidden;font-size:10px;-webkit-box-orient:vertical;-webkit-line-clamp:2
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-meta{display:none}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks{gap:.15rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks li{gap:.35rem;padding:.12rem 0}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks strong{
    display:-webkit-box;overflow:hidden;font-size:9px;-webkit-box-orient:vertical;-webkit-line-clamp:4
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot{gap:.18rem;padding-top:.25rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot>small{
    overflow:hidden;font-size:9px;text-overflow:ellipsis;white-space:nowrap
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot button{min-height:34px;padding:.3rem}
}

/* Touch cannot depend on hover. Its explicit Details action keeps the
   established drill-in flow, while every control remains at least 44px. */
.sf-stage.sf-touch-enabled #sf-native-ui :is(
  .sf-menu-trigger,.sf-menu__frame,.sf-menu__close,.sf-menu__rail button,
  .sf-map-page__surface,.sf-map-page__orders,.sf-map-order,
  .sf-doctrine__summary,.sf-doctrine__orders,.sf-doctrine__orders button,
  .sf-doctrine-talent,.sf-doctrine-talent__actions button,.sf-doctrine__vow,
  .sf-doctrine__vow-action button,.sf-doctrine__footer button
){border-radius:0!important}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__workspace{display:block;overflow:visible;min-height:0!important}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__preview{display:none}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header strong{font-family:"Share Tech Mono",ui-monospace,monospace}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions button{font-size:9px}

@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__masthead h2{font-size:1rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__rail{border-right:0;border-bottom:1px solid var(--sfu-line)}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__rail button{font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders{border-radius:0;background:rgba(3,8,11,.98)}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__rites{grid-template-columns:1fr}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent{display:flex;flex-direction:column;gap:.35rem;padding:.62rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__media{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header strong{font-size:12px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>p{font-size:11px;line-height:1.35}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions{display:flex;gap:.35rem;width:100%}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions button{flex:1;min-height:44px;min-width:44px;padding:.35rem;font-size:10px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__reason{display:block;font-size:9px}
}

@media (orientation:landscape) and (max-height:500px){
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__body{grid-template-columns:8.5rem minmax(0,1fr)}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__rail button{font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-menu__page--doctrine{padding:.35rem .5rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__summary{margin:0 0 .22rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button{
    box-sizing:border-box;height:44px;min-height:44px
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button span{font-size:8px;letter-spacing:0}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button small{font-size:7px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order-head{
    grid-template-columns:1.15rem minmax(0,1fr) auto;gap:.3rem;min-height:1.15rem;
    margin:0;padding:0 .08rem .08rem
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__sigil--hero{width:1rem;height:1rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order-head h4{font-size:.78rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order-head p{font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__rites{
    grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;grid-auto-rows:auto
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent{
    display:grid;grid-template-columns:1fr;grid-template-rows:auto auto auto;grid-template-areas:none;
    min-height:5.35rem;padding:.3rem .34rem;overflow:hidden
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__media{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order[data-view="overview"] .sf-doctrine-talent{
    grid-template-rows:auto auto;min-height:0
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order[data-view="talent"] .sf-doctrine__rites{
    grid-template-columns:1fr
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header strong{font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>p{display:-webkit-box;font-size:9px;-webkit-line-clamp:1}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order[data-view="overview"] .sf-doctrine-talent>p{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>.sf-doctrine-talent__meta-row{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions{
    display:flex;gap:2px;width:100%;margin-top:.2rem
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions button{
    flex:1;min-width:0;min-height:44px;padding:.2rem 2px;font-size:8px
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow{
    display:flex;align-items:center;gap:.4rem;min-height:3.6rem;max-height:4.2rem;margin-top:.15rem;padding:.25rem .35rem
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-media{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;gap:.4rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header{min-width:0;flex:0 0 auto}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header strong{font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header>b{font-size:7px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>p{font-size:9px;line-height:1.2;margin:0;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;flex:1;min-width:0}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-action{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin:0;padding:0}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-action>small{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-action>span{display:flex;gap:.25rem}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-action button{min-width:4.8rem;min-height:44px;padding:.2rem;font-size:9px}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order[data-view="overview"] .sf-doctrine__vow-body>p{display:none}
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order[data-view="overview"] .sf-doctrine__vow{margin-top:.03rem}
}

/* ======================================================================
   SAINTFALL - new-operation field orientation

   A narrow hardline instrument rather than a modal web card. The overlay
   observes real controls while leaving the battlefield and touch layer live;
   only its Skip/Close action accepts pointer input.
   ====================================================================== */
#sf-tutorial{
  position:absolute;inset:0;z-index:58;overflow:hidden;pointer-events:none
}
#sf-tutorial[hidden]{display:none!important}
.sf-tutorial{
  position:absolute;right:max(.85rem,calc(env(safe-area-inset-right) + .55rem));
  top:max(9.8rem,calc(env(safe-area-inset-top) + 9.35rem));
  display:grid;gap:.62rem;width:min(21rem,34cqw);min-width:18rem;padding:.82rem .9rem .72rem;
  border:1px solid rgba(115,216,237,.42);border-left:3px solid #d8a441;border-radius:0;
  background:linear-gradient(112deg,rgba(115,216,237,.055),transparent 42%),rgba(3,8,11,.93);
  box-shadow:inset 0 0 0 1px rgba(216,164,65,.06),0 1.1rem 3.2rem rgba(0,0,0,.48);
  color:#eff5f1;font-family:"Share Tech Mono",ui-monospace,monospace;
  opacity:0;transform:translateX(.75rem);transition:opacity .22s ease,transform .22s ease
}
#sf-tutorial.is-active .sf-tutorial{opacity:1;transform:none}
.sf-tutorial:before,.sf-tutorial:after{
  content:"";position:absolute;right:0;width:2.8rem;height:1px;background:#73d8ed;opacity:.6
}
.sf-tutorial:before{top:0}.sf-tutorial:after{bottom:0;width:1.35rem;background:#d8a441}
.sf-tutorial__head{display:flex;align-items:start;justify-content:space-between;gap:.8rem;padding-bottom:.5rem;border-bottom:1px solid rgba(115,216,237,.2)}
.sf-tutorial__head>span{display:grid;gap:.14rem;min-width:0}
.sf-tutorial__head small{color:rgba(115,216,237,.78);font-size:8px;font-weight:700;letter-spacing:.19em}
.sf-tutorial__head strong{overflow:visible;color:#f4ead2;font:600 16px/1.15 "Cinzel",Georgia,serif;letter-spacing:.08em;text-overflow:clip;white-space:normal}
.sf-tutorial__head>b{flex:0 0 auto;padding:.2rem .32rem;border:1px solid rgba(216,164,65,.3);color:#e9bf69;font-size:9px;font-weight:700;letter-spacing:.1em;white-space:nowrap}
.sf-tutorial>p{margin:0;color:rgba(224,236,232,.7);font:11px/1.48 system-ui,sans-serif;letter-spacing:.02em}
.sf-tutorial__controls{display:flex;flex-wrap:wrap;gap:.32rem}
.sf-tutorial__controls kbd{
  min-height:1.75rem;padding:.38rem .5rem;border:1px solid rgba(115,216,237,.34);border-radius:0;
  background:rgba(5,17,22,.8);box-shadow:inset 0 -2px 0 rgba(115,216,237,.12);
  color:#dff7fb;font:700 9px/1 "Share Tech Mono",ui-monospace,monospace;letter-spacing:.1em;white-space:nowrap
}
.sf-tutorial__checks{display:flex;flex-wrap:wrap;gap:.28rem .38rem;margin:0;padding:0;list-style:none}
.sf-tutorial__checks li{display:flex;align-items:center;gap:.25rem;color:rgba(218,232,230,.46);font-size:8px;font-weight:700;letter-spacing:.1em;transition:color .14s ease}
.sf-tutorial__checks i{display:grid;place-items:center;width:1rem;height:1rem;border:1px solid rgba(115,216,237,.22);color:rgba(115,216,237,.5);font-style:normal}
.sf-tutorial__checks li[data-done="true"]{color:#f0d083}
.sf-tutorial__checks li[data-done="true"] i{border-color:rgba(216,164,65,.68);background:rgba(216,164,65,.12);color:#f0d083}
.sf-tutorial>footer{display:flex;align-items:center;justify-content:space-between;gap:.65rem;padding-top:.5rem;border-top:1px solid rgba(216,164,65,.16)}
.sf-tutorial>footer>span{color:rgba(115,216,237,.58);font-size:8px;letter-spacing:.1em;text-transform:uppercase}
.sf-tutorial>footer>button{
  flex:0 0 auto;min-height:44px;padding:.55rem .68rem;border:1px solid rgba(216,164,65,.38);border-radius:0;
  background:rgba(26,18,13,.78);color:#efd18d;font:700 9px/1 "Share Tech Mono",ui-monospace,monospace;
  letter-spacing:.1em;pointer-events:auto;cursor:pointer;transition:border-color .14s,background .14s,color .14s
}
.sf-tutorial>footer>button:is(:hover,:focus-visible){border-color:#f0d083;background:rgba(72,47,24,.88);color:#fff1ca;outline:2px solid rgba(115,216,237,.34);outline-offset:2px}
#sf-tutorial.is-complete .sf-tutorial{border-left-color:#73d8ed}
#sf-tutorial.is-leaving .sf-tutorial{opacity:0;transform:translateX(.75rem)}

body.sf-high-contrast .sf-tutorial{border-color:#c3f6ff;border-left-color:#ffe199;background:#000;box-shadow:inset 0 0 0 1px #000}
body.sf-high-contrast .sf-tutorial>p,
body.sf-high-contrast .sf-tutorial>footer>span{color:#fff}
body.sf-high-contrast .sf-tutorial__controls kbd{border-color:#c3f6ff;background:#031116;color:#fff}

@container saintfall-playfield (max-width:760px){
  .sf-tutorial{width:min(19rem,48cqw);min-width:16.5rem;top:max(8.4rem,calc(env(safe-area-inset-top) + 8rem))}
}
@media (hover:none) and (pointer:coarse), (max-width:560px){
  .sf-tutorial{
    left:max(.6rem,calc(env(safe-area-inset-left) + .35rem));
    right:max(.6rem,calc(env(safe-area-inset-right) + .35rem));
    top:max(3.55rem,calc(env(safe-area-inset-top) + 3.15rem));
    width:auto;min-width:0;padding:.68rem .72rem .62rem;gap:.48rem
  }
  .sf-tutorial__head{padding-bottom:.38rem}.sf-tutorial__head strong{font-size:14px}
  .sf-tutorial>p{font-size:10px;line-height:1.36}
  .sf-tutorial__controls{gap:.24rem}.sf-tutorial__controls kbd{min-height:1.55rem;padding:.3rem .4rem;font-size:8px}
  .sf-tutorial>footer{padding-top:.38rem}.sf-tutorial>footer>button{min-width:7.25rem}
}
@media (orientation:landscape) and (max-height:500px){
  .sf-tutorial{
    left:auto;right:max(.55rem,calc(env(safe-area-inset-right) + .3rem));
    top:max(.45rem,calc(env(safe-area-inset-top) + .25rem));
    width:min(19rem,42vw);padding:.55rem .62rem .5rem;gap:.34rem
  }
  .sf-tutorial__head{padding-bottom:.28rem}.sf-tutorial__head strong{font-size:13px}
  .sf-tutorial>p{font-size:9px;line-height:1.28}
  .sf-tutorial__controls kbd{min-height:1.35rem;padding:.24rem .32rem;font-size:7px}
  .sf-tutorial__checks{gap:.18rem .3rem}.sf-tutorial__checks li{font-size:7px}.sf-tutorial__checks i{width:.82rem;height:.82rem}
  .sf-tutorial>footer{padding-top:.25rem}.sf-tutorial>footer>span{font-size:7px}.sf-tutorial>footer>button{min-height:44px;padding:.42rem .52rem;font-size:8px}
}
@media (prefers-reduced-motion:reduce){
  .sf-tutorial,.sf-tutorial__checks li{transition:none!important}
}

/* ======================================================================
   SAINTFALL - Doctrine board

   The capstone Vow used to be a full-width band published below a
   workspace pinned at min-height:13.5rem. The order panel's middle track
   is minmax(0,1fr), so as soon as the playfield got short that track
   collapsed while the workspace kept painting its 13.5rem - and the Vow,
   later in the DOM, painted straight over the rites.

   The board now has one rule: every doctrine node lives in a track that
   can shrink to zero, and the Vow is the crown row of the same column as
   the rites rather than a slab of its own. Nothing carries a min-height
   larger than the track it sits in, so no node can overlap another at any
   playfield size. Acting on a node happens in one place - the inspector.
   ====================================================================== */

.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"],
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="capstone"]{
  display:grid;grid-template-rows:auto minmax(0,1fr);gap:.45rem;
  min-height:0;overflow:hidden;scrollbar-gutter:auto
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order{
  width:100%;min-width:0;justify-items:stretch
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__workspace{
  display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);
  gap:.5rem;width:100%;min-width:0;max-width:100%;min-height:0;overflow:hidden;
  justify-items:stretch
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__tree,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{
  min-width:0;width:100%;max-width:100%;overflow:hidden;justify-self:stretch
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{
  contain:inline-size
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__tree{
  display:grid;grid-template-rows:minmax(0,1fr) auto;align-content:stretch;gap:.32rem;
  min-width:0;min-height:0;height:100%
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__crown{min-width:0;min-height:0}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__rites{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:none;grid-auto-rows:minmax(0,1fr);align-content:stretch;
  gap:.32rem;min-width:0;min-height:0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-tier="2"],
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-tier="3"]{
  grid-column:1/-1;
  grid-template-columns:auto minmax(0,1fr) auto;
  grid-template-rows:auto;
  grid-template-areas:"media head badge";
  align-items:center;column-gap:.5rem;row-gap:0;padding:.3rem .42rem
}

/* --- rite card: art, name, gate, rank pips. Detail lives in the inspector. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent{
  display:grid;grid-template-columns:auto minmax(0,1fr);
  /* Blurb lives in the inspector. Cards stay name + rank + gate. */
  grid-template-rows:auto auto;
  grid-template-areas:"media head" "media badge";
  align-content:center;column-gap:.45rem;row-gap:.1rem;
  min-width:0;min-height:0;padding:.32rem .4rem;overflow:hidden;
  border:1px solid rgba(115,216,237,.13);border-left:3px solid rgba(115,216,237,.2);
  background:rgba(4,10,14,.66);
  transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-state="available"]{
  border-left-color:var(--sf-order-accent,var(--sfu-cyan))
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-state="owned"],
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-state="maxed"]{
  border-left-color:var(--sfu-verd);background:rgba(6,16,16,.72)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-gate-open="false"]{
  border-left-style:dashed;filter:saturate(.55)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent[data-previewed="true"]{
  border-color:var(--sf-order-accent,var(--sfu-cyan));
  border-left-color:var(--sf-order-accent,var(--sfu-cyan));filter:none;
  background:linear-gradient(120deg,rgba(115,216,237,.1),rgba(4,10,14,.92));
  box-shadow:inset 3px 0 0 var(--sf-order-accent,var(--sfu-cyan)),
    0 0 0 1px color-mix(in srgb,var(--sf-order-accent) 30%,transparent)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__media{
  grid-area:media;position:relative;align-self:center;
  width:var(--sf-rite-art,3.35rem);height:var(--sf-rite-art,3.35rem);
  flex:none;border:1px solid rgba(115,216,237,.2);background:#020508;overflow:hidden
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__tier{
  position:absolute;left:0;bottom:0;padding:.05rem .2rem;
  border-top:1px solid rgba(115,216,237,.28);border-right:1px solid rgba(115,216,237,.28);
  background:rgba(2,6,10,.9);color:var(--sf-order-accent,var(--sfu-cyan));
  font:700 7.5px/1 "Share Tech Mono",ui-monospace,monospace;letter-spacing:.08em
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>header{
  grid-area:head;align-items:center;gap:.4rem;min-width:0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>header>span{min-width:0}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>header small{
  display:block;color:color-mix(in srgb,var(--sf-order-accent) 78%,#e1ecec);
  font-size:7.5px;letter-spacing:.11em;white-space:nowrap
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>header strong{
  display:block;overflow:hidden;font-size:11.5px;line-height:1.2;
  text-overflow:ellipsis;white-space:nowrap;-webkit-line-clamp:1
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>p{display:none}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__meta-row{
  grid-area:badge;display:flex;align-items:center;margin:.05rem 0 0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent__badge{
  padding:.06rem .28rem;font-size:7.5px;letter-spacing:.09em
}

/* --- crown: the Vow reads as the last rung of the ladder, not a banner. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow{
  display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;
  gap:.55rem;min-width:0;min-height:0;padding:.45rem .55rem;overflow:hidden;
  border:1px solid rgba(240,213,140,.2);border-left:3px solid rgba(240,213,140,.45);
  background:linear-gradient(100deg,rgba(240,213,140,.05),transparent 60%),rgba(6,10,10,.74);
  transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow[data-state="eligible"]{
  border-left-color:var(--sfu-gold);
  box-shadow:inset 0 0 1.6rem rgba(240,213,140,.07)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow[data-state="equipped"]{
  border-color:rgba(117,221,180,.34);border-left-color:var(--sfu-verd)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow[data-previewed="true"]{
  border-color:var(--sfu-gold);
  background:linear-gradient(100deg,rgba(240,213,140,.11),rgba(4,10,14,.92));
  box-shadow:inset 3px 0 0 var(--sfu-gold),0 0 0 1px rgba(240,213,140,.28)
}
/* Height-bound, not centred at a fixed size: a 4.2rem watermark on a
   shorter strip stuck out of both ends of the card box. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow>.sf-doctrine__sigil--capstone{
  top:0;bottom:0;right:1.2rem;width:auto;height:100%;transform:none;opacity:.13
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-media{
  position:relative;width:var(--sf-rite-art,3.35rem);height:var(--sf-rite-art,3.35rem);
  flex:none;border:1px solid rgba(240,213,140,.36);background:#020508;overflow:hidden
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body{
  display:grid;grid-template-columns:minmax(0,1fr);gap:.16rem;min-width:0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header{
  display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header>span{min-width:0}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header small{
  display:block;color:rgba(240,213,140,.72);font-size:7.5px;letter-spacing:.13em;white-space:nowrap
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header strong{
  display:block;overflow:hidden;color:#f6f0dd;font-size:12px;line-height:1.2;
  text-overflow:ellipsis;white-space:nowrap
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header>b{
  flex:none;padding:.08rem .3rem;border:1px solid rgba(240,213,140,.28);
  color:rgba(240,213,140,.9);font-size:7.5px;font-weight:600;letter-spacing:.09em;white-space:nowrap
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>header>b[data-state="equipped"]{
  border-color:rgba(117,221,180,.44);color:var(--sfu-verd)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>p{display:none}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order-head{
  min-height:0;margin-bottom:.2rem;padding:.05rem .1rem .28rem
}
#sf-native-ui .sf-doctrine__vow-gate{
  display:block;height:3px;margin-top:.1rem;background:rgba(240,213,140,.13);overflow:hidden
}
#sf-native-ui .sf-doctrine__vow-gate em{
  display:block;height:100%;background:var(--sfu-gold);
  box-shadow:0 0 .35rem rgba(240,213,140,.5);transition:width .22s ease
}
#sf-native-ui .sf-doctrine__vow[data-state="equipped"] .sf-doctrine__vow-gate em{background:var(--sfu-verd)}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-detail,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__fusions,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-action{display:none}

/* --- the one surface that acts: art, state, ranks, primary control. */
/* Flex, not grid rows: the meta band drops out on short playfields and a
   fixed row template would hand its 1fr to whatever child came next. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{
  display:flex;flex-direction:column;justify-content:flex-start;
  gap:.4rem;min-width:0;min-height:0;padding:.6rem;overflow:hidden
}
/* Every band keeps its natural height and the rank ladder takes only what
   is left (flex-basis 0), so a long ladder can never crush the artwork or
   push the action foot out of the panel. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui :is(
  .sf-doctrine__preview-head,.sf-doctrine__preview-summary,
  .sf-doctrine__preview-meta,.sf-doctrine__preview-foot
){flex:0 0 auto}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-head{
  padding-bottom:.4rem;gap:.5rem
}
/* The requirement pair rides as one chip line so the rank ladder - the only
   part the player is actually reading - keeps the panel's free space. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-meta{
  display:flex;gap:.7rem;padding:.22rem 0;border-block-width:1px
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-meta>span{
  display:flex;align-items:baseline;gap:.32rem;padding:0;border-right:0;min-width:0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-meta strong{font-size:10.5px}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-summary{
  display:-webkit-box;overflow:hidden;min-height:0;font-size:10.5px;line-height:1.35;
  -webkit-box-orient:vertical;-webkit-line-clamp:3
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks{
  flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:rgba(115,216,237,.4) transparent;
  mask-image:linear-gradient(180deg,#000 calc(100% - 1.1rem),transparent)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks li{
  gap:.4rem;padding:.26rem 0
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks li:last-child{border-bottom:0}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks strong{
  display:-webkit-box;overflow:hidden;font-size:10px;line-height:1.32;
  -webkit-box-orient:vertical;-webkit-line-clamp:8
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot{margin-top:0}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot button{min-height:36px}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui
  .sf-doctrine__preview-foot button[data-doctrine-action="vow"]{
  border-color:rgba(240,213,140,.42);color:var(--sfu-gold)
}

/* --- summary strip carries revision chrome on the right so the board can
   use the full remaining height for rites and inspector copy. */
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__summary{
  position:relative;z-index:5;overflow:visible;
  grid-template-columns:3.4rem minmax(6rem,1fr) 4.4rem minmax(8rem,.7fr) auto;
  gap:.35rem;margin-bottom:.4rem
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__summary>div,
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__summary>.sf-doctrine__footer{
  min-height:0;padding:.26rem .4rem
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__rank strong{font-size:1.05rem}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__points strong{font-size:.95rem}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__points>span{font-size:7px}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__points[data-ready="true"] strong{
  color:var(--sfu-verd);text-shadow:0 0 .5rem rgba(117,221,180,.45)
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__xp{gap:.24rem}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-slots{
  gap:.28rem;padding:.26rem!important
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-slots>span{padding:.2rem .32rem}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__footer{
  position:relative;display:flex;align-items:center;justify-content:flex-end;gap:.45rem;
  min-height:0;margin:0;padding:.18rem .15rem .18rem .35rem;border:0;overflow:visible
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__footer button{
  flex:none;min-width:8rem;min-height:1.95rem;padding:.25rem .5rem;font-size:8.5px
}
.sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__respec-warn{
  font-size:10.5px;line-height:1.4
}

/* The playfield container is inline-size, so these steps read width; the
   surface is a 16:9 box, so narrower is always shorter. Short playfields
   trade the rite blurb and art scale, never the layout - the tracks shrink
   together so the crown can still never reach the grid. */
@container saintfall-playfield (max-width:1180px){
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent{--sf-rite-art:2.9rem;padding:.38rem .45rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow{padding:.38rem .45rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-media{--sf-rite-art:2.9rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{padding:.5rem;gap:.32rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-art-wrap{flex:0 0 2.6rem;width:2.6rem;height:2.6rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-titles h5{font-size:12.5px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order-head{min-height:0;padding-bottom:.32rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order-head h4{font-size:.86rem}
}
@container saintfall-playfield (max-width:960px){
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent{--sf-rite-art:2.4rem;row-gap:.08rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent>p{display:none}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-media{--sf-rite-art:2.4rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow-body>p{display:none}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order-head p{display:none}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{gap:.28rem;padding:.45rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-head{padding-bottom:.3rem;gap:.4rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-art-wrap{flex:0 0 2.2rem;width:2.2rem;height:2.2rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-titles h5{font-size:11.5px}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-summary{font-size:10px;-webkit-line-clamp:1}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-meta{display:none}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks{min-height:0}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-ranks strong{-webkit-line-clamp:5}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot{gap:.22rem;padding-top:.3rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview-foot button{min-height:32px}
}
/* Below this the panel cannot hold a readable board; give the menu one
   deliberate scroll owner instead of clipping or stacking nodes. */
@container saintfall-playfield (max-width:760px){
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu[data-panel="doctrine"] .sf-menu__content{
    overflow:auto;overscroll-behavior:contain
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-menu__page--doctrine{
    height:auto;min-height:100%;overflow:visible
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__body{
    grid-template-rows:42px auto;min-height:0
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order,
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="talent"],
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__order[data-view="capstone"]{
    grid-template-rows:auto auto;overflow:visible
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__workspace{
    grid-template-columns:minmax(0,1fr);overflow:visible
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__tree{grid-template-rows:auto auto}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__rites{
    grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:auto
  }
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine-talent{min-height:2.9rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__vow{min-height:2.9rem}
  .sf-stage:not(.sf-touch-enabled) #sf-native-ui .sf-doctrine__preview{min-height:11rem}
}

/* Touch keeps its own single-column flow; the tree wrapper is transparent. */
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__tree,
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__crown{
  display:block;min-height:0
}

body.sf-high-contrast .sf-doctrine__vow-gate{background:#000}
body.sf-high-contrast .sf-doctrine__vow-gate em{background:#ffe199}
body.sf-reduced-motion #sf-native-ui .sf-doctrine__vow-gate em,
body.sf-reduced-motion #sf-native-ui .sf-doctrine-talent,
body.sf-reduced-motion #sf-native-ui .sf-doctrine__vow{transition:none!important}

/* ----------------------- hardline gameplay HUD ----------------------- */
.sf-fs-btn,
#sf-hud :is(
  .sf-hud__minimap,.sf-minimap__head b,.sf-minimap__expand kbd,
  .sf-hud__objective,.sf-objective__head kbd,.sf-hud__vitals,.sf-hud__charge,
  .sf-hud__hpwrap,.sf-hud__hp,.sf-hud__jettrack,.sf-hud__jettrack i,
  .sf-hud__command,.sf-hud__command-head kbd,.sf-hud__stratitem,
  .sf-hud__stratstatus,.sf-hud__hint,.sf-hud__hint kbd
),
.sf-stage.sf-touch-enabled :is(.sf-menu-trigger--mobile,.sf-touch__button,.sf-touch__actions .sf-touch__button){
  border-radius:0!important
}

.sf-fs-btn{
  border-color:rgba(115,216,237,.28);background:rgba(3,9,13,.7);color:rgba(115,216,237,.86);
  box-shadow:inset 0 -2px 0 rgba(115,216,237,.22),0 .35rem 1.2rem rgba(0,0,0,.22)
}
.sf-fs-btn:hover{border-color:rgba(115,216,237,.68);background:rgba(8,21,27,.88)}

#sf-hud .sf-hud__compass{width:min(18rem,29cqw);height:1.5rem}
#sf-hud .sf-hud__tick{color:rgba(219,239,241,.78);font-size:10px;text-shadow:0 1px 5px #000}
#sf-hud .sf-hud__needle{
  width:2px;background:linear-gradient(180deg,#e8fbff 0 20%,#73d8ed 21% 72%,transparent 100%);
  box-shadow:0 0 .45rem rgba(115,216,237,.45)
}

#sf-hud .sf-hud__objective{
  width:min(23rem,35cqw);padding:0;border:0;background:transparent;
  box-shadow:none;backdrop-filter:none
}
#sf-hud .sf-objective__head{margin-bottom:.18rem;color:rgba(115,216,237,.82);font-size:9px}
#sf-hud .sf-objective__head small{color:rgba(219,239,241,.52);font-size:8px}
#sf-hud .sf-objective__item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.7rem}
#sf-hud .sf-objective__copy small{display:none}
#sf-hud .sf-objective__copy strong{
  display:-webkit-box;overflow:hidden;color:#f0f5f3;font:600 13px/1.25 "Share Tech Mono",ui-monospace,monospace;
  letter-spacing:.025em;white-space:normal;text-overflow:clip;-webkit-box-orient:vertical;-webkit-line-clamp:2
}
#sf-hud .sf-objective__item>b{color:#dff7fb;font-size:12px;font-variant-numeric:tabular-nums}
#sf-hud .sf-hud__objective[data-event="1"]{border:0;background:transparent;box-shadow:none}

#sf-hud .sf-hud__minimap{
  border-color:rgba(115,216,237,.5);background:rgba(3,9,13,.12);
  box-shadow:inset 0 0 0 1px rgba(3,9,13,.3),0 0 1.1rem rgba(0,0,0,.12)
}
#sf-hud .sf-minimap__head b{background:rgba(3,9,13,.82);color:rgba(194,239,247,.82)}
#sf-hud #sf-map-canvas{filter:drop-shadow(0 0 .45rem rgba(115,216,237,.12))}

#sf-hud .sf-hud__vitals,
#sf-hud .sf-hud__charge{
  width:min(15rem,24cqw);padding:0;border:0;background:transparent;
  box-shadow:none;backdrop-filter:none
}
#sf-hud .sf-hud__vitals{
  left:auto;right:calc(50% + .75rem);border:0
}
#sf-hud .sf-hud__charge{
  left:calc(50% + .75rem);right:auto;border:0
}
#sf-hud .sf-hud__hplabel,
#sf-hud .sf-hud__jetlabel{
  display:none!important;margin:0;
  font:700 20px/1 "Share Tech Mono",ui-monospace,monospace;letter-spacing:.02em;text-shadow:0 1px 4px #000
}
#sf-hud .sf-hud__hplabel{justify-content:flex-start}
#sf-hud .sf-hud__jetlabel{justify-content:flex-end}
#sf-hud .sf-hud__hplabel>span,
#sf-hud .sf-hud__jetlabel>span{display:none}
#sf-hud .sf-hud__hplabel b,
#sf-hud .sf-hud__jetlabel b{font-size:20px;font-variant-numeric:tabular-nums}
#sf-hud .sf-hud__jetlabel b{color:#ffe2aa;text-shadow:0 1px 4px #000,0 0 12px rgba(255,174,72,.45)}
#sf-hud .sf-hud__jet{margin-top:0}
#sf-hud .sf-hud__hpwrap,
#sf-hud .sf-hud__jettrack{
  height:8px;border-color:rgba(216,164,65,.38);background:rgba(7,5,6,.65);
  box-shadow:0 2px 6px rgba(0,0,0,.4)
}
#sf-hud .sf-hud__hp{background:linear-gradient(90deg,#3c8a65,#75ddb4);box-shadow:0 0 7px rgba(117,221,180,.34)}
#sf-hud .sf-hud__jettrack i{
  transform-origin:right center;background:linear-gradient(90deg,#9c4b22,#ffae48 60%,#ffe8b5);
  box-shadow:0 0 8px rgba(255,174,72,.5)
}
#sf-hud .sf-hud__vitalrow{
  position:absolute;left:0;right:0;top:calc(100% + .25rem);height:.8rem;min-height:0;margin:0;
  color:rgba(219,239,241,.68);font-size:9px;pointer-events:none
}
/* Weapon heat sits directly above the three call sigils. The pair of equal
   half-paths fills outward from the centre, preserving a deliberate
   symmetrical silhouette without creating another HUD panel. */
#sf-hud .sf-hud__heat.sf-heat{
  position:absolute;z-index:5;left:50%;bottom:calc(max(4.25rem,calc(env(safe-area-inset-bottom) + 4.05rem)) + 2.55rem);
  display:block;width:clamp(4.7rem,8cqw,6.25rem);height:1.8rem;
  margin:0;transform:translateX(-50%);pointer-events:none;overflow:visible;
  opacity:.3;filter:none;transition:opacity .18s ease,filter .18s ease
}
#sf-hud .sf-heat__crescent{display:block;width:100%;height:100%;overflow:visible}
#sf-hud .sf-heat__track,
#sf-hud .sf-heat__fill{
  fill:none;stroke-linecap:round;stroke-linejoin:round
}
#sf-hud .sf-heat__track{
  stroke:rgba(239,224,185,.18);stroke-width:2.4
}
#sf-hud .sf-heat__fill{
  stroke:#d8a441;stroke-width:3.2;stroke-dasharray:0 100;
  filter:drop-shadow(0 0 2.5px rgba(216,164,65,.46));
  transition:stroke-dasharray .08s linear,stroke .18s ease,filter .18s ease
}
#sf-hud .sf-heat__core{
  fill:#e8c66e;opacity:.42;filter:drop-shadow(0 0 2px rgba(216,164,65,.5))
}
#sf-hud .sf-hud__heat[data-state="heating"]{opacity:.58}
#sf-hud .sf-hud__heat[data-state="warm"]{opacity:.78}
#sf-hud .sf-hud__heat[data-state="hot"]{opacity:.94}
#sf-hud .sf-hud__heat[data-state="hot"] .sf-heat__fill{
  stroke:#f09a3d;filter:drop-shadow(0 0 3.5px rgba(240,112,45,.62))
}
#sf-hud .sf-hud__heat.is-over{
  opacity:1;animation:sf-heat-crescent-alarm .72s ease-in-out infinite
}
#sf-hud .sf-hud__heat.is-over .sf-heat__fill{
  stroke:#ff683d;filter:drop-shadow(0 0 4.5px rgba(255,75,42,.8))
}
#sf-hud .sf-hud__heat.is-venting{opacity:.88}
#sf-hud .sf-hud__heat.is-venting .sf-heat__fill{
  stroke:#65d8c1;filter:drop-shadow(0 0 3.5px rgba(79,216,189,.65));
  animation:sf-heat-crescent-vent .64s ease-in-out infinite alternate
}
#sf-hud .sf-hud__heat u{
  position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;
  padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important
}
@keyframes sf-heat-crescent-alarm{
  0%,100%{filter:brightness(1)}50%{filter:brightness(1.22)}
}
@keyframes sf-heat-crescent-vent{
  from{opacity:.58}to{opacity:1}
}

#sf-hud .sf-hud__command{
  left:50%;right:auto;bottom:max(4.25rem,calc(env(safe-area-inset-bottom) + 4.05rem));
  width:max-content;max-width:90cqw;padding:0;transform:translateX(-50%);
  flex-direction:row;align-items:center;justify-content:center;gap:.38rem;
  border:0;background:transparent;box-shadow:none;backdrop-filter:none;pointer-events:none
}
#sf-hud .sf-hud__command-head{display:none!important}
#sf-hud .sf-hud__strat{flex-direction:row;align-items:center;gap:.38rem}
#sf-hud .sf-hud__stratitem{
  position:relative;grid-template-columns:1fr;grid-template-rows:1fr;place-items:center;
  width:2.3rem;min-width:2.3rem;height:2.3rem;min-height:2.3rem;padding:0;
  overflow:visible;border:0;background:transparent;box-shadow:none
}
#sf-hud .sf-hud__stratglyph{
  display:flex;width:100%;height:100%;align-items:center;justify-content:center;
  border:0;background:transparent;box-shadow:none;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.95))
}
#sf-hud .sf-hud__stratitem[data-ready="1"] .sf-hud__stratglyph{border:0;box-shadow:none}
#sf-hud .sf-hud__stratglyph svg{width:1.45rem;height:1.45rem}
#sf-hud .sf-hud__stratcopy,
#sf-hud .sf-hud__stratstatus{display:none!important}
#sf-hud .sf-hud__stratitem:not([data-ready="1"]) .sf-hud__stratglyph{opacity:.28}
#sf-hud .sf-hud__stratfill{
  position:absolute;left:10%;bottom:-.12rem;display:block;height:2px;
  border:0;background:var(--sf-command-colour,#d8a441);
  box-shadow:0 0 5px color-mix(in srgb,var(--sf-command-colour,#d8a441) 62%,transparent);
  opacity:.9;transition:width .1s linear
}
#sf-hud .sf-hud__stratitem[data-ready="1"] .sf-hud__stratfill{opacity:0}
#sf-hud .sf-hud__hint{display:none!important}

.sf-stage.sf-touch-enabled .sf-menu-trigger--mobile{
  border-color:rgba(115,216,237,.36);background:rgba(3,9,13,.76);color:var(--sfu-cyan);
  box-shadow:inset 0 -2px 0 rgba(115,216,237,.28),0 .4rem 1.1rem rgba(0,0,0,.24)
}
.sf-stage.sf-touch-enabled #sf-hud .sf-hud__heat.sf-heat{width:4.55rem;height:1.7rem}
.sf-stage.sf-touch-enabled .sf-menu-trigger--mobile span{color:rgba(194,239,247,.78)}
.sf-stage.sf-touch-enabled :is(.sf-touch__button,.sf-touch__actions .sf-touch__button){
  border-color:rgba(115,216,237,.26);background:rgba(3,9,13,.62);
  box-shadow:inset 0 -2px 0 rgba(115,216,237,.12),0 .3rem .9rem rgba(0,0,0,.18)
}
.sf-stage.sf-touch-enabled .sf-touch__button--fire{
  border-color:rgba(255,107,69,.56)!important;background:rgba(68,17,18,.7)!important;
  box-shadow:inset 0 -2px 0 rgba(255,107,69,.28)!important
}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__vitals,.sf-hud__charge){padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__hplabel,.sf-hud__jetlabel)>span{display:none}
.sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__hplabel,.sf-hud__jetlabel) b{font-size:13px}

@container saintfall-playfield (max-width:1180px){
  .sf-stage:not(.sf-touch-enabled) #sf-hud .sf-hud__objective{width:min(14.25rem,25.5cqw)}
  #sf-hud .sf-hud__minimap{width:5rem}
  #sf-hud .sf-hud__vitals,#sf-hud .sf-hud__charge{width:min(15rem,24cqw)}
  #sf-hud .sf-hud__stratitem{width:2.3rem;min-width:2.3rem}
}

@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{
    padding:0;border:0;background:transparent;box-shadow:none
  }
  .sf-stage.sf-touch-enabled #sf-hud .sf-objective__copy strong{font-size:12px;-webkit-line-clamp:2}
  .sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__vitals,.sf-hud__charge){width:min(9.2rem,42cqw)}
}

@media (orientation:landscape) and (max-height:500px){
  .sf-stage.sf-touch-enabled #sf-hud .sf-hud__objective{padding:0}
  .sf-stage.sf-touch-enabled #sf-hud :is(.sf-hud__vitals,.sf-hud__charge){width:min(11.5rem,25cqw);padding:0}
}

/* High contrast must remain authoritative after the hardline cascade. */
body.sf-high-contrast #sf-native-ui .sf-menu__veil{background:rgba(0,0,0,.96)}
body.sf-high-contrast #sf-native-ui .sf-menu__frame{
  border-color:#c3f6ff!important;border-left-color:#ffe39a!important;
  background:#010304!important;box-shadow:0 0 0 1px #000
}
body.sf-high-contrast #sf-native-ui :is(
  .sf-menu__masthead,.sf-menu__rail,.sf-menu__pagehead,.sf-menu__footer,
  .sf-operation-card,.sf-menu__callout,.sf-save-slot,.sf-controls-grid article,.sf-setting,
  .sf-doctrine__summary,.sf-doctrine__orders,.sf-doctrine__orders button,
  .sf-doctrine-talent,.sf-doctrine__preview,.sf-doctrine__vow
){border-color:rgba(195,246,255,.72);background-color:#010304}
body.sf-high-contrast #sf-native-ui :is(
  .sf-menu__masthead p,.sf-menu__pagehead p,.sf-operation-card>span,.sf-menu__callout p,
  .sf-save-slot__summary span,.sf-control-row small,.sf-bind-row small,.sf-bind-status,.sf-setting small,
  .sf-doctrine__order-head p,.sf-doctrine-talent>p,.sf-doctrine-talent__reason,
  .sf-doctrine__preview-summary,.sf-doctrine__preview-ranks strong,
  .sf-doctrine__preview-foot>small,.sf-doctrine__vow>p
){color:#fff}
body.sf-high-contrast #sf-native-ui :is(
  .sf-menu__masthead span,.sf-menu__pagehead>span,.sf-operation-card small,
  .sf-doctrine__summary small,.sf-doctrine__preview-head small,
  .sf-doctrine__preview-ranks small
){color:#bff5ff}
body.sf-high-contrast #sf-native-ui .sf-menu__rail button{color:#fff}
body.sf-high-contrast #sf-native-ui .sf-menu__rail button:is(:hover,.is-active,[aria-selected="true"],[aria-current="page"]){
  border-color:#c3f6ff;background:#07151a;color:#fff
}
body.sf-high-contrast #sf-hud :is(
  .sf-hud__objective,.sf-hud__minimap,.sf-hud__vitals,.sf-hud__charge,
  .sf-hud__command-head kbd,.sf-hud__stratitem,.sf-hud__hint
){border-color:#c3f6ff;background-color:rgba(0,0,0,.92)}
body.sf-high-contrast #sf-hud :is(
  .sf-objective__copy strong,.sf-hud__hplabel>span,.sf-hud__jetlabel>span,
  .sf-hud__vitalrow,.sf-hud__stratcopy b,.sf-hud__hint
){color:#fff}
body.sf-high-contrast #sf-hud .sf-hud__heat.sf-heat{opacity:1}
body.sf-high-contrast #sf-hud .sf-heat__track{stroke:rgba(255,255,255,.64)}
body.sf-high-contrast #sf-hud .sf-heat__fill{stroke:#ffe16a;filter:none}

@media (prefers-reduced-motion:reduce){
  #sf-hud .sf-hud__heat.is-over,
  #sf-hud .sf-hud__heat.is-venting .sf-heat__fill{animation:none}
}

/* Save feedback lives at the quiet lower edge: visible enough to prove the
   checkpoint happened, compact enough to stay out of the combat sightline. */
/* ------------------------------------------------------------
   THE DEATH SCREEN. Sits under the field menu (z 100) so ALL FIELD
   RECORDS opens the ordinary saves panel above it, and above the
   HUD and wheel. No backdrop blur on the world: the fallen trooper
   and the thing that did it stay visible behind the verdict.
   ------------------------------------------------------------ */
.sf-death{position:absolute;inset:0;z-index:60;display:grid;place-items:center;overflow:hidden;pointer-events:auto;opacity:0;transition:opacity .6s ease}
.sf-death.is-on{opacity:1}
.sf-death[hidden]{display:none!important}
.sf-death__veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(24,4,6,.55),rgba(5,3,4,.78) 62%,rgba(3,2,3,.9)),radial-gradient(circle at 50% 38%,rgba(138,34,48,.18),transparent 58%)}
.sf-death__frame{position:relative;display:grid;gap:.55rem;justify-items:center;width:min(30rem,calc(100% - 3rem));padding:1.6rem 1.8rem 1.7rem;border:1px solid rgba(216,164,65,.34);background:linear-gradient(135deg,rgba(138,34,48,.14),transparent 40%),rgba(8,6,7,.94);box-shadow:inset .3rem 0 0 rgba(138,34,48,.72),0 1.6rem 5rem rgba(0,0,0,.66);text-align:center}
.sf-death__frame>small{color:rgba(216,164,65,.68);font:600 10px/1 "Share Tech Mono",monospace;letter-spacing:.2em}
.sf-death__frame>h2{margin:.1rem 0 0;color:#f3e6c8;font:600 clamp(1.5rem,3vw,2.1rem)/1.05 "Cinzel",Georgia,serif;letter-spacing:.14em;text-shadow:0 2px 18px rgba(138,34,48,.5)}
.sf-death__copy{margin:.15rem 0 .5rem;color:rgba(242,229,199,.6);font-size:12px;letter-spacing:.08em;line-height:1.5}
.sf-death__actions{display:grid;gap:.55rem;width:100%}
.sf-death__actions button{display:grid;gap:.18rem;justify-items:center;padding:.72rem .9rem;border:1px solid rgba(216,164,65,.32);background:linear-gradient(105deg,rgba(216,164,65,.08),transparent 42%),rgba(12,8,9,.9);color:var(--sfu-bone);cursor:pointer;transition:border-color .16s,background .16s,transform .16s}
.sf-death__actions button:hover:not(:disabled){border-color:var(--sfu-gold);background:linear-gradient(105deg,rgba(138,34,48,.4),rgba(20,10,11,.94));transform:translateY(-1px)}
.sf-death__actions button:disabled{opacity:.42;cursor:not-allowed}
.sf-death__actions strong{font:700 12px/1 "Share Tech Mono",monospace;letter-spacing:.14em}
.sf-death__actions span{color:rgba(232,214,180,.55);font-size:10px;letter-spacing:.08em}
.sf-stage.sf-touch-enabled .sf-death__frame{width:min(26rem,calc(100% - 1.6rem));padding:1.1rem 1rem 1.2rem}

.sf-autosave-toast {
  position: absolute;
  right: max(1rem, calc(env(safe-area-inset-right) + .7rem));
  bottom: max(1rem, calc(env(safe-area-inset-bottom) + .7rem));
  z-index: 44;
  display: grid;
  grid-template-columns: .8rem auto;
  grid-template-rows: auto auto;
  column-gap: .58rem;
  min-width: 11.5rem;
  padding: .58rem .72rem .55rem;
  border: 1px solid rgba(225, 181, 91, .32);
  background: linear-gradient(100deg, rgba(10, 8, 8, .92), rgba(28, 19, 13, .84));
  box-shadow: inset 2px 0 0 #d8a441, 0 .65rem 1.8rem rgba(0,0,0,.42);
  color: #f3ddb2;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  pointer-events: none;
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity .28s ease, transform .28s ease;
}
.sf-autosave-toast[hidden] { display: none; }
.sf-autosave-toast.is-visible { opacity: 1; transform: none; }
.sf-autosave-toast i {
  grid-row: 1 / 3;
  align-self: center;
  width: .62rem;
  height: .62rem;
  border: 1px solid #f0c165;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 2px rgba(5,4,4,.9), 0 0 .65rem rgba(223,168,66,.44);
}
.sf-autosave-toast span { font-size: .62rem; letter-spacing: .16em; line-height: 1.2; }
.sf-autosave-toast small { color: rgba(232, 208, 165, .48); font-size: .43rem; letter-spacing: .11em; }
.sf-autosave-toast[data-state="deferred"] { border-color: rgba(235,99,62,.45); box-shadow: inset 2px 0 0 #ef633e, 0 .65rem 1.8rem rgba(0,0,0,.42); }
.sf-autosave-toast[data-state="deferred"] i { border-color: #ef8668; }
.sf-stage.sf-touch-enabled .sf-autosave-toast { right: max(.65rem, calc(env(safe-area-inset-right) + .45rem)); bottom: max(5.4rem, calc(env(safe-area-inset-bottom) + 5rem)); min-width: 10.5rem; }
body.sf-high-contrast .sf-autosave-toast { border-color: #ffe199; background: #000; box-shadow: inset 2px 0 0 #ffe199; }
@media (prefers-reduced-motion:reduce){.sf-autosave-toast{transition:none}}

/* High contrast must outrank the Doctrine board's own state colouring: the
   board selectors carry an id plus three classes, so the accessibility
   overrides have to be written at the same depth to win the cascade. */
body.sf-high-contrast .sf-stage:not(.sf-touch-enabled) #sf-native-ui :is(
  .sf-doctrine-talent,.sf-doctrine__vow,.sf-doctrine__preview,.sf-doctrine__summary>div
){border-color:rgba(195,246,255,.72);background-color:#010304}
body.sf-high-contrast .sf-stage:not(.sf-touch-enabled) #sf-native-ui :is(
  .sf-doctrine-talent>p,.sf-doctrine__vow-body>p,.sf-doctrine__preview-summary,
  .sf-doctrine__preview-ranks strong,.sf-doctrine__preview-foot>small,
  .sf-doctrine__respec-warn,.sf-doctrine-talent__reason
){color:#fff}
body.sf-high-contrast .sf-stage:not(.sf-touch-enabled) #sf-native-ui :is(
  .sf-doctrine-talent>header small,.sf-doctrine__vow-body>header small,
  .sf-doctrine__preview-titles small,.sf-doctrine__preview-ranks small
){color:#bff5ff}

/* ======================================================================
   SAINTFALL - Doctrine board on touch

   Landscape inherited `grid-template-areas:none` on the rite card while the
   children still asked for named areas, so placement fell back to auto and
   the name collapsed to a single letter under the action row. Areas are
   named explicitly here, and the crown's kicker/title sizes are set against
   `.sf-doctrine__vow-body > header` - the older `.sf-doctrine__vow > header`
   rules stopped matching when the body wrapper was introduced.
   ====================================================================== */

/* The landscape order panel is shrink-to-fit, so its width tracked the rite
   cards' max-content: legible names made the cards narrower and the whole
   board drifted into a centred column. Pin it to the track it sits in. */
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__order{width:100%}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent{
  grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;
  grid-template-areas:"head" "actions";
  align-content:stretch;gap:.22rem;min-height:0;padding:.32rem .36rem;overflow:hidden
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header{
  grid-area:head;display:flex;align-items:flex-start;gap:.3rem;min-width:0;min-height:0;overflow:hidden
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header>span{
  display:grid;align-content:start;gap:.04rem;flex:1 1 auto;min-width:0
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header small{
  display:block;overflow:hidden;color:color-mix(in srgb,var(--sf-order-accent) 78%,#e1ecec);
  font-size:7.5px;letter-spacing:.1em;text-overflow:ellipsis;white-space:nowrap
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header strong{
  display:-webkit-box;overflow:hidden;font-size:10px;line-height:1.15;
  -webkit-box-orient:vertical;-webkit-line-clamp:2
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent>header>b{flex:0 0 auto}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine-talent__actions{grid-area:actions}

.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header{
  display:flex;align-items:center;justify-content:space-between;gap:.4rem;min-width:0;flex:1 1 auto
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header>span{
  display:grid;align-content:center;gap:.04rem;min-width:0
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header small{
  display:block;overflow:hidden;color:rgba(240,213,140,.74);font-size:7.5px;
  letter-spacing:.11em;text-overflow:ellipsis;white-space:nowrap
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header strong{
  display:block;overflow:hidden;color:#f6f0dd;font-size:11px;line-height:1.2;
  text-overflow:ellipsis;white-space:nowrap
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-body>header>b{
  flex:0 0 auto;padding:.08rem .28rem;border:1px solid rgba(240,213,140,.3);
  color:rgba(240,213,140,.9);font-size:7.5px;letter-spacing:.08em;white-space:nowrap
}
.sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__vow-gate{margin-top:.18rem}

/* Portrait tabs justified their contents to the start, so a long Order name
   sized past its own column and printed over the next tab. Beside an 18px
   sigil there is no width that fits "Procession" legibly across five tabs
   at 390px, so the sigil stacks above and the name gets the full tab. */
@media (orientation:portrait) and (max-width:560px){
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button{
    grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;
    grid-template-areas:"sigil" "label" "points";
    align-content:center;justify-items:center;row-gap:.05rem;
    padding:.24rem .16rem;text-align:center;overflow:hidden
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__sigil--tab{
    grid-row:auto;grid-area:sigil;width:1.18rem;height:1.18rem
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button span{
    grid-area:label;width:100%;min-width:0;overflow:hidden;font-size:8.5px;
    letter-spacing:0;text-align:center;text-overflow:ellipsis;white-space:nowrap
  }
  .sf-stage.sf-touch-enabled #sf-native-ui .sf-doctrine__orders button small{
    grid-area:points;width:100%;min-width:0;overflow:hidden;font-size:7px;
    text-align:center;text-overflow:ellipsis;white-space:nowrap
  }
}

/* Full screen is the roomiest board: scale the rite cards and inspector
   proportionally across all 3 rite rows (T1 pair, T2, T3) and the crown Vow. */
@media (min-height:800px){
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__tree{
    grid-template-rows:minmax(0,1fr) auto;gap:.4rem;min-height:0;height:100%
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__rites{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(3,minmax(0,1fr));
    align-content:stretch;
    gap:.4rem;min-width:0;min-height:0;height:100%
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent{
    --sf-rite-art:clamp(2.4rem,4vh,3.8rem);
    padding:clamp(.3rem,.6vh,.55rem) clamp(.4rem,.7vw,.7rem);
    column-gap:clamp(.4rem,.7vw,.7rem);
    row-gap:.12rem;
    min-height:0;overflow:hidden
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent[data-tier="2"],
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent[data-tier="3"]{
    grid-column:1/-1;
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-rows:auto;
    grid-template-areas:"media head badge";
    align-items:center;
    column-gap:clamp(.4rem,.7vw,.7rem);
    row-gap:0;
    padding:clamp(.3rem,.6vh,.55rem) clamp(.4rem,.7vw,.7rem)
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent__tier{
    padding:.08rem .25rem;font-size:8.5px
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent>header small{font-size:8.5px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent>header strong{
    font-size:clamp(11.5px,1vw,14px);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent>header b i{width:8px;height:8px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent>p{display:none}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine-talent__badge{
    padding:.1rem .35rem;font-size:8.5px
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow{
    padding:clamp(.4rem,.7vh,.65rem) clamp(.45rem,.7vw,.75rem);
    gap:clamp(.45rem,.7vw,.75rem);
    min-height:0
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-media{
    --sf-rite-art:clamp(2.4rem,4vh,3.8rem)
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-body{gap:.22rem}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-body>header small{font-size:8.5px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-body>header strong{
    font-size:clamp(12px,1.05vw,14.5px);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-body>header>b{
    font-size:8.5px;padding:.12rem .35rem
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-body>p{display:none}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__vow-gate{height:4px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview{
    padding:clamp(.55rem,1vh,.9rem);gap:clamp(.3rem,.7vh,.5rem)
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-art-wrap{
    flex:0 0 clamp(3rem,4.5vh,4.2rem);width:clamp(3rem,4.5vh,4.2rem);height:clamp(3rem,4.5vh,4.2rem)
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-titles h5{font-size:clamp(14px,1.2vw,17px)}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-titles small{font-size:10px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-titles>b{font-size:9px;padding:.22rem .4rem}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-summary{
    font-size:11.5px;-webkit-line-clamp:2
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-meta small{font-size:9px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-meta strong{font-size:11.5px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-ranks li{padding:.32rem 0}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-ranks small{font-size:9px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-ranks strong{
    font-size:11px;line-height:1.38;-webkit-line-clamp:5
  }
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-foot>small{font-size:10.5px}
  .sf-stage:not(.sf-touch-enabled).is-maxed #sf-native-ui .sf-doctrine__preview-foot button{min-height:38px;font-size:11px}
}

/* ======================================================================
   SAINTFALL - completed campaign debrief
   ====================================================================== */

#sf-native-ui .sf-menu[data-phase="won"] .sf-operation-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
#sf-native-ui .sf-menu[data-phase="won"] .sf-operation-card--objective{grid-column:span 2}
#sf-native-ui .sf-menu[data-phase="won"] .sf-operation-card--breach{grid-column:span 2}
#sf-native-ui .sf-menu[data-phase="won"] .sf-menu__callout{display:none}
#sf-native-ui .sf-menu[data-phase="won"] [data-menu-page="operation"]{display:flex;flex-direction:column}
#sf-native-ui .sf-menu[data-phase="won"] [data-menu-page="operation"]>.sf-menu__pagehead{order:1}
#sf-native-ui .sf-menu[data-phase="won"] [data-menu-page="operation"]>.sf-campaign-debrief{order:2;margin-top:0;margin-bottom:.8rem}
#sf-native-ui .sf-menu[data-phase="won"] [data-menu-page="operation"]>.sf-operation-grid{order:3}
#sf-native-ui .sf-menu[data-phase="won"] [data-menu-page="operation"]>.sf-menu__callout{order:4}
#sf-native-ui .sf-campaign-debrief{
  position:relative;display:grid;align-self:center;box-sizing:border-box;width:min(100%,60rem);
  gap:.7rem;margin-top:.8rem;padding:.9rem;
  border:1px solid rgba(216,164,65,.5);border-left:3px solid #d8a441;
  background:linear-gradient(112deg,rgba(216,164,65,.12),transparent 42%),rgba(5,10,12,.88);
  box-shadow:inset 0 0 0 1px rgba(115,216,237,.08),0 16px 34px rgba(0,0,0,.24)
}
#sf-native-ui .sf-campaign-debrief[hidden]{display:none}
#sf-native-ui .sf-campaign-debrief__head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
#sf-native-ui .sf-campaign-debrief__head>span{display:grid;gap:.12rem;min-width:0}
#sf-native-ui .sf-campaign-debrief__head small,
#sf-native-ui .sf-campaign-debrief__score small,
#sf-native-ui .sf-campaign-debrief__factors small{
  color:rgba(115,216,237,.76);font-size:9px;letter-spacing:.16em
}
#sf-native-ui .sf-campaign-debrief__head h4{
  margin:0;color:#f6f0dd;font:600 16px/1.15 "Cinzel",Georgia,serif;letter-spacing:.07em
}
#sf-native-ui .sf-campaign-debrief__head>b{
  flex:0 0 auto;padding:.36rem .5rem;border:1px solid rgba(115,216,237,.45);
  color:#bff5ff;background:rgba(115,216,237,.08);font-size:9px;letter-spacing:.12em
}
#sf-native-ui .sf-campaign-debrief[data-new-high="true"] .sf-campaign-debrief__head>b{
  border-color:#f0d58c;color:#fff0b5;background:rgba(216,164,65,.15);
  box-shadow:inset 3px 0 0 #d8a441
}
#sf-native-ui .sf-campaign-debrief__score{
  display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:.55rem
}
#sf-native-ui .sf-campaign-debrief__score>span{
  display:grid;align-content:center;min-height:4.4rem;padding:.55rem .7rem;
  border:1px solid rgba(115,216,237,.18);background:rgba(1,5,7,.52)
}
#sf-native-ui .sf-campaign-debrief__score strong{
  color:#f0d58c;font:700 clamp(1.55rem,3vw,2.45rem)/1 "Cinzel",Georgia,serif;letter-spacing:.05em
}
#sf-native-ui .sf-campaign-debrief__score b{
  color:#f6f0dd;font:600 clamp(1rem,1.8vw,1.45rem)/1.1 "Cinzel",Georgia,serif;letter-spacing:.05em
}
#sf-native-ui .sf-campaign-debrief__factors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}
#sf-native-ui .sf-campaign-debrief__factors article{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .5rem;padding:.55rem .65rem;
  border-top:1px solid rgba(216,164,65,.34);background:rgba(216,164,65,.045)
}
#sf-native-ui .sf-campaign-debrief__factors small{grid-column:1/-1}
#sf-native-ui .sf-campaign-debrief__factors strong{overflow:hidden;color:#f6f0dd;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
#sf-native-ui .sf-campaign-debrief__factors span{color:#f0d58c;font:700 11px/1.2 monospace}
#sf-native-ui .sf-campaign-debrief>footer{display:flex;align-items:center;justify-content:space-between;gap:1rem}
#sf-native-ui .sf-campaign-debrief>footer p{max-width:46rem;margin:0;color:rgba(225,236,236,.62);font-size:10px;line-height:1.5}
#sf-native-ui .sf-campaign-debrief>footer button{
  flex:0 0 auto;min-height:40px;padding:.55rem .8rem;border:1px solid rgba(216,164,65,.55);
  border-radius:0;color:#f6f0dd;background:rgba(216,164,65,.1);font:700 10px/1 "Cinzel",Georgia,serif;
  letter-spacing:.1em;cursor:pointer
}
#sf-native-ui .sf-campaign-debrief>footer button:hover,
#sf-native-ui .sf-campaign-debrief>footer button:focus-visible{border-color:#f0d58c;background:rgba(216,164,65,.2);outline:1px solid rgba(115,216,237,.75);outline-offset:2px}

/* The final image is presentation, not state. The menu beneath it owns the
   pause, focus trap, score record, and shared leaderboard; this one deliberate
   veil only decides when the player is ready to see those numbers. */
#sf-native-ui .sf-mission-wrap{
  position:fixed!important;inset:0!important;left:0!important;top:0!important;
  width:100vw!important;height:100vh!important;max-width:none!important;margin:0!important;padding:0!important;
  z-index:999999!important;display:grid;align-items:end;overflow:hidden;
  border:0;border-radius:0;background:#050608;isolation:isolate
}
#sf-native-ui .sf-mission-wrap[hidden]{display:none!important}
#sf-native-ui .sf-menu:has(.sf-mission-wrap:not([hidden])) .sf-menu__frame,
#sf-native-ui .sf-menu__frame[inert]{display:none!important}
#sf-native-ui .sf-mission-wrap__art{
  position:absolute;inset:0;z-index:-2;
  background-image:url("../img/saintfall/saintfall-mission-complete-v1.jpg");
  background-position:center;background-size:cover;
  filter:saturate(.8) contrast(1.05) brightness(.84);transform:scale(1.01)
}
#sf-native-ui .sf-mission-wrap::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:
    linear-gradient(90deg,rgba(2,3,5,.96) 0%,rgba(3,5,7,.84) 36%,rgba(3,4,6,.28) 68%,rgba(2,3,5,.18)),
    linear-gradient(0deg,rgba(2,3,5,.97) 0%,rgba(2,3,5,.3) 54%,rgba(2,3,5,.12))
}
#sf-native-ui .sf-mission-wrap__card{
  display:grid;align-content:end;gap:clamp(.75rem,1.2vh,1.1rem);box-sizing:border-box;
  width:min(50rem,calc(100% - 4rem));max-height:calc(100% - 3.5rem);
  margin:0 0 clamp(1.8rem,3.5vh,3rem) clamp(1.8rem,3.5vw,3rem);
  padding:clamp(1.5rem,2.2vw,2.2rem) clamp(1.6rem,2.5vw,2.5rem);
  overflow-y:auto;border:1px solid rgba(216,164,65,.55);border-left:5px solid #d8a441;border-radius:0;
  background:linear-gradient(110deg,rgba(98,63,26,.32),rgba(6,10,14,.86) 48%),rgba(4,7,9,.94);
  box-shadow:0 1.5rem 4rem rgba(0,0,0,.7),inset 0 0 0 1px rgba(115,216,237,.1)
}
#sf-native-ui .sf-mission-wrap__kicker{color:#79d8ed;font-size:clamp(10px,.85vw,12px);font-weight:700;letter-spacing:.24em}
#sf-native-ui .sf-mission-wrap__card h2{margin:0;color:#f6f0dd;font:700 clamp(2.2rem,4vw,3.4rem)/1.05 "Cinzel",Georgia,serif;letter-spacing:.1em}
#sf-native-ui .sf-mission-wrap__card>p{margin:0;color:#f0d58c;font:600 clamp(17px,1.35vw,22px)/1.35 "Cormorant Garamond",Georgia,serif;font-style:italic;letter-spacing:.025em}
#sf-native-ui .sf-mission-wrap__verdict{display:grid;gap:.35rem;margin-top:.2rem;padding:.85rem 0;border-block:1px solid rgba(216,164,65,.25)}
#sf-native-ui .sf-mission-wrap__verdict strong{color:#f6f0dd;font:600 clamp(13px,1.1vw,15px)/1.25 "Cinzel",Georgia,serif;letter-spacing:.14em}
#sf-native-ui .sf-mission-wrap__verdict span{max-width:44rem;color:rgba(225,236,236,.8);font-size:clamp(12.5px,1vw,14.5px);line-height:1.55}
#sf-native-ui .sf-mission-wrap__card footer{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;margin-top:.25rem}
#sf-native-ui .sf-mission-wrap__card footer small{max-width:20rem;color:rgba(115,216,237,.82);font-size:clamp(9.5px,.75vw,11px);letter-spacing:.14em;line-height:1.45}
#sf-native-ui .sf-mission-wrap__card button{
  flex:0 0 auto;min-height:48px;padding:.75rem 1.4rem;border:1px solid rgba(216,164,65,.72);border-radius:0;
  background:linear-gradient(90deg,rgba(128,78,25,.52),rgba(35,25,20,.94),rgba(128,78,25,.52));
  color:#fff0cf;font:700 clamp(11px,.9vw,13px)/1 "Cinzel",Georgia,serif;letter-spacing:.12em;cursor:pointer
}
#sf-native-ui .sf-mission-wrap__card button:hover,
#sf-native-ui .sf-mission-wrap__card button:focus-visible{border-color:#f0d58c;background:rgba(216,164,65,.32);outline:2px solid rgba(115,216,237,.8);outline-offset:2px}
body.sf-high-contrast #sf-native-ui .sf-mission-wrap__card{border-color:#ffe199;background:rgba(0,0,0,.96)}
body.sf-high-contrast #sf-native-ui .sf-mission-wrap__verdict span{color:#fff}
body.sf-reduced-motion #sf-native-ui .sf-mission-wrap__art{transform:none}

@media (max-width:760px), (max-height:700px){
  #sf-native-ui .sf-menu[data-phase="won"] .sf-operation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #sf-native-ui .sf-campaign-debrief{gap:.45rem;margin-top:.5rem;padding:.6rem}
  #sf-native-ui .sf-campaign-debrief__head h4{font-size:13px}
  #sf-native-ui .sf-campaign-debrief__score>span{min-height:3.4rem;padding:.4rem .5rem}
  #sf-native-ui .sf-campaign-debrief__score strong{font-size:1.35rem}
  #sf-native-ui .sf-campaign-debrief__factors{gap:.35rem}
  #sf-native-ui .sf-campaign-debrief__factors article{padding:.4rem}
  #sf-native-ui .sf-campaign-debrief>footer p{display:none}
}
@media (max-width:520px){
  #sf-native-ui .sf-campaign-debrief__head{align-items:flex-start;flex-direction:column;gap:.35rem}
  #sf-native-ui .sf-campaign-debrief__score{grid-template-columns:1fr 1fr}
  #sf-native-ui .sf-campaign-debrief__factors{grid-template-columns:1fr}
  #sf-native-ui .sf-campaign-debrief>footer{justify-content:stretch}
  #sf-native-ui .sf-campaign-debrief>footer button{width:100%}
  #sf-native-ui .sf-mission-wrap{align-items:end}
  #sf-native-ui .sf-mission-wrap::before{background:linear-gradient(0deg,rgba(2,3,5,.98) 0%,rgba(2,3,5,.84) 52%,rgba(2,3,5,.18))}
  #sf-native-ui .sf-mission-wrap__art{background-position:64% center}
  #sf-native-ui .sf-mission-wrap__card{width:calc(100% - 1rem);max-height:calc(100% - 1rem);margin:.5rem;padding:1rem .9rem;gap:.55rem}
  #sf-native-ui .sf-mission-wrap__kicker{font-size:9.5px}
  #sf-native-ui .sf-mission-wrap__card h2{font-size:clamp(1.6rem,7.5vw,2.2rem)}
  #sf-native-ui .sf-mission-wrap__card>p{font-size:14px}
  #sf-native-ui .sf-mission-wrap__verdict{padding:.5rem 0;gap:.25rem}
  #sf-native-ui .sf-mission-wrap__verdict strong{font-size:12px}
  #sf-native-ui .sf-mission-wrap__verdict span{font-size:11.5px;line-height:1.45}
  #sf-native-ui .sf-mission-wrap__card footer{align-items:stretch;flex-direction:column;gap:.6rem}
  #sf-native-ui .sf-mission-wrap__card footer small{max-width:none;font-size:9.5px}
  #sf-native-ui .sf-mission-wrap__card button{width:100%;min-height:46px;font-size:11px}
}
@media (orientation:landscape) and (max-height:500px){
  #sf-native-ui .sf-mission-wrap__art{background-position:center 45%}
  #sf-native-ui .sf-mission-wrap__card{width:min(38rem,calc(100% - 1rem));max-height:calc(100% - 1rem);margin:.5rem;padding:.65rem .85rem;gap:.32rem}
  #sf-native-ui .sf-mission-wrap__kicker{font-size:8px}
  #sf-native-ui .sf-mission-wrap__card h2{font-size:1.55rem}
  #sf-native-ui .sf-mission-wrap__card>p{font-size:11.5px}
  #sf-native-ui .sf-mission-wrap__verdict{padding:.38rem 0;gap:.18rem}
  #sf-native-ui .sf-mission-wrap__verdict strong{font-size:10px}
  #sf-native-ui .sf-mission-wrap__verdict span{font-size:9.5px;line-height:1.32}
  #sf-native-ui .sf-mission-wrap__card footer small{font-size:8px}
  #sf-native-ui .sf-mission-wrap__card button{min-height:40px;padding:.45rem .75rem;font-size:9px}
}

/* The shared score panel remains the authority for local/cloud standings;
   square its outer chrome to Saintfall's hardline interface. */
.saintfall-shell .rb-standalone-leaderboard-btn,
.saintfall-shell [data-rb-leaderboard]{border-radius:0}
