.workspace {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: var(--bg);
}

.workspace-side {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
}

.workspace-user {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gear-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #475467;
}

.workspace-section-title {
  margin: 16px 0 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-link {
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 900;
  cursor: pointer;
}

.daily-claim {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #ffd7d4;
  border-radius: 8px;
  background: #fff7f6;
}

.daily-claim.is-claimed {
  border-color: #d1fadf;
  background: #f0fdf4;
}

.daily-claim .btn {
  width: 100%;
}

.workspace-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

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

.workspace-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.workspace-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.model-group-list {
  display: grid;
  gap: 10px;
}

.model-group {
  border: 1px solid #ffd0cc;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #fff5f4);
}

.model-group summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
}

.model-group summary::-webkit-details-marker {
  display: none;
}

.model-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172033;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.model-summary-text {
  display: grid;
  gap: 2px;
}

.model-summary-text strong {
  color: #111;
}

.model-summary-text em {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff0ef;
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.model-summary-text span {
  color: #667085;
  font-size: 12px;
}

.model-summary-text b {
  color: var(--red);
  font-size: 12px;
}

.chevron {
  color: #98a2b3;
  transform: rotate(180deg);
}

.model-group[open] .chevron {
  transform: rotate(0deg);
}

.model-variants {
  display: grid;
  gap: 4px;
  padding: 0 12px 12px 54px;
}

.model-variant {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: #475467;
  text-align: left;
}

.model-variant::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #cfd5df;
  flex: 0 0 auto;
}

.model-variant span {
  flex: 1;
}

.model-variant small {
  color: #98a2b3;
  white-space: nowrap;
}

.model-variant.active {
  color: var(--red);
  background: linear-gradient(90deg, rgba(229, 57, 53, 0.11), rgba(229, 57, 53, 0.02));
}

.model-variant.active::before {
  background: var(--red);
}

.model-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 3px;
  text-align: left;
}

.model-card.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.workspace-history {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.history-chip {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px;
  text-align: left;
  color: #344054;
}

.history-chip span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-chip.active {
  border-color: var(--red);
  background: #fff7f6;
}

.history-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff2f1;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.liblib-btn {
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.2);
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.message {
  max-width: 760px;
  margin: 0 auto 14px;
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  padding: 13px 16px;
  border-radius: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--line);
}

.message.user .bubble {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.composer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 24px;
}

.composer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.composer input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
}

.image-preview {
  max-width: 360px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
}

.gallery-strip {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px 24px 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(64px, 1fr));
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f2f4f7;
}

.gallery-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.image-preview-large img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.empty.compact {
  padding: 12px;
  font-size: 12px;
}
