:root {
  --app-height: 100dvh;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --theme-color: #0d7f88;
  --theme-soft: rgba(13, 127, 136, 0.12);
  --text-main: #0f172a;
  --text-sub: #475569;
  --line: #dbe7ee;
  --tap-scale: 0.96;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: #ffffff;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
  font-size: 16px;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

#bg-3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: radial-gradient(circle at 20% 15%, #ffffff 0%, #f7fcff 55%, #eef8fb 100%);
}

#app {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: var(--app-height);
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.screen-active {
  display: block;
}

.screen-enter {
  animation: screenEnter 300ms ease;
}

.glass-panel {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn {
  min-height: 54px;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 200ms ease, background-color 200ms ease, filter 120ms ease;
}

.btn:active {
  transform: scale(var(--tap-scale));
  filter: brightness(0.97);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22) inset;
}

.btn.is-pressing,
.icon-btn.is-pressing,
.choice-card.is-pressing,
.reaction-btn.is-pressing,
.admin-action-btn.is-pressing {
  transform: scale(0.94);
  filter: brightness(0.96);
  box-shadow: 0 0 0 4px rgba(11, 110, 168, 0.18);
}

.btn-xl {
  min-height: 62px;
  font-size: 24px;
}

.btn-sm {
  min-height: 46px;
  font-size: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #0f766e, #0b6ea8);
  color: #fff;
  box-shadow: 0 10px 26px rgba(11, 110, 168, 0.22);
}

.btn-primary:disabled {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #cfe0e8;
  color: #124a64;
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.text-link {
  font-size: 18px;
  color: #476174;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.icon-btn {
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  padding: 10px;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d7e4ea;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.icon-btn:active {
  transform: scale(var(--tap-scale));
  box-shadow: 0 0 0 3px rgba(11, 110, 168, 0.14);
}

#overlay-root {
  position: fixed;
  inset: 0;
  z-index: 700;
  pointer-events: none;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.85);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 1000;
}

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

/* Landing */
#screen-landing {
  padding: calc(14px + var(--safe-top)) 14px calc(14px + var(--safe-bottom));
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
}

.landing-center {
  align-self: center;
  justify-self: center;
  width: min(560px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  padding: 26px 22px;
  text-align: center;
}

.landing-center h1 {
  margin: 0;
  font-size: clamp(34px, 8.2vw, 48px);
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.landing-center p {
  margin: 14px 0 0;
  font-size: clamp(22px, 4.2vw, 28px);
  line-height: 1.45;
  color: var(--text-sub);
}

.landing-actions {
  width: min(560px, 100%);
  justify-self: center;
  display: grid;
  gap: 12px;
}

/* Journey */
#screen-journey {
  padding: calc(6px + var(--safe-top)) 6px calc(6px + var(--safe-bottom));
}

.journey-shell {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 16px);
  max-height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 16px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.journey-back-float {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 6;
}

.journey-main {
  min-height: 0;
  padding: 72px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene {
  width: 100%;
  max-width: 700px;
  text-align: center;
  animation: fadeInUp 240ms ease;
}

.scene-generating {
  animation: growIn 260ms ease;
}

.ai-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #4f6472;
  font-size: 21px;
  font-weight: 600;
}

.ai-avatar {
  width: 30px;
  height: 30px;
}

.ai-message {
  margin: 0;
  font-size: clamp(33px, 7vw, 48px);
  font-weight: 600;
  line-height: 1.4;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  animation: messageAppear 280ms ease;
}

.ai-message.typing {
  display: inline;
}

.type-caret {
  display: inline-block;
  width: 0.08em;
  height: 0.95em;
  margin-left: 0.04em;
  background: currentColor;
  vertical-align: -0.08em;
  animation: caretBlink 900ms step-end infinite;
}

.scene-generating .ai-message {
  animation: breathePulse 900ms ease-in-out infinite alternate;
}

.generating-main {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.generating-main .thinking-status {
  margin-top: 0;
  font-size: 17px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(13, 127, 136, 0.08);
  border: 1px solid rgba(13, 127, 136, 0.16);
}

.thinking-status {
  margin-top: 14px;
  color: #1b5c75;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.journey-footer .thinking-status {
  margin-top: 0;
  justify-content: flex-start;
}

.thinking-bars {
  display: inline-flex;
  gap: 4px;
}

.thinking-bars span {
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0f766e, #0b6ea8);
  animation: thinkingWave 900ms ease-in-out infinite;
}

.thinking-bars span:nth-child(2) {
  animation-delay: 120ms;
}

.thinking-bars span:nth-child(3) {
  animation-delay: 240ms;
}

.journey-footer {
  padding: 8px 10px calc(10px + var(--safe-bottom));
  border-top: 1px solid rgba(219, 231, 238, 0.9);
  display: grid;
  gap: 8px;
}

.choices-wrap {
  display: grid;
  gap: 8px;
}

.choice-card {
  width: 100%;
  min-height: 62px;
  border-radius: 14px;
  border: 1px solid #d8e3e9;
  background: #ffffff;
  color: #0f172a;
  padding: 14px 15px;
  text-align: left;
  font-size: clamp(24px, 4.8vw, 31px);
  font-weight: 700;
  line-height: 1.3;
  transition: transform 120ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.choice-card.selected,
.choice-card:active {
  background: var(--theme-soft);
  border-color: rgba(13, 127, 136, 0.35);
  transform: scale(var(--tap-scale));
  box-shadow: 0 0 0 3px rgba(11, 110, 168, 0.12);
}

.choice-card[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.text-toggle {
  color: #577286;
  font-size: 21px;
  text-align: left;
}

.free-input-panel {
  display: grid;
  gap: 6px;
  animation: fadeInUp 180ms ease;
}

.free-input-panel textarea {
  border: 1px solid #d6e2e9;
  border-radius: 12px;
  padding: 10px 12px;
  resize: none;
  min-height: 72px;
  font-size: 22px;
  line-height: 1.45;
  color: #0f172a;
  background: #ffffff;
}

/* Summary */
.summary-card {
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d8e4ea;
  box-shadow: 0 10px 24px rgba(10, 40, 60, 0.08);
  padding: 14px;
  text-align: left;
}

.summary-topbar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #0b6ea8);
  margin-bottom: 8px;
}

.summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #0d7f88;
  margin-bottom: 6px;
}

.summary-title {
  margin: 0;
  font-size: clamp(19px, 4.6vw, 23px);
  line-height: 1.4;
}

.summary-meta {
  margin-top: 8px;
  font-size: 14px;
  color: #344a58;
  line-height: 1.6;
}

.summary-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #567182;
}

.summary-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

/* Board */
#screen-board {
  padding: calc(8px + var(--safe-top)) 8px calc(8px + var(--safe-bottom));
}

.board-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  height: calc(var(--app-height) - var(--safe-top) - var(--safe-bottom) - 16px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.board-header {
  padding: 6px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(219, 231, 238, 0.9);
}

.board-header h2 {
  margin: 0;
  font-size: 22px;
  text-align: center;
}

.count-badge {
  border-radius: 999px;
  border: 1px solid #d6e4eb;
  background: #fff;
  color: #164e63;
  font-size: 15px;
  padding: 6px 10px;
}

.board-list {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.empty-board {
  border: 1px dashed #c9dae2;
  border-radius: 12px;
  background: #fff;
  color: #567182;
  padding: 18px;
  text-align: center;
}

.idea-card {
  border: 1px solid #d8e3ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(10, 40, 60, 0.06);
  padding: 14px;
  margin-bottom: 8px;
  animation: fadeInUp 180ms ease;
}

.idea-topbar {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #0b6ea8);
  margin-bottom: 8px;
}

.idea-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
}

.idea-desc {
  margin: 7px 0 0;
  font-size: 18px;
  line-height: 1.45;
  color: #4a6272;
  white-space: pre-wrap;
  word-break: break-word;
}

.idea-derive-note,
.idea-parent-count {
  margin-top: 6px;
  font-size: 15px;
  color: #155c77;
}

.derive-link {
  margin-top: 6px;
  font-size: 17px;
  color: #0d7f88;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.idea-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.idea-meta {
  display: grid;
  gap: 4px;
}

.idea-nick {
  font-size: 15px;
  color: #627a89;
}

.heat {
  font-size: 11px;
  color: #0d7f88;
  font-weight: 700;
}

.heat.l2 {
  font-size: 11px;
}

.heat.l3 {
  font-size: 11px;
  text-shadow: 0 0 8px rgba(13, 127, 136, 0.35);
}

.reaction-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reaction-btn {
  min-width: 40px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid #cfdee6;
  background: #fff;
  color: #5d7484;
  font-size: 14px;
}

.reaction-btn.reacted {
  color: #0d7f88;
  border-color: #0d7f88;
  background: rgba(13, 127, 136, 0.1);
}

.reaction-picker {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d2e0e8;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: inline-flex;
  gap: 6px;
  z-index: 3;
}

.reaction-picker button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f6f9;
}

.reaction-summary {
  min-width: 18px;
  font-size: 12px;
  color: #60798a;
}

.board-footer {
  border-top: 1px solid rgba(219, 231, 238, 0.9);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  gap: 6px;
}

.copyright-btn {
  justify-self: center;
  font-size: 10px;
  color: #8aa0ad;
}

/* Admin */
#screen-admin-login {
  padding: calc(12px + var(--safe-top)) 10px calc(12px + var(--safe-bottom));
}

.admin-login-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  height: 100%;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

.admin-login-shell h2 {
  margin: 0;
  font-size: 22px;
}

.admin-login-form {
  display: grid;
  gap: 10px;
}

.admin-login-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.admin-login-form input {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #d4e1e8;
  background: #fff;
  padding: 9px 10px;
}

#screen-admin {
  background: #0f172a;
  color: #f8fafc;
}

.admin-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.admin-header {
  padding: calc(8px + var(--safe-top)) 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h2 {
  margin: 0;
  font-size: 19px;
}

.admin-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 10px 8px;
}

.admin-tab {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  padding: 7px 11px;
  white-space: nowrap;
}

.admin-tab.active {
  background: #0d7f88;
  border-color: #0d7f88;
  color: #fff;
}

.admin-content {
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px calc(10px + var(--safe-bottom));
}

.admin-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kpi-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-action-btn {
  border-radius: 8px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.admin-action-btn.warn {
  background: rgba(255, 95, 95, 0.2);
  border: 1px solid rgba(255, 95, 95, 0.35);
  color: #ffd0d0;
}

.admin-action-btn.ok {
  background: rgba(61, 210, 148, 0.2);
  border: 1px solid rgba(61, 210, 148, 0.35);
  color: #c8ffe7;
}

.chat-item {
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.chat-head {
  width: 100%;
  text-align: left;
  padding: 9px;
  display: grid;
  gap: 3px;
}

.chat-timeline {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.chat-bubble {
  max-width: 90%;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.45;
}

.chat-bubble.ai {
  justify-self: start;
  background: rgba(255, 255, 255, 0.18);
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(11, 110, 168, 0.82);
}

.ng-input-row {
  display: flex;
  gap: 7px;
}

.ng-input-row input {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 7px 9px;
}

.ng-word-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 9px;
  margin: 4px 6px 0 0;
  font-size: 12px;
}

/* Error & busy */
#screen-error,
#screen-busy {
  padding: calc(10px + var(--safe-top)) 10px calc(10px + var(--safe-bottom));
}

.error-shell,
.busy-shell {
  width: min(520px, 100%);
  margin: 0 auto;
  height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 14px;
}

.error-icon-wrap,
.busy-ai-svg {
  width: 104px;
  height: 104px;
}

.error-ai-svg,
.busy-ai-svg {
  width: 100%;
  height: 100%;
}

.error-message {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.55;
}

.spin-eye {
  transform-origin: center;
  animation: spinEye 1.8s linear infinite;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(15, 23, 42, 0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  pointer-events: auto;
}

.modal {
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid #d5e2ea;
  background: #fff;
  padding: 16px;
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.modal label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 8px;
}

.modal input {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid #d5e2ea;
  padding: 8px 10px;
}

.modal-note {
  margin: 0;
  color: #597182;
  font-size: 12px;
}

.modal-actions {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

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

@keyframes thinkingWave {
  0%,
  100% {
    transform: scaleY(0.6);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1.15);
    opacity: 1;
  }
}

@keyframes spinEye {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes caretBlink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes growIn {
  from {
    opacity: 0.45;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes breathePulse {
  from {
    opacity: 0.68;
    transform: scale(0.994);
  }
  to {
    opacity: 1;
    transform: scale(1.004);
  }
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.994);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (min-width: 768px) {
  #screen-landing,
  #screen-journey,
  #screen-board,
  #screen-admin-login,
  #screen-error,
  #screen-busy {
    padding-left: max(8px, calc((100vw - 920px) / 2));
    padding-right: max(8px, calc((100vw - 920px) / 2));
  }
}

body.is-compact .landing-center {
  padding: 16px;
}

body.is-compact .landing-center h1 {
  font-size: clamp(26px, 7vw, 34px);
}

body.is-compact .landing-center p {
  font-size: clamp(17px, 4.6vw, 22px);
}

body.is-compact .btn-xl {
  min-height: 54px;
  font-size: 20px;
}

body.is-compact .journey-shell,
body.is-compact .board-shell {
  border-radius: 12px;
}

body.is-compact .journey-main {
  padding: 56px 12px 8px;
}

body.is-compact .ai-message {
  font-size: clamp(24px, 6.2vw, 34px);
  line-height: 1.36;
}

body.is-compact .ai-head {
  font-size: 16px;
}

body.is-compact .thinking-status {
  font-size: 16px;
}

body.is-compact .journey-footer {
  padding: 6px 8px calc(8px + var(--safe-bottom));
  gap: 6px;
}

body.is-compact .choice-card {
  min-height: 48px;
  padding: 8px 10px;
  font-size: clamp(18px, 4.6vw, 24px);
  line-height: 1.28;
}

body.is-compact .text-toggle {
  font-size: 16px;
}

body.is-compact .free-input-panel textarea {
  min-height: 56px;
  font-size: 16px;
}

body.is-compact .board-header h2 {
  font-size: 16px;
}

body.is-compact .board-footer {
  padding-top: 6px;
}

body.is-ultra-compact .board-header {
  padding-top: 4px;
  padding-bottom: 4px;
}

body.is-ultra-compact .icon-btn {
  min-width: 38px;
  min-height: 38px;
  font-size: 18px;
  border-radius: 11px;
}

body.is-ultra-compact .journey-back-float {
  left: 8px;
  top: 8px;
}

body.is-ultra-compact .journey-main {
  padding: 48px 8px 6px;
}

body.is-ultra-compact .ai-head {
  margin-bottom: 4px;
  font-size: 14px;
}

body.is-ultra-compact .ai-message {
  font-size: clamp(19px, 5.2vw, 24px);
  line-height: 1.3;
}

body.is-ultra-compact .thinking-status {
  font-size: 14px;
}

body.is-ultra-compact .choice-card {
  min-height: 40px;
  font-size: clamp(15px, 4.6vw, 20px);
  padding: 6px 8px;
}

body.is-ultra-compact .free-input-panel textarea {
  min-height: 48px;
  font-size: 16px;
}

body.is-ultra-compact .journey-footer {
  gap: 4px;
  padding-top: 4px;
}

body.is-ultra-compact .text-toggle {
  font-size: 14px;
}

body.is-ultra-compact .btn-sm {
  min-height: 36px;
  font-size: 14px;
}

body.is-ultra-compact .board-list {
  padding: 6px;
}

body.is-ultra-compact .idea-card {
  padding: 9px;
  margin-bottom: 6px;
}

body.is-ultra-compact .idea-title {
  font-size: 14px;
}

body.is-mini-compact .journey-shell,
body.is-mini-compact .board-shell {
  border-radius: 10px;
}

body.is-mini-compact .journey-main {
  padding: 44px 6px 4px;
}

body.is-mini-compact .ai-head {
  font-size: 13px;
  margin-bottom: 3px;
}

body.is-mini-compact .ai-message {
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.27;
}

body.is-mini-compact .thinking-status {
  font-size: 12px;
  margin-top: 8px;
}

body.is-mini-compact .journey-footer {
  gap: 3px;
  padding: 4px 6px calc(6px + var(--safe-bottom));
}

body.is-mini-compact .choice-card {
  min-height: 34px;
  font-size: 14px;
  padding: 5px 7px;
  border-radius: 10px;
}

body.is-mini-compact .text-toggle {
  font-size: 12px;
}

body.is-mini-compact .free-input-panel textarea {
  min-height: 40px;
  font-size: 16px;
  padding: 6px 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
