/* The calm frame shared by every Outmark game page. Pages set the --om-* colours. */
.om-bar { display: flex; align-items: center; gap: 8px; width: min(100% - 32px, 560px); margin: 0 auto; padding: 14px 0 12px; }
.om-mark { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; }
.om-mark svg { width: 30px; height: 30px; }
.om-title { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-right: auto; min-height: 44px; padding: 0 8px; border: 0; border-radius: 12px; background: none; color: var(--om-text); font: 800 22px/1 Arial, Helvetica, sans-serif; letter-spacing: -.02em; cursor: pointer; }
.om-title:hover { background: color-mix(in srgb, var(--om-text) 8%, transparent); }
.om-chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .65; }
.om-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--om-dot, #ff6b5a); }
.om-title .om-dot { top: 8px; right: 2px; }
.om-dot[hidden] { display: none; }
.om-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--om-muted); font: 800 18px/1 Arial, sans-serif; cursor: pointer; }
.om-icon:hover { color: var(--om-text); background: color-mix(in srgb, var(--om-text) 8%, transparent); }
.om-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.om-bar :focus-visible, .om-opponent:focus-visible, .om-sheet :focus-visible { outline: 3px solid var(--om-accent); outline-offset: 2px; }

/* The opponent line. */
.om-opponent { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 6px 0 4px; padding: 0 10px 0 2px; border: 0; border-radius: 999px; background: none; color: var(--om-muted); font: 600 15px/1.2 Arial, sans-serif; cursor: pointer; }
.om-opponent:hover { background: color-mix(in srgb, var(--om-text) 7%, transparent); }
.om-opponent:disabled { cursor: default; opacity: .6; }
.om-opponent img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--om-text) 12%, transparent); }
.om-opponent b { color: var(--om-text); }
.om-opponent em { font-style: normal; }

/* Stats under the board. */
.om-stats { margin: 6px 0 0; color: var(--om-muted); font: 500 13px/1.4 Arial, sans-serif; text-align: center; white-space: pre-wrap; }
.om-stats[hidden] { display: none; }

/* Bottom sheets. */
.om-sheet { position: fixed; inset: auto 0 0 0; width: min(100%, 560px); max-width: 100%; max-height: 86vh; margin: 0 auto; padding: 8px 18px max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 22px 22px 0 0; background: var(--om-sheet-bg, #fffaf0); color: var(--om-sheet-ink, #1d1d1f); overflow: auto; }
.om-sheet[open] { animation: om-up .26s cubic-bezier(.2, .8, .2, 1); }
.om-sheet::backdrop { background: rgba(10, 8, 14, .55); }
@keyframes om-up { from { transform: translateY(40px); opacity: 0; } }
.om-grab { width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 9px; background: var(--om-sheet-line, #d9d0c2); }
.om-sheet-title { margin: 4px 0 8px; font: 800 18px/1.2 Arial, sans-serif; letter-spacing: -.01em; }
.om-game, .om-bot { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px; border: 0; border-top: 1px solid var(--om-sheet-line, #e6ddcc); border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.om-game.here, .om-bot.here { border-color: transparent; border-radius: 14px; background: var(--om-sheet-here, #fff); }
.om-game.here + *, .om-bot.here + * { border-top-color: transparent; }
.om-game b, .om-bot b { font: 800 16.5px/1.2 Arial, sans-serif; }
.om-game small, .om-bot small { display: inline-flex; align-items: center; gap: 4px; color: var(--om-sheet-muted, #6b675f); font: 600 13px/1.2 Arial, sans-serif; }
.om-game small svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.om-game-art, .om-game-art svg { display: block; width: 42px; height: 42px; }
.om-game .om-dot { top: 8px; left: 44px; }
.om-bot img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--om-sheet-line, #e6ddcc); }
.om-bot:disabled { cursor: default; opacity: .45; }
.om-sheet-link { display: block; margin: 8px 0 4px; padding: 12px; color: var(--om-sheet-link, #613ef0); font: 800 15px Arial, sans-serif; text-align: center; text-decoration: none; }
.om-sheet-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; margin-top: 4px; padding: 0 8px; border: 0; border-top: 1px solid var(--om-sheet-line, #e6ddcc); background: none; color: inherit; font: 700 15.5px Arial, sans-serif; cursor: pointer; }
.om-switch { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--om-sheet-line, #d9d0c2); transition: background .2s; }
.om-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.om-sheet-row[aria-pressed="true"] .om-switch { background: var(--om-accent, #34c759); }
.om-sheet-row[aria-pressed="true"] .om-switch::after { transform: translateX(18px); }

/* Invite popup: centred, not a bottom sheet. */
.om-sheet.om-invite { inset: 0; width: min(340px, calc(100vw - 32px)); height: fit-content; margin: auto; padding: 26px 22px 20px; border-radius: 24px; text-align: center; }
.om-invite p { margin: 8px 0 14px; color: var(--om-sheet-muted, #6b675f); font-size: 14.5px; line-height: 1.4; }
.om-link { padding: 10px 12px; border: 1px dashed var(--om-sheet-line, #d9d0c2); border-radius: 12px; background: var(--om-sheet-here, #fff); font: 700 13px/1.3 ui-monospace, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
.om-primary, .om-secondary { display: block; width: 100%; min-height: 50px; margin-top: 10px; border-radius: 14px; font: 800 16px Arial, sans-serif; cursor: pointer; }
.om-primary { margin-top: 16px; border: 0; background: var(--om-accent); color: var(--om-accent-ink, #fff); }
.om-secondary { border: 2px solid currentColor; background: transparent; color: inherit; }
.om-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.om-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.om-toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50; padding: 10px 16px; border-radius: 999px; background: #1d1d1f; color: #fff; font: 700 14px Arial, sans-serif; opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; pointer-events: none; }
.om-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .om-sheet[open] { animation: none; } .om-switch, .om-switch::after, .om-toast { transition: none; } }

/* Wide screens: the header spans the same width as the two-column game layout. */
@media (min-width: 900px) { .om-bar { width: min(100% - 48px, 1100px); padding-top: 18px; } }
/* Game pages stay about the game: other dailies live in the title's games sheet. */
.om-page #suiteToday { display: none !important; }
/* The Supporter card waits until purchases are switched on (monetization.js sets the flag). */
html:not([data-supporter-offer="on"]) #supportCard { display: none !important; }

/* Share card preview. */
.om-share .om-share-img { display: block; width: min(230px, 58vw); height: auto; margin: 4px auto 6px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
a.om-primary, a.om-secondary { display: grid; place-items: center; text-decoration: none; box-sizing: border-box; }
/* The player chip in the header is the avatar alone at every width; the name opens with it. */
.om-bar .outmark-player-chip { max-width: 44px; padding: 5px; }
.om-bar .outmark-player-chip .outmark-player-name { display: none; }
/* Fives' footer link to the Supporter offer waits with the offer. */
html:not([data-supporter-offer="on"]) #adfreeBtn, html:not([data-supporter-offer="on"]) #adfreeBtn + span { display: none; }
/* Games in progress, under the daily list in the games sheet. */
.om-sheet-sub { margin: 14px 8px 4px; color: var(--om-sheet-muted, #6b675f); font: 800 12px/1.2 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.om-live.mine small { color: var(--om-sheet-link, #613ef0); font-weight: 800; }
.om-active[hidden] { display: none; }
