/* Outmark hub: one compact column. Streak and week, today's dailies, the bots, friends. */
:root {
  --hub-bg: #f4f0e8; --hub-paper: #fffcf7; --hub-ink: #141414; --hub-muted: #736d64; --hub-line: #e5ddd0;
  --hub-purple: #6547ff; --hub-coral: #ff5d4c; --hub-lime: #d6ef40; --hub-green: #2e7d32; --hub-day: #ece5d9;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--hub-bg); color: var(--hub-ink); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.hub-top, .hub { width: min(100% - 32px, 640px); margin: 0 auto; }
.hub { display: grid; gap: 22px; padding: 4px 0 36px; }
.hub-section { display: grid; gap: 10px; min-width: 0; }
.hub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.hub-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.hub-head > span { color: var(--hub-muted); font-size: 13.5px; text-align: right; }
.hub-head > span.all { color: var(--hub-green); font-weight: 800; }
:where(.hub-bot, .hub-bell, .hub-info, .hub-friends summary, .hub a):focus-visible { outline: 3px solid var(--hub-purple); outline-offset: 2px; }

/* Header: logo, the friend-games bell, the player chip. */
.hub-top { display: flex; align-items: center; gap: 6px; padding: 14px 0 10px; }
.hub-logo { margin-right: auto; }
.hub-logo img { display: block; width: 136px; height: auto; }
.hub-bell-wrap { position: relative; }
.hub-bell { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.hub-bell:hover, .hub-bell.open { background: #e8e1d5; }
.hub-bell svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.hub-bell i { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--hub-bg); border-radius: 9px; background: var(--hub-coral); color: #fff; font: 800 11px/14px Arial, sans-serif; font-style: normal; text-align: center; }
.hub-inbox { position: absolute; top: 50px; right: -52px; z-index: 20; width: min(320px, calc(100vw - 24px)); padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 16px 40px rgba(20, 16, 10, .22), 0 0 0 1px var(--hub-line); }
.hub-inbox h3 { margin: 0; padding: 6px 8px 4px; color: var(--hub-muted); font-size: 13px; }
.hub-note { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 14px; text-decoration: none; }
.hub-note:hover { background: #f6f3ee; }
.hub-note.mine { background: #f3efff; }
.hub-note-copy { display: grid; min-width: 0; }
.hub-note-copy b { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.hub-note-copy small { color: var(--hub-muted); font-size: 12.5px; }
.hub-note-state { flex: 0 0 auto; margin-left: auto; color: var(--hub-muted); font-size: 13px; font-weight: 700; }
.hub-note.mine .hub-note-state { color: var(--hub-purple); font-weight: 800; }
.hub-note-empty { margin: 0; padding: 4px 8px 10px; color: var(--hub-muted); font-size: 14px; }
.hub-mini-art, .hub-mini-art svg { display: block; flex: 0 0 auto; width: 34px; height: 34px; }

.hub-intro { margin: 2px 4px 0; color: var(--hub-muted); font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }

/* Streak card: the count and what keeps it, with this week as seven days. */
.hub-week { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 20px; background: var(--hub-paper); box-shadow: 0 0 0 1px var(--hub-line); }
.hub-week h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.hub-week p { margin: 2px 0 0; max-width: 150px; color: var(--hub-muted); font-size: 12.5px; line-height: 1.3; }
.hub-week.at-risk p { color: var(--hub-coral); font-weight: 700; }
.hub-info { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hub-muted); font: italic 700 12px/1 Georgia, serif; cursor: pointer; box-shadow: inset 0 0 0 1.5px currentColor; }
.hub-info[aria-expanded="true"] { background: var(--hub-ink); color: #fff; box-shadow: none; }
.hub-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; text-align: center; }
.hub-days small { display: block; color: var(--hub-muted); font-size: 10.5px; font-weight: 700; }
.hub-days i { display: grid; place-items: center; height: 26px; margin-top: 3px; border-radius: 8px; background: var(--hub-day); color: #fff; }
.hub-days i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.hub-days .on i { background: var(--hub-coral); }
.hub-days .today i { box-shadow: inset 0 0 0 2px var(--hub-ink); }
.hub-days .today small { color: var(--hub-ink); }
.hub-days .sweep i { background: linear-gradient(145deg, #ffd85c, #f2bd39 55%, #e3a21a); color: var(--hub-ink); box-shadow: 0 2px 8px rgba(226, 160, 26, .45); }
.hub-days .sweep.today i { box-shadow: inset 0 0 0 2px var(--hub-ink), 0 2px 8px rgba(226, 160, 26, .45); }
.hub-days .pop i { animation: hub-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
.hub-week-help { grid-column: 1 / -1; margin: 0 !important; max-width: none !important; padding-top: 10px; border-top: 1px solid var(--hub-line); color: var(--hub-ink) !important; font-size: 13.5px !important; font-weight: 400 !important; line-height: 1.4 !important; }

/* Clean sweep: a gold card while every daily is solved today. */
.hub-sweep { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 14px 14px 14px 16px; border-radius: 20px; background: linear-gradient(135deg, #fff4cc, #ffe08a); box-shadow: 0 0 0 1px #f0cf6a; }
.hub-sweep.fresh { animation: hub-rise .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.hub-sweep-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, #ffd85c, #e3a21a); box-shadow: 0 3px 10px rgba(226, 160, 26, .5); }
.hub-sweep-badge svg { width: 24px; height: 24px; fill: none; stroke: var(--hub-ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.hub-sweep h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.hub-sweep-copy p { margin: 1px 0 0; color: #6b5413; font-size: 13px; line-height: 1.3; }
.hub-sweep-share { padding: 9px 16px; border: 0; border-radius: 99px; background: var(--hub-ink); color: #fff; font-weight: 800; cursor: pointer; }
.hub-sweep-share:hover { background: var(--hub-purple); }
.hub-sweep-support { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 10px; border-top: 1px solid rgba(107, 84, 19, .18); color: #6b5413; font-size: 13px; }
.hub-sweep-support button { padding: 0; border: 0; background: none; color: var(--hub-ink); font-weight: 800; text-decoration: underline; cursor: pointer; }
html:not([data-supporter-offer="on"]) .hub-sweep-support { display: none; }
.hub-burst { position: fixed; z-index: 30; width: 0; height: 0; pointer-events: none; }
.hub-bit { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; animation: hub-fly 1.1s cubic-bezier(.15, .7, .3, 1) both; }
.hub-bit.o { border: 3.5px solid var(--hub-coral); border-radius: 50%; }
.hub-bit.x::before, .hub-bit.x::after { content: ""; position: absolute; top: 6px; left: -1px; width: 18px; height: 4px; border-radius: 2px; background: var(--hub-purple); transform: rotate(45deg); }
.hub-bit.x::after { transform: rotate(-45deg); }
.hub-bit.gold.o { border-color: #f2bd39; }
.hub-bit.gold.x::before, .hub-bit.gold.x::after { background: #f2bd39; }
@keyframes hub-fly { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 40px)) rotate(var(--spin)) scale(1); } }
@keyframes hub-pop { 0% { transform: scale(.6) rotateY(180deg); } 100% { transform: scale(1) rotateY(0); } }
@keyframes hub-rise { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Today's dailies: a tile per game in the game's own colors. */
.hub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-tile { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 118px; padding: 12px 14px 13px; border-radius: 22px; background: var(--tile-bg); color: var(--tile-ink); text-decoration: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .07); transition: transform .12s; }
.hub-tile:active { transform: scale(.98); }
.hub-tile-art { width: 48px; height: 48px; margin-bottom: auto; border-radius: 13px; overflow: hidden; }
.hub-tile-art svg { display: block; width: 100%; height: 100%; }
.hub-tile b { margin-top: 10px; font-size: 18px; line-height: 1.1; letter-spacing: -.02em; }
.hub-tile small { margin-top: 2px; overflow: hidden; font-size: 12.5px; opacity: .72; text-overflow: ellipsis; white-space: nowrap; }
.hub-tile-badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: #141414; font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.hub-tile.done .hub-tile-badge { background: var(--hub-lime); }
.hub-tile-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Bots: four portrait cards; the chevron says each one opens. */
.hub-bots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hub-bot { display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 10px 4px 6px; border: 0; border-radius: 18px; background: var(--hub-paper); text-align: center; cursor: pointer; box-shadow: 0 0 0 1px var(--hub-line); transition: box-shadow .12s; }
.hub-bot:hover { box-shadow: 0 0 0 1.5px #b9b0a2; }
.hub-bot[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--hub-ink); }
.hub-bot img { width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; object-fit: cover; background: #eee6d8; }
.hub-bot b { font-size: 14px; }
.hub-bot-wins { color: var(--hub-muted); font-size: 12px; white-space: nowrap; }
.hub-bot.beaten .hub-bot-wins { color: var(--hub-green); font-weight: 800; }
.hub-bot-more { display: grid; place-items: center; height: 16px; margin-top: 2px; color: #a59d90; }
.hub-bot-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transition: transform .15s; }
.hub-bot[aria-expanded="true"] .hub-bot-more { color: var(--hub-ink); }
.hub-bot[aria-expanded="true"] .hub-bot-more svg { transform: rotate(-90deg); }

.hub-bot-detail { padding: 14px 16px 8px; border-radius: 20px; background: var(--hub-paper); box-shadow: 0 0 0 1px var(--hub-line); animation: hub-open .16s ease-out; }
.hub-bot-detail h3 { margin: 0; font-size: 16px; }
.hub-bot-detail-head p { margin: 2px 0 0; color: var(--hub-muted); font-size: 13px; }
.hub-bot-games { margin: 8px 0 0; padding: 0; list-style: none; }
.hub-bot-games li + li { border-top: 1px solid var(--hub-line); }
.hub-bot-games a { display: grid; grid-template-columns: 34px minmax(0, 1fr) 56px auto; align-items: center; gap: 12px; padding: 9px 0; text-decoration: none; }
.hub-bot-game { display: grid; min-width: 0; }
.hub-bot-game b { font-size: 15px; }
.hub-bot-game small { color: var(--hub-muted); font-size: 12.5px; }
.hub-meter { height: 6px; border-radius: 3px; background: var(--hub-day); overflow: hidden; }
.hub-meter i { display: block; height: 100%; border-radius: 3px; background: var(--hub-green); }
.hub-go { padding: 7px 13px; border-radius: 99px; background: var(--hub-ink); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
a:hover > .hub-go { background: var(--hub-purple); }

/* Play a friend: closed by default, one row per game inside. */
.hub-friends { border-radius: 20px; background: var(--hub-paper); overflow: hidden; box-shadow: 0 0 0 1px var(--hub-line); }
.hub-friends summary { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px 10px 16px; cursor: pointer; list-style: none; }
.hub-friends summary::-webkit-details-marker { display: none; }
.hub-friends summary b { font-size: 16px; white-space: nowrap; }
.hub-friends summary span { margin-left: auto; overflow: hidden; color: var(--hub-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hub-friends summary svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: #a59d90; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transition: transform .15s; }
.hub-friends[open] summary svg { transform: rotate(-90deg); stroke: var(--hub-ink); }
.hub-friend-list, .hub-rivals { animation: hub-open .16s ease-out; }
.hub-friend { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px 10px 16px; border-top: 1px solid var(--hub-line); text-decoration: none; }
.hub-friend b { font-size: 16px; }
.hub-friend .hub-go { margin-left: auto; background: var(--hub-purple); }
.hub-friend:hover .hub-go { background: var(--hub-ink); }
.hub-rivals { display: grid; gap: 0; padding: 4px 16px 10px; border-top: 1px solid var(--hub-line); }
.hub-rivals h3 { margin: 8px 0 2px; color: var(--hub-muted); font-size: 13px; }
.hub-rival { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px 0; }
.hub-rival + .hub-rival { border-top: 1px solid var(--hub-line); }
.hub-rival b { font-size: 14.5px; }
.hub-rival small { grid-column: 1 / -1; color: var(--hub-muted); font-size: 12.5px; }
.hub-rival-score { color: var(--hub-purple); font-size: 13px; font-weight: 800; white-space: nowrap; }

.hub-support { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--hub-ink); color: #fff; text-decoration: none; }
.hub-support span { display: grid; gap: 3px; }
.hub-support small { color: #cfcbd8; font-size: 13px; line-height: 1.35; }
.hub-support b { flex: 0 0 auto; color: var(--hub-lime); }
.hub-footer { display: flex; justify-content: center; gap: 18px; padding-top: 4px; font-size: 13px; }
.hub-footer a { color: var(--hub-muted); }

@keyframes hub-open { from { opacity: 0; transform: translateY(-4px); } }
@media (min-width: 600px) {
  .hub-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-week p { max-width: none; }
  .hub-inbox { right: -8px; }
}
@media (max-width: 359px) { .hub-week { grid-template-columns: 1fr; } .hub-week p { max-width: none; } }
@media (prefers-reduced-motion: reduce) { .hub-tile, .hub-bot, .hub-bot-more svg, .hub-friends summary svg { transition: none; } .hub-bot-detail, .hub-friend-list, .hub-rivals, .hub-sweep.fresh, .hub-days .pop i { animation: none; } }

/* The Supporter card waits until purchases are switched on (monetization.js sets the flag). */
html:not([data-supporter-offer="on"]) #supportCard { display: none !important; }
/* Hold the space hub.js fills in, so later sections do not jump. --rows is tile rows on a phone. */
#hubToday:empty { min-height: calc(var(--rows, 2) * 118px + (var(--rows, 2) - 1) * 10px); }
#hubBots:empty { min-height: 124px; }
#hubDays:empty { min-height: 43px; }
@media (min-width: 600px) { #hubToday:empty { min-height: 118px; } }
