#widget-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.widget-label {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text, #1A1A1A);
    background: var(--color-surface, #FFFDF5);
    border: 1px solid var(--color-text, #1A1A1A);
    padding: 4px 12px;
    border-radius: 2px;
    box-shadow: var(--shadow-hard, 2px 2px 0 #1A1A1A);
    white-space: nowrap;
    will-change: transform, opacity;
    transition: opacity 150ms ease-out;
}

/* Pinned variant (authored via altsel labels: block). Stays visible
   regardless of cursor proximity; carries student-facing copy that
   distinguishes otherwise-identical instances. */
.widget-label--pinned {
    font-size: 12px;
    padding: 3px 10px;
}

/* Temperature-coded variants. Reuse pour-fluid palette so a "Warm Water
   50°C" badge reads the same temperature cue as the orange liquid that
   pours out of the same container. No red — students read red as error
   (feedback_no_red_ui.md). */
.widget-label--warm {
    background: var(--color-pour-warm, #E07A2A);
    color: #fff;
    border-color: var(--color-pour-warm, #E07A2A);
}

.widget-label--cool {
    background: var(--color-pour-cold, #1E5DA8);
    color: #fff;
    border-color: var(--color-pour-cold, #1E5DA8);
}

/* Temperature reading inside a label (75°C, −10 °F, …). LabelHandler
   wraps any matching substring at render time. Red is the
   instrument-reading colour here — a thermometer / mercury convention,
   not a UI accent — so the no-red-UI rule (feedback_no_red_ui.md) doesn't
   apply: chrome and buttons stay non-red, only the digits glow. */
.widget-label__temp {
    color: var(--color-error, #B23A2A);
    font-weight: 700;
}

/* Contents chip — always-on screen-space label above a container,
   showing the authored identity of its liquid contents and any hazard
   pictograms. Owned by ContentsChipHandler. Sibling of the hover
   .widget-label; orthogonal lifecycle. See
   galileo_viewer_kit/journal/007/2026-05-13_16_contents_label_chips.md. */
.contents-chip {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 10px;
    background: var(--color-surface, #FFFDF5);
    border: 1px solid var(--color-text, #1A1A1A);
    border-radius: 2px;
    box-shadow: var(--shadow-hard, 2px 2px 0 #1A1A1A);
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text, #1A1A1A);
    white-space: nowrap;
    will-change: transform, opacity;
    transition: opacity 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.contents-chip__hazards {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Hazardless chip: collapse the empty span so the flex gap doesn't reserve
   space ahead of the label. */
.contents-chip__hazards:empty {
    display: none;
}

.contents-chip__hazard {
    display: inline-flex;
    width: 14px;
    height: 14px;
}

.contents-chip__hazard svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Out-of-focus chip — chip-level recede: light frame, no shadow, gray
   text. The hazard badge stays at full strength because its SVG uses
   explicit fill colours, not currentColor — safety override holds by
   construction. */
.contents-chip--dimmed {
    border-color: rgba(26, 26, 26, 0.20);
    box-shadow: none;
    color: var(--color-text-tertiary, #6A695F);
}
