/* shell.css (shell-20261130c) — the ONE top bar of LLP, drawn by /llp-shell/shell.js on every page of a logged-in user.
   Rules of this sheet:
   · nothing here changes a page unless shell.js has put the class "llpsh-on" on <html> (the bar is mounted) — fail open:
     a page whose shell did not start keeps its own bar and its own look;
   · the bar is the same element with the same numbers on every page: fixed px (no rem, no em of the page), the fonts of the OS;
   · classes and ids of the shell start with "llpsh"; the old bars of the pages are hidden, never removed (their ids stay);
   · no inline style is needed (the read pages send style-src 'self'). */
:root { --llpsh-ok: 1; --llpsh-h: 52px; }
@media (max-width: 799px) { :root { --llpsh-h: 44px; } }
@media (max-width: 699px) { :root { --llpsh-h: 74px; } }   /* shell-20261130c: two rows */

/* ---- the switch between pages: the bar stays where it is, only the page under it fades (browsers with cross-document view transitions) ---- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .12s; }
::view-transition-new(root) { animation-duration: .16s; }
::view-transition-group(llpsh-bar) { animation-duration: .12s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .001s; } }

/* ---- the bar ---- */
#llpshBar, #llpshBar > *, #llpshTabs > *, #llpshBar .llpsh-pullbtn, #llpshBar .llpsh-pull { all: unset; }
#llpshBar[hidden], #llpshBar [hidden] { display: none !important; }
#llpshBar {
  view-transition-name: llpsh-bar;
  position: absolute; left: 0; right: 0; top: 0; z-index: 9000; box-sizing: border-box; height: 52px; padding: 0 14px;
  display: flex; align-items: center; gap: 10px; overflow: visible; visibility: visible; zoom: 1; will-change: transform; isolation: isolate;
  background: #070b19 !important; border: 0 solid #344366 !important; border-bottom-width: 1px !important; color: #eaf4ff; color-scheme: dark;
  font: 700 15px/1 "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; letter-spacing: 0; text-align: left; white-space: nowrap;
  -webkit-font-smoothing: auto; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; direction: ltr; cursor: default; user-select: none; -webkit-user-select: none;
}
#llpshBar.llpsh-fixed { position: fixed; z-index: 8; }   /* Fleet View: over its own top row (5) and over the alarm frame of the country level (7); its dialogs (20) still cover everything */
#llpshBar.llpsh-ingrid { position: relative; grid-row: 1; grid-column: 1; zoom: calc(1 / var(--z, 1)); }
#llpshTabs { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; height: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; padding: 0 2px; }
#llpshTabs::-webkit-scrollbar { display: none; }
#llpshBar .llpsh-tab, #llpshBar .llpsh-title {
  display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; height: 34px; padding: 0 18px;
  border: 2px solid #2f6076; border-radius: 12px; background: #101a33; color: #cfe9ff;
  font: 700 15px/1 "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; letter-spacing: .03em; text-decoration: none; white-space: nowrap; cursor: pointer;
}
#llpshBar .llpsh-tab:hover { border-color: #9af6ff; color: #fff; }
/* shell-20261130b: the red dot on 「ASKリスト」 — a letter of the suggestion box waits for an answer (admins only; no number) */
#llpshBar .llpsh-tab.has-dot { position: relative; }
#llpshBar .llpsh-tab .llpsh-dot { all: unset; position: absolute; top: 2px; right: 3px; box-sizing: border-box; width: 9px; height: 9px; border-radius: 50%; background: #ff4b5c; box-shadow: 0 0 0 2px #070b19, 0 0 8px #ff4b5ccc; pointer-events: none; }
#llpshBar .llpsh-tab .llpsh-dot[hidden] { display: none !important; }
#llpshBar .llpsh-tab.is-active, #llpshBar .llpsh-title { color: #050507; background: linear-gradient(120deg, #84eaff, #b8f4e0); border-color: #84eaff; box-shadow: 0 0 22px #84eaff55; }
#llpshBar .llpsh-title { cursor: default; }
#llpshBar .llpsh-tab:focus-visible, #llpshBar .llpsh-logout:focus-visible, #llpshBar .llpsh-pullbtn:focus-visible { outline: 2px solid #89f4ff; outline-offset: 2px; }
#llpshBar .llpsh-sp { display: block; flex: 1 1 0; min-width: 0; }
#llpshBar .llpsh-user { display: block; flex: 0 1000 auto; min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: #a8b7d3; font: 400 12.5px/1.2 "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; white-space: nowrap; }
#llpshBar .llpsh-logout, #llpshBar .llpsh-pullbtn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; height: 28px; padding: 0 12px;
  border: 1px solid #42517a; border-radius: 8px; background: transparent; color: #cfe9ff;
  font: 600 12.5px/1 "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; white-space: nowrap; cursor: pointer;
}
#llpshBar .llpsh-logout:hover, #llpshBar .llpsh-pullbtn:hover { color: #fff; border-color: #9af6ff; }
#llpshBar .llpsh-logout:disabled { opacity: .5; cursor: default; }
/* the fetch control (取り寄せ: /fleetview/fc/pull/llp-pull.js mounts itself into the marked element; admins only).
   Its own sheet (llp-pull.css) styles it by class; pages that style every button and select (問い合わせ does, with !important) must not
   reach it inside the bar: the same values are said here once more, with the weight to win. */
#llpshBar .llp-pull-btn { color: #06222a !important; background: linear-gradient(120deg, #84eaff, #b8f4e0) !important; border: 1px solid #84eaff !important; border-radius: 8px !important; box-shadow: none !important; text-shadow: none !important; transition: none !important; font: 700 12px/1 "Yu Gothic UI", "Meiryo", sans-serif !important; letter-spacing: 0 !important; height: 24px !important; min-height: 0 !important; margin: 0 !important; outline-offset: 2px !important; }
#llpshBar .llp-pull[data-state="silent"] .llp-pull-btn { background: #2a1a24 !important; color: #ffd6df !important; border-color: #ff9eb6 !important; }
#llpshBar .llp-pull-src { color: #eaf4ff !important; background: #10182d !important; border: 1px solid #5ecada99 !important; border-radius: 8px !important; box-shadow: none !important; transition: none !important; font: 600 12px/1 "Yu Gothic UI", "Meiryo", sans-serif !important; letter-spacing: 0 !important; height: 24px !important; min-height: 0 !important; max-width: 11em !important; margin: 0 !important; padding: 0 4px !important; outline-offset: 2px !important; color-scheme: dark; }
#llpshBar .llp-pull, #llpshBar .llp-pull span { letter-spacing: 0; text-shadow: none; }
@media (max-width: 799px) { #llpshBar .llp-pull-btn, #llpshBar .llp-pull-src { height: 34px !important; font-size: 13px !important; } }
#llpshBar .llpsh-pullwrap { display: flex; align-items: center; flex: none; position: relative; min-width: 0; }
#llpshBar .llpsh-pullwrap:not(.has-pull) { display: none; }
#llpshBar .llpsh-pull { display: block; }
#llpshBar .llpsh-pullbtn { display: none; }
@media (max-width: 1279px) {
  #llpshBar .llpsh-pullbtn { display: inline-flex; }
  #llpshBar .llpsh-pull { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 9001; box-sizing: border-box; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 8px 10px; background: #070b19f7; border: 1px solid #344366; border-radius: 10px; box-shadow: 0 8px 22px #02040cbb; white-space: normal; }
  #llpshBar .llpsh-pullwrap.is-open .llpsh-pull { display: block; }
  #llpshBar .llpsh-pullwrap.is-open .llpsh-pullbtn { border-color: #84eaff; color: #fff; }
}
@media (max-width: 1099px) { #llpshBar .llpsh-user { max-width: 110px; } }
@media (max-width: 799px) {
  #llpshBar { height: 44px; padding: 0 8px; gap: 6px; }
  #llpshTabs { gap: 5px; }
  #llpshBar .llpsh-tab, #llpshBar .llpsh-title { height: 32px; padding: 0 11px; font-size: 13.5px; letter-spacing: 0; border-radius: 10px; }
  #llpshBar .llpsh-tab.has-dot { padding-right: 16px; }   /* shell-20261130c: the dot stands beside the name, not on its last letter */
  #llpshBar .llpsh-user { display: none; }
  #llpshBar .llpsh-logout, #llpshBar .llpsh-pullbtn { height: 30px; padding: 0 8px; font-size: 12px; }
  #llpshBar .llpsh-pull { position: fixed; left: 8px; right: 8px; top: calc(var(--llpsh-h) + 6px); width: auto; max-width: none; }
}
/* shell-20261130c: a narrow window (699 px and less) — TWO rows, so that every tab name is read in full and the red dot of ASKリスト is in view:
   row 1 = the four tabs (they share the width), row 2 = the name · 取り寄せ · ログアウト. The bar is 74 px high there (--llpsh-h says so to the pages).
   Should the tabs still not fit (a very small screen, a wide font), row 1 scrolls sideways and shell.js brings the lit tab into view. */
@media (max-width: 699px) {
  #llpshBar { height: 74px; padding: 5px 8px; flex-wrap: wrap; align-content: space-between; column-gap: 6px; row-gap: 0; }
  #llpshTabs { order: -2; flex: 1 0 100%; height: 34px; gap: 4px; padding: 0; }
  #llpshBar .llpsh-tab, #llpshBar .llpsh-title { flex: 1 0 auto; height: 32px; padding: 0 5px; font-size: 13px; }
  #llpshBar .llpsh-title { flex: 0 0 auto; padding: 0 14px; }   /* (anybody else than an admin: the heading keeps its own width) */
  #llpshBar .llpsh-tab.has-dot { padding-right: 15px; }
  #llpshBar .llpsh-tab .llpsh-dot { top: 3px; right: 4px; width: 8px; height: 8px; }
  #llpshBar .llpsh-user { order: -1; display: block; flex: 0 1 auto; max-width: 46vw; font-size: 12px; }
  #llpshBar .llpsh-logout, #llpshBar .llpsh-pullbtn { height: 28px; }
}
@media (max-width: 359px) { #llpshBar .llpsh-tab, #llpshBar .llpsh-title { padding: 0 3px; font-size: 12px; } #llpshBar .llpsh-tab.has-dot { padding-right: 13px; } }

/* ---- room for the bar (pages that scroll: the bar lies at the top of the page and a spacer of its height opens the page) ---- */
html.llpsh-on:not(.llpsh-nosp) body::before { content: ""; display: block; height: var(--llpsh-h); animation: none !important; }
html.llpsh-off body::before, html.llpsh-nosp body::before { display: none; }

/* ---- the old bars of the pages: hidden while the shell bar is there (never removed: scripts of the pages use their ids) ---- */
html.llpsh-on #llpTabs { display: none !important; }                                   /* FleetControl, Fleet View */
html.llpsh-on.llpsh-p-contacts header.topbar.llp-top { display: none !important; }     /* 問い合わせ (the bar of the bundle) */
html.llpsh-on.llpsh-p-contacts .app.llp-noside, html.llpsh-on.llpsh-p-contacts .app.llp-noside > .content { min-height: calc(100vh - var(--llpsh-h)); }
html.llpsh-on.llpsh-p-contacts #root { height: calc(100% - var(--llpsh-h)); }
html.llpsh-on nav.aklinks { display: none !important; }                                /* ASKリスト */

/* ---- Fleet View: the shell bar is the first row, Fleet View's own controls (brand, 3D / 2D / 自動, 軍の一覧, the gear, the notes) the second.
        #top keeps its place and grows by the bar: the page measures #top itself (--top-h), so everything under it follows. ---- */
html.llpsh-on.llpsh-p-fv #top { padding-top: var(--llpsh-h); }
html.llpsh-on.llpsh-p-fv #top #llpUser, html.llpsh-on.llpsh-p-fv #top #llpLogout, html.llpsh-on.llpsh-p-fv #top .pullbox { display: none !important; }

/* ---- the theme layer of the ledger pages (ASKリスト, the read-only ledger): the page's own dark set is switched on by shell.js
        (data-theme="dark"), these tokens then carry the neon palette of Fleet View. The shape of the page is not touched. ---- */
:root.llpsh-ledger.llpsh-ledger.llpsh-ledger {
  --bg: #070b19; --panel: #0d152a; --ink: #eaf4ff; --mute: #a8b7d3; --line: #2a3859; --accent: #54eeff; --accent-ink: #06121c;
  --bad: #ff9eb6; --bad-bg: #3a1226; --warn: #f2d49b; --warn-bg: #33270c; --ok: #8af4d9; --ok-bg: #0d2b2a; --chip: #17243b;
  color-scheme: dark;
}
:root.llpsh-ledger body { background: radial-gradient(ellipse at 50% -10%, #12224a 0%, #070b19 55%) fixed, #070b19; color: #eaf4ff; }
:root.llpsh-ledger header.top h1 { letter-spacing: .08em; color: #eaffff; text-shadow: 0 0 12px #54eeff55; }
:root.llpsh-ledger .akcase, :root.llpsh-ledger .akbox, :root.llpsh-ledger .akctl, :root.llpsh-ledger section { border-radius: 10px; }
:root.llpsh-ledger .akcase { background: #0a1124; }
:root.llpsh-ledger button, :root.llpsh-ledger input[type=text], :root.llpsh-ledger textarea { border-radius: 8px; }
:root.llpsh-ledger button:focus-visible, :root.llpsh-ledger a:focus-visible, :root.llpsh-ledger textarea:focus-visible { outline: 2px solid #89f4ff; outline-offset: 2px; }
:root.llpsh-ledger .akctl button[aria-pressed="true"], :root.llpsh-ledger nav.tabs [aria-selected="true"] { box-shadow: 0 0 10px #54eeff44; }
:root.llpsh-ledger ::selection { background: #54eeff55; color: #fff; }
