:root {
  --ink: #2d2624;
  --muted: #655b56;
  --paper: #f5f3f0;
  --paper-deep: #e8e2d8;
  --surface: #ffffff;
  --accent: #8a1c14;
  --accent-dark: #69150f;
  --line: #d9d0c5;
  --shadow: 0 14px 34px rgba(57, 39, 30, 0.1);
}

html { overflow-y: scroll !important; }

body { min-height: 100vh; overflow-y: visible; }

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Cambria, Georgia, serif;
  line-height: 1.55;
  margin: 0;
}
 #test-mode-banner { position: static !important; }

.notice-modal { align-items: center; display: none; inset: 0; justify-content: center; position: fixed; z-index: 10001; }
.notice-modal.active { display: flex; }
.notice-modal-overlay { background: rgba(20, 15, 10, 0.55); cursor: pointer; inset: 0; position: absolute; }
.notice-modal-box { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 4px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); max-width: 420px; padding: 26px 30px; position: relative; width: calc(100% - 40px); }
.notice-modal-box.error { border-color: #9f1d1d; }
.notice-modal-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 4px; position: absolute; right: 8px; top: 8px; }
.notice-modal-message { color: var(--ink); padding-right: 10px; }
.notice-modal-message a { color: var(--accent); font-weight: 600; }

.site-header {
  background: #92928c;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 4px 20px rgba(57, 39, 30, 0.08);
}

.brand-bar {
  align-items: center;
  background: #92928c;
  display: flex;
  justify-content: center;
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

.brand-bar img {
  display: block;
  height: auto;
  max-height: 112px;
  max-width: none;
  object-fit: contain;
  width: 100%;
}

.site-nav {
  background: var(--ink);
  color: #fff;
}

.nav-inner {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
  min-height: 56px;
  padding: 8px 20px;
}

.nav-links, .account-links { align-items: center; display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links, .account-links { justify-content: center; width: 100%; }

.nav-links a, .account-links a, .account-links button {
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 10px;
  text-decoration: none;
}

.nav-links a:hover, .nav-links a[aria-current="page"], .account-links a:hover, .account-links button:hover { background: rgba(255, 255, 255, 0.14); }
.menu-lock { font-size: 0.75em; vertical-align: 0.05em; }

.account-links { border-top: 1px solid rgba(255, 255, 255, 0.18); color: #f5e8df; padding-top: 6px; }
.auth-status { font-size: 0.84rem; padding: 0 8px; }
.auth-status strong { color: #fff; }
.auth-role-badge { background: #b78d54; border-radius: 3px; color: #201815; font-size: 0.72rem; font-weight: bold; margin-left: 6px; padding: 3px 6px; text-transform: uppercase; }

.page-main { margin: 0 auto; max-width: 1100px; padding: 44px 20px 68px; }
.page-heading { border-bottom: 2px solid var(--accent); color: var(--accent); font-size: 1.7rem; font-weight: normal; margin: 0 0 26px; padding-bottom: 10px; }
.page-main > .text-link + .page-heading { margin-top: 20px; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 24px; }
.content-card h2 { color: var(--accent); font-size: 1.2rem; margin: 0 0 8px; }
.content-card p { color: var(--muted); margin: 0 0 18px; }
.action { background: var(--accent); border: 1px solid var(--accent); border-radius: 3px; color: #fff; display: inline-block; font-weight: 600; margin-top: auto; padding: 9px 13px; text-decoration: none; }
.action:hover { background: var(--accent-dark); }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
[data-access] { display: none; }

@media (max-width: 720px) {
  .brand-bar img { max-height: 82px; }
  .nav-inner { align-items: stretch; flex-direction: column; padding: 8px 12px; }
  .nav-links, .account-links { justify-content: center; }
  .account-links { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 8px; }
  .nav-links a, .account-links a, .account-links button { font-size: 0.88rem; padding: 7px 8px; }
  .page-main { padding: 30px 14px 46px; }
}
