/* --- Reset & Base --------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: #f5f5f5;
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Icon btn, dialog, settings, and email error styles are in shared/settings.css */

/* --- Main ----------------------------------------------------------------- */

#app-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--btn-radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-primary-dark);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover:not(:disabled) {
  background: #d0d0d0;
}

.btn-ghost {
  background: transparent;
  color: #666;
  border: 1px solid #ccc;
}

.btn-ghost:hover {
  background: #eee;
}

.btn-danger {
  background: #e53935;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #c62828;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.btn-success {
  background: #43a047;
  color: white;
  border: 1px solid #2e7d32;
}

.btn-success:hover:not(:disabled) {
  background: #2e7d32;
}

/* --- Pack Sections -------------------------------------------------------- */

.pack-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* --- Tabs ----------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.tab {
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: white;
  font-size: 0.8rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  background: #f0f0f0;
}

.tab.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

/* --- Pack Cards ----------------------------------------------------------- */

.pack-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e8e8e8;
  border-left: 4px solid #bdbdbd;
  position: relative;
}

.pack-card[data-pack-type="public"] {
  border-left-color: #00897b;
}

.pack-card[data-pack-type="shared"] {
  border-left-color: #3f51b5;
}

.pack-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pack-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.pack-card .meta {
  font-size: 0.8rem;
  color: #888;
}


.pack-card .shared-icon {
  color: #3f51b5;
  cursor: default;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.pack-card .shared-icon .shared-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  font-size: 0.75rem;
  font-weight: 400;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.pack-card .shared-icon:hover .shared-tooltip {
  display: block;
}

.pack-card .actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.pack-card:hover .actions {
  opacity: 1;
  pointer-events: auto;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.action-btn:hover {
  background: #f0f0f0;
}

.action-edit:hover    { color: #1565c0; background: #e3f2fd; }
.action-publish:hover { color: #2e7d32; background: #e8f5e9; }
.action-draft:hover   { color: #e65100; background: #fff3e0; }
.action-globe:hover   { color: var(--brand-primary-dark); background: var(--brand-primary-light); }
.action-lock:hover    { color: #6a1b9a; background: #f3e5f5; }
.action-delete:hover  { color: #c62828; background: #fce4ec; }

.pack-card-disabled {
  opacity: 0.55;
  border-style: dashed;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-draft {
  background: #fff3e0;
  color: #e65100;
}

.badge-published {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-admin {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-public {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}

.badge-review {
  background: #fce4ec;
  color: #c62828;
}

.badge-disabled {
  background: #fce4ec;
  color: #b71c1c;
}

.placeholder {
  color: #999;
  font-style: italic;
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
}

/* --- Creator View --------------------------------------------------------- */

/* .hidden is in shared/settings.css */

#creator-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 108px);
}

.creator-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.creator-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.creator-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.panel-add-signs {
  flex: 1;
  min-height: 0;
}

.creator-details {
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.creator-details-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
}

.creator-details-header:hover {
  background: #f8f8f8;
  border-radius: 8px;
}

.details-preview {
  color: #888;
  font-size: 0.85rem;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.creator-details-body {
  padding: 12px 16px 16px;
  border-top: 1px solid #eee;
}

.field-row {
  margin-bottom: 10px;
}

.field-row:last-child {
  margin-bottom: 0;
}

.field-row > label,
.field-row > .field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.field-row-inline {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.field-inline-group {
  display: flex;
  flex-direction: column;
}

.field-inline-group > label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

#pack-name-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.875rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
  font-family: var(--font-family);
}

#pack-name-input:focus {
  border-color: var(--brand-primary);
}

#pack-desc-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.875rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-family);
  outline: none;
}

#pack-desc-input:focus {
  border-color: var(--brand-primary);
}

/* --- Icon picker --------------------------------------------------------- */

.icon-picker {
  position: relative;
  display: inline-block;
}

.icon-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--font-family);
  color: #333;
  transition: border-color 0.15s;
}

.icon-picker-btn:hover {
  border-color: #bbb;
}

.icon-picker-caret {
  font-size: 0.7rem;
  color: #999;
}

.icon-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 50;
  padding: 8px;
  min-width: 220px;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.icon-preset {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  line-height: 1;
  transition: background 0.1s;
}

.icon-preset:hover {
  background: #f0f0f0;
  border-color: #ddd;
}

.icon-picker-custom {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.icon-picker-custom input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.875rem;
  outline: none;
}

.icon-picker-custom input:focus {
  border-color: var(--brand-primary);
}

/* --- Creator options ----------------------------------------------------- */

.creator-options {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}

.creator-options label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.creator-options select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
}

.panel {
  background: white;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

#word-search {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}

.category-search-row {
  padding: 8px 16px;
  border-bottom: 1px solid #f0f0f0;
}

#word-search:focus {
  border-color: var(--brand-primary);
}

/* --- Add Signs sections --------------------------------------------------- */

.add-signs-body {
  flex: 1;
  overflow-y: auto;
}

.add-section {
  border-bottom: 1px solid #f0f0f0;
}

.add-section:last-child {
  border-bottom: none;
}

.add-section-header {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  user-select: none;
}

.add-section-header:hover {
  background: #f8f8f8;
}

.add-section-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Category list (left panel) ------------------------------------------- */

.category-list {
  overflow-y: auto;
  flex: 1;
}

.cat-item {
  border-bottom: 1px solid #f0f0f0;
}

.cat-header {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-size: 0.9rem;
}

.cat-header:hover {
  background: #f8f8f8;
}

.cat-header .arrow {
  font-size: 0.7rem;
  color: #999;
  transition: transform 0.15s;
}

.cat-header.expanded .arrow {
  transform: rotate(90deg);
}

.cat-words {
  display: none;
  padding: 0 16px 8px 16px;
}

.cat-words.expanded {
  display: block;
}

.word-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.85rem;
  cursor: pointer;
}

.word-item:hover {
  color: var(--brand-primary);
}

.word-item input[type="checkbox"] {
  accent-color: var(--brand-primary);
}

.word-item.selected {
  font-weight: 600;
  color: var(--brand-primary);
}

.cat-count {
  font-size: 0.75rem;
  color: #999;
}

/* --- Search results ------------------------------------------------------- */

.search-results {
  padding: 8px 16px;
  border-bottom: 1px solid #eee;
  max-height: 300px;
  overflow-y: auto;
  background: #fafafa;
}

.search-results .result-group {
  margin-bottom: 8px;
}

.search-results .result-group-title {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.search-results .synonym-hint {
  font-size: 0.8rem;
  color: #e65100;
  font-style: italic;
  margin-bottom: 4px;
}

/* --- Pack Contents (swatch view) ------------------------------------------ */

.selected-words {
  overflow-y: auto;
  flex: 1;
  padding: 12px 16px;
}

.pack-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pack-swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 500;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  cursor: default;
}

.pack-swatch .pack-swatch-cat {
  font-size: 0.7rem;
  color: #aaa;
  font-weight: 400;
}

.pack-swatch .swatch-remove {
  margin-left: 2px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  font-weight: 700;
}

.pack-swatch:hover .swatch-remove {
  opacity: 0.5;
}

.pack-swatch .swatch-remove:hover {
  opacity: 1;
  color: #c62828;
}

.pack-swatch-point {
  background: #fed7d7;
  color: #c53030;
  border-color: #fc8181;
}

.pack-swatch-index {
  background: #c6f6d5;
  color: #276749;
  border-color: #68d391;
}

/* --- Sentence group in Pack Contents ------------------------------------- */

.pack-sentence-group {
  border-left: 3px solid var(--brand-primary);
  padding: 8px 0 8px 12px;
  margin-bottom: 12px;
}

.pack-sentence-label {
  font-size: 0.78rem;
  color: #555;
  font-style: italic;
  margin-bottom: 4px;
}

.pack-sentence-gloss {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 6px;
}

/* --- Category group in Pack Contents ------------------------------------- */

.pack-category-group {
  border-left: 3px solid #78909c;
  padding: 8px 0 8px 12px;
  margin-bottom: 12px;
}

.pack-category-label {
  font-size: 0.78rem;
  color: #78909c;
  font-weight: 500;
  margin-bottom: 6px;
}

/* --- Category swatch drag-and-drop --------------------------------------- */

.pack-swatch[draggable="true"] {
  cursor: grab;
}

.pack-swatch[draggable="true"]:active {
  cursor: grabbing;
}

.pack-swatch-dragging {
  opacity: 0.4;
}

.pack-swatch-drop-left {
  box-shadow: -3px 0 0 0 #78909c;
}

.pack-swatch-drop-right {
  box-shadow: 3px 0 0 0 #78909c;
}

/* Toast styles are in shared/settings.css */

/* --- Overlay -------------------------------------------------------------- */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.overlay-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Sentence Builder ----------------------------------------------------- */

.sentence-toggle-arrow {
  font-size: 0.7rem;
  color: #999;
  transition: transform 0.15s;
}

.sentence-toggle-arrow.expanded {
  transform: rotate(90deg);
}

.sentence-body {
  padding: 0 16px 16px;
}

.sentence-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sentence-input-row textarea {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.sentence-input-row textarea:focus {
  border-color: var(--brand-primary);
}

.sentence-error {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fce4ec;
  color: #c62828;
  border-radius: 6px;
  font-size: 0.85rem;
}

.gloss-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 0;
}

.sentence-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sentence-actions-right {
  display: flex;
  gap: 8px;
}

.annotation-buttons {
  display: flex;
  gap: 6px;
}

.btn-annotation-point {
  background: #fed7d7;
  color: #c53030;
  border: 1px solid #fc8181;
}

.btn-annotation-point:hover {
  background: #feb2b2;
}

.btn-annotation-index {
  background: #c6f6d5;
  color: #276749;
  border: 1px solid #68d391;
}

.btn-annotation-index:hover {
  background: #9ae6b4;
}

/* --- Swatch chips --------------------------------------------------------- */

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: default;
  position: relative;
  border: 1.5px solid transparent;
}

.swatch-resolved {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}

.swatch-resolved.swatch-has-alts {
  cursor: pointer;
}

.swatch-resolved.swatch-has-alts:hover {
  background: #c8e6c9;
}

.swatch-multi {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
  cursor: pointer;
}

.swatch-multi:hover {
  background: #bbdefb;
}

.swatch-synonym {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
  cursor: pointer;
}

.swatch-synonym:hover {
  background: #ffe0b2;
}

.swatch-fingerspell {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #ce93d8;
}

.swatch-notfound {
  background: #fce4ec;
  color: #c62828;
  border-color: #ef9a9a;
  text-decoration: line-through;
}

.swatch-annotation-point {
  background: #fed7d7;
  color: #c53030;
  border-color: #fc8181;
}

.swatch-annotation-index {
  background: #c6f6d5;
  color: #276749;
  border-color: #68d391;
}

.swatch .swatch-cat {
  font-size: 0.7rem;
  color: #888;
  font-weight: 400;
}

.swatch .swatch-indicator {
  font-size: 0.75rem;
  margin-left: 2px;
}

.swatch[draggable="true"] {
  cursor: grab;
}

.swatch[draggable="true"]:active {
  cursor: grabbing;
}

.swatch-dragging {
  opacity: 0.4;
}

.swatch-drop-left {
  box-shadow: -3px 0 0 0 var(--brand-primary);
}

.swatch-drop-right {
  box-shadow: 3px 0 0 0 var(--brand-primary);
}

.swatch .swatch-remove {
  margin-left: 4px;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  font-weight: 700;
}

.swatch:hover .swatch-remove {
  opacity: 0.5;
}

.swatch .swatch-remove:hover {
  opacity: 1;
  color: #c62828;
}

/* --- Swatch dropdown ------------------------------------------------------ */

.swatch-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 50;
  min-width: 180px;
  max-height: 200px;
  overflow-y: auto;
}

.swatch-dropdown-item {
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.swatch-dropdown-item:hover {
  background: #f0f0f0;
}

.swatch-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.swatch-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.swatch-dropdown-cat {
  font-size: 0.75rem;
  color: #999;
}

.swatch-dropdown-divider {
  border-top: 1px solid #eee;
  margin: 4px 0;
}

.swatch-dropdown-findmore {
  color: #888;
  font-style: italic;
  font-size: 0.8rem;
}

.swatch-dropdown-findmore:hover {
  color: var(--brand-primary, #4caf50);
}

.swatch-dropdown-revert {
  color: #888;
  font-size: 0.8rem;
}

.swatch-dropdown-revert:hover {
  color: var(--brand-primary, #4caf50);
}

/* --- Block-based Pack Contents --- */

.block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-card {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: #fafafa;
}

.block-card:hover {
  border-color: #c5cae9;
}

.block-selected {
  border-color: #3f51b5;
  background: #e8eaf6;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.block-drag {
  cursor: grab;
  color: #999;
  font-size: 14px;
  user-select: none;
  flex-shrink: 0;
}

.block-title-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  padding: 2px 4px;
  border-radius: 4px;
}

.block-title-input:focus {
  background: #fff;
  outline: 1px solid #3f51b5;
}

.block-title-input::placeholder {
  color: #bbb;
  font-weight: 400;
}

.block-delete-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.block-delete-btn:hover {
  color: #d32f2f;
}

.block-desc-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #666;
  padding: 2px 4px;
  border-radius: 4px;
  margin-bottom: 4px;
  box-sizing: border-box;
}

.block-desc-input:focus {
  background: #fff;
  outline: 1px solid #3f51b5;
}

.block-desc-input::placeholder {
  color: #bbb;
}

.block-desc-preview {
  font-size: 11px;
  color: #888;
  padding: 0 4px;
  margin-bottom: 4px;
}

.block-sentence-text {
  font-size: 12px;
  color: #555;
  font-style: italic;
  padding: 2px 4px;
}

.block-gloss-text {
  font-size: 11px;
  color: #999;
  padding: 2px 4px;
  margin-bottom: 4px;
}

.block-type-label {
  font-size: 10px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  padding: 0 4px;
}

.block-add-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-add-block {
  flex: 1;
  padding: 8px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: transparent;
  color: #999;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-add-block:hover {
  border-color: #3f51b5;
  color: #3f51b5;
}

/* Block drag-and-drop */
.block-dragging {
  opacity: 0.5;
}

.block-drop-before {
  border-top: 3px solid #3f51b5 !important;
}

.block-drop-after {
  border-bottom: 3px solid #3f51b5 !important;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 768px) {
  .creator-main {
    grid-template-columns: 1fr;
  }

  .panel {
    max-height: 50vh;
  }

  #creator-view {
    height: auto;
  }

  /* .header-email-chip responsive handled in shared/settings.css */
}
