    :root {
      color-scheme: dark;
      --bg: #000000;
      --panel: #1c1c1e;
      --panel-2: #2c2c2e;
      --line: transparent;
      --text: #ffffff;
      --muted: #8e8e93;
      --muted-2: #636366;
      --accent: #c8fc00;
      --accent-2: #a8e000;
      --accent-text: #c8fc00;
      --accent-soft: rgba(200,252,0,.14);
      --accent-line: rgba(200,252,0,.4);
      --danger: #ff453a;
      --ok: #30d158;
      --warn: #ffd60a;
      --purple: #bf5af2;
      --cyan: #64d2ff;
      --green: #30d158;
      --orange: #ff9f0a;
      --pink: #ff375f;
      --blue: #0a84ff;
      --red: #ff453a;
      --yellow: #ffd60a;
      --ease-ios: cubic-bezier(.16, 1, .3, 1);
      --ease-sheet: cubic-bezier(.32, .72, 0, 1);
      --ease-press: cubic-bezier(.2, .7, .3, 1);
    }
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    html, body { overflow-anchor: none; }
    body { touch-action: manipulation; }
    /* Tactile press feedback + snappy transitions on tappable elements. */
    button, .row, .card.clickable, .filter-chip, .tab, .participant, .ach, .icon-btn, .mini-btn, .hero-tile, .p-avatar {
      transition: transform .16s var(--ease-press), background-color .22s var(--ease-ios), box-shadow .22s var(--ease-ios), opacity .22s var(--ease-ios), color .22s var(--ease-ios);
    }
    button:active, .row:active, .card.clickable:active, .filter-chip:active, .tab:active, .participant:active, .ach:active, .icon-btn:active, .mini-btn:active {
      transform: scale(.968);
    }
    @media (prefers-reduced-motion: reduce) {
      button, .row, .card.clickable, .filter-chip, .tab, .participant, .ach, .icon-btn, .mini-btn, .hero-tile, .p-avatar { transition: none; }
      button:active, .row:active, .card.clickable:active, .filter-chip:active, .tab:active, .participant:active, .ach:active, .icon-btn:active, .mini-btn:active { transform: none; }
    }
    body {
      margin: 0;
      min-height: 100vh;
      background: #000000;
      color: var(--text);
      font-family: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
      letter-spacing: 0;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select, textarea { font: inherit; }
    button { cursor: pointer; }
    .app { min-height: 100vh; padding: max(10px, env(safe-area-inset-top)) 18px 100px; }
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .logo { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0a0a; font-weight: 800; box-shadow: 0 10px 24px -10px rgba(200,252,0,.7); }
    h1 { margin: 0; font-size: 30px; line-height: 1.02; font-weight: 700; letter-spacing: -.6px; }
    .subtitle { margin-top: 5px; color: var(--muted); font-size: 14px; font-weight: 500; }
    .icon-btn { width: 44px; height: 44px; border-radius: 14px; border: none; background: #2c2c2e; color: #aeaeb2; font-size: 19px; display: grid; place-items: center; }
    .content { display: grid; gap: 14px; }
    .card { border: none; background: var(--panel); border-radius: 22px; padding: 20px; box-shadow: none; }
    .section-title { font-size: 18px; font-weight: 700; margin: 18px 0 4px; color: var(--text); }
    .muted { color: var(--muted); }
    .pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 13px; background: var(--accent-soft); border: 1px solid rgba(200,252,0,.28); color: var(--accent-text); font-size: 12px; font-weight: 600; }
    .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
    .match-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
    .match-title { font-size: 26px; font-weight: 700; line-height: 1.05; letter-spacing: -.5px; }
    .hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .hero-grid.two { grid-template-columns: repeat(2, 1fr); margin-top: 10px; }
    .hero-tile { background: var(--panel-2); border-radius: 16px; padding: 16px 12px 14px; text-align: center; min-width: 0; }
    .hero-val { display: flex; align-items: center; justify-content: center; gap: 6px; font: 800 24px/1 -apple-system, system-ui; white-space: nowrap; }
    .hero-lbl { color: var(--muted-2); font-size: 12px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .trend-chip { font: 700 11px/1 -apple-system, system-ui; padding: 3px 6px; border-radius: 8px; }
    .rating-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
    .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
    .stat { background: var(--panel-2); border: none; border-radius: 16px; padding: 14px 12px; }
    .stat strong { display: block; font-size: 22px; font-weight: 700; }
    .stat span { color: var(--muted-2); font-size: 12px; margin-top: 6px; display: block; }
    .primary { width: 100%; min-height: 54px; border: 0; border-radius: 18px; color: #0a0a0a; background: var(--accent); font-weight: 700; font-size: 17px; box-shadow: 0 12px 28px -10px rgba(200,252,0,.6); }
    .outline { width: 100%; min-height: 52px; border-radius: 18px; background: var(--panel); color: #f2f2f7; border: 1px solid rgba(255,255,255,.12); font-weight: 700; font-size: 16px; }
    .players-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .player-card { min-height: 126px; border: none; background: #1c1c1e; border-radius: 20px; padding: 14px; display: grid; align-content: space-between; gap: 10px; text-align: left; color: var(--text); }
    .avatar { width: 48px; height: 48px; border-radius: 50%; border: none; display: grid; place-items: center; color: #c7c7cc; background: #2c2c2e; font-weight: 700; font-size: 18px; }
    .avatar img, .profile-avatar img, .p-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; image-orientation: from-image; }
    .participant-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .participant { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 8px; width: 100%; min-width: 0; text-align: left; padding: 8px 9px; border-radius: 15px; background: #1c1c1e; border: none; color: var(--text); }
    .p-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: none; background: #2c2c2e; display: grid; place-items: center; color: #c7c7cc; font-weight: 700; font-size: 14px; }
    .p-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
    .p-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .p-nick { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .p-rating { flex: none; font-size: 17px; font-weight: 800; color: #ffd60a; min-width: 22px; text-align: right; }
    .thumb { border: none; background: #2c2c2e; border-radius: 12px; padding: 8px 12px; font-size: 17px; line-height: 1; }
    .thumb.up-on { background: rgba(200,252,0,.18); border-color: rgba(200,252,0,.5); }
    .thumb.down-on { background: rgba(255,69,58,.16); border-color: rgba(255,69,58,.5); }
    /* Rate players (match reactions) */
    .rate-hint { display: flex; align-items: center; gap: 10px; background: #1c1c1e; border-radius: 16px; padding: 13px 15px; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-bottom: 4px; }
    .rate-hint svg { flex: none; color: var(--muted-2); }
    .rate-help { border-radius: 22px; padding: 16px; margin-bottom: 12px; background: linear-gradient(160deg, rgba(255,149,0,.28), rgba(28,28,30,.96) 68%); box-shadow: inset 0 0 0 1px rgba(255,149,0,.34), 0 12px 30px rgba(142,142,147,.14); }
    .rate-help-title { color: #ffd18a; font-size: 16px; font-weight: 900; margin-bottom: 12px; }
    .rate-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .rate-help-item { min-width: 0; display: grid; gap: 5px; justify-items: center; text-align: center; border-radius: 16px; padding: 10px 7px; background: rgba(100,210,255,.1); color: var(--muted); font-size: 11.5px; font-weight: 800; line-height: 1.15; }
    .rate-help-item b { font-size: 22px; line-height: 1; }
    .rate-help-item.up { color: var(--green); background: rgba(48,209,88,.14); }
    .rate-help-item.ok { color: var(--cyan); background: rgba(100,210,255,.14); }
    .rate-help-item.down { color: var(--red); background: rgba(255,69,58,.13); }
    .rate-mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; padding: 5px; border-radius: 18px; background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
    .rate-mode-btn { border: 0; border-radius: 14px; padding: 11px 12px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 850; }
    .rate-mode-btn.active { background: var(--accent); color: #0a0a0a; box-shadow: 0 8px 22px -14px rgba(200,252,0,.9); }
    .rate-switch-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
    .rate-switch-actions .outline { min-height: 48px; }
    .rate-switch-actions .to-rating { border-color: rgba(200,252,0,.45); color: var(--accent); background: rgba(200,252,0,.1); }
    .rate-switch-actions .to-day { border-color: rgba(191,90,242,.46); color: #d89bff; background: rgba(191,90,242,.12); }
    .rate-switch-actions .to-skills { border-color: rgba(100,210,255,.46); color: var(--cyan); background: rgba(100,210,255,.12); }
    .rate-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; align-items: center; background: #1c1c1e; border-radius: 18px; padding: 10px; }
    .rate-player { min-width: 0; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 9px; align-items: center; }
    .rate-av-btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; flex: none; }
    .rate-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #2c2c2e; display: grid; place-items: center; color: #c7c7cc; font-weight: 700; font-size: 16px; }
    .rate-av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
    .rate-id { min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: var(--text); }
    .rate-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; }
    .rate-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .rate-level { flex: none; min-width: 27px; padding: 3px 6px; border-radius: 9px; background: rgba(255,214,10,.13); color: #ffd60a; font: 800 12px/1 -apple-system,system-ui; text-align: center; }
    .rate-sub { margin-top: 2px; font-size: 12px; font-weight: 650; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rate-side { display: grid; gap: 8px; align-content: start; }
    .rate-actions { display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; }
    .skill-actions { display: grid; grid-template-columns: repeat(4, 34px); gap: 5px; }
    .vote { position: relative; width: 40px; min-width: 0; height: 38px; border: 0; border-radius: 13px; background: #2c2c2e; font-size: 18px; line-height: 1; display: grid; place-items: center; transition: transform .09s ease, background .15s ease, box-shadow .15s ease; }
    .skill-vote { position: relative; width: 34px; min-width: 0; height: 34px; border: 0; border-radius: 12px; background: #2c2c2e; font-size: 16px; line-height: 1; display: grid; place-items: center; transition: transform .09s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease; }
    .skill-vote:active { transform: scale(.9); }
    .skill-vote.on { background: rgba(255,214,10,.18); box-shadow: inset 0 0 0 1.6px rgba(255,214,10,.58); }
    .skill-vote.dim { opacity: .4; }
    .skill-vote.readonly { cursor: default; }
    .skill-vote.readonly:active { transform: none; }
    .skill-rating-sheet { width: 100%; max-width: 420px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.1); border-radius: 28px 28px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -18px 70px rgba(0,0,0,.5); padding: 24px 20px 26px; }
    .not-played-backdrop { z-index: 65; }
    .not-played-sheet { width: 100%; max-width: 440px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.12); border-radius: 30px 30px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -20px 72px rgba(0,0,0,.58); padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
    .not-played-handle { width: 38px; height: 5px; margin: 0 auto 19px; border-radius: 999px; background: rgba(255,255,255,.2); }
    .not-played-icon { width: 64px; height: 64px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 22px; background: rgba(255,214,10,.12); box-shadow: inset 0 0 0 1px rgba(255,214,10,.22); font-size: 31px; }
    .not-played-title { font-size: 23px; line-height: 1.1; font-weight: 900; }
    .not-played-text { max-width: 330px; margin: 9px auto 20px; color: var(--muted); font-size: 15px; line-height: 1.4; }
    .not-played-close { width: 100%; min-height: 50px; border: 0; border-radius: 16px; color: #111; background: var(--yellow); font-size: 16px; font-weight: 900; }
    .skill-rating-head { display: grid; gap: 6px; text-align: center; margin-bottom: 18px; }
    .skill-rating-title { font-size: 24px; font-weight: 900; color: var(--text); }
    .skill-rating-sub { font-size: 14px; font-weight: 700; color: var(--muted); }
    .skill-stars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
    .skill-star { height: 54px; border: 0; border-radius: 16px; background: #2c2c2e; color: rgba(255,214,10,.45); font-size: 28px; line-height: 1; display: grid; place-items: center; }
    .skill-star.on { color: #ffd60a; background: rgba(255,214,10,.14); box-shadow: inset 0 0 0 1.5px rgba(255,214,10,.42); }
    .skill-rating-actions { display: grid; gap: 10px; margin-top: 12px; }
    .vote:active { transform: scale(.9); }
    .vote .cnt { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #3a3a3c; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #1c1c1e; }
    .vote.on.up { background: rgba(48,209,88,.22); box-shadow: inset 0 0 0 1.6px rgba(48,209,88,.65); }
    .vote.on.up .cnt { background: var(--green); color: #08240f; }
    .vote.on:not(.up):not(.down) { background: rgba(100,210,255,.2); box-shadow: inset 0 0 0 1.6px rgba(100,210,255,.58); }
    .vote.on:not(.up):not(.down) .cnt { background: var(--cyan); color: #06202b; }
    .vote.on.down { background: rgba(255,69,58,.2); box-shadow: inset 0 0 0 1.6px rgba(255,69,58,.65); }
    .vote.on.down .cnt { background: var(--red); color: #fff; }
    .rate-you { flex: none; font-size: 13px; font-weight: 700; color: var(--muted-2); background: #2c2c2e; border-radius: 999px; padding: 9px 15px; }
    .vote.readonly { cursor: default; }
    .vote.readonly:active { transform: none; }
    .vote.dim { opacity: .4; }
    .vote.dim:active { transform: scale(.96); }
    .day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .day-card { width: 100%; min-width: 0; min-height: 48px; border: 0; border-radius: 15px; padding: 7px 8px; background: #1c1c1e; color: var(--text); display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 7px; text-align: left; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
    .day-card.on { background: rgba(200,252,0,.14); box-shadow: inset 0 0 0 1.5px rgba(200,252,0,.5); }
    .day-card.dim { opacity: .45; }
    .day-card.closed { background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); color: var(--muted-2); }
    .day-card.closed.on { background: rgba(200,252,0,.07); box-shadow: inset 0 0 0 1.5px rgba(200,252,0,.32); }
    .day-card.closed .rate-av, .day-card.closed .day-name { opacity: .42; }
    .day-card.closed .day-check { opacity: 1; background: rgba(200,252,0,.22); color: var(--accent); }
    .day-card .rate-av { width: 30px; height: 30px; font-size: 12px; }
    .day-name { width: 100%; min-width: 0; font-size: 12px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .day-check { width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; background: rgba(200,252,0,.18); color: var(--accent); font-size: 13px; font-weight: 950; }
    .day-meta { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 5px 8px; border-radius: 999px; background: #2c2c2e; color: var(--accent); font-size: 12px; font-weight: 900; }
    .day-top { margin-bottom: 10px; padding: 12px 14px; min-height: 82px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
    .day-top-title { font-size: 17px; line-height: 1.1; }
    .day-top-sub { margin-top: 6px; font-size: 14px; line-height: 1.2; }
    .day-donut { --pct: 0; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(255,255,255,.09) 0); display: grid; place-items: center; position: relative; }
    .day-donut::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #1c1c1e; }
    .day-donut span { position: relative; z-index: 1; color: var(--accent); font-size: 15px; font-weight: 950; }
    .rate-result-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; }
    .rate-result-main { min-width: 0; display: grid; gap: 10px; }
    .rate-result-title { font-size: 18px; font-weight: 800; color: var(--text); }
    .rate-result-counts { display: flex; flex-wrap: wrap; gap: 7px; }
    .rate-result-count { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 8px 10px; background: #2c2c2e; font-size: 14px; font-weight: 800; color: #f2f2f7; }
    .rate-result-note { color: var(--muted-2); font-size: 13px; font-weight: 650; }
    .rate-donut { --pct: 0; --ring: var(--green); position: relative; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--ring) calc(var(--pct) * 1%), rgba(255,255,255,.09) 0); display: grid; place-items: center; flex: none; }
    .rate-donut::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #1c1c1e; }
    .rate-donut span { position: relative; z-index: 1; color: var(--ring); font-size: 17px; font-weight: 900; }
    .result-pct { display: inline-flex; align-items: center; justify-content: center; min-width: 0; border-radius: 999px; padding: 4px 7px; font-size: 11px; font-weight: 900; line-height: 1; white-space: nowrap; }
    .test-day-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
    .test-day-title strong { font-size: 20px; line-height: 1.1; }
    .result-list { display: grid; gap: 10px; }
    .result-row { width: 100%; min-width: 0; display: grid; grid-template-columns: 28px 48px minmax(0,1fr); align-items: center; gap: 10px; text-align: left; border: 0; color: var(--text); background: linear-gradient(180deg, rgba(32,32,34,.92), rgba(22,22,24,.92)); border-radius: 17px; padding: 11px 12px; }
    .result-team-player { width: 100%; min-width: 0; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 10px; text-align: left; border: 0; color: var(--text); background: linear-gradient(180deg, rgba(32,32,34,.92), rgba(22,22,24,.92)); border-radius: 17px; padding: 11px 12px; }
    .result-avatar-wrap { width: 48px; height: 48px; flex: none; display: block; }
    .result-avatar-wrap .p-avatar { width: 48px; height: 48px; font-size: 16px; }
    .result-team-player .result-avatar-wrap { width: 48px; height: 48px; }
    .result-team-player .result-avatar-wrap .p-avatar { width: 48px; height: 48px; }
    .result-medal { width: 28px; display: grid; place-items: center; font-size: 21px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
    .result-main { min-width: 0; display: grid; gap: 5px; }
    .result-name-line { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0; }
    .result-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 850; color: #f2f2f7; }
    .result-metrics { flex: none; display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
    .result-rating { flex: none; color: #ffd60a; background: rgba(255,214,10,.14); border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 900; line-height: 1; }
    .result-meta { min-width: 0; color: var(--muted-2); font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .result-team-list { display: grid; gap: 10px; margin-top: 10px; width: 100%; }
    .player-name { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .player-meta { color: var(--muted-2); font-size: 13px; }
    .write-access-gate { min-height: calc(100vh - 210px); display: grid; place-items: center; padding: 28px 8px; }
    .write-access-panel { width: min(100%, 520px); text-align: center; }
    .write-access-icon { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 22px; display: grid; place-items: center; background: rgba(36,129,204,.17); color: #64b5f6; font-size: 34px; }
    .write-access-title { margin: 0; font-size: 28px; line-height: 1.12; font-weight: 850; }
    .write-access-copy { max-width: 390px; margin: 12px auto 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
    .write-access-button { width: 100%; margin-top: 28px; background: #2481cc; color: #fff; box-shadow: 0 12px 30px rgba(36,129,204,.22); }
    .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); padding: 11px 8px calc(10px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(255,255,255,.07); will-change: transform, opacity; }
    body.keyboard-open .tabs { transform: translateY(115%); opacity: 0; pointer-events: none; }
    body.crop-open { overflow: hidden; overscroll-behavior: none; touch-action: none; }
    body.crop-open #view, body.crop-open .tabs { pointer-events: none; }
    body.crop-open #cropModal { pointer-events: auto; touch-action: none; }
    .tab { border: 0; background: transparent; color: #636366; display: grid; justify-items: center; gap: 5px; padding: 4px 2px; font-size: 11px; font-weight: 500; }
    .tab.active { color: var(--accent); font-weight: 600; }
    .tab .ico { display: grid; place-items: center; height: 23px; }
    .tab .ico svg { display: block; }
    .toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
    .mini-btn { border: 1px solid var(--line); background: var(--panel); color: #e5e5ea; border-radius: 14px; padding: 11px 14px; font-weight: 600; font-size: 14px; }
    .mini-btn.confirming, .outline.confirming, .primary.confirming { border-color: rgba(255,214,10,.55); background: rgba(255,214,10,.16); color: var(--warn); box-shadow: none; }
    .danger { color: var(--danger); }
    label { display: grid; gap: 7px; color: var(--muted-2); font-size: 12px; font-weight: 500; }
    input, select, textarea { width: 100%; min-width: 0; border: none; background: #2c2c2e; color: var(--text); border-radius: 16px; padding: 13px 14px; }
    input::placeholder { color: #636366; }
    input[type="checkbox"] { width: auto; min-width: 0; accent-color: var(--accent); }
    textarea { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; }
    .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rule { display: grid; gap: 16px; margin-bottom: 14px; padding: 18px; }
    .rule-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
    .rule-kicker { color: var(--muted-2); font-size: 12px; font-weight: 650; margin-top: 5px; }
    .rule-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
    .rule-switch { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #2c2c2e; color: var(--muted); font-size: 13px; font-weight: 700; }
    .rule-switch input { width: 18px; height: 18px; }
    .rule-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
    .rule-note { margin-top: 10px; color: var(--muted-2); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
    .rule-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .rule-chip { min-width: 0; background: #2c2c2e; border-radius: 16px; padding: 11px 12px; }
    .rule-chip strong { display: block; font-size: 16px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rule-chip span { display: block; margin-top: 5px; color: var(--muted-2); font-size: 11px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .rule-block { display: grid; gap: 10px; padding: 13px; border-radius: 18px; background: #242426; }
    .rule-block-title { color: #f2f2f7; font-size: 13px; font-weight: 800; }
    .rule-inline { display: grid; grid-template-columns: minmax(0,1fr) 104px; gap: 8px; align-items: end; }
    .seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; border-radius: 16px; background: #2c2c2e; padding: 5px; }
    .seg.three { grid-template-columns: repeat(3, 1fr); }
    .seg button { min-height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 800; }
    .seg button.active { background: var(--accent); color: #0a0a0a; }
    .poll-builder { display: grid; gap: 14px; }
    .builder-step { display: grid; gap: 12px; padding: 15px; border-radius: 20px; background: #242426; box-shadow: inset 0 0 0 1px rgba(255,255,255,.045); }
    .builder-step-head { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: center; }
    .builder-step-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #0a0a0a; background: var(--accent); font-size: 13px; font-weight: 950; }
    .builder-step-title strong { display: block; font-size: 15px; line-height: 1.1; }
    .builder-step-title span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 11px; font-weight: 650; }
    .builder-hint { color: var(--accent); font-size: 12px; font-weight: 750; line-height: 1.35; }
    .poll-preview { padding: 14px 15px; border-radius: 18px; background: linear-gradient(145deg,rgba(200,252,0,.11),rgba(28,28,30,.98)); box-shadow: inset 0 0 0 1px rgba(200,252,0,.18); }
    .poll-preview small { display: block; color: var(--muted-2); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
    .poll-preview strong { display: block; margin-top: 9px; white-space: pre-line; font-size: 14px; line-height: 1.45; }
    .poll-date-row { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(112px,.55fr); gap: 10px; align-items: end; }
    .poll-date-row label, .poll-date-row input { min-width: 0; width: 100%; }
    .regular-rule-card { display: grid; gap: 13px; padding: 15px; overflow: hidden; }
    .regular-rule-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .regular-rule-name { min-width: 0; display: flex; align-items: center; gap: 9px; }
    .regular-rule-name strong { font-size: 17px; white-space: nowrap; }
    .regular-rule-status { flex: none; padding: 6px 9px; border-radius: 999px; color: var(--accent); background: rgba(200,252,0,.11); font-size: 10px; font-weight: 850; }
    .regular-rule-status.paused { color: var(--muted); background: rgba(255,255,255,.07); }
    .regular-rule-edit { flex: none; min-height: 38px; padding: 8px 11px; }
    .regular-route { display: grid; grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); gap: 7px; align-items: center; }
    .regular-route-point { min-width: 0; padding: 11px 12px; border-radius: 15px; background: #2c2c2e; }
    .regular-route-point small { display: block; color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
    .regular-route-point strong { display: block; margin-top: 5px; font-size: 14px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .regular-route-arrow { color: var(--muted-2); font-size: 18px; font-weight: 900; text-align: center; }
    .regular-rule-facts { display: flex; flex-wrap: wrap; gap: 6px; }
    .regular-rule-fact { padding: 7px 9px; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.055); font-size: 11px; font-weight: 750; }
    .regular-rule-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
    .regular-rule-bottom > span { min-width: 0; color: var(--muted-2); font-size: 10px; font-weight: 700; line-height: 1.25; }
    .regular-rule-toggle { flex: none; min-height: 36px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; color: var(--muted); background: #2c2c2e; font-size: 11px; font-weight: 800; }
    .regular-rule-toggle.enable { border-color: rgba(200,252,0,.24); color: var(--accent); background: rgba(200,252,0,.08); }
    .poll-limit { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: center; background: #2c2c2e; border-radius: 16px; padding: 10px 12px; }
    .poll-limit strong { display: block; font-size: 14px; line-height: 1.15; }
    .poll-limit span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 11px; font-weight: 650; }
    .poll-publish { margin-top: 12px; display: grid; gap: 10px; background: #2c2c2e; border-radius: 16px; padding: 12px; }
    .poll-publish-head strong { display: block; font-size: 14px; line-height: 1.15; }
    .poll-publish-head span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 11px; font-weight: 650; }
    .poll-publish-row { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 8px; align-items: center; }
    .poll-publish .mini-btn { min-height: 46px; }
    .poll-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    .poll-action-grid.single { grid-template-columns: 1fr; }
    .poll-action-grid .mini-btn { width: 100%; }
    .poll-action-grid .primary-mini { border-color: rgba(200,252,0,.35); background: rgba(200,252,0,.12); color: var(--accent); }
    .poll-action-grid .danger-mini { border-color: rgba(255,69,58,.32); background: rgba(255,69,58,.09); color: var(--danger); }
    .team-split-controls { display: grid; gap: 16px; }
    .team-control-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .team-control-head strong { display: block; font-size: 16px; }
    .team-control-head span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 12px; line-height: 1.3; }
    .team-count-seg { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: #2c2c2e; }
    .team-count-seg button { min-width: 0; min-height: 46px; padding: 7px 5px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 800; }
    .team-count-seg button span, .team-count-seg button small { display: block; }
    .team-count-seg button small { margin-top: 2px; color: var(--muted-2); font-size: 10px; font-weight: 700; }
    .team-count-seg button.active { background: var(--accent); color: #0a0a0a; }
    .team-count-seg button.active small { color: rgba(0,0,0,.58); }
    .team-count-seg button:disabled { opacity: .32; }
    .team-roster-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .team-roster-summary .badge { flex: none; }
    .team-player-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
    .team-pick-player { grid-template-columns: 34px minmax(0,1fr) auto; }
    .team-pick-player.excluded { background: rgba(255,69,58,.09); box-shadow: inset 0 0 0 1px rgba(255,69,58,.32); opacity: .72; }
    .team-pick-player.excluded .p-name { text-decoration: line-through; color: var(--muted); }
    .team-pick-mark { min-width: 24px; color: var(--green); font-size: 18px; font-weight: 900; text-align: center; }
    .team-pick-player.excluded .team-pick-mark { color: var(--red); }
    .team-reset-exclusions { padding: 0; border: 0; background: none; color: var(--cyan); font-size: 12px; font-weight: 750; }
    .summary-card { position: relative; overflow: hidden; }
    .summary-card.blue { background: linear-gradient(160deg, rgba(10,132,255,.26), rgba(28,28,30,.94) 54%); box-shadow: inset 0 0 0 1px rgba(100,210,255,.12); }
    .summary-card.yellow { background: linear-gradient(160deg, rgba(255,214,10,.24), rgba(28,28,30,.94) 56%); box-shadow: inset 0 0 0 1px rgba(255,214,10,.12); }
    .summary-card.green { background: linear-gradient(160deg, rgba(48,209,88,.24), rgba(28,28,30,.94) 56%); box-shadow: inset 0 0 0 1px rgba(48,209,88,.12); }
    .summary-card.orange { background: linear-gradient(160deg, rgba(255,159,10,.28), rgba(28,28,30,.94) 56%); box-shadow: inset 0 0 0 1px rgba(255,159,10,.16); }
    .summary-card.purple { background: linear-gradient(160deg, rgba(191,90,242,.24), rgba(28,28,30,.94) 56%); box-shadow: inset 0 0 0 1px rgba(191,90,242,.14); }
    .summary-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
    .summary-pill.blue { background: rgba(100,210,255,.14); color: #8edfff; box-shadow: inset 0 0 0 1px rgba(100,210,255,.24); }
    .summary-pill.yellow { background: rgba(255,214,10,.14); color: #ffe15e; box-shadow: inset 0 0 0 1px rgba(255,214,10,.24); }
    .summary-pill.green { background: rgba(48,209,88,.14); color: #5bea8a; box-shadow: inset 0 0 0 1px rgba(48,209,88,.24); }
    .summary-pill.orange { background: rgba(255,159,10,.16); color: #ffbd45; box-shadow: inset 0 0 0 1px rgba(255,159,10,.28); }
    .summary-pill.purple { background: rgba(191,90,242,.17); color: #d89bff; box-shadow: inset 0 0 0 1px rgba(191,90,242,.3); }
    .summary-pill.red { background: rgba(255,69,58,.16); color: #ff6b63; box-shadow: inset 0 0 0 1px rgba(255,69,58,.28); }
    .summary-meta { margin-top: 12px; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 600; line-height: 1.35; }
    .list { display: grid; gap: 10px; }
    .row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; border: none; background: #1c1c1e; border-radius: 18px; padding: 13px 14px; }
    .rating-change-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; align-items: start; background: #1c1c1e; border-radius: 18px; padding: 12px; box-shadow: inset 0 0 0 1px rgba(191,90,242,.12); }
    .rating-change-card .rate-av-btn, .rating-change-card .rate-av { width: 42px; height: 42px; }
    .rating-change-main { min-width: 0; display: grid; gap: 9px; }
    .rating-change-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
    .rating-change-games { display: grid; gap: 6px; }
    .rating-change-game { width: 100%; border: 0; text-align: left; color: var(--text); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; min-width: 0; border-radius: 12px; background: rgba(255,255,255,.04); padding: 8px 9px; }
    .rating-change-game:active { transform: scale(.99); }
    .rating-change-game-main { min-width: 0; display: grid; gap: 5px; }
    .rating-change-date { min-width: 0; color: #d1d1d6; font-size: 12.5px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rating-change-votes { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
    .rating-vote-chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 3px 6px; background: rgba(255,255,255,.06); color: var(--muted-2); font-size: 11px; font-weight: 850; line-height: 1; }
    .rating-change-pct { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; border-radius: 999px; padding: 5px 8px; font-size: 12px; font-weight: 900; line-height: 1; white-space: nowrap; }
    .rating-change-pct.up { color: var(--green); background: rgba(48,209,88,.14); }
    .rating-change-pct.down { color: var(--red); background: rgba(255,69,58,.14); }
    .rating-change-pct.ok { color: var(--cyan); background: rgba(100,210,255,.13); }
    .rating-change-summary { display: grid; gap: 5px; margin-top: 4px; }
    .rating-change-summary .rate-sub { margin: 0; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
    .rating-donuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
    .rating-donut-card { min-width: 0; border: 0; color: inherit; border-radius: 16px; padding: 10px 8px; background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); display: grid; justify-items: center; gap: 7px; }
    .rating-donut-card.active { box-shadow: inset 0 0 0 1.7px currentColor, 0 10px 28px rgba(0,0,0,.22); }
    .rating-donut { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; position: relative; font-size: 13px; font-weight: 950; line-height: 1; }
    .rating-donut::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #1c1c1e; }
    .rating-donut span { position: relative; z-index: 1; }
    .rating-donut-label { color: var(--muted-2); font-size: 10.5px; font-weight: 850; line-height: 1.05; text-align: center; }
    .rating-level-shift { justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(191,90,242,.14); color: #d89bff; font-size: 12px; font-weight: 900; line-height: 1; }
    .rating-history-chart { margin-bottom: 12px; border-radius: 16px; padding: 12px; background: rgba(191,90,242,.08); box-shadow: inset 0 0 0 1px rgba(191,90,242,.16); }
    .rating-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
    .rating-chart-head strong { font-size: 14px; line-height: 1.1; }
    .rating-chart-head span { color: var(--muted-2); font-size: 11px; font-weight: 750; white-space: nowrap; }
    .stats-hero { position: relative; overflow: hidden; padding: 18px; background: linear-gradient(145deg, rgba(255,159,10,.16), rgba(31,31,33,.98) 48%, rgba(100,210,255,.1) 100%); box-shadow: inset 0 0 0 1px rgba(255,159,10,.24); }
    .stats-hero-head { display: none; }
    .stats-hero-periods { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; margin-bottom: 16px; padding: 2px; border-radius: 11px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.045); }
    .stats-hero-periods button { min-width: 0; height: 28px; border: 0; border-radius: 9px; padding: 0 4px; color: var(--muted); background: transparent; font-size: 9px; line-height: 1; font-weight: 900; white-space: nowrap; }
    .stats-hero-periods button.active { color: #15100a; background: #ffb13b; box-shadow: 0 3px 12px rgba(255,159,10,.18); }
    .stats-streak-card { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 12px; padding: 13px 15px; background: linear-gradient(145deg, rgba(255,159,10,.2), rgba(255,55,95,.08) 52%, rgba(28,28,30,.98)); box-shadow: inset 0 0 0 1px rgba(255,159,10,.22); }
    .stats-streak-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #ffb13b; background: rgba(255,159,10,.13); box-shadow: inset 0 0 0 1px rgba(255,159,10,.2); }
    .stats-streak-copy { min-width: 0; }
    .stats-streak-copy span { display: block; color: var(--muted); font-size: 10px; line-height: 1; font-weight: 850; }
    .stats-streak-copy strong { display: block; margin-top: 5px; color: #ffc15a; font-size: 18px; line-height: 1; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stats-bag-card { width: 100%; border: 0; color: var(--text); text-align: left; display: grid; grid-template-columns: 48px minmax(0,1fr) auto 18px; align-items: center; gap: 13px; padding: 14px 16px; background: linear-gradient(145deg, rgba(100,210,255,.14), rgba(28,28,30,.98) 58%); box-shadow: inset 0 0 0 1px rgba(100,210,255,.2); }
    .stats-bag-card:active { transform: scale(.99); }
    .stats-bag-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--cyan); background: rgba(100,210,255,.12); box-shadow: inset 0 0 0 1px rgba(100,210,255,.18); }
    .stats-bag-copy { min-width: 0; }
    .stats-bag-copy strong { display: block; font-size: 17px; line-height: 1.1; font-weight: 900; }
    .stats-bag-count { min-width: 62px; text-align: right; color: var(--cyan); font-size: 28px; line-height: 1; font-weight: 950; white-space: nowrap; }
    .stats-bag-count small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1; font-weight: 850; }
    .bag-history-list { display: grid; gap: 8px; }
    .bag-history-row { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; min-height: 64px; padding: 11px 13px; border-radius: 17px; background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(100,210,255,.09); }
    .bag-history-row-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--cyan); background: rgba(100,210,255,.11); }
    .bag-history-date { font-size: 16px; line-height: 1.1; font-weight: 850; }
    .stats-hero-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .stats-hero-title { min-width: 0; font-size: 30px; line-height: 1; font-weight: 950; letter-spacing: 0; color: var(--text); }
    .stats-hero-title small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.15; font-weight: 800; }
    .stats-hero-delta { flex: none; min-width: 60px; min-height: 44px; border-radius: 14px; display: grid; align-content: center; justify-items: center; color: var(--green); background: rgba(48,209,88,.1); font-size: 19px; line-height: 1; font-weight: 950; box-shadow: inset 0 0 0 1px rgba(48,209,88,.2); }
    .stats-hero-delta span { display: block; margin-top: 5px; color: rgba(255,255,255,.46); font-size: 8px; font-weight: 850; }
    .stats-hero-delta.down { color: var(--red); background: rgba(255,69,58,.13); box-shadow: inset 0 0 0 1px rgba(255,69,58,.2); }
    .stats-hero-sub { display: none; }
    .stats-rank-badge { display: none; }
    .stats-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; margin-top: 16px; border-radius: 14px; background: rgba(12,12,13,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.075); overflow: hidden; }
    .stats-metric { min-width: 0; min-height: 62px; border-radius: 0; padding: 11px 7px 10px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; text-align: center; background: transparent; box-shadow: none; border-left: 1px solid rgba(255,255,255,.065); }
    .stats-metric:first-child { border-left: 0; }
    .stats-metric strong { display: block; max-width: 100%; font-size: 21px; line-height: 1; font-weight: 950; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stats-metric span { display: block; max-width: 100%; color: var(--muted); font-size: 9px; font-weight: 850; line-height: 1.05; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stats-metric.games { color: var(--cyan); background: rgba(100,210,255,.075); }
    .stats-metric.attendance { color: var(--green); background: rgba(48,209,88,.07); }
    .stats-metric.missed { color: #ff6b63; background: rgba(255,69,58,.075); }
    .stats-metric.rank { color: #d89bff; background: rgba(191,90,242,.075); }
    .stats-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
    .stats-card-title strong { font-size: 17px; line-height: 1.1; }
    .stats-card-title span { color: var(--muted-2); font-size: 12px; font-weight: 750; white-space: nowrap; }
    .stats-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .stats-mini-card { border-radius: 18px; padding: 14px; background: #1c1c1e; box-shadow: inset 0 0 0 1px rgba(255,255,255,.055); }
    .stats-mini-card .value { font-size: 25px; line-height: 1; font-weight: 950; }
    .stats-mini-card .label { margin-top: 7px; color: var(--muted-2); font-size: 12px; font-weight: 800; line-height: 1.15; }
    .stats-form-row { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
    .stats-form-dot { height: 36px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.055); color: var(--muted-2); font-size: 12px; font-weight: 900; }
    .stats-form-dot.on { color: #0a0a0a; background: var(--accent); }
    .stats-form-dot.off { color: var(--red); background: rgba(255,69,58,.13); }
    .stats-day-grid { display: grid; gap: 8px; }
    .stats-day-row { display: grid; grid-template-columns: 86px minmax(0,1fr) 34px; gap: 9px; align-items: center; }
    .stats-day-bar { height: 9px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
    .stats-day-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#d9ff4d,#c8fc00); }
    .stats-activity-card { background: linear-gradient(155deg, rgba(200,252,0,.11), rgba(48,209,88,.06) 46%, rgba(28,28,30,.98) 82%); box-shadow: inset 0 0 0 1px rgba(200,252,0,.18); }
    .stats-level-card { background: linear-gradient(155deg, rgba(191,90,242,.14), rgba(200,252,0,.06) 44%, rgba(28,28,30,.98) 82%); box-shadow: inset 0 0 0 1px rgba(191,90,242,.2); }
    .rating-trend-card { background: linear-gradient(155deg, rgba(100,210,255,.12), rgba(28,28,30,.98) 58%); box-shadow: inset 0 0 0 1px rgba(100,210,255,.2); }
    .rating-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
    .rating-trend-heading { min-width: 0; }
    .rating-trend-heading strong { display: block; font-size: 17px; line-height: 1.05; }
    .rating-trend-heading span { display: block; margin-top: 5px; color: var(--muted-2); font-size: 9px; line-height: 1; font-weight: 800; }
    .rating-trend-period { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.055); }
    .rating-trend-period button { min-width: 0; height: 27px; border: 0; border-radius: 8px; padding: 0 8px; color: var(--muted); background: transparent; font-size: 9px; line-height: 1; font-weight: 900; white-space: nowrap; }
    .rating-trend-period button.active { color: #071015; background: var(--cyan); }
    .rating-trend-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
    .rating-trend-summary > span { flex: none; color: var(--muted); font-size: 11px; line-height: 1; font-weight: 850; }
    .rating-trend-result { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
    .rating-trend-result b { flex: none; min-width: 44px; height: 27px; border-radius: 9px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; font-weight: 950; white-space: nowrap; }
    .rating-trend-plot { display: grid; grid-template-columns: 43px minmax(0,1fr); gap: 8px; align-items: stretch; }
    .rating-trend-axis { height: 100px; display: grid; grid-template-rows: repeat(3,1fr); align-items: center; }
    .rating-trend-axis span { font-size: 10px; line-height: 1; font-weight: 900; }
    .rating-trend-axis .up { color: var(--green); }
    .rating-trend-axis .ok { color: var(--cyan); }
    .rating-trend-axis .down { color: var(--red); }
    .rating-trend-canvas { min-width: 0; position: relative; padding-bottom: 20px; }
    .rating-trend-canvas svg { display: block; width: 100%; height: 100px; overflow: hidden; }
    .rating-trend-change-label { position: absolute; top: 105px; transform: translateX(-50%); color: #d89bff; font-size: 9px; line-height: 1; font-weight: 950; white-space: nowrap; }
    .stats-signature { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .stats-signature .stats-mini-card { padding: 13px 12px; }
    @media (max-width: 390px) {
      .stats-split { grid-template-columns: 1fr; }
      .stats-signature { grid-template-columns: 1fr; }
      .team-player-picker { grid-template-columns: 1fr; }
    }
    .rating-history-chart svg { display: block; width: 100%; height: 136px; overflow: visible; }
    .rating-chart-note { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
    .rating-chart-change { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; background: rgba(191,90,242,.16); color: #d89bff; font-size: 11px; font-weight: 850; line-height: 1; }
    .vote-change-list { display: grid; gap: 8px; }
    .vote-change-row { display: grid; grid-template-columns: minmax(82px, .9fr) minmax(0, 1.2fr) auto; align-items: center; gap: 8px; min-width: 0; background: #1c1c1e; border-radius: 16px; padding: 12px 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
    .vote-change-row.added { background: rgba(48,209,88,.12); box-shadow: inset 0 0 0 1px rgba(48,209,88,.24); }
    .vote-change-row.removed { background: rgba(255,69,58,.12); box-shadow: inset 0 0 0 1px rgba(255,69,58,.24); }
    .vote-change-row.changed { background: rgba(255,214,10,.1); box-shadow: inset 0 0 0 1px rgba(255,214,10,.2); }
    .vote-change-user, .vote-change-action, .vote-change-time { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .vote-change-user { color: var(--text); font-size: 15px; font-weight: 800; }
    .vote-change-action { color: rgba(255,255,255,.82); font-size: 13px; font-weight: 700; }
    .vote-change-time { color: var(--muted-2); font-size: 12px; font-weight: 700; text-align: right; }
    .vote-change-row.added .vote-change-action { color: var(--green); }
    .vote-change-row.removed .vote-change-action { color: var(--red); }
    .vote-change-row.changed .vote-change-action { color: var(--warn); }
    .player-row { grid-template-columns: 48px 1fr 58px; text-align: left; width: 100%; color: var(--text); }
    .player-row button { text-align: inherit; }
    .nick { color: var(--muted-2); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .level { min-width: 46px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #2c2c2e; border: none; color: #e5e5ea; font-weight: 700; font-size: 16px; }
    .player-level { color: var(--warn); background: rgba(255,214,10,.12); border-color: rgba(255,214,10,.28); font-size: 18px; font-weight: 800; }
    .player-level.empty { color: #8d96c4; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
    .search { margin-bottom: 12px; }
    .status { position: fixed; z-index: 80; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); width: max-content; max-width: min(88vw, 520px); min-height: 38px; display: flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; color: #f2f2f7; background: rgba(38,38,40,.94); box-shadow: 0 14px 38px rgba(0,0,0,.42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 13px; font-weight: 750; text-align: center; pointer-events: none; opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .22s var(--ease-ios), transform .3s var(--ease-ios), visibility .22s; }
    .status:empty { opacity: 0; visibility: hidden; transform: translate(-50%, 10px); }
    .status.ok { color: var(--ok); border-color: rgba(48,209,88,.25); background: rgba(24,48,32,.95); }
    .status.err { color: #ff9d97; border-color: rgba(255,69,58,.3); background: rgba(55,25,25,.96); }
    .status.warn { color: var(--warn); border-color: rgba(255,214,10,.25); background: rgba(52,46,22,.96); }
    .empty { border: 1px dashed var(--line); border-radius: 20px; padding: 28px 18px; color: var(--muted); text-align: center; }
    .wide-scroll { overflow-x: auto; padding-bottom: 4px; }
    .modal-backdrop { position: fixed; inset: 0; z-index: 30; display: none; align-items: flex-end; background: rgba(0,0,0,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); padding: 0; }
    .modal-backdrop.open { display: flex; animation: fadeIn .24s var(--ease-ios); }
    .modal-backdrop.open > * { animation: sheetUp .42s var(--ease-sheet); }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes sheetUp { from { transform: translateY(46px); opacity: 0; } to { transform: none; opacity: 1; } }
    @keyframes viewInFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
    @keyframes viewInBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
    #view.view-fwd { animation: viewInFwd .34s var(--ease-ios); }
    #view.view-back { animation: viewInBack .34s var(--ease-ios); }
    #view { view-transition-name: app-view; }
    ::view-transition-group(app-view) { animation-duration: .2s; animation-timing-function: var(--ease-ios); }
    ::view-transition-old(app-view) { animation: appViewOut .16s ease both; }
    ::view-transition-new(app-view) { animation: appViewIn .2s var(--ease-ios) both; }
    @keyframes appViewOut { to { opacity: .7; transform: scale(.996); } }
    @keyframes appViewIn { from { opacity: .72; transform: scale(.997); } }
    @media (prefers-reduced-motion: reduce) {
      .modal-backdrop.open, .modal-backdrop.open > *, #view.view-fwd, #view.view-back { animation: none; }
      ::view-transition-group(app-view), ::view-transition-old(app-view), ::view-transition-new(app-view) { animation: none; }
    }
    .profile-sheet { width: 100%; max-width: 720px; margin: 0 auto; max-height: 92vh; overflow: auto; border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -18px 70px rgba(0,0,0,.5); padding: 22px 22px 30px; }
    .crop-sheet { width: 100%; max-width: 460px; margin: 0 auto; max-height: 94vh; overflow: auto; border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -18px 70px rgba(0,0,0,.5); padding: 20px 18px 26px; }
    .crop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .crop-title { font-size: 22px; font-weight: 850; }
    .crop-stage { position: relative; width: min(100%, 340px); aspect-ratio: 1 / 1; margin: 0 auto 16px; border-radius: 22px; overflow: hidden; background: #111; touch-action: none; cursor: grab; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
    .crop-stage:active { cursor: grabbing; }
    .crop-stage canvas { width: 100%; height: 100%; display: block; }
    .crop-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(200,252,0,.75), inset 0 0 0 999px rgba(0,0,0,.04); border-radius: inherit; }
    .crop-controls { display: grid; gap: 14px; }
    .crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .pub-body { display: grid; gap: 12px; }
    .pub-body .section-title { margin: 6px 0 -2px; }
    .profile-head { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
    .profile-avatar { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text); font-size: 30px; font-weight: 700; }
    .profile-name { font-size: 24px; line-height: 1.05; font-weight: 700; overflow-wrap: anywhere; }
    .level-fab { position: absolute; right: -7px; bottom: -7px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: linear-gradient(160deg, #2c2c2e, #1c1c1e); border: 1.5px solid rgba(255, 214, 10, .85); color: #ffd60a; display: grid; place-items: center; font: 800 13px/1 -apple-system, system-ui; box-shadow: 0 3px 10px rgba(0, 0, 0, .55); }
    .profile-actions { display: grid; gap: 12px; margin-top: 22px; }
    .badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
    .badge { border: none; background: #2c2c2e; color: #e5e5ea; border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 600; }
    .badge.ok { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
    .badge.warn { color: var(--warn); border-color: rgba(255,214,10,.35); background: rgba(255,214,10,.12); }
    .badge.danger { color: var(--danger); border-color: rgba(255,69,58,.35); background: rgba(255,69,58,.12); }
    .profile-fields { display: grid; gap: 14px; margin-top: 22px; }
    .rating-control { display: grid; gap: 12px; margin-top: 4px; }
    .rating-value { font-size: 30px; font-weight: 700; color: var(--text); }
    .rating-row { display: flex; align-items: center; gap: 14px; }
    .rating-row .rating-value { flex: 1; text-align: center; }
    .step-btn { flex: none; width: 76px; height: 58px; border-radius: 16px; background: #2c2c2e; border: none; color: var(--text); font-weight: 700; font-size: 18px; }
    .step-btn:active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
    .step-btn:disabled { opacity: .4; }
    .profile-avatar-btn { position: relative; width: 72px; height: 72px; padding: 0; border: 0; background: transparent; border-radius: 22px; }
    .profile-avatar-btn .profile-avatar { width: 72px; height: 72px; }
    .avatar-cam { position: absolute; right: -5px; bottom: -5px; width: 27px; height: 27px; border-radius: 50%; background: var(--accent); color: #0a0a0a; display: grid; place-items: center; border: 2px solid #2c2c2e; }
    .avatar-cam svg { display: block; }
    .profile-avatar-btn[disabled] { cursor: default; }
    .profile-avatar-btn[disabled] .avatar-cam { display: none; }
    .photo-wrap { position: relative; width: 72px; height: 72px; }
    .photo-menu { position: absolute; top: 80px; left: 0; z-index: 5; min-width: 190px; display: grid; gap: 4px; padding: 6px; border-radius: 16px; background: #2c2c2e; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
    .photo-menu button { width: 100%; text-align: left; padding: 12px 14px; border: 0; border-radius: 11px; background: transparent; color: var(--text); font-weight: 600; font-size: 15px; }
    .photo-menu button:active { background: rgba(255,255,255,.08); }
    .photo-menu button.danger { color: var(--danger); }
    input[type="range"] { padding: 0; border: 0; background: transparent; accent-color: var(--accent); height: 24px; }
    .filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
    .filter-chip { border: 1px solid var(--line); background: var(--panel); color: #aeaeb2; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; }
    .filter-chip.active { color: var(--accent-text); border-color: var(--accent-line); background: rgba(200,252,0,.15); }
    .bag-scope { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; padding: 4px; border: 1px solid rgba(255,255,255,.06); border-radius: 17px; background: #15171a; }
    .bag-scope button { min-height: 44px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
    .bag-scope button.active { background: rgba(100,210,255,.15); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(100,210,255,.24); }
    .bag-hero { overflow: hidden; position: relative; padding: 18px; background: linear-gradient(135deg, rgba(100,210,255,.12), rgba(48,209,88,.08) 52%, #1b1d20); box-shadow: inset 0 0 0 1px rgba(100,210,255,.16); }
    .bag-hero::after { display: none; }
    .bag-hero-top { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
    .bag-hero-title { font-size: 20px; font-weight: 900; letter-spacing: -.2px; }
    .bag-hero-sub { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
    .bag-total { min-width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: rgba(200,252,0,.14); color: var(--accent); font-size: 20px; font-weight: 900; }
    .bag-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .bag-summary strong { font-size: 20px; font-weight: 900; }
    .bag-summary span { flex: none; padding: 8px 11px; border-radius: 12px; background: rgba(100,210,255,.12); color: var(--cyan); font-size: 13px; font-weight: 850; }
    .bag-add { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(255,255,255,.06); background: #17191c; border-radius: 18px; }
    .bag-add-label { font-size: 13px; font-weight: 800; color: #f2f2f7; }
    .bag-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
    .bag-add-row input { min-height: 48px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 11px 13px; background: #24262a; }
    .bag-add-btn { min-width: 104px; min-height: 48px; border: 0; border-radius: 14px; padding: 0 16px; background: var(--cyan); color: #071318; font-size: 14px; font-weight: 900; }
    .bag-add-btn:disabled, .bag-scope button:disabled, .bag-action:disabled { opacity: .58; cursor: default; transform: none; }
    .bag-progress { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 11px 14px; border-radius: 16px; background: rgba(100,210,255,.12); color: var(--cyan); font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(100,210,255,.18); }
    .bag-spinner { width: 18px; height: 18px; flex: none; border: 2px solid rgba(100,210,255,.25); border-top-color: var(--cyan); border-radius: 50%; animation: bag-spin .7s linear infinite; }
    @keyframes bag-spin { to { transform: rotate(360deg); } }
    .bag-section { display: grid; gap: 9px; }
    .bag-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 3px; }
    .bag-section-head strong { font-size: 17px; }
    .bag-section-head span { min-width: 42px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--muted); text-align: center; font-size: 12px; font-weight: 850; }
    .bag-list { display: grid; gap: 8px; }
    .bag-row { min-width: 0; display: grid; grid-template-columns: 38px 46px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px; border-radius: 17px; background: #1b1d20; box-shadow: inset 0 0 0 1px rgba(255,255,255,.045); will-change: transform; }
    .bag-row.current { background: linear-gradient(110deg, rgba(48,209,88,.11), rgba(27,29,32,.98) 70%); box-shadow: inset 3px 0 0 rgba(48,209,88,.62), inset 0 0 0 1px rgba(48,209,88,.14); }
    .bag-row.past { min-height: 62px; padding-top: 8px; padding-bottom: 8px; background: #191b1e; }
    .bag-row.pending { opacity: .72; }
    .bag-row.menu-open { position: relative; z-index: 25; }
    .bag-row.bag-action-pending { opacity: .74; box-shadow: inset 0 0 0 1px rgba(100,210,255,.24); }
    .bag-row.bag-action-pending .bag-action.done { color: var(--cyan); background: rgba(100,210,255,.13); }
    .bag-position { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(100,210,255,.09); color: var(--cyan); font-size: 14px; font-weight: 900; }
    .bag-row.current .bag-position { background: rgba(48,209,88,.14); color: var(--green); }
    .bag-avatar-btn { width: 46px; height: 46px; padding: 0; border: 0; border-radius: 14px; background: transparent; }
    .bag-avatar { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg, #34373c, #232529); color: #d8d8dc; font-size: 14px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
    .bag-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .bag-row.current .bag-avatar { box-shadow: 0 0 0 2px rgba(48,209,88,.45); }
    .bag-player { min-width: 0; }
    .bag-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 850; }
    .bag-player-meta { min-width: 0; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 11px; font-weight: 700; }
    .bag-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .bag-action { min-height: 36px; border: 0; border-radius: 12px; padding: 0 11px; background: #2c2c2e; color: #f2f2f7; font-size: 12px; font-weight: 850; white-space: nowrap; }
    .bag-action.done { background: rgba(48,209,88,.15); color: var(--green); box-shadow: inset 0 0 0 1px rgba(48,209,88,.13); }
    .bag-action.copy { background: rgba(100,210,255,.13); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(100,210,255,.12); }
    .bag-action.remove { min-width: 76px; color: var(--red); }
    .bag-action.remove.confirming { min-width: 108px; background: rgba(255,214,10,.14); color: var(--warn); }
    .bag-menu-wrap { position: relative; }
    .bag-menu-trigger { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 12px; padding: 0; background: #282b2f; color: var(--muted); font-size: 23px; line-height: 1; }
    .bag-menu-trigger.open { color: var(--cyan); background: rgba(100,210,255,.13); }
    .bag-row-menu { position: absolute; z-index: 30; right: 0; bottom: 44px; width: 142px; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: #2c2c2e; box-shadow: 0 16px 36px rgba(0,0,0,.5); }
    .bag-row-menu button { width: 100%; min-height: 40px; border: 0; border-radius: 10px; padding: 0 12px; background: transparent; color: var(--red); text-align: left; font-size: 13px; font-weight: 850; }
    .bag-row-menu button.confirming { color: var(--warn); background: rgba(255,214,10,.12); }
    .bag-footer-actions { display: flex; justify-content: flex-end; }
    .bag-reset { min-height: 42px; border: 0; border-radius: 14px; padding: 0 14px; background: rgba(255,69,58,.1); color: var(--red); font-size: 13px; font-weight: 800; }
    .bag-reset.confirming { background: rgba(255,214,10,.15); color: var(--warn); }
    .bag-more { width: 100%; min-height: 44px; border: 1px solid rgba(100,210,255,.13); border-radius: 14px; background: rgba(100,210,255,.06); color: var(--cyan); font-size: 13px; font-weight: 850; }
    .players-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 10px; }
    .players-toolbar .search { min-height: 48px; border-radius: 16px; padding: 11px 14px; }
    .players-filter-bar { display: flex; gap: 7px; margin: 0 0 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .players-filter-bar::-webkit-scrollbar { display: none; }
    .players-filter-bar .filter-chip { flex: 0 0 auto; min-height: 36px; padding: 8px 11px; border-radius: 13px; font-size: 12px; font-weight: 750; background: #1c1c1e; color: var(--muted); }
    .players-filter-bar .filter-chip.active { background: rgba(200,252,0,.16); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(200,252,0,.28); }
    .players-add-btn { width: 48px; height: 48px; min-height: 48px; border-radius: 16px; padding: 0; display: grid; place-items: center; font-size: 24px; line-height: 1; }
    .teams { display: grid; gap: 12px; }
    .team-card { border: none; background: #1c1c1e; border-radius: 20px; padding: 16px; }
    .team-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .team-list { display: grid; gap: 8px; color: var(--muted); }
    .clickable { cursor: pointer; }
    .bag-current { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(200,252,0,.14), 0 14px 38px -20px rgba(0,0,0,.5); }
    .bar-list { display: grid; gap: 14px; }
    .bar-row { display: grid; gap: 8px; }
    .bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
    .bar-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
    .bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
    /* Achievements — hexagon medals */
    .ach-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 6px; margin-top: 8px; }
    .ach { display: flex; flex-direction: column; align-items: center; gap: 9px; background: none; border: 0; padding: 0; color: var(--text); }
    .ach.locked .ach-name { color: var(--muted-2); }
    .hex { position: relative; width: 88px; height: 88px; filter: drop-shadow(0 7px 14px rgba(0,0,0,.5)); }
    .hex-ring, .hex-face { position: absolute; inset: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
    .hex-ring { background: linear-gradient(150deg, #f4f4f7, #9a9aa2 46%, #dcdce2 70%, #79797f); }
    .hex-face { inset: 4px; display: grid; place-items: center; font-size: 31px; background: #1b1b1d; }
    .hex-emoji { line-height: 1; }
    .hex.locked .hex-ring { background: linear-gradient(150deg, #4d4d51, #2a2a2d 60%, #3a3a3e); }
    .hex.locked .hex-face { background: #171719; }
    .hex.locked .hex-emoji { filter: grayscale(1) brightness(.85); opacity: .3; }
    .hex-lock { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(18,18,20,.92); display: grid; place-items: center; color: #c7c7cc; border: 1.5px solid #2c2c2e; }
    .ach-name { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.15; max-width: 100px; overflow-wrap: anywhere; }
    .ach-prog { font-size: 11px; font-weight: 700; color: var(--muted-2); letter-spacing: .2px; }
    .ach-sheet { width: 100%; max-width: 480px; margin: 0 auto; max-height: 92vh; overflow: auto; border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -18px 70px rgba(0,0,0,.5); padding: 32px 24px 34px; text-align: center; }
    .ach-sheet .hex { width: 134px; height: 134px; margin: 0 auto 20px; }
    .ach-sheet .hex-face { font-size: 54px; }
    .ach-sheet .hex-lock { width: 34px; height: 34px; right: 8px; bottom: 8px; }
    .ach-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 16px; }
    .ach-track > i { display: block; height: 100%; border-radius: 999px; }
    .skill-votes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
    .skill-votes .filter-chip { margin: 0; font-size: 12px; line-height: 1; border-radius: 12px; }
    .rate-side .skill-votes { margin-top: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .rate-side .skill-votes .filter-chip { display: grid; place-items: center; min-height: 36px; padding: 8px 6px !important; border-radius: 13px; }
    .team-head .team-meta { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; justify-content: flex-end; min-width: 0; }
    .team-head .team-meta .badge { flex: none; padding: 8px 11px; font-size: 13px; }
    .badge.blue { color: var(--cyan); border: 1px solid rgba(100,210,255,.28); background: rgba(100,210,255,.12); }
    .badge.green { color: #ffd60a; border: 1px solid rgba(255,214,10,.3); background: rgba(255,214,10,.12); }
    .synergy-card { background: linear-gradient(160deg, rgba(10,132,255,.22), rgba(28,28,30,.96) 60%); box-shadow: inset 0 0 0 1px rgba(100,210,255,.15); }
    .synergy-summary { width: 100%; border: 0; background: transparent; color: var(--text); padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
    .synergy-summary strong { font-size: 18px; line-height: 1.1; }
    .synergy-summary .badge { flex: none; }
    .synergy-list { margin-top: 14px; display: grid; gap: 8px; }
    .shared-games-card { background: linear-gradient(155deg, rgba(100,210,255,.18), rgba(28,28,30,.97) 68%); box-shadow: inset 0 0 0 1px rgba(100,210,255,.2); }
    .shared-games-button { width: 100%; border: 0; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: transparent; color: var(--text); text-align: left; }
    .shared-games-button strong { display: block; font-size: 18px; }
    .shared-games-count { flex: none; min-width: 52px; height: 42px; border-radius: 14px; display: grid !important; place-items: center; margin: 0 !important; background: rgba(100,210,255,.14); color: var(--cyan) !important; font-size: 18px !important; font-weight: 900 !important; }
    .no-priority-corner { position: absolute; top: 15px; right: 15px; z-index: 2; border-radius: 999px; padding: 7px 10px; background: rgba(255,69,58,.12); color: var(--red); font-size: 11px; line-height: 1; font-weight: 850; box-shadow: inset 0 0 0 1px rgba(255,69,58,.25); }
    .light-icon-btn { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; padding: 0; }
    .light-updated { margin-top: 6px; color: var(--muted-2); font-size: 11px; font-weight: 700; }
    .payment-month-row { width: 100%; border: 0; color: var(--text); text-align: left; }
    .payment-month-note { margin-top: 5px; color: var(--muted-2); font-size: 13px; line-height: 1.25; }
    .payment-month-status { margin-top: 5px; font-size: 13px; line-height: 1.25; font-weight: 700; white-space: normal; overflow: visible; }
    .detail-backdrop { z-index: 50; }
    .detail-sheet { width: 100%; max-width: 520px; margin: 0 auto; max-height: 88vh; overflow: auto; border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; background: linear-gradient(168deg,#2c2c2e,#1c1c1e); box-shadow: 0 -18px 70px rgba(0,0,0,.58); padding: 22px 22px 30px; }
    .detail-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; }
    .detail-title { min-width: 0; font-size: 22px; line-height: 1.08; font-weight: 900; }
    .detail-sub { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
    .detail-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
    .detail-metric { min-width: 0; padding: 15px; border-radius: 18px; background: #1c1c1e; }
    .detail-metric strong { display: block; color: var(--cyan); font-size: 25px; line-height: 1; }
    .detail-metric strong.green { color: var(--green); }
    .detail-metric span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 750; }
    .detail-game { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border-radius: 17px; background: #1c1c1e; }
    .detail-game.cost-right { grid-template-columns: minmax(0,1fr) auto; }
    .detail-game-cost { min-width: 46px; color: var(--yellow); font-size: 15px; font-weight: 900; }
    .detail-game-cost.zero { color: var(--green); }
    .detail-game-main { min-width: 0; }
    .detail-game-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 850; }
    .detail-game-meta { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 11px; font-weight: 700; }
    .detail-section-title { margin: 16px 0 8px; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
    .detail-section-title.blue { color: var(--cyan); }
    .detail-payment { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px; border-radius: 17px; background: #1c1c1e; }
    .detail-payment-amount { color: var(--green); font-size: 16px; font-weight: 900; }
    .detail-balance-payment { padding: 13px 14px; border-radius: 17px; background: rgba(48,209,88,.08); box-shadow: inset 0 0 0 1px rgba(48,209,88,.24); }
    .detail-balance-paid { color: var(--green); font-size: 20px; line-height: 1.08; font-weight: 900; letter-spacing: 0; }
    .detail-balance-note { margin-top: 5px; color: var(--muted-2); font-size: 12px; line-height: 1.15; font-weight: 750; }
    .debt-mail-preview { white-space: pre-line; overflow-wrap: anywhere; padding: 15px; border-radius: 18px; background: #1c1c1e; color: var(--text); font-size: 14px; line-height: 1.45; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
    .debt-mail-buttons { display: grid; gap: 7px; margin-top: 9px; }
    .debt-mail-button { min-height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: #2481cc; font-size: 14px; font-weight: 850; }
    .debt-mail-button.pay { color: #07130b; background: var(--green); }
    .debt-mail-result { padding: 14px; border-radius: 18px; background: rgba(48,209,88,.1); box-shadow: inset 0 0 0 1px rgba(48,209,88,.22); }
    .debt-mail-result.failed { background: rgba(255,69,58,.09); box-shadow: inset 0 0 0 1px rgba(255,69,58,.24); }
    .debt-mail-failed { display: grid; gap: 6px; margin-top: 10px; }
    .debt-mail-failed div { padding: 9px 11px; border-radius: 12px; color: var(--red); background: rgba(255,69,58,.09); font-size: 12px; font-weight: 750; }
    .split-backdrop { z-index: 70; }
    .split-sheet { width: 100%; max-width: 520px; margin: 0 auto; max-height: 92vh; overflow: auto; border-top: 1px solid rgba(255,255,255,.12); border-radius: 30px 30px 0 0; background: #242426; box-shadow: 0 -22px 80px rgba(0,0,0,.72); padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
    .split-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; padding: 14px 15px; border-radius: 17px; background: #1c1c1e; }
    .split-total span { color: var(--muted); font-size: 13px; font-weight: 700; }
    .split-total strong { color: var(--green); font-size: 22px; line-height: 1; }
    .split-rows { display: grid; gap: 9px; }
    .split-row { display: grid; grid-template-columns: minmax(0,1fr) 94px 42px; gap: 8px; align-items: center; padding: 10px; border-radius: 18px; background: #1c1c1e; }
    .split-row input { min-height: 46px; border-radius: 13px; padding: 11px 12px; font-size: 14px; }
    .split-remove { width: 42px; height: 42px; border: 0; border-radius: 13px; display: grid; place-items: center; background: rgba(255,69,58,.12); color: var(--red); font-size: 22px; line-height: 1; }
    .split-add { width: 100%; min-height: 48px; margin-top: 10px; border: 1px dashed rgba(200,252,0,.38); border-radius: 15px; background: rgba(200,252,0,.07); color: var(--accent); font-size: 14px; font-weight: 800; }
    .split-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; font-weight: 750; }
    .split-summary strong { font-size: 16px; color: var(--warn); }
    .split-summary.complete strong { color: var(--green); }
    .split-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 16px; }
    .split-actions button { min-height: 52px; }
    .split-actions .primary:disabled { opacity: .42; box-shadow: none; }
    @media (max-width: 390px) { .split-row { grid-template-columns: minmax(0,1fr) 82px 40px; padding: 8px; } }
    .skill-progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
    .skill-progress-card { width: 100%; text-align: left; color: var(--text); border: 0; background: #1c1c1e; border-radius: 16px; padding: 11px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
    .skill-progress-card.active { box-shadow: inset 0 0 0 1.5px rgba(200,252,0,.45); background: rgba(200,252,0,.09); }
    .skill-progress-card:disabled { cursor: default; }
    .skill-progress-card.off { background: #18181a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
    .skill-progress-card.off.active { background: rgba(200,252,0,.1); box-shadow: inset 0 0 0 1.5px rgba(200,252,0,.42); }
    .skill-progress-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; }
    .skill-progress-icon { font-size: 19px; line-height: 1; }
    .skill-progress-name { font-size: 13px; font-weight: 800; color: #f2f2f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .skill-progress-card.off .skill-progress-name { color: #8e8e93; }
    .skill-progress-value { font-size: 12px; font-weight: 800; color: var(--green); }
    .skill-progress-card.off .skill-progress-value { color: #8e8e93; }
    .skill-progress-card .ach-track { margin-top: 9px; height: 6px; background: rgba(255,255,255,.08); }
    .skill-progress-card.off .ach-track { background: rgba(255,255,255,.05); }
    .skill-card { padding: 16px; background: linear-gradient(160deg, rgba(48,209,88,.2), rgba(28,28,30,.96) 68%); box-shadow: inset 0 0 0 1px rgba(48,209,88,.22), 0 14px 34px rgba(0,0,0,.18); }
    .skill-card .team-head { margin-bottom: 10px; }
    .skill-card .team-head strong { color: #f2f2f7; font-size: 18px; }
    .skill-card .team-head .badge { padding: 8px 12px; background: rgba(48,209,88,.16); color: var(--green); border: 1px solid rgba(48,209,88,.25); }
    .skills-list { display: grid; gap: 0; margin-top: 2px; border-radius: 16px; overflow: hidden; background: rgba(12,18,14,.28); box-shadow: inset 0 0 0 1px rgba(48,209,88,.08); }
    .skill-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 43px; padding: 9px 12px; background: transparent; box-shadow: none; }
    .skill-line + .skill-line { border-top: 1px solid rgba(255,255,255,.055); }
    .skill-line.off { color: rgba(235,235,245,.36); background: transparent; box-shadow: none; }
    .skill-line-name { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .skill-line-name span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .skill-line-stars { display: inline-flex; gap: 1px; font-size: 15px; font-weight: 900; line-height: 1; white-space: nowrap; }
    .skill-line-star { --fill: 0%; position: relative; display: inline-block; width: 1em; height: 1em; color: rgba(235,235,245,.28); }
    .skill-line-star::before { content: "★"; position: absolute; inset: 0; color: rgba(235,235,245,.28); }
    .skill-line-star::after { content: "★"; position: absolute; inset: 0; width: var(--fill); overflow: hidden; color: #ffd60a; }
    .skill-line.off .skill-line-star::after { width: 0; }
    @media (min-width: 760px) {
      .app { max-width: 960px; margin: 0 auto; }
      .players-grid { grid-template-columns: repeat(3, 1fr); }
      .tabs { left: 50%; transform: translateX(-50%); max-width: 960px; border-radius: 24px 24px 0 0; }
      body.keyboard-open .tabs { transform: translateX(-50%) translateY(115%); }
      .profile-sheet { border-radius: 30px; margin-bottom: 16px; }
    }
    @media (max-width: 560px) {
      .app { padding-left: 16px; padding-right: 16px; }
      .form-grid { grid-template-columns: 1fr; }
      .rule-summary { grid-template-columns: 1fr; }
      .rule-grid { grid-template-columns: 1fr; }
      .rule-inline { grid-template-columns: minmax(0,1fr) 96px; }
      .poll-limit { grid-template-columns: 1fr; }
      .poll-publish-row { grid-template-columns: 1fr; }
      .poll-action-grid { grid-template-columns: 1fr; }
      .bag-row { grid-template-columns: 34px 42px minmax(0,1fr) auto; }
      .bag-position { width: 34px; height: 34px; }
      .bag-avatar-btn, .bag-avatar { width: 42px; height: 42px; border-radius: 13px; }
      .bag-row.current .bag-row-actions { grid-column: 2 / -1; justify-content: flex-start; }
      .card { border-radius: 22px; padding: 18px; }
      h1 { font-size: 28px; }
    }