/* Timmy Settings — static platform configuration surface (UI foundation).
   Scope: .ts-* only. Matches the light workspace surface used by the TS01 /
   platform administration frames. */

.ts-settings {
  box-sizing: border-box;
  height: 100%;
  padding: 14px 16px 20px;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
  color: #0f172a;
  font-size: 13px;
  overflow-x: hidden;
  overflow-y: auto;
}

.ts-settings *,
.ts-settings *::before,
.ts-settings *::after {
  box-sizing: border-box;
}

/* ---- Header ---- */
.ts-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ts-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
}

.ts-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.ts-lead {
  margin: 6px 0 0;
  max-width: 760px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
}

.ts-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

/* ---- Layout: main column + sticky preview ---- */
.ts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.ts-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ts-side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ---- Preview ---- */
.ts-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ts-preview-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ts-preview-meta {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #475569;
}

.ts-preview-meta strong {
  color: #0f172a;
}

.ts-preview .ts-preview-cta {
  cursor: default;
  opacity: 0.65;
}

.ts-side-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 9px 11px;
}

/* ---- Cards ---- */
.ts-card {
  padding: 14px 16px 16px;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ts-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ts-card-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #334155;
}

.ts-card-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px 8px;
}

.ts-card-hint {
  margin: 6px 0 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #64748b;
}

/* ---- Identity / character choices ---- */
.ts-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ts-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.ts-choice:hover {
  border-color: #bfdbfe;
  background: #f8fafc;
}

.ts-choice.is-active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  background: #eff6ff;
}

.ts-choice-face .tc-face {
  display: block;
  width: 46px;
  height: 46px;
}

.ts-choice-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.ts-choice-hint {
  font-size: 10.5px;
  color: #94a3b8;
}

/* ---- Emotion / expression library ---- */
.ts-emotions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.ts-emotion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

.ts-emotion:hover {
  border-color: #bfdbfe;
  background: #f8fafc;
}

.ts-emotion.is-active {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
  background: #eff6ff;
}

.ts-emotion-face .tc-face {
  display: block;
  width: 54px;
  height: 54px;
}

.ts-emotion-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}

.ts-emotion-default {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 1px 6px;
}

/* ---- Asset management ---- */
.ts-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.ts-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  text-align: center;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
}

.ts-upload-icon {
  font-size: 18px;
  color: #2563eb;
}

.ts-upload-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.ts-upload-hint {
  font-size: 10.5px;
  color: #94a3b8;
}

.ts-upload-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: #475569;
}

.ts-upload-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ts-upload-badge {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 1px 7px;
}

/* ---- UI-foundation honesty markers ---------------------------------------
   Controls that are conceptual only must not look operational. These styles
   mark future / non-persisted areas without changing the page design. */

/* Section-level marker for wholly non-operational cards. */
.ts-static-chip {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Disabled placeholders read as muted, not editable. */
.ts-select:disabled,
.ts-input:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* Upload zone as a future governed operation (not yet available). */
.ts-upload-zone--future {
  background: repeating-linear-gradient(
    135deg,
    #f8fafc 0,
    #f8fafc 8px,
    #eef2f8 8px,
    #eef2f8 16px
  );
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.ts-upload-zone--future .ts-upload-icon {
  color: #94a3b8;
}

.ts-upload-zone--future .ts-upload-hint {
  color: #b4bcc8;
}

.ts-upload-flag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 1px 7px;
}

.ts-upload-state {
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
}

.ts-table-wrap {
  overflow-x: auto;
}

.ts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #1e293b;
}

.ts-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e5e9f0;
  white-space: nowrap;
}

.ts-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  vertical-align: middle;
}

.ts-table tbody tr:last-child > td {
  border-bottom: none;
}

.ts-asset-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-asset-thumb .tc-face {
  display: block;
  width: 30px;
  height: 30px;
}

.ts-asset-thumb--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.ts-asset-name {
  font-weight: 600;
  color: #0f172a;
}

.ts-state-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #10b981;
}

.ts-version {
  font-size: 11px;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 6px;
}

.ts-asset-rev {
  color: #94a3b8;
  white-space: nowrap;
}

/* ---- Display / interaction fields ---- */
.ts-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ts-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ts-field-wide {
  grid-column: 1 / -1;
}

.ts-field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ts-input,
.ts-select {
  font: inherit;
  font-size: 12.5px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 7px 9px;
  width: 100%;
}

.ts-segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: fit-content;
}

.ts-size {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 5px 14px;
  cursor: pointer;
}

.ts-size.is-active {
  color: #ffffff;
  background: #2563eb;
}

.ts-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.ts-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-checks input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .ts-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ts-side {
    position: static;
  }

  .ts-choice-face .tc-face {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 720px) {
  .ts-settings {
    padding: 12px 12px 18px;
  }

  .ts-choices,
  .ts-fields,
  .ts-upload {
    grid-template-columns: minmax(0, 1fr);
  }

  .ts-emotions {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
}
