.problem-entry { display: flex; justify-content: center; padding: 2px; }
/* In the kids' bar this is a quiet escape hatch, not a call to action. */
.bar .problem-entry .btn { min-height:20px; padding:0 6px; font-size:9px; background:transparent; border:0; color:var(--ink-muted,#657369); text-decoration:underline; text-underline-offset:2px; }
.problem-entry .btn {
  position: relative; min-height: 26px; padding: 3px 6px; border-radius: 5px;
  white-space: normal; text-align: center; font-size: 10px; font-weight: 500; line-height: 1.3;
}
/* Keep a forgiving touch target around the smaller visible button. */
.problem-entry .btn::after { content: ''; position: absolute; inset: -11px 0; }
.bar .problem-entry { margin-top: 2px; padding: 0 0 2px; flex-shrink: 0; }
.problem-dialog { margin: auto; width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); color: var(--ink, #1a1c1a); box-shadow: var(--shadow-raised); font-family: Rubik, sans-serif; }
.problem-dialog::backdrop { background: rgba(26,28,26,.35); }
.problem-dialog[open] { display: flex; flex-direction: column; }
.problem-dialog form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.problem-form-body { overflow-y: auto; min-height: 0; padding: 4px; }
.problem-dialog h2 { font-size: 24px; margin: 0 0 8px; }
.problem-dialog h2 span { display: block; font-size: 15px; font-weight: 500; margin-top: 4px; }
.problem-dialog p { font-size: 14px; line-height: 1.7; margin: 8px 0 16px; }
.problem-dialog fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.problem-dialog .field { margin-bottom: 16px; }
.problem-dialog .input { width: 100%; font-size: 16px; }
.problem-dialog textarea { resize: vertical; min-height: 88px; }
.problem-dialog .problem-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.problem-dialog .problem-actions .btn { flex: 1 1 140px; white-space: normal; font-size: 13px; }
.problem-dialog .problem-notice { color: var(--ink-muted); font-size: 12px; }
.problem-dialog .problem-status { padding: 12px; border-radius: 8px; background: var(--c-teal-soft, #e5faf6); overflow-wrap: anywhere; }
.problem-dialog .problem-status:empty { display: none; }
#problemStatus, .problem-actions { flex-shrink: 0; }
.problem-dialog [data-state="error"] { background: var(--c-orange-soft, #fff0e8); }
.problem-dialog summary { cursor: pointer; padding: 8px 0; }
.problem-dialog pre, .problem-log { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 ui-monospace, monospace; text-align: left; direction: ltr; max-height: 50vh; overflow: auto; }
.problem-dialog :focus-visible { outline: 3px solid #7a47ae; outline-offset: 3px; }
@media (max-width: 430px) { .problem-dialog { padding: 20px 16px; } }
