/* Michigander Euchre v1.2.1: shared top bar, buttons, hero and tile row. Loaded by Home (/), /play/ and online.html.
 Moved here unchanged from app.css so both pages use the exact same rules (Home is the source of truth). */
#topbar, .hero2 { font-family: var(--font-ui); line-height: 1.45; }
#topbar, #topbar *, .hero2, .hero2 * { box-sizing: border-box; }
/* top bar */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 52px;
  padding: 6px 14px; padding-top: calc(6px + env(safe-area-inset-top)); background: var(--surface-glass); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
#topbar[hidden] { display: none; }
.brand { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-spacing); font-size: 22px; color: var(--display-color); text-decoration: none; white-space: nowrap; }
.ver { font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 700; margin-left: 4px; letter-spacing: 0; text-transform: none; }
#nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#nav .navlink { gap: 6px; padding: 6px 12px; font-weight: 700; }
#nav .navlink .ic { font-size: 15px; line-height: 1; }
#nav .navlink.on { background: var(--surface-2); border-color: var(--accent); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); cursor: default; }
#nav .nav-profile .lbl { font-weight: 600; }
#nav .btn.sm { min-height: 36px; }

/* badges & buttons (same look as .ui-badge / .ui-btn) */
.badge { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--plan); color: var(--plan-ink); vertical-align: middle; font-family: var(--font-ui); }
.badge.owner { background: var(--accent); color: var(--accent-ink); } .badge.admin { background: var(--warn); color: var(--warn-ink); } .badge.off { background: var(--danger); color: var(--danger-ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 20px; font-size: 16px; font-weight: 700; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--accent-shadow); cursor: pointer; text-decoration: none; font-family: var(--font-ui);
  transition: transform .08s ease, filter .15s ease, border-color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: var(--secondary-bg); color: var(--secondary-ink); border: 1px solid var(--secondary-line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.danger { background: var(--danger); color: var(--danger-ink); box-shadow: none; }
.btn.big { font-size: 20px; padding: 14px 30px; min-height: 58px; }
@media (max-width: 520px) {
  .brand { font-size: 18px; }
  #nav .navlink { padding: 6px 9px; }
  #nav .navlink .lbl { display: none; }
  .brand .ver, .brand .full { display: none; }
}
/* ---------- v0.3.1: hero (same look as the /play/ start screen) for the welcome and login pages ---------- */
.hero2 { min-height: calc(100vh - var(--topbar-h, 53px)); min-height: calc(100svh - var(--topbar-h, 53px)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 28px 20px 18px; background-image: var(--start-glow); }
.hero2.out { min-height: 100vh; min-height: 100svh; }
.h2-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; width: min(1080px, 100%); }
.h2-art { justify-self: end; width: min(440px, 100%); aspect-ratio: 1 / 1.16; border-radius: var(--radius); background: var(--start-art) center / cover no-repeat;
  box-shadow: var(--shadow), 0 0 0 1px var(--line-strong); animation: ui-fade .4s ease; }
.h2-main { display: flex; flex-direction: column; gap: 14px; text-align: left; max-width: 460px; width: 100%; }
.h2-kicker { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); }
.h2-title { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-spacing);
  color: var(--display-color); font-size: clamp(40px, 5vw, 64px); line-height: 1.02; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.h2-sub { margin: 0 0 8px; color: var(--text-soft); font-size: 17px; line-height: 1.5; }
.h2-sub b { color: var(--text); }
.h2-actions { display: flex; flex-direction: column; gap: 10px; }
.h2-actions .btn.big { width: 100%; }
.h2-primary { flex-direction: column; gap: 0; }
.h2-primary small { display: block; font-size: 14px; font-weight: 600; opacity: .85; margin-top: 2px; }
.h2-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.h2-tools .btn { flex-direction: column; gap: 2px; min-height: 64px; border-radius: var(--radius-sm); font-size: 14px; padding: 8px 4px; }
.h2-tools .btn span:first-child { font-size: 20px; }
.h2-more { color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: var(--radius-pill); }
.h2-more:hover { color: var(--text); background: var(--secondary-bg); }
.hero2 .panel { max-width: none; padding: 16px 20px 20px; }
.hero2 .panel .tabs { margin-top: -6px; }
@media (max-width: 860px) {
  .hero2 { justify-content: space-between; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); gap: 12px; }
  .h2-wrap { grid-template-columns: 1fr; gap: 14px; flex: 1; align-content: space-between; }
  .h2-art { justify-self: center; width: auto; height: min(34vh, 320px); max-width: 100%; }
  .h2-main { max-width: 520px; justify-self: center; text-align: center; gap: 10px; }
  .h2-title { font-size: clamp(32px, 9vw, 46px); }
  .h2-sub { font-size: 15px; margin-bottom: 2px; }
  .hero2.out .h2-wrap { align-content: start; }
  .hero2.out .h2-art { height: min(22vh, 200px); }
  .hero2.out .h2-main { text-align: left; }
  .hero2.out .h2-kicker, .hero2.out .h2-title { text-align: center; }
}
@media (max-width: 380px) { .h2-tools .btn { font-size: 12px; } }
@media (max-width: 520px) { body.on-home #nav .navplay { display: none; } }
@media (max-width: 520px) {
  #topbar { flex-wrap: nowrap; padding-left: 10px; padding-right: 10px; }
  #nav { gap: 4px; flex-wrap: nowrap; }
  #nav .btn.sm { font-size: 13px; padding: 6px 10px; }
  #nav .navlink { width: 36px; min-width: 36px; padding: 0; }
}
/* v1.1.2: keep the phone top bar inside the screen in every theme (Night brand is wide: uppercase + letter-spacing) */
@media (max-width: 520px) {
  #topbar { gap: 6px; }
  #topbar .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; letter-spacing: min(var(--display-spacing), .5px); font-size: 20px; }
  #nav { flex: 0 0 auto; }
}
@media (max-width: 400px) { #nav .nav-home { display: none; } /* the brand on the left already goes Home */ }
/* v1.1.3: home page asks Single player or Multiplayer first (matches the /play/ start screen) */
.h2-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.h2-modebtn { flex-direction: column; gap: 2px; min-height: 120px; width: 100%; text-align: center; white-space: normal; }
.h2-modebtn .ic { font-size: 30px; line-height: 1.1; }
.h2-modebtn b { font-size: 20px; }
.h2-modebtn small { display: block; font-size: 13px; font-weight: 600; opacity: .85; }
.h2-back { align-self: center; }
#homeMode[hidden], #homeSolo[hidden] { display: none !important; }
@media (max-width: 420px) { .h2-mode { grid-template-columns: 1fr; } .h2-modebtn { min-height: 92px; } }
@media (max-width: 420px) { .h2-tools .btn { font-size: 12px; } .h2-tools .btn span:first-child { font-size: 18px; } }
