:root {
  --bg-0: #09111d;
  --bg-1: #0f1b2d;
  --panel: rgba(11, 21, 35, 0.84);
  --text: #eef4ff;
  --muted: #90a6c7;
  --accent: #69d2ff;
  --accent-2: #ffd86b;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: var(--app-height, 100vh);
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background:
    radial-gradient(circle at 18% 18%, rgba(75, 133, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 14%, rgba(0, 208, 255, 0.12), transparent 26%),
    radial-gradient(circle at 72% 84%, rgba(255, 199, 92, 0.1), transparent 24%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

.demo-canvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: var(--app-height, 100vh);
  display: block;
  cursor: grab;
  touch-action: none;
}

.panel-scrim,
.mobile-dock,
.panel-close-btn {
  display: none;
}

.panel {
  position: absolute;
  z-index: 2;
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(150, 200, 255, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.floating-toolbar {
  left: 18px;
  top: 18px;
  position: absolute;
  z-index: 3;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  box-shadow: none;
}

.control-panel {
  left: 18px;
  top: 18px;
  width: auto;
  max-width: min(560px, calc(100vw - 36px));
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  box-shadow: none;
  z-index: 3;
}

.control-panel .eyebrow,
.control-panel .title,
.control-panel .desc,
.control-panel .chip-row,
.control-panel .legend-list {
  display: none;
}

.control-panel .button-row {
  margin-top: 0;
  gap: 10px;
  max-width: min(560px, calc(100vw - 36px));
}

.control-panel .btn {
  padding: 10px 13px;
  background: rgba(96, 153, 255, 0.18);
  box-shadow: none;
}

.board-panel {
  left: 18px;
  top: 74px;
  width: clamp(288px, 25vw, 356px);
  height: calc(100vh - 92px);
  max-height: calc(100vh - 92px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.board-panel.is-active {
  border-color: rgba(255, 216, 107, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 216, 107, 0.08);
}

.board-panel-header {
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-title {
  margin: 0;
  font-size: 23px;
}

.board-meta {
  font-size: 13px;
  line-height: 1.6;
}

.board-tabs {
  display: flex;
  gap: 8px;
}

.board-tab {
  border: 1px solid rgba(150, 200, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.board-tab:hover {
  color: var(--text);
  border-color: rgba(255, 216, 107, 0.2);
}

.board-tab.is-active {
  color: #0d1627;
  background: rgba(255, 216, 107, 0.92);
  border-color: rgba(255, 242, 190, 0.42);
}

.board-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.board-entry-button,
.board-empty {
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 216, 107, 0.1);
  color: var(--text);
}

.mail-entry-button {
  border-color: rgba(141, 240, 208, 0.16);
}

.mail-entry-button:hover {
  background: rgba(141, 240, 208, 0.12);
  border-color: rgba(141, 240, 208, 0.22);
}

.mail-entry-button.is-active {
  background: rgba(141, 240, 208, 0.18);
  border-color: rgba(243, 255, 249, 0.34);
}

.board-entry-button {
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.board-entry-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 216, 107, 0.12);
  border-color: rgba(255, 216, 107, 0.22);
}

.board-entry-button.is-active {
  background: rgba(255, 216, 107, 0.18);
  border-color: rgba(255, 242, 190, 0.44);
}

.board-entry-button.is-fired {
  opacity: 0.72;
}

.board-empty {
  color: var(--muted);
  line-height: 1.65;
}

.board-entry-title {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.board-entry-meta-line {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.detail-panel {
  right: 18px;
  top: 18px;
  bottom: 18px;
  width: 61.8vw;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(52px);
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
  align-content: start;
}

.detail-panel-header {
  display: grid;
  gap: 8px;
}

.detail-panel.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.chat-record-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 231, 255, 0.24);
  background: rgba(105, 210, 255, 0.12);
  color: #dff4ff;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.chat-record-link:hover {
  color: #fff9da;
  border-color: rgba(255, 216, 107, 0.34);
  background: rgba(255, 216, 107, 0.14);
}

.chat-record-link-id {
  font-weight: 600;
}

.chat-record-link-action {
  font-size: 12px;
  color: var(--muted);
}

.chat-record-link-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 216, 107, 0.2);
  color: #fff1bc;
  font-size: 11px;
  line-height: 1.4;
}

.chat-record-modal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 9, 19, 0.76);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.chat-record-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.chat-record-dialog {
  width: min(1180px, calc(100vw - 40px));
  height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(150, 200, 255, 0.16);
  background: rgba(8, 14, 27, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.chat-record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(150, 200, 255, 0.12);
}

.chat-record-heading {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.chat-record-title {
  margin: 0;
}

.chat-record-meta {
  margin: 0;
  line-height: 1.6;
}

.chat-record-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(150, 200, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.chat-record-close-btn:hover {
  border-color: rgba(255, 216, 107, 0.3);
  background: rgba(255, 216, 107, 0.12);
}

.chat-record-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
  align-content: start;
}

.chat-record-entry {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(150, 200, 255, 0.12);
}

.chat-record-entry.is-assistant {
  border-color: rgba(105, 210, 255, 0.22);
}

.chat-record-entry.is-tool {
  border-color: rgba(255, 216, 107, 0.2);
  background: rgba(255, 216, 107, 0.06);
}

.chat-record-entry.is-user {
  border-color: rgba(141, 240, 208, 0.18);
  background: rgba(91, 209, 201, 0.06);
}

.chat-record-entry.is-system {
  border-color: rgba(176, 194, 255, 0.16);
}

.chat-record-entry-header {
  display: grid;
  gap: 6px;
}

.chat-record-entry-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chat-record-index,
.chat-record-role,
.chat-record-name,
.chat-record-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.chat-record-index {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.chat-record-role {
  color: #08101d;
  background: rgba(184, 231, 255, 0.92);
}

.chat-record-name {
  color: #fff4d0;
  background: rgba(255, 216, 107, 0.16);
}

.chat-record-submeta {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.chat-record-content {
  display: grid;
  gap: 12px;
}

.chat-record-block {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(5, 11, 20, 0.46);
  border: 1px solid rgba(150, 200, 255, 0.08);
}

.chat-record-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-record-block-header-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-record-block-title {
  font-size: 13px;
  line-height: 1.5;
  color: #fff4d0;
}

.chat-record-block-summary {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.chat-record-toggle {
  flex: 0 0 auto;
  border: 1px solid rgba(150, 200, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-record-toggle:hover {
  border-color: rgba(255, 216, 107, 0.28);
  background: rgba(255, 216, 107, 0.1);
}

.chat-record-block-panel {
  display: grid;
  gap: 10px;
}

.chat-record-block.is-collapsed .chat-record-block-panel {
  display: none;
}

.chat-record-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-record-chip {
  color: #dfe8ff;
  background: rgba(255, 255, 255, 0.06);
}

.chat-record-json {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(3, 9, 18, 0.78);
  border: 1px solid rgba(150, 200, 255, 0.08);
  color: #d7e5ff;
  font-size: 12px;
  line-height: 1.6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-record-footnote {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.chat-record-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(150, 200, 255, 0.16);
  color: var(--muted);
  line-height: 1.7;
}

.chat-record-empty.is-error {
  color: #ffd2d2;
  border-color: rgba(255, 123, 123, 0.28);
  background: rgba(255, 123, 123, 0.08);
}

.footer-bar {
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1,
h2,
p,
ul {
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.title {
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.desc,
.muted {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.button-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.toolbar-row {
  margin-top: 0;
  gap: 10px;
  max-width: calc(100vw - 36px);
  flex-wrap: nowrap;
}

.btn,
.chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.btn {
  background: rgba(96, 153, 255, 0.18);
}

.btn-danger {
  background: rgba(255, 157, 142, 0.18);
}

.btn-danger:hover {
  background: rgba(255, 157, 142, 0.28);
}

.floating-toolbar .btn {
  padding: 10px 13px;
  background: rgba(96, 153, 255, 0.18);
  box-shadow: none;
}

.btn:hover,
.chip:hover {
  transform: translateY(-1px);
  background: rgba(112, 182, 255, 0.28);
}

.chip {
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--muted);
  padding: 8px 12px;
}

.chip.is-active {
  background: rgba(105, 210, 255, 0.2);
  color: var(--text);
}

.legend-list,
.detail-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.legend-item,
.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

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

.detail-item {
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
  flex: 0 0 auto;
}

.detail-title {
  font-size: 22px;
  margin-top: 0;
}

.detail-block {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: auto;
  overflow: visible;
}

.detail-block strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--accent-2);
}

.detail-block p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.detail-body,
.history-message-body {
  font-size: 14px;
  line-height: 1.68;
  color: var(--text);
}

.rendered-markdown.is-plain {
  white-space: pre-wrap;
}

.rendered-markdown > :first-child {
  margin-top: 0;
}

.rendered-markdown > :last-child {
  margin-bottom: 0;
}

.rendered-markdown p {
  margin: 0 0 0.82em;
}

.rendered-markdown h1,
.rendered-markdown h2,
.rendered-markdown h3,
.rendered-markdown h4,
.rendered-markdown h5,
.rendered-markdown h6 {
  margin: 1.1em 0 0.48em;
  line-height: 1.28;
  color: #f8fbff;
}

.rendered-markdown h1 {
  font-size: 24px;
}

.rendered-markdown h2 {
  font-size: 20px;
}

.rendered-markdown h3 {
  font-size: 17px;
}

.rendered-markdown ul,
.rendered-markdown ol {
  margin: 0 0 0.9em;
  padding-left: 1.3em;
}

.rendered-markdown li + li {
  margin-top: 0.32em;
}

.rendered-markdown blockquote {
  margin: 0 0 0.9em;
  padding: 0.72em 0.9em;
  border-left: 3px solid rgba(255, 216, 107, 0.46);
  background: rgba(255, 255, 255, 0.03);
  color: #d5e2f5;
}

.rendered-markdown code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
  padding: 0.14em 0.32em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.rendered-markdown pre {
  margin: 0 0 0.9em;
  padding: 0.9em 1em;
  overflow: auto;
  border-radius: 12px;
  background: rgba(7, 13, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rendered-markdown pre code {
  padding: 0;
  background: transparent;
}

.rendered-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.9em;
}

.rendered-markdown th,
.rendered-markdown td {
  padding: 0.56em 0.72em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.rendered-markdown th {
  background: rgba(255, 255, 255, 0.06);
}

.rendered-markdown a {
  color: var(--accent);
}

.rendered-markdown hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1em 0;
}

.detail-history {
  min-height: auto;
}

.is-hidden {
  display: none !important;
}

.history-list {
  display: grid;
  gap: 12px;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.history-empty {
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  line-height: 1.6;
}

.history-entry {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.history-entry-meta {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.history-turn {
  display: grid;
  gap: 10px;
}

.history-message {
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.65;
  white-space: normal;
}

.history-message.user {
  background: rgba(105, 210, 255, 0.1);
  border: 1px solid rgba(105, 210, 255, 0.14);
}

.history-message.assistant {
  background: rgba(255, 216, 107, 0.08);
  border: 1px solid rgba(255, 216, 107, 0.14);
}

.history-role {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--accent);
}

.history-message.assistant .history-role {
  color: var(--accent-2);
}

.detail-compose {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.compose-label {
  font-size: 13px;
  color: var(--accent-2);
}

.ask-input {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid rgba(150, 200, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(7, 13, 24, 0.66);
  color: var(--text);
  font: inherit;
}

.ask-input:focus {
  outline: none;
  border-color: rgba(105, 210, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(105, 210, 255, 0.12);
}

.ask-input:disabled,
.ask-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.compose-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compose-status {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.compose-status.is-error {
  color: #ffb3a3;
}

.status-line {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bar .status-line {
  display: none;
}

.footer-tip {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .chat-record-modal {
    padding: 0;
  }

  .chat-record-dialog {
    width: 100vw;
    height: var(--app-height, 100vh);
    padding: 18px 16px;
    border-radius: 0;
  }

  .chat-record-entry {
    padding: 14px;
  }

  .board-panel {
    left: 12px;
    right: 12px;
    top: 68px;
    width: auto;
    height: 260px;
    max-height: none;
    padding: 16px;
  }

  .detail-panel {
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: auto;
    padding: 18px;
  }

  .floating-toolbar {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .control-panel {
    left: 18px;
    right: 18px;
    max-width: calc(100vw - 36px);
  }

  .control-panel .button-row {
    max-width: none;
  }

  .toolbar-row {
    max-width: none;
    flex-wrap: wrap;
  }

  .footer-bar {
    position: static;
    margin: 0 18px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  body {
    overflow: auto;
  }

  .demo-canvas {
    position: fixed;
  }

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

  .compose-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 767px) {
  body {
    overflow: hidden;
  }

  .demo-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: var(--app-height, 100vh);
  }

  .floating-toolbar {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .toolbar-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .toolbar-row::-webkit-scrollbar {
    display: none;
  }

  .toolbar-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .panel-scrim {
    position: fixed;
    inset: 0;
    z-index: 4;
    background: rgba(4, 8, 16, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .panel-scrim.is-visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .panel-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font: inherit;
  }

  .mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: flex;
    gap: 10px;
  }

  .mobile-dock .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }

  .mobile-dock .btn.is-active {
    background: rgba(105, 210, 255, 0.28);
  }

  .mobile-dock .btn:disabled {
    opacity: 0.42;
    cursor: default;
  }

  body.has-mobile-panel .mobile-dock {
    opacity: 0;
    pointer-events: none;
  }

  .board-panel,
  .detail-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: calc(var(--app-height, 100vh) - 88px);
    border-radius: 22px;
    padding: 18px 16px 16px;
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    z-index: 6;
  }

  .board-panel {
    height: calc(var(--app-height, 100vh) - 88px);
  }

  .detail-panel {
    height: calc(var(--app-height, 100vh) - 88px);
  }

  .detail-panel.is-visible {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }

  .board-panel.is-mobile-open,
  .detail-panel.is-visible.is-mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .board-panel-header,
  .detail-panel-header {
    gap: 10px;
  }

  .board-tabs {
    flex-wrap: wrap;
  }

  .board-list,
  .detail-scroll {
    padding-right: 0;
  }

  .detail-scroll {
    gap: 12px;
  }

  .detail-title {
    font-size: 20px;
  }

  .detail-block,
  .history-entry,
  .board-entry-button,
  .board-empty {
    border-radius: 16px;
  }
}
