.reg-brand {
  padding-bottom: 1rem;
}

.reg-top-actions {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.reg-top-actions .mini-btn {
  min-height: 64px;
  border: 2px solid var(--brand);
  border-radius: 16px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 1rem;
}

.reg-shadow-top {
  grid-template-columns: 1.15fr 1.85fr;
}

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

.reg-two-col label {
  display: grid;
  gap: 0.4rem;
}

.point-list {
  display: grid;
  gap: 0.8rem;
}

.point-card {
  border: 2px solid #cec4b6;
  border-radius: 16px;
  background: #fff;
  padding: 0.65rem;
}

.point-details > summary {
  list-style: none;
  cursor: pointer;
  border: 2px solid #d3c7b6;
  border-radius: 14px;
  background: #fffaf1;
  padding: 0.75rem 0.85rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.point-details > summary::-webkit-details-marker {
  display: none;
}

.point-details > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.point-details[open] > summary::before {
  content: "-";
}

.point-body {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.7rem;
}

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

.point-col {
  border: 2px solid #ded3c3;
  border-radius: 14px;
  background: #fffdf8;
  padding: 0.7rem;
}

.point-col h3 {
  margin-bottom: 0.45rem;
}

.point-col p {
  margin: 0;
  white-space: pre-wrap;
}

.point-section {
  border: 2px solid #ded3c3;
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem;
}

.point-section h3 {
  margin-bottom: 0.55rem;
}

.subsection-details {
  border: 2px solid #ded3c3;
  border-radius: 14px;
  background: #fff;
  padding: 0.4rem 0.5rem;
}

.subsection-details > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.4rem 0.45rem;
}

.subsection-details > summary::-webkit-details-marker {
  display: none;
}

.subsection-details > summary::before {
  content: "+";
  margin-right: 0.4rem;
  color: var(--brand);
  font-weight: 700;
}

.subsection-details[open] > summary::before {
  content: "-";
}

.subsection-body {
  margin-top: 0.2rem;
  padding: 0.1rem 0.25rem 0.35rem;
  display: grid;
  gap: 0.55rem;
}

.feedback-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.feedback-item {
  border: 1px solid #d3c7b6;
  border-radius: 12px;
  background: #fffdf8;
  padding: 0.45rem 0.55rem;
}

.feedback-item p {
  margin: 0.2rem 0;
  white-space: pre-wrap;
}

.feedback-item .meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.inline-form {
  display: grid;
  gap: 0.55rem;
}

.inline-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.inline-form .mini-btn {
  min-height: 54px;
}

.amendment-list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
}

.amendment-card {
  border: 2px solid #d4cab7;
  border-radius: 12px;
  background: #fffdf9;
  padding: 0.55rem;
}

.amendment-card p {
  margin: 0.28rem 0;
  white-space: pre-wrap;
}

.vote-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.vote-btn {
  min-height: 52px;
  border-width: 2px;
  font-size: 0.95rem;
}

.vote-btn.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.point-summary-tags {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.point-summary-tags .tag {
  font-size: 0.8rem;
}

.reg-log-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.reg-log-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.45rem;
}

.reg-log-nav .mini-btn {
  min-height: 48px;
}

.reg-page {
  padding-bottom: 7.3rem;
}

.reg-bottom-toolbar {
  position: fixed;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 45;
  width: min(1180px, 96vw);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.reg-bottom-btn {
  min-height: 48px;
  border: 2px solid #6e6659;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(21, 17, 12, 0.2);
}

.reg-bottom-btn:hover,
.reg-bottom-btn:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.reg-bottom-btn[aria-expanded="true"] {
  border-color: var(--brand);
  background: #ecf6f4;
}

.reg-quick-panel {
  position: fixed;
  left: 1rem;
  bottom: 5.6rem;
  z-index: 46;
  width: min(380px, 92vw);
  max-height: min(64vh, 520px);
  overflow: auto;
  border: 2px solid #d1c4ae;
  border-radius: 14px;
  background: rgba(255, 254, 249, 0.98);
  box-shadow: 0 16px 34px rgba(31, 22, 8, 0.26);
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.reg-quick-panel[hidden] {
  display: none;
}

.reg-feedback-panel {
  width: min(480px, 94vw);
}

.reg-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.reg-quick-head h3 {
  margin: 0;
}

.reg-quick-head .mini-btn {
  min-height: 40px;
  min-width: 40px;
}

.reg-quick-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
}

.floating-settings-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 2px solid rgba(0, 70, 62, 0.55);
  background: rgba(255, 255, 255, 0.44);
  color: var(--brand-strong);
  font-size: 1.65rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 40;
}

.floating-settings-panel {
  position: fixed;
  right: 1rem;
  bottom: 5.6rem;
  width: min(300px, 88vw);
  border: 2px solid #d1c4ae;
  border-radius: 14px;
  background: rgba(255, 254, 249, 0.95);
  box-shadow: 0 16px 32px rgba(31, 22, 8, 0.24);
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 41;
}

.floating-settings-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-settings-panel h3 {
  margin-bottom: 0.15rem;
}

.floating-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid #d7cbba;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-weight: 700;
}

.floating-switch input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  min-height: 0;
}

body.theme-dark {
  --bg: #0f1413;
  --panel: #192220;
  --panel-strong: #1f2b29;
  --text: #f6f5ef;
  --muted: #d2cfc4;
  --line: #60736d;
  --brand: #2f9f8b;
  --brand-strong: #49baa5;
  --accent: #f0a244;
  --danger: #de5c4e;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.4);
}

body.theme-dark .point-details > summary,
body.theme-dark .subsection-details,
body.theme-dark .point-col,
body.theme-dark .point-section,
body.theme-dark .feedback-item,
body.theme-dark .amendment-card {
  background: #21302d;
  border-color: #60736d;
}

body.theme-dark .point-card,
body.theme-dark .shadow-log-item {
  background: #1d2926;
  border-color: #60736d;
}

body.theme-dark .mini-btn,
body.theme-dark .secondary-btn,
body.theme-dark .tag {
  background: #243633;
  border-color: #6f857f;
  color: #f6f5ef;
}

body.theme-dark .primary-btn,
body.theme-dark .vote-btn.is-selected {
  color: #061a17;
}

body.theme-dark .mini-btn:hover,
body.theme-dark .secondary-btn:hover {
  background: #2a3d3a;
}

body.theme-dark .tag.status-urgent {
  background: #4a2320;
  border-color: #e07b71;
  color: #ffe0dc;
}

body.theme-dark .tag.status-termine {
  background: #1c3c2b;
  border-color: #7ac694;
  color: #d9ffe5;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background: #22312e;
  border-color: #6f857f;
  color: #f6f5ef;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #c8d0cd;
}

body.theme-dark .floating-settings-btn {
  background: rgba(22, 33, 31, 0.8);
  border-color: rgba(116, 180, 165, 0.7);
  color: #dff4ef;
}

body.theme-dark .floating-settings-panel {
  background: rgba(25, 34, 32, 0.96);
  border-color: #6f857f;
}

body.theme-dark .reg-bottom-btn {
  background: rgba(36, 52, 49, 0.95);
  border-color: #6f857f;
  color: #f6f5ef;
}

body.theme-dark .reg-bottom-btn[aria-expanded="true"] {
  background: #2b3f3b;
}

body.theme-dark .reg-quick-panel {
  background: rgba(25, 34, 32, 0.98);
  border-color: #6f857f;
}

body.theme-dark .floating-switch {
  background: #233330;
  border-color: #6f857f;
}

body.theme-senior {
  --line: #8f8064;
  --muted: #352d23;
  --text: #100e0b;
  --brand: #005f4f;
  --brand-strong: #004237;
  font-size: 1.12rem;
  line-height: 1.62;
}

body.theme-senior h1 {
  font-size: clamp(1.95rem, 4.3vw, 2.7rem);
}

body.theme-senior h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.3rem);
}

body.theme-senior h3 {
  font-size: 1.3rem;
}

body.theme-senior .primary-btn,
body.theme-senior .secondary-btn,
body.theme-senior .mini-btn {
  min-height: 72px;
  font-size: 1.08rem;
}

body.theme-senior input,
body.theme-senior textarea,
body.theme-senior select {
  min-height: 62px;
  font-size: 1.12rem;
}

body.theme-senior .tag {
  font-size: 0.97rem;
}

body.theme-senior .point-details > summary {
  font-size: 1.16rem;
}

body.theme-senior .kw-highlight {
  font-weight: 800;
  color: #0f0d09;
}

body.theme-dark.theme-senior .kw-highlight {
  color: #fff4c7;
}

@media (max-width: 900px) {
  .reg-shadow-top,
  .point-grid,
  .reg-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .vote-row {
    grid-template-columns: 1fr;
  }

  .reg-page {
    padding-bottom: 13rem;
  }

  .reg-bottom-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    bottom: 0.7rem;
    gap: 0.4rem;
  }

  .reg-bottom-btn {
    min-height: 46px;
    font-size: 0.82rem;
  }

  .reg-quick-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    bottom: 11.2rem;
  }

  .floating-settings-btn {
    width: 58px;
    height: 58px;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .floating-settings-panel {
    right: 0.75rem;
    bottom: 11.2rem;
  }
}
