/* UDXFables: the styles this game adds to FablesCore. */

.ux-persona {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.ux-persona p { margin: 0; }
.ux-persona .ux-name { font-weight: 700; }
.ux-tags { color: var(--muted); font-size: 0.82rem; margin-bottom: 4px !important; }
.ux-goal, .ux-limits { font-size: 0.9rem; }

/* The family's two plain shapes: a round head for a person, a square head for the agent. */
.ux-avatar { position: relative; display: block; width: 40px; height: 44px; }
.ux-avatar::before, .ux-avatar::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); background: var(--accent); }
.ux-avatar::before { top: 0; width: 16px; height: 16px; border-radius: 50%; }
.ux-avatar::after { bottom: 0; width: 26px; height: 22px; clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.ux-agent .ux-avatar::before { border-radius: 2px; }
.ux-agent .ux-avatar::after { clip-path: none; width: 24px; }

.ux-meta { margin: 10px 0 0; color: var(--muted); font-size: 0.85rem; }
.ux-stage { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--ink); font-weight: 600; }
.ux-situation { margin: 8px 0 0; }
.ux-prompt { margin: 10px 0 0; font-weight: 600; }

.ux-artifact, .ux-option pre {
  margin: 0;
  font: 0.88rem/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ux-artifact { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ux-change { margin: 8px 0 0; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--surface); }

.ux-parts, .ux-options { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ux-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ux-option {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ux-part { border-left: 3px solid var(--line); }
.ux-option:hover:not(:disabled) { border-color: var(--accent); }
.ux-option:disabled { cursor: default; }
.ux-option.tried { opacity: 0.6; }
.ux-option.tried > * { text-decoration: line-through; }
.ux-option.is-answer { border: 2px solid var(--good); background: var(--good-soft); opacity: 1; }
.ux-version { font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.ux-option .ux-name { font-weight: 700; }
.ux-small { color: var(--muted); font-size: 0.85rem; }

.ux-cast { margin: 8px 0 0; font-size: 0.88rem; }
.ux-cast summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.ux-cast ul { margin: 6px 0 0; padding-left: 1.2em; }
.ux-cast li { margin-bottom: 4px; }

@media (max-width: 480px) {
  .ux-grid { grid-template-columns: 1fr; }
  .ux-artifact, .ux-option pre { font-size: 0.8rem; }
}

/* Drawn screens: each piece is a button to tap, inside a frame. */
.ux-screen { padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); }
.ux-screen .ux-option { border-style: dashed; }
.ux-look { justify-self: start; overflow-wrap: anywhere; }
.ux-look-title { font: 700 1.15rem/1.2 var(--serif); }
.ux-look-button, .ux-look-icon { padding: 6px 14px; border: 1px solid var(--ink); border-radius: 8px; }
.ux-look-field { min-width: 60%; padding: 6px 10px; border: 1px solid var(--muted); border-radius: 4px; color: var(--muted); }
.ux-look-picture { display: grid; place-items: center; width: 100%; min-height: 64px; padding: 8px; border: 1px solid var(--muted); border-radius: 6px; background: repeating-linear-gradient(45deg, transparent 0 9px, var(--line) 9px 10px); }
.ux-look-link { text-decoration: underline; }
.ux-look-check::before { content: '☐ '; }
.ux-look-menu::after { content: ' ▾'; }

/* Order the journey. */
.ux-step { grid-template-columns: 1.6em 1fr; align-items: center; }
.ux-place { font-weight: 700; color: var(--accent); }
.ux-step.placed { border-color: var(--accent); }
