@font-face {
  font-family: "Rubik";
  src: url("/fonts/rubik-variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --teal: #1d596b;
  --teal-soft: #26706a;
  --teal-border: #5e9aac;
  --teal-border-light: #5a96a9;
  --teal-pale: #e9f6f4;
  --mint: #92ebae;
  --mint-pale: #bdf8cb;
  --green-border: #55c24b;
  --grey-border: #9f9f9f;
  --grey-text: #5b5b5b;
  --grey-fill: #d9d9d9;
  --card: #f6fff8;
  --white: #ffffff;
  --red: #d33f3f;
  --red-border: #b12b2b;
  --purple: #7b6cf6;
  --amber: #f2b705;
  --shadow-teal: 0 7px 14px rgba(29, 89, 107, 0.2);
  --shadow-grey: 0 7px 14px rgba(0, 0, 0, 0.16);
  --shadow-btn: 0 4px 9px rgba(0, 0, 0, 0.16);
  --shadow-btn-pressed: 0 1px 3px rgba(0, 0, 0, 0.14);
  --shadow-small: 0 3px 7px rgba(0, 0, 0, 0.14);
  --shadow-small-pressed: 0 1px 2px rgba(0, 0, 0, 0.12);
  --ease-pop: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Rubik", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--teal);
  background-color: var(--mint);
  background-image: linear-gradient(180deg, var(--teal-pale) 0%, var(--teal-pale) 42%, var(--mint) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: fixed;
  line-height: 1.45;
}

#backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#login-shell, #app-shell { position: relative; z-index: 1; }

button, input { font: inherit; color: inherit; }
h1, h2 { margin: 0; color: var(--teal); font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 8px solid var(--teal-border);
  border-radius: 42px;
  box-shadow: var(--shadow-teal);
  padding: 2.4rem 2.2rem 2.2rem;
  text-align: center;
}

.auth-leaf { display: block; margin: 0 auto 10px; width: 112px; height: auto; }
.auth-wordmark { font-size: 38px; font-weight: 700; line-height: 1.1; color: var(--teal); }
.auth-kicker { font-size: 17px; font-weight: 600; color: var(--teal-soft); margin: 0.2rem 0 1.8rem; letter-spacing: 0.02em; }
.auth-title { font-size: 30px; margin-bottom: 0.6rem; }
.auth-copy { color: var(--teal-soft); font-weight: 600; font-size: 17px; line-height: 1.5; margin-bottom: 0.4rem; }
.auth-card .stack { text-align: left; }
.auth-card .btn-block { margin-top: 0.4rem; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.1rem; color: var(--teal-soft); font-weight: 700; font-size: 0.9rem; }
.passkey-list { display: grid; gap: 0.6rem; }
.passkey-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding: 0.75rem 1rem; border: 3px solid #cfe0e6; border-radius: 20px; background: var(--white); }
.passkey-info { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: #cfe0e6; }

.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 0.35rem; }
.field span { font-weight: 700; font-size: 0.95rem; color: var(--teal-soft); }

input[type="email"], input[type="text"], input[type="number"], input[type="search"], input:not([type]) {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 24px;
  border: 5px solid var(--teal-border-light);
  background: var(--white);
  color: var(--teal);
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.06);
}
input::placeholder { color: rgba(29, 89, 107, 0.4); font-weight: 500; }
input:focus { outline: none; border-color: var(--green-border); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.06), 0 0 0 4px rgba(85, 194, 75, 0.25); }
.code-input { text-align: center; font-size: 2rem; letter-spacing: 0.45em; font-weight: 700; padding-left: 1.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 5px solid transparent;
  padding: 0.6rem 1.35rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.14s var(--ease-pop), box-shadow 0.14s var(--ease-pop), filter 0.14s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: var(--shadow-btn-pressed); transition-duration: 0.06s; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-small { padding: 0.35rem 0.95rem; font-size: 0.9rem; border-width: 4px; box-shadow: var(--shadow-small); }
.btn-small:active:not(:disabled) { transform: translateY(2px); box-shadow: var(--shadow-small-pressed); }

.btn-green {
  background: linear-gradient(180deg, #5ce257 0%, #5eed60 50%, #57e257 55%, #29bc2b 100%);
  border-color: var(--green-border);
  color: var(--white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn-grey {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 62%, #c6c6c6 100%);
  border-color: var(--grey-border);
  color: var(--grey-text);
}
.btn-red {
  background: linear-gradient(180deg, #ff6b6b 0%, #ff7373 50%, #f45c5c 55%, #c92f2f 100%);
  border-color: var(--red-border);
  color: var(--white);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 auto;
  max-width: 1240px;
  padding: 0.8rem 1.6rem 1rem;
  background: var(--white);
  border: 8px solid var(--teal-border);
  border-top: 0;
  border-radius: 0 0 44px 44px;
  box-shadow: 0 6px 14px rgba(29, 89, 107, 0.14);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-leaf { width: 34px; height: auto; }
.brand-name { font-size: 1.25rem; font-weight: 700; color: var(--teal); }
.brand-thin { font-weight: 500; color: var(--teal-soft); }

.nav { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  border: 5px solid #cfe0e6;
  border-radius: 999px;
  background: var(--white);
  color: var(--teal);
  padding: 0.45rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 7px rgba(29, 89, 107, 0.1);
  flex: none;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s var(--ease-pop), box-shadow 0.16s ease;
}
.nav-link:hover { border-color: var(--teal-border); transform: translateY(-1px); }
.nav-link:active { transform: translateY(1px); box-shadow: var(--shadow-small-pressed); }
.nav-link.is-active {
  border-color: var(--green-border);
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, var(--mint-pale) 100%);
}

.session { display: flex; align-items: center; gap: 0.75rem; }
.session-email { color: var(--teal-soft); font-weight: 600; font-size: 0.92rem; }

.page { max-width: 1240px; margin: 0 auto; padding: 1.6rem 1.25rem 3rem; }
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.view-head h1 { font-size: 1.7rem; }
.view-actions { display: flex; align-items: center; gap: 0.75rem; }

.panel {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 62.6%, #ececec 100%);
  border: 6px solid var(--grey-border);
  border-radius: 34px;
  box-shadow: var(--shadow-grey);
  padding: 1.25rem 1.5rem 1.4rem;
}
.panel-teal {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, var(--mint-pale) 100%);
  border-color: var(--teal-border);
  box-shadow: var(--shadow-teal);
}
.panel-head { margin-bottom: 0.9rem; }
.panel-head h2 { font-size: 1.2rem; }
.panel-sub { color: var(--teal-soft); font-weight: 600; font-size: 0.92rem; margin-top: 0.15rem; }
.status-line { font-weight: 600; color: var(--teal-soft); margin-bottom: 0.9rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.9rem; }
.tile {
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #eaf7f0 100%);
  border: 5px solid #6c98aa;
  border-radius: 26px;
  box-shadow: 0 6px 12px rgba(29, 89, 107, 0.16);
  padding: 0.85rem 1rem 0.95rem;
}
.tile-value { font-size: 1.85rem; font-weight: 800; color: var(--teal); line-height: 1.1; }
.tile-label { font-size: 0.85rem; font-weight: 700; color: var(--teal-soft); margin-top: 0.15rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-soft);
  background: var(--white);
  border: 3px solid #cfe0e6;
}
.chip strong { color: var(--teal); margin-left: 0.4rem; }

.search { display: flex; gap: 0.6rem; align-items: center; flex: 1 1 320px; max-width: 560px; }
.search input { flex: 1; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.65rem; border-bottom: 2px solid rgba(29, 89, 107, 0.12); vertical-align: top; }
th { color: var(--teal-soft); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--teal); font-weight: 500; }
td strong { font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tr.is-clickable { cursor: pointer; }
tr.is-clickable:hover td { background: rgba(146, 235, 174, 0.22); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--teal-soft); font-weight: 500; font-size: 0.9em; }
.empty { padding: 1.2rem; text-align: center; color: var(--teal-soft); font-weight: 600; }
a { color: var(--teal); font-weight: 700; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.pager-label { color: var(--teal-soft); font-weight: 600; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2.5px solid #cfe0e6;
  background: var(--white);
  color: var(--teal-soft);
  vertical-align: middle;
}
.badge-good { border-color: var(--green-border); background: var(--mint-pale); color: #1f5a12; }
.badge-warn { border-color: var(--amber); background: #fff3c4; color: #7a5b00; }
.badge-admin { border-color: var(--purple); background: #ebe7ff; color: #4a3ac0; }
.badge-bad { border-color: var(--red-border); background: #ffe6e6; color: #8b1f1f; }

.user-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.user-name { font-size: 1.6rem; }
.user-sub { color: var(--teal-soft); font-weight: 600; margin-top: 0.2rem; }
.user-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); gap: 1.25rem; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.1rem; margin: 0; }
.facts dt { color: var(--teal-soft); font-weight: 700; font-size: 0.9rem; }
.facts dd { margin: 0; word-break: break-all; font-weight: 500; }

code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.85em; }

.banner {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(640px, calc(100% - 2rem));
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 5px solid var(--teal-border);
  background: var(--white);
  color: var(--teal);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(29, 89, 107, 0.2);
  animation: toast-in 0.26s var(--ease-pop) both;
}
.banner.is-hiding { animation: toast-out 0.2s ease forwards; }
.banner.is-error { border-color: var(--red-border); background: #ffe6e6; color: #8b1f1f; }
.banner.is-ok { border-color: var(--green-border); background: #e8fbe9; color: #1f5a12; }

@media (max-width: 720px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 0.75rem;
    border-width: 6px;
    border-radius: 0 0 28px 28px;
    padding: 0.6rem 0.9rem 0.75rem;
  }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .session { grid-column: 2; grid-row: 1; gap: 0.5rem; }
  .session-email { max-width: 10rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -0.9rem;
    padding: 0.15rem 0.9rem 0.35rem;
    scroll-padding-inline: 0.9rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: none; padding: 0.4rem 1rem; scroll-snap-align: start; }
  .auth-card { padding: 1.8rem 1.3rem 1.6rem; border-radius: 32px; }
  .page { padding: 1.1rem 0.75rem 2.5rem; }
  .view { gap: 1rem; }
  .view-head h1 { font-size: 1.4rem; }
  .view-actions { flex-wrap: wrap; }
  .search { flex-basis: 100%; max-width: none; }
  .panel { padding: 1rem 1rem 1.1rem; border-width: 5px; border-radius: 26px; }
  #boards-console .panel, #risk-console .panel { padding: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .tile { padding: 0.7rem 0.8rem 0.8rem; border-width: 4px; border-radius: 20px; }
  .tile-value { font-size: 1.45rem; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .facts dd { margin-bottom: 0.55rem; }
  table { font-size: 0.88rem; }
  th, td { padding: 0.5rem 0.45rem; }
  .btn { white-space: normal; }
  .user-name { font-size: 1.3rem; }
  .risk-filter { max-width: none; }
  .banner { border-radius: 24px; bottom: 1rem; }
}

@media (max-width: 420px) {
  .session-email { display: none; }
}

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 0.6rem; }
.perm-option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.65rem 0.8rem;
  border-radius: 20px;
  border: 3px solid #cfe0e6;
  background: var(--white);
  cursor: pointer;
}
.perm-option:has(input:checked) { border-color: var(--green-border); background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, var(--mint-pale) 100%); }
.perm-option:has(input:disabled) { opacity: 0.7; cursor: not-allowed; }
.perm-option input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; accent-color: #29bc2b; flex: none; }
.perm-option .perm-title { font-weight: 700; color: var(--teal); }
.perm-option .perm-desc { font-size: 0.82rem; color: var(--teal-soft); font-weight: 500; }

.chip-perm { border-color: var(--green-border); background: #f0fff1; color: #1f5a12; }
.chip-owner { border-color: var(--purple); background: #ebe7ff; color: #4a3ac0; }
.hint { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: var(--teal-soft); font-weight: 600; }
.badge-you { border-color: var(--teal-border); background: var(--teal-pale); color: var(--teal); }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ban-form select, .ban-form textarea, .risk-filter {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 24px;
  border: 5px solid var(--teal-border-light);
  background: var(--white);
  color: var(--teal);
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.ban-form textarea { resize: vertical; min-height: 6rem; }
.ban-form select:focus, .ban-form textarea:focus, .risk-filter:focus { outline: none; border-color: var(--green-border); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.06), 0 0 0 4px rgba(85, 194, 75, 0.25); }
.ban-form .field { align-content: start; }
.ban-form .hint { margin-top: 0; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 18px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to { opacity: 0; transform: translate(-50%, 10px) scale(0.98); }
}
@keyframes leaf-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-1.5deg); }
}

.auth-card { animation: pop-in 0.46s var(--ease-pop) both; }
.auth-leaf { animation: leaf-float 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
.topbar { animation: pop-in 0.4s var(--ease-pop) both; }

.view > :not(.view) { animation: pop-in 0.42s var(--ease-pop) both; }
.view > :nth-child(2) { animation-delay: 0.05s; }
.view > :nth-child(3) { animation-delay: 0.1s; }
.view > :nth-child(4) { animation-delay: 0.15s; }
.view > :nth-child(5) { animation-delay: 0.2s; }
.view > :nth-child(6) { animation-delay: 0.25s; }
.view > :nth-child(n + 7) { animation-delay: 0.3s; }

.tile { animation: pop-in 0.4s var(--ease-pop) both; transition: transform 0.16s var(--ease-pop), box-shadow 0.16s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 9px 16px rgba(29, 89, 107, 0.18); }
.tile:nth-child(2) { animation-delay: 0.04s; }
.tile:nth-child(3) { animation-delay: 0.08s; }
.tile:nth-child(4) { animation-delay: 0.12s; }
.tile:nth-child(5) { animation-delay: 0.16s; }
.tile:nth-child(6) { animation-delay: 0.2s; }
.tile:nth-child(7) { animation-delay: 0.24s; }
.tile:nth-child(8) { animation-delay: 0.28s; }
.tile:nth-child(9) { animation-delay: 0.32s; }
.tile:nth-child(10) { animation-delay: 0.36s; }
.tile:nth-child(11) { animation-delay: 0.4s; }
.tile:nth-child(n + 12) { animation-delay: 0.44s; }

.chip { animation: pop-in 0.36s var(--ease-pop) both; }
.chip:nth-child(2) { animation-delay: 0.03s; }
.chip:nth-child(3) { animation-delay: 0.06s; }
.chip:nth-child(4) { animation-delay: 0.09s; }
.chip:nth-child(5) { animation-delay: 0.12s; }
.chip:nth-child(6) { animation-delay: 0.15s; }
.chip:nth-child(7) { animation-delay: 0.18s; }
.chip:nth-child(8) { animation-delay: 0.21s; }
.chip:nth-child(9) { animation-delay: 0.24s; }
.chip:nth-child(10) { animation-delay: 0.27s; }
.chip:nth-child(n + 11) { animation-delay: 0.3s; }

tbody tr { animation: row-in 0.32s ease-out both; }
tbody tr:nth-child(2) { animation-delay: 0.03s; }
tbody tr:nth-child(3) { animation-delay: 0.06s; }
tbody tr:nth-child(4) { animation-delay: 0.09s; }
tbody tr:nth-child(5) { animation-delay: 0.12s; }
tbody tr:nth-child(6) { animation-delay: 0.15s; }
tbody tr:nth-child(7) { animation-delay: 0.18s; }
tbody tr:nth-child(8) { animation-delay: 0.21s; }
tbody tr:nth-child(9) { animation-delay: 0.24s; }
tbody tr:nth-child(10) { animation-delay: 0.27s; }
tbody tr:nth-child(n + 11) { animation-delay: 0.3s; }
tr.is-clickable td { transition: background 0.14s ease; }

.perm-option { transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s var(--ease-pop); }
.perm-option:hover:not(:has(input:disabled)) { transform: translateY(-1px); }
input[type="email"], input[type="text"], input[type="number"], input[type="search"], input:not([type]) { transition: border-color 0.16s ease, box-shadow 0.16s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .auth-leaf { animation: none; }
}
.board-prose { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.board-note-preview { width: min(100%, 800px); aspect-ratio: 4 / 3; object-fit: contain; background: white; border-radius: 12px; }
#boards-console .panel { padding: 24px; }
#boards-console textarea { width: 100%; min-height: 100px; font: inherit; }
#boards-console .board-audit-list { display: grid; gap: 12px; }
#boards-console .board-audit-entry { padding: 16px 18px; border: 2px solid var(--teal-border); border-radius: 18px; background: var(--white); overflow-wrap: anywhere; }
#boards-console .board-audit-entry h3 { margin: 0 0 6px; color: var(--teal); }
#boards-console .board-audit-entry p { margin: 6px 0; }
#boards-console .board-audit-meta { color: var(--teal-soft); font-size: 0.9rem; }
#boards-console .board-audit-entry details { margin-top: 10px; }
#boards-console .board-audit-entry summary { cursor: pointer; color: var(--teal); font-weight: 700; }
#boards-console .board-audit-entry code,
#boards-console .board-case-list code { overflow-wrap: anywhere; }
#boards-console .board-case-list { margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--teal-border); }
#boards-console .board-case-list h3 { margin: 0; color: var(--teal); }
#boards-console .board-case-list .panel { padding: 16px 18px; }
#boards-console .board-case-list .panel p { margin: 4px 0; overflow-wrap: anywhere; }
#boards-console .board-case-confirmation { color: var(--teal); overflow-wrap: anywhere; }
#boards-console .board-filter-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
#boards-console .board-filter-count { margin: 0; color: var(--teal); font-weight: 800; }
#boards-console .board-filter-list { display: grid; gap: 10px; }
#boards-console .board-filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 2px solid var(--teal-border); border-radius: 18px; background: var(--white); }
#boards-console .board-filter-row-content { min-width: 0; flex: 1 1 240px; overflow-wrap: anywhere; }
#boards-console .board-filter-row-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#boards-console .board-filter-row h3 { margin: 0; color: var(--teal); font-size: 1rem; }
#boards-console .board-filter-row p { margin: 3px 0 0; font-size: 0.9rem; }
#boards-console .board-filter-action { color: var(--teal-soft); font-weight: 700; }
#boards-console .board-filter-state { padding: 3px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
#boards-console .board-filter-state.is-active { background: var(--mint-pale); color: #1f5a12; }
#boards-console .board-filter-state.is-disabled { background: #ececec; color: var(--teal-soft); }
#boards-console .board-filter-form { margin-top: 8px; padding: 18px; border: 2px solid var(--teal-border); border-radius: 20px; background: var(--teal-pale); }
#boards-console .board-filter-form h3 { margin: 0; color: var(--teal); }
#boards-console .board-filter-feedback { margin: 0; color: #1f5a12; font-weight: 700; overflow-wrap: anywhere; }
#boards-console .board-filter-feedback.is-error { color: #8b1f1f; }
#boards-console .board-filter-feedback:empty { display: none; }
#boards-console .board-inline-feedback { margin: 0; color: #1f5a12; font-weight: 700; overflow-wrap: anywhere; }
#boards-console .board-inline-feedback.is-error { color: #8b1f1f; }
#boards-console .board-inline-feedback:empty { display: none; }
#boards-console .board-artwork-disclosure { border: 2px solid var(--teal-border); border-radius: 18px; background: var(--white); overflow: hidden; }
#boards-console .board-artwork-disclosure summary { padding: 12px 16px; cursor: pointer; color: var(--teal); font-weight: 800; }
#boards-console .board-artwork-disclosure summary:hover { background: var(--teal-pale); }
#boards-console .board-artwork-disclosure summary:focus-visible { outline: 3px solid var(--green-border); outline-offset: -3px; }
#boards-console .board-artwork-body { padding: 4px 16px 16px; }
#boards-console .board-artwork-preview { display: block; max-width: 100%; max-height: 300px; object-fit: contain; background: white; border-radius: 12px; }
#boards-console .board-artwork-icon { aspect-ratio: 1; }
#boards-console .board-artwork-cover { aspect-ratio: 4 / 3; }
.risk-overview { display: block; text-decoration: none; color: inherit; }
.risk-high { border-color: #c97421; background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #fff0cd 100%); color: #503617; }
.risk-error { color: #a52626; }
#risk-console .panel { padding: 24px; }
#risk-console .view-actions { flex-wrap: wrap; }
.risk-filter { max-width: 14rem; }
#boards-console .board-queue-summary { margin: 0; color: var(--teal); font-weight: 800; }
#boards-console .board-queue-summary:empty { display: none; }
#boards-console .board-report { display: grid; gap: 12px; padding: 16px 18px; border: 2px solid var(--teal-border); border-radius: 20px; background: var(--white); overflow-wrap: anywhere; }
#boards-console .board-report.is-done { padding: 10px 18px; border-color: var(--green-border); background: #f0fff1; }
#boards-console .board-report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
#boards-console .board-report-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
#boards-console .board-report-title h3 { margin: 0; color: var(--teal); font-size: 1.1rem; }
#boards-console .board-report-time { color: var(--teal-soft); font-size: 0.85rem; font-weight: 600; }
#boards-console .board-report-reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#boards-console .board-report-reasons li { padding: 8px 12px; border-left: 4px solid var(--amber); border-radius: 6px; background: #fffaf0; }
#boards-console .board-report-reason { color: var(--teal); font-weight: 700; }
#boards-console .board-report-preview { padding: 12px 14px; border-radius: 14px; background: var(--teal-pale); }
#boards-console .board-report-note { display: grid; gap: 8px; }
#boards-console .board-report-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--teal); }
#boards-console .board-report-body { margin: 0; max-height: 14em; overflow: auto; color: var(--teal); }
#boards-console .board-report-drawing { display: block; width: min(100%, 360px); aspect-ratio: 4 / 3; object-fit: contain; background: white; border-radius: 10px; border: 2px solid var(--teal-border); }
#boards-console .board-report-missing { margin: 0; color: var(--teal-soft); font-weight: 600; }
#boards-console .board-report-spoiler { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--teal-soft); font-weight: 600; }
#boards-console .board-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#boards-console .board-report-removal { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--red-border); border-radius: 16px; background: #fff5f5; }
#boards-console .board-report-removal[hidden] { display: none; }
#boards-console .board-report-done { margin: 0; color: #1f5a12; font-weight: 700; }
#boards-console .board-report-empty { margin: 0; color: var(--teal-soft); font-weight: 600; }
#boards-console .board-filter-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
#boards-console .board-filter-compare > div { padding: 10px 12px; border-radius: 12px; background: var(--teal-pale); }
#boards-console .board-filter-compare h4 { margin: 0 0 4px; color: var(--teal-soft); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
#boards-console .board-filter-compare p { margin: 0; }
#boards-console .board-report-input { padding: 0.5rem 0.9rem; border-width: 3px; border-radius: 16px; font-size: 0.95rem; }
#boards-console .board-icon { flex: none; display: inline-grid; place-items: center; object-fit: cover; border-radius: 10px; border: 2px solid var(--teal-border); background: var(--teal-pale); color: var(--teal); font-weight: 800; }
#boards-console .board-icon-small { width: 36px; height: 27px; font-size: 0.85rem; }
#boards-console .board-icon-large { width: 64px; height: 48px; border-radius: 14px; font-size: 1.3rem; }
#boards-console .board-icon.is-empty::before { content: attr(data-initial); }
#boards-console .board-list-button { justify-content: flex-start; gap: 12px; text-align: left; }
#boards-console .board-detail-title { display: flex; align-items: center; gap: 14px; }
#boards-console .board-request-details { display: grid; gap: 8px; }
#boards-console .board-request-filter { display: flex; flex-wrap: wrap; gap: 8px; }
#boards-console .board-request-filter button {
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font: inherit;
  font-weight: 700;
  color: var(--teal-soft);
  background: var(--white);
  border: 3px solid #cfe0e6;
  cursor: pointer;
}
#boards-console .board-request-filter button[aria-pressed="true"] {
  color: #1f5a12;
  background: #f0fff1;
  border-color: var(--green-border);
}
#boards-console .board-request-filter button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
#boards-console .board-request-rules summary { cursor: pointer; color: var(--teal); font-weight: 700; }
#boards-console .board-request-rules p { margin: 6px 0 0; }
.moderation-case-id { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.moderation-content { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid var(--teal); padding: 12px; }
.moderation-scores { max-height: 280px; overflow: auto; font-size: 12px; }
.moderation-threshold { display: grid; grid-template-columns: minmax(160px, 2fr) repeat(2, minmax(100px, 1fr)); gap: 12px; align-items: center; }
#moderation-console select { width: 100%; padding: 0.75rem 1rem; border-radius: 24px; border: 5px solid var(--teal-border-light); background: var(--white); color: var(--teal); font: inherit; font-weight: 600; }
#moderation-console .field:has(input[type="checkbox"]) { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
#moderation-console input[type="checkbox"] { width: 20px; height: 20px; accent-color: #29bc2b; }
@media (max-width: 600px) { .moderation-threshold { grid-template-columns: 1fr; } }
