/* Fives in the calm game-page layout (see fives-calm.js). Loaded last so it settles the older layers. */
:root {
  --om-text: #101010; --om-muted: #68645f; --om-accent: #6547ff; --om-accent-ink: #fff; --om-dot: #ff5d4c;
  --om-sheet-bg: #fffaf0; --om-sheet-ink: #101010; --om-sheet-muted: #68645f; --om-sheet-line: #e7dece; --om-sheet-here: #f3eee4; --om-sheet-link: #6547ff;
}

/* Header: the same frame as Drift, Matricks and Tether (.om-bar in game-chrome.css): the Outmark mark,
   "Fives" opening the games sheet, then How to play and the player. The bar is wider than the page
   column, so it spans the same width as the other games and starts at the top of the page. */
body:has(#home) .shell:has(.brandbar) { padding-top: 0 !important; }
body:has(#home) .shell .brandbar { --fc-bar: min(100vw - 32px, 560px); box-sizing: border-box; display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; width: var(--fc-bar) !important; max-width: none !important; min-height: 0 !important; margin: 0 calc((100% - var(--fc-bar)) / 2) !important; padding: 14px 0 12px !important; }
@media (min-width: 900px) { body:has(#home) .shell .brandbar { --fc-bar: min(100vw - 48px, 1100px); padding-top: 18px !important; } }
body:has(#home) .brandbar .wordmark.fc-head { display: flex !important; flex: 1 1 auto !important; flex-direction: row; align-items: center; gap: 8px !important; min-width: 0 !important; margin: 0 !important; animation: none; }
body:has(#home) .brandbar .fc-head .om-mark { width: 36px !important; height: 36px !important; flex: 0 0 36px !important; padding: 0; border: 0; background: none; cursor: pointer; }
body:has(#home) .brandbar .fc-head .om-mark svg { width: 30px; height: 30px; }
body:has(#home) .brandbar .brand-actions { display: flex !important; flex: 0 0 auto !important; flex-wrap: nowrap; align-items: center !important; gap: 8px !important; max-width: none; margin: 0 !important; }
body:has(#home) .brandbar .brand-actions #activeGamesBtn, body:has(#home) .brandbar .brand-actions #settingsBtn { display: none !important; }
body:has(#home) .brandbar .brand-actions #howToPlayBtn.om-icon { order: 1; display: grid !important; place-items: center !important; width: 40px !important; min-width: 40px !important; max-width: 40px !important; height: 40px !important; min-height: 40px !important; flex: 0 0 40px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: none !important; box-shadow: none !important; color: var(--om-muted) !important; font: 800 18px/1 Arial, sans-serif !important; }
body:has(#home) .brandbar .brand-actions #howToPlayBtn.om-icon:hover { color: var(--om-text) !important; background: color-mix(in srgb, var(--om-text) 8%, transparent) !important; }
body:has(#home) .brandbar .brand-actions #profileChip.profile-chip { order: 2; display: grid !important; place-items: center !important; width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 44px !important; min-height: 44px !important; flex: 0 0 44px !important; padding: 5px !important; border: 1px solid rgba(0, 0, 0, .14) !important; border-radius: 999px !important; background: rgba(255, 255, 255, .7) !important; box-shadow: none !important; }
body:has(#home) .brandbar .brand-actions #profileChip .profile-chip-name { display: none !important; }
body:has(#home) .brandbar .brand-actions #profileChip .profile-chip-avatar { width: 32px !important; height: 32px !important; flex: 0 0 32px !important; border-radius: 50% !important; overflow: hidden; }
.fc-row-count { min-width: 22px; padding: 3px 7px; border-radius: 99px; background: var(--om-dot); color: #fff; font: 800 12px/1 Arial, sans-serif; text-align: center; }
.fc-row-count[hidden] { display: none; }

/* Footer: the same quiet line of links as the other games (About · Privacy · Terms · Support).
   Sharing, the Supporter offer and Safety live in the games sheet and settings; the privacy-choices
   link still appears whenever ads switch it on. */
body:has(#home) .footer { display: flex !important; flex-direction: column; align-items: center; gap: 0 !important; margin: 28px 0 0 !important; padding: 0 !important; border: 0 !important; }
body:has(#home) .footer .footer-slogan { display: none !important; }
body:has(#home) .footer .footer-links { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 0 18px !important; }
body:has(#home) .footer .footer-links > span[aria-hidden="true"], body:has(#home) .footer #shareOutmarkBtn, body:has(#home) .footer #adfreeBtn, body:has(#home) .footer #safetyFooterBtn { display: none !important; }
body:has(#home) .footer .footer-links > a, body:has(#home) .footer .footer-links > .link-btn { min-height: 0 !important; padding: 0 !important; border: 0 !important; color: var(--om-muted) !important; font: 400 13px/1.4 Arial, Helvetica, sans-serif !important; text-decoration: underline !important; text-transform: none !important; letter-spacing: 0 !important; }
body:has(#home) .footer .fc-about-link { order: 1; }
body:has(#home) .footer a[href="/privacy"] { order: 2; }
body:has(#home) .footer a[href="/terms"] { order: 3; }
body:has(#home) .footer a[href="/support"] { order: 4; }
body:has(#home) .footer #adChoicesBtn { order: 5; }
body:has(#home) .footer #adChoicesBtn[hidden] { display: none !important; }

/* Home: one column, modes on top, one mode at a time. No entrance fade, like the other games: it
   starts the page transparent, so nothing shows until the main thread is free to run it. */
body #home .hero-panel { animation: none !important; }
body #home .hero-panel, body #home #homeStack { max-width: 560px; margin-left: auto; margin-right: auto; }
body #home #homeStack { display: block !important; }
body #home #homeStack > section, body #home #homeStack > .live-pulse { margin-top: 0; }
body #home #homeStack .outmark-hero, body #home #homeStack .live-pulse { display: none !important; }
.fc-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 0 0 6px; padding: 3px; border-radius: 12px; background: #ece4d6; }
.fc-tab { min-height: 36px; border: 0; border-radius: 9px; background: none; color: #68645f; font: 800 14px/1 Arial, Helvetica, sans-serif; cursor: pointer; }
.fc-tab small { font-size: 11px; font-weight: 700; opacity: .8; }
.fc-tab[aria-selected="true"] { background: #101010; color: #fff; }
.fc-tab:focus-visible { outline: 3px solid var(--om-accent); outline-offset: 2px; }

body #home #homeStack[data-tab] > #botGauntlet, body #home #homeStack[data-tab] > .hm-today, body #home #homeStack[data-tab] > .hm-people { display: none !important; }
body #home #homeStack[data-tab="bots"] > #botGauntlet, body #home #homeStack[data-tab="daily"] > .hm-today,
body #home #homeStack[data-tab="friends"] > .hm-people, body #home #homeStack[data-tab="party"] > .hm-people { display: block !important; }
body #home #homeStack[data-tab="friends"] #partyBtn, body #home #homeStack[data-tab="party"] #strangerBtn, body #home #homeStack[data-tab="party"] #challengeBtn { display: none !important; }

/* Bots: "Playing Milo" and a board to tap. The ladder and its detail stay for the Fives code to drive. */
body #home #homeStack #botGauntlet { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
body #home #homeStack #botGauntlet > .hm-head, body #home #homeStack #botGauntlet > .bot-ladder, body #home #homeStack #botGauntlet > #botDetail { display: none !important; }
.fc-bot { display: block; }
.fc-board { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); width: min(100%, calc(100vh - 230px)); min-width: min(100%, 300px); margin-left: auto !important; margin-right: auto !important; aspect-ratio: 1; margin: 6px 0 0; padding: 0; overflow: hidden; border: 4px solid #101010; border-radius: 24px; background: #fbf5ea; cursor: pointer; }
.fc-board i { border-right: 3px solid #101010; border-bottom: 3px solid #101010; }
.fc-board i:nth-child(6n) { border-right: 0; }
.fc-board i:nth-child(n+31) { border-bottom: 0; }
.fc-board-cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 14px 22px; border-radius: 999px; background: #6547ff; color: #fff; font: 800 17px/1 Arial, sans-serif; white-space: nowrap; box-shadow: 0 6px 0 #3f26c4; }
.fc-board:hover .fc-board-cta { background: #5634ff; }
.fc-board:active .fc-board-cta { transform: translate(-50%, calc(-50% + 3px)); box-shadow: 0 3px 0 #3f26c4; }
.fc-board:focus-visible { outline: 3px solid var(--om-accent); outline-offset: 3px; }

/* Daily, Friends and Party: just their cards, no section chrome. */
body #home #homeStack .hm-today > .hm-head, body #home #homeStack .hm-today > .hm-today-line, body #home #homeStack .hm-today #suiteToday,
body #home #homeStack .hm-people > .hm-head { display: none !important; }
body #home #homeStack .hm-today, body #home #homeStack .hm-people { padding-top: 6px; }
body #home #homeStack .hm-people-grid { grid-template-columns: 1fr !important; }

/* Records and badges sit quietly under every mode. */
body #home #homeStack .hm-you { margin-top: 22px; }
@media (prefers-reduced-motion: reduce) { .fc-board-cta { transition: none; } }

/* "How to play" stays in the header at every width. */
body:has(#home) .brand-actions #howToPlayBtn.how-help-toggle { display: grid !important; place-items: center; }
.fc-more { display: block; margin: 2px auto 0; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--om-accent); font: 700 14px Arial, sans-serif; cursor: pointer; }
.fc-more:hover { background: #efe8fb; }

/* Waiting for a friend: a clear way back home. */
#waitingPanel { position: relative; }
.waiting-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid #101010; border-radius: 50%; background: #fff; color: #101010; cursor: pointer; }
.waiting-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.waiting-close:hover { background: #d6ef40; }
.waiting-close:focus-visible { outline: 3px solid #6547ff; outline-offset: 2px; }
.waiting-note { max-width: 420px; margin: 16px auto 0 !important; color: #68645f; font-size: 13.5px !important; }
