#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: 14px;
    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: 6px 14px;
    border-radius: 6px;
    box-shadow: var(--shadow-scene, 4px 4px 0 rgba(26, 26, 26, 0.18));
    white-space: nowrap;
    will-change: transform, opacity;
    transition: opacity 150ms ease-out;
}

.contents-chip {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #FFFDF5;
    white-space: normal;
    will-change: transform, opacity;
    transition: opacity 150ms ease-out, color 150ms ease-out;
}
.contents-chip:not(.contents-chip--active) {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-width: 7em;
    text-align: center;
}
.contents-chip:not(.contents-chip--active) .contents-chip__hazards {
    justify-content: center;
}
.contents-chip__text {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.60),
        0 0 6px rgba(0, 0, 0, 0.40),
        0 0 1px rgba(0, 0, 0, 0.85);
}

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

.contents-chip__hazards:empty {
    display: none;
}

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

.contents-chip__hazard svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.contents-chip__haz-word {
    font-weight: 700;
    font-size: 9px;
    letter-spacing: 0.01em;
    line-height: 1;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.60),
        0 0 6px rgba(0, 0, 0, 0.40),
        0 0 1px rgba(0, 0, 0, 0.85);
}
.contents-chip:not(.contents-chip--active) .contents-chip__hazard--physical { display: none; }
.contents-chip--active .contents-chip__haz-word { display: none; }
.contents-chip--active .contents-chip__hazards:not(:has(.contents-chip__hazard)) { display: none; }

.contents-chip--active {
    background: var(--color-surface, #FFFDF5);
    color: var(--color-text, #1A1A1A);
    border: 1px solid var(--color-text, #1A1A1A);
    border-radius: 6px;
    box-shadow: var(--shadow-scene, 4px 4px 0 rgba(26, 26, 26, 0.18));
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    padding: 6px 14px;
    white-space: nowrap;
    z-index: 1;
}
.contents-chip--active .contents-chip__text {
    max-width: none;
    text-shadow: none;
}
.contents-chip--active .contents-chip__hazard {
    width: 14px;
    height: 14px;
}
.contents-chip--active .contents-chip__hazard svg {
    filter: none;
}
