/* 🐾 FELINE SENTENCE COMPOSER & FIELD TEST STUDIO STYLES
 * Neo-Brutalist Manga & Apple-grade Responsive Styling
 */

.sentence-composer-deck {
  background: #ffffff;
  border: 2.5px solid #0f172a;
  box-shadow: 4px 4px 0px #0f172a;
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
}

body[data-theme="dark"] .sentence-composer-deck,
body[data-theme="cyberpunk"] .sentence-composer-deck,
body[data-theme="jungle"] .sentence-composer-deck {
  background: var(--card-bg, #1e1b4b);
  border-color: var(--border, #52298c);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.45);
}

.composer-timeline-box {
  background: #f8fafc;
  border: 2px dashed #0f172a;
  border-radius: 14px;
  padding: 1rem;
  margin: 1.25rem 0;
  position: relative;
}

body[data-theme="dark"] .composer-timeline-box,
body[data-theme="cyberpunk"] .composer-timeline-box,
body[data-theme="jungle"] .composer-timeline-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border, #52298c);
}

.composer-timeline-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem;
  scrollbar-width: thin;
}

.timeline-stem-block {
  background: #ffffff;
  border: 2px solid #0f172a;
  box-shadow: 2.5px 2.5px 0px #0f172a;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  box-sizing: border-box;
  min-width: min(170px, 100%);
  max-width: 100%;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body[data-theme="dark"] .timeline-stem-block,
body[data-theme="cyberpunk"] .timeline-stem-block,
body[data-theme="jungle"] .timeline-stem-block {
  background: #1e1b4b;
  border-color: #6366f1;
}

.timeline-stem-block.playing {
  border-color: #cf0f5c;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.45);
  transform: translateY(-2px);
}

.timeline-stem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.timeline-stem-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .timeline-stem-title,
body[data-theme="cyberpunk"] .timeline-stem-title,
body[data-theme="jungle"] .timeline-stem-title {
  color: #ffffff;
}

.timeline-stem-remove {
  min-width: var(--target); min-height: var(--target);
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  padding: 0 0.2rem;
}

.timeline-stem-remove:hover {
  color: #f43f5e;
}

.timeline-stem-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.5rem;
}

body[data-theme="dark"] .timeline-stem-meta,
body[data-theme="cyberpunk"] .timeline-stem-meta,
body[data-theme="jungle"] .timeline-stem-meta {
  color: #a5b4fc;
}

.timeline-stem-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.timeline-stem-select {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  border: 1.5px solid #0f172a;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.timeline-arrow-bridge {
  font-size: 1.25rem;
  color: #cf0f5c;
  font-weight: 900;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-add-block-btn {
  background: #fef08a;
  border: 2px dashed #0f172a;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #854d0e;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.timeline-add-block-btn:hover {
  transform: translateY(-2px);
  background: #fde047;
}

/* Transmit Button Bar */
.composer-transmit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 2px solid #f1f5f9;
}

.btn-transmit-sentence {
  background: #cf0f5c;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  border: 2.5px solid #0f172a;
  box-shadow: 3.5px 3.5px 0px #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-transmit-sentence:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4.5px 4.5px 0px #0f172a;
}

.btn-transmit-sentence:active {
  transform: translate(2px, 2px);
  box-shadow: 1.5px 1.5px 0px #0f172a;
}

.btn-transmit-sentence.playing {
  background: #047857;
}

/* 🐾 FIELD TEST REACTION LOGGER */
.reaction-logger-box {
  background: #f8fafc;
  border: 2.5px solid #0f172a;
  box-shadow: 3.5px 3.5px 0px #0f172a;
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

body[data-theme="dark"] .reaction-logger-box,
body[data-theme="cyberpunk"] .reaction-logger-box,
body[data-theme="jungle"] .reaction-logger-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border, #52298c);
}

.reaction-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.reaction-category-card {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  border-radius: 10px;
  padding: 0.85rem;
  box-shadow: 2px 2px 0px #0f172a;
}

body[data-theme="dark"] .reaction-category-card,
body[data-theme="cyberpunk"] .reaction-category-card,
body[data-theme="jungle"] .reaction-category-card {
  background: #1e1b4b;
  border-color: #52298c;
}

.reaction-category-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

body[data-theme="dark"] .reaction-category-title,
body[data-theme="cyberpunk"] .reaction-category-title,
body[data-theme="jungle"] .reaction-category-title {
  color: #ffffff;
}

.reaction-chips-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reaction-pill-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

body[data-theme="dark"] .reaction-pill-btn,
body[data-theme="cyberpunk"] .reaction-pill-btn,
body[data-theme="jungle"] .reaction-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.reaction-pill-btn:hover {
  border-color: #0f172a;
  background: #ffffff;
}

.reaction-pill-btn.selected {
  background: #fef08a;
  color: #854d0e;
  border-color: #0f172a;
  box-shadow: 1.5px 1.5px 0px #0f172a;
}

body[data-theme="dark"] .reaction-pill-btn.selected,
body[data-theme="cyberpunk"] .reaction-pill-btn.selected,
body[data-theme="jungle"] .reaction-pill-btn.selected {
  background: #00f0ff;
  color: #0f172a;
  border-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* Field Report Modal & Canvas Container */
.field-report-card-viewport {
  max-width: 600px;
  margin: 0 auto;
  border: 2.5px solid #0f172a;
  box-shadow: 4px 4px 0px #0f172a;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

.field-report-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.timeline-stem-controls + .timeline-stem-controls { margin-top: var(--s-2); }

.timeline-stem-header { cursor: grab; }

/* A disclosure's focus target follows its label, rather than the full scrollable track width. */
.timeline-stem-block summary { width: fit-content; max-width: 100%; }

/* Keep the final sound picker inside the same narrow timeline viewport as its cards. */
.composer-timeline-track > :has(> #quickAddStemSelect) { min-width: 0; max-width: 100%; }
#quickAddStemSelect { max-width: 100%; }
.composer-transmit-bar > div { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.composer-transmit-bar select { max-width: 100%; }
