/* The guild site's top bar, phone menu and dock on the tools page
   (app.html): the Guild page's (guild.css) look, everything scoped to
   .ncp-shell so none of it reaches the tools' own pages below, and the
   Guild page's colours set on .ncp-shell itself. The bar sticks to the top;
   on a phone it keeps the crest and a menu button and
   the dock at the bottom carries the groups. */

.ncp-shell {
  --s-font-display: "Cinzel", "Iowan Old Style", Palatino, serif;
  --s-font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --s-line: rgba(255, 232, 190, 0.1);
  --s-line-2: rgba(255, 232, 190, 0.18);
  --s-accent: #f2c14e;
  --s-accent-rgb: 242, 193, 78;
  --s-ink: #1e1404;
  --s-text: #f6eedf;
  --s-text-2: #d8ccb2;
  --s-text-3: #b3a68c;
  --s-ok: #7fe0a8;
  --s-warn: #f4c76c;
  --s-bad: #ff9a90;
  font-family: var(--s-font-ui);
  color: var(--s-text);
}
.ncp-shell *, .ncp-shell *::before, .ncp-shell *::after { box-sizing: border-box; }
.ncp-shell a { color: inherit; text-decoration: none; }
.ncp-shell p { margin: 0; }
.ncp-shell button { margin: 0; padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ncp-shell .ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ncp-shell .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ncp-shell :focus-visible { outline: 2px solid var(--s-accent); outline-offset: 3px; border-radius: 8px; }
.ncp-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the links the router marks carry the live site's .sitebar-tab: none of its
   look (uppercase Cinzel, bottom border, its phone column layout) here */
.ncp-shell .sitebar-tab { min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  font-family: var(--s-font-ui); font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; white-space: normal; }
.ncp-shell .sitebar-tab[aria-current="page"] { border: 0; }

/* the bar */
.ncp-shell.topbar { position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 clamp(16px, 2.6vw, 40px);
  background: rgba(14, 11, 8, .62); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ncp-shell .brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 0; text-align: left; }
.ncp-shell .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.ncp-shell .brand-mark .ic { width: 19px; height: 19px; stroke-width: 1.5; color: #f6d48a; }
.ncp-shell .brand-name { font: 500 16px/1 var(--s-font-display); letter-spacing: .34em; text-transform: uppercase;
  background: linear-gradient(180deg, #fffaf0, #f2c14e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ncp-shell .groups { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: auto; }
.ncp-shell .g-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px;
  font: 600 14px/1 var(--s-font-ui); letter-spacing: .01em; color: var(--s-text-2); transition: color .2s, background .2s; }
.ncp-shell .g-link .ic { width: 16px; height: 16px; opacity: .8; }
.ncp-shell .g-link:hover, .ncp-shell .g-drop.open > .g-link { color: var(--s-text); background: rgba(255, 255, 255, .06); }
/* the current group: the page's own link, or the menu holding it (js/app-shell.js) */
.ncp-shell .g-link.is-active, .ncp-shell .g-link[aria-current="page"] { color: var(--s-ink); background: var(--s-accent); box-shadow: 0 0 20px rgba(var(--s-accent-rgb), .35); }
.ncp-shell .g-link.is-active .ic { opacity: 1; }
.ncp-shell .g-drop { position: relative; }
.ncp-shell .tools { display: flex; align-items: center; gap: 6px; }
.ncp-shell .live-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; margin-right: 4px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); font: 500 13px/1 var(--s-font-ui); color: var(--s-text-2); white-space: nowrap; }
.ncp-shell .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--s-text-3); }
.ncp-shell .dot.ok { background: var(--s-ok); box-shadow: 0 0 10px var(--s-ok); }
.ncp-shell .dot.warn { background: var(--s-warn); box-shadow: 0 0 10px var(--s-warn); }
.ncp-shell .dot.bad { background: var(--s-bad); box-shadow: 0 0 10px var(--s-bad); }
.ncp-shell .icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: var(--s-text-2); }
.ncp-shell .icon-btn:hover { color: var(--s-text); border-color: var(--s-line-2); background: rgba(255, 255, 255, .08); }
.ncp-shell [data-chat-proxy][aria-expanded="true"] { color: var(--s-ink); background: var(--s-accent); border-color: var(--s-accent); }
.ncp-shell [data-sound-proxy] .ic-off, .ncp-shell [data-sound-proxy][aria-pressed="true"] .ic-on { display: block; }
.ncp-shell [data-sound-proxy] .ic-on, .ncp-shell [data-sound-proxy][aria-pressed="true"] .ic-off { display: none; }
.ncp-shell [data-sound-proxy][aria-pressed="true"] { color: var(--s-accent); }
.ncp-shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 999px; white-space: nowrap; transition: transform .2s, box-shadow .2s; }
.ncp-shell .btn-sm { height: 36px; padding: 0 16px; font: 600 14px/1 var(--s-font-ui); }
.ncp-shell .btn-primary { color: var(--s-ink); background: linear-gradient(180deg, #ffe7ad, #f2c76a 55%, #e2a94e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 34px rgba(var(--s-accent-rgb), .32); }
.ncp-shell .btn-primary:hover { transform: translateY(-1px); }
.ncp-shell .menu-btn { display: none; margin-left: auto; }

/* the phone menu sheet */
.ncp-shell.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); display: flex; align-items: flex-end; }
.ncp-shell.sheet[hidden] { display: none; }
.ncp-shell .sheet-panel { width: 100%; max-height: 86vh; overflow: auto; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--s-line-2); background: #110e0b; box-shadow: 0 -30px 60px rgba(0, 0, 0, .5); }
.ncp-shell .sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ncp-shell .sheet-title { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--s-line-2);
  font: 600 13px/1 var(--s-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--s-text-2); }
.ncp-shell .sheet-title .ic { width: 15px; height: 15px; color: var(--s-accent); }
.ncp-shell .sheet-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.ncp-shell .sg { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; border: 1px solid var(--s-line); background: rgba(255, 255, 255, .02); }
.ncp-shell .sg[hidden] { display: none; }
.ncp-shell .sg-title { font: 700 13px/1 var(--s-font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--s-accent); margin-bottom: 6px; }
.ncp-shell .sg a { padding: 7px 0; font: 500 16px/1.2 var(--s-font-ui); color: var(--s-text); }
.ncp-shell .sheet-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ncp-shell .chip-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--s-line-2);
  font: 600 14px/1 var(--s-font-ui); color: var(--s-text-2); }

/* the dock (phones) */
.ncp-shell.dock { display: none; }
.ncp-shell [hidden] { display: none !important; }

@media (max-width: 1180px) {
  .ncp-shell .live-pill { display: none; }
}
@media (max-width: 1020px) {
  .ncp-shell .groups, .ncp-shell .tools { display: none; }
  .ncp-shell .menu-btn { display: inline-grid; }
}
@media (max-width: 760px) {
  .ncp-shell.topbar { height: 56px; }
  .ncp-shell .brand-name { font-size: 15px; letter-spacing: .3em; }
  .ncp-shell.dock { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; inset: auto 0 0; z-index: 50;
    height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
    background: rgba(14, 11, 8, .78); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border-top: 1px solid var(--s-line); }
  .ncp-shell .dock-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 14px; letter-spacing: -.01em;
    font: 600 13px/1 var(--s-font-ui); color: var(--s-text-3); }
  .ncp-shell .dock-link .ic { width: 22px; height: 22px; }
  .ncp-shell .dock-link.is-active, .ncp-shell .dock-link[aria-current="page"] { color: var(--s-accent); background: rgba(var(--s-accent-rgb), .1); }
  /* the page keeps clear of the dock */
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}
