.admin-observer[hidden], .admin-observer [hidden], .admin-observer-entry[hidden], .admin-observer-access[hidden] { display: none !important; }
body.admin-observer-active .world-controls-hint,
body.admin-observer-active #world-chat,
body.admin-observer-active #world-garage,
body.admin-observer-active #world-shop { display: none !important; }
.admin-observer-access { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); background: #0b1519; color: #ecf1e7; font: 14px/1.6 system-ui, sans-serif; overflow: auto; }
.admin-observer-access__card { width: min(440px, 100%); border-top: 3px solid #86edba; padding: 28px; border-radius: 4px; background: #172822; box-shadow: 0 12px 42px #0006; }
.admin-observer-access h1 { font: 750 clamp(23px, 4vw, 29px)/1.2 system-ui, sans-serif; margin: 14px 0 12px; }
.admin-observer-access p { color: #b7c9bd; }
.admin-observer-access__actions { display: grid; gap: 10px; margin-top: 24px; }
.admin-observer-access .admin-observer__button { min-height: 44px; }
.admin-observer-access button:focus-visible { outline: 2px solid #b2ffd1; outline-offset: 3px; }
.admin-observer {
    position: fixed;
    z-index: 170;
    top: calc(max(10px, env(safe-area-inset-top)) + 62px);
    right: max(12px, env(safe-area-inset-right));
    width: min(342px, calc(100vw - 24px));
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)) - 76px);
    color: #eeeae0;
    background: rgba(12, 21, 24, .96);
    border: 1px solid #587c72;
    border-top: 3px solid #86edba;
    border-radius: 4px;
    box-shadow: 0 12px 42px #0008;
    font: 13px/1.4 system-ui, sans-serif;
    pointer-events: auto;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #57756a #152327;
}
.admin-observer *, .admin-observer *::before, .admin-observer *::after { box-sizing: border-box; }
.admin-observer__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; gap: 10px; }
.admin-observer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-observer__eyebrow { font-size: 11px; font-weight: 850; letter-spacing: .12em; color: #bcefd2; }
.admin-observer__live { font-size: 10px; letter-spacing: .04em; white-space: nowrap; color: #8aedb7; }
.admin-observer__live::before { content: ''; display: inline-block; width: 5px; height: 5px; background: currentColor; border-radius: 50%; margin: 0 5px 1px 0; }
.admin-observer__collapse { color: #dcf7e7; border: 1px solid #476659; border-radius: 3px; background: #1b3029; min-width: 32px; min-height: 32px; font-size: 20px; line-height: 1; cursor: pointer; }
.admin-observer__body { padding: 0 14px 12px; }
.admin-observer__description { color: #aabbb4; font-size: 12px; margin: 0 0 12px; }
.admin-observer__camera-status { margin: 9px 0 0; color: #b8cec0; font-size: 11px; overflow-wrap: anywhere; }
.admin-observer__camera-actions { display: flex; gap: 7px; }
.admin-observer__camera-actions > * { flex: 1; }
.admin-observer__button { border: 1px solid #536c60; background: #243d32; color: #e0f4e8; padding: 9px 8px; min-height: 36px; border-radius: 3px; font: 800 10px/1.35 system-ui, sans-serif; letter-spacing: .055em; cursor: pointer; touch-action: manipulation; }
.admin-observer__button--quiet { background: transparent; color: #b4c5ba; }
.admin-observer__button--gold { border-color: #b59752; background: #524523; color: #fff0c9; }
.admin-observer button:hover:not(:disabled) { filter: brightness(1.18); }
.admin-observer button:focus-visible, .admin-observer input:focus-visible, .admin-observer-entry:focus-visible { outline: 2px solid #b2ffd1; outline-offset: 3px; }
.admin-observer button:disabled { cursor: default; opacity: .45; }
.admin-observer__tabs { display: flex; gap: 10px; margin-top: 14px; border-bottom: 1px solid #35483f; }
.admin-observer__tab { flex: 1; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; background: transparent; color: #91a498; font: 850 10px/1.4 system-ui, sans-serif; letter-spacing: .07em; cursor: pointer; }
.admin-observer__tab[aria-pressed="true"] { border-bottom-color: #86edba; color: #c4f4d7; }
.admin-observer__empty { color: #92a799; margin: 16px 0; font-size: 12px; }
.admin-observer__roster { max-height: 180px; max-height: min(25dvh, 180px); overflow: auto; overscroll-behavior: contain; margin-top: 7px; }
.admin-observer__player { display: grid; gap: 2px; width: 100%; text-align: left; padding: 9px 10px; background: #15251f; border: 1px solid transparent; border-bottom-color: #2e4137; color: #e2eddf; border-radius: 2px; cursor: pointer; }
.admin-observer__player[aria-pressed="true"] { background: #2b4334; border-color: #87b694; }
.admin-observer__player strong, .admin-observer__match strong { font: 750 12px/1.4 system-ui, sans-serif; overflow-wrap: anywhere; }
.admin-observer__player small, .admin-observer__match small { font-size: 10px; color: #a8bba8; }
.admin-observer__target { display: grid; gap: 3px; margin: 12px 0; }
.admin-observer__selected { font-size: 13px; overflow-wrap: anywhere; }
.admin-observer__identity { font: 10px/1.5 ui-monospace, monospace; overflow-wrap: anywhere; color: #8ea79c; }
.admin-observer__target > button { margin-top: 5px; }
.admin-observer__grant { border-top: 1px solid #35483f; padding-top: 11px; display: grid; gap: 9px; }
.admin-observer__grant h3 { color: #eace8e; margin: 0; font: 850 11px/1.4 system-ui, sans-serif; letter-spacing: .08em; }
.admin-observer__grant label { display: grid; gap: 4px; font-size: 11px; color: #bfcbbd; }
.admin-observer__grant input { width: 100%; min-height: 38px; border: 1px solid #49604f; border-radius: 3px; background: #0d1712; color: #f6f5e8; padding: 8px 9px; font: 14px/1.35 system-ui, sans-serif; }
.admin-observer__grant input::placeholder { color: #758b7c; }
.admin-observer__grant input:disabled { opacity: .45; }
.admin-observer__confirmation { display: grid; gap: 8px; border: 1px solid #8c7646; padding: 12px; border-radius: 3px; background: #3b3322; }
.admin-observer__confirmation strong { color: #ffe5a7; overflow-wrap: anywhere; }
.admin-observer__confirmation p { margin: 0 0 3px; color: #d9ccad; font-size: 12px; overflow-wrap: anywhere; }
.admin-observer__status { margin: 12px 0 0; color: #c6d7c8; font-size: 11px; min-height: 16px; overflow-wrap: anywhere; }
.admin-observer__storage-notice { margin: 10px 0 0; padding: 9px; border: 1px solid #8c7646; border-radius: 3px; color: #ffe5a7; background: #3b3322; font-size: 11px; }
.admin-observer__match { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #35483f; }
.admin-observer__match > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.admin-observer__match > button { flex: 0 0 auto; }
.admin-observer-entry { color: #bcefd2 !important; border-color: #65816d !important; }
@media (max-width: 640px) {
    .admin-observer { top: calc(max(6px, env(safe-area-inset-top)) + 58px); right: max(8px, env(safe-area-inset-right)); width: min(320px, calc(100vw - 16px)); }
    .admin-observer__button { min-height: 40px; }
    .admin-observer__grant input { font-size: 16px; }
    .admin-observer__player { min-height: 44px; }
    .admin-observer__collapse { min-width: 40px; min-height: 36px; }
}
@media (max-height: 560px) {
    .admin-observer { top: calc(max(6px, env(safe-area-inset-top)) + 46px); max-height: calc(100dvh - max(6px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)) - 52px); }
    .admin-observer__header { padding: 8px 12px; }
    .admin-observer__body { padding: 0 12px 10px; }
    .admin-observer__roster { max-height: 95px; }
}

.observer-drag-handle { cursor: grab; touch-action: none; user-select: none; position: sticky; top: 0; background: #10201e; z-index: 2; }
.observer-drag-handle:active { cursor: grabbing; }
.observer-drag-handle:focus-visible { outline: 2px solid #86edba; outline-offset: -3px; }
.admin-observer__camera-actions + .admin-observer__camera-actions { margin-top: 8px; }
.observer-window { left: 16px; right: auto; top: 78px; width: min(800px, calc(100vw - 32px)); max-height: calc(100dvh - 96px); resize: both; min-width: min(320px, calc(100vw - 32px)); min-height: 120px; }
.observer-window__body { padding: 12px; }
.observer-window .gn-shell { padding: 0; }
.observer-window .tournament-hero { padding: 12px; }
.observer-window .tournament-hero h3 { font-size: 22px; }
.observer-window .tournament-bracket { max-width: 100%; }

.simple-event { font: 14px/1.45 system-ui,sans-serif; }
.simple-event fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.simple-times { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.simple-event label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; color: #d2e7dd; }
.simple-event input,.simple-event select { width: 100%; min-width: 0; padding: 10px; color: #eef9f2; background: #0c1918; border: 1px solid #537266; border-radius: 5px; color-scheme: dark; font: inherit; }
.simple-event button { padding: 10px 14px; margin: 0 8px 8px 0; background: #1c302a; color: #d9f4e5; border: 1px solid #527c67; border-radius: 5px; cursor: pointer; font: inherit; }
.simple-event button.simple-primary { background: #86edba; color: #10241b; font-weight: 750; }
.simple-event button:disabled { opacity: .5; cursor: default; }
.simple-event button[aria-pressed=true] { border-color: #86edba; background: #315140; }
.simple-muted { color: #a8bcb2; font-size: 12px; }
.simple-status { color: #f0d68d; min-height: 1em; }
.simple-heading { display:flex; align-items:center; justify-content:space-between; }
.simple-event h3 { font-size: 16px; margin: 12px 0; }
.simple-event table { width: 100%; border-collapse: collapse; }
.simple-event td,.simple-event th { padding: 10px 5px; text-align: left; border-bottom: 1px solid #2e463b; }
.simple-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; }
.simple-bracket { display:flex; overflow:auto; gap:14px; }
.simple-bracket section { flex:1; min-width:170px; }
.simple-bracket article { padding:12px; margin-bottom:12px; background:#1b3028; border:1px solid #446958; border-radius:5px; }
.simple-bracket small { display:block; color:#aac5b5; margin:5px 0; }
.observer-window:has(.simple-event) { width: min(620px, calc(100vw - 32px)); }

@media (max-width: 480px) {
    .simple-times { grid-template-columns: 1fr 1fr; }
    .simple-times > label:first-child { grid-column: 1 / -1; }
    .simple-slots { grid-template-columns: 1fr; }
}
