/* The app shell's own views (App.mjs): home, export, not found. They share
   stage.css's tokens and pills; this file only lays them out and hides the
   stage while one of them is showing. */

body[data-view]:not([data-view="stage"]):not([data-view="game"]):not([data-view="run"]) :is(.loading, .stage, .gm-dashboard, .editors, .cursors) {
  display: none;
}

.shell-view {
  max-width: 480px;
  margin: 0 auto;
  padding: 72px 16px 40px;
}
.shell-view[hidden] { display: none; }

.shell-view h1 { font-size: 22px; margin: 0 0 8px; }
.shell-text { color: var(--on-surface-muted); margin: 0 0 16px; }
.shell-view a.pill { display: inline-block; text-decoration: none; }

.shell-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.shell-brand img { width: 36px; height: 36px; }
.shell-brand strong { font-size: 18px; }

.download-link { display: block; color: var(--accent-soft); font-weight: 500; overflow-wrap: anywhere; margin: 0 0 16px; }
.download-link[hidden] { display: none; }

.shell-title { font-size: 24px; margin: 0 0 8px; }
.shell-heading { font-size: 16px; margin: 28px 0 8px; }
.shell-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* The account page (views/HomeView.mjs). */
.company-list { list-style: none; margin: 0; padding: 0; }
.company-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-menu);
  background: var(--surface);
  margin-bottom: 6px;
}
.company-role { color: var(--on-surface-muted); }
.verify-note {
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--surface);
  margin: 12px 0;
}
.verify-note p { margin: 0 0 12px; }
.verify-note .pill { margin: 0 8px 8px 0; }
.verify-notice { color: var(--warn); }

/* The sign-in panel (views/SignInPanel.mjs). */
.sign-in-panel { display: flex; flex-direction: column; gap: 12px; }
/* Busy signing in (SignInPanel.setBusy_): blocked, but drawn as it was. */
.sign-in-panel.is-busy { pointer-events: none; }
.sign-in-panel .shell-text { margin: 0; }
.sign-in-google { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }

.sign-in-or { text-align: center; color: var(--on-surface-muted); margin: 0; }
.sign-in-form, .sign-in-choices { display: flex; flex-direction: column; gap: 12px; }
.sign-in-field, .shell-field { display: flex; flex-direction: column; gap: 4px; }
.sign-in-label, .shell-label { font-size: 13px; color: var(--on-surface-muted); }
.sign-in-field input, .shell-field input, .shell-field select {
  font: inherit;
  color: var(--on-surface);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-menu);
  padding: 10px 12px;
}
.sign-in-field input:focus, .shell-field input:focus, .shell-field select:focus { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: transparent; }
.sign-in-message { color: var(--err); margin: 0; }
.sign-in-message[hidden] { display: none; }
.sign-in-link {
  align-self: flex-start;
  font: inherit;
  color: var(--accent-soft);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sign-in-link:hover { text-decoration: underline; }

/* stage.css locks the page for the stage; a shell view scrolls. */
body[data-view]:not([data-view="stage"]):not([data-view="game"]):not([data-view="run"]) { overflow: auto; }

/* Crossfades between views and panel states (transitions.mjs): slower than
   the browser's 250ms default, so the change reads as a fade. */
:root { --shell-fade: 450ms; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: var(--shell-fade); }

/* The admin page (views/AdminView.mjs, AdminCompanyView.mjs, views/admin/). */
.shell-view.shell-wide { max-width: 860px; }
.admin-back { display: inline-block; margin-bottom: 12px; color: var(--accent-soft); text-decoration: none; }
.admin-back:hover { text-decoration: underline; }
.admin-section { margin-top: 32px; }
.admin-form, .admin-add { display: flex; flex-direction: column; gap: 12px; }
.admin-add { margin-top: 20px; padding: 16px; border-radius: var(--radius-tile); background: var(--surface); }
.admin-add .shell-heading { margin-top: 0; }
.admin-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0; }
.admin-inline .shell-field { flex: 1 1 200px; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-menu);
  background: var(--surface);
  margin-bottom: 6px;
}
.admin-row .shell-field { flex: 0 0 auto; }
.admin-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; flex: 1 1 240px; min-width: 0; }
.admin-person { font-weight: 500; color: var(--on-surface); overflow-wrap: anywhere; text-decoration: none; }
a.admin-person:hover { color: var(--accent-soft); }
.admin-muted { color: var(--on-surface-muted); font-size: 13px; overflow-wrap: anywhere; }
.admin-role { color: var(--on-surface-muted); }
.admin-row.is-pending .admin-person { font-style: italic; }
.is-archived { opacity: 0.6; }
.admin-quiet { padding: 7px 14px; font-size: 13px; }
.admin-quiet.is-armed { background: var(--accent); color: var(--on-accent); }
.admin-toggle { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--on-surface-muted); }
.admin-card { padding: 14px 16px; border-radius: var(--radius-tile); background: var(--surface); margin-bottom: 12px; }
.admin-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.admin-card-title { margin: 0; font-size: 17px; flex: 1 1 auto; overflow-wrap: anywhere; }
.admin-subhead { margin: 14px 0 6px; font-size: 13px; color: var(--on-surface-muted); font-weight: 500; }
.admin-rooms { list-style: none; margin: 0; padding: 0; }
.admin-rooms li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; }
.admin-room-name { flex: 1 1 auto; overflow-wrap: anywhere; }
.admin-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.admin-details dt { color: var(--on-surface-muted); }
.admin-details dd { margin: 0; overflow-wrap: anywhere; }
.admin-status { margin: 4px 0 0; color: var(--ok); }
.admin-status.is-error { color: var(--err); }
.admin-status[hidden] { display: none; }

/* The bar over a game's draft (views/DraftBar.mjs): top centre of the
   stage, above it and its menus, below the editors' dialogs. */
.draft-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 140px);
  padding: 6px 8px 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-veil);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.draft-bar:empty { display: none; }
.draft-bar-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-bar-status { color: var(--on-surface-muted); white-space: nowrap; }
.draft-bar[data-state="dirty"] .draft-bar-status { color: var(--warn); }
.draft-bar .pill { padding: 6px 14px; font-size: 13px; }
