/* Rift Frontier "Night Shift" layout in the Mars rust palette (Nov 18, r268; owner: "rework the UI ... It looks a hell
   a lot like sol village ... still the same features" -> mockup approved: "just the color scheme arrange to the mars
   rustic theme"). The map fills the screen; every panel floats over it as dark basalt glass. Loaded after
   frontier.css and only overrides it, so turning this file off brings back the old layout. */
:root{
  --g:rgba(35,26,25,.9);        /* basalt glass */
  --g-in:#2e2220;               /* card inside a panel */
  --g-well:#1a1312;             /* sunken well: resource strip, stat tiles */
  --g-line:#4a3530; --g-line2:#5e4239;
  --acc:#f07a36; --acc-ink:#1b0c06; --acc-soft:rgba(240,122,54,.16);
  --g-shadow:0 10px 30px rgba(0,0,0,.5),inset 0 1px 0 rgba(241,220,196,.07);
  --pad:12px; --rail:72px; --crew:336px; --report:300px; --topH:56px;
}
html,body{height:100%}
body{overflow:hidden}

/* ---------- full-screen map ---------- */
body .fr-main{position:fixed;inset:0;display:block;height:auto;padding:0;gap:0}
body .fr-stage{position:fixed;inset:0;border:0;border-radius:0;box-shadow:none;clip-path:none;z-index:0}

/* ---------- glass recipe ---------- */
body .fr-top,body .fr-list,body .fr-side,body #qbar,body .battles,body .fr-cam,body .buildbar{
  background:var(--g);border:1px solid var(--g-line);border-radius:14px;box-shadow:var(--g-shadow);clip-path:none;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}

/* ---------- top bar ---------- */
body .fr-top{position:fixed;top:var(--pad);left:var(--pad);right:var(--pad);height:var(--topH);z-index:7;gap:12px;padding:0 10px 0 14px;overflow:visible;
  background:var(--g)}
body .fr-brand b{font:700 15px var(--display);color:var(--dust);text-shadow:none;letter-spacing:.02em}
body .fr-brand span{font-size:12px;color:var(--dust2)}
body .fr-res{margin-left:8px;gap:0;height:38px;align-items:stretch;background:var(--g-well);border:1px solid var(--g-line);border-radius:10px;overflow:hidden;padding:0}
body .fr-res::before{display:none}
body .res{background:none;border:0;border-left:1px solid var(--g-line);border-radius:0;box-shadow:none;padding:0 11px;gap:7px;min-width:0;height:auto}
body .res:first-child{border-left:0}
body .res img{width:18px}
body .res b{font:700 15px var(--display);text-shadow:none}
body .res span{display:none}
body .r-credits b{color:var(--credits)}body .r-dia b{color:#8fd8ff}body .r-fuel b,body .r-ore b,body .r-core b,body .r-sortie b{color:var(--dust)}
body .res-btn::after{width:20px;height:20px;border:0;border-radius:6px;background:var(--acc-soft);color:var(--acc);font-size:15px}
body .cut{margin-left:auto;height:34px;padding:3px;border:1px solid var(--g-line);border-radius:10px;background:var(--g-well);box-shadow:none;gap:2px;overflow:visible}
body .cut>span{display:none}
body .cut button{border:0;border-radius:7px;padding:0 11px;color:var(--dust2)}
body .cut button small{display:none}
body .cut button b{font:600 13px var(--display)}
body .cut button[aria-pressed="true"]{background:var(--basalt3);color:var(--dust)}
body .cut button[aria-pressed="true"] b{font-weight:700}
body .raid-t{height:34px;border-radius:10px;box-shadow:none}
body .clock{border:1px solid var(--g-line);border-radius:10px;background:var(--g-well);color:var(--dust2)}
body .bell{border-radius:10px}

/* ---------- left rail (buildings and windows) ---------- */
body #qbar{position:fixed;left:var(--pad);top:calc(var(--pad) + var(--topH) + 12px);bottom:auto;right:auto;transform:none;width:var(--rail);z-index:5;
  display:flex;flex-direction:column;flex-wrap:nowrap;gap:2px;padding:8px 6px;overflow:visible}
body #qbar button{height:54px;width:100%;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  border:0;border-radius:10px;background:none;box-shadow:none;color:var(--dust);font:600 11px var(--display);text-shadow:none;clip-path:none}
body #qbar button::before{display:none}
body #qbar button:hover{background:var(--acc-soft);color:#fff}
body #qbar button:focus-visible{outline:2px solid var(--acc);outline-offset:-2px}
body #qbar .q-heroes{background:var(--acc);color:var(--acc-ink);font-weight:700}
body #qbar .q-heroes:hover{background:#ff8f4f;color:var(--acc-ink)}
body #qbar .q-gate{color:#d7b8ff}
body #qbar .q-barracks{margin-top:6px;position:relative}
body #qbar .q-barracks::after{content:"";position:absolute;left:8px;right:8px;top:-5px;height:1px;background:var(--g-line)}
.qi{flex:none}

/* ---------- station report (left card) ---------- */
body .fr-side{position:fixed;left:calc(var(--pad) + var(--rail) + 12px);top:calc(var(--pad) + var(--topH) + 12px);bottom:auto;right:auto;width:var(--report);
  max-height:calc(100% - var(--topH) - 2*var(--pad) - 80px);overflow:auto;padding:14px 16px;z-index:5;display:block}
body .fr-side.closed{display:block}
body .fr-side .side-head b{font:700 16px var(--display);color:var(--dust);text-shadow:none}
body .fr-side h3{display:block;background:none;padding:0;margin:14px 0 6px;font:700 12px var(--display)!important;color:var(--dust2)!important;clip-path:none}

/* ---------- crew drawer (right) ---------- */
body .fr-list{position:fixed;right:var(--pad);top:calc(var(--pad) + var(--topH) + 12px);bottom:var(--pad);width:var(--crew);left:auto;z-index:5;padding:0;
  display:flex;flex-direction:column;overflow:hidden}
body .fr-list .pane-head{display:none}
.crew-tabs{display:flex;gap:4px;padding:8px;border-bottom:1px solid var(--g-line);flex:none}
.crew-tabs button{flex:1;height:34px;border:0;border-radius:8px;background:none;color:var(--dust2);font:600 13px var(--display);cursor:pointer}
.crew-tabs button small{font-size:12px;color:var(--dust3);font-weight:600}
.crew-tabs button[aria-selected="true"]{background:var(--basalt3);color:var(--dust);font-weight:700}
.crew-tabs button:focus-visible{outline:2px solid var(--acc);outline-offset:1px}
body #makers{flex:1 1 auto;min-height:0;overflow:auto;padding:8px;gap:8px}
body .fr-log{flex:none;margin:0;height:auto;border:0;border-top:1px solid var(--g-line);border-radius:0;background:none}
body .fr-log h2{display:none}
body .fr-list[data-tab="crew"] .fr-log #logbox{max-height:44px;overflow:hidden}
body .fr-list[data-tab="log"] #makers{display:none}
body .fr-list[data-tab="log"] .fr-log{flex:1 1 auto;min-height:0}
body .fr-list[data-tab="log"] .fr-log #logbox{max-height:none;flex:1;overflow:auto}

/* crew card: stamina ring around the portrait, one HP bar */
body .mk{display:grid;grid-template-columns:56px minmax(0,1fr);column-gap:12px;row-gap:3px;padding:10px;border-radius:12px;
  background:var(--g-in);border:1px solid var(--g-line);box-shadow:none;clip-path:none;overflow:visible}
body .mk::before{display:none}
body .mk:hover,body .mk.sel{border-color:var(--acc);background:#33251f}
body .mk>.ring{grid-column:1;grid-row:1/span 6;align-self:start}
body .mk>:not(.ring){grid-column:2}
.ring{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(var(--rc,var(--credits)) 0 var(--sta,100%),var(--basalt3) var(--sta,100%) 100%)}
.ring>.av{width:46px!important;height:46px!important;margin:0!important;border:0!important;border-radius:50%!important;background-color:#3b2b27;box-shadow:none!important}
body .mk .nm span{font:700 15px var(--display)}
body .mk .bars2{display:block;margin:3px 0}
body .mk .bars2>span,body .mk .bars2 .bar.s{display:none}
body .mk .bars2 .bar.h{height:5px;border-radius:3px;border:0;background:var(--basalt3)}
body .mk .bars2 .bar.h i{border-radius:3px}
body .mk .stat{font-size:13px}
body .mk-q{border-radius:7px}

/* ---------- live battles: one bar at the top ---------- */
body .battles{position:fixed;top:calc(var(--pad) + var(--topH) + 12px);left:50%;right:auto;bottom:auto;transform:translateX(-50%);
  width:min(380px,calc(100% - 2*var(--pad) - var(--rail) - var(--report) - var(--crew) - 48px));max-height:180px;padding:8px 10px;z-index:4}
body .bt-head .box-title{display:inline;background:none;padding:0;color:var(--dust)!important;font:700 13px var(--display)!important;clip-path:none}

/* ---------- bottom: view switcher, feed, hints, edit bar ---------- */
body .fr-cam{position:fixed;left:50%;bottom:var(--pad);top:auto;right:auto;transform:translateX(-50%);padding:4px;gap:4px;z-index:4;display:flex}
body .fr-cam button{border:0!important;border-radius:9px;background:none;box-shadow:none;color:var(--dust);font:600 13px var(--display);padding:0 16px;height:36px}
body .fr-cam button[aria-pressed="true"]{background:var(--acc);color:var(--acc-ink);font-weight:700;text-shadow:none}
body .fr-feed{position:fixed;left:calc(var(--pad) + var(--rail) + 12px);right:auto;bottom:var(--pad);align-items:flex-start;z-index:4;flex-direction:column}
body .fr-feed li{background:var(--g);border:1px solid var(--g-line);border-radius:20px;padding:9px 14px;font:500 13px var(--display);color:var(--dust);box-shadow:var(--g-shadow)}
body .fr-feed li small{color:var(--dust3);font-size:12px}
body .fr-hint{position:fixed;top:auto;bottom:calc(var(--pad) + 56px);left:50%;right:auto;transform:translateX(-50%);z-index:4;border:1px solid var(--g-line);border-radius:10px;background:var(--g)}
body .buildbar{position:fixed;left:50%;right:auto;bottom:calc(var(--pad) + 56px);transform:translateX(-50%);width:min(760px,calc(100% - 2*var(--pad) - var(--rail) - var(--crew) - 48px));z-index:5}
body .raidbar{position:fixed;top:calc(var(--pad) + var(--topH) + 64px);z-index:6}
body .toast{position:fixed;top:calc(var(--pad) + var(--topH) + 64px);z-index:6}

/* ---------- headings: no more pixel tag strips ---------- */
body .box-title,body .pane-head h2,body .fr-log h2,body .sh-col h3{text-shadow:none!important;clip-path:none}

/* ---------- building window: basalt card with a rust blueprint grid ---------- */
body .bm-card{border:1px solid var(--g-line);border-radius:18px;background:#211817;box-shadow:0 24px 70px rgba(0,0,0,.6)}
body .bm-scene{border-bottom:1px solid var(--g-line);background-color:#1a1312;
  background-image:radial-gradient(ellipse at 50% 85%,rgba(240,122,54,.28),transparent 60%),linear-gradient(rgba(240,122,54,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(240,122,54,.09) 1px,transparent 1px);
  background-size:auto,24px 24px,24px 24px}
body .bm-card .side-head{background:#211817;border-bottom:1px solid var(--g-line)}
body .bm-card .side-head b{font:700 24px var(--display);color:var(--dust)}
body .bm-card h3{font:700 13px var(--display)!important;color:var(--dust2)!important;background:none;padding:0}
body .bm{background:rgba(14,10,11,.55)}

/* ---------- medium screens: narrower side panels ---------- */
@media (max-width:1280px){:root{--crew:300px;--report:270px}}
@media (max-width:1100px){
  :root{--report:250px}
  body .fr-brand span,body .clock{display:none}
  body .battles{display:none}
}
@media (max-height:760px) and (min-width:761px){
  body #qbar button{height:46px;font-size:10.5px;gap:2px}
}

/* ---------- phone: bottom tab bar, crew as a bottom sheet ---------- */
@media (max-width:760px){
  :root{--pad:6px}
  body{overflow:hidden}
  body .fr-top{height:auto;flex-wrap:wrap;padding:8px;gap:8px;border-radius:14px}
  body .fr-brand{flex:1;min-width:0}
  body .fr-res{order:5;margin:0;width:100%;overflow-x:auto;scrollbar-width:none}
  body .res{padding:0 9px}
  body .cut{order:6;margin:0 auto 0 0;width:100%;justify-content:stretch}
  body .cut button{flex:1}
  body #qbar{top:auto;bottom:var(--pad);left:var(--pad);right:var(--pad);width:auto;height:64px;flex-direction:row;padding:6px;overflow-x:auto;scrollbar-width:none}
  body #qbar button{height:52px;min-width:64px;flex:1 0 64px}
  body #qbar .q-barracks{margin:0 0 0 6px}
  body #qbar .q-barracks::after{left:-5px;top:8px;bottom:8px;right:auto;width:1px;height:auto}
  body .fr-list{top:auto;left:var(--pad);right:var(--pad);bottom:calc(var(--pad) + 72px);width:auto;height:228px}
  body #makers{flex-direction:row;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory}
  body #makers .mk{flex:0 0 84%;scroll-snap-align:start}
  body .fr-list[data-tab="crew"] .fr-log{display:none}
  body .fr-side{top:auto;left:var(--pad);right:var(--pad);width:auto;bottom:calc(var(--pad) + 72px + 236px);max-height:110px;padding:10px 12px}
  body .fr-cam{bottom:auto;top:calc(var(--pad) + 140px);left:auto;right:var(--pad);transform:none}
  body .fr-cam button{padding:0 10px;height:32px;font-size:12px}
  body .fr-feed,body .fr-hint,body .battles{display:none}
  body .buildbar{bottom:calc(var(--pad) + 72px);width:auto;left:var(--pad);right:var(--pad);transform:none}
}

/* ---------- fixes after the first screenshots ---------- */
/* raid chip in the Mars palette: rust when ready, red during a raid */
body .raid-t{border:1px solid var(--g-line2);background:var(--g-well)}
body .raid-t.ready{border-color:var(--acc);background:var(--acc-soft);animation:none}
body .raid-t.ready b{color:#ffb38a}
body .raid-t.ready::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--acc);box-shadow:0 0 0 4px rgba(240,122,54,.25);grid-row:1/span 2;align-self:center}
body .raid-t.ready{grid-template-columns:auto auto;column-gap:8px;align-items:center}
@media (prefers-reduced-motion:no-preference){body .raid-t.ready::before{animation:v2pulse 1.6s ease-in-out infinite alternate}}
@keyframes v2pulse{to{box-shadow:0 0 0 7px rgba(240,122,54,.05)}}
/* Crew tab lists heroes on duty only; the camp lives behind the Camp tab */
body .fr-list[data-tab="crew"] .mk.reserve{display:none}
/* advice line in the report */
body .fr-side .advice{border:1px solid rgba(240,122,54,.4);border-left-width:1px;border-radius:10px;background:var(--acc-soft);padding:10px 12px;color:var(--dust)}
body .fr-side .advice.ok{border-color:rgba(95,211,138,.4);background:rgba(95,211,138,.1)}
body .fr-side .yield{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body .fr-side .yield>div{display:flex;flex-direction:column-reverse;gap:2px;padding:9px 10px;border-radius:9px;background:var(--g-well);border:0}
body .fr-side .yield dt{font-size:11px;color:var(--dust2)}
body .fr-side .yield dd{margin:0;font:700 16px var(--display);color:var(--dust)}
body .fr-side .yield>div:first-child dd{color:var(--credits)}

/* narrower desktops: the top bar may take two rows; everything below moves down with it */
@media (max-width:1180px) and (min-width:761px){
  :root{--topH:100px}
  body .fr-top{height:auto;min-height:56px;flex-wrap:wrap;row-gap:6px;padding:8px 10px}
  body .fr-res{order:5;margin-left:0}
}
/* phone: one-line resources, compact rows, a smaller report */
@media (max-width:760px){
  body .fr-top{padding:6px;gap:6px}
  body .fr-res{flex-wrap:nowrap;height:34px}
  body .res{flex:none}
  body .res b{font-size:14px}
  body .cut{height:32px}
  body .cut button b{font-size:12px}
  body .raid-t{height:36px}
  body .fr-cam{top:150px}
  body .fr-side{max-height:96px}
  body .fr-side .side-head span,body .fr-side .yield,body .fr-side [data-reset]{display:none}
  body .fr-side .side-head b{font-size:14px}
  body .fr-side .advice{margin:6px 0 0;padding:8px 10px;font-size:12.5px}
  body .fr-list{height:204px}
  body #makers .mk{padding:8px;column-gap:10px}
  body .mk .sub{display:none}
}
@media (max-width:760px){
  body .fr-side{display:none!important}           /* phone: the bell carries the same advice */
  body .fr-list{height:184px}
  body #makers .mk{row-gap:2px}
  body .mk .want{display:none}
}

/* ---------- windows and buttons in the same look (no pixel tags or bevels) ---------- */
:root{--title:var(--display)}
.gt-brand b{font-family:"Silkscreen","Pixelify Sans",monospace!important}   /* the logo keeps its pixel letters */
body .box-title,body .pane-head h2,body .fr-log h2,body .fr-side h3,body .sh-col h3,body .hr-h,body .bm-card h3{
  display:block;background:none!important;padding:0!important;clip-path:none!important;text-shadow:none!important;
  font:700 13px var(--display)!important;color:var(--dust2)!important;letter-spacing:.01em}
body .hr-h{margin:16px 0 8px}
body .ar-card,body .sheet-card,body .away>div,body .run-card{border:1px solid var(--g-line);border-radius:16px;background:#211817;
  box-shadow:0 24px 70px rgba(0,0,0,.6);clip-path:none}
body .ar-head{background:#2a1e1c;border-bottom:1px solid var(--g-line);border-radius:16px 16px 0 0}
body .ar-head h2{font:700 18px var(--display);color:var(--dust);text-shadow:none}
body .btn,body .run-btn,body .raidbar button{border:1px solid var(--g-line2)!important;border-radius:9px;background:#3b2b27;color:var(--dust);
  box-shadow:none;text-shadow:none;font:600 13px var(--display);clip-path:none}
body .btn:hover:not(:disabled){background:#4a3630;border-color:var(--acc)!important;color:#fff}
body .btn:active:not(:disabled){transform:translateY(1px);box-shadow:none}
body .btn.on,body .run-btn{background:var(--acc);border-color:var(--acc)!important;color:var(--acc-ink);font-weight:700;text-shadow:none}
body .btn.on:hover:not(:disabled){background:#ff8f4f;color:var(--acc-ink)}
body .btn:disabled{background:#241b1a;color:var(--dim);border-color:var(--g-line)!important;box-shadow:none}
body .btn.ghost{background:transparent;border-color:transparent!important}
body .btn.danger{background:#7a1a1a!important;color:#fff;border-color:#a33!important}
body .hr-tabs button,body .wh-chips button{border:1px solid var(--g-line)!important;border-radius:8px;background:var(--g-well)}
body .hr-tabs button[aria-selected="true"],body .wh-chips button[aria-pressed="true"]{background:var(--acc);color:var(--acc-ink);border-color:var(--acc)!important}
body .hf input,body .hf select,body .wh-f select,body .wh-f input{border:1px solid var(--g-line)!important;border-radius:8px;background:var(--g-well)}
body .bell-pop,body .acct-pop{border:1px solid var(--g-line);border-radius:14px;background:#211817;box-shadow:var(--g-shadow);clip-path:none}
body .bell-pop header b{font-family:var(--display)}
body .fr-list .fr-log h2{display:none!important}
/* live battles: drag by the title bar (r270) */
body .bt-head.drag{cursor:grab;touch-action:none;user-select:none}
body .battles.dragging .bt-head{cursor:grabbing}
body .battles.dragging{box-shadow:0 18px 44px rgba(0,0,0,.6),inset 0 1px 0 rgba(241,220,196,.07);opacity:.96}
body .bt-head.drag::before{content:"";width:10px;height:14px;margin-right:6px;flex:none;opacity:.55;
  background:radial-gradient(circle,var(--dust2) 1.2px,transparent 1.4px) 0 0/5px 5px}

/* r272 station themes and hero outfits: swatches on the picker buttons */
.looks,.outfits{display:flex;flex-wrap:wrap;gap:6px}
.sw{display:inline-block;width:14px;height:14px;margin-right:6px;vertical-align:-2px;border-radius:4px;border:1px solid rgba(0,0,0,.6)}
.sw-standard{background:linear-gradient(135deg,#efe3cf 50%,#72757c 50%)}.sw-crimson{background:linear-gradient(135deg,#e39088 50%,#8a3c44 50%)}
.sw-aurora{background:linear-gradient(135deg,#e6f3f2 50%,#7aa2b4 50%)}.sw-obsidian{background:linear-gradient(135deg,#6a6572 50%,#ff7a2a 50%)}
.sw-gold{background:linear-gradient(135deg,#f3e2b0 50%,#9a7c46 50%)}
.sw-of-standard{background:linear-gradient(135deg,#b84a32 50%,#4a6f9a 50%)}.sw-of-riftops{background:linear-gradient(135deg,#3b3b40 50%,#d8302f 50%)}
.sw-of-dune{background:linear-gradient(135deg,#d6bb86 50%,#2f9a8e 50%)}.sw-of-glacier{background:linear-gradient(135deg,#dbeaf5 50%,#6ac3e6 50%)}
.sw-of-gilded{background:linear-gradient(135deg,#f0c95e 50%,#9a7020 50%)}

/* ---------- first-time guide (r273) ---------- */
.guide{position:fixed;inset:0;z-index:70}
.guide-hole{position:fixed;border-radius:14px;box-shadow:0 0 0 9999px rgba(10,6,6,.66),0 0 0 2px var(--acc),0 0 24px rgba(240,122,54,.55);pointer-events:none;transition:all .22s ease}
@media (prefers-reduced-motion:reduce){.guide-hole{transition:none}}
.guide-card{position:fixed;padding:16px 18px;border-radius:14px;background:#211817;border:1px solid var(--g-line2);box-shadow:0 18px 50px rgba(0,0,0,.6);color:var(--dust)}
.guide-card small{font:600 12px var(--display);color:var(--dust2)}
.guide-card h2{margin:4px 0 6px;font:700 19px var(--display);color:var(--dust)}
.guide-card p{margin:0 0 14px;font:500 14px/1.45 var(--display);color:var(--dust2)}
.guide-row{display:flex;justify-content:space-between;gap:8px}
.btip{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;margin:0 0 12px;padding:12px 14px;border-radius:12px;background:var(--acc-soft);border:1px solid rgba(240,122,54,.45)}
.btip b{font:700 13px var(--display);color:var(--acc)}.btip p{grid-column:1;margin:0;font-size:13.5px;color:var(--dust)}
.btip .btn{grid-column:2;grid-row:1/span 2}
