:root {
  --header-offset: 80px;
  --site-theme: parchment;
  --bg: #f2ebdc;
  --bg-accent: #e8d9b5;
  --surface: #fffaf0;
  --surface-2: #f8f0df;
  --text: #2f2517;
  --muted: #6e5b3e;
  --line: #cfbe97;
  --brand: #8a5a1f;
  --brand-2: #4e6d43;
  --focus: #005fcc;
  --shadow: 0 14px 30px rgba(62, 43, 14, 0.16);
  --menu-panel-tint: rgba(126, 97, 48, 0.22);
  --menu-panel-tint-active: rgba(126, 97, 48, 0.12);
  --menu-head-scrim: rgba(255, 250, 242, 0.64);
  --menu-body-scrim: rgba(255, 250, 242, 0.5);
  --menu-content-shell-bg: rgba(255, 251, 242, 0.52);
  --menu-die-image: url("../../dice/leather.png");
  --auth-overlay-hi: #e6c792;
  --auth-overlay-mid: #b9833c;
  --auth-overlay-low: #8a5a1f;
  --auth-overlay-text: #23170a;
  --auth-overlay-text-muted: rgba(45, 29, 11, 0.8);
  /* Legacy CSS variable bridges — used by css/original/*.css files */
  --background: var(--surface);
  --primary: var(--brand);
}

:root[data-site-theme="evergreen"] {
  --site-theme: evergreen;
  --bg: #e7ede4;
  --bg-accent: #cfdcc8;
  --surface: #f7fbf4;
  --surface-2: #ecf4e8;
  --text: #203022;
  --muted: #49604b;
  --line: #afc6b1;
  --brand: #3f6a45;
  --brand-2: #7a5a33;
  --menu-panel-tint: rgba(54, 90, 58, 0.22);
  --menu-panel-tint-active: rgba(54, 90, 58, 0.12);
  --menu-head-scrim: rgba(244, 251, 242, 0.64);
  --menu-body-scrim: rgba(243, 250, 241, 0.52);
  --menu-content-shell-bg: rgba(243, 250, 242, 0.55);
  --menu-die-image: url("../../dice/darkGreen.png");
  --auth-overlay-hi: #d2e6c8;
  --auth-overlay-mid: #82ad77;
  --auth-overlay-low: #3f6a45;
  --auth-overlay-text: #1e3222;
  --auth-overlay-text-muted: rgba(30, 50, 34, 0.8);
}

:root[data-site-theme="harbor"] {
  --site-theme: harbor;
  --bg: #e7eef3;
  --bg-accent: #cfe0eb;
  --surface: #f7fbff;
  --surface-2: #ecf4fb;
  --text: #1d2f3d;
  --muted: #4a6477;
  --line: #b3c8d8;
  --brand: #2f6388;
  --brand-2: #7a4e2d;
  --menu-panel-tint: rgba(44, 90, 124, 0.22);
  --menu-panel-tint-active: rgba(44, 90, 124, 0.12);
  --menu-head-scrim: rgba(242, 248, 253, 0.64);
  --menu-body-scrim: rgba(241, 248, 253, 0.52);
  --menu-content-shell-bg: rgba(242, 249, 255, 0.55);
  --menu-die-image: url("../../dice/blue.png");
  --auth-overlay-hi: #c6dded;
  --auth-overlay-mid: #74a4c4;
  --auth-overlay-low: #2f6388;
  --auth-overlay-text: #182e3d;
  --auth-overlay-text-muted: rgba(24, 46, 61, 0.8);
}

:root[data-site-theme="sunforge"] {
  --site-theme: sunforge;
  --bg: #f4eee1;
  --bg-accent: #f0d8b7;
  --surface: #fffaf2;
  --surface-2: #fbeedc;
  --text: #332313;
  --muted: #7a5630;
  --line: #d7bb92;
  --brand: #b36a1e;
  --brand-2: #8a3f1f;
  --menu-panel-tint: rgba(148, 86, 28, 0.24);
  --menu-panel-tint-active: rgba(148, 86, 28, 0.14);
  --menu-head-scrim: rgba(255, 248, 236, 0.64);
  --menu-body-scrim: rgba(255, 246, 233, 0.52);
  --menu-content-shell-bg: rgba(255, 247, 235, 0.56);
  --menu-die-image: url("../../dice/orange.png");
  --auth-overlay-hi: #f1d19b;
  --auth-overlay-mid: #db9550;
  --auth-overlay-low: #b36a1e;
  --auth-overlay-text: #38220d;
  --auth-overlay-text-muted: rgba(56, 34, 13, 0.8);
}

:root[data-site-theme="highroad"] {
  --site-theme: highroad;
  --bg: #ecece9;
  --bg-accent: #d9d9d4;
  --surface: #fbfbfa;
  --surface-2: #f2f3f1;
  --text: #1f2428;
  --muted: #4f5a63;
  --line: #bcc4ca;
  --brand: #4c6475;
  --brand-2: #7a5a33;
  --menu-panel-tint: rgba(72, 92, 108, 0.22);
  --menu-panel-tint-active: rgba(72, 92, 108, 0.12);
  --menu-head-scrim: rgba(248, 249, 250, 0.66);
  --menu-body-scrim: rgba(246, 248, 249, 0.54);
  --menu-content-shell-bg: rgba(247, 249, 250, 0.56);
  --menu-die-image: url("../../dice/metallic.png");
  --auth-overlay-hi: #d8e0e6;
  --auth-overlay-mid: #90a1af;
  --auth-overlay-low: #4c6475;
  --auth-overlay-text: #1d2b36;
  --auth-overlay-text-muted: rgba(29, 43, 54, 0.8);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at top right, var(--bg-accent), transparent),
    linear-gradient(180deg, var(--bg) 0%, #ffffff 90%);
  background-repeat: no-repeat, no-repeat;
  background-position: top center, top left;
  background-size: 100% 560px, 100% 100%;
  min-height: 100vh;
}

body.standalone-mode {
  padding-top: 0;
}

body.standalone-mode .app-shell {
  min-height: 100vh;
}

body.standalone-mode .content {
  padding: 0;
}

h1,
h2,
h3 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.02em;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  border: 2px solid var(--focus);
  padding: 0.4rem 0.7rem;
  z-index: 10000;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 250;
  display: block;
  padding: 0;
  border-bottom: 1px solid rgb(from var(--brand) r g b / 0.5);
  background: rgb(from var(--surface) r g b / 0.95);
  backdrop-filter: blur(4px);
}

.app-header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 65px;
  padding: 0.45rem 1rem;
}

body {
  padding-top: 72px;
}

.brand-wrap {
  margin-left: 0.2rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 0.15rem;
  z-index: 2;
}

.brand-title {
  font-weight: 500;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.05;
  color: var(--text);
}

.brand-sub {
  font-family: "Source Serif 4", serif;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-left: 0.2rem;
  color: var(--muted);
}

.brand-tagline {
  margin-left: 0.65rem;
  margin-top: 0.2rem;
  font-size: clamp(10px, 1vw, 14px);
  line-height: 1.1;
  max-width: min(44vw, 520px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  color: var(--muted);
}

.nav-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 0.5rem;
}

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-icon {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.nav-icon:hover {
  color: color-mix(in srgb, var(--brand) 70%, black 30%);
}

#rightMenuBtn.artboard {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
  line-height: 1;
  font-size: inherit;
  box-shadow: none !important;
}

#rightMenuBtn .rghtBtnoverlay {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 280ms ease, background-color 280ms ease;
}

#rightMenuBtn .right-menu-line,
#rightMenuBtn .right-menu-line::before,
#rightMenuBtn .right-menu-line::after {
  width: 20px;
  height: 2px;
  background: var(--brand);
  content: "";
  display: block;
  position: relative;
  transition: transform 280ms ease, opacity 220ms ease;
}

#rightMenuBtn .right-menu-line::before {
  position: absolute;
  top: -6px;
  left: 0;
}

#rightMenuBtn .right-menu-line::after {
  position: absolute;
  top: 6px;
  left: 0;
}

#rightMenuBtn .rghtBtnoverlay.active {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  transform: rotate(180deg);
}

#rightMenuBtn .rghtBtnoverlay.active .right-menu-line {
  background: transparent;
}

#rightMenuBtn .rghtBtnoverlay.active .right-menu-line::before {
  transform: translateY(6px) rotate(45deg);
}

#rightMenuBtn .rghtBtnoverlay.active .right-menu-line::after {
  transform: translateY(-6px) rotate(-45deg);
}

select,
button,
input {
  font: inherit;
}

.icon-btn,
.user-actions button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.icon-btn:hover,
.user-actions button:hover {
  border-color: var(--brand);
}

.user-panel {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.5rem;
  border-radius: 0.6rem;
  display: grid;
  gap: 0.4rem;
  min-width: 230px;
}

.user-status {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.85rem;
}

.user-status span {
  color: var(--muted);
}

.user-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.user-actions .patreon {
  border-color: #dd4b39;
}

#quickMenu {
  position: fixed;
  top: calc(var(--header-offset) - 12px);
  right: 18px;
  z-index: 300;
  width: min(320px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  display: none;
}

#quickMenu.open {
  display: block;
}

#quickMenu .qm-head {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.qm-profile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.qm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 700;
}

.qm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loginWelcomeUser {
  line-height: 1.2;
  font-size: 0.92rem;
}

.loginMemberStatus {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.18rem;
}

#quickMenu .qm-body {
  padding: 0.6rem 0.75rem;
}

.qmLink {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.52rem 0.55rem;
  border-radius: 0.5rem;
}

.qmLink:hover {
  background: var(--surface-2);
}

.qmLink.pLink {
  color: var(--brand);
}

.tippy-box {
  background: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
  color: var(--surface);
  border: 1px solid color-mix(in srgb, var(--brand) 52%, var(--line) 48%);
  border-radius: 0.65rem;
  box-shadow: 0 14px 30px rgba(62, 43, 14, 0.22);
}

.tippy-box[data-placement^="top"] > .tippy-arrow::before {
  border-top-color: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
}

.tippy-box[data-placement^="bottom"] > .tippy-arrow::before {
  border-bottom-color: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
}

.tippy-box[data-placement^="left"] > .tippy-arrow::before {
  border-left-color: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
}

.tippy-box[data-placement^="right"] > .tippy-arrow::before {
  border-right-color: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
}

.tippy-content {
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--surface);
}

.tippy-box[data-theme~="light-border"] {
  background: color-mix(in srgb, var(--brand) 62%, #2a1708 38%);
  color: var(--surface);
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line) 48%);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
}

.auth-modal.open {
  display: block;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgb(from var(--brand) r g b / 0.14), transparent 48%),
    rgba(34, 24, 11, 0.56);
}

.auth-modal-dialog {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  margin: 5vh auto 0;
}

.auth-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(from var(--line) r g b / 0.75);
  border-radius: 50%;
  color: var(--text);
  background: rgb(from var(--surface) r g b / 0.88);
  box-shadow: 0 6px 16px rgba(50, 34, 12, 0.22);
  z-index: 6;
  cursor: pointer;
}

.auth-close:hover {
  background: var(--surface-2);
}

.auth_container {
  position: relative;
  min-height: 460px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 54px rgba(42, 28, 8, 0.34);
  background:
    linear-gradient(180deg, rgb(from var(--surface) r g b / 0.97), rgb(from var(--surface-2) r g b / 0.96)),
    repeating-linear-gradient(
      -45deg,
      rgb(from var(--line) r g b / 0.06) 0,
      rgb(from var(--line) r g b / 0.06) 12px,
      transparent 12px,
      transparent 24px
    );
  border: 1px solid rgb(from var(--brand) r g b / 0.34);
  color: var(--text);
}

.auth_form-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  transition: transform 0.6s ease-in-out, opacity 0.3s ease;
  background:
    linear-gradient(180deg, rgb(from var(--surface) r g b / 0.98), rgb(from var(--surface-2) r g b / 0.94));
}

.auth_sign-in-container {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 3;
}

.auth_sign-up-container {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
}

.auth_container.right-panel-active .auth_sign-in-container {
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth_container.right-panel-active .auth_sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 4;
}

.auth_form {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.auth_form h2 {
  margin: 0 0 16px;
  color: color-mix(in srgb, var(--brand) 72%, var(--text) 28%);
}

.auth_form p {
  color: var(--muted);
}

.auth_input {
  margin: 10px 0;
}

.auth_input input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgb(from var(--line) r g b / 0.9);
  background: rgb(from var(--surface) r g b / 0.94);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(from #fff r g b / 0.5);
}

.auth_input input::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.auth_input input:focus {
  outline: none;
  border-color: rgb(from var(--brand) r g b / 0.72);
  box-shadow:
    inset 0 1px 0 rgb(from #fff r g b / 0.55),
    0 0 0 3px rgb(from var(--brand) r g b / 0.14);
}

.auth_overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 5;
}

.auth_container.right-panel-active .auth_overlay-container {
  transform: translateX(-100%);
}

.auth_overlay {
  position: relative;
  left: -100%;
  width: 200%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
  background:
    radial-gradient(circle at top, rgb(from var(--surface) r g b / 0.3), transparent 38%),
    linear-gradient(135deg, var(--auth-overlay-hi) 0%, var(--auth-overlay-mid) 42%, var(--auth-overlay-low) 100%);
  color: var(--auth-overlay-text);
}

.auth_container.right-panel-active .auth_overlay {
  transform: translateX(50%);
}

.auth_overlay-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth_overlay-panel h3 {
  margin-bottom: 0.55rem;
  color: var(--auth-overlay-text);
}

.auth_overlay-panel p {
  color: var(--auth-overlay-text-muted);
}

.auth_overlay-left {
  left: 0;
}

.auth_overlay-right {
  right: 0;
}

.auth_btn,
.auth_ghost_btn {
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
  font-weight: 600;
}

.auth_btn {
  border: 1px solid color-mix(in srgb, var(--brand) 82%, #59370f 18%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 82%, #bb8643 18%), var(--brand));
  color: #fff9ef;
  box-shadow: 0 8px 18px rgba(94, 61, 20, 0.2);
}

.auth_btn:hover,
.auth_ghost_btn:hover {
  transform: translateY(-1px);
}

.auth_btn:hover {
  box-shadow: 0 10px 20px rgba(94, 61, 20, 0.26);
}

.auth_ghost_btn {
  background: rgb(from var(--surface) r g b / 0.16);
  color: var(--auth-overlay-text);
  border: 1px solid rgb(from var(--auth-overlay-text) r g b / 0.45);
}

.auth_msg {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #204a29;
  background: rgba(126, 176, 114, 0.18);
  border: 1px solid rgba(78, 122, 68, 0.3);
}

.auth_msg.auth_error {
  background: rgba(157, 72, 52, 0.14);
  border-color: rgba(157, 72, 52, 0.3);
  color: #7a2c1e;
}

.auth_alt {
  margin-top: 12px;
}

.auth_pLink {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.auth_pLink:hover {
  text-decoration: underline;
}

.app-shell {
  min-height: calc(100vh - 80px);
}

.flyout-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-offset);
  bottom: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto 1fr;
  background: color-mix(in srgb, var(--surface) 70%, var(--bg) 30%);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  opacity: 0;
  pointer-events: none;
  transition: transform 330ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
  transform-origin: left center;
}

.flyout-head {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--surface-2) 85%, white 15%);
  border-bottom: 1px solid var(--line);
}

.flyout-overlay.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.flyout-head h2 {
  margin: 0;
  font-size: 1.06rem;
}

.flyout-head input {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.5rem;
  background: var(--surface);
}

.panel-strips {
  display: flex;
  width: 100%;
  min-height: 0;
}

.menu-panel {
  --panel-bg: none;
  width: 15%;
  min-width: 0;
  position: relative;
  border-right: 1px solid var(--line);
  background-image: var(--panel-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: width 540ms cubic-bezier(0.2, 0.75, 0.25, 1), background 260ms ease;
  display: grid;
  grid-template-rows: auto 1fr;
  opacity: 0;
  transform: translateX(-42px) scale(0.985);
}

.menu-panel.active {
  width: 70%;
}

.menu-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--menu-panel-tint);
  pointer-events: none;
  transition: background 260ms ease;
}

.menu-panel.active::before {
  background: var(--menu-panel-tint-active);
}

.menu-panel > * {
  position: relative;
  z-index: 1;
}

.menu-panel:nth-child(1) {
  --panel-bg: url("../assets/menu/panel1.webp");
}

.menu-panel:nth-child(2) {
  --panel-bg: url("../assets/menu/panel2.webp");
}

.menu-panel:nth-child(3) {
  --panel-bg: url("../assets/menu/panel3.webp");
}

.flyout-overlay.open .menu-panel {
  animation: panelReveal 680ms cubic-bezier(0.14, 0.8, 0.22, 1) forwards;
}

.flyout-overlay.open .menu-panel:nth-child(1) {
  animation-delay: 0ms;
}

.flyout-overlay.open .menu-panel:nth-child(2) {
  animation-delay: 90ms;
}

.flyout-overlay.open .menu-panel:nth-child(3) {
  animation-delay: 180ms;
}

.menu-panel-head {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--menu-head-scrim);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.menu-panel-head h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-panel-body {
  overflow-y: auto;
  padding: 50px 0.75rem 0.75rem;
  background: var(--menu-body-scrim);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.menu-content-shell {
  width: min(94%, 1200px);
  background: var(--menu-content-shell-bg);
  border: 1px solid color-mix(in srgb, var(--line) 66%, white 34%);
  border-radius: 0.8rem;
  padding: 0.6rem;
  backdrop-filter: blur(2px);
}

.menu-panel:not(.active) .menu-panel-body {
  display: none;
}

.menu-panel:not(.active) .menu-panel-head {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 0;
  letter-spacing: 0.01em;
  text-transform: none;
  user-select: none;
  padding: 0.65rem 0.55rem;
}

.menu-panel:not(.active) .menu-panel-head h3 {
  font-size: 0.82rem;
}

.menu-list {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.menu-list li {
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.menu-list li:hover {
  background: var(--surface-2);
}

.menu-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.menu-link:focus-visible {
  outline: 2px solid rgb(from var(--brand) r g b / 0.55);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.menu-list strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.12rem;
}

.menu-list span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.menu-empty {
  margin: 0.7rem;
  color: var(--muted);
  font-style: italic;
}

.content {
  padding: 1rem 1.2rem;
  display: grid;
  gap: 1rem;
}

.content-page {
  max-width: 1120px;
  margin: 0 auto;
  color-scheme: light;
  /* Override Bootstrap CSS variables to match site parchment theme */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  /* Cards */
  --bs-card-bg: var(--surface);
  --bs-card-cap-bg: var(--surface-2);
  --bs-card-border-color: var(--line);
  --bs-card-color: var(--text);
  /* Buttons */
  --bs-btn-color: var(--text);
  --bs-secondary-bg: var(--surface-2);
  /* Links */
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand);
  /* Dropdowns */
  --bs-dropdown-bg: var(--surface);
  --bs-dropdown-border-color: var(--line);
  --bs-dropdown-link-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--bg-accent);
  --bs-dropdown-link-hover-color: var(--text);
  /* Inputs */
  --bs-input-bg: var(--surface);
  --bs-input-border-color: var(--line);
  --bs-input-color: var(--text);
}

.content-page-shell {
  margin-top: 1rem;
  background: var(--surface, #fff);
  border: 1px solid rgb(from var(--line, #cfbe97) r g b / 0.55);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

@media (max-width: 768px) {
  .content-page-shell {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }
}

/* Override btn-secondary to use theme alt color instead of Bootstrap grey */
.btn-primary {
  --bs-btn-bg: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-border-color: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-color: var(--background, #fff);
  --bs-btn-hover-bg: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 88%, black 12%));
  --bs-btn-hover-border-color: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 88%, black 12%));
  --bs-btn-hover-color: var(--background, #fff);
  --bs-btn-active-bg: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 92%, black 8%));
  --bs-btn-active-border-color: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 92%, black 8%));
  --bs-btn-active-color: var(--background, #fff);
  --bs-btn-disabled-bg: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-disabled-border-color: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-disabled-color: var(--background, #fff);
  --bs-btn-shadow: none;
  background-color: var(--bs-btn-bg);
  border-color: var(--bs-btn-border-color);
  color: var(--bs-btn-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--bs-btn-hover-bg);
  border-color: var(--bs-btn-hover-border-color);
  color: var(--bs-btn-hover-color);
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--bs-btn-active-bg);
  border-color: var(--bs-btn-active-border-color);
  color: var(--bs-btn-active-color);
}

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--bs-btn-disabled-bg);
  border-color: var(--bs-btn-disabled-border-color);
  color: var(--bs-btn-disabled-color);
}

.btn-outline-primary {
  --bs-btn-color: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-border-color: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-hover-bg: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-hover-border-color: var(--btn_primary, color-mix(in srgb, var(--brand) 75%, black 25%));
  --bs-btn-hover-color: var(--background, #fff);
  --bs-btn-active-bg: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 88%, black 12%));
  --bs-btn-active-border-color: var(--btn_primary-accent, color-mix(in srgb, var(--brand) 88%, black 12%));
  --bs-btn-active-color: var(--background, #fff);
  --bs-btn-shadow: none;
}

.btn-secondary {
  --bs-btn-bg: color-mix(in srgb, var(--brand) 18%, var(--surface));
  --bs-btn-border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  --bs-btn-color: color-mix(in srgb, var(--brand) 85%, black 15%);
  --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 28%, var(--surface));
  --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  --bs-btn-hover-color: color-mix(in srgb, var(--brand) 90%, black 10%);
  --bs-btn-active-bg: color-mix(in srgb, var(--brand) 35%, var(--surface));
  --bs-btn-active-border-color: color-mix(in srgb, var(--brand) 60%, var(--line));
  --bs-btn-active-color: var(--brand);
  --bs-btn-shadow: none;
}

.btn-outline-secondary {
  --bs-btn-color: var(--muted);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 10%, var(--surface));
  --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  --bs-btn-hover-color: var(--brand);
  --bs-btn-active-bg: color-mix(in srgb, var(--brand) 18%, var(--surface));
  --bs-btn-active-border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  --bs-btn-active-color: var(--brand);
}

.page-shell {
  display: grid;
  gap: 1rem;
}

.page-hero {
  border: 1px solid var(--line);
  border-left: 8px solid var(--brand);
  border-radius: 0.8rem;
  padding: 1.15rem 1.2rem;
  background:
    linear-gradient(135deg, rgb(from var(--surface) r g b / 0.96), rgb(from var(--surface-2) r g b / 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.page-hero p:last-child {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
}

.page-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--brand);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.settings-grid-account .settings-card-wide,
.settings-grid-preferences .settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgb(from var(--surface) r g b / 0.95);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.settings-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-copy,
.settings-note {
  margin: 0 0 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.settings-note {
  margin-top: 0.9rem;
}

.settings-row {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.settings-row-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.settings-row-color {
  align-items: end;
}

.settings-label {
  font-weight: 700;
  color: var(--text);
}

.settings-input,
.settings-color,
.settings-range {
  width: 100%;
}

.settings-input {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffdf7;
  color: var(--text);
  padding: 0.72rem 0.82rem;
  font: inherit;
}

.settings-input:focus,
.settings-color:focus,
.settings-range:focus {
  outline: 2px solid rgb(from var(--brand) r g b / 0.2);
  outline-offset: 2px;
}

.settings-color {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffdf7;
  padding: 0.2rem;
}

.settings-range {
  accent-color: var(--brand);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.settings-button,
.settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgb(from var(--brand) r g b / 0.45);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 78%, white 22%),
    color-mix(in srgb, var(--brand) 86%, black 14%)
  );
  color: var(--surface);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.settings-button:hover,
.settings-link:hover {
  filter: brightness(1.06);
}

.settings-hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.settings-hint.is-ok {
  color: var(--brand-2);
}

.settings-msg {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgb(from var(--brand-2) r g b / 0.35);
  border-radius: 0.7rem;
  background: rgb(from var(--brand-2) r g b / 0.1);
  color: color-mix(in srgb, var(--brand-2) 80%, black 20%);
}

.settings-msg.is-error {
  border-color: rgb(145 54 32 / 0.35);
  background: rgb(145 54 32 / 0.11);
  color: #7d2f1d;
}

.settings-meta-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.settings-meta-list div {
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgb(from var(--line) r g b / 0.7);
}

.settings-meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-meta-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.settings-meta-list dd {
  margin: 0.18rem 0 0;
  font-weight: 700;
}

.provider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.provider-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgb(from var(--line) r g b / 0.75);
  border-radius: 0.65rem;
  background: rgb(from var(--surface-2) r g b / 0.5);
}

.provider-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.provider-reconnect {
  min-height: 32px;
  padding: 0.38rem 0.72rem;
  font-size: 0.8rem;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.2rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.provider-chip.is-linked {
  border-color: rgb(from var(--brand-2) r g b / 0.5);
  background: rgb(from var(--brand-2) r g b / 0.15);
  color: color-mix(in srgb, var(--brand-2) 70%, black 30%);
}

.provider-chip.is-unlinked {
  border-color: rgb(from var(--line) r g b / 0.8);
  background: rgb(from var(--line) r g b / 0.15);
  color: var(--muted);
}

.provider-chip.is-pending {
  border-color: rgb(from var(--brand) r g b / 0.4);
  background: rgb(from var(--brand) r g b / 0.12);
  color: var(--brand);
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgb(from var(--brand) r g b / 0.13);
  color: var(--brand);
  font-size: 0.85rem;
}

.settings-swatch-group {
  display: grid;
  gap: 0.45rem;
}

.settings-swatch-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.settings-swatch-button,
.settings-swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgb(from var(--line) r g b / 0.85);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.48);
}

.settings-swatch-button {
  cursor: pointer;
  background: var(--brand);
}

.settings-swatch {
  display: inline-block;
  background: var(--brand);
}

.settings-preview {
  --prefs-accent: var(--brand);
  --prefs-die-scale: 4.5;
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at top, rgb(from var(--prefs-accent) r g b / 0.22), transparent 55%),
    linear-gradient(180deg, rgb(from var(--surface-2) r g b / 0.85), rgb(from var(--surface) r g b / 0.92));
}

.settings-preview-die {
  width: clamp(88px, calc(var(--prefs-die-scale) * 26px), 180px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #fffaf0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(145deg, rgb(from var(--prefs-accent) r g b / 0.84), rgb(from var(--prefs-accent) r g b / 0.55));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.4),
    0 14px 26px rgb(from var(--prefs-accent) r g b / 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.settings-preview-die.is-rolling {
  animation: prefsDieRoll 520ms ease;
}

.settings-preview[data-theme="wooden"] .settings-preview-die {
  background: linear-gradient(145deg, #8a5a1f, #5a3712);
}

.settings-preview[data-theme="rock"] .settings-preview-die,
.settings-preview[data-theme="rust"] .settings-preview-die {
  filter: saturate(0.7);
}

.settings-preview[data-theme="gemstone"] .settings-preview-die,
.settings-preview[data-theme="gemstoneMarble"] .settings-preview-die {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.5),
    0 16px 30px rgb(from var(--prefs-accent) r g b / 0.3);
}

@keyframes prefsDieRoll {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-10deg) scale(1.04); }
  70% { transform: rotate(12deg) scale(0.98); }
  100% { transform: rotate(0deg) scale(1); }
}

.featured {
  border: 1px solid var(--line);
  border-left: 8px solid var(--brand);
  border-radius: 0.8rem;
  padding: 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: riseIn 420ms ease;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-size: 0.78rem;
}

.featured h2 {
  margin: 0.45rem 0;
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
}

.featured p {
  margin: 0;
  line-height: 1.45;
}

.home-journal-top {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 2.1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.story-index-card {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0.8rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  min-height: 100%;
}

.story-index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.story-page-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.story-list {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.story-list-item {
  text-align: left;
  border: 1px solid rgb(from var(--line) r g b / 0.75);
  border-radius: 0.6rem;
  background: rgb(from var(--surface-2) r g b / 0.44);
  color: var(--text);
  padding: 0.55rem 0.62rem;
  cursor: pointer;
  display: grid;
  gap: 0.18rem;
}

.story-list-item:hover,
.story-list-item:focus {
  border-color: rgb(from var(--brand) r g b / 0.52);
  background: rgb(from var(--brand) r g b / 0.08);
}

.story-list-item.is-active {
  border-color: rgb(from var(--brand) r g b / 0.6);
  background: rgb(from var(--brand) r g b / 0.16);
}

.story-list-title {
  font-weight: 700;
  line-height: 1.24;
}

.story-list-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.story-pager {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.story-page-btn {
  border: 1px solid rgb(from var(--line) r g b / 0.8);
  background: rgb(from var(--surface-2) r g b / 0.5);
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.35rem 0.62rem;
  min-width: 68px;
}

.story-page-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(150px, 26%) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.95rem;
}

.featured-layout--no-image {
  grid-template-columns: 1fr;
}

.featured-copy {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.featured-meta {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.featured-media {
  margin: 0;
  min-height: 100%;
}

.featured-image {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0.65rem;
}

.featured-body {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.featured-body p,
.featured-body ul,
.featured-body ol,
.featured-body blockquote {
  margin: 0 0 0.65rem;
}

.featured-body > *:last-child {
  margin-bottom: 0;
}

.featured-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.read-more {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--brand);
  font-weight: 600;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.9rem;
}

.journal-card {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: riseIn 520ms ease;
  display: grid;
  grid-template-columns: minmax(90px, 30%) minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
}

.journal-card-media {
  width: 100%;
  height: 92px;
  margin: 0.72rem 0 0.72rem 0.72rem;
  border-radius: 0.58rem;
  overflow: hidden;
  background: rgb(from var(--surface-2) r g b / 0.62);
}

.journal-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.16);
  opacity: 0.4;
  transition: opacity 220ms ease, transform 220ms ease;
}

.journal-card--no-image {
  grid-template-columns: 1fr;
  gap: 0;
}

.journal-card--no-image .journal-card-copy {
  padding: 0.78rem 0.82rem 0.86rem;
}

.journal-card:hover .journal-card-image,
.journal-card:focus-within .journal-card-image {
  opacity: 1;
  transform: scale(1.22);
}

.journal-card-copy {
  padding: 0.78rem 0.82rem 0.86rem 0;
}

.journal-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.journal-card p {
  margin: 0;
  line-height: 1.38;
  color: var(--muted);
  font-size: 0.92rem;
}

.story-read-more {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.story-read-more:hover,
.story-read-more:focus {
  text-decoration: underline;
}

.journal-card-meta {
  margin-bottom: 0.38rem !important;
  color: color-mix(in srgb, var(--muted) 80%, black 20%);
  font-size: 0.8rem !important;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 0.9rem;
}

.app-launch-panel-wide {
  grid-column: span 2;
}

.home-bragger {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, rgb(from var(--surface) r g b / 0.96), rgb(from var(--surface-2) r g b / 0.94));
  box-shadow: var(--shadow);
  padding: 0.8rem 0.9rem 0.9rem;
}

.home-bragger .brg-head {
  margin-bottom: 0.55rem;
}

.home-bragger .brg-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 0.95rem;
}

.home-bragger .brg-tile {
  width: clamp(58px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  color: var(--text);
}

.home-bragger .brg-tile.is-loading {
  width: 100%;
  color: var(--muted);
}

.home-bragger .brg-img {
  width: clamp(30px, 4.1vw, 48px);
  height: clamp(30px, 4.1vw, 48px);
  object-fit: contain;
  display: block;
  margin: 0 auto 0.2rem;
  filter: drop-shadow(0 2px 4px rgba(46, 32, 11, 0.18));
}

.home-bragger .brg-count {
  font-weight: 800;
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  line-height: 1.12;
  color: var(--brand);
}

.home-bragger .brg-label {
  margin-top: 0.08rem;
  font-size: 0.7rem;
  line-height: 1.15;
  color: var(--muted);
}

.site-footer {
  margin-top: 1rem;
  border: 0;
  border-top: 3px solid var(--brand);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.site-footer .container-fluid {
  padding: 0.9rem 1rem;
}

.footer-menu-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.footer-menu-col {
  margin: 0 !important;
  min-width: 0;
}

.footer-cat-block + .footer-cat-block {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dotted color-mix(in srgb, var(--line) 75%, transparent 25%);
}

.footer-cat-title {
  margin: 0 0 0.26rem;
  font-size: 0.86rem;
  line-height: 1.2;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link-item + .footer-link-item {
  margin-top: 0.1rem;
}

.footer-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.77rem;
  line-height: 1.2;
}

.footer-link .supporter-star {
  margin-right: 0.25rem;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--brand);
  text-decoration: underline;
}

.supporter-star {
  color: color-mix(in srgb, var(--brand) 72%, #f6c768 28%);
  font-size: 0.72rem;
  line-height: 1;
}

.footer-connect-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.08rem;
}

.footer-connect-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--line) 80%, black 20%);
  border-radius: 999px;
  color: var(--text);
  background: rgb(from var(--surface) r g b / 0.94);
  text-decoration: none;
}

.footer-connect-btn:hover,
.footer-connect-btn:focus {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line) 45%);
  box-shadow: 0 3px 8px rgb(from var(--brand) r g b / 0.15);
}

.footer-connect-meta {
  margin-top: 0.45rem;
}

.footer-connect-email {
  color: var(--text);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 700;
}

.footer-connect-email:hover,
.footer-connect-email:focus {
  color: var(--brand);
  text-decoration: underline;
}

.footer-connect-note {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.footer-contact-bar {
  border-top: 1px solid var(--line);
  background: rgb(from var(--surface-2) r g b / 0.9);
  color: var(--muted);
  padding: 0.44rem 0.7rem;
  font-size: 0.76rem;
  line-height: 1.25;
}

.footer-brand-link,
.footer-contact-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.footer-brand-link:hover,
.footer-brand-link:focus,
.footer-contact-link:hover,
.footer-contact-link:focus {
  text-decoration: underline;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  padding: 0.72rem;
  box-shadow: var(--shadow);
  animation: riseIn 500ms ease;
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.panel p {
  margin: 0;
  line-height: 1.25;
  font-size: 0.84rem;
  color: var(--muted);
}

.home-last-session-list {
  list-style: none;
  margin: 0.38rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.home-last-session-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.home-last-session-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.26rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, black 20%);
  border-radius: 0.56rem;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgb(from var(--surface) r g b / 0.9), rgb(from var(--surface-2) r g b / 0.95));
}

.home-last-session-link:hover,
.home-last-session-link:focus {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line) 50%);
  box-shadow: 0 4px 10px rgb(from var(--brand) r g b / 0.12);
  text-decoration: none;
}

.home-last-session-title {
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.15;
}

.home-last-session-meta {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.34rem;
  margin-top: 0.18rem;
}

.app-launch-link {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 33px;
  padding: 0.2rem 0.36rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, black 20%);
  border-radius: 0.6rem;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgb(from var(--surface) r g b / 0.9), rgb(from var(--surface-2) r g b / 0.95));
}

.app-launch-link:hover,
.app-launch-link:focus {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line) 50%);
  box-shadow: 0 4px 10px rgb(from var(--brand) r g b / 0.14);
  text-decoration: none;
}

.app-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  min-height: 32px;
  font-size: 32px !important;
  line-height: 32px !important;
  transform: none;
  color: var(--brand);
  flex: 0 0 auto;
  left: 0 !important;
  top: 0 !important;
}

.app-launch-link .app-launch-icon::before {
  font-size: 32px !important;
  line-height: 32px !important;
}

.app-launch-link .ra-nudgeLeftLess {
  left: 0 !important;
}

.app-launch-link .ra-nudgeDown {
  top: 0 !important;
}

.app-launch-label {
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1.2;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateX(-42px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1240px) {
  .app-header .container-fluid {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }

  .brand-tagline {
    max-width: min(62vw, 640px);
  }

  .dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .footer-menu-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-launch-panel-wide {
    grid-column: span 2;
  }

  .app-launch-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-last-session-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-bragger .brg-wrap {
    justify-content: flex-start;
  }

  .home-journal-top {
    grid-template-columns: 1fr;
  }

  .featured-layout {
    grid-template-columns: minmax(140px, 30%) minmax(0, 1fr);
  }

  .journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-strips {
    flex-direction: column;
    height: auto;
  }

  .flyout-overlay {
    overflow-y: auto;
  }

  .menu-panel,
  .menu-panel.active {
    width: 100%;
    min-height: 0;
    height: auto;
  }

  .menu-panel:not(.active) .menu-panel-head {
    height: auto;
    writing-mode: horizontal-tb;
    transform: none;
    border-bottom: 1px solid var(--line);
    text-transform: none;
    letter-spacing: 0.02em;
    justify-content: flex-start;
  }

  .menu-panel-head {
    min-height: 0;
  }

  .menu-panel-body {
    overflow: visible;
    max-height: none;
    height: auto;
    display: block;
    padding: 0.9rem 0.75rem 0.75rem;
  }

  .menu-panel:not(.active) .menu-panel-body {
    display: block;
  }

  .menu-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .app-header .container-fluid {
    flex-wrap: nowrap;
    min-height: 65px;
  }

  body {
    padding-top: 72px;
  }

  .brand-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-title {
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-sub,
  .brand-tagline,
  .tool-label,
  #rightMapBtn {
    display: none;
  }

  .nav-right {
    margin-left: auto;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  #quickMenu {
    top: var(--header-offset);
    right: 8px;
  }

  .auth-modal-dialog {
    margin-top: 10px;
  }

  .auth_container {
    min-height: 620px;
  }

  .auth_form-container,
  .auth_overlay-container {
    width: 100%;
    left: 0;
  }

  .auth_overlay-container {
    display: none;
  }

  .auth_sign-in-container,
  .auth_sign-up-container,
  .auth_container.right-panel-active .auth_sign-in-container,
  .auth_container.right-panel-active .auth_sign-up-container {
    transform: none;
  }

  .auth_sign-up-container {
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .auth_container.right-panel-active .auth_sign-up-container {
    display: flex;
  }

  .auth_container.right-panel-active .auth_sign-in-container {
    display: none;
  }

  .flyout-head {
    flex-wrap: wrap;
  }

  .flyout-head input {
    min-width: 100%;
  }

  .menu-panel,
  .menu-panel.active {
    min-height: 24vh;
  }

  .menu-list {
    grid-template-columns: 1fr;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .footer-menu-row {
    grid-template-columns: 1fr;
  }

  .site-footer .container-fluid {
    padding: 0.75rem 0.8rem;
  }

  .app-launch-panel-wide {
    grid-column: span 1;
  }

  .app-launch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-last-session-list {
    grid-template-columns: 1fr;
  }

  .home-bragger {
    padding-inline: 0.75rem;
  }

  .home-bragger .brg-wrap {
    gap: 0.7rem;
  }

  .home-bragger .brg-tile {
    width: calc(25% - 0.7rem);
    min-width: 62px;
  }

  .featured-layout {
    grid-template-columns: 1fr;
  }

  .featured-image {
    height: auto;
    max-height: 220px;
  }

  .journal-card {
    grid-template-columns: 1fr;
  }

  .journal-card-media {
    width: calc(50% - 1.44rem);
    height: 100px;
    margin: 0.72rem;
  }

  .journal-card-image {
    transform: scale(1.14);
  }

  .journal-card-copy {
    padding: 0 0.82rem 0.86rem;
  }

  .journal-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .settings-row-split,
  .settings-preview {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #000;
    --muted: #000;
    --line: #777;
    --shadow: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .app-header,
  .flyout-overlay,
  .skip-link,
  #menu-toggle,
  #leftMenuBtn,
  #menu-close,
  #print-main,
  .tool-label {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .content {
    padding: 0;
  }

  .featured,
  .panel,
  .page-hero,
  .settings-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #777;
  }
}
