/* Shared interface: all navigation, dialogs and exchange sizing live here. */
:root {
  --ink:#4c2d1b; --muted:#856247; --paper:#fff1db; --edge:#ddbc8d;
  --panel:linear-gradient(120deg,#fff7e9,#f8e6cc);
  --action:linear-gradient(#83d344,#3b951d);
  --text-shadow:0 1px 1px #62351580;
}
body,button,input,select,textarea { font-family:Nunito,Arial,sans-serif; }
body { font-weight:600; }
.game { padding-inline:0; min-height:0; height:100dvh; --navigation-height:calc(76px + env(safe-area-inset-bottom)); }
.game > .balances,.game > .island,.game > .harvest,.game > .partner-card { margin-left:12px; margin-right:12px; }
.game > .island { min-height:140px; }
.game > .bottom-nav {
  display:flex; position:relative; z-index:20; flex:0 0 var(--navigation-height);
  width:100%; height:var(--navigation-height); min-height:var(--navigation-height);
  margin:0; padding:5px 6px calc(7px + env(safe-area-inset-bottom));
  border-top:2px solid #c38d54; border-radius:22px 22px 0 0;
  background:linear-gradient(#a66b3d,#794421); box-shadow:inset 0 2px #dca66a;
}
.nav { position:relative; display:flex; flex:1; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:1px; padding:2px; border:2px solid transparent; border-radius:16px; background:none; color:#f9e3c6; font-size:clamp(10px,2.8cqw,14px); line-height:1.15; font-weight:800; text-shadow:var(--text-shadow); }
.nav.active { background:linear-gradient(#b67c37,#975c29); color:#fff8df; border-color:#ffe18b; box-shadow:0 0 4px #ffc94388,inset 0 0 4px #ffe49b66; }
.nav .icon,.nav-icon { width:36px; height:36px; }.nav-icon { position:relative; }.nav-icon .notification { right:0; top:0; }.nav:active { transform:none; }
.game.shop-open > .shop-view { flex:1; min-height:0; height:auto; }
.game.shop-open .shop-sheet { padding-bottom:12px; }
.task-content,.friends-scroll,.wallet-sheet { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.game .wallet-sheet { flex:1; }.wallet-actions,.wallet-tabs { flex-shrink:0; }
.shop-title h1,.tasks-topline h1,.wallet-hero h1,.top-hero h1 { font-weight:850; }
.shop-title h1 { text-shadow:0 1px 2px #24422677,0 0 6px var(--bird-glow); }
.balance output,.wallet-balance strong,.referral-levels b,.friend-totals strong { font-weight:850; letter-spacing:0; }
.game .collect { font-weight:850; letter-spacing:-.3px; font-size:clamp(17px,4.6cqw,25px); }
.showcase-description,.stat-row,.friend-row small,.wallet-row small { font-weight:600; text-shadow:none; }
.shop-purchase strong,.top-coins,.top-name { font-weight:800; text-shadow:var(--text-shadow); }
.game .tasks-view .task-item h2 { font-size:clamp(12px,3.25cqw,16px); font-weight:750; line-height:1.3; letter-spacing:0; }
.game .tasks-view .task-item { grid-template-columns:40px minmax(0,1fr) 76px; gap:8px; padding:9px; min-height:66px; }
.game .tasks-view .task-logo { width:40px; height:40px; }
.game .tasks-view .task-item p { font-size:14px; font-weight:800; }
.game .tasks-view .task-item > button { min-height:36px; font-size:12px; font-weight:800; }
.task-item,.friend-totals,.referral-levels,.friend-list,.bird-stats { background:var(--panel); border-color:var(--edge); box-shadow:inset 0 1px #fffaf2,0 1px 2px #79532614; }
.top-row { background:var(--panel); border:1px solid var(--edge); border-radius:15px; padding:9px 12px; min-height:60px; color:var(--ink); text-shadow:none; }
.top-list { gap:7px; }.top-name,.top-coins { text-shadow:none; }.top-self { border-color:#dba837; filter:none; box-shadow:inset 3px 0 #e8b63e; }
.primary,.green,.invite-button { font-weight:800; }
.wallet-actions .wallet-exchange { filter:drop-shadow(0 2px 1px #713a2333); transition:filter .15s,transform .15s; }
.wallet-actions .wallet-exchange:hover { filter:brightness(1.06) drop-shadow(0 2px 2px #713a2355); }
/* All modal variants use the same shell and close control. */
#modal { width:calc(100% - 28px); max-width:360px; max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow:auto; overscroll-behavior:contain; margin:auto; padding:22px 18px 18px; border:3px solid #b77d43; border-radius:24px; background:var(--panel); color:var(--ink); box-shadow:inset 0 0 0 1px #ffe5b8,0 15px 50px #09211370; font-family:Nunito,Arial,sans-serif; }
#modal::backdrop { background:#14281799; backdrop-filter:blur(4px); }
#modal .close { position:absolute; right:6px; top:6px; width:40px; height:40px; display:grid; place-items:center; padding:0; border:0; border-radius:50%; background:radial-gradient(circle,#935c30 0 48%,#deb176 50% 55%,transparent 57%); color:#fff2d5; font:800 24px/1 Nunito,sans-serif; z-index:3; }
#modal h2 { margin:4px 25px 14px; font-size:23px; font-weight:850; line-height:1.2; text-shadow:none; }
#modal p { font-size:14px; line-height:1.5; font-weight:600; text-shadow:none; }
#modal .primary { min-height:44px; padding:10px; border-radius:15px; font-size:15px; font-weight:800; background:var(--action); }
#modal .primary:disabled { background:#b4a58c; border-color:#99896d; box-shadow:none; text-shadow:none; opacity:.8; }
#modal .muted { font-size:12px; color:var(--muted); }
.bonus-modal-gift { width:56px; height:56px; }.bonus-day { min-height:92px; }.bonus-day strong { font-weight:800; }
.language-options button { min-height:44px; background:var(--panel); color:var(--ink); border:1px solid var(--edge); box-shadow:none; }
.language-options button[aria-pressed="true"] { color:#fff; background:var(--action); border-color:#598e33; }
/* Compact exchange, with one definitive rule per component. */
.gram-exchange { text-align:center; }.gram-exchange-art { display:flex; justify-content:center; align-items:center; height:40px; }
.gram-exchange-art .icon { width:42px; height:42px; transform:rotate(-12deg); }.gram-exchange-art img { width:38px; height:38px; margin-left:-5px; }
#modal .gram-exchange h2 { margin:7px 20px 3px; font-size:22px; }
#modal .gram-exchange-sub { margin:0 0 7px; font-size:12px; color:var(--muted); }
.gram-available { display:flex; align-items:center; justify-content:center; gap:7px; min-height:62px; padding:14px 10px 8px; background:url('assets/partner-wood-panel.webp') center/100% 100% no-repeat; color:#fff2d5; text-shadow:var(--text-shadow); }
.gram-available .icon { width:30px; height:30px; }.gram-available strong { font-size:18px; font-weight:700; line-height:1; }
.gram-amount-card { margin-top:8px; padding:11px; border:1px solid var(--edge); border-radius:16px; background:#fff8e5aa; text-align:left; }
.gram-amount-card label { display:block; font-size:13px; font-weight:700; margin-bottom:6px; }.gram-input-row { display:flex; gap:7px; }
.gram-input-row input { width:0; flex:1; min-width:0; min-height:44px; padding:7px 9px; border:1px solid #cda976; border-radius:11px; background:#fffbef; color:var(--ink); font:800 23px Nunito,sans-serif; }
.gram-input-row button { min-width:58px; padding:7px 10px; border:1px solid #cf952c; border-radius:11px; background:linear-gradient(#ffe18a,#ffc03b); color:#5b371c; font-size:13px; font-weight:800; box-shadow:inset 0 1px #fff5c1; }
.gram-amount-card small { display:block; text-align:center; margin-top:7px; font-size:11px; color:var(--muted); }
#exchange-error { display:block; margin-top:5px; font-size:12px; color:#a64227; }#exchange-error:empty { display:none; }
.gram-result { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:9px; padding:11px; border:1px solid #e6c88a; border-radius:16px; background:linear-gradient(120deg,#fffdf1,#ffeac3); text-align:left; }
.gram-result img { width:36px; height:36px; }.gram-result span { color:var(--muted); font-size:12px; }.gram-result strong { display:block; font-size:23px; font-weight:850; white-space:nowrap; }
.gram-submit { margin-top:11px; }.gram-exchange-note { display:block; margin-top:9px; font-size:11px; line-height:1.4; color:var(--muted); }
button:focus-visible,input:focus-visible { outline:3px solid #2e86b6; outline-offset:3px; }
#modal button:focus-visible { outline-color:#2e86b6; }
@media(prefers-reduced-motion:reduce) { .wallet-actions .wallet-exchange { transition:none; } }
@media(max-width:350px) { .game .tasks-view .task-item { grid-template-columns:34px minmax(0,1fr) 65px; gap:5px; padding:7px; }.game .tasks-view .task-logo { width:34px; height:34px; }.game .tasks-view .task-item h2 { font-size:11px; } }
@media(max-height:650px) { .game > .island { min-height:90px; }.game > .partner-card { min-height:90px; margin-top:8px; margin-bottom:8px; }.game > .harvest { margin-top:4px; }.gram-exchange-art { height:32px; }.gram-exchange-art .icon { width:34px; height:34px; }.gram-exchange-art img { width:32px; height:32px; }#modal { padding:18px 14px 14px; }.bonus-day { min-height:80px; padding:6px 3px; } }

/* Screen refinements after visual review. */
.game .flock .bird-group { width:33%; }.game .flock .blue { left:5%; top:27%; }.game .flock .red { right:19%; top:25%; }.game .flock .yellow { left:0; bottom:3%; }.game .flock .white { left:32%; bottom:0; }.game .flock .purple { right:0; bottom:3%; }
.game .flock .nest { width:72%; left:18%; }
.game .wallet-balance { left:19%; right:16%; top:27%; bottom:34%; flex-direction:row; gap:10px; }
.wallet-currency { flex:1; min-width:0; text-align:center; }.wallet-currency + .wallet-currency { border-left:1px solid #e5ba7666; padding-left:9px; }.wallet-currency > span { font-size:12px; font-weight:700; color:#ffe5b7; }
.game .wallet-currency strong { font-size:clamp(19px,5.2cqw,27px); gap:3px; margin-top:5px; }.wallet-currency img,.wallet-currency .icon { width:26px; height:26px; object-fit:contain; }
.game .wallet-row .wallet-operation { background:linear-gradient(#ffefd0,#efd0a1); border:1px solid #dcba83; box-shadow:inset 0 1px #fff; width:35px; height:35px; border-radius:10px; display:grid; place-items:center; }.game .wallet-row .wallet-operation .icon,.wallet-operation img { width:29px; height:29px; object-fit:contain; }
.referral-field { background:#fff2d9; box-shadow:inset 0 1px #fff7e7; border-color:#cc9d68; }.referral-field > span { text-align:center; font-weight:650; }
.referral-medal { position:relative; display:inline-grid; place-items:center; flex-shrink:0; width:28px; height:28px; border:2px solid #b37625; border-radius:50%; background:linear-gradient(135deg,#fff5a8,#ffc344); box-shadow:inset 0 0 0 2px #ffeab2,0 2px 2px #86552b33; }
.referral-medal::after { content:'★'; font:900 17px/1 Nunito,sans-serif; color:#b4741b; text-shadow:0 1px #fff0b6; }.medal-silver { background:linear-gradient(135deg,#fff,#a8bdce); border-color:#8b9dad; box-shadow:inset 0 0 0 2px #e5edf4,0 2px 2px #86552b33; }.medal-silver::after { color:#6d8496; }.medal-bronze { background:linear-gradient(135deg,#ffd8a9,#c57e47); border-color:#a86939; box-shadow:inset 0 0 0 2px #f4c89b,0 2px 2px #86552b33; }.medal-bronze::after { color:#92552b; }
.tasks-count { font-size:12px; font-weight:700; color:#977454; padding:4px 6px 9px; }.game .task-content { display:flex; flex-direction:column; position:relative; background:radial-gradient(ellipse at 5% 100%,#b1c26a55,transparent 40%),radial-gradient(ellipse at 95% 100%,#d0bc7155,transparent 40%); }.tasks-footer { margin:auto 0 0; padding:25px 15px 16px; text-align:center; color:#947456; }.tasks-footer img { width:85px; height:85px; object-fit:contain; opacity:.85; }.tasks-footer p { margin:4px 0 0; font-size:12px; font-weight:650; }
.shop-offer { height:66px; }.production-chip span { font-size:11px; }.production-chip strong { line-height:1.15; }.flock-summary { margin:8px 10px 2px; color:#957252; font-size:11px; text-align:center; }
.gram-exchange-art { height:40px; opacity:1; }.gram-exchange-art img { width:40px; height:40px; margin-left:0; object-fit:contain; }.gram-result strong { font-size:26px; }
.gram-available { opacity:1; color:#fff; }
.gram-available strong,.gram-available .icon { opacity:1; }
@media(max-height:650px) { .tasks-footer { padding-top:14px; }.tasks-footer img { width:55px; height:55px; }.shop-offer { height:60px; }.game .flock .blue { top:20%; }.game .flock .red { top:18%; } }

/* Wooden title plaques shared by bird details and the tasks screen. */
.game .tasks-topline h1 {
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(220px,58vw);
  min-height:52px;
  margin:0 auto;
  padding:13px 32px 9px;
  background:url('assets/partner-wood-panel.webp') center/100% 100% no-repeat;
  color:#fff4d7;
  font-size:clamp(20px,5.5cqw,27px);
  font-weight:850;
  line-height:1;
  text-shadow:0 2px 1px #6e3718;
  filter:drop-shadow(0 2px 2px #18281866);
}
#modal .bird-detail + h2 {
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(280px,92%);
  min-height:62px;
  margin:-5px auto 12px;
  padding:16px 38px 11px;
  background:url('assets/partner-wood-panel.webp') center/100% 100% no-repeat;
  color:#fff3d2;
  font-size:21px;
  font-weight:850;
  line-height:1.1;
  text-align:center;
  text-shadow:0 2px 1px #693414;
  filter:drop-shadow(0 2px 2px #623b2440);
}
@media(max-width:350px) {
  .game .tasks-topline h1 { width:min(190px,56vw); min-height:46px; padding:11px 28px 8px; font-size:19px; }
  #modal .bird-detail + h2 { min-height:56px; font-size:19px; }
}

/* Dark wooden signs suspended from the top with two ropes. */
.shop-title h1,
.game .tasks-topline h1 {
  position:relative;
  isolation:isolate;
  background-image:url('assets/hanging-title.webp');
  background-position:center;
  background-size:100% 100%;
  background-repeat:no-repeat;
  background-blend-mode:normal;
  color:#fff1d2;
  text-shadow:0 2px 1px #34150b;
  filter:drop-shadow(0 3px 2px #1d190f66);
}
.shop-title h1::before,
.shop-title h1::after,
.game .tasks-topline h1::before,
.game .tasks-topline h1::after {
  content:none;
  position:absolute;
  z-index:-1;
  top:-27px;
  width:5px;
  height:32px;
  border-radius:4px;
  background:
    repeating-linear-gradient(90deg,#6b3d20 0 1px,#c28a4c 1px 3px,#754322 3px 5px);
  box-shadow:1px 0 1px #25160c80;
}
.shop-title h1::before,
.game .tasks-topline h1::before { left:24%; }
.shop-title h1::after,
.game .tasks-topline h1::after { right:24%; }
.shop-title {
  position:relative;
  display:flex;
  justify-content:center;
  flex:1;
  min-width:0;
  margin:0;
}
.shop-title h1 {
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(255px,67vw);
  height:82px;
  min-height:82px;
  margin:0;
  padding:42px 18px 6px;
  font-size:clamp(17px,4.7cqw,24px);
  line-height:1;
}
.game .bird-shop-header { top:0; }
.game .bird-shop-header .shop-title { margin:0 0 0 44px; }
.game .shop-help { margin-top:12px; }
.game .tasks-topline { padding-top:0; align-items:start; }
.game .tasks-topline > button { margin-top:12px; }
.game .tasks-topline h1 { margin-top:-6px; height:76px; min-height:76px; padding:39px 20px 6px; }
@media(max-width:350px) {
  .shop-title h1 { width:min(220px,66vw); height:76px; min-height:76px; padding:39px 14px 6px; font-size:17px; }
}
.game .wallet-hero { height:clamp(185px,52cqw,220px); }
.game .wallet-balance { top:31%; bottom:31%; }

/* A single clearing connects the hanging sign and the quest planks. */
.game .tasks-view { background:#d5dda0 url('assets/tasks-clearing.webp') center/cover no-repeat; }
.game.tasks-open .tasks-hero { flex:0 0 auto; height:clamp(164px,27dvh,205px); background:none; box-shadow:none; overflow:visible; }
.game .tasks-hero::after { display:none; }
.game .tasks-topline { padding:0 12px; grid-template-columns:36px minmax(0,1fr) 36px; }
.game .tasks-topline h1 { width:min(220px,62cqw); justify-self:center; margin-top:-8px; }
.game.tasks-open .tasks-callout { top:auto; bottom:12px; left:6%; width:66%; min-height:64px; padding:10px 12px; transform:none; background:url('assets/task-wood-card.webp') center/100% 100% no-repeat; color:#593018; text-shadow:0 1px #fff5d5; }
.game.tasks-open .tasks-callout strong { font-size:clamp(13px,3.5cqw,16px); font-weight:850; }
.game.tasks-open .tasks-callout span { font-size:clamp(11px,2.9cqw,13px); font-weight:700; }
.game.tasks-open .task-content { padding:0 10px 18px; background:none; }
.game.tasks-open .task-list { margin-top:0; gap:3px; overflow:visible; flex-shrink:0; }
.game .tasks-view .task-item { grid-template-columns:38px minmax(0,1fr) 74px; gap:8px; min-height:104px; padding:24px 20px 18px; border:0; border-radius:0; background:url('assets/task-wood-card.webp') center/100% 100% no-repeat; box-shadow:none; filter:drop-shadow(0 4px 3px #4c482b40); }
.game .tasks-view .task-logo { width:38px; height:38px; border-radius:12px; }
.game .tasks-view .task-logo svg { width:28px; height:28px; }
.game .tasks-view .task-item h2 { margin:0; font-size:clamp(11px,3cqw,15px); font-weight:850; line-height:1.2; white-space:normal; color:#4d2b17; }
.game .tasks-view .task-item p { margin:5px 0 0; font-size:13px; color:#6b3b16; }
.game .tasks-view .task-item > button { min-width:0; min-height:33px; padding:5px; border:1px solid #368816; border-radius:12px; background:linear-gradient(#8ce24b,#329b12); box-shadow:inset 0 2px #d0f59b,0 2px 2px #78522244; font:800 11px Nunito,sans-serif; color:#fff; text-shadow:0 1px #35711b; }
.game .tasks-view .task-item.is-complete > button { background:#e0e8bb; border-color:#b6c58a; box-shadow:none; color:#577039; text-shadow:none; opacity:1; }
.game .tasks-view .task-item.is-complete .task-logo { filter:saturate(.5); }
@media(max-width:350px) { .game .tasks-view .task-item { grid-template-columns:32px minmax(0,1fr) 65px; gap:6px; padding-left:17px; padding-right:17px; min-height:96px; }.game .tasks-view .task-logo { width:32px; height:32px; }.game .tasks-view .task-item h2 { font-size:11px; } }
.game .wallet-currency strong { font-size:clamp(23px,6cqw,30px); margin-top:5px; }
.wallet-currency > span { font-size:13px; }
.game .referral-board { bottom:11%; }
.game .friends-body .friend-totals > div {
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:7px;
  padding:3px 8px;
  text-align:left;
}
.game .friends-body .friend-totals > div > .icon {
  grid-column:1;
  grid-row:1 / 3;
  width:34px;
  height:34px;
}
.game .friends-body .friend-totals > div > span {
  grid-column:2;
  font-size:clamp(10px,2.7cqw,13px);
  line-height:1.2;
}
.game .friends-body .friend-totals strong {
  grid-column:2;
  justify-content:flex-start;
  margin-top:3px;
  font-size:clamp(22px,6cqw,30px);
}
.wallet-address { width:100%; min-height:44px; margin:0 0 12px; padding:10px 12px; border:1px solid #d5af7a; border-radius:12px; background:#fff8ea; color:#54311a; font:600 14px Nunito,sans-serif; box-sizing:border-box; }
[aria-busy="true"] { cursor:wait; }
.language-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.language-options > button:first-child { grid-column:1 / -1; }

/* Keep the hanging shop sign above the birds' crests. */
.game .bird-shop-header .shop-title h1 {
  width:min(230px,63vw);
  height:62px;
  min-height:62px;
  padding:29px 15px 5px;
  font-size:clamp(16px,4.5cqw,22px);
}
.game .shop-stage .showcase-bird {
  height:calc(100% - 82px);
}

/* Larger left-aligned quest heading and three readable planks. */
.game .tasks-topline { grid-template-columns:minmax(0,1fr) 36px; }
.game .tasks-topline > span { display:none; }
.game .tasks-topline h1 { justify-self:start; width:74%; height:100px; min-height:100px; padding:46px 16px 12px; margin-top:-10px; font-size:clamp(28px,7cqw,38px); }
.game.tasks-open .tasks-hero { height:clamp(172px,25dvh,205px); }
.game.tasks-open .tasks-callout { left:4%; width:78%; }
.game .tasks-view .task-item { min-height:126px; grid-template-columns:46px minmax(0,1fr) 86px; padding:29px 22px 22px; gap:10px; }
.game .tasks-view .task-logo { width:46px; height:46px; }
.game .tasks-view .task-item h2 { font-size:clamp(13px,3.5cqw,18px); }
.game .tasks-view .task-item p { font-size:16px; }
.game .tasks-view .task-item > button { min-height:38px; font-size:13px; }
.game .tasks-view .task-item > button:disabled { opacity:1; cursor:default; }
@media(max-width:350px) { .game .tasks-view .task-item { grid-template-columns:36px minmax(0,1fr) 70px; min-height:110px; gap:7px; padding-left:18px; padding-right:18px; }.game .tasks-view .task-logo { width:36px; height:36px; }.game .tasks-view .task-item h2 { font-size:12px; } }
/* Tasks composition matched to the supplied reference. */
.game .tasks-view { background-size:100% 100%; }
.game.tasks-open .tasks-hero { flex:0 0 27%; height:auto; min-height:145px; }
.game .tasks-topline { display:flex; justify-content:space-between; align-items:flex-start; padding:0 12px; }
.game .tasks-topline h1 { display:flex; align-items:center; justify-content:center; gap:8px; width:62%; height:clamp(88px,15cqw,125px); min-height:0; margin:30px 0 0; padding:13px 12px; background:url('assets/task-wood-card.webp') center 53%/100% 145% no-repeat; color:#573015; font-size:clamp(25px,6.4cqw,38px); text-shadow:0 1px #fff5d5; filter:drop-shadow(0 3px 2px #3e421d55); }
.game .tasks-topline h1 > .icon { width:clamp(34px,9cqw,56px); height:clamp(43px,11cqw,67px); flex-shrink:0; transform:rotate(-10deg); }
.game .tasks-topline h1::before,.game .tasks-topline h1::after { content:''; top:-42px; height:49px; width:7px; z-index:-1; }
.game .tasks-topline h1::before { left:18%; }.game .tasks-topline h1::after { right:17%; }
.game .tasks-topline > button { margin-top:12px; flex-shrink:0; }
.game.tasks-open .task-content { padding:0 15px 20px; }
.game.tasks-open .task-list { gap:clamp(14px,2.5dvh,24px); }
.game .tasks-view .task-item { min-height:clamp(88px,12.2dvh,128px); grid-template-columns:clamp(36px,9cqw,50px) minmax(0,1fr) clamp(70px,19cqw,100px); gap:9px; padding:18px 17px; background-size:100% 143%; background-position:center 53%; }
.game .tasks-view .task-logo { width:clamp(36px,9cqw,50px); height:clamp(36px,9cqw,50px); }
.game .tasks-view .task-item > div { min-width:0; }
.game .tasks-view .task-item h2 { font-size:clamp(11px,3.2cqw,17px); line-height:1.25; font-weight:850; margin:0; white-space:normal; }
.game .tasks-view .task-item p { display:flex; align-items:center; gap:6px; font-size:clamp(17px,4.6cqw,25px); margin:7px 0 0; line-height:1; color:#94501e; }
.game .tasks-view .task-reward-coin { width:clamp(22px,5.8cqw,31px); height:clamp(22px,5.8cqw,31px); }
.game .tasks-view .task-item > button { min-height:clamp(39px,10cqw,52px); font-size:clamp(12px,3.3cqw,17px); border-radius:14px; }
@media(max-width:350px) { .game.tasks-open .task-content { padding-left:10px; padding-right:10px; }.game .tasks-view .task-item { gap:6px; padding:15px 14px; grid-template-columns:34px minmax(0,1fr) 66px; }.game .tasks-topline h1 { gap:5px; padding-left:8px; padding-right:8px; font-size:23px; } }
/* Slightly thicker shop title plank, keeping the caption centered. */
.game .bird-shop-header .shop-title h1 {
  height:69px;
  min-height:69px;
  padding:29px 15px 8px;
}
.game .bird-shop-header .shop-title h1 { padding:35px 15px 2px; }

/* One wooden navigation asset and one responsive geometry on every screen. */
.game { --navigation-height:calc(clamp(74px,19cqw,92px) + env(safe-area-inset-bottom)); }
.game > .balances .balance:not(.balance-gram) output { font-size:clamp(16px,4.5cqw,23px); }
.game > .bottom-nav {
  flex-basis:var(--navigation-height);
  height:var(--navigation-height);
  min-height:var(--navigation-height);
  padding:6px 4px calc(7px + env(safe-area-inset-bottom));
  border:0;
  border-radius:0;
  background:#6a361a url('assets/nav-wood-five.webp') center/100% 160% no-repeat;
  box-shadow:none;
}
.game > .bottom-nav .nav { z-index:1; }
.game > .bottom-nav .nav.active {
  background:linear-gradient(#b47a3999,#87491a66);
  border-color:#ffe18b;
  box-shadow:0 0 6px #ffcb48aa,inset 0 0 5px #ffe49b55;
}
@media(max-width:350px) {
  .game > .bottom-nav { padding-left:2px; padding-right:2px; }
  .game > .bottom-nav .nav .icon,.game > .bottom-nav .nav-icon { width:32px; height:32px; }
}

/* Compact notification: never stretch a decorative image to the viewport. */
#toast {
  position:fixed;
  z-index:1000;
  inset:auto;
  top:calc(env(safe-area-inset-top, 0px) + 12px);
  left:50%;
  right:auto;
  bottom:auto;
  box-sizing:border-box;
  display:block;
  width:fit-content;
  height:fit-content;
  max-width:min(calc(100vw - 40px), 320px);
  max-height:140px;
  min-width:0;
  min-height:0;
  margin:0;
  padding:12px 16px;
  border:1px solid #d5a35c;
  border-radius:14px;
  background:#674224;
  background-image:none;
  box-shadow:0 4px 12px #24160840;
  filter:none;
  color:#fff5dc;
  font:600 14px/1.4 Nunito, sans-serif;
  text-align:center;
  text-shadow:none;
  overflow-wrap:anywhere;
  white-space:normal;
  overflow:hidden;
  opacity:0;
  transform:translate(-50%, -16px) scale(.96);
  transition:opacity .2s, transform .2s;
  pointer-events:none;
}
#toast.show { opacity:1; transform:translate(-50%, 0) scale(1); }
#toast::backdrop {background:transparent;pointer-events:none;}
@media(prefers-reduced-motion:reduce) {#toast {transition:none;}}

/* Navigation changes instantly, without the shared button press flash. */
.game > .bottom-nav .nav,
.game > .bottom-nav .nav * {animation:none;transition:none;}
.game > .bottom-nav .nav:active {filter:none;transform:none;}

html,body {touch-action:pan-x pan-y;}
body {-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
input,textarea,[contenteditable="true"] {-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;}
img {-webkit-user-drag:none;user-select:none;}

/* Quiet centered caption on the empty wooden advertising board. */
.partner-card .ad-placeholder-label { width:100%; padding:18px 24px 8px; text-align:center; color:#fff1cf; font-size:clamp(15px,4cqw,21px); font-weight:700; line-height:1.25; letter-spacing:.02em; text-shadow:0 2px 2px #693515; }

/* Keep localized captions within the wooden artwork, including narrow screens. */
.game .empty-island { box-sizing:border-box; width:min(94%,390px); padding:23px clamp(36px,10cqw,54px) 25px; }
.game .empty-island span,.game .empty-island strong { white-space:normal; overflow-wrap:anywhere; text-wrap:balance; min-width:0; }
.game .empty-island span { font-size:clamp(13px,3.8cqw,18px); line-height:1.2; margin-bottom:6px; }
.game .empty-island strong { font-size:clamp(12px,3.2cqw,15px); line-height:1.2; }
.game > .partner-card { box-sizing:border-box; margin-left:24px; margin-right:24px; height:88px; min-height:88px; justify-content:center; }
.game .partner-card .ad-placeholder-label { box-sizing:border-box; padding:14px 22px 8px; font-size:clamp(13px,3.6cqw,18px); line-height:1.2; text-wrap:balance; overflow-wrap:anywhere; }
@media(max-width:350px) { .game > .partner-card { margin-left:20px; margin-right:20px; height:80px; min-height:80px; } }

.game>.partner-card.adsgram-box {
 display:flex;flex-direction:column;align-items:stretch;justify-content:center;
 height:auto;min-height:82px;margin:12px 24px 14px;padding:13px 14px;
 border:2px solid #a7602b;border-radius:18px;
 background:linear-gradient(135deg,#fff3d4 0%,#ffe4ad 52%,#f3c478 100%);
 box-shadow:inset 0 2px 0 #fff9e8,inset 0 -2px 0 #d89b4f,0 3px 0 #693d22,0 5px 10px #20391f36;
 filter:none;color:#532f17;
}
#bird-adsgram-task {display:block;width:100%;color:#532f17;--adsgram-task-font-size:13px;--adsgram-task-icon-size:32px;--adsgram-task-icon-title-gap:7px;--adsgram-task-icon-border-radius:9px;--adsgram-task-button-width:96px;}
#bird-adsgram-task button {width:100%;min-width:var(--adsgram-task-button-width);padding:9px 12px;font-size:12px;min-height:40px;white-space:normal;overflow-wrap:anywhere;}
.adsgram-task-reward {display:inline-flex;align-items:center;gap:7px;direction:ltr;white-space:nowrap;font-size:13px;font-weight:800;color:#673b13;}
.adsgram-task-coins {display:inline-flex;align-items:center;gap:2px;}.adsgram-task-coins .icon {width:24px;height:24px;}
.adsgram-task-count {display:inline-flex;align-items:center;padding:3px 5px;border:1px solid #c99c60;border-radius:7px;background:#fff7de;font-size:10px;font-weight:700;color:#80552c;line-height:1.2;}
#bird-adsgram-task .adsgram-task-done {display:flex;align-items:center;justify-content:center;width:100%;min-height:40px;padding:9px 12px;font-size:12px;color:#fff;font-weight:900;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;}
#bird-adsgram-task.limit-reached {opacity:.65;pointer-events:none;}
@media(max-width:350px) {.game>.partner-card.adsgram-box {margin-left:20px;margin-right:20px;padding:12px 11px;min-height:78px;}#bird-adsgram-task {--adsgram-task-font-size:12px;--adsgram-task-icon-size:28px;--adsgram-task-icon-title-gap:5px;--adsgram-task-button-width:86px;}#bird-adsgram-task button {padding:8px 6px;font-size:11px;}.adsgram-task-reward {gap:4px;font-size:12px;}.adsgram-task-coins .icon {width:22px;height:22px;}.adsgram-task-count {padding:3px 4px;font-size:10px;}}

/* The home Task must not override page visibility rules. */
.game:is(.shop-open,.tasks-open,.friends-open,.wallet-open,.top-open)>.partner-card.adsgram-box{display:none!important;}

@media(max-width:350px){#bird-adsgram-task .adsgram-task-done{padding:8px 6px;font-size:11px;}}

/* Keep foreground birds above rear nests regardless of purchase order. */
.game .flock .bird-group.blue,.game .flock .bird-group.red { z-index:1; }
.game .flock .bird-group.yellow,.game .flock .bird-group.white,.game .flock .bird-group.purple { z-index:2; }
/* Long player names must not widen the wooden leaderboard cards. */
.game .top-view,.game .top-scroll { min-width:0; }
.game .top-list { grid-template-columns:minmax(0,1fr); align-content:start; }
.game .top-row { min-width:0; width:100%; height:68px; min-height:68px; max-height:68px; box-sizing:border-box; }
.game .top-name { flex:1 1 0; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game .top-rank,.game .top-avatar,.game .top-coins { flex-shrink:0; }

/* Keep navigation in a stable layer during initial paint. */
.game > .bottom-nav {isolation:isolate;transform:translateZ(0);backface-visibility:hidden;}
.game > .bottom-nav .nav .icon {backface-visibility:hidden;}
