:root {
    --timer-danger: #fb7185;
    --timer-success: #34d399;
    --timer-warning: #f59e0b;
    --timer-imminent: #f43f5e;
}

[hidden] { display: none !important; }

.timer-feature-summary,
.room-quick-summary {
    border: 1px solid #5b21b6;
    border-radius: 18px;
    background: linear-gradient(135deg, #21143de8, #0f172ae8 70%);
    box-shadow: 0 15px 45px #02061755;
}
.timer-feature-summary { margin: -10px 0 24px; padding: 17px 20px; text-align: center; }
.timer-feature-summary strong,
.room-quick-summary strong { color: #ddd6fe; font-size: .9rem; }
.timer-feature-summary p,
.room-quick-summary p { margin: 5px 0 0; color: #f8fafc; font-weight: 800; line-height: 1.5; }
.room-quick-summary p { font-size: .9rem; }
.timer-feature-summary ul,
.room-quick-summary ul { margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; list-style: none; }
.timer-feature-summary li,
.room-quick-summary li { padding: 5px 9px; border: 1px solid #475569; border-radius: 999px; background: #0f172a; color: #cbd5e1; font-size: .72rem; font-weight: 800; }
.room-quick-summary { margin-top: 18px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.room-quick-summary ul { flex: 0 1 390px; justify-content: flex-end; margin-top: 0; }

.room-tool-dock {
    position: fixed;
    z-index: 8;
    top: 50%;
    right: max(12px, calc((100vw - 1050px) / 2 - 150px));
    width: 136px;
    padding: 10px;
    display: grid;
    gap: 7px;
    transform: translateY(-50%);
    border: 1px solid #475569;
    border-radius: 18px;
    background: #0b1220f2;
    box-shadow: 0 18px 50px #020617b8;
    backdrop-filter: blur(12px);
}
.room-tool-dock > strong { padding: 2px 4px 5px; color: #94a3b8; font-size: .69rem; letter-spacing: .08em; text-align: center; }
.room-tool-dock button { min-height: 39px; padding: 8px 7px; font-size: .72rem; line-height: 1.15; }
.room-tool-dock button span { display: inline-block; margin-right: 3px; }
.room-tool-dock label { display: grid; gap: 5px; color: #cbd5e1; font-size: .68rem; font-weight: 800; }
.room-tool-dock select { padding: 7px 5px; font-size: .68rem; }
.room-tool-dock button.danger { border-color: #9f1239; background: #4c0519; color: #fecdd3; }

.timer-lobby {
    max-width: 900px;
    margin: 38px auto 22px;
    padding: 24px;
    border: 1px solid #4338ca;
    border-radius: 24px;
    background: linear-gradient(145deg, #111827f5, #0b1020f5);
    box-shadow: 0 24px 70px #02061780;
}
.timer-lobby-head { display: flex; justify-content: space-between; align-items: end; gap: 22px; }
.timer-lobby-head h2 { margin: 5px 0 7px; font-size: clamp(1.55rem, 4vw, 2.15rem); }
.timer-lobby-head p { max-width: 520px; margin: 0; color: #94a3b8; line-height: 1.55; }
.lobby-eyebrow { color: #a78bfa; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.lobby-tools { flex: 0 1 300px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.lobby-tools label { display: grid; gap: 6px; color: #cbd5e1; font-size: .75rem; font-weight: 800; }
.lobby-tools input { min-width: 0; padding: 10px 11px; }
.lobby-tools button { padding: 10px 11px; white-space: nowrap; }
.lobby-section { margin-top: 24px; }
.lobby-section.owned { margin-top: 20px; padding: 16px; border: 1px solid #6d28d9; border-radius: 18px; background: #2e106533; }
.lobby-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lobby-section-title strong { color: #e2e8f0; }
.lobby-section-title span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #1e293b; color: #cbd5e1; font-size: .72rem; text-align: center; }
.lobby-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.lobby-section.owned .lobby-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lobby-room-card { min-width: 0; padding: 16px; border: 1px solid #334155; border-radius: 17px; background: #0f172a; transition: transform .18s, border-color .18s; }
.lobby-room-card:hover { transform: translateY(-1px); border-color: #64748b; }
.lobby-room-card.mine { border-color: #7c3aed; background: linear-gradient(140deg, #2e106566, #0f172a 70%); }
.lobby-room-card.full { opacity: .72; }
.lobby-room-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lobby-room-top h3 { min-width: 0; margin: 0; overflow: hidden; color: #f8fafc; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.lobby-room-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.lobby-badge { padding: 4px 7px; border-radius: 999px; background: #1e293b; color: #cbd5e1; font-size: .68rem; font-weight: 800; }
.lobby-badge.mine { background: #6d28d9; color: #fff; }
.lobby-badge.active { background: #064e3b; color: #a7f3d0; }
.lobby-badge.waiting { background: #172033; color: #94a3b8; }
.lobby-badge.full { background: #4c0519; color: #fecdd3; }
.lobby-room-card > p { margin: 11px 0 14px; color: #94a3b8; font-size: .78rem; }
.lobby-room-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.lobby-room-actions button:only-child { grid-column: 1 / -1; }
.lobby-delete-room { border-color: #881337; color: #fda4af; background: #4c051955; }
.lobby-more { display: block; min-width: 180px; margin: 15px auto 0; }
.lobby-empty { padding: 28px 16px; display: grid; gap: 6px; border: 1px dashed #334155; border-radius: 16px; color: #94a3b8; text-align: center; }
.lobby-empty strong { color: #cbd5e1; }
.lobby-status { min-height: 1.2em; margin: 15px 0 0; color: #64748b; font-size: .75rem; text-align: center; }
.lobby-join-card h2 { margin: 0; }
.lobby-join-card label { display: grid; gap: 7px; color: #cbd5e1; font-weight: 800; }
.modal-copy { margin: 0; color: #94a3b8; line-height: 1.5; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.remote-pair-modal { z-index: 60; }
.remote-pair-card { width: min(430px, 94vw); text-align: center; }
.remote-pair-card p { margin: 0; color: #cbd5e1; }
.remote-pair-card > img { width: min(300px, 76vw); height: auto; margin: 0 auto; padding: 8px; border-radius: 16px; background: #fff; }
.remote-pair-card > small { color: #fbbf24; }
.remote-pair-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.remote-pair-actions a { justify-content: center; }
.remote-pair-actions #closeRemotePair { grid-column: 1/-1; }
.remote-control-status { align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 1px solid #166534; border-radius: 13px; background: #052e16; color: #dcfce7; }
.remote-control-status:not([hidden]) { display: flex; }
.remote-control-status span { flex: 1; }
.remote-control-status button { color: #fecaca; }
.participant button.remote-grant { border-color: #166534; color: #bbf7d0; background: #052e16; }
.participant button.remote-revoke { border-color: #991b1b; color: #fecaca; background: #450a0a; }
.participant .remote-badge { color: #86efac; font-size: .7rem; font-weight: 900; }

.join-card small,
.form-hint {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 500;
}

.connection-status { color: #fbbf24; }
.connection-status.connected { color: var(--timer-success); }
.connection-status.disconnected { color: var(--timer-danger); }

.hunt-panel,
.timer-composer,
.next-alert {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #0f172ae8;
}

.hunt-panel {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(230px, 1fr) minmax(210px, .8fr) auto;
    gap: 20px;
    align-items: center;
    margin-top: 16px;
    padding: 20px;
}

.hunt-clock { display: grid; gap: 7px; }
.hunt-clock span { color: var(--muted); font-size: .88rem; }
.hunt-clock small { color: #a7f3d0; font-weight: 700; }
.hunt-clock strong {
    color: #ddd6fe;
    font: 800 clamp(2rem, 5vw, 3.1rem)/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .03em;
}
.hunt-remaining strong { font-size: clamp(1.45rem, 3.4vw, 2.2rem); }
.hunt-remaining progress { width: 100%; height: 8px; accent-color: var(--accent); }
.hunt-actions { display: grid; gap: 8px; min-width: 138px; }
.hunt-settings { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.hunt-settings label { display: grid; gap: 6px; color: var(--muted); font-size: .82rem; }

.next-alert {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 18px;
    border-color: #be123c;
    background: #4c101ce8;
}
.next-alert[hidden] { display: none; }
.next-alert span,
.next-alert small { color: #fecdd3; }
.next-alert b { font: 800 1.35rem/1 ui-monospace, monospace; }

.timer-color-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 13px;
    margin-top: 10px;
    padding: 0 4px;
    color: var(--muted);
    font-size: .75rem;
}
.timer-color-guide span { display: inline-flex; align-items: center; gap: 6px; }
.timer-color-guide i { width: 9px; height: 9px; border-radius: 999px; background: #8b5cf6; box-shadow: 0 0 8px #8b5cf688; }
.timer-color-guide .guide-warning i { background: var(--timer-warning); box-shadow: 0 0 8px #f59e0b99; }
.timer-color-guide .guide-imminent i { background: var(--timer-imminent); box-shadow: 0 0 8px #f43f5eaa; }
.timer-color-guide .guide-alerting i { background: #fff; box-shadow: 0 0 0 3px #ef4444, 0 0 12px #ef4444; }
.timer-color-guide.disabled { opacity: .42; filter: grayscale(1); }
.timer-color-guide.disabled::after { content: "사용자 설정으로 시각 강조 꺼짐"; color: #cbd5e1; font-weight: 800; }

.timer-composer { margin-top: 16px; padding: 20px; }
.composer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.composer-head strong { font-size: 1.15rem; }
.composer-head p { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.composer-tabs { display: flex; gap: 7px; padding: 4px; border-radius: 13px; background: #070d19; }
.composer-tabs button { padding: 8px 13px; border-color: transparent; background: transparent; }
.composer-tabs button.active { border-color: #8b5cf6; background: #6d28d9; }

.timer-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) minmax(140px, .7fr) minmax(155px, .75fr) minmax(210px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}
.timer-form[hidden] { display: none; }
.timer-form label { display: grid; gap: 7px; color: #cbd5e1; font-size: .84rem; font-weight: 700; }
.timer-form .wide { min-width: 180px; }
.skill-picker { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: end; }
.skill-picker img,
.timer-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid #475569;
    border-radius: 12px;
    padding: 5px;
    background: #070d19;
}
.sound-picker { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: end; }
.sound-picker[hidden] { display: none; }
.sound-picker button { padding-inline: 10px; white-space: nowrap; }
.timer-form .repeat { display: inline-flex !important; align-items: center; align-self: center; gap: 8px; min-height: 42px; white-space: nowrap; line-height: 1.2; font-size: .88rem; }
.timer-form .repeat input { width: 20px; height: 20px; min-width: 20px; margin: 0; flex: 0 0 20px; accent-color: #8b5cf6; }
.register-button { min-height: 44px; }
.timer-form .form-hint { grid-column: 1/-1; margin: 0; }
.duration-fields { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(72px, 1fr)); gap: 8px; }
.duration-fields legend { margin-bottom: 7px; color: #cbd5e1; font-size: .78rem; font-weight: 800; }
.duration-fields label { gap: 5px; font-size: .72rem; }
.room-preset-panel { margin-top: 16px; padding: 14px; display: grid; grid-template-columns: minmax(250px, 1.4fr) minmax(155px, .55fr) minmax(190px, .7fr) auto; align-items: end; gap: 12px; border: 1px solid #4c1d95; border-radius: 15px; background: linear-gradient(135deg, #15102a, #0b1220); }
.room-preset-copy { align-self: center; }
.room-preset-copy strong { color: #e9d5ff; font-size: .95rem; }
.room-preset-copy p { margin: 5px 0 0; color: #aebbd0; font-size: .76rem; line-height: 1.45; }
.room-preset-panel label { display: grid; gap: 7px; color: #cbd5e1; font-size: .8rem; font-weight: 800; }
.room-preset-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.room-preset-actions button { min-height: 42px; padding: 9px 11px; white-space: nowrap; }
.room-preset-panel .form-hint { grid-column: 1/-1; margin: -2px 0 0; }
.timer-composer > .error { margin-bottom: 0; }

.timer-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.timer-card { position: relative; overflow: hidden; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.timer-card::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: transparent; }
.timer-card.running::after { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.timer-card.warning { border-color: #f59e0b; background: linear-gradient(150deg, #2d210f, #111827 72%); box-shadow: 0 0 24px #f59e0b24; }
.timer-card.warning::after { background: #f59e0b; }
.timer-card.imminent { border-color: #fb7185; background: linear-gradient(150deg, #3b111b, #111827 72%); box-shadow: 0 0 30px #f43f5e38; }
.timer-card.imminent::after { background: #f43f5e; }
.timer-card.alerting { border: 2px solid #fca5a5; background: #4b0d17; animation: timer-alert-pulse .9s ease-in-out infinite; }
.timer-card.alerting::after { height: 5px; background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444); }
.timer-card.done { border-color: #be123c; background: linear-gradient(150deg, #2b1017, #111827 72%); }
.timer-card.idle { opacity: .86; }
.timer-card-head { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.timer-card-head h2 { margin: 0 0 5px; font-size: 1.1rem; }
.timer-card-head p { margin: 0; color: var(--muted); font-size: .78rem; }
.timer-title { min-width: 0; }
.timer-state-badge { display: inline-flex; align-items: center; min-height: 22px; margin-top: 7px; padding: 3px 8px; border: 1px solid #475569; border-radius: 999px; color: #cbd5e1; background: #0f172a; font-size: .7rem; font-weight: 900; }
.timer-card.warning .timer-state-badge { border-color: #f59e0b; color: #fde68a; background: #451a03; }
.timer-card.imminent .timer-state-badge,
.timer-card.alerting .timer-state-badge { border-color: #fb7185; color: #fff; background: #9f1239; }
.timer-card.done .timer-state-badge { border-color: #be123c; color: #fecdd3; background: #4c0519; }
.timer-actions .repeat-toggle { border-color: #7c3aed; color: #ddd6fe; background: #2e1065; }
.timer-duration-editor { margin-top: 10px; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(70px, 1fr)); align-items: end; gap: 8px; border: 1px solid #334155; border-radius: 12px; background: #080e1b; }
.timer-duration-editor label { display: grid; gap: 4px; color: #94a3b8; font-size: .68rem; font-weight: 800; }
.timer-duration-editor input { min-width: 0; padding: 8px; }
.timer-duration-editor button { min-height: 38px; padding: 8px 10px; }
.timer-duration-step-actions { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.timer-duration-step-actions button { border-color: #475569; color: #cbd5e1; background: #111827; font-weight: 800; }
.timer-duration-step-actions button:hover:not(:disabled) { border-color: #a78bfa; background: #2e1065; color: #ede9fe; }
.timer-duration-editor .duration-apply { grid-column: 1/-1; width: 100%; }
.timer-visual-progress { height: 7px; margin: 14px 0 -4px; overflow: hidden; border-radius: 999px; background: #020617; }
.timer-visual-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #c084fc); transition: width .25s linear, background-color .2s; }
.timer-card.warning .timer-visual-progress span { background: #f59e0b; }
.timer-card.imminent .timer-visual-progress span { background: #f43f5e; }
.timer-card.alerting .timer-visual-progress span { width: 100% !important; background: linear-gradient(90deg, #ef4444, #fbbf24); }
.timer-display.is-status-text { font-family: "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; font-size: clamp(2rem, 6vw, 2.7rem); line-height: 1.1; letter-spacing: -.045em; }
.timer-card.alerting .timer-display { color: #fff; text-shadow: 0 0 18px #ef4444; }
.timer-card .quick-restart { width: 100%; margin-top: 10px; border-color: #7c3aed; background: #21143d; }
.timer-card .quick-restart.manual { border-color: #f59e0b; background: #3a260c; color: #fde68a; }
.timer-alert-label { color: #fda4af; }

.private-tracker-modal { z-index: 40; padding: 4vh 3vw; }
.private-tracker-dialog { width: min(620px, 94vw); height: min(760px, 90vh); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid #475569; border-radius: 20px; background: #070b14; box-shadow: 0 24px 80px #020617e6; }
.private-tracker-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px 15px; border-bottom: 1px solid #334155; background: #111827; }
.private-tracker-dialog > header div { display: grid; gap: 3px; }
.private-tracker-dialog > header strong { font-size: 1rem; }
.private-tracker-dialog > header small { color: #94a3b8; font-size: .72rem; }
.private-tracker-dialog > header button { padding: 7px 10px; }
.private-tracker-dialog iframe { width: 100%; height: 100%; border: 0; background: #070b14; }
body.tracker-modal-open { overflow: hidden; }
.participant.self { border: 1px solid #34d399; background: #064e3b; color: #ecfdf5; box-shadow: 0 0 16px #10b9813d; cursor: pointer; }
.participant.self:hover, .participant.self:focus-visible { border-color: #6ee7b7; background: #065f46; outline: 2px solid #34d39966; outline-offset: 2px; }
.participant.self .participant-name:focus-visible { border-radius: 6px; outline: 2px solid #6ee7b7; outline-offset: 3px; }

.toast { z-index: 50; max-width: min(480px, 88vw); text-align: center; }

body.pip-body {
    height: 100vh;
    min-height: 100vh;
    background: #070b14;
    padding: 12px;
    overflow: hidden;
}
#pipRoot { height: 100%; }
.pip-shell { display: grid; gap: 11px; height: 100%; color: #f8fafc; }
.pip-top { display: flex; align-items: center; gap: 10px; }
.pip-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pip-controls { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.pip-controls [data-pip-memo] { display: block; flex: 1 1 auto; min-width: 0; height: 31px; padding: 6px 8px; border-radius: 9px; border-color: #7c3aed; background: #150d2a; color: #ede9fe; font-size: .7rem; }
.pip-controls [data-pip-memo][readonly] { border-color: #334155; background: #0f172a; color: #cbd5e1; cursor: default; }
.pip-top-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.pip-top-actions button { padding: 7px 9px; font-size: .7rem; }
.pip-hunt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pip-clock { display: grid; gap: 5px; padding: 10px; border: 1px solid #334155; border-radius: 13px; background: #0f172a; }
.pip-clock span { color: #94a3b8; font-size: .72rem; }
.pip-clock b { color: #ddd6fe; font: 800 1.5rem/1 ui-monospace, monospace; }
.pip-next { padding: 12px; border: 1px solid #5b21b6; border-radius: 13px; background: #21143d; transition: border-color .2s, background-color .2s; }
.pip-next.state-warning { border-color: #f59e0b; background: #3a260c; }
.pip-next.state-imminent,
.pip-next.state-alerting { border-color: #fb7185; background: #4c101c; }
.pip-next span { display: block; color: #ddd6fe; font-size: .72rem; font-weight: 800; }
.pip-next.state-warning span { color: #fde68a; }
.pip-next.state-imminent span,
.pip-next.state-alerting span { color: #fecdd3; }
.pip-next strong { display: block; margin-top: 4px; font-size: 1.15rem; }
.pip-list { min-height: 0; display: grid; align-content: start; gap: 5px; overflow: hidden auto; }
.pip-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 7px 7px; border: 1px solid transparent; border-bottom-color: #1e293b; border-radius: 9px; }
.pip-item.warning { border-color: #92400e; background: #2a1a08; }
.pip-item.imminent { border-color: #9f1239; background: #3a0b15; }
.pip-item.alerting { border-color: #fb7185; background: #5f0f1d; }
.pip-item.done { border-color: #4c0519; background: #240a10; }
.pip-item img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.pip-item-copy { display: grid; min-width: 0; }
.pip-item-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pip-item-copy small { margin-top: 2px; color: #94a3b8; font-size: .62rem; font-weight: 800; }
.pip-item.warning .pip-item-copy small { color: #fde68a; }
.pip-item.imminent .pip-item-copy small,
.pip-item.alerting .pip-item-copy small { color: #fecdd3; }
.pip-item b { font: 800 .9rem/1 ui-monospace, monospace; color: #c4b5fd; }
.pip-item b.is-status-text { font-family: "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; font-size: .8rem; line-height: 1; letter-spacing: -.035em; }
.pip-item.warning b { color: #fbbf24; }
.pip-item.imminent b,
.pip-item.alerting b,
.pip-item.done b { color: #fb7185; }
.pip-item-restart { padding: 6px 8px; border-color: #7c3aed; border-radius: 8px; background: #21143d; font-size: .64rem; white-space: nowrap; }
.pip-radial-grid { display: none; }
.pip-radial-skill { min-width: 0; padding: 4px; display: grid; justify-items: center; align-content: start; gap: 4px; border: 1px solid transparent; border-radius: 13px; background: #0f172a; transition: border-color .2s, background-color .2s, transform .2s; }
.pip-radial-icon { --cooldown-angle: 0deg; position: relative; width: 54px; height: 54px; overflow: hidden; display: grid; place-items: center; border: 2px solid #475569; border-radius: 13px; background: #020617; box-shadow: 0 5px 15px #02061799; }
.pip-radial-icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pip-radial-fallback { font-size: 1.7rem; }
.pip-cooldown-sweep { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: conic-gradient(from 0deg at 50% 50%, rgba(2, 6, 23, .78) 0deg var(--cooldown-angle), transparent var(--cooldown-angle) 360deg); }
.pip-radial-state { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #fff; font: 1000 2rem/1 Inter, sans-serif; text-shadow: 0 1px 8px #7f1d1d, 0 0 16px #ef4444; pointer-events: none; }
.pip-radial-skill.warning { border-color: #f59e0b; background: #2a1a08; }
.pip-radial-skill.warning .pip-radial-icon { border-color: #f59e0b; }
.pip-radial-skill.imminent { border-color: #fb7185; background: #3a0b15; }
.pip-radial-skill.imminent .pip-radial-icon,
.pip-radial-skill.alerting .pip-radial-icon { border-color: #fb7185; }
.pip-radial-skill.alerting { border-color: #fb7185; background: #5f0f1d; animation: pip-skill-alert-pulse .72s ease-in-out infinite; }
.pip-radial-skill.alerting .pip-cooldown-sweep { opacity: 0; }
.pip-radial-restart { width: 100%; min-height: 23px; padding: 3px 2px; border-radius: 7px; border-color: #6d28d9; background: #21143d; font-size: .62rem; line-height: 1; white-space: nowrap; }
.pip-radial-time { color: #c4b5fd; font: 900 .64rem/1 ui-monospace, monospace; letter-spacing: .02em; }
.pip-radial-time.is-status-text { font-family: "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; letter-spacing: -.03em; }
.pip-radial-skill.warning .pip-radial-time { color: #fbbf24; }
.pip-radial-skill.imminent .pip-radial-time,
.pip-radial-skill.alerting .pip-radial-time { color: #fb7185; }
.pip-radial-skill.alerting .pip-radial-restart { border-color: #f59e0b; background: #451a03; color: #fef3c7; }
.pip-radial-empty { grid-column: 1/-1; align-self: center; margin: 0; padding: 18px 8px; color: #94a3b8; text-align: center; font-size: .76rem; }
.pip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; }
.pip-actions .pip-rest { grid-column: 1/-1; border-color: #f59e0b; background: #3a260c; }
.pip-actions button { padding: 9px; }
body.pip-compact { padding: 9px; }
.pip-compact .pip-shell { min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
.pip-compact .pip-top,
.pip-compact .pip-hunt,
.pip-compact .pip-next,
.pip-compact .pip-list,
.pip-compact .pip-actions { display: none; }
.pip-compact .pip-controls { justify-content: space-between; }
.pip-compact .pip-radial-grid { min-height: 0; padding-right: 2px; display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); align-content: start; gap: 5px; overflow: hidden auto; scrollbar-width: thin; }
.pip-compact .pip-radial-skill { padding: 3px; gap: 2px; }
.pip-compact .pip-radial-icon { width: 50px; height: 50px; }
.pip-compact .pip-radial-restart { min-height: 21px; padding: 2px; }
.pip-compact [data-pip-alert-toggle] { font-size: 0; }
.pip-compact [data-pip-alert-toggle]::after { content: "점멸 ON"; font-size: .62rem; }
.pip-compact [data-pip-alert-toggle][aria-pressed="false"]::after { content: "점멸 OFF"; }

@keyframes timer-alert-pulse {
    0%, 100% { background-color: #3f0a13; box-shadow: 0 0 12px #ef44444d, inset 0 0 0 0 #f59e0b00; }
    50% { background-color: #7f1d1d; box-shadow: 0 0 34px #ef4444aa, inset 0 0 24px #f59e0b55; }
}

@keyframes pip-alert-pulse {
    0%, 100% { background-color: #19070b; box-shadow: inset 0 0 0 3px #ef4444; }
    50% { background-color: #4c101c; box-shadow: inset 0 0 0 5px #f59e0b, inset 0 0 34px #ef444477; }
}

@keyframes pip-skill-alert-pulse {
    0%, 100% { transform: scale(.97); box-shadow: 0 0 0 #ef444400; filter: brightness(.95); }
    50% { transform: scale(1); box-shadow: 0 0 18px #ef4444cc; filter: brightness(1.45); }
}

body.pip-body.pip-warning { box-shadow: inset 0 0 0 3px #f59e0b; }
body.pip-body.pip-imminent { box-shadow: inset 0 0 0 4px #f43f5e; }
body.pip-body.pip-alerting { animation: pip-alert-pulse .9s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .timer-card.alerting,
    body.pip-body.pip-alerting,
    .pip-radial-skill.alerting { animation: none; }
    .timer-card.alerting { background: #7f1d1d; box-shadow: 0 0 30px #ef444488; }
    body.pip-body.pip-alerting { background: #4c101c; box-shadow: inset 0 0 0 5px #ef4444; }
    .pip-radial-skill.alerting { background: #7f1d1d; box-shadow: 0 0 0 3px #f59e0b; filter: brightness(1.25); }
}

@media (max-width: 900px) {
    .hunt-panel { grid-template-columns: 1fr 1fr; }
    .hunt-settings, .hunt-actions { grid-column: 1/-1; }
    .hunt-actions { grid-template-columns: repeat(3, 1fr); }
    .timer-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skill-picker, .timer-form .wide, .timer-form .form-hint { grid-column: 1/-1; }
    .register-button { grid-column: 1/-1; }
    .room-preset-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .room-preset-copy, .room-preset-actions, .room-preset-panel .form-hint { grid-column: 1/-1; }
}

@media (min-width: 1131px) and (max-width: 1320px) {
    .room-shell { width: min(980px, calc(100vw - 172px)); }
    .room-tool-dock { width: 128px; right: 10px; }
}

@media (max-width: 1130px) {
    .room-shell { padding-bottom: 130px; }
    .room-tool-dock {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(112px, 1fr);
        overflow-x: auto;
        transform: none;
        border-radius: 16px;
    }
    .room-tool-dock > strong { display: none; }
    .room-tool-dock button { white-space: nowrap; }
    .room-tool-dock label { min-width: 145px; }
}

@media (max-width: 620px) {
    .page-shell, .room-shell { width: min(94vw, 1050px); padding-top: 14px; }
    .timer-feature-summary { margin-top: -16px; padding: 15px; }
    .room-quick-summary { align-items: flex-start; flex-direction: column; }
    .room-quick-summary ul { flex-basis: auto; justify-content: flex-start; }
    .room-tool-dock { right: 7px; bottom: 7px; left: 7px; padding: 7px; }
    .timer-lobby { margin-top: 28px; padding: 17px; }
    .timer-lobby-head { align-items: stretch; flex-direction: column; }
    .lobby-tools { flex-basis: auto; }
    .lobby-grid { grid-template-columns: 1fr; }
    .hunt-panel { grid-template-columns: 1fr; gap: 14px; }
    .hunt-actions { grid-column: auto; }
    .next-alert { grid-template-columns: auto 1fr auto; }
    .next-alert small { grid-column: 2/-1; }
    .composer-head { align-items: stretch; flex-direction: column; }
    .composer-tabs { display: grid; grid-template-columns: 1fr 1fr; }
    .timer-form { grid-template-columns: 1fr; }
    .skill-picker, .timer-form .wide, .timer-form .form-hint, .register-button { grid-column: auto; }
    .room-preset-panel { grid-template-columns: 1fr; }
    .room-preset-copy, .room-preset-actions, .room-preset-panel .form-hint { grid-column: auto; }
    .room-preset-actions { display: grid; grid-template-columns: 1fr; }
    .hunt-settings { grid-template-columns: 1fr; }
    .hunt-actions { grid-template-columns: 1fr; }
}
