:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#17324d;background:#cfeeff;color-scheme:light}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}.bar{height:52px;padding:0 18px;display:flex;align-items:center;gap:18px;background:#e8f7ff;border-bottom:1px solid #a9d8f2}.account-tools{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0}.bar strong{font-size:15px;white-space:nowrap}.library{color:#1c5f9c;text-decoration:none;min-height:48px;display:flex;align-items:center;white-space:nowrap}#sync{margin-left:auto;color:#3d6280;font-size:12px}button{min-height:48px;min-width:48px;border:0;border-radius:999px;padding:8px 16px;background:#ffcf3f;color:#3a2a00;font:inherit;font-weight:650;cursor:pointer}button:disabled{opacity:.6;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #1c5f9c;outline-offset:3px}#game{display:block;width:100%;height:calc(100dvh - 52px - var(--notice-h,0px));border:0;background:#9fd8ff}#loading,#conflict{position:absolute;top:52px;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center;background:#cfeeff}#loading h1,#conflict h1{font-size:clamp(23px,4vw,34px);margin:0 0 8px}#loading p,#conflict p{color:#3d6280;line-height:1.5;margin:0 0 20px}#loading button,#conflict button{margin:6px}[hidden]{display:none!important}@media(max-width:620px){.bar{height:116px;padding:7px 12px;gap:4px 12px;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:48px 48px}.account-tools{grid-column:1 / -1;width:100%;margin-left:0}.bar strong{margin-right:0;min-width:0;white-space:normal;font-size:13px;line-height:1.2}#sync{order:3;margin-left:0;flex:1 1 50%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}#account{flex:none;order:4;min-height:48px;padding:5px 12px;font-size:12px}#game{height:calc(100dvh - 116px - var(--notice-h,0px))}#loading,#conflict{top:116px;padding:20px}}
/* While the game loads, a glimpse of the farm behind the message. */
#loading,#conflict{z-index:2}
#loading{background:linear-gradient(rgba(232,247,255,.8),rgba(232,247,255,.92)),url('../../assets/fluffle-farm/poster.webp') center/cover no-repeat,#cfeeff}
/* The leaderboard (leaderboard.js): a Material 3 dialog over the game. */
button.tonal{background:#d6ecff;color:#0e3f6b}button.text{background:none;color:#1c5f9c;padding:8px 12px}button.icon{min-height:48px;width:48px;padding:0;background:none;color:#17324d;font-size:18px}
#leaderboard{width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:20px 24px;border:0;border-radius:28px;background:#f7fbff;color:#17324d;box-shadow:0 8px 32px rgba(23,50,77,.28)}
#leaderboard::backdrop{background:rgba(23,50,77,.45)}
#leaderboard[open]{display:flex;flex-direction:column;gap:10px}
.board-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.board-head h2{margin:0;font-size:24px;font-weight:600}
.board-pick{display:flex;align-items:center;gap:10px;font-size:14px;color:#3d6280}
.board-pick select,#board-name{min-height:48px;padding:6px 12px;border:1px solid #73a2c6;border-radius:8px;background:#fff;color:#17324d;font:inherit;font-size:15px}
#board-status,#my-position,#board-account{margin:0;font-size:14px;color:#3d6280}#my-position{font-weight:650;color:#17324d}
.board-table{overflow:auto;min-height:120px;border-radius:16px;background:#fff;border:1px solid #d3e6f5}
.board-table table{width:100%;border-collapse:collapse;font-size:14px}
.board-table th{position:sticky;top:0;background:#e8f4ff;text-align:left;font-weight:650;padding:8px 10px;white-space:nowrap}
.board-table td{padding:8px 10px;border-top:1px solid #e4eef7;white-space:nowrap}.board-table td:nth-child(2){white-space:normal;word-break:break-word}
.board-table tr.own-score td{background:#fff6cf;font-weight:650}
.board-account{display:grid;gap:8px;padding:12px 14px;border-radius:16px;background:#e8f4ff}
#board-name-label{display:flex;align-items:center;gap:10px;font-size:14px}#board-name{flex:1;min-width:0}
.board-actions{display:flex;flex-wrap:wrap;gap:8px}.board-actions:has(> :not([hidden])){min-height:40px}
.board-rules{margin:0;font-size:12px;line-height:1.45;color:#3d6280}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(max-width:620px){#sync{flex:1 1 30%}#account{order:5}#boards{flex:none;order:4;min-height:48px;padding:5px 10px;font-size:14px}#boards .label{display:none}#leaderboard{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}.board-head h2{font-size:20px}.board-table th:nth-child(5),.board-table td:nth-child(5),.board-table th:nth-child(6),.board-table td:nth-child(6){display:none}}
/* Give the game its usable landscape height while retaining account controls. */
@media(max-height:500px) and (max-width:620px) and (orientation:landscape){
 .bar{height:52px;display:flex;padding:2px 10px;gap:8px;}
 .bar strong,#sync{display:none;}
 .account-tools{width:auto;margin-left:auto;gap:8px;}
 #game{height:calc(100dvh - 52px - var(--notice-h,0px));}
 #loading,#conflict{top:52px;}
}
/* Playing as a guest in a browser that has signed in before: a gentle note under the account button. */
#guest-notice{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-height:48px;padding:0 4px 0 16px;background:#fff6cf;color:#4a3a00;border-bottom:1px solid #f0d77a}
#guest-notice p{margin:4px 0;font-size:13px;line-height:1.35;text-align:right}
#guest-notice button.icon{flex:none;color:#4a3a00}
@media(max-width:620px){#guest-notice{justify-content:space-between;padding-left:12px}#guest-notice p{text-align:left;font-size:12px}}
/* The host's own dialogs (signing out, guest pets): Material 3 basic dialogs over the game. */
.host-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:0;border-radius:28px;background:#f7fbff;color:#17324d;box-shadow:0 8px 32px rgba(23,50,77,.28)}
.host-dialog::backdrop{background:rgba(23,50,77,.45)}
.host-dialog h2{margin:0 0 12px;font-size:22px;line-height:1.3;font-weight:600}
.host-dialog p{margin:0 0 12px;font-size:15px;line-height:1.5;color:#3d6280}
.pet-list{margin:0 0 12px;padding:0;list-style:none;display:grid;gap:6px}
.pet-list li{padding:10px 14px;border-radius:12px;background:#e8f4ff;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
#merge-staying-list li{background:#fff6cf}
.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}
.dialog-actions button.text{margin-right:auto}
@media(max-width:620px){.host-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:20px}.host-dialog h2{font-size:20px}.dialog-actions button{flex:1 1 auto}}
