        * { margin: 0; padding: 0; box-sizing: border-box; }
        button, a { touch-action: manipulation; }

        /* ── Bas – mörk "Matchnight"-bakgrund (landningssida) ── */
        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background: #0a0c10;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            padding: 24px 16px 60px;
            position: relative;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(240,180,41,.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(240,180,41,.03) 1px, transparent 1px);
            background-size: 60px 60px;
            pointer-events: none;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            width: 700px;
            height: 700px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -55%);
            background: radial-gradient(circle, rgba(240,180,41,.06) 0%, transparent 70%);
            pointer-events: none;
            z-index: 0;
        }

        .page-wrap {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 420px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            animation: rise .55s cubic-bezier(.22,1,.36,1) both;
        }

        @keyframes rise {
            from { opacity: 0; transform: translateY(20px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* ── Logotyp ── */
        .logo-block { text-align: center; padding: 20px 0 8px; }

        .logo-fish {
            display: block;
            font-size: 2.8em;
            margin-bottom: 6px;
            animation: swing 4s ease-in-out infinite;
        }

        @keyframes swing {
            0%, 100% { transform: rotate(-5deg); }
            50%       { transform: rotate(5deg); }
        }

        .logo-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 4.2em;
            color: #e8edf5;
            letter-spacing: .06em;
            line-height: 1;
        }

        .logo-title span { color: #f0b429; }

        .logo-sub {
            font-size: .82em;
            color: #4a5568;
            margin-top: 6px;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        /* ── Kort ── */
        .card {
            width: 100%;
            background: #12161f;
            border: 1px solid #1e2535;
            border-radius: 16px;
            padding: 28px 26px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .card-label {
            font-size: .7em;
            letter-spacing: .18em;
            text-transform: uppercase;
            color: #b0bec5;
            font-weight: 500;
            text-align: center;
        }

        /* ── Fält ── */
        .field { display: flex; flex-direction: column; gap: 6px; }

        .field label {
            font-size: .78em;
            font-weight: 500;
            color: #8896aa;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .field input,
        .field select {
            background: #0a0c10;
            border: 1px solid #1e2535;
            border-radius: 10px;
            padding: 13px 16px;
            color: #e8edf5;
            font-family: 'DM Sans', sans-serif;
            font-size: 1em;
            outline: none;
            transition: border-color .2s, box-shadow .2s;
            width: 100%;
        }

        .field input:focus,
        .field select:focus {
            border-color: #f0b429;
            box-shadow: 0 0 0 3px rgba(240,180,41,.12);
        }

        .field input::placeholder { color: #2d3748; }

        /* ── Password toggle ── */
        .pw-wrap { position: relative; }
        .pw-wrap input { padding-right: 44px !important; }
        .pw-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            color: #8896aa;
            display: flex;
            align-items: center;
        }
        .pw-toggle:hover { color: #f0b429; }

        .field select {
            -webkit-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238896aa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 40px;
            cursor: pointer;
        }

        .field select option { background: #1a1f2e; }

        .code-input {
            font-size: 1.6em !important;
            font-weight: 700 !important;
            letter-spacing: 6px !important;
            text-align: center !important;
            text-transform: uppercase;
            color: #f0b429 !important;
            font-family: monospace !important;
        }

        .field-hint { font-size: .76em; color: #8896aa; margin-top: -4px; }

        /* ── Knappar ── */
        .btn-gold {
            width: 100%;
            padding: 14px;
            background: #f0b429;
            color: #0a0c10;
            border: none;
            border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 1em;
            font-weight: 700;
            letter-spacing: .04em;
            cursor: pointer;
            transition: transform .15s, box-shadow .15s, background .15s;
        }

        .btn-gold:hover:not(:disabled) {
            background: #f7c84a;
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(240,180,41,.28);
        }

        .btn-gold:active { transform: translateY(0); box-shadow: none; }

        .btn-ghost {
            width: 100%;
            padding: 13px;
            background: transparent;
            color: #8896aa;
            border: 1px solid #1e2535;
            border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: .95em;
            font-weight: 500;
            cursor: pointer;
            transition: border-color .2s, color .2s;
        }

        .btn-ghost:hover:not(:disabled) { border-color: #3a4a5c; color: #e8edf5; }

        .google-divider {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: .8em;
            color: #4a5568;
            margin: 4px 0;
        }
        .google-divider::before,
        .google-divider::after { content: ''; flex: 1; height: 1px; background: #1e2535; }

        .btn-google {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px;
            background: #12161f;
            color: #e8edf5;
            border: 1px solid #2d3a4a;
            border-radius: 4px;
            font-family: 'DM Sans', sans-serif;
            font-size: .95em;
            font-weight: 500;
            cursor: pointer;
            transition: border-color .2s, background .2s, box-shadow .2s;
        }
        .btn-google:hover {
            border-color: #f0b429;
            background: #181d28;
            box-shadow: 0 0 0 2px rgba(240,180,41,.15);
        }

        .btn-green {
            width: 100%;
            padding: 14px;
            background: #16a34a;
            color: white;
            border: none;
            border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 1em;
            font-weight: 700;
            cursor: pointer;
            transition: transform .15s, box-shadow .15s;
        }

        .btn-green:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(22,163,74,.3);
        }

        button:disabled { opacity: .45; cursor: not-allowed !important; transform: none !important; }

        /* ── Statusmeddelanden (mörkt tema) ── */
        .status { padding: 11px 14px; border-radius: 9px; font-size: .88em; font-weight: 500; line-height: 1.4; }
        .status-error   { background: rgba(220,38,38,.15);  color: #f87171; border: 1px solid rgba(220,38,38,.25); }
        .status-success { background: rgba(22,163,74,.15);  color: #4ade80; border: 1px solid rgba(22,163,74,.25); }
        .status-info    { background: rgba(59,130,246,.12); color: #93c5fd; border: 1px solid rgba(59,130,246,.2); }

        /* ── Kryssrutor ── */
        .check-group { display: flex; flex-direction: column; gap: 8px; }

        .check-label {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            padding: 11px 14px;
            border: 1px solid #1e2535;
            border-radius: 10px;
            color: #c9d4e3;
            font-size: .93em;
            transition: border-color .2s, background .2s;
        }

        .check-label:hover { border-color: #2d3748; background: rgba(240,180,41,.03); }

        .check-label:has(input:checked) {
            border-color: rgba(240,180,41,.4);
            background: rgba(240,180,41,.06);
            color: #f0b429;
        }

        .check-label input[type="checkbox"] { width: 17px; height: 17px; accent-color: #f0b429; flex-shrink: 0; }

        /* ── Tävlings-logotyper ── */
        .comp-logo {
            width: 36px; height: 36px;
            object-fit: contain;
            flex-shrink: 0;
        }
        .comp-logo-bg { background: #fff; border-radius: 50%; padding: 1px; }

        /* ── Radioknappar ── */
        .radio-group { display: flex; flex-direction: column; gap: 8px; }

        .radio-label {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            cursor: pointer;
            padding: 13px 14px;
            border: 1px solid #1e2535;
            border-radius: 10px;
            color: #c9d4e3;
            transition: border-color .2s, background .2s;
        }

        .radio-label:hover { border-color: #2d3748; background: rgba(240,180,41,.03); }
        .radio-label:has(input:checked) { border-color: rgba(240,180,41,.4); background: rgba(240,180,41,.06); }
        .radio-label input[type="radio"] { width: 17px; height: 17px; accent-color: #f0b429; flex-shrink: 0; margin-top: 2px; }
        .radio-title { font-weight: 600; font-size: .93em; color: #e8edf5; }
        .radio-desc  { font-size: .8em; color: #4a5568; margin-top: 2px; }
        .radio-label:has(input:checked) .radio-title { color: #f0b429; }
        .radio-label:has(input:checked) .radio-desc  { color: #8896aa; }

        /* ── Delningsruta ── */
        .share-box {
            background: rgba(240,180,41,.06);
            border: 1px solid rgba(240,180,41,.2);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
        }

        .share-box-label { font-size: .7em; letter-spacing: .15em; text-transform: uppercase; color: #8896aa; margin-bottom: 6px; }

        .share-code {
            font-size: 3em;
            font-weight: 800;
            letter-spacing: 8px;
            color: #f0b429;
            font-family: monospace;
            margin: 4px 0 14px;
        }

        .share-url {
            background: #0a0c10;
            border: 1px solid #1e2535;
            border-radius: 8px;
            padding: 10px 12px;
            font-size: .8em;
            color: #8896aa;
            word-break: break-all;
        }

        /* ── Tävlingsbrickor ── */
        .comp-badges { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
        .comp-badge { padding: 4px 12px 4px 8px; border-radius: 20px; font-size: .78em; font-weight: 600; display:inline-flex; align-items:center; }
        .comp-badge-pl { background: rgba(59,130,246,.15);  color: #93c5fd; }
        .comp-badge-cl { background: rgba(139,92,246,.15);  color: #c4b5fd; }
        .comp-badge-wc { background: rgba(240,180,41,.15);  color: #f0b429; }
        .comp-badge-allsvenskan { background: rgba(0,100,30,.15); color: #4ade80; }

        /* ── Liga-header (i login-vyn) ── */
        .league-header {
            text-align: center;
            padding: 10px 0 18px;
            border-bottom: 1px solid #1e2535;
            margin-bottom: 18px;
        }

        .league-header .fish { font-size: 2em; margin-bottom: 6px; }

        .league-name {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 2em;
            color: #e8edf5;
            letter-spacing: .05em;
        }

        .league-code-badge {
            display: inline-block;
            background: rgba(240,180,41,.1);
            color: #f0b429;
            padding: 3px 14px;
            border-radius: 20px;
            font-size: .82em;
            font-weight: 700;
            margin-top: 6px;
            letter-spacing: 4px;
            font-family: monospace;
            border: 1px solid rgba(240,180,41,.2);
        }

        /* ── Hittades inte ── */
        .not-found-box { text-align: center; padding: 20px 0; }
        .not-found-box .emoji { font-size: 2.8em; margin-bottom: 12px; }
        .not-found-box h2 { color: #e8edf5; font-size: 1.3em; margin-bottom: 8px; }
        .not-found-box p  { color: #4a5568; font-size: .92em; margin-bottom: 20px; line-height: 1.5; }

        /* ── Laddar ── */
        .loading-box { text-align: center; padding: 30px 0; color: #4a5568; }

        .spinner {
            display: inline-block;
            width: 28px;
            height: 28px;
            border: 2px solid #1e2535;
            border-top-color: #f0b429;
            border-radius: 50%;
            animation: spin .75s linear infinite;
            margin-bottom: 10px;
        }

        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes fishCast {
            0%, 100%  { transform: rotate(0deg) translateY(0); }
            10%       { transform: rotate(-20deg) translateY(-5px); }
            28%       { transform: rotate(14deg) translateY(3px); }
            42%, 55%  { transform: rotate(0deg) translateY(0); }
            48%       { transform: rotate(-4deg) translateY(-2px); }
            68%, 80%  { transform: rotate(0deg) translateY(0); }
            74%       { transform: rotate(4deg) translateY(2px); }
        }
        @keyframes bobberDip {
            0%, 100% { transform: translateY(0); opacity: .85; }
            50%      { transform: translateY(5px); opacity: .4; }
        }

        /* ── Admin-inloggad-badge ── */
        .admin-badge {
            background: rgba(22,163,74,.12);
            border: 1px solid rgba(22,163,74,.25);
            border-radius: 9px;
            padding: 10px 14px;
            font-size: .85em;
            color: #4ade80;
            font-weight: 600;
        }

        /* ── Avdelare ── */
        .or-divider {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #4a5568;
            font-size: .8em;
            letter-spacing: .1em;
            text-transform: uppercase;
            width: 100%;
        }

        .or-divider::before,
        .or-divider::after { content: ''; flex: 1; height: 1px; background: #2a3347; }

        /* ── Hub: inloggad-chip ── */
        .hub-user-chip {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            background: rgba(255,255,255,.04);
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 10px;
            padding: 9px 14px;
            box-sizing: border-box;
        }

        .hub-user-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, #f0b429 0%, #d4930a 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .75em;
            font-weight: 700;
            color: #0a0c10;
            letter-spacing: 0;
            flex-shrink: 0;
            font-family: 'DM Sans', sans-serif;
        }

        .hub-user-email {
            flex: 1;
            font-size: .78em;
            color: #8896aa;
            font-family: 'DM Sans', sans-serif;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .hub-user-logout {
            background: none;
            border: 1px solid rgba(248,113,113,.25);
            border-radius: 6px;
            color: #f87171;
            font-size: .72em;
            font-family: 'DM Sans', sans-serif;
            cursor: pointer;
            padding: 4px 9px;
            white-space: nowrap;
            transition: background .15s, border-color .15s;
            flex-shrink: 0;
        }

        .hub-user-logout:hover {
            background: rgba(248,113,113,.12);
            border-color: rgba(248,113,113,.5);
        }

        /* ── Signatur ── */
        .signature { position: relative; z-index: 1; text-align: center; padding-top: 16px; font-size: .7em; color: rgba(255,255,255,.15); }

        /* ── Mobile tweaks (mörkt tema) ── */
        @media (max-width: 440px) {
            .logo-title { font-size: 3.6em; }
            .share-code { font-size: 2.4em; letter-spacing: 6px; }
        }

        /* ════════════════════════════════════════════════════════════
           HUVUD-APP (ljust tema efter inloggning)
           ════════════════════════════════════════════════════════════ */

        #viewApp {
            position: fixed;
            inset: 0;
            background: #2a2d37;
            display: flex;
            flex-direction: column;
            z-index: 50;
        }

        /* ── App-header (kompakt mörk) ── */
        .app-header {
            background: #1e2535;
            padding: 0 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 52px;
            flex-shrink: 0;
            z-index: 20;
            box-shadow: 0 2px 8px rgba(0,0,0,.2);
        }

        .app-header-left { flex: 1; display: flex; align-items: center; gap: 8px; }

        .app-header-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.35em;
            color: #e8edf5;
            letter-spacing: .05em;
            line-height: 1;
        }

        .app-header-title span { color: #f0b429; }

        .app-header-center { display: flex; align-items: center; justify-content: center; padding: 0 8px; position: relative; }

        .app-league-chip {
            background: rgba(240,180,41,.12);
            color: #f0b429;
            font-size: .8em;
            font-weight: 600;
            padding: 4px 10px 4px 12px;
            border-radius: 12px;
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: pointer;
            user-select: none;
            transition: background .15s;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .app-league-chip:hover { background: rgba(240,180,41,.22); }
        .app-league-chip .chip-arrow {
            font-size: .75em;
            opacity: .7;
            flex-shrink: 0;
            transition: transform .2s;
        }
        .app-league-chip.open .chip-arrow { transform: rotate(180deg); }

        /* Pulse-ring runt chipet – visas första gången per session */
        @keyframes chip-pulse {
            0%   { box-shadow: 0 0 0 0 rgba(240,180,41,.55); }
            70%  { box-shadow: 0 0 0 8px rgba(240,180,41,0); }
            100% { box-shadow: 0 0 0 0 rgba(240,180,41,0); }
        }
        .app-league-chip.pulsing {
            animation: chip-pulse 1.4s ease-out 10;
        }
        .league-switcher-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%);
            background: #1e2535;
            border: 1px solid rgba(240,180,41,.3);
            border-radius: 10px;
            padding: 6px;
            min-width: 220px;
            max-width: 300px;
            box-shadow: 0 8px 24px rgba(0,0,0,.4);
            z-index: 200;
        }
        .league-switcher-dropdown button {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: transparent;
            border: none;
            border-radius: 7px;
            padding: 9px 12px;
            color: #e8edf5;
            font-family: 'DM Sans', sans-serif;
            font-size: .9em;
            cursor: pointer;
            text-align: left;
            transition: background .15s;
            gap: 10px;
        }
        .league-switcher-dropdown button:hover { background: rgba(240,180,41,.12); }
        .league-switcher-dropdown button.active { background: rgba(240,180,41,.18); color: #f0b429; }
        .league-switcher-dropdown .ls-code { font-family: monospace; font-size: .8em; color: #f0b429; letter-spacing: 2px; flex-shrink: 0; }

        .app-header-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; }

        .user-pill {
            display: flex;
            align-items: center;
            gap: 7px;
            background: rgba(255,255,255,.06);
            border: 1px solid rgba(255,255,255,.1);
            border-radius: 20px;
            padding: 4px 10px 4px 4px;
            cursor: pointer;
            transition: background .2s, border-color .2s, color .2s;
            color: #c4cdd8;
            font-size: .8em;
            font-family: 'DM Sans', sans-serif;
        }

        .user-pill:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #e8edf5; }
        .user-pill.menu-open { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #e8edf5; }

        .user-avatar {
            width: 24px;
            height: 24px;
            background: #f0b429;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: .78em;
            font-weight: 700;
            color: #1e2535;
            flex-shrink: 0;
            transition: box-shadow .2s;
        }
        .user-avatar.is-superadmin {
            box-shadow: 0 0 0 2px #f0b429, 0 0 0 4px rgba(240,180,41,.25);
        }

        .user-pill-exit {
            font-size: .72em;
            opacity: .45;
            margin-left: 2px;
            padding: 2px 4px;
            border-radius: 4px;
            transition: opacity .15s, background .15s;
        }
        .user-pill-exit:hover { opacity: 1; background: rgba(220,38,38,.25); }

        /* User menu dropdown */
        .user-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: #1e2535;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 12px;
            padding: 6px;
            min-width: 200px;
            box-shadow: 0 12px 32px rgba(0,0,0,.5);
            z-index: 300;
            display: none;
        }
        .user-menu.open { display: block; animation: menuFadeIn .15s ease; }
        @keyframes menuFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
        .user-menu-mode {
            padding: 8px 12px 6px;
            font-size: .72em;
            color: #8899aa;
            font-family: 'DM Sans', sans-serif;
            letter-spacing: .03em;
            border-bottom: 1px solid rgba(255,255,255,.07);
            margin-bottom: 4px;
        }
        .user-menu-mode strong { color: #f0b429; display: block; font-size: 1.1em; margin-top: 2px; }
        .user-menu-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            background: transparent;
            border: none;
            border-radius: 8px;
            padding: 10px 12px;
            color: #c4cdd8;
            font-family: 'DM Sans', sans-serif;
            font-size: .88em;
            cursor: pointer;
            text-align: left;
            transition: background .15s, color .15s;
        }
        .user-menu-btn:hover { background: rgba(255,255,255,.08); color: #e8edf5; }
        .user-menu-btn.danger:hover { background: rgba(220,38,38,.15); color: #fca5a5; }
        .user-menu-btn .btn-icon { font-size: 1em; width: 18px; text-align: center; flex-shrink: 0; }

        /* ── Tabs ── */
        .app-tabs-wrap {
            background: #23262f;
            border-bottom: 1px solid rgba(255,255,255,.08);
            flex-shrink: 0;
            z-index: 15;
        }

        .app-tabs {
            display: flex;
            overflow-x: auto;
            scrollbar-width: none;
            max-width: 700px;
            margin: 0 auto;
        }

        .app-tabs::-webkit-scrollbar { display: none; }

        .app-tab {
            padding: 12px 16px;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: #6b7280;
            font-family: 'DM Sans', sans-serif;
            font-size: .88em;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            transition: color .2s, border-color .2s;
            -webkit-tap-highlight-color: transparent;
        }

        .app-tab:hover { color: #d4930a; }

        .app-tab.active { color: #d4930a; border-bottom-color: #d4930a; font-weight: 600; }

        /* ── Content-area ── */
        .app-content { max-width: 700px; width: 100%; margin: 0 auto; padding: 16px; padding-bottom: max(48px, calc(env(safe-area-inset-bottom) + 32px)); }

        /* ── App-bakgrund (ljust tema) ── */
        #viewApp { background: #d8e0eb; }
        #appScrollArea { flex: 1; overflow-y: scroll; -webkit-overflow-scrolling: touch; background: #d8e0eb; position: relative; }
        #appScrollArea::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image: var(--team-crest-bg, none);
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 85vw;
            opacity: 0.6;
            pointer-events: none;
            z-index: 0;
        }
        .app-content { position: relative; z-index: 1; }

        /* ── App-kort ── */
        .app-card {
            background: #333743;
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 12px;
            padding: 18px;
            margin-bottom: 12px;
        }

        .app-card-title { font-size: .92em; font-weight: 600; color: #d0d6e0; margin-bottom: 14px; }

        /* ── Statusmeddelanden (mörkt tema) ── */
        .app-msg { border-radius: 8px; padding: 10px 14px; font-size: .88em; font-weight: 500; margin-bottom: 12px; }
        .app-msg-success { background: rgba(5,150,105,.18); color: #34d399; }
        .app-msg-error   { background: rgba(220,38,38,.15);  color: #f87171; }
        .app-msg-info    { background: rgba(217,119,6,.15);  color: #fbbf24; }

        /* ── Tipp-counter (Design 4) ── */
        #tippCountLabel { margin-bottom: 10px; }
        .tipp-counter-wrap {
            display: flex;
            align-items: stretch;
            background: #333743;
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 12px;
            overflow: hidden;
        }
        .tipp-counter-left {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            flex: 1;
        }
        .tipp-counter-divider {
            width: 1px;
            background: rgba(255,255,255,.08);
            flex-shrink: 0;
        }
        .tipp-counter-right {
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 10px 14px;
            flex: 1;
            min-width: 0;
        }
        .tipp-counter-nums { display: flex; align-items: baseline; gap: 2px; }
        .tipp-counter-num { font-family: 'Bebas Neue', sans-serif; font-size: 1.8em; line-height: 1; color: #d4930a; }
        .tipp-counter-slash { font-family: 'Bebas Neue', sans-serif; font-size: 1.8em; line-height: 1; color: #4a5260; font-weight: 400; }
        .tipp-counter-total { font-family: 'Bebas Neue', sans-serif; font-size: 1.8em; line-height: 1; color: #6b7585; }
        .tipp-counter-label { font-size: .68em; color: #6b7280; line-height: 1.3; margin-top: 1px; }
        .tipp-counter-team-crest {
            width: 52px; height: 52px;
            object-fit: contain;
            opacity: 1;
            flex-shrink: 0;
            margin-left: auto;
            padding: 4px;
        }
        .next-deadline-row { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
        .next-deadline-dot-sm {
            width: 5px; height: 5px; border-radius: 50%; background: #34d399; flex-shrink: 0;
            animation: dotPulse 2s ease-in-out infinite;
        }
        .next-deadline-title { font-size: .63em; font-weight: 700; color: #34d399; text-transform: uppercase; letter-spacing: .04em; }
        .next-deadline-time {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 1.1em;
            line-height: 1;
            color: #e8edf5;
            white-space: normal;
            word-break: break-word;
        }
        .next-deadline-sub-sm { font-size: .63em; color: #6b7280; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .follow-team-banner {
            font-size: .72em;
            color: #4a5260;
            margin-bottom: 10px;
            padding: 0 2px;
            letter-spacing: .01em;
        }

        /* ── FAQ Bottom Sheet (landningssida) ── */
        .faq-sheet-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,.55);
            z-index: 1000; backdrop-filter: blur(2px);
            display: flex; align-items: flex-end; justify-content: center;
        }
        .faq-sheet {
            width: 100%; max-width: 480px; max-height: 85vh;
            background: #10131a; border-top: 1px solid rgba(240,180,41,.2);
            border-radius: 20px 20px 0 0;
            display: flex; flex-direction: column;
            animation: sheetUp .3s cubic-bezier(.22,1,.36,1) both;
        }
        @keyframes sheetUp {
            from { transform: translateY(100%); }
            to   { transform: translateY(0); }
        }
        .faq-sheet-handle {
            width: 36px; height: 4px; background: rgba(255,255,255,.15);
            border-radius: 2px; margin: 10px auto 0; flex-shrink: 0;
        }
        .faq-sheet-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 14px 20px 10px; font-family: 'Bebas Neue', sans-serif;
            font-size: 1.15em; letter-spacing: .05em; color: #f0b429; flex-shrink: 0;
            border-bottom: 1px solid rgba(255,255,255,.07);
        }
        .faq-sheet-close {
            background: rgba(255,255,255,.08); border: none; color: #8896aa;
            width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
            font-size: .8em; display: flex; align-items: center; justify-content: center;
        }
        .faq-sheet-body { overflow-y: auto; padding: 18px 20px 32px; flex: 1; }
        .faq-sheet-section-title {
            font-weight: 700; color: #d0d6e0; font-size: .88em;
            margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em;
        }
        .faq-sheet-text { font-size: .86em; color: #8896aa; line-height: 1.55; }
        .faq-sheet-rule-box {
            border-radius: 8px; padding: 9px 12px;
            background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
        }
        .faq-sheet-rule-gold { background: rgba(212,147,10,.1); border-color: rgba(212,147,10,.2); }
        .faq-sheet-rule-purple { background: rgba(167,139,250,.08); border-color: rgba(167,139,250,.2); }
        .faq-sheet-rule-example { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.2); }
        .faq-sheet-rule-label { font-size: .74em; font-weight: 700; color: #f0b429; margin-bottom: 3px; letter-spacing: .04em; }
        .faq-sheet-rule-purple .faq-sheet-rule-label { color: #a78bfa; }
        .faq-sheet-rule-example .faq-sheet-rule-label { color: #fbbf24; }
        .faq-sheet-rule-desc { font-size: .83em; color: #b8c4d4; line-height: 1.5; }
        .faq-sheet-title-row {
            display: flex; gap: 10px; align-items: flex-start;
            font-size: .86em; color: #8896aa; line-height: 1.5; padding: 4px 0;
        }
        .faq-sheet-title-icon { font-size: 1.1em; flex-shrink: 0; margin-top: 1px; }
        .faq-sheet-item .faq-q { font-size: .86em; padding: 11px 2px; }
        .faq-sheet-item .faq-a { font-size: .83em; }
        .faq-sheet-rules-toggle {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07);
            font-size: .82em; font-weight: 600; color: #6b7280;
            cursor: pointer; user-select: none; letter-spacing: .02em;
            transition: color .15s;
        }
        .faq-sheet-rules-toggle:hover { color: #9ca3af; }
        .faq-sheet-rules-arrow { transition: transform .2s; font-size: .8em; }
        .faq-sheet-rules-toggle.open .faq-sheet-rules-arrow { transform: rotate(180deg); }
        .faq-sheet-rules-body {
            display: none; padding-bottom: 8px;
        }
        .faq-sheet-rules-toggle.open + .faq-sheet-rules-body { display: block; }

        /* ── FAQ ── */
        .faq-item { border-bottom: 1px solid rgba(255,255,255,.06); }
        .faq-q {
            width: 100%; display: flex; justify-content: space-between; align-items: center;
            background: none; border: none; padding: 13px 2px; color: #d0d6e0;
            font-family: 'DM Sans', sans-serif; font-size: .9em; font-weight: 600;
            cursor: pointer; text-align: left; gap: 10px; transition: color .15s;
        }
        .faq-q:hover { color: #f0b429; }
        .faq-arrow { font-size: .85em; color: #6b7280; flex-shrink: 0; transition: transform .2s; }
        .faq-item.open .faq-arrow { transform: rotate(180deg); }
        .faq-a {
            display: none; font-size: .86em; color: #8896aa; line-height: 1.65;
            padding: 0 2px 13px;
        }
        .faq-item.open .faq-a { display: block; }

        /* ── Matchgrupper ── */
        .round-group { background: #333743; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }

        .round-header {
            background: #1e2535;
            color: white;
            padding: 11px 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-weight: 600;
            font-size: .88em;
            user-select: none;
            flex-wrap: nowrap;
            gap: 6px;
        }

        .round-header > span:first-child {
            display: flex;
            align-items: baseline;
            gap: 6px;
            flex-wrap: nowrap;
            min-width: 0;
        }

        .round-header:hover { background: #253147; }

        .round-meta { font-weight: 400; color: #8896aa; font-size: .88em; white-space: nowrap; flex-shrink: 0; }

        .round-toggle { font-size: .9em; transition: transform .25s; }
        .round-toggle.collapsed { transform: rotate(-90deg); }

        .round-body { overflow: hidden; max-height: 9000px; transition: max-height .3s ease; }
        .round-body.collapsed { max-height: 0; }

        /* ── Match-kort (Matcher-flik) ── */
        .match-item { border-bottom: 1px solid rgba(255,255,255,.06); font-size: 1em; }
        .match-item:last-child { border-bottom: none; }
        .match-header { padding: 12px 14px; cursor: pointer; user-select: none; display: flex; align-items: flex-start; gap: 6px; }
        .match-header:hover { background: rgba(255,255,255,.03); }
        .match-header-left { flex: 1; min-width: 0; overflow: hidden; }
        .match-teams { font-weight: 700; color: #d0d6e0; font-size: 1.15em; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
        .match-teams-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
        .match-own-tip { font-size: .78em; color: #9ca3af; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .match-toggle { color: #6b7280; font-size: .75em; flex-shrink: 0; transition: transform .2s; margin-top: 22px; }
        .match-toggle.collapsed { transform: rotate(-90deg); }
        .match-body { overflow: hidden; max-height: 2000px; transition: max-height .3s ease; padding: 4px 14px 12px; border-top: 1px solid rgba(255,255,255,.06); }
        .match-body.collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; border-top: none; }
        .match-header:has(+ .match-body:not(.collapsed)) .own-tip-header { display: none; }
        .match-flag-note { font-size: .75em; color: #fbbf24; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
        .match-score-inline { color: #f0b429; font-family: 'JetBrains Mono', monospace; font-weight: 700; margin-left: 8px; }
        .match-date-line { color: #6b7280; font-size: .78em; margin-bottom: 3px; }
        .own-tip-header { border-top: 1px solid rgba(255,255,255,.06); margin-top: 6px; padding-top: 4px; background: none !important; font-weight: 600; }
        .match-meta  { color: #6b7280; font-size: .82em; margin-bottom: 8px; }

        .pred-row           { padding: 2px 6px; font-size: .80em; color: #d0d6e0; display: flex; align-items: center; gap: 6px; }
        .pred-row-correct   { color: #d0d6e0; font-weight: 600; }
        .pred-row-wrong     { color: #d0d6e0; }
        .pred-row-pending   { color: #94a3b8; }
        .pred-row-waiting   { color: #6b7280; }
        .pred-row-postponed { color: #fbbf24; }

        .pred-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
        .pred-row-me { background: rgba(240,180,41,.13); border-radius: 5px; font-weight: 600; }
        .leaderboard-row-me { background: rgba(240,180,41,.13); }
        .pred-dot-correct   { background: #4ade80; }
        .pred-dot-partial   { background: #fb923c; }
        .pred-dot-wrong     { background: #f87171; }
        .pred-dot-missing   { background: #374151; }
        .pred-dot-pending   { background: #fbbf24; }
        .pred-dot-postponed { background: #fbbf24; }

        .pts-badge           { padding: 2px 7px; border-radius: 10px; font-size: .85em; font-weight: 600; margin-left: 4px; }
        .pts-badge-correct   { background: rgba(5,150,105,.2); color: #34d399; }
        .pts-badge-partial   { background: rgba(251,146,60,.15); color: #fb923c; }
        .pts-badge-wrong     { background: rgba(248,113,113,.15); color: #f87171; }
        .pred-dot-flagged    { background: #fbbf24; }
        .pred-row-flagged    { color: #b8c4d4; }
        .pts-badge-flagged   { background: rgba(251,191,36,.15); color: #fbbf24; }

        /* ── Prediction-kort – Mörkt Matcher-tema ── */

        /* Round-grupp container */
        .pred-group {
            background: #333743;
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 10px;
        }
        .pred-group-header {
            background: #1e2535;
            color: white;
            padding: 11px 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            font-size: .88em;
            cursor: pointer;
            user-select: none;
        }
        .pred-group-header:hover { background: #253147; }
        .pred-group-header.locked-group { background: #1a1424; }
        .pred-group-header-left { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
        .pred-group-header img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 50%; padding: 1px; }
        .pred-group-round { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .pred-group-meta { font-weight: 400; color: #8896aa; font-size: .88em; flex-shrink: 0; }
        .pred-group-toggle { font-size: .9em; flex-shrink: 0; }

        /* Match-rad inuti grupp */
        .pred-match {
            padding: 8px 14px;
            border-bottom: 1px solid rgba(255,255,255,.06);
        }
        .pred-match:last-child { border-bottom: none; }
        .pred-match.locked .pred-team-name { color: #6b7280; }

        .pred-date-label {
            font-size: .7em;
            color: #6b7280;
            line-height: 1;
            white-space: nowrap;
            margin-bottom: 0;
        }

        .pred-pitch {
            display: grid;
            grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
            gap: 10px;
            align-items: center;
            touch-action: pan-y;
        }
        .pred-date-label-unused {
            font-size: .7em;
            color: #6b7280;
            line-height: 1.3;
            white-space: nowrap;
        }
        .pred-team-home { display: flex; align-items: center; justify-content: flex-end; text-align: right; align-self: center; min-width: 0; overflow: hidden; }
        .pred-team-away { display: flex; align-items: center; justify-content: flex-start; text-align: left; align-self: center; min-width: 0; overflow: hidden; }
        .pred-team-name {
            display: block;
            width: 100%;
            font-weight: 700;
            color: #d0d6e0;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        /* backward compat */
        .pred-team { display: flex; }
        .pred-team-label { display: none; }

        /* Lagloggor i tippa-fliken */
        .pred-team-crest {
            width: 22px;
            height: 22px;
            object-fit: contain;
            flex-shrink: 0;
        }
        .pred-team-crest-home { margin-left: 6px; order: 1; }
        .pred-team-crest-away { margin-right: 6px; order: -1; }

        /* Score-zon */
        .score-inputs { display: flex; align-items: center; gap: 4px; flex-shrink: 0; align-self: center; min-width: 0; }
        .score-dash { font-weight: 800; color: rgba(255,255,255,.12); font-size: 1em; }

        .score-input {
            width: 44px;
            height: 44px;
            background: #2a3040;
            border: 1.5px solid rgba(255,255,255,.1);
            border-radius: 8px;
            text-align: center;
            font-family: 'JetBrains Mono', monospace;
            font-size: 1em;
            font-weight: 700;
            color: #e8edf5;
            flex-shrink: 0;
            -moz-appearance: textfield;
            appearance: textfield;
            transition: border-color .2s, background .2s;
            touch-action: pan-y;
        }
        .score-input::-webkit-outer-spin-button,
        .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        #adminCompRows input[type=number]::-webkit-outer-spin-button,
        #adminCompRows input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .score-input:focus { outline: none; border-color: #d4930a; background: rgba(212,147,10,.12); }
        .score-input.has-val { border-color: #d4930a; color: #f0b429; background: rgba(212,147,10,.1); }
        .score-input:disabled { opacity: .55; cursor: default; }

        /* Statisk poäng (låst – visas i mitten) */
        .score-static {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.8em;
            font-weight: 700;
            color: #d4930a;
            min-width: 28px;
            text-align: center;
        }

        /* Låst-sektion under match-korten */
        .pred-locked-section {
            padding: 8px 14px 10px;
            border-top: 1px solid rgba(255,255,255,.06);
        }
        .pred-locked-status {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
            gap: 8px;
        }
        .pred-locked-chip {
            font-size: .68em;
            font-weight: 700;
            letter-spacing: .08em;
            padding: 3px 8px;
            background: rgba(248,113,113,.15);
            color: #f87171;
            border-radius: 4px;
            flex-shrink: 0;
        }
        .pred-locked-tipp { font-size: .82em; color: #6b7280; }
        .pred-locked-tipp strong { color: #f0b429; font-family: 'JetBrains Mono', monospace; }

        .predictions-revealed { display: flex; flex-direction: column; gap: 3px; }
        .predictions-revealed h4 { display: none; }
        .prediction-row {
            display: flex;
            justify-content: space-between;
            padding: 5px 0;
            border-bottom: 1px solid rgba(255,255,255,.06);
            font-size: .82em;
            color: #94a3b8;
        }
        .prediction-row:last-child { border-bottom: none; }
        .prediction-row span:last-child { color: #f0b429; font-family: 'JetBrains Mono', monospace; font-weight: 700; }

        /* ── Resultat-rad (tippa-fliken) ── */
        .pred-result-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 18px;
            margin-top: 10px;
            padding: 8px 14px;
            border-top: 1px solid rgba(255,255,255,.06);
        }
        .pred-result-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }
        .pred-result-label {
            font-size: .62em;
            font-weight: 700;
            letter-spacing: .1em;
            color: #4a5568;
            text-transform: uppercase;
        }
        .pred-result-score {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.15em;
            font-weight: 700;
            color: #6b7280;
        }
        .pred-result-score.correct { color: #4ade80; }
        .pred-result-score.wrong   { color: #f87171; }
        .pred-result-divider {
            width: 1px;
            height: 32px;
            background: rgba(255,255,255,.08);
        }
        .pred-result-actual-label { color: #94a3b8; }
        .pred-result-actual-score {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.15em;
            font-weight: 700;
            color: #f0b429;
        }

        /* ── Deadline-chips ── */
        .deadlines-row { margin-bottom: 10px; }
        .pred-group-chip-wrap { padding: 10px 12px 0; }
        .pred-group-chip-wrap .deadlines-row { margin-bottom: 0; }
        .pred-group-chip-wrap .deadline-chip { margin-bottom: 0; border-radius: 8px; }
        .round-group-header {
            font-size: .75em;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .06em;
            color: #9ca3af;
            padding: 16px 4px 6px;
            border-top: 1px solid rgba(255,255,255,.06);
            margin-top: 4px;
        }
        .round-group-header:first-child { border-top: none; padding-top: 4px; }

        /* ── Scraper sync status bar ─────────────────────────────── */
        .scraper-status-bar {
            display: flex;
            justify-content: center;
            padding: 8px 16px 14px;
        }
        .scraper-status-bar:empty { display: none; }
        .scraper-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 0;
            background: #1e2535;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.04);
        }
        .scraper-status-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 13px;
            font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
            font-size: 0.66em;
        }
        .scraper-status-label {
            color: #b0bace;
            text-transform: uppercase;
            letter-spacing: 0.09em;
            font-size: 0.9em;
        }
        .scraper-status-value {
            color: #e8edf5;
            font-weight: 600;
            letter-spacing: 0.02em;
        }
        .scraper-status-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #3a4255;
            flex-shrink: 0;
            transition: background 0.4s, box-shadow 0.4s;
        }
        .scraper-status-dot.fresh {
            background: #22c55e;
            box-shadow: 0 0 5px #22c55e99;
            animation: pulse-dot 2.5s ease-in-out infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { box-shadow: 0 0 4px #22c55e88; }
            50%       { box-shadow: 0 0 9px #22c55ecc; }
        }
        .scraper-status-sep {
            width: 1px;
            height: 20px;
            background: #2c3347;
            flex-shrink: 0;
        }
        /* ── end scraper status ──────────────────────────────────── */

        .deadline-chip {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: .8em;
            font-weight: 600;
            margin-bottom: 10px;
            position: relative;
            overflow: hidden;
        }
        .deadline-chip-open {
            background: linear-gradient(135deg, #0b1e13 0%, #0f2318 100%);
            border: 1px solid rgba(52,211,153,.28);
            color: #34d399;
            box-shadow: 0 2px 12px rgba(52,211,153,.08), inset 0 1px 0 rgba(52,211,153,.06);
        }
        .deadline-chip-locked {
            background: linear-gradient(135deg, #1a0d0e 0%, #200f10 100%);
            border: 1px solid rgba(248,113,113,.22);
            color: #f87171;
            box-shadow: 0 2px 8px rgba(248,113,113,.06);
        }

        .deadline-chip-top { display: contents; }
        .deadline-chip-sub { font-weight: 400; font-size: .86em; opacity: .65; }

        @keyframes dotPulse {
            0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(52,211,153,.5); }
            50%       { opacity: .85; transform: scale(1.15); box-shadow: 0 0 0 4px rgba(52,211,153,0); }
        }
        .deadline-dot {
            width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
        }
        .deadline-chip-open   .deadline-dot {
            background: #34d399;
            animation: dotPulse 2s ease-in-out infinite;
        }
        .deadline-chip-locked .deadline-dot { background: #f87171; }

        .deadline-countdown {
            margin-left: auto;
            font-weight: 800;
            font-size: 1.08em;
            flex-shrink: 0;
            letter-spacing: .01em;
        }
        .deadline-chip-open .deadline-countdown {
            color: #6ee7b7;
            text-shadow: 0 0 10px rgba(52,211,153,.25);
        }

        /* ── Spara-animation ── */
        @keyframes saveFlash {
            0%   { box-shadow: none; }
            25%  { box-shadow: 0 0 0 3px rgba(16,185,129,.4); }
            60%  { box-shadow: 0 0 0 3px rgba(16,185,129,.4); }
            100% { box-shadow: none; }
        }
        .pred-save-flash { animation: saveFlash .9s ease forwards; }

        /* ── Tom-state ── */
        .empty-state { text-align: center; padding: 32px 16px; color: #9ca3af; font-size: .9em; line-height: 1.5; }

        @media (max-width: 480px) {
            .app-tab { padding: 11px 11px; font-size: .82em; }
            .leaderboard-table { font-size: .82em; }
            .leaderboard-table th, .leaderboard-table td { padding: 8px 6px; }
            .leaderboard-table th:last-child,
            .leaderboard-table td:last-child { display: none; } /* dölj Snitt-kolumn */
            .score-input { width: 44px; height: 44px; font-size: 1em; }
            .app-content { padding: 12px; }
            .app-card { padding: 14px; }
            .card { padding: 22px 18px; }
            .result-modal { padding: 20px 16px; }
            .result-modal-input { width: 52px; font-size: 1.4em; }
        }

        /* ── Topplista-tabell ── */
        .leaderboard-table { width: 100%; border-collapse: collapse; font-size: .88em; }
        .leaderboard-table th { background: #d4930a; color: white; padding: 9px 10px; text-align: center; font-weight: 600; font-size: .82em; text-transform: uppercase; letter-spacing: .05em; }
        .leaderboard-table th:nth-child(2) { text-align: left; }
        .leaderboard-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; text-align: center; color: #d0d6e0; }
        .leaderboard-table td:nth-child(2) { text-align: left; }
        .leaderboard-table tr:last-child td { border-bottom: none; }
        .leaderboard-table tr:hover td { background: rgba(255,255,255,.04); }
        .rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: .82em; background: rgba(255,255,255,.08); color: #8896aa; }
        .rank-badge-1 { background: #f0b429; color: #0a0c10; }
        .rank-badge-2 { background: rgba(255,255,255,.15); color: #b8c4d4; }
        .rank-badge-3 { background: rgba(180,83,9,.25); color: #fb923c; }

        /* ── Titel-chips (Sniper/Nostradamus/Unicorn) ── */
        .title-chip { border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; }
        .title-chip-header { font-size: .7em; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: 3px; }
        .title-chip-name { font-size: 1em; font-weight: 700; }
        .title-chip-detail { font-size: .8em; margin-top: 2px; }
        .title-chip-sniper { background: rgba(245,158,11,.22); color: #fbbf24; border: 1px solid rgba(245,158,11,.45); }
        .title-chip-sniper .title-chip-header { color: #fcd34d; }
        .title-chip-nostradamus { background: rgba(139,92,246,.22); color: #c4b5fd; border: 1px solid rgba(139,92,246,.45); }
        .title-chip-nostradamus .title-chip-header { color: #ddd6fe; }
        .title-chip-unicorn { background: rgba(236,72,153,.22); color: #f9a8d4; border: 1px solid rgba(236,72,153,.45); }
        .title-chip-unicorn .title-chip-header { color: #fbcfe8; }

        /* ── Admin-panel ── */
        .admin-section { background: #333743; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
        .admin-section-header { background: #1e2535; color: white; padding: 12px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .88em; user-select: none; }
        .admin-section-header:hover { background: #253147; }
        .admin-section-body { padding: 16px; display: none; }
        .admin-section-body.open { display: block; }
        .admin-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: flex-end; }
        .admin-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 120px; }
        .admin-field label { font-size: .75em; font-weight: 600; color: #8896aa; text-transform: uppercase; letter-spacing: .05em; }
        .admin-field input, .admin-field select { padding: 9px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 1em; color: #d0d6e0; background: #2a2d37; width: 100%; }
        .admin-field input:focus, .admin-field select:focus { outline: none; border-color: #d4930a; }
        .btn-admin { padding: 11px 14px; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: .85em; font-weight: 600; cursor: pointer; border: none; transition: background .15s, transform .1s; white-space: nowrap; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
        .btn-admin:hover { transform: translateY(-1px); }
        .btn-admin:active { transform: none; }
        .btn-admin-primary { background: #f0b429; color: #0a0c10; }
        .btn-admin-primary:hover { background: #f7c84a; }
        .btn-admin-secondary { background: rgba(255,255,255,.1); color: #d0d6e0; }
        .btn-admin-secondary:hover { background: rgba(255,255,255,.15); }
        .btn-admin-danger { background: rgba(220,38,38,.15); color: #f87171; }
        .btn-admin-danger:hover { background: rgba(220,38,38,.25); }
        .btn-admin-green { background: rgba(5,150,105,.15); color: #34d399; }
        .btn-admin-green:hover { background: rgba(5,150,105,.25); }
        .admin-log { background: #0a0c10; color: #4ade80; font-family: monospace; font-size: .75em; padding: 12px; border-radius: 8px; max-height: 200px; overflow-y: auto; white-space: pre-wrap; margin-top: 10px; display: none; }
        .player-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
        .player-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; font-size: .88em; }
        .player-item-name { font-weight: 600; color: #d0d6e0; }
        .deadline-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
        .deadline-row:last-child { border-bottom: none; }
        .deadline-label { font-size: .85em; font-weight: 700; color: #d0d6e0; letter-spacing: .01em; }
        .deadline-row-controls { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
        .deadline-row-controls input[type="datetime-local"] { width: 160px; flex-shrink: 0; }
        .deadline-current { font-size: .78em; color: #6b7280; }
        .deadline-auto-hint { display: flex; align-items: center; gap: 6px; font-size: .74em; color: #6b7280; margin-top: 2px; }
        .deadline-auto-hint-icon { font-size: .9em; }
        .deadline-auto-btn { background: rgba(212,147,10,.12); border: 1px solid rgba(212,147,10,.25); color: #d4930a; font-size: .82em; font-weight: 600; cursor: pointer; padding: 2px 8px; border-radius: 4px; font-family: inherit; transition: background .15s, border-color .15s; white-space: nowrap; }
        .deadline-auto-btn:hover { background: rgba(212,147,10,.22); border-color: rgba(212,147,10,.5); }
        .deadline-status-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74em; font-weight: 600; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
        .deadline-status-badge.open { background: rgba(5,150,105,.12); color: #34d399; border: 1px solid rgba(5,150,105,.2); }
        .deadline-status-badge.locked { background: rgba(220,38,38,.1); color: #f87171; border: 1px solid rgba(220,38,38,.2); }
        .deadline-status-badge.unset { background: rgba(156,163,175,.08); color: #6b7280; border: 1px solid rgba(156,163,175,.12); }
        .activity-log-box { max-height: 300px; overflow-y: auto; font-size: .88em; font-family: monospace; background: #0a0c10; border: 1px solid #2d3748; border-radius: 8px; padding: 10px; }
        .admin-share-box { background: rgba(240,180,41,.06); border: 1px solid rgba(240,180,41,.2); border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 10px; }
        .admin-share-code { font-size: 2em; font-weight: 800; letter-spacing: 6px; color: #d4930a; font-family: monospace; }
        .admin-share-url { font-size: .78em; color: #6b7280; word-break: break-all; margin-top: 4px; }
        .fetch-last-status { font-size: .78em; color: #6b7280; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
        .fetch-last-status::before { content: ''; display: inline-block; width: 6px; height: 6px; background: #4ade80; border-radius: 50%; box-shadow: 0 0 6px #4ade80; flex-shrink: 0; }
        .btn-fetch-now { background: linear-gradient(135deg, #f0b429, #e09010); color: #0a0c10; border: none; border-radius: 8px; padding: 11px 20px; font-family: 'DM Sans', sans-serif; font-size: .88em; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(240,180,41,.25); transition: all .15s; }
        .btn-fetch-now:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,180,41,.35); }
        .btn-fetch-now:active { transform: none; }

        /* ── Resultat-modal ── */
        .result-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
        .result-modal { background: #333743; border-radius: 16px; padding: 24px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1); }
        .result-modal-title { font-weight: 700; font-size: 1.05em; color: #d0d6e0; margin-bottom: 4px; text-align: center; }
        .result-modal-match { text-align: center; color: #6b7280; font-size: .85em; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
        .result-modal-score { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
        .result-modal-team { font-weight: 600; font-size: .85em; flex: 1; color: #b8c4d4; }
        .result-modal-team-home { text-align: right; }
        .result-modal-team-away { text-align: left; }
        .result-modal-input { width: 48px; padding: 8px 4px; text-align: center; font-size: 1.3em; font-weight: 700; border: 2px solid rgba(255,255,255,.15); border-radius: 8px; -moz-appearance: textfield; appearance: textfield; font-family: 'DM Sans', sans-serif; color: #d0d6e0; background: #2a2d37; }
        .result-modal-input::-webkit-outer-spin-button, .result-modal-input::-webkit-inner-spin-button { -webkit-appearance: none; }
        .result-modal-input:focus { outline: none; border-color: #d4930a; }
        .result-modal-special { font-size: .82em; color: #fbbf24; text-align: center; min-height: 18px; margin-bottom: 12px; }
        .result-modal-btns { display: flex; gap: 8px; }
        .result-set-btn { display: block; width: 100%; padding: 6px 10px; margin-top: 6px; background: rgba(255,255,255,.07); color: #d0d6e0; border: none; border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: .82em; font-weight: 600; cursor: pointer; text-align: left; }
        .result-set-btn:hover { background: rgba(255,255,255,.12); }
        .flag-btn { display: inline; background: none; border: none; padding: 0; margin-left: 14px; font-size: .9em; cursor: pointer; opacity: .7; vertical-align: middle; }
        .flag-btn:hover { opacity: 1; }
        .flag-btn.flag-btn-done { opacity: .35; cursor: default; }

        /* ── Superadmin: Underhållsläge-modal ── */
        .maint-overlay { display:none;position:fixed;inset:0;background:rgba(0,0,0,.88);z-index:10000;align-items:center;justify-content:center;padding:20px; }
        .maint-box { background:#090b12;border:1px solid #1a2035;border-radius:16px;width:100%;max-width:400px;padding:24px;display:flex;flex-direction:column;gap:16px;box-shadow:0 24px 60px rgba(0,0,0,.6); }
        .maint-title { font-size:1em;font-weight:700;color:#e8edf5; }
        .maint-desc { font-size:.82em;color:#8896aa; }
        .maint-field-group { display:flex;flex-direction:column;gap:6px; }
        .maint-label { font-size:.72em;font-weight:600;color:#5a6880;letter-spacing:.1em;text-transform:uppercase; }
        .maint-input { background:#0c0f1a;border:1px solid #1a2035;border-radius:8px;padding:10px 14px;color:#e8edf5;font-family:'DM Sans',sans-serif;font-size:.9em;outline:none;transition:border-color .2s; }
        .maint-input:focus { border-color:#f0b429; }
        .maint-textarea { resize:none; }
        .maint-status { font-size:.82em;color:#f87171;min-height:16px; }
        .maint-btns { display:flex;gap:8px; }
        .maint-btn-confirm { flex:1;padding:11px;background:#f0b429;border:none;color:#0a0c10;font-family:'DM Sans',sans-serif;font-size:.88em;font-weight:700;cursor:pointer;border-radius:8px; }
        .maint-btn-cancel { padding:11px 18px;background:transparent;border:1px solid #1a2035;color:#5a6880;font-family:'DM Sans',sans-serif;font-size:.88em;cursor:pointer;border-radius:8px; }
