.notification-layer{position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;background:transparent;color:#edf8f0;z-index:500;pointer-events:none;overflow:visible;font-family:MulderPlay,system-ui,sans-serif;font-size:clamp(14px,1.05vw,36px);--notice-mint:#c5f7df}
.notification-layer::backdrop{background:transparent;pointer-events:none}
.invitation-corner{position:absolute;right:max(1.2em,env(safe-area-inset-right));top:max(1.2em,env(safe-area-inset-top));width:min(29em,calc(100vw - 2.4em));pointer-events:none}
.presence-corner{position:absolute;right:max(1.2em,env(safe-area-inset-right));bottom:max(1.2em,env(safe-area-inset-bottom));width:min(22em,calc(100vw - 2.4em));display:flex;flex-direction:column;align-items:stretch;gap:.7em;pointer-events:none}
.presence-notice,.invitation-notice{position:relative;border:1px solid #ddfff02e;background:linear-gradient(135deg,#1e373df5,#101d2af7);box-shadow:0 1em 3em #0006,inset 0 1px 0 #effff00d;backdrop-filter:blur(20px);animation:notice-enter .42s cubic-bezier(.16,.75,.23,1) both}
.presence-notice{display:flex;align-items:center;gap:.9em;border-radius:1em;padding:1em 1.15em;min-height:5em}
.notice-avatar{position:relative;display:grid;place-items:center;flex-shrink:0;width:2.8em;height:2.8em;border-radius:.85em;background:linear-gradient(145deg,#c6e8d5,#739c91);border:1px solid #e5fff154;box-shadow:inset 0 1px 0 #fff8,0 .3em .7em #0004;color:#16332e;font-size:1em;font-weight:700}
.notice-avatar i{position:absolute;width:.55em;height:.55em;right:-.12em;bottom:-.1em;background:#c3f9da;border-radius:50%;border:.15em solid #162a30;box-shadow:0 0 .8em #c9ffe54d}
.presence-notice[data-online=false] .notice-avatar{background:linear-gradient(145deg,#6b7c83,#3d515d);color:#d4e3df;border-color:#d5e8e32e}.presence-notice[data-online=false] .notice-avatar i{background:#7e919b;box-shadow:none}
.presence-notice strong{font-size:.93em;font-weight:600;line-height:1.4;display:block;overflow-wrap:anywhere}.presence-notice p{font-size:.85em;color:#c1e9d4;margin:.2em 0 0;line-height:1.4}.presence-notice[data-online=false] p{color:#a5b7c2}.presence-symbol{font-size:1em;margin-left:auto;color:#c3f9da}.presence-notice[data-online=false] .presence-symbol{color:#8298a4}
.invitation-notice{border-radius:1.25em;padding:1.25em 1.4em 1.4em;overflow:hidden;pointer-events:auto;max-height:calc(100dvh - 2.4em);overflow-y:auto}
.notice-top{display:flex;align-items:center;justify-content:space-between;gap:1em;color:#b6ddd0;margin-bottom:1.1em}.notice-top>span{font-size:.68em;font-weight:600;letter-spacing:.18em;line-height:1.5}.notice-dismiss{display:grid;place-items:center;padding:0;background:#ecfff00a;border:1px solid #ecfff01f;border-radius:50%;width:2em;height:2em;min-width:28px;min-height:28px;font-size:1em;color:#bbcecf;margin:-.2em -.35em -.2em 0;touch-action:manipulation}
.notice-person{display:flex;gap:1em;align-items:center}.notice-person .notice-avatar{width:3.3em;height:3.3em;border-radius:1em;font-size:1.1em}.notice-person h2{font-size:1.35em;font-weight:600;letter-spacing:-.04em;line-height:1.2;margin:0;overflow-wrap:anywhere}.notice-person p{font-size:.87em;line-height:1.6;color:#a9c3ca;margin:.4em 0 0}
.notice-subject{display:flex;align-items:center;gap:.8em;padding:.95em 1em;margin:1.2em 0;border:1px solid #d8fff01c;border-radius:.8em;background:#050f162e}.notice-subject>span{font-size:1.2em;color:#c4efdb}.notice-subject strong{font-size:1em;line-height:1.4;font-weight:500;overflow-wrap:anywhere}
.notice-actions{display:flex;align-items:center;gap:.7em}.notice-actions button{border-radius:2em;flex:1;padding:.9em 1.2em;min-height:max(3em,44px);font:600 .86em MulderPlay,system-ui,sans-serif;cursor:pointer;border:1px solid #d4fce92b;touch-action:manipulation;transition:background .2s,transform .2s,box-shadow .2s}
.notice-accept{color:#153126;background:linear-gradient(135deg,#dcfbe6,#b7e7cc);box-shadow:inset 0 1px 0 #fff8,0 .3em .8em #0002}.notice-decline{color:#d1e3e2;background:#ecfff008}.notice-actions button:hover{transform:translateY(-2px);box-shadow:0 .4em 1em #0004}.notice-actions button:disabled{opacity:.55;cursor:wait;transform:none}.notice-error{color:#ffc7b6;font-size:.85em;line-height:1.6;margin:.2em 0 1em}
.notice-progress{position:absolute;left:0;bottom:0;height:2px;width:100%;background:linear-gradient(90deg,#87c8bb,#dbffe7);transform-origin:left;animation:notice-countdown var(--notice-duration,18000ms) linear forwards;opacity:.5}.notice-paused .notice-progress{animation-play-state:paused}
.notification-layer button:focus-visible{outline:2px solid #effff5;outline-offset:4px}
@keyframes notice-enter{from{opacity:0;transform:translate3d(2em,0,0) scale(.98)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
@keyframes notice-countdown{to{transform:scaleX(0)}}
.game-system-controls{position:absolute;right:max(12px,env(safe-area-inset-right));left:auto;top:max(12px,env(safe-area-inset-top));z-index:2;display:flex;align-items:center;gap:8px;pointer-events:auto;font-size:clamp(13px,.85vw,30px)}
.game-system-controls #game-home,.game-system-controls #game-exit{position:relative;inset:auto;opacity:1;display:inline-flex;align-items:center;justify-content:center;gap:.65em;width:auto;height:auto;min-height:44px;padding:.7em 1em;border:1px solid #e0fff046;border-radius:2em;background:#13262eea;backdrop-filter:blur(12px);box-shadow:0 .35em 1em #0005;color:#e7f9ed;font:600 1em MulderPlay,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.game-system-controls #game-home .mark{width:1.2em;height:1em;stroke-width:5}.game-system-controls #game-exit{background:#1b282eea}.game-system-controls #game-exit>span:first-child{font-size:1.25em;line-height:1;color:#c7dfd7}.game-system-controls button:hover,.game-system-controls button:focus-visible{background:#32504b!important;outline:2px solid #ddffed;outline-offset:3px}.game-system-controls button:disabled{opacity:.65;cursor:wait}
.game-menu-title{display:flex;align-items:center;gap:1em}.game-menu-title .mark{width:2em;height:1.6em}.game-menu-title h2{margin:.3em 0}.game-menu-title small{display:block;letter-spacing:.14em;font-size:.55rem;color:#b7dace}.game-menu-help{color:#8eaab1;font-size:.65rem;margin-top:1.8rem}
@media(max-width:700px){.notification-layer{font-size:14px}.notification-layer[data-playing=true] .invitation-corner{top:calc(max(12px,env(safe-area-inset-top)) + 55px)}.notification-layer[data-playing=true] .invitation-notice{max-height:calc(100dvh - 85px)}.invitation-notice{padding:1em 1.1em 1.2em}.notice-person h2{font-size:1.25em}.presence-corner{width:min(22em,calc(100vw - 2em))}.game-system-controls{gap:7px;font-size:12px}.game-system-controls #game-home,.game-system-controls #game-exit{padding:.65em .85em}.notice-top{margin-bottom:.9em}.notice-subject{margin:1em 0}}
@media(max-height:450px) and (orientation:landscape){.notification-layer{font-size:13px}.invitation-corner{width:min(28em,48vw);top:12px!important}.invitation-notice{padding:.85em 1em 1em;max-height:calc(100dvh - 24px)!important}.notice-top{margin-bottom:.6em}.notice-person .notice-avatar{width:2.8em;height:2.8em}.notice-person h2{font-size:1.2em}.notice-person p{margin:.2em 0 0}.notice-subject{margin:.7em 0;padding:.65em .8em}.notice-actions button{padding:.65em 1em}.presence-notice{padding:.75em .9em;min-height:4.4em}.presence-corner{width:20em}}
@media(prefers-reduced-motion:reduce){.presence-notice,.invitation-notice{animation:none}.notice-progress{animation:none}.notice-actions button{transition:none}}

/* Games with their own console menu retain that single control. */
.game-system-controls[hidden],.game-system-controls #game-exit[hidden]{display:none!important}.game-system-controls #game-home{width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;font-size:24px;line-height:1;background:#0b182bc7;opacity:.4;box-shadow:none;transition:opacity .2s}.game-system-controls:hover #game-home,.game-system-controls:focus-within #game-home{opacity:1}

.notice-controller-hint{display:none;font-size:.65em;color:#91adae;line-height:1.5;margin:.8em 0 -.2em}.notification-layer[data-playing=true] .notice-controller-hint{display:block}.notice-subject strong{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}.notification-layer:not([hidden]){display:block}.notification-layer[hidden]{display:none!important}
