:root { --pos-notice-layer: 11000; }
.notice--floating {
    position: fixed;
    z-index: var(--pos-notice-layer);
    top: calc(var(--head-h, 64px) + 12px + env(safe-area-inset-top, 0px));
    /* 上部中央。右上だと見出し右端の操作ボタン(勤怠の「＋ 店舗入出金」等)に重なり、閉じるまで押せない。 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--head-h, 64px) - 36px - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    margin: 0;
    padding: 10px 12px;
    border: 2px solid #a5c9ff;
    border-radius: 12px;
    background: #182337;
    color: #e0ecff;
    box-shadow: 0 12px 36px #0008;
    font: 700 14px/1.6 system-ui, -apple-system, sans-serif;
    text-align: left;
}
.notice--floating[hidden] { display: none !important; }
/* ホワイトボード：結果のお知らせは盤面に重ならない所に出す。横長では一番上（店名の帯）。前は盤面の上端に重なり、
   閉じるまで下の未定客・待機欄・会計票をつかめなかった（9/26 実ブラウザ・codex R1・Fable）。 */
@media (min-width: 981px) {
    .whiteboard-page .notice--floating { top: calc(4px + env(safe-area-inset-top, 0px)); max-height: 108px; }
}
/* 縦持ち・狭い画面では、上に出すと見出しの「＋ 新規来店」や戻るボタンに重なる（9/26 Fable R2・実ブラウザ 768px）。
   下端に出す。盤面は指で送れるので、下に隠れた卓は送れば見える。 */
@media (max-width: 980px) {
    .whiteboard-page .notice--floating { top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-height: 30dvh; }
    /* 窓（下端に付く）を開いている間・ドラッグ中は、窓のボタンと「離すと…」の予告を塞がないよう上へ（9/26 Fable R3）。 */
    .whiteboard-page.is-notice-top .notice--floating { top: calc(4px + env(safe-area-inset-top, 0px)); bottom: auto; max-height: 108px; }
}
/* スマホ幅の画面は下にメニューがある（店長・オーナーは 2 段）。長いお知らせがメニューに被らないよう、その分も引く（9/26 codex R8）。 */
@media (max-width: 599px) {
    .v1-page .notice--floating {
        max-height: calc(100dvh - var(--head-h, 64px) - 36px - env(safe-area-inset-top, 0px) - var(--nav-h, 64px) - env(safe-area-inset-bottom, 0px));
    }
}
/* 長いお知らせでも × は右上に残す（本文と一緒に流れて見えなくならない）。 */
.notice--floating .notice__dismiss { align-self: flex-start; position: sticky; top: 0; }
.notice--floating[data-kind="success"] { background: #18352a; color: #d9ffea; border-color: #70dba5; }
.notice--floating[data-kind="error"] { background: #3a2025; color: #ffd7dc; border-color: #ff8290; }
.notice--floating[data-kind="warning"] { background: #3b301c; color: #ffe3a8; border-color: #e8bc58; }
.notice__message { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice__dismiss {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 24px;
    cursor: pointer;
    touch-action: manipulation;
}
.notice__dismiss:hover { background: #ffffff18; }
.notice__dismiss:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
