/* Dotsの公開画面を基準に、会話・名前チップ・入力欄の寸法をそろえる。 */
:root {
  color-scheme: light;
  --paper: #fff;
  --sidebar: #fafafa;
  --ink: #0d0d0d;
  --muted: #8f8f8f;
  --line: #e8e8e8;
  --soft: #f3f3f3;
  --accent: #079ef3;
  --font:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Noto Sans JP",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #a1c8e9;
  outline-offset: 3px;
}
textarea:focus {
  outline: none;
}
.workspace {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--sidebar);
  padding: 18px 12px 12px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
  transition:
    width 0.18s,
    padding 0.18s;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 22px;
}
.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #111;
  color: white;
  font:
    bold 23px/23px Georgia,
    serif;
  text-align: center;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #424242;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #f0f0f0;
}
.sidebar .icon-button {
  color: #777;
}
.sidebar .icon-button svg {
  width: 18px;
  height: 18px;
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border-radius: 9px;
}
.new-chat:hover,
.main-nav a:hover,
.conversation-row:hover {
  background: #ededed;
}
.new-chat svg {
  width: 18px;
  height: 18px;
}
.shortcut {
  margin-left: auto;
  color: #a0a0a0;
}
.main-nav {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: #414141;
}
.main-nav a.active {
  color: #111;
  background: #ececec;
}
.main-nav svg {
  width: 18px;
  height: 18px;
}
.count {
  margin-left: auto;
  background: #e8e8e8;
  min-width: 19px;
  border-radius: 6px;
  color: #555;
  font-size: 11px;
  text-align: center;
  padding: 0 5px;
}
.running-dot,
.live-dot,
.connection > span:first-child {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #62a681;
}
.running-dot {
  margin-left: auto;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #999;
  font-size: 11px;
  padding: 24px 12px 6px;
}
.section-label .icon-button {
  width: 26px;
  height: 26px;
}
.section-label svg {
  width: 14px;
  height: 14px;
}
.search {
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.conversation-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.conversation-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  color: #666;
}
.conversation-row.selected {
  background: #eaeaea;
  color: #111;
}
.conversation-row .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-row svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}
.sidebar-bottom {
  padding-top: 12px;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 11px 8px;
  border-radius: 10px;
}
.profile-button:hover {
  background: #eee;
}
.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #e4e4e4;
  font-size: 12px;
  color: #555;
}
.profile-button strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.profile-button small {
  display: block;
  font-size: 10px;
  color: #999;
}
.profile-button > svg {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: #888;
}
.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  font-size: 9px;
  color: #a0a0a0;
}
.connection.offline > span:first-child {
  background: #bd9979;
}
.sidebar-collapsed .sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  border: 0;
  overflow: hidden;
}
.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.topbar {
  height: 158px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(white 85%, #ffffff00);
  z-index: 3;
}
.round-control {
  width: 42px;
  height: 42px;
  border: 1px solid #ededed;
  background: #ffffffed;
  box-shadow: 0 3px 14px #00000006;
}
.round-control svg {
  width: 21px;
  height: 21px;
}
.mobile-menu {
  position: absolute;
  left: 26px;
  top: 24px;
}
.topbar-actions {
  position: absolute;
  right: 26px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.demo-label {
  color: #a0a0a0;
  font-size: 10px;
}
.agent-heading {
  display: flex;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  width: max-content;
}
.companion {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13%;
  border-radius: 43% 42% 45% 40% / 42% 44% 39% 46%;
  background: radial-gradient(
    ellipse at 26% 17%,
    #c4d6ff 0%,
    #81acff 31%,
    #4d8eea 66%,
    #376bcb 100%
  );
  box-shadow:
    inset 4px 5px 10px #ffffff55,
    inset -5px -6px 9px #3154a32b,
    0 5px 13px #4e7bbe18;
  transform: rotate(-8deg);
  flex-shrink: 0;
}
.companion::before {
  content: "";
  position: absolute;
  inset: 13% -5%;
  border-radius: 45%;
  background: inherit;
  z-index: -1;
}
.companion i {
  display: block;
  background: #17264a;
  width: 5%;
  height: 10%;
  border-radius: 50%;
  margin-top: -2%;
  box-shadow: inset 1px 1px 1px #040c1a88;
  transform: rotate(8deg);
}
.header-companion {
  width: 60px;
  height: 60px;
}
.identity-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 3px;
  padding: 5px 12px;
  border-radius: 20px;
  background: #ffffffeb;
  box-shadow:
    0 4px 24px #0000000d,
    inset 0 0 0 1px #f3f3f3;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.45px;
}
.subtle-chevron {
  color: #a5a5a5;
  font-size: 21px;
  font-weight: 400;
  line-height: 16px;
}
.page-context {
  display: none;
}
.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
.home-content,
.chat-content {
  max-width: 736px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 24px;
}
.thread-date {
  text-align: center;
  color: #929292;
  font-size: 12px;
  margin: 12px 0 26px;
}
.received-group {
  max-width: 100%;
}
.home-bubble {
  background: #f3f3f3;
  border-radius: 24px;
  padding: 15px 19px;
  width: fit-content;
  max-width: 85%;
}
.home-bubble h1 {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.35px;
  font-weight: 400;
  margin: 0;
}
.home-bubble p {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.35px;
  margin: 8px 0 0;
}
.thread-documents {
  max-width: 470px;
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.home-task {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #e7e7e7;
  border-radius: 17px;
  padding: 12px 15px;
  background: #fff;
  min-width: 0;
  transition: background 0.15s;
}
.home-task:hover {
  background: #fafafa;
}
.task-symbol {
  display: flex;
  width: 40px;
  height: 43px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #f4f4f4;
  color: #888;
  flex-shrink: 0;
}
.thread-documents .task-symbol {
  color: #f15d63;
}
.task-symbol svg {
  width: 21px;
  height: 21px;
}
.task-info {
  flex: 1;
  min-width: 0;
}
.task-info strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-info small {
  display: block;
  color: #999;
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8e8e8e;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.thread-documents .status-pill {
  display: none;
}
.status-pill.running,
.status-pill.executing,
.status-pill.sending {
  color: #487fa4;
}
.status-pill.failed,
.status-pill.interrupted {
  color: #ae7f61;
}
.recent-label {
  margin-top: 32px;
  margin-bottom: 17px;
}
.recent-conversations .task-symbol {
  color: #8f8f8f;
}
.composer-region {
  width: 100%;
  max-width: 736px;
  padding: 18px 28px 24px;
  align-self: center;
  position: relative;
  flex-shrink: 0;
  background: white;
}
.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e9e9e9;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 5px 26px #0000000b;
}
.composer:focus-within {
  border-color: #dedede;
}
.composer > .icon-button {
  width: 32px;
  height: 32px;
  color: #161616;
}
.composer > .icon-button svg {
  width: 23px;
  height: 23px;
}
.composer textarea {
  display: block;
  flex: 1;
  width: 0;
  min-width: 0;
  min-height: 27px;
  max-height: 180px;
  resize: none;
  padding: 1px 0;
  border: 0;
  color: #111;
  background: transparent;
  font-size: 16px;
  line-height: 25px;
  letter-spacing: -0.2px;
}
.composer textarea::placeholder {
  color: #999;
}
.send-button,
.stop-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: white;
  flex-shrink: 0;
}
.send-button svg {
  width: 19px;
  height: 19px;
}
.stop-button svg {
  width: 12px;
  height: 12px;
  fill: white;
}
.send-button:hover,
.activity-stop:hover {
  background: #333;
}
.composer-caption {
  font-size: 10px;
  color: #aaa;
  text-align: center;
  margin-top: 9px;
  min-height: 0;
}
.composer-caption:empty {
  display: none;
}
.composer-menu {
  position: absolute;
  z-index: 10;
  bottom: calc(100% - 7px);
  left: 28px;
  width: 282px;
  background: white;
  border: 1px solid #ececec;
  border-radius: 17px;
  box-shadow: 0 7px 35px #00000014;
  padding: 7px;
}
.composer-menu button,
.agent-select {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  text-align: left;
  font-size: 12px;
}
.composer-menu button:hover {
  background: #f4f4f4;
}
.agent-select {
  color: #555;
  border-top: 1px solid #f3f3f3;
  border-radius: 0;
}
.agent-select svg {
  width: 18px;
  height: 18px;
}
.agent-select select {
  margin-left: auto;
  font-size: 11px;
  background: white;
  border: 0;
  padding: 5px;
  color: #666;
  max-width: 135px;
}
.pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.pending-files:empty {
  display: none;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  font-size: 11px;
  background: white;
}
.file-chip svg {
  width: 16px;
  height: 16px;
  color: #f15d63;
}
.file-chip a {
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.file-chip > span {
  color: #999;
  font-size: 10px;
}
.file-chip button {
  padding: 0 3px;
  color: #999;
}
.conversation-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 27px;
}
.conversation-heading h1 {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin: 0;
}
.conversation-heading > .icon-button {
  width: 22px;
  height: 22px;
  opacity: 0.5;
}
.conversation-heading svg {
  width: 13px;
  height: 13px;
}
.chat-turn {
  margin-bottom: 29px;
}
.user-message {
  width: fit-content;
  max-width: 80%;
  margin-left: auto;
  background: var(--accent);
  color: white;
  border-radius: 24px;
  padding: 12px 17px;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  letter-spacing: -0.3px;
}
.message-meta {
  color: #a0a0a0;
  font-size: 11px;
  text-align: center;
  margin: 22px 0 18px;
}
.assistant-label {
  display: none;
}
.assistant-body {
  max-width: 88%;
  width: fit-content;
  background: #f3f3f3;
  border-radius: 24px;
  padding: 14px 19px;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.25px;
  overflow-wrap: anywhere;
  color: #171717;
}
.assistant-body > :first-child {
  margin-top: 0;
}
.assistant-body > :last-child {
  margin-bottom: 0;
}
.assistant-body p {
  margin: 10px 0 15px;
}
.assistant-body h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 25px 0 10px;
}
.assistant-body h3 {
  font-size: 15px;
  margin: 20px 0 9px;
}
.assistant-body strong {
  font-weight: 600;
}
.assistant-body ul,
.assistant-body ol {
  padding-left: 22px;
}
.assistant-body li {
  margin: 6px 0;
}
.assistant-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.assistant-body code {
  font:
    12px/1.6 ui-monospace,
    monospace;
  background: #e7e7e7;
  border-radius: 5px;
  padding: 2px 5px;
}
.assistant-body pre {
  overflow: auto;
  background: #eaeaea;
  border-radius: 12px;
  padding: 14px;
}
.assistant-body pre code {
  background: none;
  padding: 0;
  white-space: pre;
}
.assistant-body table {
  border-collapse: collapse;
  display: block;
  overflow: auto;
  max-width: 100%;
  font-size: 12px;
}
.assistant-body th,
.assistant-body td {
  text-align: left;
  padding: 8px;
  border: 1px solid #d8d8d8;
}
.assistant-body blockquote {
  border-left: 2px solid #ccc;
  padding-left: 13px;
  margin: 14px 0;
  color: #777;
}
.message-actions {
  display: flex;
  margin-top: 7px;
}
.message-actions .icon-button {
  width: 26px;
  height: 26px;
  color: #aaa;
}
.message-actions svg {
  width: 13px;
  height: 13px;
}
.working {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #8b8b8b;
  background: #f3f3f3;
  width: fit-content;
  max-width: 88%;
  border-radius: 22px;
  padding: 13px 17px;
  font-size: 13px;
}
.pulse {
  width: 5px;
  height: 5px;
  background: #aaa;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
.error-message {
  background: #faf4ee;
  border-radius: 18px;
  padding: 15px 18px;
  font-size: 13px;
  color: #9c7960;
}
.retry-prompt {
  margin-top: 9px;
  border: 1px solid #e1d3c7;
  padding: 6px 10px;
  border-radius: 15px;
  font-size: 11px;
}
.activity-panel {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #ededed;
  background: #fff;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 20px 15px;
}
.panel-heading h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.4px;
}
.panel-heading .icon-button {
  width: 28px;
  height: 28px;
  color: #aaa;
}
.panel-heading svg {
  width: 16px;
  height: 16px;
}
#panel-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 15px;
}
.panel-section {
  margin: 23px 8px 10px;
  color: #8b8b8b;
  font-size: 12px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 14px;
  padding: 9px 8px;
  min-width: 0;
}
.activity-row:hover {
  background: #f6f6f6;
}
.activity-row > a {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.activity-symbol {
  display: flex;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f3f3f3;
  align-items: center;
  justify-content: center;
  color: #999;
  flex-shrink: 0;
}
.activity-symbol svg {
  width: 18px;
  height: 18px;
}
.activity-row > span:not(.activity-symbol):not(.row-chevron),
.activity-row > a > span:last-child {
  flex: 1;
  min-width: 0;
}
.activity-row strong {
  display: block;
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row small {
  display: block;
  color: #999;
  font-size: 11px;
  margin-top: 3px;
}
.row-chevron {
  font-size: 18px;
  color: #ccc;
  margin-left: auto;
}
.activity-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: white;
  background: #111;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-stop svg {
  width: 10px;
  height: 10px;
  fill: white;
}
.panel-empty {
  font-size: 11px;
  color: #aaa;
  padding: 4px 8px 12px;
}
.panel-footer {
  border-top: 1px solid #f3f3f3;
  padding: 15px 20px;
  color: #aaa;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.list-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 28px 40px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 0 0 7px;
}
.page-heading p {
  font-size: 12px;
  color: #999;
  margin: 0;
}
.eyebrow {
  display: none;
}
.subtle-button,
.secondary {
  border: 1px solid #e6e6e6;
  background: white;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
}
.list-content > .home-task {
  margin-bottom: 8px;
}
.filters {
  display: flex;
  gap: 5px;
  margin: 17px 0;
}
.filter {
  font-size: 12px;
  color: #999;
  padding: 5px 12px;
  border-radius: 20px;
}
.filter.active {
  background: #f1f1f1;
  color: #111;
}
.task-detail {
  border: 1px solid #e6e6e6;
  border-radius: 22px;
  overflow: hidden;
  margin-top: 17px;
}
.task-detail-head {
  padding: 23px;
  border-bottom: 1px solid #eee;
}
.task-detail-head h1 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 13px 0;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #999;
}
.detail-section {
  padding: 21px 23px;
  border-bottom: 1px solid #eee;
}
.detail-section h3 {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  margin: 0 0 13px;
}
.draft {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.85;
}
.draft-editor {
  width: 100%;
  min-height: 180px;
  border: 1px solid #ddd;
  border-radius: 13px;
  padding: 12px;
  resize: vertical;
}
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 17px 23px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 25px;
  background: #111;
  color: white;
  font-size: 12px;
}
.primary:hover {
  background: #333;
}
.danger-text {
  color: #999;
  font-size: 12px;
  padding: 7px;
}
.detail-section .assistant-body {
  max-width: 100%;
  background: transparent;
  padding: 0;
  font-size: 14px;
}
.readonly-note {
  font-size: 11px;
  color: #9b866d;
  background: #faf6ef;
  border-radius: 12px;
  padding: 12px;
}
.empty-state {
  text-align: center;
  color: #999;
  padding: 38px 15px;
  font-size: 12px;
}
.empty-state h2 {
  font-size: 17px;
  color: #666;
  font-weight: 400;
}
.empty-state svg {
  margin: 0 auto 12px;
  color: #aaa;
  width: 26px;
  height: 26px;
}
.load-more {
  display: block;
  margin: 0 auto 25px;
}
.notice {
  padding: 10px 25px;
  color: #999;
  font-size: 11px;
  white-space: pre-wrap;
  background: #fafafa;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: #222;
  color: white;
  border-radius: 22px;
  padding: 11px 19px;
  font-size: 12px;
  z-index: 100;
  max-width: 90vw;
  box-shadow: 0 5px 25px #0002;
}
dialog {
  color: #111;
  border: 1px solid #eee;
  border-radius: 25px;
  width: 440px;
  max-width: calc(100vw - 28px);
  padding: 24px;
  box-shadow: 0 20px 100px #00000025;
}
dialog::backdrop {
  background: #00000030;
  backdrop-filter: blur(3px);
}
.modal-top {
  display: flex;
  justify-content: flex-end;
}
dialog h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
  margin: 7px 0 18px;
  letter-spacing: -0.5px;
}
dialog p {
  font-size: 12px;
  color: #888;
}
dialog label {
  font-size: 12px;
  color: #888;
  display: block;
  margin: 15px 0 7px;
}
dialog input,
dialog textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 13px;
  padding: 11px 13px;
  font-size: 14px;
}
dialog textarea {
  min-height: 150px;
  resize: vertical;
}
#modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 23px;
}
.settings-row {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.settings-row strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.settings-row small {
  display: block;
  font-size: 10px;
  color: #999;
}
.settings-row button {
  flex-shrink: 0;
}
.scrim {
  position: fixed;
  inset: 0;
  background: #00000025;
  z-index: 25;
}
.login-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 28px 35px;
  background: white;
}
.login-card {
  width: 100%;
  max-width: 360px;
  margin: auto;
  text-align: center;
  padding: 45px 0;
}
.companion.large {
  width: 83px;
  height: 83px;
}
.login-card > .companion {
  margin-bottom: 27px;
}
.login-card h1 {
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 10px 0 16px;
}
.login-card > p {
  font-size: 13px;
  color: #999;
  line-height: 1.9;
}
.login-card form {
  text-align: left;
  margin-top: 32px;
}
.login-card label {
  display: block;
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
}
.login-card input {
  width: 100%;
  border: 1px solid #ddd;
  padding: 13px 16px;
  border-radius: 25px;
  font-size: 14px;
}
.login-card .primary {
  width: 100%;
  padding: 13px 18px;
  margin-top: 10px;
  justify-content: space-between;
}
.login-card small {
  display: block;
  font-size: 10px;
  color: #aaa;
  margin-top: 18px;
}
#login-error {
  font-size: 12px;
  color: #b18a6a;
}
.login-footer {
  text-align: center;
  font-size: 10px;
  color: #bbb;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@media (max-width: 1150px) {
  .activity-panel {
    position: absolute;
    right: 14px;
    top: 14px;
    bottom: 14px;
    z-index: 30;
    width: 320px;
    border: 1px solid #eee;
    border-radius: 23px;
    box-shadow: 0 10px 55px #00000010;
  }
}
@media (max-width: 760px) {
  .sidebar,
  .sidebar-collapsed .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    height: 100dvh;
    width: 285px;
    padding: 18px 12px 16px;
    transform: translateX(-100%);
    transition: transform 0.18s;
    border-right: 1px solid #eee;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar {
    height: 142px;
  }
  .mobile-menu {
    left: 18px;
    top: 17px;
  }
  .topbar-actions {
    right: 18px;
    top: 17px;
  }
  .demo-label {
    display: none;
  }
  .round-control {
    width: 42px;
    height: 42px;
  }
  .agent-heading {
    top: 13px;
  }
  .header-companion {
    width: 55px;
    height: 55px;
  }
  .identity-chip {
    font-size: 16px;
    padding: 5px 12px;
    margin-top: 3px;
  }
  .home-content,
  .chat-content {
    padding: 0 18px 20px;
  }
  .thread-date {
    font-size: 11px;
    margin: 3px 0 21px;
  }
  .home-bubble {
    max-width: 91%;
    padding: 13px 16px;
    border-radius: 25px;
  }
  .home-bubble h1,
  .home-bubble p {
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.4px;
  }
  .home-bubble p {
    margin-top: 7px;
  }
  .thread-documents {
    max-width: 91%;
    gap: 6px;
    margin-top: 8px;
  }
  .home-task {
    padding: 10px 12px;
    border-radius: 17px;
    gap: 10px;
  }
  .task-symbol {
    width: 35px;
    height: 39px;
    border-radius: 10px;
  }
  .task-info strong {
    font-size: 13px;
  }
  .task-info small {
    font-size: 10px;
  }
  .status-pill {
    font-size: 9px;
  }
  .recent-label {
    margin-top: 25px;
    margin-bottom: 15px;
  }
  .composer-region {
    padding: 13px 18px max(17px, env(safe-area-inset-bottom));
  }
  .composer {
    padding: 9px 10px;
    gap: 8px;
    border: 0;
    min-height: 52px;
    border-radius: 29px;
    box-shadow: 0 3px 28px #0000001b;
  }
  .composer textarea {
    font-size: 16px;
    line-height: 25px;
  }
  .composer > .icon-button {
    width: 28px;
    height: 30px;
  }
  .composer > .icon-button svg {
    width: 24px;
    height: 24px;
  }
  .send-button,
  .stop-button {
    width: 29px;
    height: 29px;
  }
  .composer-menu {
    left: 18px;
    width: min(285px, calc(100vw - 36px));
    bottom: calc(100% - 5px);
  }
  .composer-caption {
    font-size: 9px;
    margin-top: 10px;
  }
  .user-message {
    max-width: 84%;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 24px;
  }
  .assistant-body {
    max-width: 92%;
    padding: 13px 16px;
    font-size: 16px;
    line-height: 1.7;
    border-radius: 25px;
  }
  .message-meta {
    font-size: 10px;
    margin: 18px 0 15px;
  }
  .conversation-heading {
    margin-bottom: 21px;
  }
  .conversation-heading h1 {
    font-size: 11px;
  }
  .list-content {
    padding: 0 18px 30px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading {
    gap: 12px;
  }
  .subtle-button {
    font-size: 10px;
    white-space: nowrap;
  }
  .task-detail-head,
  .detail-section {
    padding: 18px;
  }
  .task-detail-head h1 {
    font-size: 18px;
  }
  .task-actions {
    padding: 16px 18px;
  }
  .task-detail {
    border-radius: 19px;
  }
  .activity-panel {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(340px, calc(100vw - 20px));
  }
  dialog input,
  dialog textarea {
    font-size: 16px;
  }
  .login-screen {
    padding: 23px;
  }
  .login-card input {
    font-size: 16px;
  }
  .notice {
    padding: 9px 18px;
    font-size: 10px;
  }
  .toast {
    width: max-content;
    text-align: center;
    bottom: max(22px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 長い会話で末尾へ移動しても、会話名を途中で切らない。 */
.conversation-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 6px 0;
}
.conversation-heading > div {
  min-width: 0;
}
.conversation-heading h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 530px;
}
@media (max-width: 760px) {
  .conversation-heading h1 {
    max-width: calc(100vw - 85px);
  }
}

/* PCはブラウザ版の主会話とプロフィールを基準にする。 */
@media (min-width: 761px) {
  .topbar {
    height: 70px;
    border-bottom: 1px solid #f5f5f5;
    background: #fff;
  }
  .mobile-menu {
    left: 17px;
    top: 17px;
    width: 34px;
    height: 34px;
    border: 0;
    box-shadow: none;
  }
  .agent-heading {
    top: 17px;
    left: 66px;
    transform: none;
    flex-direction: row;
    gap: 9px;
  }
  .header-companion {
    width: 32px;
    height: 32px;
  }
  .identity-chip {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
  }
  .topbar-actions {
    right: 21px;
    top: 17px;
  }
  .topbar-actions .round-control {
    border: 0;
    box-shadow: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .page-context {
    display: block;
    position: absolute;
    top: 25px;
    left: 160px;
    max-width: calc(100% - 325px);
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .workspace[data-main="true"] .page-context {
    display: none;
  }
  .chat-content {
    max-width: 780px;
    padding: 28px 32px 30px;
  }
  .main-conversation .conversation-heading {
    display: none;
  }
  .main-conversation {
    padding-top: 42px;
  }
  .assistant-body {
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: auto;
    max-width: 100%;
    font-size: 15px;
  }
  .user-message {
    background: #f2f2f2;
    color: #171717;
    font-size: 15px;
    border-radius: 22px;
    max-width: 83%;
  }
  .message-meta {
    margin: 22px 0;
    font-size: 11px;
  }
  .assistant-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
  }
  .assistant-label .companion {
    width: 23px;
    height: 23px;
  }
  .agent-label {
    color: #aaa;
    font-size: 10px;
    font-weight: 400;
    margin-left: 5px;
  }
  .composer-region {
    max-width: 780px;
    padding: 16px 32px 22px;
  }
  .composer {
    border-radius: 25px;
    padding: 11px 12px;
    box-shadow: 0 3px 18px #00000006;
  }
  .composer textarea {
    font-size: 15px;
  }
  .activity-panel {
    width: 330px;
    background: #fff;
  }
  .list-content {
    padding-top: 38px;
  }
}
.nav-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #bfc8df;
  position: relative;
}
.nav-dot::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: #323846;
  border-radius: 50%;
}
.panel-heading {
  padding: 17px 18px 10px;
}
.panel-heading h2 {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}
.dot-profile-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 8px 22px;
}
.profile-companion {
  width: 54px;
  height: 54px;
}
.dot-profile-identity h2 {
  font-size: 19px;
  font-weight: 550;
  letter-spacing: -0.5px;
  margin: 0 0 2px;
}
.dot-profile-identity p {
  font-size: 11px;
  color: #999;
  margin: 0;
}
.profile-main-link {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  background: #f5f5f5;
  padding: 10px 12px;
  font-size: 12px;
  margin: 0 6px 25px;
}
.profile-main-link svg {
  width: 16px;
  height: 16px;
  color: #777;
}
.profile-main-link span {
  margin-left: auto;
  color: #aaa;
}
.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 8px 12px;
}
.profile-section-heading h3 {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  margin: 0;
}
.profile-section-heading a {
  font-size: 10px;
  color: #999;
}
.profile-subheading {
  color: #aaa;
  font-size: 10px;
  margin: 16px 8px 7px;
}
.profile-attention {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f7f3;
  padding: 11px 12px;
  border-radius: 12px;
  margin: 12px 6px;
  font-size: 12px;
}
.profile-attention svg {
  width: 16px;
  height: 16px;
  color: #999;
}
.profile-attention span {
  margin-left: auto;
  color: #999;
}
.profile-footnote {
  color: #aaa;
  margin: 23px 8px 10px;
  font-size: 10px;
}
.panel-footer {
  padding: 8px 14px;
}
.panel-footer button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: #888;
  font-size: 11px;
  padding: 9px 5px;
  text-align: left;
}
.panel-footer svg {
  width: 15px;
  height: 15px;
}
.main-empty {
  padding-top: clamp(55px, 13vh, 130px);
}
.main-empty h2 {
  color: #444;
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 450;
}
.main-empty p {
  font-size: 13px;
  line-height: 1.9;
}
@media (max-width: 760px) {
  .main-conversation .conversation-heading {
    display: none;
  }
  .main-conversation {
    padding-top: 7px;
  }
  .main-empty {
    padding-top: 65px;
  }
  .main-empty h2 {
    font-size: 18px;
  }
  .main-empty p {
    font-size: 12px;
  }
}
