/* ============================================================
   Waggin' World Cup — shared styles for worldcup.html + bracket.html
   Palette + fonts inherited from the main site (Colors.xaml cream +
   brown, marigold accent, park green). Signature: trading-card "kits".
   ============================================================ */
:root {
  --cream: #faf8f4;
  --cream-2: #f3ecdf;
  --cream-3: #efe7d8;
  --ink: #3d322b;
  --brown: #5b4a3f;
  --brown-soft: #7d6b5d;
  --border: #e8e3d9;
  --marigold: #e89a3c;
  --marigold-deep: #cf7d1f;
  --leaf: #5c8a4a;
  --leaf-deep: #46703a;
  --white: #ffffff;
  --pitch-bg: #2f6b43;

  --font-display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shadow: 0 18px 50px -28px rgba(61, 50, 43, 0.45);
  --shadow-sm: 0 8px 24px -16px rgba(61, 50, 43, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink);
  background: var(--cream); line-height: 1.6; font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--brown); line-height: 1.05; margin: 0 0 0.4em; font-weight: 800; letter-spacing: -0.01em; }
a { color: var(--marigold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- top bar ---- */
.wc-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.wc-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.wc-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.2rem; }
.wc-brand img { width: 42px; height: 42px; }
.wc-navlinks { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.wc-navlinks a { font-family: var(--font-display); font-weight: 600; color: var(--brown); font-size: 0.96rem; padding: 0.45rem 0.8rem; border-radius: 10px; }
.wc-navlinks a.active { background: var(--brown); color: var(--cream); }
.wc-navlinks a.active:hover { text-decoration: none; }
/* On phones the brand + links won't share one row — stack them so the
   links sit centered below the wordmark instead of wrapping mid-row. */
@media (max-width: 560px) {
  .wc-nav .wrap { flex-direction: column; gap: 0.5rem; padding-block: 0.6rem; }
  .wc-navlinks { justify-content: center; gap: 0.25rem; }
  .wc-navlinks a { padding: 0.4rem 0.7rem; font-size: 0.92rem; }
}

/* ---- hero ---- */
.wc-hero { background: var(--brown); color: var(--cream); padding: clamp(2.4rem, 6vw, 4.2rem) 0 clamp(2.6rem, 6vw, 4rem); position: relative; overflow: hidden; }
.wc-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--marigold) 0 28px, transparent 28px 52px); opacity: 0.85; }
.wc-hero .eyebrow { font-family: var(--font-body); font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--marigold); margin-bottom: 0.7rem; }
.wc-hero h1 { color: var(--cream); font-size: clamp(2.2rem, 6vw, 3.6rem); text-wrap: balance; margin-bottom: 0.5rem; }
.wc-hero p { color: rgba(250, 248, 244, 0.82); max-width: 46rem; font-size: 1.12rem; margin: 0; }
.wc-hero .hero-cta { margin-top: 1.4rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 600; font-size: 1rem; padding: 0.7rem 1.4rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: transform .16s ease, background .16s ease, color .16s ease; text-decoration: none; line-height: 1; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--marigold); color: #43321d; }
.btn-primary:hover { background: #fff; color: var(--brown); }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(250,248,244,0.4); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(255,255,255,0.08); color: var(--cream); }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); text-wrap: balance; }
.section-head p { color: var(--brown-soft); font-size: 1.1rem; margin: 0; }
.wc-hero p, .wc-hero h1 { text-wrap: balance; }

/* ---- status / loading ---- */
.wc-status { text-align: center; color: var(--brown-soft); padding: 3rem 1rem; font-weight: 600; }
.wc-spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--marigold); margin: 0 auto 1rem; animation: wcspin 0.9s linear infinite; }
@keyframes wcspin { to { transform: rotate(360deg); } }

/* ============================================================
   THE CARD
   ============================================================ */
.wc-grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }

/* clickable team index */
.wc-teamnav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.wc-teamchip { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 0.4rem 0.55rem 0.4rem 0.6rem; font-family: var(--font-display); font-weight: 700; color: var(--brown); font-size: 0.92rem; box-shadow: var(--shadow-sm); transition: border-color .14s ease, transform .14s ease; }
.wc-teamchip:hover { border-color: var(--marigold); transform: translateY(-1px); text-decoration: none; }
.wc-chip-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); flex: none; }
.wc-teamchip b { background: var(--cream-2); color: var(--brown-soft); border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.8rem; font-variant-numeric: tabular-nums; }

/* national-team grouping */
.wc-group { margin-bottom: clamp(2.2rem, 5vw, 3.2rem); scroll-margin-top: 86px; }
.wc-group:last-child { margin-bottom: 0; }
.wc-group-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--border); }
.wc-group-flag { width: 40px; height: 27px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); flex: none; }
.wc-group-head h3 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--brown); }
.wc-group-count { margin-left: auto; background: var(--cream-2); color: var(--brown-soft); font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; padding: 0.32rem 0.8rem; border-radius: 999px; white-space: nowrap; }

.wc-card {
  --accent: var(--marigold);
  --accent-deep: var(--marigold-deep);
  --tint: #fdf3e2;
  position: relative; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--white), var(--tint));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  cursor: pointer; transition: transform .14s ease, box-shadow .14s ease;
}
.wc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wc-card.tier-gold { --accent: #e89a3c; --accent-deep: #cf7d1f; --tint: #fdf2dd; }
.wc-card.tier-pitch { --accent: #5c8a4a; --accent-deep: #46703a; --tint: #eef4e7; }
.wc-card.tier-classic { --accent: #5b4a3f; --accent-deep: #463a31; --tint: #f1ebe2; }
.wc-card::before { content: ""; position: absolute; inset: 0; border-radius: 20px; border: 3px solid var(--accent); pointer-events: none; z-index: 4; }

.wc-photo { position: relative; aspect-ratio: 4 / 3.2; background: var(--cream-3); overflow: hidden; }
.wc-photo img { width: 100%; height: 100%; object-fit: cover; }
.wc-photo .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #c4b49d; font-size: 3.5rem; }
.wc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.46) 0%, rgba(0,0,0,0) 38%); }

.wc-rail { position: absolute; top: 10px; left: 12px; z-index: 3; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.55); display: flex; flex-direction: column; line-height: 1; }
.wc-ovr { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; }
.wc-pos { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; margin-top: 2px; }
.wc-nat { font-size: 0.92rem; font-weight: 700; margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.wc-nat .flag-img { width: 26px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,0.8), 0 1px 3px rgba(0,0,0,0.4); }
.wc-num { position: absolute; top: 10px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; border: 2px solid #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.wc-tap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: linear-gradient(0deg, rgba(0,0,0,0.62), rgba(0,0,0,0)); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; text-align: center; padding: 0.8rem 0.4rem 0.45rem; opacity: 0; transition: opacity .15s ease; }
.wc-card:hover .wc-tap { opacity: 1; }
@media (hover: none) { .wc-tap { opacity: 1; } }

.wc-name { background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; text-align: center; font-size: clamp(1.1rem, 2.2vw, 1.4rem); padding: 0.45rem 0.6rem; }
.wc-breed { text-align: center; color: var(--brown-soft); font-weight: 700; font-size: 0.86rem; padding: 0.5rem 0.6rem 0.2rem; }

.wc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.2rem; padding: 0.7rem 1rem 0.5rem; }
.wc-stat { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.45rem; }
.wc-stat .v { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.wc-stat .meter { height: 6px; border-radius: 4px; background: rgba(91,74,63,0.14); overflow: hidden; }
.wc-stat .meter > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.wc-stat .c { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; color: var(--brown-soft); text-transform: uppercase; grid-column: 1 / -1; margin-top: -2px; }

.wc-foot { margin-top: auto; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.04em; color: var(--brown-soft); text-transform: uppercase; }

/* ============================================================
   BRACKET
   ============================================================ */
.bracket-note { background: var(--cream-2); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1.6rem; color: var(--brown); font-weight: 600; display: flex; gap: 0.7rem; align-items: flex-start; }
.bracket-note .btn { margin-left: auto; flex: none; padding: 0.5rem 1rem; font-size: 0.9rem; }
.bracket-scroll { overflow-x: auto; padding-bottom: 1rem; }
/* Bottom runway for pages opened inside the app's WebView tabs, which now
   extend under the floating iOS tab bar. Desktop just gets extra space. */
/* Bottom runway for the app's floating tab pill. env() already reports the
   pill's inset inside the app WebView, so only a small constant sits on top of
   it — 104px stacked and left a visible gap. Matches wagginu/pupdraft/pickem. */
body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.bracket { display: flex; gap: clamp(1rem, 3vw, 2.4rem); min-width: min-content; align-items: stretch; }
.round { display: flex; flex-direction: column; justify-content: space-around; gap: 0.8rem; min-width: 190px; }
.round-title { font-family: var(--font-display); font-weight: 800; color: var(--brown); text-align: center; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.match { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-sm); }
.seed { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; cursor: pointer; font: inherit; transition: background .14s ease, border-color .14s ease; }
.seed:hover:not(:disabled) { border-color: var(--marigold); background: #fff; }
.seed:disabled { cursor: default; }
.seed img, .seed .pavatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--cream-3); flex: none; }
.seed .pavatar { display: grid; place-items: center; color: #c4b49d; font-size: 1rem; }
.seed .sname { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.94rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.seed .sflag-img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); flex: none; }
.seed .sovr { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 0.86rem; color: var(--brown-soft); font-variant-numeric: tabular-nums; }
.seed.won { background: #fff; border-color: var(--marigold); box-shadow: inset 0 0 0 1px var(--marigold); }
.seed.lost { opacity: 0.42; }
.seed.bye { opacity: 0.5; font-style: italic; }
.champion { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 200px; text-align: center; }
.champion .trophy { font-size: 2.6rem; margin-bottom: 0.4rem; }
.champion .cwho { font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.5rem; }
.champion .csub { color: var(--brown-soft); font-weight: 700; font-size: 0.9rem; }
.champion .pending { color: var(--brown-soft); font-weight: 600; font-size: 0.92rem; }

/* ---- card modal (download / share) ---- */
.wc-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.wc-modal[hidden] { display: none; }
.wc-modal-backdrop { position: absolute; inset: 0; background: rgba(40,32,26,0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.wc-modal-card { position: relative; z-index: 1; background: var(--cream); border-radius: 20px; padding: 1.2rem 1.1rem 1.1rem; max-width: 420px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); text-align: center; }
.wc-modal-close { position: absolute; top: 6px; right: 12px; background: none; border: 0; font-size: 1.9rem; line-height: 1; color: var(--brown-soft); cursor: pointer; }
.wc-modal-close:hover { color: var(--brown); }
.wc-modal-stage { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; min-height: 200px; }
.wc-modal-canvas { width: 100%; max-width: 300px; height: auto; border-radius: 16px; box-shadow: var(--shadow-sm); display: block; margin: 0 auto; }
.wc-modal-actions { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-top: 0.7rem; }
.wc-modal-actions .btn { padding: 0.5rem 0.7rem; font-size: 0.85rem; flex: 1 1 auto; min-width: 88px; }
.wc-modal-hint { color: var(--brown-soft); font-size: 0.86rem; margin: 0.75rem 0 0; }
.btn-pitch { background: var(--leaf); color: #fff; }
.btn-pitch:hover { background: var(--leaf-deep); color: #fff; }
.btn-ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); color: #fff; }
.btn-ig:hover { filter: brightness(1.06); color: #fff; }
.btn-fb { background: #1877f2; color: #fff; }
.btn-fb:hover { background: #0f63d6; color: #fff; }
.btn-ig .ico, .btn-fb .ico { font-weight: 900; }
.btn-fb .ico { font-family: Georgia, "Times New Roman", serif; }
.btn-ghost.on-light { background: #fff; color: var(--brown); border-color: var(--border); }
.btn-ghost.on-light:hover { border-color: var(--brown); background: var(--cream-2); color: var(--brown); }

/* ============================================================
   2026 campaign — Meet the Teams + results bracket
   ============================================================ */
.tgrid { display: grid; gap: clamp(0.9rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.tcard { background: var(--white); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
/* eliminated team — subtle: muted card + small badge, still fully clickable */
.tcard.elim { opacity: 0.82; }
.tcard.elim .tflag, .tcard.elim .dthumb { filter: grayscale(0.7); }
.tcard.elim .tcard-h { background: var(--brown-soft); }
.tcard.elim .dthumb { box-shadow: 0 0 0 2px var(--border); }
.telim { margin-left: auto; flex: none; white-space: nowrap; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cream); background: rgba(0,0,0,0.22); border-radius: 999px; padding: 2px 8px; }
.tcard-h { display: flex; align-items: center; gap: 0.55rem; padding: 0.7rem 0.9rem; background: var(--brown); color: var(--cream); font-family: var(--font-display); font-weight: 800; }
.tflag { width: 30px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,0.5); flex: none; }
.tname { font-size: 1.02rem; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmatch { font-size: 0.76rem; color: var(--brown-soft); font-weight: 700; padding: 0.5rem 0.9rem 0.1rem; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; text-transform: uppercase; letter-spacing: 0.04em; }
.tflag-sm { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
.tdogs { display: flex; gap: 0.6rem; padding: 0.6rem 0.9rem 1rem; }
.tdog { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: none; border: 0; font: inherit; padding: 6px 2px; border-radius: 12px; cursor: pointer; transition: background .12s ease; }
.tdog:hover { background: var(--cream-2); }
.tdog-cta { font-family: var(--font-display); font-weight: 800; font-size: 0.68rem; color: var(--marigold-deep); letter-spacing: 0.03em; }
@media (hover: hover) { .tdog-cta { opacity: 0; transition: opacity .12s ease; } .tdog:hover .tdog-cta { opacity: 1; } }
.dthumb { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--cream-3); box-shadow: 0 0 0 2px var(--marigold); }
.dthumb.pw { display: grid; place-items: center; font-size: 1.6rem; color: #c4b49d; box-shadow: 0 0 0 2px var(--border); }
.tdname { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.tdtrips { font-size: 0.72rem; color: var(--brown-soft); font-weight: 700; }

.bteam { display: flex; align-items: center; gap: 6px; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 5px 7px; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.bteam:hover:not(.tbd) { border-color: var(--marigold); }
.bteam.tbd { cursor: default; }
.match-when { text-align: center; font-size: 0.7rem; color: var(--brown-soft); font-weight: 700; margin-top: 3px; }
.cardblock + .cardblock { border-top: 1px solid var(--border); margin-top: 1.2rem; padding-top: 1.2rem; }
.refgrid { display: grid; gap: 0.8rem 1rem; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.refdog .dthumb { box-shadow: 0 0 0 2px #f4c20d; }

/* team header inside the card popup */
.wc-modal-team { display: flex; align-items: center; justify-content: center; gap: 0.55rem; margin-bottom: 0.9rem; font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.3rem; }
.wc-modal-flag { width: 34px; height: 23px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }

/* wider, tighter bracket — break out to full viewport width + slimmer columns
   so a 6-round bracket fits without horizontal scrolling on desktop */
.bracket-scroll { width: 100vw; margin-inline: calc(50% - 50vw); padding-inline: clamp(1rem, 4vw, 3rem); }
.bracket { gap: clamp(0.6rem, 1.4vw, 1.3rem); justify-content: center; }
.round { min-width: 184px; }
.bteam { padding: 4px 6px; }
.bteam .bname { font-size: 0.8rem; }
.bteam .bflag { width: 20px; height: 13px; }
.bteam .bflag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); flex: none; }
.bteam .bname { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 0.84rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bteam .bdogs { display: flex; gap: 2px; flex: none; }
.bteam .bdogs .dthumb { width: 22px; height: 22px; box-shadow: 0 0 0 1.5px var(--marigold); }
.bteam .bdogs .dthumb.pw { font-size: 0.7rem; box-shadow: 0 0 0 1.5px var(--border); }
.bteam.won { border-color: var(--leaf); box-shadow: inset 0 0 0 2px var(--leaf); background: #eaf7ee; }
.bteam.won .bname { color: var(--leaf); }
.bteam.lost { opacity: 0.45; filter: grayscale(0.55); }
.bteam.tbd { opacity: 0.5; font-style: italic; }
.round { min-width: 212px; }
.champ { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 200px; }
.champ .trophy { font-size: 2.4rem; }
.champ .cflag { width: 46px; height: 31px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
.champ .cname { font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.2rem; }
.champ .cdogs { display: flex; gap: 8px; }
.champ .cdogs .dthumb { width: 48px; height: 48px; }
.freebadge { background: var(--marigold); color: #43321d; font-family: var(--font-display); font-weight: 800; font-size: 0.82rem; padding: 0.35rem 0.7rem; border-radius: 999px; }
.champ .pending { color: var(--brown-soft); font-weight: 700; font-size: 0.9rem; line-height: 1.4; }

/* ---- Bracket round navigator ---- */
.brnav { display: flex; align-items: center; gap: 8px; margin-bottom: 1.4rem; }
.brtabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 3px; scrollbar-width: none; }
.brtabs::-webkit-scrollbar { display: none; }
.brtab { flex: none; background: var(--white); color: var(--brown); border: 1px solid var(--border); font-family: var(--font-display); font-weight: 800; font-size: 0.92rem; padding: 0.5rem 0.95rem; border-radius: 999px; cursor: pointer; }
.brtab:hover { border-color: var(--marigold); }
.brtab.on { background: var(--brown); color: var(--cream); border-color: var(--brown); }
.brarrow { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--brown); font-size: 1.5rem; line-height: 38px; text-align: center; cursor: pointer; font-weight: 800; padding: 0; }
.brarrow:hover { border-color: var(--marigold); }
.brround-title { font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.3rem; text-align: center; margin-bottom: 1.2rem; }
.brround-sub { display: block; font-size: 0.85rem; font-weight: 700; color: var(--brown-soft); margin-top: 2px; }
.bmatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.bmatch { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.bmatch.decided { border-color: rgba(91,74,63,0.18); }
.bmatch .bvs { text-align: center; font-family: var(--font-display); font-weight: 800; color: var(--brown-soft); font-size: 0.72rem; letter-spacing: 0.14em; }
/* richer team slot: flag + name header, then big dog photos w/ name + breed */
.bmatch .bteam { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
.bteam-h { display: flex; align-items: center; gap: 9px; }
.bteam-h .bflag { width: 30px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); flex: none; }
.bteam-h .bname { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bwin { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 800; font-size: 0.82rem; display: inline-flex; align-items: center; justify-content: center; }
.bscore { flex: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); min-width: 18px; text-align: center; }
.bteam.won .bscore { color: var(--leaf); }
.bteam-dogs { display: flex; gap: 12px; }
.bdog { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.bdog-img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; background: var(--cream-3); box-shadow: 0 0 0 2.5px var(--marigold); }
.bdog-img.pw { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 0 0 2.5px var(--border); }
.bdog-n { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 0.86rem; line-height: 1.1; }
.bdog-b { font-size: 0.72rem; color: var(--brown-soft); line-height: 1.2; }
.bwhen { text-align: center; font-size: 0.82rem; font-weight: 700; color: var(--brown-soft); margin-top: 1px; }
.bwhen.done { color: var(--leaf); }
.bwhen.tbd { opacity: 0.7; font-style: italic; }
.brstage .champ { min-width: 0; padding: 1.5rem 0; }
@media (max-width: 480px) { .bmatches { grid-template-columns: 1fr; } .brtab { font-size: 0.85rem; padding: 0.45rem 0.8rem; } }

/* ---- Full bracket (shareable image) ---- */
.fullbr-cta { text-align: center; margin: 0 0 1.4rem; }
.fullbr { margin-top: 2.6rem; scroll-margin-top: 80px; }
.fullbr-h { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fullbr-h h2 { font-size: clamp(1.3rem, 3.5vw, 1.9rem); color: var(--brown); margin: 0; }
.fullbr-h .btn { margin-left: auto; }
.fullbr-wrap { border: 1px solid var(--border); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-sm); overflow: hidden; }
.fullbr-wrap a { display: block; }
.fullbr-wrap img { display: block; width: 100%; height: auto; }
.fullbr-note { font-size: 0.85rem; color: var(--brown-soft); margin-top: 0.7rem; text-align: center; }
.fullbr-wrap a { cursor: zoom-in; }
.fullbr-item { margin: 0 0 1.6rem; }
.fullbr-item:last-child { margin-bottom: 0; }
.fullbr-cap { font-weight: 800; color: var(--brown); font-size: 1rem; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
/* tap-to-zoom lightbox for the full bracket */
.br-lightbox { position: fixed; inset: 0; background: rgba(28,22,18,0.94); z-index: 1000; display: none; overflow: auto; -webkit-overflow-scrolling: touch; }
.br-lightbox.open { display: block; }
.br-lightbox img { display: block; min-width: 100%; width: 1710px; max-width: none; height: auto; margin: 0 auto; }
.br-lightbox-close { position: fixed; top: 12px; right: 14px; z-index: 1001; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,0.94); color: var(--brown); font-size: 1.7rem; font-weight: 800; line-height: 44px; cursor: pointer; }
.br-lightbox-hint { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.82rem; opacity: 0.85; pointer-events: none; }

/* ---- Post Studio (simple step-by-step) ---- */
.ps-toggle { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.ps-tab { background: var(--white); color: var(--brown); border: 1px solid var(--border); font-family: var(--font-display); font-weight: 800; padding: 0.6rem 1.1rem; border-radius: 999px; cursor: pointer; }
.ps-tab.on { background: var(--brown); color: var(--cream); border-color: var(--brown); }
.ps-post > h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1rem; color: var(--brown); }

.ps-strip { background: var(--cream-2); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin-bottom: 1.6rem; }
.ps-strip-h { font-family: var(--font-display); font-weight: 800; color: var(--brown); margin-bottom: 0.8rem; }
.ps-mini-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.ps-mini { width: 220px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ps-mini img { width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-sm); display: block; background: var(--white); }
.ps-mini figcaption { font-size: 0.85rem; font-weight: 700; color: var(--brown-soft); text-align: center; }
.ps-save { width: 100%; }

.ps-app { background: var(--white); border: 1px solid var(--border); border-left: 6px solid var(--app, var(--brown)); border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm); }
.ps-app h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--app, var(--brown)); margin: 0 0 0.7rem; }
.ps-steps { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.85rem; }
.ps-steps li { font-family: var(--font-body); font-size: 1rem; color: var(--ink); line-height: 1.45; }
.ps-act { display: inline-flex; margin-top: 0.5rem; }
.ps-steps .ps-act { margin-left: 0; }
.ps-status { font-size: 0.85rem; font-weight: 700; color: var(--leaf); margin-left: 0.4rem; }
@media (max-width: 520px) { .ps-mini { width: 100%; } .ps-act { width: 100%; justify-content: center; } }

/* ---- footer ---- */
.wc-footer { background: var(--brown); color: rgba(250,248,244,0.86); padding: 2.2rem 0; margin-top: 2rem; }
.wc-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.wc-footer a { color: var(--marigold); font-weight: 700; }
