/* Public moments float lightly over the island. */
#activity{position:fixed;z-index:8;right:86px;top:80px;width:min(400px,36vw);padding:14px 18px;border:1px solid #b2cabc38;border-radius:14px;background:#07313de8;color:#f4efdc;box-shadow:0 6px 22px #00151f44;overflow:auto;max-height:38vh;font-size:.9rem;line-height:1.35;touch-action:pan-y}
#activity[hidden],#harvestStage[hidden],body:not([data-screen="game"]) :is(#activity,#harvestStage){display:none!important}
.activity-heading{display:flex;align-items:center;gap:10px;font-size:1rem}.activity-heading img{flex:none}.activity-heading strong{overflow-wrap:anywhere}
#activity p{margin:6px 0 0;color:#bfd5d0}.activity-exchange{display:flex;align-items:center;justify-content:center;gap:14px;margin:12px 0}.activity-resources{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}.activity-resources>span{display:inline-flex;align-items:center;gap:3px}.activity-replies{display:flex;flex-wrap:wrap;gap:6px;font-size:.78rem}.activity-replies>span{border:1px solid #bcd4c24d;padding:3px 7px;border-radius:10px}.reply-yes{background:#42684e;color:#f0f7cf}.reply-no{opacity:.6}.reply-counter{background:#785f34;color:#ffecb5}.reply-wait{animation:considering 2s ease-in-out infinite}.activity-counter{padding-top:5px;font-size:.8rem}
@keyframes considering{50%{border-color:#d6bf7b;background:#b49c4933}}

.seat.received{filter:drop-shadow(0 0 12px #ffe39a)!important}.seat-receipt{position:absolute;z-index:8;left:50%;top:10%;transform:translateX(-50%);display:flex;align-items:center;padding:3px 8px;gap:4px;background:#093d44f2;color:#fff0bb;border:1px solid #d4e9b63d;box-shadow:0 4px 12px #00182455;border-radius:12px;font-size:.92rem;text-shadow:none;animation:receipt-soft 1.05s ease-out both}
.trade-recipient{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px 0;font-size:1rem}.trade-recipient select{max-width:100%;min-width:0;font:inherit;min-height:48px;border:1px solid #8b673c;background:#f4e5c4;color:#352414;padding:8px 12px;border-radius:3px}
.text-size-options{display:flex;flex-wrap:wrap;gap:10px}.text-size-options button{flex:1 1 160px;min-height:48px;padding:10px}
.settings-example{background:#c39d5733;border:1px solid #a78044;padding:15px;font-size:1rem;line-height:1.5}
.settings-toggle{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px 0;border-top:1px solid #86633366}.settings-toggle span{display:flex;flex-direction:column;gap:6px;min-width:0}.settings-toggle small{font-size:.84rem}.settings-toggle input{flex:none;width:28px;height:28px;accent-color:#923723}
.home-options{display:flex;flex-direction:column;gap:8px;align-items:center;white-space:normal;width:min(330px,90vw)}.home-options button{width:100%}
#bLobbySettings{position:absolute;top:-66px;left:-7px;width:44px;padding:4px;z-index:4}#bLobbyBack{z-index:4}
body:has(#sheet.on) #lobby{visibility:hidden}
#controlbar{height:auto!important;min-height:80px;flex-wrap:wrap;padding-bottom:var(--safe-b)}
#acts{flex-wrap:wrap;min-width:0}#controlbar>button,#acts button{white-space:normal;line-height:1.2}
#sheet .sheet-title{height:auto;min-height:70px;flex-shrink:0;padding-top:12px;padding-bottom:22px;background-size:100% 100%}
#sheet :is(.build-cta,.sub,.hint,.resource-name,.trade-summary){overflow-wrap:anywhere}
html[data-text-size="large"] .character-name{white-space:normal;overflow-wrap:anywhere}
html[data-text-size="large"] .step-head{flex-wrap:wrap;height:auto;line-height:1.25}html[data-text-size="large"] .step-name{white-space:normal;overflow:visible}
html[data-text-size="large"] .step-tag{max-width:100%;white-space:normal}
html[data-text-size="large"] .help .hl{flex-wrap:wrap}
html[data-text-size="large"] .build-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-text-size="large"] .sheet-title h3{overflow-wrap:anywhere}
html[data-motion="reduced"] *,html[data-motion="reduced"] *::before,html[data-motion="reduced"] *::after{animation:none!important;transition:none!important}
body.tv #activity{font-size:1.05rem;width:min(480px,38vw)}
@media(max-width:760px){
  #activity{left:10px;right:auto;top:auto;bottom:calc(var(--bottom-height,150px) + 10px);width:calc(100vw - 20px);padding:9px 12px;max-height:24vh;font-size:.78rem}
  .activity-heading{font-size:.88rem;gap:6px}.activity-heading img{width:24px;height:24px}#activity p{font-size:.76rem}.activity-exchange{margin:7px 0}.activity-replies{font-size:.72rem}
  #bLobbySettings{top:-46px;left:-12px;font-size:1.1rem;width:36px;min-height:36px}
  #controlbar{padding-top:4px;min-height:104px}#acts{gap:7px 14px;padding:4px 8px}
  #purse{flex-wrap:wrap;gap:4px 8px;padding:6px 12px;clip-path:none}#purse .res{min-width:0}
  #top{top:calc(var(--players-bottom,106px) + 5px)}#tools{top:calc(var(--players-bottom,106px) + 48px)}
  #sheet .sheet-title{min-height:64px}
  html[data-text-size="large"] .character-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-text-size="large"] .build-grid{grid-template-columns:1fr}
  html[data-text-size="large"] .trade-resource{grid-template-columns:40px 1fr 1fr;grid-template-rows:auto auto}
  html[data-text-size="large"] .trade-resource>.ricon{grid-row:1;grid-column:1}
  html[data-text-size="large"] .trade-resource h4{grid-row:1;grid-column:2/4;align-self:start}
  html[data-text-size="large"] .trade-resource small{grid-row:1;grid-column:2/4;align-self:end;padding-top:25px}
  html[data-text-size="large"] .trade-resource>[data-give]{grid-row:2;grid-column:1/3}
  html[data-text-size="large"] .trade-resource>[data-receive]{grid-row:2;grid-column:3}
  html[data-text-size="large"] .domestic-resource{grid-template-columns:42px minmax(0,1fr)}
  html[data-text-size="large"] .domestic-adjust{grid-column:1/-1;justify-content:center}
  html[data-text-size="large"] .resource-quantity{grid-template-columns:36px minmax(0,1fr)}
  html[data-text-size="large"] .quantity-controls{grid-column:1/-1;justify-content:center}
  html[data-text-size="large"] .sheetbox{max-height:calc(100dvh - 80px)}
  html[data-text-size="large"] .lobby-heading{font-size:1.35rem;width:min(280px,85vw)}
  html[data-text-size="large"] .lobby-tools button{flex-basis:100%}
  body.tv #activity{width:calc(100vw - 20px);bottom:12px}
  html[data-text-size="large"] #seats{gap:3px;overflow-x:auto;justify-content:flex-start;padding-bottom:6px;max-width:calc(100vw - 12px)}
  html[data-text-size="large"] #seats .seat{flex:none;width:82px;max-width:none;height:114px}
  html[data-text-size="large"] #seats .seat .nm{font-size:.8rem;white-space:normal;overflow-wrap:anywhere;line-height:1.15;top:53px;max-height:34px;padding:1px 2px}
  html[data-text-size="large"] #seats .seat .l2{bottom:2px}
}
@media(max-height:500px) and (min-width:761px){#activity{top:65px;right:70px;width:290px;max-height:30vh}}
/* Flexible headings and stat rows also apply to the more specific compact skins. */
#sheet:has(.domestic-grid) .sheet-title,#sheet:has(.build-grid) .sheet-title{height:auto;min-height:70px;padding-top:12px;padding-bottom:22px}
@media(max-width:760px){
  body[data-screen="game"] #top{top:calc(var(--players-bottom,115px) + 5px)}
  body[data-screen="game"] #tools{top:calc(var(--top-bottom,175px) + 8px)}

  html[data-text-size="large"] #seats .seat{display:flex;flex-direction:column;height:auto;min-height:135px;width:96px;max-width:96px}
  html[data-text-size="large"] #seats .seat>.avatar{position:relative;left:auto;top:auto;width:64px;height:64px;align-self:center;flex:none}
  html[data-text-size="large"] #seats .seat .nm{position:static;min-height:33px;max-height:none;line-height:1.2;flex:none;white-space:normal}
  html[data-text-size="large"] #seats .seat .l2{position:static;flex-wrap:wrap;min-height:36px;flex:none;padding:4px 2px}
  html[data-text-size="large"] #seats .seat .vp{width:100%;border:0}
  html[data-text-size="large"] #seats .seat .mini b{font-size:.72rem}
  html[data-text-size="large"] #seats .seat .vp{font-size:.8rem}
  html[data-text-size="large"] #purse .res{flex-direction:column;gap:1px}
}
@media(max-width:760px){
  body[data-screen="game"]:has(#players) #top{top:calc(var(--players-bottom,115px) + 5px)}
  body[data-screen="game"]:has(#players) #tools{top:calc(var(--top-bottom,175px) + 8px)}
  html[data-text-size="large"] #sheet .sheet-title{background:none;border-bottom:1px solid #b48c52;padding-bottom:16px}
  html[data-text-size="large"] #sheet .sheet-title h3{color:#652b1d;text-shadow:none}
}
.resource-check{height:auto;min-height:12px;line-height:1.1}
@media(min-width:761px){
  html[data-text-size="large"] #players{max-height:calc(100dvh - 30px);overflow:auto;padding:3px 8px 3px 0}
  html[data-text-size="large"] #seats .seat{display:flex;flex-direction:column;flex:none;width:144px;height:auto}
  html[data-text-size="large"] #seats .seat>.avatar{position:static;align-self:center;width:100px;height:106px;flex:none}
  html[data-text-size="large"] #seats .seat .nm{position:static;font-size:1rem;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
  html[data-text-size="large"] #seats .seat .l2{position:static;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:5px;padding:4px 0}
  html[data-text-size="large"] #seats .seat .mini{font-size:.8rem;gap:3px}
  html[data-text-size="large"] #seats .seat .desktop-vp{display:none}
  html[data-text-size="large"] #seats .seat .mobile-vp{position:static;display:inline-flex;align-items:center;width:auto;height:auto;border:none;background:none;box-shadow:none;font-size:.8rem;gap:3px;color:#ffe09a}
  html[data-text-size="large"] #seats .seat .mobile-vp::after{content:'VP';font-size:.55rem}
}

/* Small floating counters let the island carry the reward, not a parchment banner. */
#harvestStage{position:fixed;z-index:8;left:50%;right:auto;top:calc(var(--top-bottom,95px) + 12px);transform:translateX(-50%);display:flex;align-items:center;gap:12px;width:max-content;max-width:min(260px,calc(100vw - 40px));min-height:58px;padding:9px 16px 9px 9px;border:1px solid #d4ead72c;border-radius:40px;background:#062e3bea;color:#fff4d6;box-shadow:0 6px 22px #00151f55;pointer-events:none;overflow:hidden;opacity:1;transition:opacity .28s ease,translate .28s ease;animation:reward-appear .4s ease-out}
#harvestStage.fading{opacity:0;translate:0 -6px}
#harvestStage .harvest-number{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:50%;background:#ffffff0d;color:#f4d996;font-size:1.65rem;font-weight:600;line-height:1;text-shadow:none;animation:none}
#harvestStage .harvest-copy{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0;line-height:1.15}
#harvestStage .harvest-copy strong{font-size:1.25rem;font-weight:600;font-variant-numeric:tabular-nums}
#harvestStage .harvest-copy small{font-size:.7rem;max-width:74px;color:#cbdfda;font-variant:normal;line-height:1.25}
#harvestStage .harvest-copy img{width:30px;height:30px;filter:drop-shadow(0 2px 4px #0005)}
@keyframes reward-appear{from{opacity:0;translate:0 7px}to{opacity:1;translate:0 0}}
.flycard.reward{width:48px;height:48px;border:0;border-radius:0;background:none;box-shadow:none}
.flycard.reward img{width:44px;height:44px;filter:drop-shadow(0 3px 5px #04151e77) drop-shadow(0 0 7px #f7da8866)}
.flycard.reward.trail{filter:blur(3px)}
@keyframes receipt-soft{0%{opacity:0;translate:0 4px;scale:.9}18%{opacity:1;scale:1}70%{opacity:1}100%{opacity:0;translate:0 -22px}}
@media(max-width:760px){
 #harvestStage{top:calc(var(--top-bottom,170px) + 8px);padding:7px 12px 7px 7px;min-height:50px;gap:9px;max-width:calc(100vw - 100px)}
 #harvestStage .harvest-number{width:36px;height:36px;font-size:1.45rem}
 #harvestStage .harvest-copy strong{font-size:1.1rem}
 #activity,body.tv #activity{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px)}
}
