/* ファイルパス: public/css/style.css */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-blue: #f5f7ff;
  --border: #e5e7eb;
  --border-strong: #d9def0;
  --text: #111827;
  --text-muted: #667085;
  --text-soft: #98a2b3;
  --primary: #4f46e5;
  --primary-2: #2563eb;
  --primary-soft: #eef2ff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --blue-soft: #dbeafe;
  --green-soft: #dcfce7;
  --red-soft: #fee2e2;
  --yellow-soft: #fef3c7;
  --purple-soft: #ede9fe;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --header-h: 72px;
  --tab-h: 58px;
  --sidebar-w: 260px;
  --right-panel-w: 320px;
  --toolbar-w: 88px;
  --font: Inter, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 70, 229, 0.05), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-center {
  flex: 1;
  min-width: 0;
}

.header-right {
  margin-left: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo img {
  width: 164px;
  height: 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
}

.project-title {
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.save-status,
.meta-text {
  color: var(--text-muted);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  display: inline-block;
}

.status-dot.warning {
  background: var(--warning);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--border-strong);
  background: #fbfcff;
}

.btn-primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, #4f46e5 0%, #5b35f5 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f2ddd 100%);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn-soft {
  background: var(--primary-soft);
  border-color: #d9ddff;
  color: var(--primary);
}

.btn-danger {
  background: #fff;
  border-color: #fecaca;
  color: #dc2626;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  background: rgba(255, 255, 255, 0.74);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card,
.panel-card,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.sidebar-card {
  padding: 18px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  height: 48px;
  border-radius: 12px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475467;
  font-weight: 650;
  font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.main {
  padding: 28px 32px 40px;
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.page-title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.search-box {
  height: 44px;
  min-width: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  background: transparent;
}

.tabs {
  height: var(--tab-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.tab {
  border: none;
  background: transparent;
  padding: 0 14px;
  color: #475467;
  font-weight: 750;
  font-size: 14px;
  position: relative;
}

.tab.active {
  color: var(--primary);
}

.tab.active::after {
  content: "";
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
}

.sub-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 0 28px;
  height: 62px;
}

.sub-tab {
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: #475467;
  font-weight: 750;
}

.sub-tab.active {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.project-card {
  padding: 24px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--primary);
  background: var(--primary-soft);
}

.project-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.project-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}

.tag.green {
  background: var(--green-soft);
  color: #15803d;
}

.tag.red {
  background: var(--red-soft);
  color: #dc2626;
}

.tag.yellow {
  background: var(--yellow-soft);
  color: #b45309;
}

.tag.blue {
  background: var(--blue-soft);
  color: #2563eb;
}

.table-card {
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: #fbfcff;
  color: #475467;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.form-control,
.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.input,
.select {
  height: 44px;
  padding: 0 14px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  padding: 12px 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  color: #475467;
  margin-bottom: 8px;
}

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

.workspace-shell {
  display: grid;
  grid-template-columns: var(--toolbar-w) 1fr var(--right-panel-w);
  height: calc(100vh - var(--header-h) - var(--tab-h));
  background: #fff;
}

.canvas-toolbar {
  border-right: 1px solid var(--border);
  background: #fff;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-btn {
  min-height: 66px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #475467;
  display: grid;
  place-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}

.tool-btn.active,
.tool-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #dfe3ff;
}

.canvas-area {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  background-image: radial-gradient(#d6d9e6 1px, transparent 1px);
  background-size: 22px 22px;
}

.canvas-board {
  position: relative;
  width: 1800px;
  height: 1100px;
  transform-origin: top left;
}

.frame {
  position: absolute;
  border: 1.5px dashed rgba(79, 70, 229, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  padding: 28px;
}

.frame-title {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: var(--shadow-sm);
}

.sticky {
  position: absolute;
  width: 148px;
  min-height: 116px;
  padding: 18px 16px;
  border-radius: 4px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
  color: #111827;
  font-weight: 700;
  line-height: 1.55;
  font-size: 14px;
}

.sticky.pink {
  background: #ffd9d9;
}

.sticky.blue {
  background: #dcecff;
}

.sticky.green {
  background: #dcf8d8;
}

.sticky.yellow {
  background: #ffedb6;
}

.sticky.orange {
  background: #ffe0ad;
}

.connector {
  position: absolute;
  height: 2px;
  background: #111827;
  transform-origin: left center;
}

.connector::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  border-left: 9px solid #111827;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.right-panel {
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  padding: 22px;
  overflow: auto;
}

.panel-title {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.panel-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.panel-section:last-child {
  border-bottom: none;
}

.color-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-dot {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}

.color-dot.active {
  box-shadow: 0 0 0 2px var(--primary);
}

.zoom-controls,
.toast,
.mini-map {
  position: absolute;
  z-index: 10;
}

.zoom-controls {
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-md);
}

.zoom-controls button,
.zoom-controls span {
  height: 34px;
  min-width: 42px;
  border: none;
  border-radius: 9px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 750;
}

.mini-map {
  right: 24px;
  bottom: 86px;
  width: 168px;
  height: 112px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.toast {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  min-width: 340px;
  min-height: 58px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 750;
}

.toast::before {
  content: "✓";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5dbb55;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.revenue-layout {
  display: grid;
  grid-template-columns: 260px 1fr 330px;
  gap: 24px;
  padding: 24px;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
}

.step.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.step-no {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 850;
  background: #fff;
}

.revenue-main {
  min-width: 0;
}

.revenue-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.revenue-table-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1.8fr 100px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.revenue-table-row.header {
  background: #fbfcff;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.result-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metric-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metric-label {
  color: var(--primary);
  font-size: 14px;
  font-weight: 850;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.metric-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  background:
    radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.14), transparent 35%),
    linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
}

.auth-hero {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-card {
  margin: auto 56px auto 0;
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.05em;
}

.auth-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 24px;
  padding: 24px;
}

.kpi-card {
  padding: 24px;
}

.kpi-value {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-top: 8px;
}

.kpi-label {
  color: #475467;
  font-weight: 750;
}

.ai-layout {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 24px;
  padding: 28px;
}

.chat-message {
  max-width: 820px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.chat-message.user {
  margin-left: auto;
  background: var(--primary-soft);
  border-color: #dfe3ff;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding-top: 14px;
  background: linear-gradient(180deg, transparent 0%, #f8fafc 30%);
}

.export-layout {
  display: grid;
  grid-template-columns: 300px 1fr 330px;
  gap: 24px;
  padding: 24px;
}

.export-preview {
  height: 230px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 850;
}

@media (max-width: 1180px) {
  .layout,
  .admin-layout,
  .ai-layout,
  .export-layout,
  .revenue-layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .right-panel {
    display: none;
  }

  .workspace-shell {
    grid-template-columns: 72px 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}



/* ファイルパス: public/css/style.css */
/* 末尾に追加 */

.auth-page-refined {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
  align-items: center;
}

.auth-hero-refined {
  min-height: 100vh;
  padding: 52px 48px 36px;
}

.auth-logo-link,
.auth-logo-img {
  display: inline-flex;
  width: 210px;
  height: auto;
}

.auth-logo-link img {
  width: 210px;
  height: auto;
}

.auth-copy {
  max-width: 760px;
}

.auth-title {
  font-size: clamp(42px, 4.2vw, 58px) !important;
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.auth-subtitle {
  max-width: 760px;
  font-size: 17px !important;
  line-height: 1.85 !important;
}

.auth-card-refined {
  width: min(440px, calc(100vw - 48px));
  margin: 0 48px 0 0;
  padding: 36px;
}

.auth-feature-grid {
  grid-template-columns: 1fr;
}

.logo img {
  width: 210px;
  height: auto;
  max-width: none;
}

.app-header {
  overflow: visible;
}

.header-left {
  min-width: 0;
  flex-shrink: 0;
}

.header-center {
  min-width: 260px;
}

.header-right {
  flex-shrink: 0;
}

.admin-layout {
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  align-items: start;
}

@media (max-width: 1080px) {
  .auth-page-refined {
    grid-template-columns: 1fr;
  }

  .auth-hero-refined {
    min-height: auto;
    padding: 40px 28px 28px;
    gap: 56px;
  }

  .auth-card-refined {
    margin: 0 auto 40px;
  }

  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .auth-hero-refined {
    padding: 28px 20px 24px;
  }

  .auth-title {
    font-size: 38px !important;
  }

  .auth-card-refined {
    width: calc(100vw - 32px);
    padding: 28px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    border-right: none;
  }

  .app-header {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 16px;
  }

  .header-center {
    order: 3;
    width: 100%;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }
}


/* Admin pages must never flash before app-level admin authentication completes. */
body:has(.admin-layout) .app-shell {
  visibility: hidden;
}

body.admin-auth-ready:has(.admin-layout) .app-shell {
  visibility: visible;
}

body:has(.admin-layout):not(.admin-auth-ready)::before {
  content: "管理者認証を確認しています...";
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(79, 70, 229, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #667085;
  font-size: 15px;
  font-weight: 700;
}


.auth-page-home-clean {
  grid-template-columns: 1fr;
}

.auth-hero-home-clean {
  width: 100%;
}

.auth-hero-home-clean .auth-copy {
  max-width: 860px;
}


/* Workspace global tab bar refinement */
.workspace-tabs {
  min-height: 56px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
}

.workspace-tabs a,
.workspace-tabs button {
  min-height: 56px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  line-height: 1;
  font-weight: 800;
  color: #475467;
}

.workspace-tabs a:hover,
.workspace-tabs button:hover {
  color: #5b21ff;
}

.workspace-tabs a.active,
.workspace-tabs button.active,
.workspace-tabs .active {
  color: #5b21ff;
  border-bottom-color: #6366f1;
}

/* Workspace main tabs refinement */
.tabs {
  height: 64px;
  min-height: 64px;
  padding: 0 28px;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: rgba(255, 255, 255, 0.96);
}

.tab {
  height: 64px;
  min-height: 64px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 3px solid transparent;
  line-height: 1;
  font-weight: 800;
}

.tab.active::after {
  display: none;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}





/* Whiteboard full interaction refinement */

.whiteboard-page .app-header {
  z-index: 50;
}

.whiteboard-shell {
  position: relative;
  grid-template-columns: var(--toolbar-w) 1fr var(--right-panel-w);
}

.whiteboard-shell.panel-collapsed {
  grid-template-columns: var(--toolbar-w) 1fr 0;
}

.whiteboard-area {
  cursor: grab;
}

.whiteboard-area.is-panning,
.whiteboard-area.is-pan-mode,
.whiteboard-area.space-pan {
  cursor: grabbing;
}

.canvas-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.whiteboard-canvas-board {
  position: absolute;
  left: 0;
  top: 0;
  width: 2800px;
  height: 1800px;
  transform-origin: top left;
}

.whiteboard-guide {
  position: absolute;
  left: 24px;
  top: 18px;
  z-index: 20;
  max-width: 800px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.whiteboard-guide strong {
  color: #111827;
  white-space: nowrap;
}

.collab-avatars {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.avatar-chip {
  width: 30px;
  height: 30px;
  margin-left: -8px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}

.avatar-chip:first-child {
  margin-left: 0;
}

.avatar-muted {
  color: #667085;
  background: #f9fafb;
}

.whiteboard-object {
  user-select: none;
  cursor: move;
  box-sizing: border-box;
}

.whiteboard-object.selected {
  outline: 3px solid rgba(99, 102, 241, 0.36);
  outline-offset: 4px;
}

.whiteboard-text {
  min-height: 44px;
  padding: 10px 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  background: transparent;
}

.whiteboard-shape {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1.5px solid rgba(15, 23, 42, 0.16);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  color: #111827;
  font-weight: 800;
  text-align: center;
}

.whiteboard-shape.shape-rectangle {
  border-radius: 4px;
}

.whiteboard-shape.shape-round {
  border-radius: 18px;
}

.whiteboard-shape.shape-circle {
  border-radius: 999px;
}

.whiteboard-shape.shape-bubble {
  border-radius: 20px 20px 20px 6px;
}

.whiteboard-shape.shape-bubble::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -12px;
  border-top: 14px solid currentColor;
  border-right: 14px solid transparent;
  opacity: 0.12;
}

.whiteboard-comment {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.whiteboard-comment::before {
  content: "Comment";
  display: block;
  margin-bottom: 8px;
  color: #6366f1;
  font-size: 12px;
  font-weight: 850;
}

.whiteboard-frame {
  position: absolute;
  border: 1.5px dashed rgba(79, 70, 229, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  padding: 28px;
}

.whiteboard-frame .frame-title {
  background: #eef2ff;
  color: #4f46e5;
}

.whiteboard-arrow {
  position: absolute;
  background: transparent !important;
  min-height: 0;
  padding: 0;
  color: transparent;
}

.whiteboard-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: var(--line-width, 2px) solid var(--arrow-color, #111827);
  transform: translateY(-50%);
}

.whiteboard-arrow.line-dashed::before {
  border-top-style: dashed;
}

.whiteboard-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 10px solid var(--arrow-color, #111827);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.whiteboard-arrow.arrow-start::after,
.whiteboard-arrow.arrow-both::after {
  right: auto;
  left: -2px;
  border-left: none;
  border-right: 10px solid var(--arrow-color, #111827);
}

.whiteboard-arrow.arrow-both::before {
  box-shadow: none;
}

.whiteboard-arrow.arrow-both .resize-handle::before {
  content: "";
}

.whiteboard-arrow.arrow-none::after {
  display: none;
}

.whiteboard-arrow.arrow-both::after {
  display: block;
}

.whiteboard-arrow.arrow-both {
  box-shadow: inset -10px 0 0 transparent;
}

.whiteboard-arrow.arrow-both::before {
  left: 0;
  right: 0;
}

.whiteboard-arrow.arrow-both::after {
  left: -2px;
}

.whiteboard-arrow.arrow-both::selection {
  background: transparent;
}

.resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: #6366f1;
  box-shadow: var(--shadow-sm);
  cursor: nwse-resize;
  opacity: 0;
}

.whiteboard-object.selected .resize-handle {
  opacity: 1;
}

.comment-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
}

.whiteboard-property-panel {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.panel-collapsed .whiteboard-property-panel {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  padding-left: 0;
  padding-right: 0;
  border-left: none;
  overflow: hidden;
}

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

.panel-subtitle {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #475467;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.35);
  background: var(--primary-soft);
}

.panel-toggle {
  position: absolute;
  right: 18px;
  top: 78px;
  z-index: 30;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #4f46e5;
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segmented-control button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.segmented-control button.active,
.segmented-control button:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.32);
}

.segmented-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: center;
}

.range-row input {
  width: 100%;
}

.range-row span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.form-row.compact {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.comment-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.comment-item {
  display: grid;
  grid-template-columns: 1fr 26px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.comment-item button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: #f9fafb;
  color: #98a2b3;
  cursor: pointer;
}

.comment-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-danger-outline {
  width: 100%;
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.24);
  background: #ffffff;
}

.btn-danger-outline:hover {
  background: #fff3f0;
  border-color: rgba(180, 35, 24, 0.34);
}

.whiteboard-context-menu {
  position: fixed;
  z-index: 100;
  display: none;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.whiteboard-context-menu.show {
  display: grid;
}

.whiteboard-context-menu button {
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.whiteboard-context-menu button:hover {
  background: #f2f4f7;
}

.whiteboard-context-menu button.danger {
  color: #b42318;
}

.whiteboard-mini-map {
  right: 24px;
  bottom: 86px;
  width: 168px;
  height: 112px;
  padding: 8px;
}

.mini-map-board {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.mini-map-view {
  position: absolute;
  border: 1.5px solid rgba(99, 102, 241, 0.85);
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.08);
}

.mini-dot {
  position: absolute;
  min-width: 3px;
  min-height: 3px;
  border-radius: 3px;
  background: #c7d2fe;
}

.mini-sticky {
  background: #fde68a;
}

.mini-frame {
  border: 1px dashed #a5b4fc;
  background: transparent;
}

.mini-shape {
  background: #bfdbfe;
}

.mini-arrow {
  height: 2px !important;
  background: #111827;
}

.whiteboard-page .textarea:disabled,
.whiteboard-page .input:disabled {
  background: #f9fafb;
  color: #98a2b3;
}

@media (max-width: 1100px) {
  .whiteboard-guide {
    display: none;
  }

  .collab-avatars {
    display: none;
  }
}


/* Whiteboard multi-select refinement patch */

.whiteboard-toolbar .tool-btn span {
  font-size: 10px;
  letter-spacing: -0.01em;
}

.selection-box {
  position: absolute;
  z-index: 40;
  display: none;
  border: 1.5px solid rgba(99, 102, 241, 0.72);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  pointer-events: none;
}

.selection-box.show {
  display: block;
}

.whiteboard-object.selected {
  outline: 3px solid rgba(99, 102, 241, 0.38);
  outline-offset: 4px;
}

.whiteboard-object.selected::selection {
  background: transparent;
}

.whiteboard-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.whiteboard-guide[hidden] {
  display: none !important;
}

.whiteboard-guide-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-close {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.guide-close:hover {
  color: #4f46e5;
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.36);
}

.color-row.extended {
  display: grid;
  grid-template-columns: repeat(6, 28px);
  gap: 10px;
}

.small-label {
  margin-top: 12px;
}

.whiteboard-page .comment-badge {
  display: none !important;
}

.whiteboard-arrow {
  position: absolute;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  background: transparent !important;
  color: transparent !important;
  transform-origin: center center;
}

.whiteboard-arrow::before,
.whiteboard-arrow::after {
  display: none !important;
}

.arrow-line-body {
  position: absolute;
  left: var(--arrow-size, 14px);
  right: var(--arrow-size, 14px);
  top: 50%;
  border-top: var(--line-width, 2px) solid var(--arrow-color, #111827);
  transform: translateY(-50%);
}

.whiteboard-arrow.line-dashed .arrow-line-body {
  border-top-style: dashed;
}

.arrow-head {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.arrow-head-start {
  left: 0;
  border-right: var(--arrow-size, 14px) solid var(--arrow-color, #111827);
  border-top: var(--arrow-half, 8px) solid transparent;
  border-bottom: var(--arrow-half, 8px) solid transparent;
}

.arrow-head-end {
  right: 0;
  border-left: var(--arrow-size, 14px) solid var(--arrow-color, #111827);
  border-top: var(--arrow-half, 8px) solid transparent;
  border-bottom: var(--arrow-half, 8px) solid transparent;
}

.whiteboard-arrow.arrow-end .arrow-head-start {
  display: none;
}

.whiteboard-arrow.arrow-start .arrow-head-end {
  display: none;
}

.whiteboard-arrow.arrow-none .arrow-head-start,
.whiteboard-arrow.arrow-none .arrow-head-end {
  display: none;
}

.whiteboard-arrow.arrow-none .arrow-line-body {
  left: 0;
  right: 0;
}

.whiteboard-arrow.arrow-end .arrow-line-body {
  left: 0;
  right: var(--arrow-size, 14px);
}

.whiteboard-arrow.arrow-start .arrow-line-body {
  left: var(--arrow-size, 14px);
  right: 0;
}

.whiteboard-arrow.arrow-both .arrow-line-body {
  left: var(--arrow-size, 14px);
  right: var(--arrow-size, 14px);
}

.whiteboard-arrow .resize-handle {
  right: -7px;
  bottom: 8px;
}

.comment-list {
  max-height: 160px;
  overflow: auto;
}

.comment-item {
  animation: commentFadeIn 0.12s ease-out;
}

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



/* Whiteboard mouse navigation refinement */

.whiteboard-area {
  overscroll-behavior: contain;
}

.whiteboard-area.space-pan,
.whiteboard-area.is-panning {
  cursor: grabbing !important;
}

.whiteboard-mini-map,
.whiteboard-mini-map * {
  cursor: crosshair;
}

.whiteboard-mini-map {
  user-select: none;
}

.whiteboard-mini-map:active {
  cursor: grabbing;
}

.zoom-controls button {
  cursor: pointer;
}




/* Export Workspace refinement */

.export-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.06), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.export-workspace {
  align-items: stretch;
}

.export-source-panel {
  padding: 22px 18px;
}

.export-main {
  min-width: 0;
}

.export-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.export-summary-card {
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.export-summary-card strong,
.export-summary-card small {
  display: block;
}

.export-summary-card strong {
  margin-top: 6px;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
}

.export-summary-card small {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.export-radio-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.export-radio-list label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
}

.export-radio-list label:hover {
  background: #f9fafb;
}

.export-radio-list.compact label {
  display: flex;
  align-items: center;
  padding: 6px 4px;
}

.export-radio-list strong,
.export-radio-list small {
  display: block;
}

.export-radio-list strong {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.export-radio-list small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.export-setting-grid {
  margin-top: 24px;
}

.export-option-card {
  padding: 24px;
}

.export-option-card h3,
.export-preview-card h3,
.export-note-card h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.export-preview-card {
  padding: 24px;
  margin-top: 24px;
}

.export-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.export-preview {
  min-height: 420px;
  display: block;
  padding: 24px;
  border: 1px solid #dfe4ef;
  border-radius: 18px;
  background:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.10) 1px, transparent 0),
    #f8fafc;
  background-size: 18px 18px;
  overflow: auto;
}

.export-preview-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: #6366f1;
  text-align: center;
}

.export-preview-placeholder strong,
.export-preview-placeholder span {
  display: block;
}

.export-render-sheet {
  width: 960px;
  min-height: 520px;
  box-sizing: border-box;
  padding: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  color: #111827;
}

.export-sheet-header {
  margin-bottom: 28px;
}

.export-sheet-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 850;
}

.export-sheet-header h1 {
  margin: 14px 0 8px;
  color: #111827;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.export-sheet-header p {
  margin: 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.7;
}

.export-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: #98a2b3;
  font-size: 12px;
}

.export-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.export-kpi {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f9fafb;
}

.export-kpi span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.export-kpi strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.export-sheet-section {
  margin-top: 26px;
}

.export-sheet-section h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.export-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-chip-list span {
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.export-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  font-size: 13px;
}

.export-table th,
.export-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.export-table th {
  width: 32%;
  background: #f9fafb;
  color: #475467;
  font-weight: 850;
}

.export-table tr:last-child th,
.export-table tr:last-child td {
  border-bottom: none;
}

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

.export-object-row {
  display: grid;
  grid-template-columns: 40px 120px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.export-object-row span {
  color: #98a2b3;
  font-weight: 850;
}

.export-object-row strong {
  color: #344054;
}

.export-object-row em {
  overflow: hidden;
  color: #667085;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-mini-canvas {
  position: relative;
  width: 720px;
  max-width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background-image: radial-gradient(#c7d2fe 1px, transparent 1px);
  background-size: 16px 16px;
  background-color: #ffffff;
}

.export-mini-canvas.empty {
  display: grid;
  place-items: center;
  color: #98a2b3;
}

.export-mini-object {
  position: absolute;
  display: block;
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 8px;
  opacity: 0.92;
}

.export-mini-arrow {
  height: 2px !important;
  border: none;
  background: #111827 !important;
}

.export-ai-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.export-ai-card strong,
.export-ai-card span,
.export-ai-card small {
  display: block;
}

.export-ai-card span {
  margin-top: 4px;
  color: #667085;
}

.export-ai-card small {
  margin-top: 4px;
  color: #98a2b3;
}

.export-ai-card pre {
  max-height: 220px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.export-note-card {
  padding: 22px 24px;
  margin-top: 24px;
}

.export-note-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #667085;
  font-size: 13px;
  line-height: 1.8;
}

.export-settings-panel {
  background: rgba(255, 255, 255, 0.82);
}

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

.export-check-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.export-status-box {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.export-status-box[data-type="error"] {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff3f0;
  color: #b42318;
}

@media print {
  body {
    background: #ffffff !important;
  }

  .app-header,
  .export-source-panel,
  .export-settings-panel,
  .export-note-card,
  .export-preview-head {
    display: none !important;
  }

  .export-layout {
    display: block !important;
    padding: 0 !important;
  }

  .export-preview-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .export-preview {
    border: none !important;
    background: #ffffff !important;
    padding: 0 !important;
  }

  .export-render-sheet {
    width: auto !important;
    min-height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}


/* Export Whiteboard actual preview / PDF / PNG refinement */

.export-whiteboard-canvas {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background-image: radial-gradient(#c7d2fe 1px, transparent 1px);
  background-size: 16px 16px;
  background-color: #ffffff;
}

.export-whiteboard-canvas.empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-weight: 800;
}

.export-wb-object {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  color: #111827;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: hidden;
}

.export-wb-sticky {
  align-items: flex-start;
  justify-content: flex-start;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

.export-wb-text {
  justify-content: flex-start;
  border: none;
  background: transparent !important;
  font-weight: 850;
}

.export-wb-shape-circle {
  border-radius: 999px;
}

.export-wb-shape-round {
  border-radius: 18px;
}

.export-wb-shape-rectangle {
  border-radius: 4px;
}

.export-wb-frame {
  align-items: flex-start;
  justify-content: center;
  border: 1.5px dashed;
}

.export-wb-frame-title {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 26px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: inherit;
  color: #4f46e5;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.export-wb-arrow {
  position: absolute;
  transform-origin: center center;
}

.export-wb-arrow span {
  position: absolute;
  left: 0;
  right: 14px;
  top: 50%;
  border-top: var(--line-width, 2px) solid var(--arrow-color, #111827);
  transform: translateY(-50%);
}

.export-wb-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-left: 14px solid var(--arrow-color, #111827);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.export-pre {
  overflow: auto;
  max-height: 360px;
  padding: 14px;
  border-radius: 12px;
  background: #f9fafb;
  color: #344054;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media print {
  .export-source-panel,
  .export-settings-panel,
  .export-note-card,
  .export-preview-head,
  .export-setting-grid,
  .app-header {
    display: none !important;
  }

  .export-layout,
  .export-workspace,
  .export-main {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .export-preview-card,
  .export-preview {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  .export-render-sheet {
    width: 100% !important;
    min-height: auto !important;
    padding: 20mm !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}



/* Business Model Diagram Workspace refinement */

.business-model-page {
  min-height: 100vh;
  background: #ffffff;
}

.business-model-shell {
  height: calc(100vh - 132px);
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 316px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.business-model-shell.panel-collapsed {
  grid-template-columns: 252px minmax(0, 1fr) 0;
}

.bm-library-panel {
  overflow-y: auto;
  padding: 22px 18px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.bm-library-head h2 {
  margin: 0;
  color: #4f46e5;
  font-size: 14px;
  font-weight: 850;
}

.bm-library-head p {
  margin: 8px 0 16px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.bm-component-grid {
  display: grid;
  gap: 9px;
}

.bm-component-btn {
  min-height: 42px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #dfe4ef;
  border-radius: 13px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.bm-component-btn:hover,
.bm-component-btn.active {
  border-color: rgba(99, 102, 241, 0.42);
  background: #eef2ff;
  color: #4f46e5;
}

.bm-component-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 15px;
}

.bm-canvas-area {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.20) 1px, transparent 0),
    #ffffff;
  background-size: 24px 24px;
}

.bm-top-toolbar {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bm-chip {
  height: 42px;
  padding: 0 18px;
  border: 1px solid #dfe4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.bm-chip.active {
  border-color: rgba(99, 102, 241, 0.42);
  background: #eef2ff;
  color: #4f46e5;
}

.bm-guide {
  max-width: 720px;
  padding: 10px 14px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.bm-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bm-board {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.20) 1px, transparent 0),
    transparent;
  background-size: 24px 24px;
}

.bm-board.grid-off {
  background: transparent;
}

.bm-object {
  user-select: none;
}

.bm-object.selected {
  outline: 3px solid rgba(99, 102, 241, 0.38);
  outline-offset: 4px;
}

.bm-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  color: #111827;
}

.bm-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 19px;
}

.bm-label {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.bm-description {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.bm-category {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border: 1.5px dashed rgba(99, 102, 241, 0.32);
  border-radius: 24px;
  background: #ffffff;
  color: #4f46e5;
}

.bm-category-title {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 150px;
  padding: 8px 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: inherit;
  color: #4f46e5;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.bm-category > .bm-description {
  margin-top: 36px;
  color: #667085;
}

.bm-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.bm-arrow {
  position: absolute;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  background: transparent !important;
  color: transparent !important;
  transform-origin: center center;
}

.bm-arrow-line {
  position: absolute;
  left: var(--arrow-size, 14px);
  right: var(--arrow-size, 14px);
  top: 50%;
  border-top: var(--line-width, 2px) solid var(--arrow-color, #111827);
  transform: translateY(-50%);
}

.bm-arrow.line-dashed .bm-arrow-line {
  border-top-style: dashed;
}

.bm-arrow-head {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.bm-arrow-head-start {
  left: 0;
  border-right: var(--arrow-size, 14px) solid var(--arrow-color, #111827);
  border-top: var(--arrow-half, 8px) solid transparent;
  border-bottom: var(--arrow-half, 8px) solid transparent;
}

.bm-arrow-head-end {
  right: 0;
  border-left: var(--arrow-size, 14px) solid var(--arrow-color, #111827);
  border-top: var(--arrow-half, 8px) solid transparent;
  border-bottom: var(--arrow-half, 8px) solid transparent;
}

.bm-arrow.arrow-end .bm-arrow-head-start {
  display: none;
}

.bm-arrow.arrow-start .bm-arrow-head-end {
  display: none;
}

.bm-arrow.arrow-none .bm-arrow-head-start,
.bm-arrow.arrow-none .bm-arrow-head-end {
  display: none;
}

.bm-arrow.arrow-none .bm-arrow-line {
  left: 0;
  right: 0;
}

.bm-arrow.arrow-end .bm-arrow-line {
  left: 0;
  right: var(--arrow-size, 14px);
}

.bm-arrow.arrow-start .bm-arrow-line {
  left: var(--arrow-size, 14px);
  right: 0;
}

.bm-arrow.arrow-both .bm-arrow-line {
  left: var(--arrow-size, 14px);
  right: var(--arrow-size, 14px);
}

.bm-mini-map {
  right: 28px;
  bottom: 70px;
}

.bm-zoom-controls {
  right: 28px;
  bottom: 18px;
}

.bm-property-panel {
  overflow-y: auto;
  background: #ffffff;
}

.business-model-shell.panel-collapsed .bm-property-panel {
  display: none;
}

.bm-panel-toggle {
  right: 20px;
}

.business-model-shell.panel-collapsed .bm-panel-toggle {
  right: 20px;
}

.bm-canvas-area.space-pan,
.bm-canvas-area.is-panning {
  cursor: grabbing !important;
}

.bm-mini-map,
.bm-mini-map * {
  cursor: crosshair;
}

.bm-mini-map:active {
  cursor: grabbing;
}




/* =========================================
   Business Model / Whiteboard text alignment fix
   末尾に追加
========================================= */

.bm-object,
.wb-object {
  box-sizing: border-box;
}

.bm-object .bm-label,
.bm-object .bm-description,
.bm-object .bm-category-title,
.wb-object .wb-label,
.wb-object .wb-description,
.wb-object .wb-category-title {
  width: 100%;
  display: block;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 明示的な text-align クラス */
.bm-object.text-align-left,
.bm-object.text-align-left .bm-label,
.bm-object.text-align-left .bm-description,
.bm-object.text-align-left .bm-category-title,
.wb-object.text-align-left,
.wb-object.text-align-left .wb-label,
.wb-object.text-align-left .wb-description,
.wb-object.text-align-left .wb-category-title {
  text-align: left !important;
}

.bm-object.text-align-center,
.bm-object.text-align-center .bm-label,
.bm-object.text-align-center .bm-description,
.bm-object.text-align-center .bm-category-title,
.wb-object.text-align-center,
.wb-object.text-align-center .wb-label,
.wb-object.text-align-center .wb-description,
.wb-object.text-align-center .wb-category-title {
  text-align: center !important;
}

.bm-object.text-align-right,
.bm-object.text-align-right .bm-label,
.bm-object.text-align-right .bm-description,
.bm-object.text-align-right .bm-category-title,
.wb-object.text-align-right,
.wb-object.text-align-right .wb-label,
.wb-object.text-align-right .wb-description,
.wb-object.text-align-right .wb-category-title {
  text-align: right !important;
}

/* Card / Category の内部文字位置を安定化 */
.bm-card,
.wb-card,
.bm-category,
.wb-category {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bm-card > div,
.wb-card > div {
  flex: 1;
  min-width: 0;
}

.bm-category,
.wb-category {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Text object */
.bm-text,
.wb-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 32px;
}

.bm-text.text-align-left,
.wb-text.text-align-left {
  justify-content: flex-start;
}

.bm-text.text-align-center,
.wb-text.text-align-center {
  justify-content: center;
}

.bm-text.text-align-right,
.wb-text.text-align-right {
  justify-content: flex-end;
}

/* Property panel text-align segmented buttons */
.text-align-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.text-align-control button {
  height: 36px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.text-align-control button:hover {
  background: #f8fafc;
}

.text-align-control button.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
}

.text-align-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* text object label width stabilization */
.bm-text .bm-label,
.wb-text .wb-label {
  width: 100%;
}

/* Arrow objects are excluded */
.bm-arrow,
.wb-arrow {
  text-align: initial !important;
}





/* ファイルパス: public/css/style.css */

/* =========================================
   Whiteboard / Business Model Fix 2026-05-24
   - Text object resize handles
   - Whiteboard Properties toggle proper position
   - Whiteboard Frame label background isolation
   - Whiteboard Frame text color reflection
   - Whiteboard left tool menu readability
========================================= */

/* Business Model：TextにもJSのresize-handleを表示して、他ライブラリと同じドラッグリサイズにする */
.bm-text {
  min-width: 80px !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.bm-text .bm-label {
  width: 100% !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.bm-text .resize-handle {
  display: block !important;
}

/* Whiteboard：TextにもJSのresize-handleを表示して、他ライブラリと同じドラッグリサイズにする */
.whiteboard-text {
  min-width: 80px !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.whiteboard-text .resize-handle {
  display: block !important;
}

/* Whiteboard：Properties再表示ボタンは、右パネル内ではなくキャンバス右上に固定 */
.workspace-shell > .panel-toggle:not(.bm-panel-toggle) {
  top: 20px !important;
  right: 20px !important;
  z-index: 60 !important;
}

.workspace-shell.panel-collapsed > .panel-toggle:not(.bm-panel-toggle) {
  top: 20px !important;
  right: 20px !important;
}

/* Whiteboard：右パネル表示中はProperties再表示ボタンを非表示にし、×ボタンと重ならないようにする */
.workspace-shell:not(.panel-collapsed) > .panel-toggle:not(.bm-panel-toggle) {
  display: none !important;
}

/* Whiteboard：右パネルを閉じた時だけPropertiesボタンを表示 */
.workspace-shell.panel-collapsed > .panel-toggle:not(.bm-panel-toggle) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Whiteboard：Frame本体 */
.whiteboard-frame {
  padding: 44px 24px 24px !important;
  overflow: visible !important;
}

/* Whiteboard：FrameのLabel背景をFill Colorから完全に分離 */
.whiteboard-frame .frame-title {
  position: absolute !important;
  top: -18px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  min-width: 140px !important;
  max-width: calc(100% - 48px) !important;
  min-height: 34px !important;
  height: auto !important;
  padding: 7px 24px !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
  z-index: 2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: inherit !important;
}

.whiteboard-frame[style] .frame-title {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Whiteboard：FrameのLabelをText Colorに追従 */
.whiteboard-frame,
.whiteboard-frame .frame-title {
  color: inherit !important;
}

.whiteboard-frame.text-align-left .frame-title {
  text-align: left !important;
  place-items: center start !important;
}

.whiteboard-frame.text-align-center .frame-title {
  text-align: center !important;
  place-items: center !important;
}

.whiteboard-frame.text-align-right .frame-title {
  text-align: right !important;
  place-items: center end !important;
}

/* Whiteboard：左メニューの文字サイズ改善 */
.canvas-toolbar .tool-btn {
  min-height: 72px !important;
  gap: 8px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.canvas-toolbar .tool-btn span:last-child,
.canvas-toolbar .tool-btn .tool-label {
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.canvas-toolbar .tool-btn span:first-child {
  font-size: 17px !important;
}




/* =========================================
   Business Model Category Label Fix
   - CategoryのLabel表示崩れ修正
   - Label背景をCategory本体のFill Colorから分離
   - Label / DescriptionをText Colorに対応
========================================= */

/* Category本体は、枠として安定表示 */
.bm-category {
  position: absolute !important;
  display: block !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  padding: 44px 24px 24px !important;
}

/* CategoryのLabelを、横長に広がらないピル型ラベルに戻す */
.bm-category .bm-category-title {
  position: absolute !important;
  top: -18px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;

  width: auto !important;
  min-width: 150px !important;
  max-width: calc(100% - 48px) !important;

  display: block !important;
  box-sizing: border-box !important;

  padding: 8px 28px !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  border-radius: 999px !important;

  background: #ffffff !important;
  background-color: #ffffff !important;

  color: inherit !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06) !important;
  z-index: 5 !important;
}

/* CategoryのDescriptionをText Colorに対応させる */
.bm-category > .bm-description {
  position: static !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;

  color: inherit !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;

  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* Text Color変更時、Category内の文字に確実に反映 */
.bm-category,
.bm-category .bm-category-title,
.bm-category .bm-description {
  color: inherit !important;
}

/* Fill Color変更時でも、Label背景は白固定 */
.bm-category[style] .bm-category-title {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* 過去の末尾CSSで .bm-category-title に width:100% が当たっている問題を明示的に潰す */
.bm-object .bm-category-title {
  width: auto !important;
  max-width: calc(100% - 48px) !important;
}


/* ==========================================================================
   ファイルパス: public/css/style.css
   Mindmap Page Additional Styles
   既存CSSの末尾に追加
   ========================================================================== */

.mindmap-page .app-header {
  overflow: visible;
}

.mindmap-shell {
  grid-template-columns: 86px minmax(0, 1fr) 340px;
  min-height: calc(100vh - 132px);
}

.mindmap-area {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(79, 70, 229, 0.23) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  background-size: 22px 22px, auto;
}

.mindmap-control-bar {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  align-items: center;
}

.mindmap-search-box,
.mindmap-select {
  height: 46px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.mindmap-guide {
  position: absolute;
  left: 22px;
  top: 76px;
  z-index: 19;
  max-width: 760px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(217, 222, 232, 0.9);
  background: rgba(255, 255, 255, 0.86);
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
}

.mindmap-guide strong {
  margin-right: 8px;
  color: #111827;
}

.mindmap-guide[hidden] {
  display: none;
}

.mindmap-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
}

.mindmap-area.is-panning .mindmap-viewport {
  cursor: grabbing;
}

.mindmap-canvas-board {
  position: absolute;
  left: 0;
  top: 0;
  width: 3200px;
  height: 2200px;
  background: transparent;
  transform-origin: 0 0;
  will-change: transform;
}

.mindmap-link-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.mindmap-link {
  fill: none;
  stroke: #111827;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.92;
}

.mindmap-link.dashed {
  stroke-dasharray: 8 8;
}

.mindmap-node-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.mindmap-node {
  position: absolute;
  min-height: 86px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid #d9dee8;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  cursor: move;
  user-select: none;
  transition:
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.mindmap-node:hover {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.mindmap-node.selected {
  border-color: #6366f1;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.18),
    0 16px 34px rgba(15, 23, 42, 0.1);
}

.mindmap-node.root {
  min-height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-align: center;
}

.mindmap-node-title {
  font-size: 15px;
  font-weight: 850;
  color: #111827;
  line-height: 1.45;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.mindmap-node.root .mindmap-node-title {
  font-size: 16px;
}

.mindmap-node-sub {
  margin-top: 7px;
  font-size: 12px;
  color: #667085;
  line-height: 1.55;
  word-break: break-word;
}

.mindmap-collapse-badge {
  position: absolute;
  right: -9px;
  top: -9px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d9dee8;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 850;
  color: #475467;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.mindmap-node.color-blue {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.mindmap-node.color-green {
  background: #ecfdf3;
  border-color: #b7ebc6;
}

.mindmap-node.color-yellow {
  background: #fff9db;
  border-color: #f4e3a1;
}

.mindmap-node.color-pink {
  background: #fdf2f8;
  border-color: #fbcfe8;
}

.mindmap-node.color-gray {
  background: #ffffff;
  border-color: #d9dee8;
}

.mindmap-node.search-hit {
  border-color: #4f46e5;
  box-shadow:
    0 0 0 4px rgba(79, 70, 229, 0.18),
    0 16px 34px rgba(15, 23, 42, 0.1);
}

.mindmap-property-panel {
  padding: 22px;
}

.mindmap-property-panel .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.mindmap-property-panel .panel-subtitle {
  margin: -10px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.mindmap-small-textarea {
  min-height: 76px;
}

.mindmap-structure-box {
  display: grid;
  gap: 10px;
}

.mindmap-structure-box div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13px;
}

.mindmap-structure-box span {
  color: #667085;
  font-weight: 750;
}

.mindmap-structure-box strong {
  color: #111827;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.mindmap-context-menu {
  position: absolute;
  z-index: 80;
  display: none;
  min-width: 196px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.mindmap-context-menu.show {
  display: block;
}

.mindmap-context-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
}

.mindmap-context-menu button:hover {
  background: #f8fafc;
}

.mindmap-context-menu button.danger {
  color: #b42318;
}

.mindmap-mini-map {
  overflow: hidden;
}

.mindmap-mini-map .mini-map-board {
  position: absolute;
  inset: 0;
}

.mindmap-mini-map .mini-node {
  position: absolute;
  border-radius: 4px;
  background: rgba(79, 70, 229, 0.22);
  border: 1px solid rgba(79, 70, 229, 0.28);
}

.mindmap-mini-map .mini-node.active {
  background: rgba(79, 70, 229, 0.48);
}

.mindmap-mini-map .mini-map-view {
  position: absolute;
  border: 2px solid #4f46e5;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.08);
}

.mindmap-zoom-controls {
  z-index: 25;
}

.mindmap-toolbar .tool-btn span:last-child,
.mindmap-toolbar .tool-btn .tool-label {
  font-size: 11px;
}

@media (max-width: 1180px) {
  .mindmap-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .mindmap-property-panel {
    display: none;
  }

  .mindmap-control-bar {
    grid-template-columns: 1fr;
    right: 18px;
  }

  .mindmap-guide {
    display: none;
  }
}




/* ==========================================================================
   ファイルパス: public/css/style.css
   Lean Canvas Page Additional Styles
   既存CSSの末尾に追加
   ========================================================================== */

.lean-canvas-page .app-header {
  overflow: visible;
}

.lean-canvas-shell {
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  min-height: calc(100vh - 132px);
  background: #ffffff;
}

.lean-left-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-right: 1px solid var(--border);
  background: #fbfcff;
  overflow: auto;
}

.lean-action-stack {
  display: grid;
  gap: 10px;
}

.lean-action-stack .btn {
  width: 100%;
  justify-content: center;
}

.lean-side-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.lean-side-card strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 14px;
  line-height: 1.45;
}

.lean-guide-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #667085;
  font-size: 13px;
  line-height: 1.75;
}

.lean-main-area {
  min-width: 0;
  padding: 26px;
  overflow: auto;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.lean-main-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.lean-main-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #111827;
}

.lean-main-header p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.lean-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lean-search-box {
  width: 260px;
  height: 44px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.lean-select {
  width: 180px;
  height: 44px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.lean-canvas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 16px;
  align-items: stretch;
  padding-bottom: 40px;
}

.lean-section {
  min-height: 238px;
  padding: 18px;
  border: 1px solid #dfe4ec;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.lean-section:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.lean-section.selected {
  border-color: #6366f1;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.13),
    0 16px 36px rgba(15, 23, 42, 0.06);
}

.lean-section.drop-target {
  border-color: #4f46e5;
  background: #f8faff;
  transform: translateY(-1px);
}

.lean-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.lean-section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.lean-section-head p {
  min-height: 34px;
  margin: 7px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.lean-section-delete {
  width: 30px;
  height: 30px;
  border: 1px solid #fee4e2;
  border-radius: 999px;
  background: #fff5f5;
  color: #b42318;
  font-weight: 850;
  cursor: pointer;
}

.lean-section-delete:hover {
  background: #fee4e2;
}

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

.lean-card {
  position: relative;
  min-height: 62px;
  padding: 16px 18px;
  border: 1px solid #dfe4ec;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
  cursor: grab;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.lean-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.075);
}

.lean-card:active {
  cursor: grabbing;
}

.lean-card.selected {
  border-color: #6366f1;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.16),
    0 14px 28px rgba(15, 23, 42, 0.075);
}

.lean-card.is-dragging {
  opacity: 0.55;
}

.lean-card-content {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.lean-card-note-dot {
  position: absolute;
  right: 12px;
  top: 10px;
  color: #4f46e5;
  font-size: 10px;
}

.lean-add-first {
  min-height: 48px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 850;
  cursor: pointer;
}

.lean-add-first:hover {
  background: #e0e7ff;
}

.lean-color-white {
  background: #ffffff;
}

.lean-color-blue {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.lean-color-green {
  background: #ecfdf3;
  border-color: #b7ebc6;
}

.lean-color-yellow {
  background: #fff9db;
  border-color: #f4e3a1;
}

.lean-color-pink {
  background: #fdf2f8;
  border-color: #fbcfe8;
}

.lean-detail-panel {
  padding: 22px;
  overflow: auto;
}

.lean-detail-panel .panel-head {
  margin-bottom: 4px;
}

.lean-detail-panel .panel-subtitle {
  margin: -10px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.lean-notes-textarea {
  min-height: 96px;
}

.lean-panel-help {
  margin-top: 8px;
}

.lean-detail-panel .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-danger-outline {
  border-color: #fee4e2;
  color: #b42318;
  background: #fffafa;
}

.btn-danger-outline:hover {
  background: #fff1f0;
}

@media (max-width: 1280px) {
  .lean-canvas-shell {
    grid-template-columns: 220px minmax(0, 1fr) 300px;
  }

  .lean-canvas-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }

  .lean-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .lean-search-box,
  .lean-select {
    width: 220px;
  }
}

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

  .lean-left-panel,
  .lean-detail-panel {
    display: none;
  }

  .lean-main-header {
    flex-direction: column;
  }

  .lean-toolbar,
  .lean-search-box,
  .lean-select {
    width: 100%;
  }

  .lean-canvas-grid {
    grid-template-columns: 1fr;
  }
}

.lean-align-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.lean-align-control button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475467;
  font-weight: 800;
  cursor: pointer;
}

.lean-align-control button:hover {
  background: #ffffff;
}

.lean-align-control button.active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.lean-align-control button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.lean-card-content {
  width: 100%;
}

#sectionHeightInput {
  font-variant-numeric: tabular-nums;
}




/* Revenue Analysis 要件対応：構造化フォーム・シナリオ比較・TAM/SAM/SOM・損益サマリー */

.revenue-input-row {
  grid-template-columns: 1.25fr 0.85fr 0.75fr 1fr 1.8fr 100px;
}

.revenue-calculation-row {
  grid-template-columns: 1.2fr 0.9fr 2.2fr 1fr 100px;
}

.revenue-scenario-row {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.revenue-summary-row {
  grid-template-columns: 1fr 1.2fr 1.2fr 1fr 1.2fr 0.9fr;
}

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

.revenue-check {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.revenue-result {
  font-weight: 850;
  color: var(--text);
  white-space: nowrap;
}

.formula-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.revenue-empty {
  padding: 22px;
  color: var(--text-muted);
  font-size: 14px;
  background: #fbfcff;
}

.revenue-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 20px;
}

.revenue-summary-table {
  border-top: 1px solid var(--border);
}

.revenue-mini-title {
  padding: 18px 20px 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 850;
}

.tam-results {
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .revenue-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .revenue-input-row,
  .revenue-calculation-row,
  .revenue-scenario-row,
  .revenue-summary-row,
  .revenue-tam-row {
    grid-template-columns: 1fr;
  }
}



/* Revenue Analysis 修正：左Revenue Guide削除後の2カラム化 */
.revenue-layout.revenue-layout-no-guide {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding: 24px;
}

/* Revenue Analysis 修正：各行グリッド */
.revenue-input-row {
  grid-template-columns: 1.25fr 0.85fr 0.75fr 1fr 1.8fr 100px;
}

.revenue-calculation-row {
  grid-template-columns: 1.2fr 0.9fr 2.2fr 1fr 100px;
}

.revenue-scenario-row {
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.revenue-summary-row {
  grid-template-columns: 1fr 1.2fr 1.2fr 1fr 1.2fr 0.9fr;
}

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

/* Revenue Analysis 修正：Input Variables */
.revenue-check {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.revenue-result {
  font-weight: 850;
  color: var(--text);
  white-space: nowrap;
}

.formula-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.formula-input.is-active-formula {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.revenue-empty {
  padding: 22px;
  color: var(--text-muted);
  font-size: 14px;
  background: #fbfcff;
}

/* Revenue Analysis 修正：Formula Builder */
.revenue-formula-builder {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.07), transparent 34%),
    #fbfcff;
}

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

.formula-builder-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.formula-builder-sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.formula-active-target {
  flex: 0 0 auto;
  max-width: 280px;
  padding: 9px 12px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.formula-builder-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.formula-builder-section {
  margin-top: 14px;
}

.formula-builder-label {
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.formula-chip-list,
.formula-operator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.formula-chip,
.formula-token {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.formula-chip:hover,
.formula-token:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f4f6ff;
}

.formula-chip span {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.formula-chip-secondary {
  background: #f8fafc;
}

.formula-token {
  min-width: 44px;
  border-radius: 12px;
  font-size: 14px;
}

.formula-number-insert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.formula-builder-note {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.formula-empty {
  color: var(--text-muted);
  font-size: 13px;
}

/* Revenue Analysis 修正：Profit Summary / TAM */
.revenue-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 20px;
}

.revenue-summary-table {
  border-top: 1px solid var(--border);
}

.revenue-mini-title {
  padding: 18px 20px 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 850;
}

.tam-results {
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .revenue-layout.revenue-layout-no-guide {
    grid-template-columns: 1fr;
  }

  .result-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .revenue-input-row,
  .revenue-calculation-row,
  .revenue-scenario-row,
  .revenue-summary-row,
  .revenue-tam-row {
    grid-template-columns: 1fr;
  }

  .formula-builder-head,
  .formula-builder-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .formula-active-target {
    max-width: 100%;
  }
}



/* Export画面修正：Preview枠・右側Status枠削除後の保険的な非表示と余白調整 */
.export-page .export-preview-card,
.export-page #exportPreview,
.export-page #previewDescription,
.export-page #previewFormatBadge,
.export-page #refreshPreviewButton,
.export-page #exportStatusBox {
  display: none !important;
}

.export-workspace .export-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.export-workspace .export-note-card {
  margin-top: 0;
}

.export-workspace .export-setting-grid {
  align-items: stretch;
}


/* Export画面：右側Export Settingsの枠線欠け対策 */
.export-page .export-settings-panel {
  height: fit-content;
  min-height: auto;
  align-self: start;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Export画面：Export Workspace と Format / Canvas Output の間隔を詰める */
.export-page .export-page-head {
  margin-bottom: 8px !important;
}

.export-page .export-main {
  gap: 12px !important;
}

.export-page .export-setting-grid {
  margin-top: 0 !important;
}

/* Export画面：Preview / Status 関連要素は完全非表示 */
.export-page .export-preview-card,
.export-page #exportPreview,
.export-page #previewDescription,
.export-page #previewFormatBadge,
.export-page #refreshPreviewButton,
.export-page #exportStatusBox {
  display: none !important;
}



/* Revenue Analysis：TAM/SAM/SOMはシナリオ別ではなく単一結果で表示 */
.revenue-tam-single-row {
  grid-template-columns: 1fr 2fr !important;
}



/* Whiteboard / Mindmap：改行を画面上に反映 */
.whiteboard-object,
.whiteboard-text,
.whiteboard-shape,
.whiteboard-comment,
.sticky,
.whiteboard-frame .frame-title,
.mindmap-node-title,
.mindmap-node-sub {
  white-space: pre-wrap;
}

/* Whiteboard / Mindmap：長文が枠外にはみ出しにくいようにする */
.whiteboard-object,
.mindmap-node-title,
.mindmap-node-sub {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Whiteboard / Mindmap：操作ガイドは毎回表示を前提にする */
.whiteboard-guide,
.mindmap-guide {
  display: flex;
}



/* Admin：APIエラー時の表示 */
.admin-error-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  color: #991b1b;
  line-height: 1.6;
}

.admin-error-inline strong {
  font-size: 14px;
  font-weight: 900;
}

.admin-error-inline span {
  color: #7f1d1d;
  font-size: 13px;
  word-break: break-word;
}

.admin-layout .table td {
  vertical-align: middle;
}

.admin-layout .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}



/* Admin：左メニューと右パネルの上下線欠け対策 */
.admin-layout > .sidebar,
.admin-layout > .right-panel {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  align-self: start;
}

/* Admin：既存sidebarの右線だけが残って見える問題を抑制 */
.admin-layout > .sidebar {
  border-right: 1px solid var(--border) !important;
  min-height: auto;
}

/* Admin：右側情報枠の余白 */
.admin-layout > .right-panel {
  padding: 24px;
}

/* Admin：APIエラー時に「読み込み中...」のままにしない */
.admin-error-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  color: #991b1b;
  line-height: 1.6;
}

.admin-error-inline strong {
  font-size: 14px;
  font-weight: 900;
}

.admin-error-inline span {
  color: #7f1d1d;
  font-size: 13px;
  word-break: break-word;
}

.admin-layout .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}



/* Admin：左メニューと右パネルの上下線欠け対策 */
.admin-layout > .sidebar,
.admin-layout > .right-panel {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  align-self: start;
}

/* Admin：左メニューの見た目調整 */
.admin-layout > .sidebar {
  min-height: auto !important;
  border-right: 1px solid var(--border) !important;
}

/* Admin：右側情報枠の見た目調整 */
.admin-layout > .right-panel {
  padding: 24px;
  min-height: auto !important;
}

/* Admin：APIエラー表示 */
.admin-error-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  color: #991b1b;
  line-height: 1.6;
}

.admin-error-inline strong {
  font-size: 14px;
  font-weight: 900;
}

.admin-error-inline span {
  color: #7f1d1d;
  font-size: 13px;
  word-break: break-word;
}

.admin-layout .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


.admin-muted-label {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}



/* Mac / Windows間の見え方の差をできるだけ抑える */
html,
body,
button,
input,
textarea,
select {
  font-family:
    "Inter",
    "Noto Sans JP",
    "Yu Gothic UI",
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    "Meiryo",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-feature-settings: "palt" 1;
  text-rendering: geometricPrecision;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

/* Header上のView Modeボタン */
.view-mode-button {
  white-space: nowrap;
}

/* View Mode解除用の固定ボタン */
.view-mode-exit-button {
  display: none;
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9999;
  padding: 10px 16px;
  border: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4f46e5;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.18);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.view-mode-exit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 52px rgba(79, 70, 229, 0.24);
}

body.strat-view-mode .view-mode-exit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* View Mode共通：編集UIを隠して表示領域を最大化 */
body.strat-view-mode {
  overflow: hidden;
  background: #ffffff;
}

body.strat-view-mode .app-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.strat-view-mode .app-header,
body.strat-view-mode .tabs,
body.strat-view-mode .sub-tabs,
body.strat-view-mode .canvas-toolbar,
body.strat-view-mode .right-panel,
body.strat-view-mode .panel-toggle,
body.strat-view-mode .whiteboard-property-panel,
body.strat-view-mode .mindmap-property-panel,
body.strat-view-mode .lean-left-panel,
body.strat-view-mode .lean-detail-panel,
body.strat-view-mode .result-panel,
body.strat-view-mode .bm-library-panel,
body.strat-view-mode .bm-property-panel,
body.strat-view-mode .bm-panel-toggle,
body.strat-view-mode .whiteboard-context-menu {
  display: none !important;
}

/* Whiteboard / Mindmap */
body.strat-view-mode .workspace-shell,
body.strat-view-mode .whiteboard-shell,
body.strat-view-mode .mindmap-shell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.strat-view-mode .canvas-area,
body.strat-view-mode .whiteboard-area,
body.strat-view-mode .mindmap-area {
  grid-column: 1 / -1 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
  border: 0 !important;
}

/* Business Model */
body.strat-view-mode .business-model-shell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.strat-view-mode .bm-canvas-area {
  grid-column: 1 / -1 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
  border: 0 !important;
}

body.strat-view-mode .bm-top-toolbar {
  display: none !important;
}

/* Lean Canvas */
body.strat-view-mode .lean-canvas-shell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.strat-view-mode .lean-main-area {
  grid-column: 1 / -1 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: auto !important;
  padding: 24px !important;
  border-radius: 0 !important;
  border: 0 !important;
}

body.strat-view-mode .lean-main-header,
body.strat-view-mode .lean-toolbar {
  display: none !important;
}

body.strat-view-mode .lean-board {
  width: 100% !important;
  min-height: calc(100vh - 48px) !important;
}

/* Revenue Analysis */
body.strat-view-mode .revenue-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.strat-view-mode .revenue-main {
  grid-column: 1 / -1 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: auto !important;
  padding: 24px !important;
}

body.strat-view-mode .revenue-card {
  max-width: none !important;
}

/* View Mode中でもズーム操作・ミニマップは残す */
body.strat-view-mode .zoom-controls,
body.strat-view-mode .bm-zoom-controls,
body.strat-view-mode .mini-map,
body.strat-view-mode .bm-mini-map {
  z-index: 9000;
}

/* iPad / タブレット投影時の見切れ防止 */
@media (max-width: 900px) {
  body.strat-view-mode .lean-main-area,
  body.strat-view-mode .revenue-main {
    padding: 16px !important;
  }

  .view-mode-exit-button {
    top: 10px;
    right: 10px;
    padding: 9px 13px;
  }
}



/* =========================================================
   Presentation Mode refinements
   - Hide operation guides only during Presentation
   - Add Lean Canvas zoom controls during Presentation
   ========================================================= */

/* Whiteboard / Mindmap の操作ガイダンスはPresentation時だけ非表示 */
body.strat-view-mode .whiteboard-guide,
body.strat-view-mode .mindmap-guide {
  display: none !important;
}

/* Business Modelの上部ガイドもPresentation時は非表示 */
body.strat-view-mode .bm-top-toolbar,
body.strat-view-mode .bm-guide {
  display: none !important;
}

/* Lean Canvas Presentation Zoom */
.lean-presentation-zoom-controls {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 9998;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(79, 70, 229, 0.20);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

body.strat-view-mode .lean-presentation-zoom-controls {
  display: inline-flex;
}

.lean-presentation-zoom-controls button {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #4f46e5;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.lean-presentation-zoom-controls button:hover {
  background: #eef2ff;
}

.lean-presentation-zoom-controls span {
  min-width: 52px;
  text-align: center;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

/* Lean CanvasはPresentation中、画面全体を使いながらズーム可能にする */
body.strat-view-mode .lean-main-area {
  overflow: auto !important;
  padding: 24px !important;
  background:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.18) 1px, transparent 0),
    #ffffff !important;
  background-size: 22px 22px !important;
}

body.strat-view-mode .lean-canvas-grid {
  transform-origin: top left;
  margin: 0 auto;
  transition: none !important;
}

/* Presentation中の解除ボタンとLean Zoom Controlsが重ならないよう調整 */
body.strat-view-mode .view-mode-exit-button {
  z-index: 10000;
}

@media (max-width: 900px) {
  .lean-presentation-zoom-controls {
    right: 12px;
    bottom: 12px;
  }
}


/* =========================================================
   Whiteboard UX refinement
   - Fix compact tool rail
   - Hover-reveal navigation tabs
   - Hover-reveal left tools
   - Expand drawing area
   ========================================================= */

.whiteboard-page {
  --whiteboard-right-panel-w: 320px;
  --whiteboard-tool-rail-w: 18px;
  --whiteboard-tool-open-w: 118px;
}

/* Whiteboardのタブは通常時は薄く畳み、ホバー時だけ表示 */
.whiteboard-page .tabs {
  position: relative;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-bottom: 1px solid rgba(79, 70, 229, 0.10);
  background: rgba(255, 255, 255, 0.78);
  overflow: visible;
  transition: height 0.18s ease, padding 0.18s ease, box-shadow 0.18s ease;
  z-index: 60;
}

.whiteboard-page .tabs::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 96px;
  height: 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.22);
  transform: translateX(-50%);
}

.whiteboard-page .tabs .tab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.whiteboard-page .tabs:hover,
.whiteboard-page .tabs:focus-within {
  height: 62px;
  min-height: 62px;
  padding: 0 18px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.whiteboard-page .tabs:hover::before,
.whiteboard-page .tabs:focus-within::before {
  display: none;
}

.whiteboard-page .tabs:hover .tab,
.whiteboard-page .tabs:focus-within .tab {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Whiteboard本体は左メニューを通常レイアウトから外し、描画領域を広げる */
.whiteboard-page .whiteboard-shell {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--whiteboard-right-panel-w) !important;
  height: calc(100vh - var(--header-h) - 14px) !important;
  min-height: calc(100vh - var(--header-h) - 14px) !important;
  overflow: hidden;
}

.whiteboard-page .tabs:hover + .whiteboard-shell,
.whiteboard-page .tabs:focus-within + .whiteboard-shell {
  height: calc(100vh - var(--header-h) - 62px) !important;
  min-height: calc(100vh - var(--header-h) - 62px) !important;
}

.whiteboard-page .whiteboard-area {
  grid-column: 1 / 2 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 左メニューは左端に細い取っ手だけ残し、ホバーでスライド表示 */
.whiteboard-page .whiteboard-toolbar {
  position: absolute !important;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 80;
  width: var(--whiteboard-tool-open-w) !important;
  padding: 14px 10px !important;
  border-right: 1px solid rgba(79, 70, 229, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(16px);
  transform: translateX(calc(-1 * (var(--whiteboard-tool-open-w) - var(--whiteboard-tool-rail-w))));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: visible !important;
}

.whiteboard-page .whiteboard-toolbar::after {
  content: "";
  position: absolute;
  top: 22px;
  right: -10px;
  width: 18px;
  height: 68px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 10px 0 24px rgba(79, 70, 229, 0.10);
}

.whiteboard-page .whiteboard-toolbar:hover,
.whiteboard-page .whiteboard-toolbar:focus-within {
  transform: translateX(0);
}

.whiteboard-page .whiteboard-toolbar .tool-btn {
  width: 96px !important;
  min-height: 56px !important;
  padding: 8px 7px !important;
  gap: 4px !important;
  border-radius: 14px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em;
  white-space: normal !important;
  overflow: visible !important;
}

.whiteboard-page .whiteboard-toolbar .tool-btn span {
  display: block !important;
  max-width: 86px !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

.whiteboard-page .whiteboard-toolbar .tool-btn:first-child {
  margin-top: 2px;
}

/* パネル閉鎖時はBusiness Modelと同じ感覚で描画領域を右まで広げる */
.whiteboard-page .whiteboard-shell.panel-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.whiteboard-page .whiteboard-shell.panel-collapsed .whiteboard-property-panel {
  display: none !important;
}

.whiteboard-page .whiteboard-shell.panel-collapsed .panel-toggle {
  display: inline-flex !important;
}

/* 通常時は右パネル表示中なので、Propertiesトグルを邪魔にしない */
.whiteboard-page .whiteboard-shell:not(.panel-collapsed) .panel-toggle {
  display: none !important;
}

/* 操作ガイドは左レールに被らないよう少し右へ */
.whiteboard-page .whiteboard-guide {
  left: 28px !important;
  max-width: calc(100% - 56px) !important;
}

/* Presentation中は既存仕様を優先 */
body.strat-view-mode .whiteboard-page .tabs,
body.strat-view-mode .whiteboard-page .whiteboard-toolbar {
  display: none !important;
}


/* =========================================================
   Whiteboard hover rail refinement
   - Fix clipped Select / ghost icons
   - Make left hover trigger wider and easier to use
   ========================================================= */

.whiteboard-page {
  --whiteboard-tool-rail-w: 44px;
  --whiteboard-tool-open-w: 128px;
}

/* 左メニューの閉じた状態を少し見せる */
.whiteboard-page .whiteboard-toolbar {
  width: var(--whiteboard-tool-open-w) !important;
  transform: translateX(calc(-1 * (var(--whiteboard-tool-open-w) - var(--whiteboard-tool-rail-w)))) !important;
  padding: 14px 10px !important;
  overflow: visible !important;
}

/* ホバー時は完全表示 */
.whiteboard-page .whiteboard-toolbar:hover,
.whiteboard-page .whiteboard-toolbar:focus-within {
  transform: translateX(0) !important;
}

/* 左側のホバートリガーを大きく、分かりやすく */
.whiteboard-page .whiteboard-toolbar::after {
  content: "Tools";
  position: absolute;
  top: 18px;
  right: -44px;
  width: 44px;
  height: 96px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background: rgba(255, 255, 255, 0.96);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 14px 0 34px rgba(79, 70, 229, 0.14);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

/* 閉じた状態でSelectなどの中身が中途半端に見える問題を抑制 */
.whiteboard-page .whiteboard-toolbar:not(:hover):not(:focus-within) .tool-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 取っ手部分にマウスを合わせると自然に展開 */
.whiteboard-page .whiteboard-toolbar:hover .tool-btn,
.whiteboard-page .whiteboard-toolbar:focus-within .tool-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Selectのアイコン・文字がはみ出る問題の補正 */
.whiteboard-page .whiteboard-toolbar .tool-btn {
  box-sizing: border-box !important;
  width: 106px !important;
  min-height: 54px !important;
  padding: 7px 8px !important;
  overflow: hidden !important;
}

.whiteboard-page .whiteboard-toolbar .tool-btn span {
  max-width: 92px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Presentation中は左トリガーも完全非表示 */
body.strat-view-mode .whiteboard-page .whiteboard-toolbar::after {
  display: none !important;
}

/* =========================================================
   Whiteboard Guide Offset
   Toolsトリガーと操作ガイドが重なる問題を修正
   ========================================================= */

/*
  左側Toolsトリガー

  rail      : 44px
  trigger   : 44px
  余白       : 約16px

  合計100px程度ずらす
*/

.whiteboard-page .whiteboard-guide {
  left: 108px !important;
  max-width: calc(100% - 140px) !important;
}

/*
  超横幅が狭い場合は少しだけ戻す
*/
@media (max-width: 1200px) {
  .whiteboard-page .whiteboard-guide {
    left: 92px !important;
    max-width: calc(100% - 120px) !important;
  }
}

/* =========================================================
   Mindmap UX refinement
   - Compact hover tool rail
   - Hover-reveal top tabs
   - Hide/show Node Detail panel
   - Resizable title-only nodes with multiline title and font size
   ========================================================= */

.mindmap-page {
  --mindmap-right-panel-w: 340px;
  --mindmap-tool-rail-w: 44px;
  --mindmap-tool-open-w: 128px;
}

/* Mindmapの上部タブはWhiteboardと同じく、通常は薄く畳み、ホバー時だけ展開 */
.mindmap-page .tabs {
  position: relative;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-bottom: 1px solid rgba(79, 70, 229, 0.10);
  background: rgba(255, 255, 255, 0.78);
  overflow: visible;
  transition: height 0.18s ease, padding 0.18s ease, box-shadow 0.18s ease;
  z-index: 60;
}

.mindmap-page .tabs::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 96px;
  height: 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.22);
  transform: translateX(-50%);
}

.mindmap-page .tabs .tab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.mindmap-page .tabs:hover,
.mindmap-page .tabs:focus-within {
  height: 62px;
  min-height: 62px;
  padding: 0 18px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.mindmap-page .tabs:hover::before,
.mindmap-page .tabs:focus-within::before {
  display: none;
}

.mindmap-page .tabs:hover .tab,
.mindmap-page .tabs:focus-within .tab {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Mindmap本体は左メニューを通常レイアウトから外し、描画領域を広げる */
.mindmap-page .mindmap-shell {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--mindmap-right-panel-w) !important;
  height: calc(100vh - var(--header-h) - 14px) !important;
  min-height: calc(100vh - var(--header-h) - 14px) !important;
  overflow: hidden;
}

.mindmap-page .tabs:hover + .mindmap-shell,
.mindmap-page .tabs:focus-within + .mindmap-shell {
  height: calc(100vh - var(--header-h) - 62px) !important;
  min-height: calc(100vh - var(--header-h) - 62px) !important;
}

.mindmap-page .mindmap-area {
  grid-column: 1 / 2 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 左メニューは左端のToolsトリガーだけ表示し、ホバーでスライド表示 */
.mindmap-page .mindmap-toolbar {
  position: absolute !important;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 80;
  width: var(--mindmap-tool-open-w) !important;
  padding: 14px 10px !important;
  border-right: 1px solid rgba(79, 70, 229, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(16px);
  transform: translateX(calc(-1 * (var(--mindmap-tool-open-w) - var(--mindmap-tool-rail-w)))) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: visible !important;
}

.mindmap-page .mindmap-toolbar::after {
  content: "Tools";
  position: absolute;
  top: 18px;
  right: -44px;
  width: 44px;
  height: 96px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background: rgba(255, 255, 255, 0.96);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 14px 0 34px rgba(79, 70, 229, 0.14);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.mindmap-page .mindmap-toolbar:hover,
.mindmap-page .mindmap-toolbar:focus-within {
  transform: translateX(0) !important;
}

.mindmap-page .mindmap-toolbar:not(:hover):not(:focus-within) .tool-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

.mindmap-page .mindmap-toolbar:hover .tool-btn,
.mindmap-page .mindmap-toolbar:focus-within .tool-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.mindmap-page .mindmap-toolbar .tool-btn {
  box-sizing: border-box !important;
  width: 106px !important;
  min-height: 54px !important;
  padding: 7px 8px !important;
  gap: 4px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

.mindmap-page .mindmap-toolbar .tool-btn span {
  display: block !important;
  max-width: 92px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

/* Toolsトリガーと検索バー・操作ガイドが重ならないようにする */
.mindmap-page .mindmap-control-bar {
  left: 108px !important;
  right: 22px !important;
}

.mindmap-page .mindmap-guide {
  left: 108px !important;
  max-width: calc(100% - 140px) !important;
}

/* Node Detailを閉じたら、描画領域を右端まで広げる */
.mindmap-page .mindmap-shell.panel-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.mindmap-page .mindmap-shell.panel-collapsed .mindmap-property-panel {
  display: none !important;
}

.mindmap-page .mindmap-shell.panel-collapsed .mindmap-panel-toggle {
  display: inline-flex !important;
}

.mindmap-page .mindmap-shell:not(.panel-collapsed) .mindmap-panel-toggle {
  display: none !important;
}

/* Mindmapノード：Titleのみ、改行反映、可変サイズ */
.mindmap-node {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 150px !important;
  min-height: 68px !important;
  height: auto !important;
  overflow: visible !important;
}

.mindmap-node.root {
  min-height: 86px !important;
}

.mindmap-node-title {
  width: 100% !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  font-size: inherit !important;
  text-align: inherit !important;
}

.mindmap-node-sub {
  display: none !important;
}

.mindmap-resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #6366f1;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.mindmap-node:hover .mindmap-resize-handle,
.mindmap-node.selected .mindmap-resize-handle {
  opacity: 1;
}

.mindmap-resize-handle:hover {
  transform: scale(1.1);
}

.mindmap-title-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Presentation中は左トリガーも完全非表示 */
body.strat-view-mode .mindmap-page .mindmap-toolbar::after {
  display: none !important;
}

@media (max-width: 1200px) {
  .mindmap-page .mindmap-control-bar,
  .mindmap-page .mindmap-guide {
    left: 92px !important;
    max-width: calc(100% - 120px) !important;
  }
}


/* =========================================================
   Mindmap node detail / compact node / 10 colors refinement
   ========================================================= */

/* Node Detail の表示/非表示 */
.mindmap-page .mindmap-shell.panel-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.mindmap-page .mindmap-shell.panel-collapsed .mindmap-property-panel {
  display: none !important;
}

.mindmap-page .mindmap-shell.panel-collapsed .mindmap-panel-toggle {
  display: inline-flex !important;
}

.mindmap-page .mindmap-shell:not(.panel-collapsed) .mindmap-panel-toggle {
  display: none !important;
}

/* ノードを小さめの最小サイズにする */
.mindmap-node {
  min-width: 96px !important;
  min-height: 46px !important;
  padding: 10px 14px !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.mindmap-node.root {
  min-width: 130px !important;
  min-height: 56px !important;
}

.mindmap-node-title {
  width: 100% !important;
  text-align: center !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
}

/* 10色対応 */
.mindmap-node.color-blue {
  background: #eef2ff !important;
  border-color: #a5b4fc !important;
}

.mindmap-node.color-green {
  background: #dcfce7 !important;
  border-color: #86efac !important;
}

.mindmap-node.color-yellow {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
}

.mindmap-node.color-pink {
  background: #fce7f3 !important;
  border-color: #f9a8d4 !important;
}

.mindmap-node.color-gray {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.mindmap-node.color-purple {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
}

.mindmap-node.color-cyan {
  background: #cffafe !important;
  border-color: #67e8f9 !important;
}

.mindmap-node.color-orange {
  background: #ffedd5 !important;
  border-color: #fdba74 !important;
}

.mindmap-node.color-red {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

.mindmap-node.color-slate {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}

/* 色ボタンの並びを10色前提に調整 */
.mindmap-page #nodeColorRow {
  display: grid !important;
  grid-template-columns: repeat(5, 32px) !important;
  gap: 8px !important;
}

/* リサイズハンドル */
.mindmap-resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #6366f1;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.mindmap-node:hover .mindmap-resize-handle,
.mindmap-node.selected .mindmap-resize-handle {
  opacity: 1;
}

.mindmap-resize-handle:hover {
  transform: scale(1.1);
}


/* =========================================================
   Mindmap drag-to-child interaction
   ========================================================= */

.mindmap-node.drop-target {
  outline: 4px solid rgba(99, 102, 241, 0.42) !important;
  outline-offset: 6px !important;
  box-shadow:
    0 0 0 8px rgba(99, 102, 241, 0.12),
    0 24px 54px rgba(79, 70, 229, 0.22) !important;
  transform: translateY(-1px);
}

.mindmap-node.drop-target::after {
  content: "Drop to child";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
  pointer-events: none;
}



/* =========================================================
   Business Model UX refinement
   - Compact hover tool rail
   - Hover-reveal top tabs
   - Expand drawing area
   ========================================================= */

.business-model-page {
  --bm-right-panel-w: 316px;
  --bm-tool-rail-w: 44px;
  --bm-tool-open-w: 168px;
}

/* 上部タブを通常時は畳み、ホバー時だけ展開 */
.business-model-page .tabs {
  position: relative;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-bottom: 1px solid rgba(79, 70, 229, 0.10);
  background: rgba(255, 255, 255, 0.78);
  overflow: visible;
  transition: height 0.18s ease, padding 0.18s ease, box-shadow 0.18s ease;
  z-index: 60;
}

.business-model-page .tabs::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 96px;
  height: 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.22);
  transform: translateX(-50%);
}

.business-model-page .tabs .tab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.business-model-page .tabs:hover,
.business-model-page .tabs:focus-within {
  height: 62px;
  min-height: 62px;
  padding: 0 18px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.business-model-page .tabs:hover::before,
.business-model-page .tabs:focus-within::before {
  display: none;
}

.business-model-page .tabs:hover .tab,
.business-model-page .tabs:focus-within .tab {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 左Libraryを通常レイアウトから外し、描画領域を広げる */
.business-model-page .business-model-shell {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--bm-right-panel-w) !important;
  height: calc(100vh - var(--header-h) - 14px) !important;
  min-height: calc(100vh - var(--header-h) - 14px) !important;
  overflow: hidden;
}

.business-model-page .tabs:hover + .business-model-shell,
.business-model-page .tabs:focus-within + .business-model-shell {
  height: calc(100vh - var(--header-h) - 62px) !important;
  min-height: calc(100vh - var(--header-h) - 62px) !important;
}

.business-model-page .bm-canvas-area {
  grid-column: 1 / 2 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 左LibraryはToolsトリガーだけ表示し、ホバーでスライド表示 */
.business-model-page .bm-library-panel {
  position: absolute !important;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 80;
  width: var(--bm-tool-open-w) !important;
  padding: 14px 10px !important;
  border-right: 1px solid rgba(79, 70, 229, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(16px);
  transform: translateX(calc(-1 * (var(--bm-tool-open-w) - var(--bm-tool-rail-w)))) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: visible !important;
}

.business-model-page .bm-library-panel::after {
  content: "Library";
  position: absolute;
  top: 18px;
  right: -44px;
  width: 44px;
  height: 108px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background: rgba(255, 255, 255, 0.96);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 14px 0 34px rgba(79, 70, 229, 0.14);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.business-model-page .bm-library-panel:hover,
.business-model-page .bm-library-panel:focus-within {
  transform: translateX(0) !important;
}

/* 閉じた状態で中身が中途半端に見えないようにする */
.business-model-page .bm-library-panel:not(:hover):not(:focus-within) .bm-library-head,
.business-model-page .bm-library-panel:not(:hover):not(:focus-within) .bm-component-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

.business-model-page .bm-library-panel:hover .bm-library-head,
.business-model-page .bm-library-panel:focus-within .bm-library-head,
.business-model-page .bm-library-panel:hover .bm-component-btn,
.business-model-page .bm-library-panel:focus-within .bm-component-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* 左Libraryの表示縮尺をコンパクト化 */
.business-model-page .bm-library-head {
  margin-bottom: 12px !important;
}

.business-model-page .bm-library-head h2 {
  font-size: 14px !important;
  line-height: 1.25 !important;
}

.business-model-page .bm-library-head p {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

.business-model-page .bm-component-grid {
  gap: 7px !important;
}

.business-model-page .bm-component-btn {
  box-sizing: border-box !important;
  width: 146px !important;
  min-height: 42px !important;
  grid-template-columns: 28px 1fr !important;
  gap: 7px !important;
  padding: 7px 8px !important;
  border-radius: 13px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
}

.business-model-page .bm-component-btn strong {
  max-width: 94px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

.business-model-page .bm-component-icon {
  width: 28px !important;
  height: 28px !important;
  font-size: 13px !important;
}

/* Toolsトリガーと上部ツールバーが重ならないようにする */
.business-model-page .bm-top-toolbar {
  left: 108px !important;
  max-width: calc(100% - 140px) !important;
}

/* 右Propertiesを閉じた時は描画領域を右端まで広げる */
.business-model-page .business-model-shell.panel-collapsed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.business-model-page .business-model-shell.panel-collapsed .bm-property-panel {
  display: none !important;
}

.business-model-page .business-model-shell.panel-collapsed .bm-panel-toggle {
  display: inline-flex !important;
}

.business-model-page .business-model-shell:not(.panel-collapsed) .bm-panel-toggle {
  display: none !important;
}

/* Presentation中は既存仕様を優先 */
body.strat-view-mode .business-model-page .tabs,
body.strat-view-mode .business-model-page .bm-library-panel,
body.strat-view-mode .business-model-page .bm-library-panel::after {
  display: none !important;
}

@media (max-width: 1200px) {
  .business-model-page .bm-top-toolbar {
    left: 92px !important;
    max-width: calc(100% - 120px) !important;
  }
}

/* =========================================================
   Whiteboard Text Align + Business Model Library scroll fix
   ========================================================= */

/* Whiteboard実クラス用のText Align補正 */
.whiteboard-object.text-align-left,
.whiteboard-text.text-align-left,
.whiteboard-shape.text-align-left,
.whiteboard-comment.text-align-left,
.sticky.text-align-left,
.whiteboard-frame.text-align-left .frame-title {
  text-align: left !important;
}

.whiteboard-object.text-align-center,
.whiteboard-text.text-align-center,
.whiteboard-shape.text-align-center,
.whiteboard-comment.text-align-center,
.sticky.text-align-center,
.whiteboard-frame.text-align-center .frame-title {
  text-align: center !important;
}

.whiteboard-object.text-align-right,
.whiteboard-text.text-align-right,
.whiteboard-shape.text-align-right,
.whiteboard-comment.text-align-right,
.sticky.text-align-right,
.whiteboard-frame.text-align-right .frame-title {
  text-align: right !important;
}

/* Shapeはgrid表示なので、Text Alignに合わせて中身の横位置も制御 */
.whiteboard-shape.text-align-left {
  justify-items: start !important;
}

.whiteboard-shape.text-align-center {
  justify-items: center !important;
}

.whiteboard-shape.text-align-right {
  justify-items: end !important;
}

/* Frame titleを横幅いっぱいにしてAlignを効かせる */
.whiteboard-frame .frame-title {
  width: 100% !important;
}

/* Business Model Library：画面が低い時もSticky以下をスクロール表示 */
.business-model-page .bm-library-panel:hover .bm-component-grid,
.business-model-page .bm-library-panel:focus-within .bm-component-grid {
  max-height: calc(100vh - var(--header-h, 72px) - 126px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
  scrollbar-width: thin;
}

.business-model-page .bm-library-panel:hover .bm-component-grid::-webkit-scrollbar,
.business-model-page .bm-library-panel:focus-within .bm-component-grid::-webkit-scrollbar {
  width: 6px;
}

.business-model-page .bm-library-panel:hover .bm-component-grid::-webkit-scrollbar-thumb,
.business-model-page .bm-library-panel:focus-within .bm-component-grid::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.28);
  border-radius: 999px;
}


/* =========================================================
   Whiteboard Frame Title Width Fix
   Frameタイトルの丸角ラベルが横長になりすぎる問題を修正
   Frameタイトルの丸角ラベル内テキストを縦方向中央に揃える
   ========================================================= */

.whiteboard-frame .frame-title {
  width: auto !important;
  min-width: 120px !important;
  max-width: calc(100% - 48px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 28px !important;
  align-self: center !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

.whiteboard-frame .frame-title {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.35 !important;
  text-align: center !important;
}


.whiteboard-frame .frame-title {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 120px !important;
  max-width: calc(100% - 48px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 28px !important;
  line-height: 1.35 !important;
  text-align: center !important;
}


.whiteboard-frame {
  padding-top: 82px !important;
}

.whiteboard-frame .frame-title {
  position: absolute !important;
  left: 50% !important;
  top: 18px !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;

  width: auto !important;
  min-width: 120px !important;
  max-width: calc(100% - 48px) !important;
  min-height: 48px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 8px 26px !important;
  line-height: 1.35 !important;
  text-align: center !important;

  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}




/* =========================================================
   Hide Mini Map
   対象: Whiteboard / Mindmap / Business Model
   右下のガイド画面（ミニマップ）をユーザー画面から非表示化
   ========================================================= */

.whiteboard-mini-map,
.mindmap-mini-map,
.bm-mini-map,
#miniMap,
#mindmapMiniMap,
#bmMiniMap {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}



/* =========================================================
   Revenue Analysis 修正：Formula Builder 全体の開閉化
   対象: Calculation Items > Formula Builder
   Category「その他」の説明も含めて開閉対象にする
   ========================================================= */

.formula-builder-collapsible {
  display: block;
}

.formula-builder-summary {
  display: block;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.formula-builder-summary::-webkit-details-marker {
  display: none;
}

.formula-builder-summary::marker {
  display: none;
}

.formula-builder-summary .formula-builder-head {
  margin-bottom: 0;
}

.formula-builder-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.formula-builder-toggle-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}

.formula-builder-toggle-closed {
  display: none;
}

.formula-builder-collapsible:not([open]) .formula-builder-toggle-open {
  display: none;
}

.formula-builder-collapsible:not([open]) .formula-builder-toggle-closed {
  display: inline;
}

.formula-builder-collapsible-body {
  padding-top: 16px;
}

.formula-builder-category-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

@media (max-width: 760px) {
  .formula-builder-summary .formula-builder-head {
    flex-direction: column;
  }

  .formula-builder-summary-right {
    width: 100%;
    justify-content: space-between;
  }

  .formula-active-target {
    max-width: 100%;
  }
}







/* Export Interview output options */
.export-interview-option-card[hidden],
.export-question-set-field[hidden] {
  display: none !important;
}

.export-interview-option-card {
  display: grid;
  gap: 14px;
}

.export-question-set-field {
  margin-top: 4px;
}


/* Interview Export participant selector - append only. */
.export-interview-participant-field {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.export-interview-participant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

.export-interview-participant-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.export-interview-participant-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.export-interview-participant-item:hover {
  border-color: #c7d2fe;
  background: #f8faff;
}

.export-interview-participant-item.is-muted {
  opacity: 0.72;
  background: #f9fafb;
}

.export-interview-participant-item input {
  margin-top: 3px;
}

.export-interview-participant-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.export-interview-participant-item small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.export-interview-participant-summary {
  margin: 10px 0 0;
  color: var(--primary);
  font-weight: 700;
}

.export-interview-empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  background: #f9fafb;
  font-size: 13px;
}

@media (max-width: 860px) {
  .export-interview-participant-header {
    flex-direction: column;
  }

  .export-interview-participant-actions {
    justify-content: flex-start;
  }
}

/* Meeting Export selector */
.export-meeting-option-card[hidden],
.export-meeting-field[hidden] {
  display: none !important;
}

.export-meeting-option-card {
  grid-column: 1 / -1;
}

.export-meeting-field {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.export-meeting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

.export-meeting-list {
  max-height: 300px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 2px;
}

.export-meeting-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
}

.export-meeting-item:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.export-meeting-item.is-muted {
  opacity: 0.62;
}

.export-meeting-item input {
  margin-top: 3px;
}

.export-meeting-item strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.export-meeting-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.export-meeting-summary {
  margin: 0;
}

.export-meeting-empty {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .export-meeting-header {
    display: grid;
  }

  .export-meeting-actions {
    justify-content: flex-start;
  }
}


/* Export settings refinement: remove unfinished canvas pagination UI and align Interview options. */
.export-interview-option-card {
  grid-column: 1 / -1;
}

.export-interview-option-card .export-radio-list.compact,
.export-meeting-option-card .export-radio-list.compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.export-interview-option-card .export-radio-list.compact label,
.export-meeting-option-card .export-radio-list.compact label {
  min-height: 46px;
  align-items: center;
}

.export-interview-participant-field {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.export-interview-participant-list,
.export-meeting-list {
  scrollbar-gutter: stable;
}

.export-interview-participant-summary,
.export-meeting-summary {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.5;
}


/* Export Workspace final refinement: remove unused Project card area and tighten report options. */
.export-page .export-summary-card {
  display: none !important;
}

.export-page .export-page-head {
  display: block !important;
  margin-bottom: 0 !important;
}

.export-page .export-page-head .page-subtitle {
  max-width: 680px;
}

.export-page .export-setting-grid {
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 18px !important;
  margin-top: 0 !important;
}

.export-page .export-option-card {
  min-height: auto !important;
}

.export-page .export-interview-option-card,
.export-page .export-meeting-option-card {
  grid-column: auto !important;
}

.export-page .export-note-card {
  max-width: none;
}

.export-meeting-todo-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.export-meeting-todo-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 120px 118px 76px;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.export-meeting-todo-no {
  color: var(--text-muted);
  font-weight: 850;
}

.export-meeting-todo-text {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.export-meeting-todo-meta {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.export-meeting-body {
  font-size: 13px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.export-meeting-body p,
.export-meeting-body div {
  margin: 0 0 8px;
}

.export-meeting-body h1,
.export-meeting-body h2,
.export-meeting-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.export-meeting-body ul,
.export-meeting-body ol {
  margin: 8px 0 10px 22px;
  padding: 0;
}

@media (max-width: 1180px) {
  .export-page .export-setting-grid {
    grid-template-columns: 1fr !important;
  }

  .export-meeting-todo-item {
    grid-template-columns: 28px 1fr;
  }

  .export-meeting-todo-meta {
    grid-column: 2;
  }
}


/* Meeting save feedback must stay visible even when the user is editing near the bottom of the page. */
.toast {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 28px !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
}


/* AI Chat context source controls */
.ai-context-note {
  margin: 10px 0 12px;
  line-height: 1.6;
}

.ai-context-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.ai-context-actions .btn {
  padding: 8px 10px;
  font-size: 12px;
}

.ai-context-list {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.ai-context-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.ai-context-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}




/* ファイルパス: public/css/style.css */
/* R2 Storage管理画面：このブロックを既存ファイルの末尾に追加 */

.admin-r2-layout {
  grid-template-columns: 220px minmax(0, 1fr) 280px;
}

.admin-r2-main {
  min-width: 0;
}

.admin-r2-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-r2-kpi-size {
  font-size: 30px;
  overflow-wrap: anywhere;
}

.admin-r2-cleanup-kpi {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.admin-r2-filter-card {
  margin-top: 24px;
  padding: 20px;
}

.admin-r2-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.admin-r2-filter-grid .field {
  margin: 0;
}

.admin-r2-filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-r2-table-card {
  margin-top: 24px;
  overflow: hidden;
}

.admin-r2-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.admin-r2-table {
  min-width: 1180px;
}

.admin-r2-table th:nth-child(1) {
  width: 210px;
}

.admin-r2-table th:nth-child(2) {
  width: 170px;
}

.admin-r2-table th:nth-child(3) {
  width: 230px;
}

.admin-r2-table th:nth-child(4),
.admin-r2-table th:nth-child(5),
.admin-r2-table th:nth-child(7) {
  white-space: nowrap;
}

.admin-r2-project-name {
  color: var(--text);
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-r2-subtext,
.admin-r2-id,
.admin-r2-status-detail,
.admin-r2-item-title,
.admin-r2-category {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-r2-subtext,
.admin-r2-id {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.admin-r2-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.admin-r2-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-r2-item-title {
  margin-top: 7px;
  color: var(--text);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.admin-r2-status-detail {
  max-width: 240px;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.admin-r2-key {
  display: block;
  max-width: 360px;
  padding: 7px 9px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-r2-nowrap {
  white-space: nowrap;
}

@media (max-width: 1440px) {
  .admin-r2-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .admin-r2-layout > .right-panel {
    display: none;
  }
}

@media (max-width: 1180px) {
  .admin-r2-layout {
    grid-template-columns: 1fr;
  }

  .admin-r2-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .admin-r2-head-actions,
  .admin-r2-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-r2-filter-grid {
    grid-template-columns: 1fr;
  }
}



