main {
  min-height: 0;
  overflow: hidden;
}

.workspace {
  min-height: 0;
  overflow: hidden;
  max-width: 1180px;
}

.assets-panel {
  width: 380px;
}

.app:has(.assets-panel:not(.hidden)) {
  grid-template-columns: 250px minmax(0, 1fr) 380px;
}

.organizer {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.current-focus {
  border-top: 1px solid var(--line);
  padding: 14px 8px 12px;
}

.current-focus:empty {
  display: none;
}

.focus-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  margin-top: 9px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
}

.focus-item b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #101204;
  font-size: 10px;
}

.organizer details {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.organizer details:first-child {
  border-top: 0;
  padding-top: 0;
}

.organizer summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  list-style-position: outside;
}

.organizer summary::marker {
  color: var(--accent2);
}

.organizer-body {
  padding-top: 10px;
}

.organizer section {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.organizer section:first-child {
  border-top: 0;
  padding-top: 0;
}

.organizer h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .04em;
}

.organizer-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 8px;
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.4;
}

.organizer-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.item-check,
.item-delete,
.quick-add button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 5px;
  cursor: pointer;
}

.item-check {
  width: 20px;
  height: 20px;
  padding: 0;
  color: var(--accent);
}

.item-delete {
  border: 0;
  background: transparent;
  font-size: 16px;
}

.quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  margin-top: 10px;
}

.quick-add input,
.quick-add select {
  min-width: 0;
  border: 1px solid var(--line);
  background: #0e1012;
  color: var(--text);
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
}

.plan-add {
  grid-template-columns: 90px minmax(0, 1fr) 30px;
}

.parts-add {
  grid-template-columns: 54px minmax(0, 1fr) 30px;
}

.plan-kind {
  margin-top: 10px;
  color: var(--accent2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.organizer-empty {
  margin: 6px 0;
  color: var(--muted);
  font-size: 11px;
}

.files-section .asset-list {
  margin-top: 0;
}

.messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  padding-right: 12px;
}

.composer {
  flex: 0 0 auto;
  margin-bottom: 24px;
}

.pending-user {
  animation: message-arrive .18s ease-out both;
}

.working-message {
  min-height: 54px;
  animation: message-arrive .18s ease-out both;
}

.working-content {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.working-orb {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #566823;
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle, #263017, #121417 68%);
  animation: working-spin 1.4s linear infinite, working-glow 1s ease-in-out infinite alternate;
}

.working-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.working-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: working-bounce 1.1s ease-in-out infinite;
}

.working-dots i:nth-child(2) { animation-delay: .14s; }
.working-dots i:nth-child(3) { animation-delay: .28s; }

@keyframes message-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes working-spin { to { transform: rotate(360deg); } }
@keyframes working-glow {
  from { box-shadow: 0 0 0 rgba(217,255,87,0); }
  to { box-shadow: 0 0 15px rgba(217,255,87,.28); }
}
@keyframes working-bounce {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .pending-user, .working-message, .working-orb, .working-dots i { animation: none; }
}

@media (max-width: 800px) {
  .composer {
    margin-bottom: 16px;
  }
}

@media (max-width: 1250px) and (min-width: 801px) {
  .assets-panel {
    width: 330px;
  }

  .app:has(.assets-panel:not(.hidden)) {
    grid-template-columns: 230px minmax(0, 1fr) 330px;
  }
}
