/* History labels use the existing role settings palette and phone typography. */
#history-world-labels-screen { background-color: #f2f2f2; }
#history-world-labels-screen .content { padding: 18px 20px max(24px, env(safe-area-inset-bottom)); }
#history-world-labels-screen :is(button, input, select) { font-family: var(--font-family); }
#history-world-labels-screen [hidden] { display: none !important; }
#history-world-labels-screen .world-labels-card { background: #fff; border-radius: 12px; padding: 15px; margin: 0 0 14px; }
#history-world-labels-screen .world-labels-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
#history-world-labels-screen .world-labels-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #333; font-size: calc(14px * var(--app-font-scale)); }
#history-world-labels-screen .world-labels-world { margin-top: 16px; }
#history-world-labels-screen :is(input, select) { width: 100%; min-width: 0; max-width: 100%; min-height: 40px; border: 1px solid #eee; border-radius: 8px; padding: 8px 10px; color: #333; background: #fff; font-size: calc(14px * var(--app-font-scale)); box-sizing: border-box; }
#history-world-labels-screen .world-labels-note { margin: 8px 0 14px; color: #888; font-size: calc(13px * var(--app-font-scale)); line-height: 1.6; overflow-wrap: anywhere; }
#history-world-labels-screen .world-labels-card > .world-labels-note:last-child { margin-bottom: 0; }
#history-world-labels-screen :is(.world-labels-primary, .world-labels-secondary) { min-height: 40px; border: 0; border-radius: 10px; padding: 10px 14px; font-size: calc(14px * var(--app-font-scale)); color: #435f74; cursor: pointer; }
#history-world-labels-screen .world-labels-primary { width: 100%; background: var(--primary-color); }
#history-world-labels-screen .world-labels-secondary { background: #edf1f4; }
#history-world-labels-screen button:not(:disabled):active { filter: brightness(.94); transform: translateY(1px); }
#history-world-labels-screen button:disabled { opacity: .48; cursor: default; }
#history-world-labels-screen :is(button, input, select):focus-visible { outline: 2px solid #a5c1d6; outline-offset: 2px; }
#history-world-labels-screen .world-labels-total { margin: 0 0 14px; }
#history-world-labels-screen .world-labels-heading { margin: 0 0 12px; font-size: calc(15px * var(--app-font-scale)); font-weight: 500; color: #333; overflow-wrap: anywhere; }
#history-world-labels-screen .world-labels-message { border-top: 1px solid #eee; padding: 12px 0; }
#history-world-labels-screen .world-labels-message:first-child { border-top: 0; padding-top: 0; }
#history-world-labels-screen .world-labels-message:last-child { padding-bottom: 0; }
#history-world-labels-screen .world-labels-message-label { margin: 0 0 6px; color: #888; font-size: calc(12px * var(--app-font-scale)); }
#history-world-labels-screen .world-labels-excerpt { margin: 0; color: #444; white-space: pre-wrap; overflow-wrap: anywhere; font-size: calc(14px * var(--app-font-scale)); line-height: 1.6; }
#history-world-labels-screen .world-labels-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 0; color: #555; font-size: calc(14px * var(--app-font-scale)); }
#history-world-labels-screen .world-labels-counts dd { margin: 0; font-variant-numeric: tabular-nums; }
#history-world-labels-screen .world-labels-counts dt:first-child, #history-world-labels-screen .world-labels-counts dd:nth-child(2) { color: #333; font-weight: 500; }
#history-world-labels-screen .world-labels-conflicts { margin: 0 0 14px; }
#history-world-labels-screen .world-labels-conflicts > summary { min-height: 40px; padding: 10px 0; cursor: pointer; color: #666; font-size: calc(13px * var(--app-font-scale)); }
#history-world-labels-screen .world-labels-conflicts ul { margin: 0; padding: 0; list-style: none; }
#history-world-labels-screen .world-labels-conflicts li { padding: 8px 0; border-top: 1px solid #e6e6e6; font-size: calc(13px * var(--app-font-scale)); line-height: 1.6; color: #666; overflow-wrap: anywhere; }
#history-world-labels-screen progress { display: block; width: 100%; height: 8px; margin: 12px 0; accent-color: #a5c1d6; }
#history-world-labels-screen .world-labels-error { color: #a54c48; }
#history-world-labels-screen .world-labels-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
#history-world-labels-screen .world-labels-actions .world-labels-primary { flex: 1; }
@media (max-width: 340px) { #history-world-labels-screen .content { padding-left: 14px; padding-right: 14px; } }
