:root {
  --ink: #27313d;
  --muted: #667487;
  --line: #dce7e5;
  --paper: #fffdfb;
  --surface: #ffffff;
  --mint: #bdebdc;
  --mint-strong: #1f8f78;
  --berry: #b98aae;
  --berry-strong: #7c3f68;
  --coral: #f4a694;
  --sun: #f8dd9f;
  --blue: #d6e8f8;
  --danger: #a43d3d;
  --shadow: 0 18px 46px rgba(40, 57, 72, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f7fbf8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--berry-strong);
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 251, 0.94);
  border-bottom: 1px solid rgba(124, 63, 104, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--berry-strong);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.nav button,
.ghost-button,
.text-button {
  border: 0;
  color: var(--ink);
  background: transparent;
}

.nav button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: var(--berry-strong);
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}

.user-pill span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-button {
  position: relative;
}

.inbox-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--coral);
  color: #5e2d23;
  font-size: 0.78rem;
  font-weight: 900;
}

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

.section {
  padding: clamp(26px, 5vw, 72px) clamp(18px, 4vw, 56px);
}

.section.tight {
  padding-top: 26px;
}

.inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: min(700px, calc(100vh - 86px));
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #fffdfb;
  border-bottom: 1px solid rgba(124, 63, 104, 0.12);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 253, 251, 0.99) 0%, rgba(255, 253, 251, 0.93) 31%, rgba(255, 253, 251, 0.54) 54%, rgba(255, 253, 251, 0.2) 78%, rgba(255, 253, 251, 0.34) 100%),
    linear-gradient(0deg, rgba(255, 253, 251, 0.94) 0%, rgba(255, 253, 251, 0.28) 24%, rgba(255, 253, 251, 0.02) 54%);
}

.hero .inner {
  position: static;
}

.hero-layout {
  display: block;
}

.hero-content {
  width: min(680px, 100%);
  position: relative;
  z-index: 2;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  opacity: 0.9;
}

.hero-next-event {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: min(520px, 100%);
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 143, 120, 0.22);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.84);
  box-shadow: 0 16px 42px rgba(32, 49, 61, 0.08);
  backdrop-filter: blur(10px);
}

.hero-next-event span {
  color: #135e50;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-next-event strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.hero-next-event small {
  color: var(--muted);
  font-weight: 700;
}

.eyebrow {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(31, 143, 120, 0.25);
  border-radius: 999px;
  background: rgba(189, 235, 220, 0.74);
  color: #135e50;
  font-size: 0.82rem;
  font-weight: 800;
}

.eyebrow + h1,
.eyebrow + h2 {
  margin-top: clamp(16px, 2vw, 22px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: clamp(18px, 2.4vw, 26px);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: clamp(14px, 1.8vw, 20px);
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.25;
}

p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

p + p {
  margin-top: 16px;
}

.lead {
  max-width: 620px;
  color: #3e4d5b;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.62;
}

.lead + .grid,
.lead + .rules-list {
  margin-top: clamp(32px, 4vw, 46px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 3vw, 38px);
}

.button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  color: #fff;
  background: var(--berry-strong);
}

.button:hover {
  background: #693257;
}

.secondary-button {
  color: #175d50;
  border-color: rgba(31, 143, 120, 0.26);
  background: rgba(189, 235, 220, 0.78);
}

.secondary-button:hover {
  background: #aee2d0;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.ghost-button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.text-button {
  color: var(--berry-strong);
  font-weight: 800;
}

.grid {
  display: grid;
  gap: clamp(24px, 3vw, 34px);
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

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

.panel,
.item,
.form-panel {
  border: 1px solid rgba(103, 119, 132, 0.16);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(40, 57, 72, 0.06);
}

.panel,
.form-panel {
  padding: clamp(24px, 3.5vw, 38px);
}

.item {
  padding: clamp(22px, 3vw, 30px);
}

.item.soft-mint {
  background: #f2fcf8;
}

.item.soft-berry {
  background: #fbf6fa;
}

.item.soft-sun {
  background: #fffaf0;
}

.rules-list {
  display: grid;
  gap: 16px;
  width: min(920px, 100%);
  margin-top: 34px;
}

.rule-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 6px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(103, 119, 132, 0.16);
  border-left: 5px solid var(--mint-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(40, 57, 72, 0.06);
}

.rule-card:nth-child(2n) {
  border-left-color: var(--berry-strong);
}

.rule-number {
  grid-row: 1 / span 2;
  align-self: start;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #135e50;
  background: rgba(189, 235, 220, 0.78);
  font-weight: 900;
}

.rule-card:nth-child(2n) .rule-number {
  color: var(--berry-strong);
  background: #eeddeb;
}

.rule-card h3 {
  margin-bottom: 2px;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
}

.rule-card p {
  max-width: 72ch;
  margin-bottom: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.tag {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f4f6f7;
  color: #485868;
  font-size: 0.8rem;
  font-weight: 800;
}

.tag + h2,
.tag + h3 {
  margin-top: 14px;
}

.tag.mint {
  color: #135e50;
  background: var(--mint);
}

.tag.berry {
  color: var(--berry-strong);
  background: #eeddeb;
}

.tag.coral {
  color: #6f3428;
  background: #fde2dc;
}

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

.form-panel h2,
.panel h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #4a5a69;
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfdcda;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--berry-strong);
  box-shadow: 0 0 0 3px rgba(185, 138, 174, 0.22);
}

.split-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.tab-list {
  display: grid;
  gap: 8px;
}

.tab-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.tab-button.active,
.tab-button:hover {
  border-color: rgba(124, 63, 104, 0.28);
  background: #fbf6fa;
  color: var(--berry-strong);
}

.topic-list {
  display: grid;
  gap: 10px;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(103, 119, 132, 0.16);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.topic-row:hover {
  border-color: rgba(31, 143, 120, 0.34);
  box-shadow: 0 8px 22px rgba(40, 57, 72, 0.08);
}

.topic-row strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.topic-body,
.reply-body {
  white-space: pre-wrap;
  color: #405060;
  line-height: 1.65;
}

.reply-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.reply {
  padding: 16px;
  border-left: 4px solid var(--mint-strong);
  border-radius: 8px;
  background: #f7fcfa;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.admin-table th,
.admin-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #4c5b69;
  background: #f5f8f7;
  font-size: 0.82rem;
}

.notice {
  border: 1px solid rgba(244, 166, 148, 0.48);
  border-radius: 8px;
  background: #fff7f4;
  color: #5c382f;
  padding: 14px 16px;
  line-height: 1.55;
}

.empty {
  padding: 24px;
  border: 1px dashed #cfdcda;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--muted);
  text-align: center;
}

.empty.compact {
  padding: 14px;
  text-align: left;
}

.event-block {
  margin-top: 24px;
}

.event-block h3,
.builder-head h3 {
  margin-bottom: 12px;
  color: #344454;
}

.agenda-board,
.content-list,
.message-list,
.category-list {
  display: grid;
  gap: 12px;
}

.agenda-slot {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.agenda-slot.parallel {
  background: #f8fbfa;
}

.agenda-slot-time {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--berry-strong);
}

.agenda-slot-time strong {
  font-size: 0.96rem;
}

.agenda-slot-time span {
  color: var(--muted);
}

.agenda-track-grid {
  display: grid;
  grid-template-columns: repeat(var(--track-count, 1), minmax(0, 1fr));
  gap: 12px;
}

.agenda-slot-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.agenda-full-row {
  display: grid;
  gap: 10px;
}

.agenda-matrix {
  display: grid;
  grid-template-columns: repeat(var(--track-count, 1), minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
  width: max(100%, calc(var(--track-count, 1) * 180px));
}

.agenda-track-column {
  min-width: 0;
  border: 1px solid rgba(103, 119, 132, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.agenda-track-title {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(103, 119, 132, 0.14);
  background: rgba(189, 235, 220, 0.42);
  color: #135e50;
  font-size: 0.84rem;
  font-weight: 900;
}

.agenda-track-stack {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.agenda-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(103, 119, 132, 0.16);
  border-radius: 8px;
  background: #fbfdfc;
}

.agenda-card.pause {
  background: #fffaf0;
}

.agenda-card.workshop {
  background: #f2fcf8;
}

.agenda-card.lecture {
  background: #f5f8fb;
}

.agenda-card.wordcafe {
  background: #fbf6fa;
}

.agenda-card-head {
  margin-bottom: 10px;
}

.agenda-card h4,
.content-item h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.38;
}

.agenda-card p {
  margin-bottom: 8px;
  line-height: 1.68;
}

.agenda-card-ghost {
  opacity: 0.65;
}

.content-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.content-item {
  padding: 16px;
  border: 1px solid rgba(185, 138, 174, 0.28);
  border-radius: 8px;
  background: #fbf6fa;
}

.builder-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.builder-list {
  display: grid;
  gap: 12px;
}

.agenda-editor {
  display: grid;
  gap: 16px;
}

.agenda-track-config {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
}

.agenda-editor-slot {
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.agenda-slot-editor-time {
  display: grid;
  align-content: start;
  gap: 8px;
}

.agenda-slot-editor-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.agenda-slot-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agenda-editor-tracks {
  display: grid;
  grid-template-columns: repeat(var(--track-count, 1), minmax(170px, 1fr));
  gap: 12px;
  overflow-x: auto;
  width: max(100%, calc(var(--track-count, 1) * 210px));
}

.agenda-editor-track,
.agenda-full-drop {
  min-width: 0;
  border: 1px dashed rgba(103, 119, 132, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.agenda-full-drop {
  display: grid;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
}

.agenda-full-drop:empty::before {
  content: "Vollbreite: Begrüßung, Pause, Plenum";
  color: var(--muted);
  font-size: 0.88rem;
}

.agenda-editor-track .agenda-dropzone {
  display: grid;
  gap: 10px;
  min-height: 96px;
  padding: 10px;
}

.agenda-editor-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(103, 119, 132, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(40, 57, 72, 0.06);
}

.agenda-editor-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  border-radius: 8px;
  background: #f1f6f5;
  color: #667487;
  font-weight: 900;
  cursor: grab;
  user-select: none;
}

.agenda-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.builder-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.builder-row textarea {
  grid-column: 1 / -2;
  min-height: 76px;
}

.builder-row .ghost-button {
  align-self: end;
}

.agenda-row {
  grid-template-columns: minmax(76px, 0.58fr) minmax(76px, 0.58fr) minmax(150px, 1.1fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr) minmax(120px, 0.85fr);
}

.agenda-row textarea {
  grid-column: 1 / -2;
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.row-actions .ghost-button {
  min-width: 0;
  padding: 0 8px;
}

.content-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.content-row textarea {
  grid-column: 1 / -2;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.role-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.request-approval,
.user-admin-tools {
  display: grid;
  gap: 10px;
}

.request-approval {
  min-width: min(280px, 100%);
}

.user-admin-tools {
  min-width: min(420px, 100%);
}

.user-admin-tools > button,
.user-admin-tools > span {
  justify-self: start;
}

.message-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-item.unread {
  border-color: rgba(31, 143, 120, 0.35);
  background: #f2fcf8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translateX(-50%) translateY(140%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #27313d;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.footer {
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-page {
  max-width: 920px;
}

.legal-page h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
}

.legal-page h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.legal-page p,
.legal-page li {
  line-height: 1.72;
}

.legal-card {
  margin-top: 18px;
}

.legal-card:first-of-type {
  margin-top: 28px;
}

.legal-shell .nav {
  justify-self: center;
}

.legal-shell .account-actions {
  min-height: 1px;
}

.muted a,
.footer a {
  color: inherit;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .nav,
  .account-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .grid.two,
  .grid.three,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    background: #fffdfb;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 253, 251, 0.48) 0%, rgba(255, 253, 251, 0.96) 44%, rgba(255, 253, 251, 0.99) 100%),
      linear-gradient(90deg, rgba(255, 253, 251, 0.96) 0%, rgba(255, 253, 251, 0.72) 100%);
  }

  .hero-content {
    padding-top: clamp(170px, 35vw, 280px);
  }

  .hero-media img {
    object-position: 62% top;
    opacity: 0.72;
  }

  .builder-row,
  .content-row,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .agenda-row,
  .row-actions {
    grid-template-columns: 1fr;
  }

  .builder-row textarea,
  .content-row textarea {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 24px 14px;
  }

  .hero {
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .hero-content {
    padding-top: clamp(190px, 58vw, 260px);
  }

  h1 {
    line-height: 1.08;
  }

  .topbar {
    padding: 12px 14px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    border-radius: 8px;
  }

  .nav button {
    min-width: 0;
    padding: 0 8px;
  }

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

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

  .agenda-slot {
    grid-template-columns: 1fr;
  }

  .agenda-track-grid,
  .agenda-matrix,
  .agenda-editor-slot,
  .agenda-editor-tracks,
  .agenda-track-config,
  .agenda-card-fields {
    grid-template-columns: 1fr;
  }

  .agenda-slot-editor-head {
    display: grid;
  }

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

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

  .rule-number {
    grid-row: auto;
  }

  .button,
  .secondary-button,
  .danger-button,
  .ghost-button {
    width: 100%;
  }
}

/* Mobile-first exchange and participant management */
.forum-layout {
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 88px;
}

.quick-stats,
.participant-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.quick-stats > div,
.stat-pill {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffdf9;
  text-align: left;
}

.quick-stats strong,
.stat-pill strong {
  display: block;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  line-height: 1;
  color: var(--ink);
}

.quick-stats span,
.stat-pill span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-pill {
  cursor: pointer;
  font: inherit;
}

.stat-pill.active {
  border-color: rgba(31, 143, 120, 0.42);
  background: #eefbf6;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 120, 0.18);
}

.compact-tabs {
  max-height: min(46vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.stacked-actions {
  display: grid;
  gap: 10px;
}

.exchange-hero,
.participant-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.exchange-highlights {
  display: grid;
  gap: 10px;
}

.mini-topic {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.mini-topic strong,
.mini-topic span {
  display: block;
}

.mini-topic span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.composer-head,
.participant-main,
.participant-status-block,
.participant-notes,
.event-participant-summary > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.composer-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.modern-topic-list,
.participant-list,
.event-participant-summary {
  display: grid;
  gap: 12px;
}

.modern-topic-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
}

.topic-avatar,
.participant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e8f6ef, #fff0db);
  color: var(--ink);
  font-weight: 800;
  flex: 0 0 auto;
}

.topic-copy,
.topic-metrics {
  display: grid;
  gap: 5px;
}

.topic-metrics {
  justify-items: end;
}

.reply-count {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.reply-count strong,
.reply-count small {
  display: block;
}

.participant-panel {
  overflow: hidden;
}

.participant-actions {
  justify-content: end;
}

.event-participant-summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 14px 0 18px;
}

.event-participant-summary > div {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffdf9;
}

.event-participant-summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.participant-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.participant-card h3 {
  margin: 0 0 4px;
}

.participant-card p {
  margin: 4px 0;
}

.participant-status-block {
  justify-content: end;
  flex-wrap: wrap;
}

.participant-notes {
  grid-column: 1 / -1;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
}

.participant-notes small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .sticky-panel {
    position: static;
  }

  .exchange-hero,
  .participant-head,
  .participant-card {
    grid-template-columns: 1fr;
  }

  .participant-actions,
  .participant-status-block,
  .topic-metrics {
    justify-content: start;
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .quick-stats,
  .participant-stats {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .quick-stats > div,
  .stat-pill {
    min-width: 118px;
    scroll-snap-align: start;
  }

  .modern-topic-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .topic-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
  }

  .participant-main,
  .participant-notes,
  .composer-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .participant-status-block {
    display: grid;
    grid-template-columns: 1fr;
  }

  .participant-status-block select,
  .participant-status-block button {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .panel:has(.admin-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 680px;
  }

  .role-form {
    grid-template-columns: 1fr;
  }
}

.launch-banner {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(31, 143, 120, 0.25);
  border-radius: 16px;
  background: rgba(242, 252, 248, 0.92);
  box-shadow: 0 12px 28px rgba(35, 49, 61, 0.08);
}

.launch-banner .tag {
  justify-self: start;
}

.launch-banner small {
  color: var(--muted);
}

/* 2026 visible public redesign override */
body {
  background: radial-gradient(circle at 10% 0%, rgba(189, 235, 220, 0.28), transparent 28%), #f3f7f4;
}

.topbar {
  background: rgba(26, 39, 50, 0.94);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}

.brand small,
.topbar .muted {
  color: rgba(255,255,255,0.72);
}

.brand-mark {
  background: linear-gradient(135deg, #1f8f78, #7c3f68);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

.nav {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
}

.nav button {
  color: rgba(255,255,255,0.74);
}

.nav button.active,
.nav button:hover {
  color: #15202b;
  background: #bdebdc;
}

.public-redesign-2026 {
  min-height: min(760px, calc(100vh - 74px));
  color: #fff;
  background:
    linear-gradient(135deg, rgba(20, 34, 46, 0.95), rgba(28, 55, 58, 0.9)),
    radial-gradient(circle at 84% 20%, rgba(248, 221, 159, 0.45), transparent 28%);
}

.public-redesign-2026::after {
  background:
    linear-gradient(90deg, rgba(20, 34, 46, 0.98) 0%, rgba(20,34,46,0.86) 46%, rgba(20,34,46,0.42) 100%);
}

.public-redesign-2026 .hero-media img {
  opacity: 0.42;
  mix-blend-mode: screen;
  filter: saturate(0.9) contrast(1.05);
}

.public-redesign-2026 .eyebrow {
  color: #16242d;
  background: #bdebdc;
  border-color: rgba(255,255,255,0.2);
}

.public-redesign-2026 h1 {
  max-width: 860px;
  color: #fff;
  font-size: clamp(2.4rem, 8vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.public-redesign-2026 .lead {
  max-width: 760px;
  color: rgba(255,255,255,0.82);
  font-size: clamp(1.08rem, 2.5vw, 1.35rem);
}

.public-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 850px;
  margin: 24px 0;
}

.public-status-strip > div {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  background: rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
}

.public-status-strip strong,
.public-status-strip span {
  display: block;
}

.public-status-strip strong {
  color: #fff;
  font-size: 1rem;
}

.public-status-strip span {
  margin-top: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
}

.public-redesign-2026 .button {
  background: #bdebdc;
  color: #10251f;
  box-shadow: 0 20px 46px rgba(0,0,0,0.24);
}

.public-redesign-2026 .secondary-button {
  color: #fff;
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.08);
}

.section-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.public-feature-grid .item,
.event-spotlight,
.operations-card {
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(32, 49, 61, 0.08);
}

@media (max-width: 640px) {
  .public-redesign-2026 {
    min-height: auto;
  }

  .public-status-strip {
    grid-template-columns: 1fr;
  }

  .public-redesign-2026 h1 {
    font-size: clamp(2.15rem, 13vw, 3.6rem);
  }
}


/* Flexible event planning page */
.planning-page .inner {
  max-width: 1240px;
}

.planning-hero,
.admin-hero {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, #24323f 0%, #1f8f78 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.planning-hero .lead,
.admin-hero .lead {
  color: rgba(255, 255, 255, 0.86);
}

.planning-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(40, 57, 72, 0.08);
}

.planning-tabs .tab-button {
  flex: 1 1 150px;
}

.planning-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.planning-kpis div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: #f4fbf8;
}

.planning-kpis strong {
  font-size: 2rem;
  color: var(--mint-strong);
}

.check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.check-list li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-strong);
  font-weight: 900;
}

.planning-event-card {
  display: grid;
  gap: 14px;
}

.planning-editor-grid {
  gap: 22px;
}

.event-selection-list {
  display: grid;
  gap: 16px;
}

.event-selection-rows {
  display: grid;
  gap: 12px;
}

.event-selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.event-selection-row.active {
  border-color: #75c3ad;
  box-shadow: 0 14px 34px rgba(17, 94, 80, 0.14);
}

.event-selection-row .actions {
  justify-content: flex-end;
}

.slot-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 6px;
  border-radius: 8px;
  background: #edf6f3;
  color: var(--mint-strong);
  cursor: grab;
}

.timeline-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
  overflow-x: auto;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.timeline-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 58px minmax(520px, 1fr);
  gap: 10px;
  min-height: var(--timeline-height, 220px);
}

.timeline-axis {
  position: relative;
  min-height: var(--timeline-height, 220px);
  border-right: 1px solid var(--line);
}

.timeline-axis span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 0.76rem;
  color: var(--muted);
}

.timeline-columns {
  display: grid;
  grid-template-columns: repeat(var(--track-count, 1), minmax(170px, 1fr));
  gap: 10px;
  min-height: var(--timeline-height, 220px);
  overflow-x: auto;
  width: max(100%, calc(var(--track-count, 1) * 210px));
}

.timeline-column {
  position: relative;
  min-height: var(--timeline-height, 220px);
  padding-top: 32px;
  border: 1px dashed rgba(103, 119, 132, 0.24);
  border-radius: 12px;
  background: repeating-linear-gradient(to bottom, rgba(103, 119, 132, 0.08), rgba(103, 119, 132, 0.08) 1px, transparent 1px, transparent 51px), #fff;
  overflow: hidden;
}

.timeline-column-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.86rem;
}

.timeline-card {
  position: absolute;
  left: 8px;
  right: 8px;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(31, 143, 120, 0.2);
  background: rgba(189, 235, 220, 0.9);
  box-shadow: 0 8px 18px rgba(40, 57, 72, 0.08);
  overflow: hidden;
}

.timeline-card.lecture,
.timeline-card.wordcafe,
.timeline-card.custom {
  background: rgba(214, 232, 248, 0.94);
  border-color: rgba(124, 63, 104, 0.18);
}

.timeline-card.pause {
  background: rgba(244, 166, 148, 0.86);
}

.timeline-card strong {
  font-size: 0.86rem;
  line-height: 1.15;
}

.timeline-card span {
  font-size: 0.72rem;
  color: #4c5b69;
}

@media (max-width: 760px) {
  .planning-kpis,
  .timeline-columns {
    grid-template-columns: 1fr;
  }

  .timeline-grid {
    grid-template-columns: 46px minmax(260px, 1fr);
  }
}


/* Dashboard sidebar shell + wider planning workspace */
@media (min-width: 980px) {
  .shell {
    display: block;
    min-height: 100vh;
    padding-left: 292px;
  }

  .topbar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 292px;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    align-items: stretch;
    gap: 22px;
    padding: 22px 18px;
    background: #18232d;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
    box-shadow: 18px 0 44px rgba(22, 33, 43, 0.12);
    overflow-y: auto;
  }

  .topbar .brand {
    align-items: flex-start;
  }

  .topbar .brand-mark {
    background: linear-gradient(135deg, var(--mint-strong), var(--berry-strong));
  }

  .topbar .brand small {
    color: rgba(255, 255, 255, 0.66);
  }

  .nav {
    display: grid;
    justify-content: stretch;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .nav button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
  }

  .nav button.active,
  .nav button:hover {
    color: #12231f;
    background: var(--mint);
  }

  .account-actions {
    align-self: end;
    display: grid;
    justify-content: stretch;
    align-content: end;
    gap: 8px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .account-actions > button,
  .account-actions .ghost-button,
  .account-actions .secondary-button,
  .account-actions .user-pill {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
  }

  .account-actions .secondary-button,
  .account-actions .button {
    background: var(--mint);
    color: #12231f;
  }

  .account-actions .user-pill {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .app {
    min-height: 100vh;
  }

  .section {
    padding: 28px clamp(24px, 3vw, 44px);
  }

  .inner,
  .planning-page .inner,
  .section .inner {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .hero {
    min-height: 100vh;
  }
}

.planning-page {
  background: #f3f7f6;
}

.planning-page .inner {
  max-width: none;
}

.planning-hero {
  border-radius: 18px;
}

.planning-editor-grid {
  grid-template-columns: 1fr;
}

.event-editor {
  max-width: none;
}

.track-builder-field {
  padding: 14px;
  border: 1px solid rgba(31, 143, 120, 0.16);
  border-radius: 14px;
  background: #f7fcfa;
}

.track-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.track-builder-actions .ghost-button,
.agenda-track-input-row .ghost-button {
  border: 1px solid var(--line);
  background: #fff;
}

.agenda-track-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.agenda-track-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.track-builder-field small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.agenda-track-config {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.agenda-editor-slot {
  grid-template-columns: 150px minmax(0, 1fr);
}

.agenda-editor-tracks {
  grid-template-columns: repeat(var(--track-count, 1), minmax(210px, 1fr));
  width: max(100%, calc(var(--track-count, 1) * 230px));
}

@media (min-width: 1280px) {
  .agenda-editor-tracks {
    grid-template-columns: repeat(var(--track-count, 1), minmax(240px, 1fr));
  }

  .timeline-grid {
    grid-template-columns: 64px minmax(780px, 1fr);
  }
}

@media (max-width: 979px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav,
  .account-actions {
    overflow-x: auto;
    justify-content: flex-start;
  }
}


/* Production polish: readable navigation, calmer buttons, finished copy layout */
.brand > span {
  min-width: 0;
}

.brand strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.button,
.secondary-button,
.ghost-button,
.danger-button,
.tab-button,
.nav button {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.tab-button:hover,
.nav button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.secondary-button,
.button,
.danger-button {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(29, 43, 56, 0.06);
}

.ghost-button {
  background: #fff;
  border-color: rgba(103, 119, 132, 0.22);
}

.public-redesign-2026 h1 {
  max-width: 780px;
  font-size: clamp(2.25rem, 5.8vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.public-redesign-2026 .lead {
  max-width: 680px;
}

.public-status-strip > div,
.panel,
.item,
.form-panel {
  border-radius: 18px;
}

@media (min-width: 980px) {
  .shell {
    padding-left: 324px;
  }

  .topbar {
    width: 324px;
    padding: 24px 20px;
    gap: 24px;
  }

  .topbar .brand {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .topbar .brand strong {
    max-width: 100%;
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .topbar .brand small {
    margin-top: 3px;
    white-space: normal;
    line-height: 1.25;
  }

  .nav {
    gap: 10px;
  }

  .nav button {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
  }

  .nav button.active,
  .nav button:hover {
    border-color: rgba(189, 235, 220, 0.72);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  }

  .account-actions > button,
  .account-actions .ghost-button,
  .account-actions .secondary-button,
  .account-actions .user-pill {
    min-height: 44px;
    padding: 0 13px;
  }

  .account-actions .user-pill {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-pill span {
    max-width: none;
    white-space: normal;
    line-height: 1.2;
  }
}

@media (max-width: 979px) {
  .brand strong,
  .brand small {
    white-space: normal;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .topbar {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .public-redesign-2026 h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: -0.025em;
  }

  .button,
  .secondary-button,
  .danger-button,
  .ghost-button {
    justify-content: center;
  }
}


/* Lean navigation + forum rules modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 24, 32, 0.54);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
}

.compact-rules {
  width: 100%;
  margin-top: 0;
}

.compact-rules .rule-card {
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 16px;
  box-shadow: none;
}

.compact-rules .rule-number {
  width: 34px;
  height: 34px;
}

@media (min-width: 980px) {
  .shell {
    padding-left: 288px;
  }

  .topbar {
    width: 288px;
    padding: 22px 16px;
    gap: 20px;
  }

  .topbar .brand {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .topbar .brand strong {
    font-size: 0.96rem;
  }

  .nav button,
  .account-actions > button,
  .account-actions .ghost-button,
  .account-actions .secondary-button,
  .account-actions .user-pill {
    min-height: 42px;
    justify-content: flex-start;
    text-align: left;
  }

  .account-actions {
    justify-items: stretch;
  }

  .account-actions small {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal-card {
    max-height: 88vh;
    padding: 18px;
  }
}
