:root {
  color-scheme: dark;
  --bg: #080909;
  --bg-2: #17120a;
  --panel: rgba(20, 16, 10, .90);
  --panel-strong: #251b0e;
  --line: rgba(255, 215, 77, .14);
  --text: #fff9ef;
  --muted: #c2b597;
  --green: #ffd633;
  --gold: #ffd633;
  --green-2: #ffbf1f;
  --green-dark: #4f3600;
  --beer: #ffb81f;
  --danger: #ff7575;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -8%, rgba(255, 205, 43, .16), transparent 34rem),
    radial-gradient(circle at 100% 10%, rgba(255, 46, 46, .12), transparent 28rem),
    linear-gradient(180deg, #090909 0%, #12100b 52%, #070707 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
.hidden { display: none !important; }

.account-welcome-buttons { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.club-full-page { width:min(920px, calc(100vw - 24px)); max-width:920px; max-height:calc(100dvh - 24px); }
.club-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:18px 0; padding:6px; border:1px solid rgba(255,214,51,.16); border-radius:18px; background:#0d0c09; }
.club-nav-button { min-width:0; border:0; border-radius:13px; padding:12px 8px; background:transparent; color:#aaa394; font:inherit; font-weight:800; cursor:pointer; }
.club-nav-button.active { background:linear-gradient(135deg,#8b5c00,#b47700); color:#fff; box-shadow:0 8px 24px rgba(139,92,0,.25); }
.club-tab-view { display:none; }
.club-tab-view.active { display:block; }
.club-hero { padding:24px; border-radius:22px; background:radial-gradient(circle at top right,rgba(255,214,51,.18),transparent 45%),linear-gradient(145deg,#17140f,#0c0b09); border:1px solid rgba(255,214,51,.2); }
.club-hero h3 { margin:4px 0 8px; font-size:clamp(1.8rem,6vw,3rem); }
.club-hero p:last-child { margin:0; color:#bdb5a5; }
.club-overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.club-overview-card { text-align:left; min-height:150px; padding:18px; border-radius:20px; border:1px solid rgba(255,214,51,.15); background:#15120e; color:#f5f1e8; cursor:pointer; display:flex; flex-direction:column; gap:8px; }
.club-overview-card span { font-size:1.8rem; }
.club-overview-card strong { font-size:1.05rem; }
.club-overview-card small { color:#aaa394; line-height:1.4; }
.club-inline-form { margin:14px 0 20px; padding:18px; border:1px solid rgba(255,214,51,.18); border-radius:18px; background:#100e0b; }
.club-inline-form textarea { resize:vertical; min-height:84px; }
.club-form-actions { display:flex; gap:10px; flex-wrap:wrap; }
.club-list { display:grid; gap:10px; }
.club-list-item { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:16px; border:1px solid rgba(255,255,255,.08); border-radius:16px; background:#12100d; }
.club-list-item > div { min-width:0; }
.club-list-item strong,.club-list-item small { display:block; }
.club-list-item small { color:#a9a396; margin-top:5px; line-height:1.45; }
.club-list-actions { display:flex; gap:8px; flex-shrink:0; }
.club-member-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.club-member-card { display:flex; align-items:center; gap:13px; padding:15px; border:1px solid rgba(255,214,51,.14); border-radius:17px; background:#12100d; }
.club-member-avatar { width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,#7b2600,#b47700); color:#fff; font-weight:900; flex:0 0 auto; overflow:hidden; }
.club-member-avatar img { width:100%; height:100%; object-fit:cover; }
.club-member-card strong,.club-member-card small { display:block; }
.club-member-card small { color:#aaa394; margin-top:3px; }
.news-menu-button { flex:0 0 42px; display:grid; place-items:center; width:42px; height:42px; padding:0; border:0; border-radius:12px; color:var(--gold); background:transparent; font-size:1.45rem; line-height:1; }
.news-menu-button:hover,.news-menu-button[aria-expanded="true"] { background:rgba(255,214,51,.09); }
.news-admin-menu { display:grid; gap:11px; margin:0 0 18px; padding:14px; border:1px solid rgba(255,214,51,.2); border-radius:18px; background:#0d0b08; }
.news-management-list,.news-rights-list { display:grid; gap:9px; }
.news-management-row,.news-rights-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.025); }
.news-management-row > span,.news-rights-row > span { min-width:0; }
.news-management-row strong,.news-management-row small,.news-rights-row strong,.news-rights-row small { display:block; overflow-wrap:anywhere; }
.news-management-row small,.news-rights-row small { margin-top:3px; color:var(--muted); }
.news-management-actions { display:flex; flex:0 0 auto; gap:7px; }
.news-management-actions .btn { padding:8px 10px; font-size:.76rem; }
.news-rights-row input { flex:0 0 auto; width:22px; height:22px; margin:0; }
.news-editor { margin:0 0 22px; padding:18px; border:1px solid rgba(255,214,51,.2); border-radius:20px; background:#100e0b; }
.news-editor textarea { width:100%; min-width:0; resize:vertical; border:1px solid rgba(217,255,237,.13); border-radius:12px; padding:13px 14px; color:var(--text); outline:none; background:rgba(0,0,0,.2); font:inherit; line-height:1.5; }
.news-editor textarea:focus { border-color:rgba(255,214,51,.55); box-shadow:0 0 0 3px rgba(255,214,51,.08); }
.news-image-preview { display:block; width:100%; max-height:360px; margin:0 0 14px; border-radius:16px; object-fit:contain; background:#080704; }
.news-feed { display:grid; gap:18px; padding-bottom:12px; }
.news-card { overflow:hidden; border:1px solid rgba(255,214,51,.16); border-radius:22px; background:#12100d; box-shadow:0 14px 36px rgba(0,0,0,.2); }
.news-card-placeholder { width:100%; aspect-ratio:16 / 9; }
.news-card-image { display:block; width:100%; height:min(62vh,520px); object-fit:contain; background:#080704; }
.news-card-placeholder { display:grid; place-items:center; color:#1c1100; background:radial-gradient(circle at 70% 20%,#ffe16b,#b87a00 55%,#6e3d00); font-size:clamp(2.8rem,12vw,5.5rem); font-weight:950; letter-spacing:.08em; }
.news-card-content { padding:18px; }
.news-card-content h3 { margin:9px 0 5px; font-size:clamp(1.35rem,4vw,1.8rem); letter-spacing:-.02em; }
.news-category { display:inline-flex; padding:5px 9px; border:1px solid rgba(255,214,51,.25); border-radius:999px; color:#2a1800; background:var(--gold); font-size:.7rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.news-category-event { color:#fff; background:#9c3b16; border-color:#c86538; }
.news-category-appointment { color:#fff; background:#315c48; border-color:#5f8d76; }
.news-event-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:12px 0 14px; }
.news-event-details > div { min-width:0; padding:11px 12px; border:1px solid rgba(255,214,51,.14); border-radius:13px; background:rgba(255,214,51,.045); }
.news-event-details small,.news-event-details strong { display:block; }
.news-event-details small { margin-bottom:4px; color:var(--gold); font-size:.66rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.news-event-details strong { color:#eee7da; font-size:.86rem; line-height:1.45; overflow-wrap:anywhere; }
.news-text { margin:0; color:#e6e0d5; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.news-published { display:block; margin-top:18px; padding-top:11px; border-top:1px solid rgba(255,255,255,.07); color:#777166; font-size:.68rem; line-height:1.4; }

@media (max-width:640px) {
  .club-full-page { width:100vw; max-width:none; max-height:100dvh; height:100dvh; border-radius:0; margin:0; }
  .club-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .club-overview-grid,.club-member-grid { grid-template-columns:1fr; }
  .club-overview-card { min-height:112px; }
  .club-list-item { align-items:flex-start; flex-direction:column; }
  .news-card-content { padding:15px; }
  .news-editor { padding:15px; }
  .news-event-details { grid-template-columns:1fr; }
  .news-management-row { align-items:flex-start; flex-direction:column; }
  .news-management-actions { width:100%; }
  .news-management-actions .btn { flex:1; }
  .member-hub { padding: 15px; }
  .member-hub-grid { grid-template-columns: 1fr; }
  .member-hub-card { min-height: 104px; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

.welcome-shell, .app-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.welcome-shell { min-height: 100vh; display: grid; place-items: center; padding: 36px 0; }
.welcome-card { width: min(760px, 100%); padding: clamp(25px, 5vw, 52px); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow); }
.glass { background: linear-gradient(145deg, rgba(24,19,11,.94), rgba(13,10,8,.88)); backdrop-filter: blur(20px); }

.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.05; letter-spacing: -.045em; }
.brand h1 span { color: var(--gold); }
.brand-large { flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.brand-large > div { width: 100%; }
.brand-large h1 { max-width: 100%; font-size: clamp(2.15rem, 8vw, 4.35rem); text-align: center; }
.brand-large .brand-logo { width: 126px; max-width: 36vw; border-radius: 27px; }
.brand-large .eyebrow { margin-bottom: 8px; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: .72rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.sublead { margin: -10px 0 0; color: #d9cda8; font-size: .95rem; }
.brand-logo { display: block; width: 96px; max-width: 28vw; height: auto; border-radius: 24px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 34px rgba(0,0,0,.34); background: #050505; }
.brand-logo-small { width: 78px; max-width: none; border-radius: 18px; }
.official-brand { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 5px; padding: 5px 9px; border: 1px solid rgba(255,214,51,.2); border-radius: 999px; background: linear-gradient(90deg, rgba(255,214,51,.1), rgba(255,214,51,.025)); }
.official-brand .eyebrow { margin: 0; color: #ffd633; font-size: .72rem; letter-spacing: .16em; white-space: nowrap; }
.group-photo-preview { width: 96px; height: 96px; object-fit: cover; border: 2px solid rgba(255,255,255,.18); border-radius: 22px; margin: 0 0 16px; }
.lead { max-width: 590px; margin: 22px auto 24px; color: #c9ddd4; font-size: clamp(1rem, 2.3vw, 1.18rem); line-height: 1.65; text-align: center; }
.group-meta { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }

.welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-welcome { margin: 22px 0; padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.055); }
.account-welcome p { margin: 0 0 12px; }
.account-welcome .account-actions { margin: 0; }
.account-welcome #signedInAccount { align-items: center; justify-content: space-between; gap: 14px; }
.account-welcome #signedInAccount:not(.hidden) { display: flex; }
.account-welcome #signedInAccount div { display: grid; gap: 3px; }
.account-welcome small, .auth-switch { color: var(--muted); }
.member-hub { margin: 22px 0 6px; padding: 20px; border: 1px solid rgba(255,214,51,.18); border-radius: 22px; background: linear-gradient(145deg, rgba(255,214,51,.055), rgba(255,255,255,.025)); }
.member-hub-heading h2 { margin: 0 0 16px; font-size: clamp(1.35rem, 4vw, 2rem); }
.member-hub-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.member-hub-card { min-width: 0; min-height: 145px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); text-align: left; background: #15120e; }
.member-hub-card:hover { transform: translateY(-2px); border-color: rgba(255,214,51,.36); }
.member-hub-card > span { display:grid; place-items:center; width:42px; height:42px; font-size:1.7rem; line-height:1; }
.member-hub-card strong { font-size: 1.08rem; }
.member-hub-card small { color: var(--muted); line-height: 1.4; }
.club-welcome-sublead { max-width: 590px; margin: -15px auto 24px; color: var(--muted); text-align: center; line-height: 1.5; }
.auth-switch { text-align: center; margin: 18px 0 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.feature-grid > div { min-height: 128px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.feature-grid span { display: block; margin-bottom: 9px; font-size: 25px; }
.feature-grid strong, .feature-grid small { display: block; }
.feature-grid small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.club-link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.club-link-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 18px; color: var(--text); text-align: left; text-decoration: none; background: rgba(255,255,255,.025); transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.club-link-card:hover { transform: translateY(-2px); border-color: rgba(255,214,51,.32); background: rgba(255,214,51,.045); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.club-link-card > span:nth-child(2) { min-width: 0; }
.club-link-card strong, .club-link-card small { display: block; }
.club-link-card strong { font-size: 1rem; }
.club-link-card small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.club-link-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,214,51,.15); border-radius: 13px; font-size: 1.3rem; background: rgba(255,214,51,.07); }
.club-link-icon svg { width: 23px; height: 23px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.club-link-icon svg .icon-fill { fill: var(--gold); stroke: none; }
.club-link-logo { overflow: visible; padding: 0; border-color: transparent; background: transparent; }
.club-link-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.instagram-icon svg { stroke-width: 1.7; }
.club-link-brand { width: 58px; overflow: visible; padding: 0; border-color: transparent; background: transparent; }
.club-link-brand img { width: 60px; height: 42px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }
.welcome-card, .brand > div, .install-guide, .install-guide p, .account-welcome, .club-link-card, .club-link-card > span { min-width: 0; }
.lead, .install-guide p, .account-welcome p, .club-link-card strong, .club-link-card small { max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.club-link-arrow { color: var(--gold); font-size: 1.75rem; font-weight: 400; }

.btn { border: 1px solid transparent; border-radius: 13px; padding: 11px 16px; font-weight: 780; transition: transform .16s ease, filter .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-primary { color: #2d0b00; background: linear-gradient(135deg, #ffd633, #ffb01f); box-shadow: 0 12px 26px rgba(255,214,51,.16); }
.btn-secondary { color: var(--text); background: #22180e; border-color: var(--line); }
.btn-danger { color: #ffdede; background: rgba(255, 77, 77, .14); border-color: rgba(255,117,117,.28); }
.btn-large { width: 100%; padding: 15px 18px; }
.btn-submit { width: 100%; padding: 15px; font-size: 1rem; }
.icon-btn { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.045); font-size: 19px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.text-btn, .name-link { border: 0; color: var(--green); background: transparent; padding: 0; font-weight: 800; }
.text-btn:hover, .name-link:hover { text-decoration: underline; }

.app-shell { padding: 22px 0 40px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 2px 20px; }
.top-actions { display: grid; grid-template-columns: repeat(2, 45px); gap: 7px; flex: 0 0 auto; }
.top-actions:has(.menu-trigger) { grid-template-columns:45px; }
.menu-trigger { font-size:1.45rem; }
.menu-dialog { width:min(500px, calc(100% - 20px)); }
.menu-section { display:grid; gap:8px; padding:14px 0; border-top:1px solid var(--line); }
.menu-section:first-of-type { border-top:0; padding-top:0; }
.menu-section h3 { margin:0 0 3px; color:var(--gold); font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; }
.menu-row,.menu-toggle { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:50px; padding:12px 14px; border:1px solid var(--line); border-radius:13px; color:var(--text); background:rgba(255,255,255,.025); font:inherit; font-weight:750; text-align:left; }
.menu-row b { color:var(--gold); font-size:1.35rem; }
.menu-row.menu-danger { color:#ffb7b7; border-color:rgba(255,100,100,.2); }
.menu-toggle input { width:21px; height:21px; }
.group-panel-note { margin:0; }
.group-switcher { max-width: 190px; background: #151515; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px; }
.my-groups-list { display: grid; gap: 10px; margin: 18px 0; }
.my-group-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09); }
.my-group-row > div { flex: 1; display: grid; gap: 4px; }
.my-group-row small { color: var(--muted); }
.chat-switch { display: flex; gap: 8px; margin-bottom: 16px; }
.chat-messages { min-height: 320px; max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 0 16px; }
.chat-message { max-width: 82%; padding: 11px 13px; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.08); }
.chat-message.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: rgba(172,255,47,.16); }
.chat-message-head { display: flex; gap: 10px; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
.chat-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-delete { border: 0; background: transparent; color: #ff8d8d; padding: 0; margin-top: 6px; font-size: .75rem; }
.profile-photo-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 24px; border: 2px solid rgba(255,255,255,.18); margin: 8px 0 16px; }
.field-error { color: #ff8d8d; font-weight: 700; margin: -6px 0 14px; }
.input-error { border-color: #ff6565 !important; box-shadow: 0 0 0 3px rgba(255,70,70,.14); }
.form-error-summary { margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgba(255,101,101,.42); border-radius: 13px; color: #ffd1d1; background: rgba(130,25,25,.24); font-weight: 750; line-height: 1.4; }
.owner-full-page { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; padding:clamp(16px,3vw,34px) clamp(16px,3vw,34px) calc(94px + env(safe-area-inset-bottom)); border-radius:0; overflow-x:hidden; box-sizing:border-box; }
.owner-full-page .dialog-head,
.owner-full-page .section-heading,
.owner-full-page .settings-member-list,
.owner-full-page .settings-member,
.owner-full-page .settings-member > span:first-child { min-width: 0; max-width: 100%; }
.owner-full-page .settings-member > span:first-child { overflow-wrap: anywhere; }
.owner-full-page .settings-member strong,
.owner-full-page .settings-member small,
#ownerGroupMeta { overflow-wrap: anywhere; word-break: break-word; }
.owner-full-page .owner-action { max-width: 100%; white-space: normal; }
.owner-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.owner-summary > div { padding:14px 10px; border:1px solid var(--line); border-radius:15px; text-align:center; background:rgba(255,214,51,.04); }
.owner-summary strong,.owner-summary small { display:block; }
.owner-summary strong { color:var(--gold); font-size:1.5rem; }
.owner-summary small { margin-top:4px; color:var(--muted); }
.owner-nav { position:fixed; z-index:100; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; margin:0; padding:7px 6px calc(7px + env(safe-area-inset-bottom)); overflow:hidden; border:1px solid var(--line); border-radius:18px 18px 0 0; background:rgba(14,11,8,.98); box-shadow:0 -12px 30px rgba(0,0,0,.45); backdrop-filter:blur(14px); }
.owner-nav-button { min-width:0; min-height:58px; display:grid; place-items:center; align-content:center; gap:2px; padding:6px 2px; border:0; border-radius:11px; color:var(--muted); background:transparent; font-weight:850; cursor:pointer; }
.owner-nav-button span { font-size:1.05rem; line-height:1; }
.owner-nav-button small { max-width:100%; overflow:hidden; font-size:clamp(.54rem,2.4vw,.72rem); font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.owner-nav-button.active { color:#211400; background:var(--gold); }
.owner-tab-view { display:none; min-width:0; }
.owner-tab-view.active { display:block; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 14px; }
.score-card { position: relative; overflow: hidden; min-height: 138px; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.score-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.06); }
.fish-score { background: linear-gradient(145deg, #2f2412, #17110a); }
.beer-score { background: linear-gradient(145deg, #4c100f, #220b0a); }
.score-card strong { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.score-card small { margin-top: 6px; color: var(--muted); font-weight: 750; }
.score-icon { font-size: 25px; margin-bottom: 7px; }
.versus { color: #7d998d; font-size: .72rem; font-weight: 900; letter-spacing: .18em; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 15px 45px rgba(0,0,0,.18); padding: clamp(17px, 3.2vw, 26px); }
.group-panel { margin-bottom: 14px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-heading h2, .section-heading h3 { margin: 0; letter-spacing: -.025em; }
.compact-heading { margin-bottom: 12px; }
.section-total { color: var(--muted); font-weight: 800; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(0,0,0,.18); font-size: .75rem; font-weight: 750; }
.status-pill > span { width: 8px; height: 8px; border-radius: 50%; background: #f4b94d; box-shadow: 0 0 0 4px rgba(244,185,77,.1); }
.status-pill.online > span { background: var(--green); box-shadow: 0 0 0 4px rgba(85,239,168,.1); }
.status-pill.error > span { background: var(--danger); }

.member-strip { display: flex; gap: 10px; overflow-x: auto; padding: 3px 0 2px; scrollbar-width: thin; }
.member-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px 7px 7px; color: var(--text); background: rgba(255,255,255,.035); }
.member-chip:hover { border-color: rgba(85,239,168,.35); }
.member-avatar { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; object-fit: cover; border-radius: 50%; color: #2d1200; background: linear-gradient(135deg, #ffe783, var(--green-2)); font-weight: 900; }
.member-chip.online .member-avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid var(--panel-strong); border-radius: 50%; background: var(--green); }
.member-chip small { color: var(--muted); }

.tabbar { position: sticky; top: 8px; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; padding: 7px; border: 1px solid var(--line); border-radius: 17px; background: rgba(14,11,8,.9); backdrop-filter: blur(16px); }
.tab-button { border: 0; border-radius: 11px; padding: 11px 8px; color: var(--muted); background: transparent; font-weight: 800; }
.tab-button span { margin-right: 5px; }
.tab-button.active { color: #2d0b00; background: var(--green); }
.tab-view { display: none; gap: 14px; }
.tab-view.active { display: grid; }

.catch-form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1.2fr 1.2fr .65fr; }
label { display: grid; gap: 7px; color: #d3e6dd; font-size: .82rem; font-weight: 720; }
input, select { width: 100%; min-width: 0; border: 1px solid rgba(217,255,237,.13); border-radius: 12px; padding: 13px 14px; color: var(--text); outline: none; background: rgba(0,0,0,.2); }
input:focus, select:focus { border-color: rgba(85,239,168,.62); box-shadow: 0 0 0 3px rgba(85,239,168,.08); }
input::placeholder { color: #718d80; }
select option { color: #fff; background: #102c22; }

.catch-list, .beer-list, .profile-catch-list { display: grid; gap: 10px; }
.catch-item, .beer-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: start; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.fish-emoji, .beer-emoji { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 22px; background: rgba(255,214,51,.10); }
.beer-emoji { background: rgba(255,64,64,.12); }
.catch-title-row, .beer-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.catch-title-row time, .beer-title-row time { color: #779487; font-size: .72rem; white-space: nowrap; }
.catch-details, .catch-note, .beer-details { margin: 4px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.catch-note { color: #c7dbd1; font-style: italic; }
.catch-delete, .beer-delete { width: 30px; height: 30px; border: 1px solid rgba(255,117,117,.22); border-radius: 9px; color: #ffb1b1; background: rgba(255,77,77,.08); }
.catch-edit { width: 30px; height: 30px; border: 1px solid rgba(255,214,51,.25); border-radius: 9px; color: var(--green); background: rgba(255,214,51,.08); }
.public-profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-large-initials { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 24px; color: #2d1200; background: linear-gradient(135deg, #ffe783, var(--green-2)); font-size: 2rem; font-weight: 900; }
.public-profile-fields { display: grid; gap: 10px; }
.public-profile-fields > div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.public-profile-fields small, .public-profile-fields strong { display: block; }
.public-profile-fields small { margin-bottom: 5px; color: var(--muted); }
.public-profile-fields strong { white-space:pre-line; line-height:1.55; }
.inline-name { display: inline; font-size: inherit; }
.empty-state { display: grid; place-items: center; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty-state > span { font-size: 34px; }
.empty-state strong { margin-top: 8px; color: #dbeee5; }
.empty-state p { margin: 5px 0 0; max-width: 430px; }

.beer-counter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.beer-counter-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(255,185,31,.12), rgba(255,255,255,.02)); }
.beer-counter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.beer-counter-head strong { font-size: 1.7rem; color: var(--beer); }
.beer-counter-card .name-link { color: var(--text); text-align: left; }
.beer-add { width: 100%; color: #3a1400; background: linear-gradient(135deg, #ffe37b, var(--beer)); }
.king-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.king-card { display: grid; place-items: center; text-align: center; }
.king-card > span { font-size: 34px; }
.king-card small { margin-top: 8px; color: var(--muted); }
.king-name { margin-top: 5px; color: var(--text); font-size: 1.25rem; }
.king-card p { margin: 5px 0 0; color: var(--muted); }

.table-wrap { overflow-x: visible; }
.ranking-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ranking-table th, .ranking-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: right; overflow-wrap: anywhere; }
.ranking-table th:first-child, .ranking-table td:first-child { width: 40%; }
.ranking-table th:first-child, .ranking-table td:first-child { text-align: left; }
.ranking-table th { color: #79998a; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.ranking-table tbody tr:last-child td { border-bottom: 0; }
.rank-medal { display: inline-flex; width: 25px; color: var(--muted); }
.ranking-switch { width: min(170px, 45%); margin: 0; }
.ranking-switch span { font-size: .68rem; }
.ranking-switch select { padding: 9px 30px 9px 10px; }
.active-ranking-badge { display: inline-block; margin-top: 5px; padding: 4px 8px; border: 1px solid rgba(172,255,47,.25); border-radius: 999px; color: var(--green); background: rgba(172,255,47,.08); font-size: .68rem; font-weight: 800; }
.species-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: -4px 0 16px; }
.species-points-hint { grid-column: 1 / -1; margin: 0 0 2px; color: var(--muted); font-size: .82rem; }
.species-point-row { display: grid; grid-template-columns: minmax(0, 1fr) 86px; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.species-point-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.species-point-row input { margin: 0; padding: 8px; text-align: right; }
.points-catch-overview { display: grid; gap: 10px; }
.points-member-card { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.points-member-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.points-member-heading b { color: var(--green); font-size: 1.15rem; }
.points-fish-list { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: .84rem; }
.points-fish-list span { padding-top: 5px; border-top: 1px solid rgba(255,255,255,.06); }
.species-records { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.species-record { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.species-record-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: rgba(255,214,51,.10); }
.species-record small { display: block; margin-bottom: 4px; color: var(--muted); }
.species-record .record-size { color: #ff5454; font-size: 1.2rem; font-weight: 900; white-space: nowrap; }

.legend { display: flex; gap: 12px; color: var(--muted); font-size: .75rem; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.fish-dot { background: var(--green); }
.beer-dot { background: var(--beer); }
.weekly-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-height: 220px; align-items: end; }
.day-column { height: 200px; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.bar-area { display: flex; align-items: end; justify-content: center; gap: 4px; min-height: 0; }
.bar { width: min(20px, 42%); min-height: 3px; border-radius: 7px 7px 2px 2px; }
.bar-area.fish-only .bar.fish { width: min(30px, 70%); }
.bar.fish { background: linear-gradient(to top, #bc8710, var(--green)); }
.bar.beer { background: linear-gradient(to top, #a62222, #ff6767); }
.day-label { display: grid; place-items: center; gap: 2px; color: var(--muted); font-size: .7rem; }
.day-label strong { color: #d3e6dd; }
.weekly-member-list { display: grid; gap: 9px; }
.weekly-member { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.weekly-member span { color: var(--muted); font-size: .82rem; }
.weekly-member strong { color: var(--green); }

.dialog-card { width: min(560px, calc(100% - 24px)); max-height: min(88vh, 840px); overflow-y: auto; border: 1px solid rgba(255,215,77,.18); border-radius: 24px; padding: 24px; color: var(--text); background: #15110c; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.dialog-wide { width: min(720px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(0,9,6,.74); backdrop-filter: blur(7px); }
.dialog-card form, .dialog-card { gap: 14px; }
.dialog-card form { display: grid; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dialog-head h2 { margin: 0; letter-spacing: -.03em; }
.dialog-back { flex:0 0 42px; display:inline-grid; place-items:center; width:42px; height:42px; padding:0; border:0; border-radius:0; color:var(--text); background:transparent; font-size:0; line-height:1; cursor:pointer; }
.dialog-back::before { content:""; display:block; width:13px; height:13px; border-left:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); }
.dialog-back:hover { color:var(--gold); }
.dialog-head-with-back { justify-content:flex-start; }
.dialog-head-with-back > div { flex:1; min-width:0; }
.dialog-head-with-back .dialog-close { margin-left:auto; }
.sync-status-row { display:flex; justify-content:flex-end; margin:6px 2px 12px; }
.repeat-field { min-width:0; margin:0 0 14px; padding:14px; border:1px solid var(--line); border-radius:15px; }
.repeat-field legend { padding:0 7px; color:var(--text); font-weight:800; }
.repeat-example { margin:0 0 10px; color:var(--muted); font-size:.8rem; }
.repeat-rows { display:grid; gap:8px; }
.repeat-row { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:8px; align-items:center; }
.repeat-row-best { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px; }
.repeat-row input { min-width:0; margin:0; }
.repeat-remove { height:42px; border:1px solid rgba(255,100,100,.3); border-radius:11px; background:rgba(120,0,0,.2); color:#ffb0b0; font-size:1.3rem; cursor:pointer; }
.compact-add { width:100%; margin-top:9px; }
.dialog-close { border: 0; color: var(--muted); background: transparent; font-size: 28px; line-height: 1; }
.dialog-copy, .tiny { color: var(--muted); line-height: 1.5; }
.tiny { font-size: .76rem; }
.invite-code-box { display: grid; place-items: center; margin: 10px 0 16px; padding: 20px; border: 1px dashed rgba(255,214,51,.35); border-radius: 16px; background: rgba(255,214,51,.06); }
.invite-code-box small { color: var(--muted); }
.invite-code-box strong { margin-top: 4px; color: #ff5454; font-size: 2rem; letter-spacing: .18em; }
.copy-row { display: flex; gap: 8px; }
.copy-row .btn { flex: 0 0 auto; }
.settings-section { display: grid; gap: 12px; }
.settings-section h3 { margin: 0; }
.toggle-label { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 46px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.toggle-label input[type="checkbox"], .helper-permission input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; padding: 0; accent-color: var(--green); }
.toggle-label > span { flex: 1; margin: 0; line-height: 1.25; }
.toggle-stack { display: grid; gap: 8px; }
.settings-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.settings-accordion summary { position: relative; display: grid; gap: 3px; padding: 15px 44px 15px 15px; cursor: pointer; list-style: none; }
.settings-accordion summary::-webkit-details-marker { display: none; }
.settings-accordion summary::after { content: "⌄"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--green); font-size: 1.35rem; transition: transform .18s ease; }
.settings-accordion[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.settings-accordion summary span { color: var(--text); font-size: 1rem; font-weight: 850; }
.settings-accordion summary small { color: var(--muted); font-size: .73rem; }
.accordion-content { display: grid; gap: 12px; padding: 0 15px 15px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 15px; }
.danger-accordion summary span { color: #ffb4b4; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.settings-member-list { display: grid; gap: 8px; }
.settings-member { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.settings-member > span:first-child { flex: 1 1 150px; }
.settings-member small { color: var(--muted); }
.settings-save-final { position: sticky; bottom: 8px; z-index: 2; margin-top: 16px; box-shadow: 0 10px 28px rgba(0,0,0,.38); }
.member-remove { border: 0; color: #ffaaaa; background: transparent; }
.helper-permission { flex: 1 0 100%; display: flex; align-items: center; gap: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }

.profile-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.profile-stats > div { min-width: 0; padding: 14px 8px; border: 1px solid var(--line); border-radius: 14px; text-align: center; background: rgba(255,255,255,.025); }
.profile-stats strong, .profile-stats small { display: block; }
.profile-stats strong { overflow: hidden; color: var(--green); font-size: 1.25rem; text-overflow: ellipsis; }
.profile-stats small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.profile-heading { margin-top: 22px; }

.warning { margin: 16px 0; padding: 13px 15px; border: 1px solid rgba(255,117,117,.25); border-radius: 14px; color: #ffd5d5; background: rgba(255,77,77,.09); }
.toast { position: fixed; z-index: 2147483647; inset: auto auto max(22px, env(safe-area-inset-bottom)) 50%; margin: 0; transform: translate(-50%, 30px); width: max-content; max-width: calc(100% - 30px); padding: 11px 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: #143a2b; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; white-space: normal; text-align: center; }
.toast::backdrop { background: transparent; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast.error { background: #4b2020; }
.footer-note { padding: 25px 0 7px; color: #668276; text-align: center; font-size: .75rem; }
.app-footer { padding-top: 28px; }
.app-footer .footer-note { padding-top: 12px; }
.app-footer-links { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-footer-links a,.app-footer-links button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; background: rgba(255,255,255,.025); font: inherit; font-size: .76rem; }
.app-footer-links span { color: var(--gold); font-size: .9rem; }
.mini-brand-icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #1c1100 !important; background: var(--gold); font-size: .55rem !important; font-weight: 950; }
.mini-instagram-icon { font-size: 1.15rem !important; line-height: 1; }
.legal-section { padding: 2px 0; }
.legal-section h3 { margin-bottom: 7px; color: var(--gold); }
.legal-section p { line-height: 1.6; }
.form-status { margin: 0; padding: 12px 14px; border-radius: 12px; font-weight: 750; }
.form-status.pending { color: #fff0b5; background: rgba(255,214,51,.08); }
.form-status.success { color: #caffdf; background: rgba(58,184,110,.16); border: 1px solid rgba(83,220,138,.24); }
.form-status.error { color: #ffd4d4; background: rgba(255,77,77,.14); border: 1px solid rgba(255,117,117,.24); }

.notification-button { position: relative; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #111; border-radius: 999px; color: #160e00; background: var(--gold, #ffd633); font-size: .66rem; font-weight: 900; line-height: 15px; }
.notification-list { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.notification-item { position:relative; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.notification-item.unread { border-color: rgba(255,214,51,.42); background: rgba(255,214,51,.07); }
.notification-item strong, .notification-item small { display: block; }
.notification-item p { margin: 6px 0; color: var(--text); }
.notification-item small { color: var(--muted); }
.notification-delete { margin-top:9px; padding:6px 10px; border:1px solid rgba(255,255,255,.14); border-radius:9px; color:var(--muted); background:transparent; cursor:pointer; }
.notification-actionable { cursor:pointer; }
.notification-actionable:hover { border-color:rgba(255,214,51,.5); }
.moderation-message { margin-bottom:14px; padding:13px 15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); }
.moderation-message strong { color:var(--gold); }
.moderation-message p { margin:7px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.dialog-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.owner-report-focus { border-color:var(--gold) !important; box-shadow:0 0 0 3px rgba(255,214,51,.18); }
.chat-report { margin-left:8px; border:0; color:#e9c86a; background:transparent; font-weight:750; }
.owner-chat-list { max-height:none; }
.owner-report-row > span:first-child { flex-basis:100%; }
.auth-help { display: block; margin: 12px auto 0; }
#privacyDialog a { color: var(--green); }
.install-guide { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 11px; max-width: 590px; margin: 0 auto 24px; padding: 13px 15px; border: 1px solid rgba(255,214,51,.18); border-radius: 14px; background: rgba(255,214,51,.045); }
.install-guide > span { flex: 0 0 auto; font-size: 1.25rem; line-height: 1.35; }
.install-guide p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; text-align: left; }
.install-guide .text-btn { grid-column: 2; justify-self: start; padding: 3px 0; color: var(--gold); white-space: normal; }


.feature-grid > div, .score-card, .panel, .species-record, .beer-counter-card, .member-chip { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.feature-grid > div:hover, .species-record:hover, .beer-counter-card:hover, .member-chip:hover { transform: translateY(-1px); border-color: rgba(255,214,51,.28); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.scoreboard .score-card strong { text-shadow: 0 2px 12px rgba(0,0,0,.22); }

@media (max-width: 780px) {
  .welcome-actions, .feature-grid, .club-link-grid, .beer-counter-grid { grid-template-columns: 1fr; }
  .member-hub-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .feature-grid > div { min-height: auto; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
  .form-grid.three label:first-child { grid-column: 1 / -1; }
  .species-records { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .repeat-row-best { grid-template-columns:minmax(0,1fr) 42px; }
  .repeat-row-best input:nth-child(2) { grid-column:1 / 2; }
  .repeat-row-best .repeat-remove { grid-column:2; grid-row:1 / span 2; height:100%; }
  .install-guide { grid-template-columns: 28px minmax(0,1fr); }
  .install-guide p { min-width: 0; font-size: .82rem; }
  .install-guide .text-btn { margin-left: 0; }
  .species-points { grid-template-columns: 1fr; }
  .welcome-shell, .app-shell { width: min(100% - 18px, 1120px); }
  .app-shell { padding-top: 10px; }
  .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:10px; }
  .topbar .brand { width: 100%; min-width: 0; }
  .topbar .brand > div { min-width: 0; }
  .topbar .official-brand { max-width: 100%; }
  .topbar .official-brand .eyebrow { white-space: normal; overflow-wrap: anywhere; }
  .brand-logo { width: 70px; }
  .brand-logo-small { width: 62px; }
  .brand h1 { font-size: 1.25rem; }
  .brand-large { gap: 12px; }
  .brand-large h1 { font-size: clamp(1.85rem, 10vw, 2.7rem); overflow-wrap: anywhere; }
  .brand-large .brand-logo { width: 108px; max-width: 42vw; }
  .brand-large .eyebrow { font-size: .62rem; letter-spacing: .1em; }
  .top-actions { width:auto; grid-template-columns:41px; gap:7px; }
  .top-actions .icon-btn { justify-self: center; }
  .top-actions .group-switcher { grid-column: 1 / -1; width: 100%; max-width: none; }
  .icon-btn { width: 41px; height: 41px; }
  .score-card { min-height: 112px; }
  .score-card strong { font-size: 2.55rem; }
  .panel { border-radius: 18px; padding: 16px; }
  .tabbar { top: 5px; gap: 3px; padding: 5px; }
  .tab-button { padding: 10px 3px; font-size: .73rem; }
  .tab-button span { display: block; margin: 0 0 2px; }
  .form-grid.two, .form-grid.three, .king-grid { grid-template-columns: 1fr; }
  .form-grid.three label:first-child { grid-column: auto; }
  .weekly-chart { gap: 4px; }
  .weekly-member { grid-template-columns: 1fr auto; }
  .weekly-member span:last-child { grid-column: 1 / -1; }
  .profile-stats { grid-template-columns: repeat(2,1fr); }
  .copy-row { flex-direction: column; }
  .catch-item, .beer-item { gap: 9px; padding: 12px; }
  .fish-emoji, .beer-emoji { width: 36px; height: 36px; border-radius: 11px; font-size: 19px; }
  .catch-title-row, .beer-title-row { display: block; }
  .catch-title-row time, .beer-title-row time { display: block; margin-top: 2px; }
  .ranking-table th, .ranking-table td { padding: 8px 3px; font-size: .73rem; }
  .ranking-table th { font-size: .6rem; letter-spacing: .03em; }
  .rank-medal { width: 20px; }
  .account-actions { grid-template-columns: 1fr; }
  .account-actions .btn { width: 100%; white-space: normal; }
  .club-link-card { grid-template-columns: auto minmax(0,1fr) auto; padding: 14px; }
}

.dialog-card.club-full-page { width:min(920px, calc(100vw - 24px)); max-width:920px; max-height:calc(100dvh - 24px); }
.club-member-avatar:is(img) { object-fit:cover; }
@media (max-width:640px) {
  .dialog-card.club-full-page { width:100vw; max-width:none; max-height:100dvh; height:100dvh; border-radius:0; margin:0; }
  .dialog-card.owner-full-page { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; padding:16px; margin:0; border-radius:0; overflow-x:hidden; }
  .owner-summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .owner-summary > div { padding:10px 5px; }
  .owner-summary strong { font-size:1.2rem; }
  .owner-summary small { font-size:.62rem; }
  .owner-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .owner-full-page .dialog-head { align-items:flex-start; gap:10px; }
  .owner-full-page .dialog-head > div { min-width:0; }
  .owner-full-page .dialog-head h2 { font-size:1.65rem; overflow-wrap:anywhere; }
  .owner-full-page .section-heading { display:block; }
  .owner-full-page .settings-member { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; padding:12px; }
  .owner-full-page .settings-member > span:first-child { grid-column:1 / -1; }
  .owner-full-page .owner-action { width:100%; min-width:0; padding:10px 7px; line-height:1.2; text-align:center; }
  .owner-full-page .profile-stats { gap:7px; }
  .owner-full-page .profile-stats > div { min-width:0; padding:12px 7px; }
  .owner-full-page .profile-catch-row { min-width:0; }
  .owner-full-page .profile-catch-row > span { min-width:0; overflow-wrap:anywhere; }
}

/* Compact club landing page on phones. Kept after base rules so it wins. */
@media (max-width:640px) {
  .member-hub { padding: 15px; border-radius: 19px; }
  .member-hub-heading h2 { margin-bottom: 13px; font-size: 1.55rem; line-height: 1.15; }
  .member-hub-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .member-hub-card { min-height: 112px; padding: 14px; border-radius: 16px; gap: 5px; }
  .member-hub-card.member-hub-primary { grid-column:auto; min-height:112px; }
  .member-hub-card > span { width:34px; height:34px; font-size:1.4rem; }
  .member-hub-card strong { font-size: 1rem; }
  .member-hub-card small { font-size: .78rem; line-height: 1.3; }
  .club-welcome-sublead { margin-top: -13px; font-size: .86rem; }
  .app-footer-links { gap: 4px; }
  .app-footer-links a,.app-footer-links button { padding: 6px 9px; font-size: .72rem; }
}

/* Prevent wide tables and long names from stretching the mobile layout. */
.app-shell, .tab-view, .panel, .table-wrap { min-width: 0; }
.table-wrap { width: 100%; max-width: 100%; }
.member-chip > span:last-child { min-width: 0; text-align: left; }
.member-chip strong, .member-chip small { display: block; }
.member-chip strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
