﻿@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --font-display: 'Fraunces', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --fs-body: 15px;
  --lh-body: 1.5;
  --bg: #edf3ff;
  --bg-accent: #dbe9ff;
  --ink: #14233f;
  --muted: #5f7090;
  --card: #f9fcff;
  --accent: #2b6fbe;
  --accent-2: #3f8fe6;
  --accent-3: #1f4f84;
  --pastel-soft: #f3efff;
  --pastel-soft-border: #d8ceef;
  --border-soft: #c8d8ee;
  --border-strong: #9fb9dd;
  --surface-soft: #eef5ff;
  --surface-strong: #e3efff;
  --shadow: 0 18px 40px rgba(17, 47, 92, 0.14);
  --radius: 20px;
  --page-gutter: clamp(12px, 1.25vw, 18px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: radial-gradient(circle at top left, #f7fbff, var(--bg)) no-repeat;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

body.embed-map-page {
  background: transparent;
}

.app {
  padding: var(--page-gutter) var(--page-gutter) 52px;
}

body.embed-map-page .app {
  padding: 0;
}
.site-header {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  isolation: auto;
  position: relative;
  z-index: 12;
}

.site-header::before {
  content: none;
}

.site-header::after {
  content: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 13;
}
.topbar-main {
  flex: 1 1 620px;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.topbar-main .intro-shell {
  flex: 1 1 auto;
  min-width: 0;
}
.brand-map-link {
  display: inline-grid;
  place-items: center;
  width: clamp(44px, 3.6vw, 55px);
  height: clamp(44px, 3.6vw, 55px);
  text-decoration: none;
  position: relative;
  border-radius: 16px;
  background: linear-gradient(165deg, #fff983 0%, #ffe04a 52%, #ffc920 100%);
  border: 1px solid rgba(177, 132, 18, 0.62);
  box-shadow:
    0 10px 18px rgba(88, 66, 8, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.68),
    inset 0 -3px 0 rgba(166, 120, 8, 0.44),
    inset 0 0 0 1px rgba(255, 243, 160, 0.58);
}
.brand-map-link::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0.08) 48%, rgba(255, 198, 46, 0.18) 100%);
  pointer-events: none;
}
.brand-map-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(158, 114, 7, 0.46);
  pointer-events: none;
}
.brand-map-link:focus-visible {
  outline: 2px solid rgba(43, 111, 190, 0.42);
  outline-offset: 3px;
  border-radius: 16px;
}
.brand-logo {
  width: clamp(74px, 7.2vw, 108px);
  height: auto;
  display: block;
}
.brand-logo-mark {
  width: 74%;
  height: 74%;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.64))
    drop-shadow(0 11px 17px rgba(17, 45, 84, 0.28))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.42));
  transition: transform 0.16s ease, filter 0.16s ease;
  position: relative;
  z-index: 1;
}
.brand-map-link:hover .brand-logo-mark {
  transform: translateY(-1px) scale(1.015);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 13px 19px rgba(17, 45, 84, 0.32))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.46));
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}

.session-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  width: min(760px, 100%);
  max-width: 100%;
  border-bottom: 2px solid var(--accent-2);
  padding: 6px 2px;
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  min-width: 0;
}
.user-bar-top {
  margin: 0;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.language-switch select {
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.language-switch select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(43, 111, 190, 0.12);
}

.admin-lang-shell {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.language-switch-floating {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 999;
}

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 26, 22, 0.12);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--ink);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-danger {
  background: #d44f3b;
  color: #fff;
  border-color: #b84534;
}

.btn-danger:hover {
  box-shadow: 0 6px 16px rgba(212, 79, 59, 0.26);
}

.layout {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

body.embed-map-page .layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.embed-map-page .steps,
body.embed-map-page #institutionPicker,
body.embed-map-page #introDeck,
body.embed-map-page #userBar,
body.embed-map-page #exportPanel,
body.embed-map-page .vote-floating,
body.embed-map-page .app-disclaimer {
  display: none !important;
}

body.embed-map-page .stage {
  min-height: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fcff 0%, #f2f8ff 100%);
  box-shadow: 0 10px 24px rgba(27, 73, 136, 0.08);
}

.step-pill-shell {
  display: grid;
  gap: 6px;
}

.step-utility-shell {
  margin-top: 4px;
}

.step-utility-card {
  border: 1px solid #c8dbf3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  padding: 8px;
}

.step-utility-card .institution-switcher {
  width: 100%;
  min-height: 0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  padding: 7px 9px;
}

.step-utility-card .institution-switcher > span {
  font-size: 11px;
  letter-spacing: 0.05em;
}

.step-utility-card .institution-switcher select {
  width: 100%;
  min-width: 0;
}

.step-utility-card .switch-selected-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  color: #355b8b;
  background: #f6faff;
  border: 1px solid #d4e3f8;
  border-radius: 8px;
  padding: 6px 8px;
}

.strategy-switcher-card {
  display: grid;
  gap: 8px;
}

.strategy-switcher-card-topbar {
  min-width: clamp(300px, 34vw, 460px);
  max-width: min(460px, 82vw);
  position: relative;
  z-index: 14;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.strategy-switcher-summary {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid #d4e3f8;
  border-radius: 10px;
  background: #f6fbff;
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.strategy-switcher-summary:hover {
  border-color: #b9d3f3;
  background: #ffffff;
}

.strategy-switcher-summary:focus-visible {
  outline: 2px solid rgba(63, 143, 230, 0.35);
  outline-offset: 1px;
}

.strategy-switcher-card.is-open .strategy-switcher-summary {
  border-color: #d8c2a7;
  background: #ffffff;
}

.strategy-switcher-card-topbar .strategy-switcher-summary {
  border-color: #dfccb6;
  border-radius: 999px;
  background: #fffefb;
  min-height: 42px;
  padding: 8px 14px;
  align-items: center;
}

.strategy-switcher-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.strategy-switcher-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  flex: 1 1 0;
}

.strategy-switcher-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  color: #5f799a;
  flex: 0 0 auto;
}

.strategy-switcher-item > strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: #1f3f69;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.strategy-switcher-separator {
  color: #7d94b5;
  font-size: 11px;
  flex: 0 0 auto;
}

.strategy-switcher-dialog {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.strategy-switcher-card-topbar .strategy-switcher-dialog {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, 82vw);
  border: 1px solid #d0e1f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: 0 12px 28px rgba(24, 66, 122, 0.16);
  padding: 10px;
  z-index: 15;
}

.strategy-switcher-card-topbar .institution-switcher {
  border-color: #ddc9b0;
  background: #fffefb;
}

.strategy-switcher-card-topbar .strategy-switcher-guide-btn {
  min-height: 40px;
  border-color: #ddc9b0;
  background: #fffefb;
}

.strategy-switcher-card-topbar .strategy-switcher-language .language-switch {
  min-height: 40px;
  border-color: #ddc9b0;
  background: #fffefb;
}

.strategy-switcher-utility-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.strategy-switcher-create-btn {
  width: 100%;
  justify-content: center;
  min-height: 38px;
}

.strategy-switcher-guide-btn {
  width: 100%;
  justify-content: center;
  min-height: 36px;
}

.strategy-switcher-language .language-switch {
  margin: 0;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
}

.strategy-switcher-language .language-switch > span {
  display: none;
}

.strategy-switcher-language .language-switch select {
  min-width: 72px;
}

.user-toolbar-main {
  align-items: center;
  gap: 10px;
}

.user-toolbar-main > .btn,
.user-toolbar-main > .user-chip {
  flex: 0 0 auto;
}

.strategy-switcher-dialog[hidden] {
  display: none;
}

.step-utility-card-language .language-switch {
  width: 100%;
  border-radius: 10px;
  justify-content: space-between;
  padding: 7px 9px;
}

.step-utility-card-language .language-switch select {
  min-width: 74px;
}

.institution-info-card {
  display: grid;
  gap: 8px;
}

.institution-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.institution-info-head strong {
  font-size: 13px;
  line-height: 1.3;
  color: #1f3f69;
}

.institution-info-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #27476f;
}

.institution-info-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f799a;
}

.institution-info-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.institution-info-card a {
  color: #2b6fbe;
  text-decoration: none;
}

.institution-info-card a:hover {
  text-decoration: underline;
}

.institution-info-empty {
  color: #6f86a6;
}

.step-pill {
  background: transparent;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  display: block;
  width: 100%;
}

.step-pill-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid #c2d4ec;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #46638e;
  flex: 0 0 auto;
}

.step-pill.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f0f7ff 0%, #e6f1ff 100%);
  box-shadow: inset 0 0 0 1px rgba(43, 111, 190, 0.12);
}

.step-pill:hover:not(:disabled) {
  border-color: #c1d7f5;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  transform: translateX(2px);
}

.step-pill.locked {
  opacity: 0.62;
}

.step-pill:disabled {
  cursor: not-allowed;
}

.step-pill h4 {
  font-size: 16px;
  margin: 0;
  line-height: 1.2;
}

.step-pill-action {
  width: 100%;
  border: 1px solid #c1d7f5;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  color: #1f4f84;
  border-radius: 10px;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.step-pill-action:hover {
  border-color: #98bbe8;
  background: linear-gradient(180deg, #ffffff 0%, #e5f0ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(31, 79, 132, 0.14);
}

.step-pill-action:focus-visible {
  outline: 2px solid rgba(63, 143, 230, 0.35);
  outline-offset: 1px;
}

.step-add-anchor {
  scroll-margin-top: 14px;
}

.step-add-anchor.jump-target-pulse {
  animation: stepAddTargetPulse 0.72s ease;
}

@keyframes stepAddTargetPulse {
  0% {
    transform: translateY(0);
    box-shadow: none;
  }
  35% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(63, 143, 230, 0.2);
  }
  100% {
    transform: translateY(0);
    box-shadow: none;
  }
}

.stage {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 14px 30px rgba(28, 26, 22, 0.12);
  min-height: 520px;
  border: 1px solid #eadbc7;
  min-width: 0;
}

.step-view {
  animation: fadeIn 0.4s ease;
}
.step-view:fullscreen {
  background: #f6fbff;
  padding: 0;
  overflow: hidden;
}
.step-view:fullscreen .strategy-map-viewport {
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  border-width: 0;
}
.step-view:-webkit-full-screen {
  background: #f6fbff;
  padding: 0;
  overflow: hidden;
}
.step-view:-webkit-full-screen .strategy-map-viewport {
  min-height: 100vh;
  height: 100vh;
  border-radius: 0;
  border-width: 0;
}
.step-view:fullscreen .map-view-shell,
.step-view:-webkit-full-screen .map-view-shell {
  height: 100vh;
}
.step-view:fullscreen .map-view-shell > .step-header,
.step-view:fullscreen .map-view-shell > .prompt,
.step-view:-webkit-full-screen .map-view-shell > .step-header,
.step-view:-webkit-full-screen .map-view-shell > .prompt {
  display: none;
}

.about-window .card p {
  font-size: 15px;
  line-height: 1.6;
  color: #4b3f33;
  margin-bottom: 12px;
}
.guide-window {
  display: grid;
  gap: 14px;
}
.guide-grid-page {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.about-window .card p:last-child {
  margin-bottom: 0;
}
.about-list {
  margin: 8px 0 14px 20px;
  display: grid;
  gap: 6px;
}
.about-list li {
  font-size: 14px;
  line-height: 1.55;
  color: #4b3f33;
}

.admin-inline-shell {
  min-height: 0;
}

.admin-inline-host {
  min-height: 320px;
}

.admin-embed-card {
  margin-bottom: 14px;
}

.admin-embed-help {
  margin-bottom: 10px;
}

.admin-embed-code {
  width: 100%;
  min-height: 170px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.embed-map-branding-note {
  position: absolute;
  left: 14px;
  bottom: 14px;
  transform: none;
  margin: 0;
  z-index: 18;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 14px rgba(18, 49, 88, 0.12);
  backdrop-filter: blur(2px);
  max-width: calc(100% - 28px);
  text-align: left;
  font-size: 12px;
  line-height: 1.2;
}

.embed-map-branding-note a {
  color: #245eaa;
  font-weight: 700;
  text-decoration: none;
}

.embed-map-branding-note a:hover {
  text-decoration: underline;
}

body.embedded-admin {
  background: transparent;
}

body.embedded-admin .app {
  padding: 0;
}

body.embedded-admin .topbar {
  display: none;
}

body.embedded-admin .stage {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  padding: 0;
}

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

.step-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
}

.prompt {
  margin-bottom: 18px;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

input[type='text'], input[type='email'], input[type='password'], textarea, select {
  font-family: 'Space Grotesk', sans-serif;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e0d1bf;
  background: #fff;
  font-size: 14px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}
.guideline-checkbox-panel {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.guideline-checkbox-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.guideline-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid #deebff;
  background: #f7fbff;
  cursor: pointer;
}
.guideline-checkbox-item:hover {
  background: #eef6ff;
  border-color: #c8dcf8;
}
.guideline-checkbox-input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.guideline-checkbox-label {
  color: #254a76;
  font-size: 14px;
  line-height: 1.25;
}
.guideline-checkbox-empty {
  margin: 0;
  color: var(--muted);
}
.guideline-checkbox-hint {
  margin-bottom: 0;
}
.guideline-add-form textarea[name='desc'] {
  width: min(760px, 100%);
  min-height: 110px;
  display: block;
}
.guideline-add-submit-btn {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.admin-guideline-grid {
  grid-template-columns: repeat(auto-fit, minmax(860px, 1fr));
  gap: 18px;
}
.admin-guideline-grid .card {
  padding: 18px;
}
.admin-initiative-grid {
  grid-template-columns: repeat(auto-fit, minmax(860px, 1fr));
}
.admin-global-comment-list {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}
.admin-global-comment-item {
  border: 1px solid #e5d4bf;
  border-radius: 14px;
  background: #fffdf8;
  padding: 10px 12px;
}
.admin-global-comment-item.is-hidden {
  background: #f2eee7;
  border-color: #d9cebe;
}
.admin-global-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.admin-comment-box {
  border-top: 1px solid #ead8c3;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}
.admin-comment-list {
  margin-top: 2px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-comment-item {
  border: 1px solid #e9d8c4;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #fffdf8;
}
.admin-comment-item.is-hidden {
  background: #f4f1eb;
  border-color: #d9cec0;
  opacity: 0.88;
}
.admin-comment-item .admin-comment-body {
  font-size: 14px;
  line-height: 1.42;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.admin-comment-item .admin-comment-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.admin-comment-actions {
  margin-top: 7px;
  display: flex;
  justify-content: flex-end;
}
.admin-vote-box {
  border-top: 1px solid #ead8c3;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}
.admin-vote-list {
  margin-top: 2px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-vote-list li {
  border: 1px solid #e9d8c4;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #fffdf8;
}
.admin-edit-form {
  display: grid;
  gap: 12px;
}
.admin-edit-head {
  display: grid;
}
.admin-edit-title {
  width: 100%;
}
.admin-edit-description {
  width: 100%;
  min-height: 140px;
  line-height: 1.45;
}
.admin-cycle-narrative-row {
  grid-template-columns: minmax(0, 1fr);
}
.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-edit-grid-initiative {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-edit-label {
  margin: 0;
}
.admin-add-form {
  display: grid;
  gap: 10px;
}
.guideline-groups {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}
.guideline-group {
  display: grid;
  gap: 8px;
}
.guideline-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.guideline-group h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  line-height: 1.2;
}
.guideline-group > .prompt {
  margin-bottom: 2px;
}
.guideline-empty {
  margin-top: 4px;
}
.relationship-cluster {
  border: 1px solid #e5d4bf;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff7ed 100%);
  padding: 12px;
  margin-top: 8px;
}
.relationship-cluster-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.relationship-cluster-head strong {
  font-size: 16px;
  line-height: 1.3;
}
.relationship-cluster-cards {
  margin-top: 0;
}

.card {
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #ebdbc8;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(28, 26, 22, 0.05);
}
.guideline-disabled {
  background: #f2f2f2;
  border-color: #d8d3cb;
}
.guideline-disabled .card-top p,
.guideline-disabled .comment-meta,
.guideline-disabled .vote-total {
  color: #70695f;
}
.guideline-disabled .vote-panel {
  background: #ece6dc;
}
.tag-disabled {
  background: #e0dbd2;
  color: #4f4a43;
  font-weight: 700;
}

.card h4 {
  font-size: 16px;
}

.card p {
  font-size: 13px;
  color: var(--muted);
}
.card-section {
  margin-top: 4px;
}
.card-top {
  display: grid;
  gap: 6px;
}
.card-top p {
  margin: 0;
}
.mini-list {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
}
.mini-list li {
  margin: 0;
}
.comment-item {
  border-left: 2px solid #e7d6c2;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #fffcf7;
  border-radius: 0 10px 10px 0;
}
.comment-item-empty {
  color: var(--muted);
}
.comment-body {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.comment-meta {
  font-size: 12px;
  color: var(--muted);
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.inline-form input[type='text'] {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
}
.inline-form .btn {
  white-space: nowrap;
  padding: 10px 18px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4e8db;
  font-size: 11px;
  margin-right: 6px;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.vote {
  background: var(--accent-2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.vote[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.initiative-add-card {
  gap: 14px;
}
.initiative-add-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}
.initiative-add-form-pane {
  min-width: 0;
}
.initiative-add-matrix-pane {
  min-width: 0;
  display: flex;
}
.initiative-matrix-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fcff 0%, #eff6ff 100%);
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
}
.initiative-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.initiative-matrix-scroll {
  max-height: none;
  min-height: 0;
  overflow: auto;
  border: 1px solid #cfddf2;
  border-radius: 12px;
  background: #fff;
}
#initiativeAddForm .form-row {
  grid-template-columns: 1fr;
}
#initiativeAddForm textarea[name='desc'] {
  width: 100%;
  min-height: 110px;
  display: block;
}
.initiative-matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}
.initiative-matrix-table th,
.initiative-matrix-table td {
  padding: 9px 10px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #e0ebfb;
}
.initiative-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dceaff;
  color: #1f4674;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.initiative-matrix-table tbody tr:nth-child(odd) td {
  background: #f8fbff;
}
.initiative-matrix-table tbody tr:nth-child(even) td {
  background: #f2f7ff;
}
.initiative-matrix-table tbody tr.is-unassigned td {
  background: #fff1ef;
}
.initiative-matrix-guideline {
  font-weight: 700;
  color: #1f4c80;
}
.initiative-matrix-initiative-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.initiative-matrix-chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e3efff;
  border: 1px solid #c7d9f2;
  color: #245180;
  font-size: 12px;
  line-height: 1.2;
}
.initiative-matrix-empty {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffe1dd;
  border: 1px solid #f4b4ad;
  color: #8f2d27;
  font-size: 12px;
  font-weight: 700;
}
.initiative-matrix-empty-row {
  text-align: center;
  color: var(--muted);
  background: #f8fbff;
}

.export {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 6, 0.35);
  display: grid;
  place-items: center;
}

.export-card {
  background: #fff;
  width: min(860px, 92vw);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.summary {
  width: 100%;
  min-height: 300px;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #eadbc7;
  font-size: 13px;
}

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

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .steps {
    top: 10px;
    padding: 6px;
  }

  .step-pill {
    padding: 11px 9px;
  }

  .step-pill h4 {
    font-size: 14px;
  }

  .stage {
    padding: 18px;
  }
}

.export[hidden] {
  display: none;
}

.app-disclaimer {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid #e6d8c6;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  text-align: center;
  flex-wrap: wrap;
}

.app-disclaimer-lang {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.app-disclaimer p {
  margin: 0;
  max-width: 980px;
  flex: 1 1 440px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.app-disclaimer a {
  color: #1f6e64;
  font-weight: 600;
  text-decoration: none;
}

.app-disclaimer a:hover {
  text-decoration: underline;
}
.app-disclaimer-access-btn {
  margin: 0 6px;
  min-height: 36px;
  padding: 7px 12px;
}
.intro-shell {
  margin-top: 0;
  position: relative;
  z-index: 1;
}
.stage > .intro-shell {
  margin-bottom: 14px;
}
.institution-picker {
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.institution-picker-card {
  background: #fffaf4;
  border: 1px solid #e4d4c0;
  border-radius: 18px;
  padding: 16px;
}
.institution-picker-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
}
.institution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.institution-card {
  border: 1px solid #dcc9b3;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.institution-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(28, 26, 22, 0.1);
  border-color: #bf4f2f;
}
.institution-card.active {
  border-color: #2b8a7e;
  box-shadow: 0 10px 22px rgba(43, 138, 126, 0.15);
}
.institution-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.institution-card-meta {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.institution-card-link {
  font-size: 13px;
  font-weight: 600;
  color: #1f6e64;
}
.map-pill {
  border-color: #8db8d6;
  background: linear-gradient(160deg, #e8f3fb 0%, #dcecf8 100%);
}
.map-pill h4 {
  color: #1e3b55;
}
.map-pill p {
  color: #46627a;
}

.header-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.intro-guide {
  border: 1px solid #e0cfb9;
  background: linear-gradient(160deg, #fffef9 0%, #f7ecde 100%);
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: 0 8px 18px rgba(28, 26, 22, 0.08);
  transition: box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
  cursor: pointer;
}
.intro-guide:hover {
  border-color: #d9c3a6;
  box-shadow: 0 12px 24px rgba(28, 26, 22, 0.1);
}
.intro-guide:focus-visible {
  outline: 2px solid rgba(43, 111, 190, 0.45);
  outline-offset: 2px;
}
.intro-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}
.intro-guide-header h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  line-height: 1.15;
}
.intro-toggle-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  padding: 0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.intro-toggle-btn span {
  display: inline-block;
  transform: translateY(-1px);
}
.intro-toggle-btn.pulse {
  animation: introTogglePulse 0.28s ease-in-out 5;
  border-color: #2d73cb;
  box-shadow: 0 0 0 3px rgba(45, 115, 203, 0.2);
}
.intro-guide.collapsed .kicker {
  display: none;
}
.intro-guide.collapsed .intro-guide-header h3 {
  font-size: 24px;
}
@keyframes introTogglePulse {
  0% {
    transform: scale(1);
    background: #fff;
  }
  50% {
    transform: scale(1.04);
    background: #eaf2ff;
  }
  100% {
    transform: scale(1);
    background: #fff;
  }
}
.intro-guide-body {
  max-height: 1200px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0 round 14px);
  transform-origin: top;
  will-change: max-height, opacity, transform, margin-top, clip-path;
  transition:
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin-top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: 10px;
}
.intro-guide.collapsed .intro-guide-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transform: translateY(-10px) scaleY(0.98);
  clip-path: inset(0 0 100% 0 round 14px);
  pointer-events: none;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.guide-card {
  background: #fff;
  border: 1px solid #e7d7c5;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(28, 26, 22, 0.06);
  display: grid;
  gap: 8px;
  align-content: start;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.intro-guide:not(.collapsed) .guide-card {
  animation: guideCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--card-index, 0) * 28ms);
}
.intro-guide.collapsed .guide-card {
  transform: translateY(-6px);
  opacity: 0;
}
@keyframes guideCardIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.guide-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-index {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #2b8a7e;
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.guide-card h4 {
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}
.guide-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.guide-points {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 3px;
}
.guide-points li {
  font-size: 12px;
  color: #5f5448;
  line-height: 1.4;
}
.guide-structure {
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.guide-structure-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.guide-structure-head h4 {
  margin: 0;
  font-size: 16px;
  font-family: 'Fraunces', serif;
}
.guide-structure-head p {
  margin: 0;
  font-size: 12px;
  color: #6b5f52;
}
.guide-structure-track {
  display: grid;
  grid-template-columns:
    minmax(210px, 1fr)
    auto
    minmax(210px, 1fr)
    auto
    minmax(460px, 1.8fr)
    auto
    minmax(220px, 1fr);
  gap: 10px;
  align-items: stretch;
}
.structure-step {
  border: 1px solid #e4d5c3;
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 9px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 126px;
}
.structure-step-strategic {
  min-height: 142px;
}
.structure-label {
  display: inline-flex;
  align-self: start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1d453f;
  background: #e8f5f3;
  border: 1px solid #bfded8;
  border-radius: 999px;
  padding: 3px 8px;
}
.structure-step p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #5e5348;
}
.structure-step-strategic p {
  font-size: 13px;
  line-height: 1.5;
}
.structure-step-layer {
  border-color: #92c8c0;
  background: linear-gradient(180deg, #f9fffd 0%, #ecf8f5 100%);
}
.structure-layer-group {
  border: 1px solid #9ec0e6;
  border-radius: 14px;
  padding: 9px;
  background: linear-gradient(180deg, #f6fbff 0%, #ebf4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(74, 122, 182, 0.12);
  display: grid;
  align-content: start;
  gap: 8px;
}
.structure-layer-group-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.structure-group-badge {
  font-size: 11px;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: #2f5a8f;
  background: #ffffff;
  border: 1px solid #bfd4f1;
  border-radius: 999px;
  padding: 3px 10px;
}
.structure-layer-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 8px;
  align-items: stretch;
}
.structure-mini-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.structure-mini-cards span {
  font-size: 11px;
  color: #265e57;
  border: 1px solid #b9ddd7;
  border-radius: 999px;
  padding: 2px 7px;
  background: #ffffff;
}
.structure-badge {
  margin-top: auto;
  justify-self: start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: #2b8a7e;
  border-radius: 999px;
  padding: 4px 8px;
}
.structure-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a98863;
  font-size: 20px;
  line-height: 1;
  min-width: 16px;
  justify-self: center;
  align-self: center;
}
.structure-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5f5348;
}
@media (max-width: 1280px) {
  .guide-structure-track {
    grid-template-columns: 1fr;
  }
  .structure-arrow {
    transform: rotate(90deg);
  }
  .structure-layer-grid {
    grid-template-columns: 1fr;
  }
  .structure-arrow-inner {
    transform: rotate(90deg);
  }
  .structure-step,
  .structure-step-strategic {
    min-height: 0;
  }
}
.strategy-map-viewport {
  --grid-size: 48px;
  --grid-x: 0px;
  --grid-y: 0px;
  position: relative;
  min-height: 620px;
  border: 1px solid #ddccb6;
  border-radius: 18px;
  overflow: hidden;
  background-color: #fffdf8;
  background-image:
    linear-gradient(rgba(180, 162, 141, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 162, 141, 0.18) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: var(--grid-x) var(--grid-y);
  cursor: grab;
  isolation: isolate;
}
.map-view-shell {
  display: grid;
  gap: 0;
}
body.embed-map-page .map-view-shell {
  position: relative;
}
body.embed-map-page .strategy-map-viewport {
  border: 1px solid rgba(43, 111, 190, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
body.embed-map-page .map-overlay-toolbar {
  display: flex;
}
.map-overlay-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 16;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.map-overlay-layer-toggle,
.map-overlay-actions {
  pointer-events: auto;
}
.map-overlay-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.map-overlay-toolbar .btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-soft);
  backdrop-filter: blur(4px);
}
.step-view:fullscreen .map-overlay-toolbar,
.step-view:-webkit-full-screen .map-overlay-toolbar {
  top: 14px;
  left: 14px;
  right: 14px;
}
.map-fullscreen-watermark {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 14;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
body.embed-map-page .map-fullscreen-watermark,
body.embed-map-page .map-fullscreen-watermark.embed-visible {
  right: 14px;
  left: auto;
  bottom: 14px;
  opacity: 0.14;
  transform: translateY(0);
}
.map-fullscreen-watermark img {
  width: clamp(150px, 16vw, 260px);
  height: auto;
  display: block;
  filter: grayscale(0.05);
}
body.embed-map-page .map-fullscreen-watermark img {
  width: clamp(130px, 14vw, 220px);
}
.step-view:fullscreen .map-fullscreen-watermark,
.step-view:-webkit-full-screen .map-fullscreen-watermark {
  opacity: 0.18;
  transform: translateY(0);
}
.strategy-map-viewport.dragging {
  cursor: grabbing;
}
.strategy-map-viewport.node-dragging {
  cursor: default;
}
.strategy-map-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}
.strategy-map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  transition: opacity 0.18s ease;
  z-index: 1;
}
.strategy-map-lines * {
  pointer-events: none !important;
}
.strategy-map-edge {
  fill: none;
  stroke-width: 2.3;
}
.strategy-map-edge.edge-root {
  stroke: #2b8a7e;
  stroke-width: 4.6;
}
.strategy-map-edge.edge-child {
  stroke: #5f7187;
}
.strategy-map-edge.edge-orphan {
  stroke: #bf4f2f;
  stroke-dasharray: 6 6;
}
.strategy-map-edge.edge-strategy-link {
  stroke: #6c62b9;
  stroke-width: 2.4;
  stroke-dasharray: 8 6;
  opacity: 0.66;
}
.strategy-map-edge.edge-initiative {
  stroke: url(#mapInitiativeGradient);
  stroke-width: 3.2;
}
.strategy-map-node {
  position: absolute;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(28, 26, 22, 0.08);
  transition: opacity 0.18s ease, filter 0.18s ease;
  z-index: 3;
}
.strategy-map-node[data-draggable="true"] {
  cursor: move;
}
.institution-node {
  border: 3px solid #1f8a7a;
  background: linear-gradient(165deg, #f4fffb 0%, #e8faf4 100%);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 0 16px 30px rgba(20, 120, 104, 0.24);
}
.institution-subtitle {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  color: #266c61;
  margin-top: -1px;
}
.institution-node::before {
  content: 'Institucija';
  justify-self: start;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1e6c61;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b7ddd5;
  border-radius: 999px;
  padding: 2px 8px;
}
.institution-node.active {
  box-shadow:
    0 0 0 4px rgba(43, 138, 126, 0.24),
    0 20px 36px rgba(20, 120, 104, 0.3);
  animation: none;
}
.institution-node.active.pulse-active {
  animation: institutionPulse 2.1s ease-in-out infinite;
}
.institution-node strong {
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
@keyframes institutionPulse {
  0% {
    box-shadow:
      0 0 0 2px rgba(43, 138, 126, 0.18),
      0 14px 24px rgba(20, 120, 104, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(43, 138, 126, 0.34),
      0 24px 42px rgba(20, 120, 104, 0.32);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(43, 138, 126, 0.18),
      0 14px 24px rgba(20, 120, 104, 0.18);
  }
}
.institution-node small {
  font-size: 15px;
  color: var(--muted);
}
.institution-node .tag {
  margin-right: 0;
  align-self: start;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
}
.institution-cycle-label {
  font-size: 14px;
  font-weight: 600;
  color: #4f645d;
}
.guideline-node {
  border: 1px solid #d8c7b1;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  align-content: start;
}
.guideline-node h4 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}
.map-node-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.map-comment-btn {
  border: 1px solid #d4b99d;
  background: linear-gradient(180deg, #fff9f2 0%, #f8ead9 100%);
  color: #3d342a;
  border-radius: 999px;
  padding: 4px 8px 4px 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 8px rgba(26, 22, 16, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.map-comment-btn:hover {
  border-color: #bf9a77;
  background: linear-gradient(180deg, #fffdf8 0%, #f7e3cc 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 5px 12px rgba(26, 22, 16, 0.16);
}
.map-comment-btn:focus-visible {
  outline: 2px solid #2b8a7e;
  outline-offset: 2px;
}
.map-comment-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #2b8a7e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: 0 0 auto;
}
.map-comment-icon svg {
  display: block;
}
.map-comment-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7c1a9;
  color: #2f2a24;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.guideline-node small {
  font-size: 11px;
  color: var(--muted);
}
.guideline-node.top-score {
  box-shadow: 0 0 0 2px rgba(216, 107, 75, 0.24), 0 10px 20px rgba(28, 26, 22, 0.1);
}
.guideline-node.relation-parent {
  border-left: 5px solid #2b8a7e;
}
.guideline-node.relation-child {
  border-left: 5px solid #2f4b7c;
}
.guideline-node.relation-orphan {
  border-left: 5px solid #d86b4b;
}
.guideline-node.status-disabled {
  background: #f1f1f1;
  border-color: #ccc3b7;
  opacity: 0.85;
}
.guideline-node.status-merged {
  background: #f8f6ff;
  border-color: #cfc9dc;
  border-left-color: #7a6f91;
}
.guideline-node.status-hidden {
  background: #f3f1ee;
  border-color: #d8d0c4;
  border-left-color: #9d9182;
  opacity: 0.72;
}
.initiative-node {
  border: 1px solid #e2c89f;
  background: linear-gradient(180deg, #fffdf8 0%, #f9efdf 100%);
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  border-left: 5px solid #c88527;
  box-shadow: 0 12px 26px rgba(160, 104, 29, 0.18);
}
.initiative-node h4 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}
.initiative-node small {
  font-size: 11px;
  color: #6f5c43;
}
.initiative-node.status-disabled {
  background: #f4f2ee;
  border-color: #d8cdbf;
  border-left-color: #a08f79;
  opacity: 0.88;
}
.initiative-node.status-merged {
  background: #fff8ec;
  border-color: #ebd6b2;
  border-left-color: #c7862a;
}
.initiative-node.status-hidden {
  background: #f2efea;
  border-color: #d5cec4;
  border-left-color: #948b7f;
  opacity: 0.7;
}
.map-vote-square.initiative-square {
  background: #c88527;
  border-color: #966319;
}
.map-layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #dcc9b4;
  background: #f9efdf;
}
.map-layer-toggle .btn {
  min-width: 118px;
}
.strategy-map-viewport.map-layer-guidelines .initiative-lines,
.strategy-map-viewport.map-layer-guidelines .initiative-node {
  opacity: 0;
  pointer-events: none;
}
.strategy-map-viewport.map-editable.map-layer-guidelines .guideline-node {
  cursor: move;
}
.strategy-map-viewport.map-layer-initiatives .guideline-lines {
  opacity: 0.2;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node {
  opacity: 0.2;
  pointer-events: auto;
  filter: saturate(0.45);
  z-index: 9;
  cursor: pointer;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node * {
  pointer-events: none;
}
.strategy-map-viewport.map-layer-initiatives .institution-node {
  opacity: 0.2;
  pointer-events: none;
  filter: saturate(0.42);
  z-index: 2;
}
.strategy-map-viewport.map-layer-initiatives .initiative-lines,
.strategy-map-viewport.map-layer-initiatives .initiative-node {
  opacity: 1;
  pointer-events: auto;
}
.strategy-map-viewport.map-layer-initiatives .initiative-node * {
  pointer-events: auto;
}
.strategy-map-viewport.map-editable.map-layer-initiatives .initiative-node {
  cursor: move;
}
.strategy-map-viewport.map-layer-initiatives .initiative-lines {
  z-index: 5;
}
.strategy-map-viewport.map-layer-initiatives .initiative-node {
  z-index: 8;
  box-shadow: 0 14px 28px rgba(160, 104, 29, 0.26);
}
.strategy-map-viewport.map-layer-initiatives .strategy-map-edge.edge-initiative-layer {
  opacity: 0;
  stroke-width: 3.3;
}
.strategy-map-viewport.map-layer-initiatives.map-initiative-focus-active .strategy-map-edge.edge-initiative-layer.map-edge-active {
  opacity: 0.45;
}
.strategy-map-viewport.map-layer-initiatives .initiative-node.map-initiative-dimmed {
  opacity: 0.12;
  filter: saturate(0.4);
}
.strategy-map-viewport.map-layer-initiatives .initiative-node.map-initiative-hovered {
  border-color: #d5953d;
  border-left-color: #cb872a;
  box-shadow: 0 0 0 2px rgba(213, 149, 61, 0.34), 0 16px 30px rgba(160, 104, 29, 0.3);
}
.strategy-map-viewport.map-layer-initiatives .initiative-node.map-initiative-selected {
  border-color: #bf7a1f;
  border-left-color: #b06e15;
  box-shadow: 0 0 0 3px rgba(191, 122, 31, 0.38), 0 18px 34px rgba(140, 88, 22, 0.34);
}
.strategy-map-viewport.map-layer-initiatives .initiative-node.map-initiative-related {
  opacity: 1;
  filter: none;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node.map-guideline-related {
  opacity: 1;
  filter: none;
  z-index: 10;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node.map-guideline-hovered {
  border-color: #4e8dd9;
  box-shadow: 0 0 0 2px rgba(56, 118, 194, 0.28), 0 14px 28px rgba(37, 85, 145, 0.24);
  z-index: 11;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node.map-guideline-selected {
  opacity: 1;
  filter: none;
  border-color: #2f6eb8;
  box-shadow: 0 0 0 3px rgba(47, 110, 184, 0.32), 0 18px 34px rgba(33, 77, 132, 0.28);
  z-index: 12;
}
.strategy-map-viewport.map-layer-initiatives .guideline-node.map-guideline-dimmed {
  opacity: 0.12;
  filter: saturate(0.3);
}
.strategy-map-viewport.map-layer-initiatives .institution-node.map-institution-dimmed-strong {
  opacity: 0.12;
  filter: saturate(0.3);
}
.map-vote-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.map-vote-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbc8b2;
  padding: 2px 9px;
  font-size: 11px;
  background: #fff8ef;
  color: #55493e;
}
.map-vote-chip strong {
  font-size: 13px;
  line-height: 1;
}
.map-vote-chip.top {
  border-color: #d86b4b;
  background: #fff0e3;
  color: #b6482d;
  font-weight: 700;
}
.map-strategy-link-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c5bbea;
  padding: 2px 9px;
  font-size: 11px;
  background: #f5f1ff;
  color: #4d418e;
  font-weight: 600;
}
.map-vote-squares {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}
.map-vote-square {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #2b8a7e;
  border: 1px solid #1f766c;
  flex: 0 0 auto;
}
.map-vote-empty {
  font-size: 11px;
  color: #76695b;
}
.map-comment-modal {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: start center;
  padding: 14px 12px;
}
.map-comment-modal[hidden] {
  display: none;
}
.map-comment-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(18, 15, 10, 0.46);
}
.map-comment-card {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid #e4d2be;
  border-radius: 18px;
  padding: 16px 16px 18px;
  box-shadow: 0 24px 48px rgba(28, 26, 22, 0.26);
}
.map-comment-card .header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 126px;
}
.map-comment-card #mapCommentCloseBtn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
}
.map-comment-card h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.2;
}
.map-comment-card .map-comment-description {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
}
.map-comment-actions {
  display: flex;
  justify-content: flex-start;
}
.map-comment-actions .btn {
  min-width: 220px;
  font-size: 18px;
}
.map-comment-card .mini-list {
  margin-top: 0;
  max-height: none;
  overflow: visible;
  padding-right: 6px;
}
.map-comment-card .comment-item:last-child {
  margin-bottom: 0;
}

body.map-comment-modal-open {
  overflow: hidden;
}
.map-comment-card .comment-item {
  padding: 12px 14px;
}
.map-comment-card .comment-body {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
}
.map-comment-card .comment-meta {
  font-size: clamp(18px, 1.6vw, 24px);
}
.checkbox-row {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 16px;
  align-items: start;
}
.title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.vote-panel {
  background: #fdf3e7;
  border-radius: 16px;
  padding: 10px 14px;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}
.vote-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.vote-panel-body {
  display: grid;
  gap: 6px;
}
.vote-label {
  font-size: 12px;
  color: var(--muted);
}
.vote-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vote-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #1f6e64;
  background: #2b8a7e;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 71, 64, 0.25);
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}
.vote-btn[data-action='vote-minus'],
.vote-btn[data-action='initiative-vote-minus'] {
  border-color: #9a4127;
  background: #c85d3a;
}
.vote-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.vote-btn:disabled {
  opacity: 1;
  border-color: #ddccb8;
  background: #efe5d9;
  color: #a79582;
  box-shadow: none;
  cursor: not-allowed;
}
.vote-score {
  font-size: 18px;
  font-weight: 700;
}
.vote-total {
  font-size: 12px;
  color: var(--muted);
}
.admin-panel {
  border-left: 4px solid var(--accent-2);
}
.admin-tabs-card {
  padding: 12px;
}
.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-tab-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #dfccb6;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.admin-tab-btn:hover {
  transform: translateY(-1px);
  border-color: #c8b39a;
}
.admin-tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 16px rgba(43, 138, 126, 0.2);
}
.admin-edit {
  background: #fdf7f1;
  border-radius: 14px;
  padding: 10px 12px;
}
.admin-participant-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.admin-participant-item {
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.admin-participant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-participant-identity {
  display: grid;
  gap: 4px;
}
.admin-participant-identity strong {
  font-size: 22px;
  line-height: 1.15;
}
.admin-participant-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-participant-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-participant-actions .btn {
  margin: 0;
}
.admin-participant-reset-card {
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.admin-participant-reset-link {
  word-break: break-all;
}
.admin-participant-empty {
  color: var(--muted);
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 6, 0.4);
  display: grid;
  place-items: center;
  z-index: 20;
  pointer-events: auto;
}
.login-overlay[hidden] {
  display: none;
}
.login-card {
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border: 1px solid #c6d9f4;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 22px 44px rgba(25, 62, 117, 0.2);
  width: min(460px, 92vw);
  position: relative;
  z-index: 21;
  pointer-events: auto;
}
.login-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.login-form[hidden] {
  display: none !important;
}
.login-form-auth {
  gap: 9px;
}
.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #304e75;
  margin-top: 1px;
}
.auth-password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-password-field input {
  width: 100%;
  padding-right: 86px;
}
.auth-password-toggle {
  position: absolute;
  right: 8px;
  border: 1px solid #c7d9f4;
  background: #ffffff;
  color: #224872;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.auth-password-toggle:hover {
  border-color: #98bbe8;
  background: #edf5ff;
  transform: translateY(-1px);
}
.auth-password-toggle:focus-visible {
  outline: 2px solid rgba(63, 143, 230, 0.35);
  outline-offset: 1px;
}
.auth-separator {
  border-top: 1px solid #d9e5f8;
  margin: 14px 0 12px;
}
.auth-forgot-btn {
  width: 100%;
  justify-content: center;
}
.auth-hint {
  margin-top: -2px;
  margin-bottom: 4px;
  color: #355b8b;
  font-size: 13px;
}

.strategy-create-overlay {
  overflow-y: auto;
  align-items: start;
  justify-items: center;
  padding: 16px;
}

.strategy-create-card {
  width: min(760px, 95vw);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.strategy-create-shared-fields {
  margin-top: 10px;
  border: 1px solid #c6d9f4;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.strategy-create-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #24466f;
}

.strategy-create-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.strategy-create-form {
  margin-top: 10px;
}

.strategy-create-form textarea {
  min-height: 96px;
  resize: vertical;
}

.strategy-ai-progress {
  margin-top: 12px;
  border: 1px solid #c6d9f4;
  border-radius: 14px;
  background: #f7fbff;
  padding: 10px;
}

.strategy-ai-progress-bar-shell {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #9fc3ed;
  background: #eaf3ff;
  overflow: hidden;
}

.strategy-ai-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2f6fb8 0%, #3f8ee6 100%);
  transition: width 0.25s ease;
}

.strategy-ai-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.strategy-ai-step {
  border: 1px solid #c7dbf4;
  border-radius: 10px;
  background: #ffffff;
  color: #4d6f97;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 7px 8px;
  text-align: center;
}

.strategy-ai-step.is-active {
  border-color: #6fa2d7;
  background: #eaf4ff;
  color: #1f4e82;
}

.strategy-ai-step.is-done {
  border-color: #86c6a2;
  background: #e7f7ed;
  color: #1f6b3f;
}

.strategy-ai-progress-overlay {
  z-index: 70;
  background: rgba(12, 10, 6, 0.56);
}

.strategy-ai-progress-card {
  z-index: 71;
  width: min(640px, 92vw);
  max-height: none;
  overflow: hidden;
  box-shadow: 0 24px 52px rgba(17, 50, 96, 0.34);
}

.strategy-ai-progress-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.15;
}

.strategy-ai-progress-subtitle {
  margin-top: 6px;
}
.error {
  color: #b33a2b;
  font-size: 13px;
}
.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.user-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: fit-content;
  min-height: 58px;
  background: linear-gradient(180deg, #f8ecdd 0%, #f2e3cf 100%);
  border: 1px solid #d9c2a8;
  border-radius: 999px;
  padding: 7px 8px;
  flex-wrap: wrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 6px 16px rgba(28, 26, 22, 0.09);
}
.institution-switcher {
  background: #fffefb;
  border: 1px solid #ddc9b0;
  border-radius: 999px;
  min-height: 42px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.institution-switcher > span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}
.institution-switcher select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  width: clamp(160px, 17vw, 230px);
  min-width: 0;
  outline: none;
}
.institution-switcher select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.user-toolbar .btn {
  min-height: 42px;
  padding: 9px 16px;
}
.user-toolbar .btn-ghost {
  background: #fff;
  border-color: #dfccb6;
}
.user-chip {
  min-height: 42px;
  background: #fffefb;
  border: 1px solid #dfccb6;
  border-radius: 999px;
  padding: 7px 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.step-header-actions {
  justify-content: flex-end;
}
.card.featured {
  border: 3px solid #bf4f2f;
  background: linear-gradient(165deg, #fff4ea 0%, #ffe6d4 100%);
  box-shadow: 0 16px 36px rgba(216, 107, 75, 0.22);
  transform: translateY(-2px);
}
.admin-pill {
  border-color: #bfa78e;
  background: linear-gradient(160deg, #efe3d2 0%, #e7d4bc 100%);
}
.admin-pill h4 {
  color: #4a3b2f;
}
.admin-pill p {
  color: #6f6456;
}
.about-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e3d2be;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(28, 26, 22, 0.06);
}
.about-card h4 {
  margin-bottom: 6px;
  font-size: 15px;
}
.about-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.tag-main {
  background: #bf4f2f;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  margin-left: 10px;
}
.vote-floating {
  position: fixed;
  left: 20px;
  bottom: 20px;
  top: auto;
  z-index: 25;
  display: block;
}
.vote-floating[hidden] {
  display: none;
}
.vote-floating-toggle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #dfccb6;
  background: #fff;
  color: #5c5146;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(28, 26, 22, 0.12);
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.vote-floating-inner {
  position: relative;
  width: 190px;
  background: #fff;
  border: 2px solid #e5d7c6;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(28, 26, 22, 0.18);
  overflow: hidden;
  transition: width 0.2s ease, padding 0.2s ease, border-radius 0.2s ease;
}
.vote-floating-content {
  display: grid;
  gap: 10px;
  padding-right: 28px;
  opacity: 1;
  max-width: 100%;
  max-height: 180px;
  transition: opacity 0.16s ease, max-width 0.2s ease, max-height 0.2s ease;
}
.vote-floating.collapsed .vote-floating-inner {
  width: 42px;
  min-height: 42px;
  border-radius: 999px;
  padding: 6px;
}
.vote-floating.collapsed .vote-floating-content {
  opacity: 0;
  max-width: 0;
  max-height: 0;
  pointer-events: none;
}
.vote-floating-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vote-floating-count {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.vote-burst {
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  z-index: 40;
}
.vote-burst-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color, var(--accent));
  transform: translate(-50%, -50%);
  animation: voteBurst 0.6s ease-out forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes voteBurst {
  from {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.7);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
  }
}

/* Blue brand theme overrides */
.stage,
.card,
.about-card,
.admin-edit,
.admin-tabs-card,
.guide-card,
.guide-structure,
.structure-step,
.login-card,
.app-disclaimer {
  border-color: var(--border-soft);
  background: #fbfdff;
}

input[type='text'],
input[type='email'],
input[type='password'],
textarea,
select {
  border-color: var(--border-soft);
  background: #ffffff;
  color: var(--ink);
}
input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(63, 143, 230, 0.22);
  outline-offset: 1px;
  border-color: var(--accent-2);
}

.tag {
  background: #e8f1ff;
  color: #264975;
}
.tag-main {
  background: var(--accent-3);
  color: #fff;
}
.institution-card {
  border-color: var(--border-soft);
  background: #ffffff;
}
.institution-card:hover {
  border-color: var(--accent-2);
  box-shadow: 0 8px 18px rgba(28, 73, 136, 0.16);
}
.institution-card.active {
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(43, 111, 190, 0.2);
}

.user-toolbar {
  background: linear-gradient(180deg, #f4f9ff 0%, #e9f2ff 100%);
  border-color: var(--border-strong);
}
.institution-switcher,
.user-chip,
.user-toolbar .btn-ghost {
  border-color: var(--border-soft);
  background: #ffffff;
}

.intro-guide {
  border-color: var(--border-soft);
  background: linear-gradient(160deg, #fafdff 0%, #edf5ff 100%);
}
.intro-guide:hover {
  border-color: var(--border-strong);
}
.guide-index,
.structure-badge {
  background: var(--accent);
}
.structure-label {
  color: #24466f;
  background: #e7f1ff;
  border-color: #c4d8f1;
}
.structure-step-layer {
  border-color: #8fb7e8;
  background: linear-gradient(180deg, #f7fbff 0%, #e9f2ff 100%);
}
.structure-layer-group {
  border-color: #8fb7e8;
  background: linear-gradient(180deg, #f7fbff 0%, #e8f1ff 100%);
  box-shadow: inset 0 0 0 1px rgba(63, 120, 191, 0.16);
}
.structure-group-badge {
  color: #2f5a8f;
  border-color: #c3d8f2;
}
.structure-mini-cards span {
  color: #2f5a8f;
  border-color: #c3d8f2;
  background: #ffffff;
}
.structure-arrow {
  color: #6f92bd;
}
.guide-points li,
.structure-note,
.guide-structure-head p {
  color: #607695;
}

.step-header h2,
.intro-guide-header h3,
.guideline-group h3,
.institution-picker-card h3,
.guide-structure-head h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.step-header h2 {
  font-size: clamp(30px, 2vw, 36px);
  line-height: 1.14;
}
.intro-guide-header h3,
.guideline-group h3 {
  font-size: clamp(28px, 1.8vw, 32px);
  line-height: 1.16;
}
.intro-guide-header h3 {
  font-size: clamp(22px, 1.35vw, 27px);
  overflow-wrap: anywhere;
}
.institution-picker-card h3 {
  font-size: clamp(24px, 1.5vw, 28px);
}
.prompt,
.card p,
.vote-total,
.comment-meta,
.guide-card p,
.structure-step p {
  font-size: 14px;
  line-height: 1.5;
}
.structure-step-strategic p {
  font-size: 15px;
  line-height: 1.55;
}
.card h4,
.guide-card h4 {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.guideline-node h4,
.initiative-node h4 {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tag {
  font-size: 12px;
  font-weight: 500;
}
.access-request-card {
  width: min(560px, 94vw);
}
.access-request-form textarea {
  min-height: 96px;
}
.tag.tag-subtle {
  background: #eef3ff;
  border-color: #d4deef;
  color: #4e6386;
}
.comment-body {
  font-size: 15px;
}

.guideline-card {
  border-color: #d2e3f7;
  background: #ffffff;
}
.guideline-card .card-top {
  border-left: 4px solid #2f88ba;
  padding-left: 10px;
}
.guideline-card .vote-panel {
  background: #e9f5ff;
}
.guideline-card.guideline-relation-parent {
  border-color: #bcd9f2;
  background: linear-gradient(180deg, #ffffff 0%, #f4faff 100%);
}
.guideline-card.guideline-relation-parent .card-top {
  border-left-color: #2f88ba;
}
.guideline-card.guideline-relation-child {
  border-color: var(--pastel-soft-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--pastel-soft) 100%);
}
.guideline-card.guideline-relation-child .card-top {
  border-left-color: #6d67b8;
}
.guideline-card.guideline-relation-orphan {
  border-color: #c8e8e3;
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf9 100%);
}
.guideline-card.guideline-relation-orphan .card-top {
  border-left-color: #3f9b8a;
}
.guideline-strategy-links {
  margin-top: 8px;
}
.tag.tag-link-main {
  background: #f0ecff;
  border: 1px solid #d1c7ff;
  color: #463c8f;
  font-weight: 700;
}
.tag.tag-link-ref {
  background: #f7f4ff;
  border: 1px solid #ddd5ff;
  color: #5649a8;
}
.tag-link-button {
  appearance: none;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tag-link-button:hover {
  border-color: #b7ade8;
  box-shadow: 0 3px 8px rgba(86, 73, 168, 0.22);
  transform: translateY(-1px);
}
.tag-link-button:focus-visible {
  outline: 2px solid rgba(86, 73, 168, 0.35);
  outline-offset: 1px;
}
.guideline-card.guideline-focus-pulse {
  animation: guidelineFocusPulse 1.1s ease;
}
@keyframes guidelineFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 111, 190, 0);
    border-color: #8fb4e5;
  }
  38% {
    box-shadow: 0 0 0 8px rgba(45, 111, 190, 0.35);
    border-color: #2e70be;
  }
  72% {
    box-shadow: 0 0 0 4px rgba(45, 111, 190, 0.2);
    border-color: #2e70be;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 111, 190, 0);
    border-color: #8fb4e5;
  }
}

.initiative-card.initiative-focus-pulse {
  animation: guidelineFocusPulse 1.1s ease;
}

.guideline-card.is-linkable,
.initiative-card.is-linkable {
  cursor: pointer;
}

.guideline-card.is-linkable:hover,
.initiative-card.is-linkable:hover {
  border-color: #5f8fc9;
  box-shadow: 0 0 0 3px rgba(66, 125, 196, 0.2), 0 12px 24px rgba(38, 77, 132, 0.14);
}

.strategy-map-node.map-node-focus-pulse {
  animation: mapNodeFocusPulse 1.15s ease-in-out infinite;
  z-index: 22 !important;
}

@keyframes mapNodeFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 112, 190, 0);
  }
  40% {
    box-shadow: 0 0 0 10px rgba(46, 112, 190, 0.35), 0 20px 34px rgba(26, 57, 97, 0.28);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 112, 190, 0);
  }
}

.initiative-card {
  border-color: #c5d0f5;
  background: linear-gradient(180deg, #ffffff 0%, #f2f3ff 100%);
}
.initiative-card .card-top {
  border-left: 4px solid #5b6fc7;
  padding-left: 10px;
}
.initiative-card .vote-panel {
  background: #ecefff;
}

.vote-panel {
  background: #edf5ff;
}
.vote-btn {
  border-color: #1b7240;
  background: #2d9b57;
  box-shadow: 0 2px 6px rgba(24, 96, 53, 0.25);
}
.vote-btn[data-action='vote-minus'],
.vote-btn[data-action='initiative-vote-minus'] {
  border-color: #a43d37;
  background: #d95b52;
}
.vote-btn:disabled {
  border-color: #c8d8ee;
  background: #edf3fc;
  color: #879bb9;
}
.vote-floating-toggle {
  border-color: var(--border-soft);
  color: #315783;
}
.vote-floating-inner {
  border-color: var(--border-soft);
  background: #f8fbff;
}

.admin-panel {
  border-left-color: var(--accent);
}
.admin-tab-btn {
  border-color: var(--border-soft);
}
.admin-tab-btn:hover {
  border-color: var(--border-strong);
}
.admin-tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(33, 88, 160, 0.24);
}
.admin-pill {
  border-color: #b8cde8;
  background: linear-gradient(160deg, #edf4ff 0%, #dfebff 100%);
}
.admin-pill h4 {
  color: #254a76;
}
.admin-pill p {
  color: #5f7594;
}

.admin-global-comment-item,
.admin-comment-item {
  border-color: #cfdef3;
  background: #fafdff;
}
.admin-global-comment-item.is-hidden,
.admin-comment-item.is-hidden {
  background: #eef3fb;
  border-color: #c7d4e8;
}

.map-layer-toggle {
  border-color: var(--border-soft);
  background: #edf4ff;
}
.map-vote-chip {
  border-color: #b9cfe9;
  background: #edf5ff;
  color: #294a74;
}
.map-vote-chip.top {
  border-color: #5c8ec8;
  background: #ddeaff;
  color: #1f4575;
}
.map-strategy-link-chip {
  border-color: #c8beec;
  background: #f3efff;
  color: #4d4396;
}
.map-strategy-link-list {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}
.map-strategy-link-btn {
  border: 1px solid #cdc3ed;
  background: #f8f4ff;
  color: #4d4396;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.map-strategy-link-btn:hover {
  border-color: #b3a8df;
  box-shadow: 0 4px 8px rgba(84, 68, 152, 0.2);
  transform: translateY(-1px);
}
.map-strategy-link-btn:focus-visible {
  outline: 2px solid rgba(84, 68, 152, 0.3);
  outline-offset: 1px;
}
.map-strategy-link-more {
  font-size: 10px;
  color: #5b4fa8;
  font-weight: 700;
}
.map-vote-square {
  background: #2b6fbe;
  border-color: #1f4f84;
}
.strategy-map-viewport {
  --map-parent-accent-thickness: 6px;
  border-color: #c5d8f2;
  background-color: #fbfdff;
  background-image:
    linear-gradient(rgba(131, 162, 206, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(131, 162, 206, 0.06) 1px, transparent 1px);
}
.strategy-map-edge.edge-root {
  stroke: #2b6fbe;
}
.strategy-map-edge.edge-root-parent {
  stroke: #0e86ff;
  stroke-width: var(--map-parent-accent-thickness);
  opacity: 0.98;
  filter: drop-shadow(0 0 2px rgba(14, 134, 255, 0.35));
}
.strategy-map-edge.edge-child {
  stroke: #4f80be;
}
.strategy-map-edge.edge-orphan {
  stroke: #82a9dd;
}
.strategy-map-edge.edge-strategy-link {
  stroke: #6a63bf;
  stroke-width: 2.4;
  opacity: 0.58;
  stroke-dasharray: 7 6;
}
.institution-node {
  border: var(--map-parent-accent-thickness) solid #2b6fbe;
  background: linear-gradient(165deg, #f2f8ff 0%, #e2efff 100%);
  box-shadow: 0 16px 30px rgba(31, 79, 132, 0.22);
}
.institution-subtitle {
  color: #2b568d;
}
.institution-node::before {
  color: #244a79;
  border-color: #9ebfe8;
}
.institution-node.active {
  box-shadow:
    0 0 0 7px rgba(43, 111, 190, 0.3),
    0 28px 50px rgba(31, 79, 132, 0.36);
  animation: none;
}
.institution-node.active.pulse-active {
  animation: institutionPulse 2.1s ease-in-out infinite;
}
@keyframes institutionPulse {
  0% {
    box-shadow:
      0 0 0 4px rgba(43, 111, 190, 0.2),
      0 18px 30px rgba(31, 79, 132, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 13px rgba(43, 111, 190, 0.42),
      0 34px 58px rgba(31, 79, 132, 0.42);
  }
  100% {
    box-shadow:
      0 0 0 4px rgba(43, 111, 190, 0.2),
      0 18px 30px rgba(31, 79, 132, 0.2);
  }
}

.guideline-node.relation-parent {
  background: linear-gradient(180deg, #ffffff 0%, #e7f2ff 100%);
  border: var(--map-parent-accent-thickness) solid #0e86ff;
  padding: 10px 12px;
  box-shadow:
    0 0 0 3px rgba(45, 134, 230, 0.22),
    0 16px 28px rgba(18, 72, 138, 0.22);
}
.guideline-node.relation-parent h4 {
  font-size: 17px;
}
.guideline-node.relation-parent small {
  font-size: 13px;
}
.guideline-node.relation-parent .map-comment-btn {
  font-size: 13px;
  padding: 5px 10px 5px 6px;
}
.guideline-node.relation-parent .map-comment-icon {
  width: 24px;
  height: 24px;
}
.guideline-node.relation-parent .map-comment-count {
  min-width: 21px;
  height: 21px;
  font-size: 13px;
}
.guideline-node.relation-parent .map-vote-chip {
  font-size: 13px;
  padding: 3px 10px;
}
.guideline-node.relation-parent .map-vote-chip strong {
  font-size: 16px;
}
.guideline-node.relation-parent .map-vote-empty {
  font-size: 13px;
}
.guideline-node.relation-child {
  background: linear-gradient(180deg, #ffffff 0%, var(--pastel-soft) 100%);
  border-color: var(--pastel-soft-border);
  border-left-color: #1f4f84;
}
.guideline-node.relation-orphan {
  background: linear-gradient(180deg, #ffffff 0%, #f1fbf9 100%);
  border-color: #c8e8e3;
  border-left-color: #6b95cc;
}
.guideline-node.top-score {
  box-shadow: 0 0 0 2px rgba(63, 143, 230, 0.22), 0 10px 20px rgba(31, 79, 132, 0.12);
}

.map-comment-btn {
  border-color: #9fc0e5;
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  color: #244a79;
}
.map-comment-btn:hover {
  border-color: #7aa6d9;
  background: linear-gradient(180deg, #ffffff 0%, #dfebff 100%);
}
.map-comment-btn:focus-visible {
  outline-color: #2b6fbe;
}
.map-comment-icon {
  background: #2b6fbe;
}
.map-comment-count {
  border-color: #b7cde9;
  color: #254a78;
}

.card.featured {
  border-color: #3f8fe6;
  background: linear-gradient(165deg, #f3f9ff 0%, #dfeeff 100%);
  box-shadow: 0 16px 36px rgba(43, 111, 190, 0.2);
}

.app-disclaimer a {
  color: #245eaa;
}
.app-disclaimer a:hover {
  color: #1f4f84;
}
@media (max-width: 900px) {
  .card-title {
    grid-template-columns: 1fr;
  }
  .vote-panel {
    width: 100%;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .inline-form .btn {
    width: fit-content;
  }
  .vote-floating {
    left: 10px;
    bottom: 10px;
    top: auto;
  }
  .vote-floating-inner {
    width: min(190px, calc(100vw - 20px));
  }

  .app-disclaimer {
    flex-direction: column;
    align-items: center;
  }
  .admin-participant-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-participant-stats {
    justify-content: flex-start;
  }
  .admin-participant-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .admin-participant-actions .btn {
    width: 100%;
  }
}

@media (max-width: 1280px) {
  .card-title {
    grid-template-columns: 1fr;
  }

  .vote-panel {
    width: 100%;
  }

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

  .initiative-matrix-table {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 10px 10px 18px;
  }

  .site-header {
    margin-bottom: 10px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
    align-items: stretch;
  }

  .topbar-main {
    flex: 1 1 auto;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .brand-map-link {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand-map-link::before {
    inset: 4px;
    border-radius: 10px;
  }

  .brand-map-link::after {
    border-radius: 14px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .steps {
    position: static;
    top: auto;
    align-self: stretch;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .step-pill-shell {
    min-width: 132px;
    flex: 0 0 auto;
  }

  .step-utility-shell {
    min-width: 220px;
  }

  .step-pill {
    width: auto;
    min-width: 120px;
    padding: 9px 9px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .step-pill-head {
    gap: 7px;
  }

  .step-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
    border-radius: 7px;
  }

  .step-pill h4 {
    font-size: 13px;
  }

  .step-pill-action {
    min-height: 32px;
    border-radius: 9px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .session-name {
    font-size: clamp(18px, 5.6vw, 22px);
    line-height: 1.18;
  }

  .stage {
    padding: 12px;
    border-radius: 14px;
    min-height: 0;
  }

  .step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 10px;
  }

  .step-header h2 {
    font-size: 24px;
  }

  .step-header-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .prompt {
    margin-bottom: 12px;
  }

  .btn {
    padding: 9px 14px;
    font-size: 14px;
  }

  input[type='text'],
  input[type='email'],
  input[type='password'],
  textarea,
  select {
    font-size: 14px;
    padding: 9px 11px;
  }

  textarea {
    min-height: 94px;
  }

  .user-bar {
    justify-content: flex-start;
    width: 100%;
    margin: 4px 0 10px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .user-toolbar {
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
    border-radius: 16px;
    padding: 8px;
    gap: 8px;
  }

  .institution-switcher {
    width: 100%;
    min-height: 0;
    padding: 7px 10px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }

  .institution-switcher > span {
    font-size: 10px;
    letter-spacing: 0.03em;
  }

  .institution-switcher select {
    width: 100%;
    font-size: 14px;
  }

  .user-chip {
    width: 100%;
    min-height: 36px;
    justify-content: space-between;
    padding: 7px 10px;
    font-size: 13px;
  }

  .user-toolbar .btn {
    width: 100%;
    min-height: 36px;
    font-size: 13px;
    justify-content: center;
  }

  .card {
    padding: 12px;
    border-radius: 14px;
  }

  .card h4 {
    font-size: 19px;
    line-height: 1.28;
  }

  .card p {
    font-size: 13px;
    line-height: 1.45;
  }

  .inline-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .inline-form input[type='text'] {
    padding: 10px 12px;
  }

  .inline-form .btn {
    width: 100%;
  }

  .header-stack {
    gap: 6px;
  }

  .header-row {
    align-items: flex-start;
    gap: 8px;
  }

  .tag {
    font-size: 11px;
    padding: 4px 8px;
    margin-bottom: 4px;
  }

  .guideline-checkbox-panel {
    padding: 6px;
  }

  .guideline-checkbox-list {
    max-height: 160px;
    gap: 5px;
  }

  .guideline-checkbox-item {
    padding: 6px 7px;
  }

  .guideline-checkbox-label {
    font-size: 13px;
  }

  .initiative-add-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #initiativeAddForm textarea[name='desc'],
  .guideline-add-form textarea[name='desc'] {
    width: 100%;
    min-height: 102px;
  }

  .initiative-matrix-card {
    padding: 10px;
    gap: 8px;
  }

  .initiative-matrix-scroll {
    max-height: 260px;
  }

  .initiative-matrix-table th,
  .initiative-matrix-table td {
    padding: 7px 8px;
  }

  .initiative-matrix-chip {
    font-size: 11px;
    padding: 3px 8px;
  }

  .card-list {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
  }

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

  .strategy-map-viewport {
    min-height: 380px;
    border-radius: 14px;
  }

  .map-overlay-toolbar {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
  }

  .map-overlay-layer-toggle,
  .map-overlay-actions {
    width: 100%;
  }

  .map-overlay-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .map-layer-toggle {
    width: 100%;
    gap: 4px;
    padding: 3px;
  }

  .map-layer-toggle .btn {
    min-width: 0;
    flex: 1 1 0;
    padding: 7px 8px;
    font-size: 12px;
  }

  .map-overlay-actions .btn,
  .map-overlay-actions .btn-icon {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .map-overlay-actions .btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .map-fullscreen-watermark {
    right: 10px;
    bottom: 10px;
  }

  .map-fullscreen-watermark img {
    width: clamp(94px, 28vw, 150px);
  }

  .vote-panel {
    padding: 9px 10px;
  }

  .vote-controls {
    gap: 8px;
  }

  .vote-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .vote-score {
    font-size: 17px;
  }

  .vote-floating {
    left: 8px;
    bottom: 8px;
  }

  .vote-floating-inner {
    width: min(170px, calc(100vw - 16px));
  }

  .vote-floating-count {
    font-size: 22px;
  }

  .login-overlay {
    padding: 12px;
  }

  .login-card {
    width: min(100%, 430px);
    padding: 16px;
    border-radius: 16px;
  }

  .login-form {
    gap: 10px;
    margin-top: 10px;
  }

  .auth-password-field input {
    padding-right: 78px;
  }

  .auth-password-toggle {
    right: 6px;
    padding: 4px 9px;
    font-size: 11px;
  }

  .auth-separator {
    margin: 10px 0;
  }

  .export-card {
    border-radius: 16px;
    padding: 14px;
  }

  .app-disclaimer {
    padding: 12px;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 8px 8px 14px;
  }

  .topbar {
    gap: 6px;
    margin-bottom: 8px;
  }

  .step-pill {
    min-width: 108px;
    padding: 8px 7px;
  }

  .step-pill-shell {
    min-width: 116px;
  }

  .strategy-create-overlay {
    padding: 10px;
  }

  .strategy-create-card {
    width: min(100%, 96vw);
    max-height: calc(100vh - 20px);
  }

  .step-pill h4 {
    font-size: 12px;
  }

  .step-pill-action {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .step-icon {
    width: 17px;
    height: 17px;
    font-size: 11px;
    border-radius: 6px;
  }

  .stage {
    padding: 10px;
    border-radius: 12px;
  }

  .step-header h2 {
    font-size: 22px;
  }

  .brand-map-link {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-map-link::before {
    inset: 3px;
    border-radius: 8px;
  }

  .brand-map-link::after {
    border-radius: 12px;
  }

  .institution-switcher {
    padding: 6px 8px;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .institution-switcher > span {
    display: none;
  }

  .strategy-switcher-inline {
    gap: 6px;
  }

  .strategy-switcher-item {
    min-width: 0;
  }

  .strategy-switcher-utility-row {
    grid-template-columns: 1fr;
  }

  .strategy-ai-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-switcher-card-topbar {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .strategy-switcher-card-topbar .strategy-switcher-dialog {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid #d0e1f7;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 8px;
  }

  .user-toolbar {
    padding: 7px;
    border-radius: 14px;
  }

  .user-chip {
    font-size: 12px;
    padding: 6px 8px;
  }

  .card {
    padding: 10px;
  }

  .card h4 {
    font-size: 18px;
  }

  .strategy-map-viewport {
    min-height: 340px;
  }

  .map-overlay-toolbar {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 8px;
  }

  .map-overlay-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layer-toggle .btn,
  .map-overlay-actions .btn {
    font-size: 11px;
    padding: 6px 8px;
  }

  .map-overlay-actions .btn-icon {
    width: 32px;
    height: 32px;
  }

  .vote-btn {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .vote-score {
    font-size: 16px;
  }

  .app-disclaimer {
    padding: 10px 12px;
    border-radius: 12px;
  }

  body.meta-admin-page .topbar h1 {
    font-size: 26px;
  }

  .meta-admin-card {
    padding: 12px;
  }
}

@media (max-width: 1600px) {
  .admin-guideline-grid {
    grid-template-columns: repeat(auto-fit, minmax(760px, 1fr));
  }
  .admin-initiative-grid {
    grid-template-columns: repeat(auto-fit, minmax(760px, 1fr));
  }
}

/* Meta Admin UI refinement */
body.meta-admin-page {
  background:
    radial-gradient(1200px 520px at 6% -8%, rgba(63, 143, 230, 0.2), rgba(63, 143, 230, 0)),
    radial-gradient(900px 400px at 96% -16%, rgba(43, 111, 190, 0.18), rgba(43, 111, 190, 0)),
    linear-gradient(180deg, #eef5ff 0%, #e8f1ff 52%, #edf4ff 100%);
}

body.meta-admin-page .app {
  max-width: 1520px;
  margin: 0 auto;
  padding-bottom: 30px;
}

body.meta-admin-page .topbar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(240, 247, 255, 0.96) 100%);
  box-shadow: 0 10px 22px rgba(27, 74, 136, 0.08);
}

body.meta-admin-page .topbar h1 {
  font-size: clamp(30px, 2.1vw, 38px);
  line-height: 1.1;
}

body.meta-admin-page .stage {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 0;
}

.meta-admin-dashboard {
  display: grid;
  gap: 14px;
}

.meta-admin-card {
  border-color: #bed4f1;
  background: linear-gradient(180deg, #fcfeff 0%, #f4f9ff 100%);
  box-shadow: 0 8px 20px rgba(35, 82, 147, 0.08);
  padding: 16px 18px;
  gap: 12px;
}

.meta-admin-subcard {
  border-color: #cadef6;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(35, 82, 147, 0.06);
}

.meta-admin-hero {
  border-color: #97bceb;
  background: linear-gradient(160deg, #f7fbff 0%, #e7f1ff 100%);
  box-shadow: 0 12px 24px rgba(36, 81, 145, 0.12);
}

.meta-admin-kpis {
  margin-top: 2px;
}

.meta-admin-kpis .tag {
  font-weight: 700;
}

.meta-admin-tabs-card {
  padding: 10px 12px;
}

.meta-admin-top-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-admin-top-tab {
  min-width: 128px;
  justify-content: center;
}

.meta-admin-top-tab.active {
  border-color: #2d76c9;
  background: linear-gradient(180deg, #2d76c9 0%, #235fa8 100%);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 89, 157, 0.2);
}

.meta-admin-hero-actions {
  margin-top: 2px;
}

.meta-admin-notice {
  margin-bottom: 0;
  color: #1f4f84;
  font-weight: 600;
}

.meta-admin-subgrid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.meta-users-layout {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.meta-users-directory {
  border: 1px solid #cadef6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  padding: 10px;
  max-height: min(74vh, 980px);
  overflow: auto;
  display: grid;
  gap: 10px;
}

.meta-user-group {
  border: 1px solid #d5e3f8;
  border-radius: 12px;
  background: #fcfeff;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.meta-user-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meta-user-group-list {
  display: grid;
  gap: 6px;
}

.meta-user-row {
  width: 100%;
  border: 1px solid #c7daf3;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px 10px;
  text-align: left;
  display: grid;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.meta-user-row:hover {
  border-color: #97bcea;
  box-shadow: 0 6px 14px rgba(37, 89, 157, 0.12);
  transform: translateY(-1px);
}

.meta-user-row.active {
  border-color: #2d76c9;
  background: linear-gradient(180deg, #f8fcff 0%, #edf5ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(45, 118, 201, 0.24),
    0 8px 16px rgba(37, 89, 157, 0.16);
}

.meta-user-row-main {
  display: grid;
  gap: 2px;
}

.meta-user-row-name {
  font-size: 17px;
  line-height: 1.2;
}

.meta-user-row-email {
  font-size: 13px;
  color: #5f7594;
  overflow-wrap: anywhere;
}

.meta-user-row-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-user-detail-shell {
  min-width: 0;
}

.meta-user-card {
  gap: 12px;
}

.meta-user-detail-card {
  min-height: 100%;
}

.meta-user-email {
  margin-bottom: 0;
}

.meta-user-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.meta-user-actions-grid .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  min-height: 42px;
}

.meta-user-actions-grid-danger {
  margin-top: -2px;
}

.meta-user-actions-grid-danger .btn-danger {
  border-color: #a63b31;
  background: linear-gradient(180deg, #d95b52 0%, #bf453c 100%);
}

.meta-membership-add-panel {
  border: 1px dashed #aac5e6;
  border-radius: 12px;
  padding: 10px;
  background: #f6fbff;
}

.meta-membership-add-form {
  align-items: center;
  gap: 8px;
}

.meta-membership-add-form select {
  min-width: 0;
}

.meta-reset-panel {
  border: 1px dashed #9dc0ea;
  border-radius: 12px;
  padding: 10px;
  background: #f5faff;
}

.meta-reset-link {
  margin-top: 6px;
  margin-bottom: 0;
  word-break: break-all;
  color: #244e80;
}

.meta-reset-expiry {
  margin-top: 4px;
  margin-bottom: 0;
}

.meta-memberships-panel {
  border-top: 1px solid #d9e7fa;
  padding-top: 8px;
}

.meta-membership-list,
.meta-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.meta-membership-item,
.meta-admin-list-item {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  border: 1px solid #d4e3f7;
  border-radius: 12px;
  padding: 9px 10px;
  background: #fafdff;
}

.meta-membership-main strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.meta-membership-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-membership-controls .btn {
  margin-left: auto;
}

.meta-admin-list-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.meta-invite-token-card {
  border-style: dashed;
}

.meta-content-settings-form {
  display: grid;
  gap: 12px;
}

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

.meta-content-locale-card {
  display: grid;
  gap: 8px;
}

.meta-ai-create-form textarea {
  min-height: 108px;
  resize: vertical;
}

.meta-ai-create-form input[type="file"] {
  padding: 10px;
  border: 1px dashed #b4cceb;
  border-radius: 12px;
  background: #f7fbff;
}

.meta-ai-result-card {
  border-style: dashed;
}

.meta-ai-progress {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #bfd5f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  display: grid;
  gap: 8px;
}

.meta-ai-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #23466f;
}

.meta-ai-progress-head strong {
  color: #153457;
}

.meta-ai-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #c6daf2;
  background: #e7f0fb;
  overflow: hidden;
}

.meta-ai-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f79cf 0%, #3b8de4 100%);
  transition: width 0.35s ease;
}

.meta-ai-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.meta-ai-progress-steps li {
  border: 1px solid #c5d8ef;
  border-radius: 10px;
  background: #f6faff;
  color: #5d7798;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 8px;
  text-transform: none;
}

.meta-ai-progress-steps li.is-active {
  border-color: #5f97d8;
  background: #e6f1ff;
  color: #1f4f84;
}

.meta-ai-progress-steps li.is-done {
  border-color: #68a684;
  background: #e9f7ef;
  color: #1f6c43;
}

@media (max-width: 860px) {
  .meta-ai-progress-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.meta-guideline-links-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 1.4fr) auto auto;
  gap: 8px;
  align-items: center;
}

.meta-guideline-links-filters input,
.meta-guideline-links-filters select {
  min-width: 0;
}

body.meta-admin-page .btn {
  border-radius: 12px;
  padding: 9px 14px;
}

body.meta-admin-page .btn-primary {
  background: linear-gradient(180deg, #2d76c9 0%, #235fa8 100%);
  border-color: #1f4f84;
}

body.meta-admin-page .btn-ghost {
  background: rgba(255, 255, 255, 0.82);
  border-color: #c0d4f1;
}
body.meta-admin-page .btn-ghost.active {
  border-color: #2d76c9;
  background: linear-gradient(180deg, #2d76c9 0%, #235fa8 100%);
  color: #ffffff;
}

body.meta-admin-page .tag {
  background: #eaf3ff;
  color: #224a79;
  border: 1px solid #c3d8f3;
  margin-right: 0;
}

body.meta-admin-page .tag-scope {
  background: #dcecff;
  border-color: #afccf2;
  color: #1f4674;
}

body.meta-admin-page .tag-count {
  background: #edf5ff;
  border-color: #c3d9f5;
  color: #2a578b;
}

body.meta-admin-page .tag-role {
  background: #eef8ff;
  border-color: #c5ddf7;
  color: #245688;
}

body.meta-admin-page .tag-role-institution-admin {
  background: #ddeeff;
  border-color: #a9c9ef;
  color: #173f6c;
  font-weight: 700;
}

body.meta-admin-page .tag-status-active {
  background: #e9f8ef;
  border-color: #b7e3c6;
  color: #1f6a3b;
}

body.meta-admin-page .tag-status-blocked {
  background: #fff0ef;
  border-color: #f0c2bf;
  color: #8f2d27;
}

body.meta-admin-page .tag-status-archived {
  background: #f2f4f7;
  border-color: #d2d8e2;
  color: #5f6b7d;
}

body.meta-admin-page .tag-slug {
  background: #f1f7ff;
  border-color: #ccddf5;
  color: #345f8f;
}

@media (max-width: 900px) {
  body.meta-admin-page .topbar {
    padding: 12px;
  }

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

  .meta-users-directory {
    max-height: none;
  }

  .meta-membership-item,
  .meta-admin-list-item {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .meta-user-actions-grid {
    grid-template-columns: 1fr;
  }

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

  .meta-guideline-links-filters {
    grid-template-columns: 1fr;
  }

  .meta-admin-top-tab {
    min-width: 0;
    flex: 1 1 180px;
  }

  .meta-membership-controls .btn {
    margin-left: 0;
    width: 100%;
  }

  .meta-admin-hero-actions {
    grid-template-columns: 1fr;
  }
}
