 /* ── TOOL VARIABLES ──────────────────────────────────────── */
        :root {
            --primary:   #4361ee;
            --secondary: #3f37c9;
            --dark:      #212529;
            --light:     #f8f9fa;
            --success:   #4cc9f0;
            --warning:   #f72585;
            --danger:    #e63946;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        .main-container {
            font-family: 'Poppins', sans-serif;
            background-color: #f5f7fa;
            color: var(--dark);
            line-height: 1.6;
        }

        /* ── CALCULATOR ──────────────────────────────────────────── */
        .container {
            max-width: 520px;
            margin: 2rem auto;
            padding: 2rem;
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .header2 {
            text-align: center;
            margin-bottom: 2rem;
        }

        .icon svg { width: 60px; height: 60px; }

        h1 { color: var(--primary); font-size: 2rem; margin-bottom: 4px; }

        .input-group { margin-bottom: 1.5rem; }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            font-size: 0.9rem;
        }

        input[type="number"] {
            width: 100%;
            padding: 0.8rem 1rem;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 1rem;
            font-family: 'Poppins', sans-serif;
            transition: border 0.2s, box-shadow 0.2s;
            outline: none;
        }

        input[type="number"]:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
        }

        input[type="number"].input-error {
            border-color: var(--danger);
            box-shadow: 0 0 0 3px rgba(230,57,70,0.12);
        }

        .field-error {
            font-size: 0.75rem;
            color: var(--danger);
            margin-top: 4px;
            display: none;
        }
        .field-error.visible { display: block; }

        .percentage-buttons {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .btn-percentage {
            flex: 1;
            padding: 0.65rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-family: 'Poppins', sans-serif;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.2s;
        }

        .btn-percentage.active {
            background: var(--secondary);
            transform: scale(0.96);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2) inset;
        }

        .btn-percentage:hover:not(.active) { background: var(--secondary); }

        .people-input {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .people-btn {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: none;
            background: var(--primary);
            color: white;
            font-size: 1.2rem;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, transform 0.1s;
            flex-shrink: 0;
        }

        .people-btn:hover { background: var(--secondary); transform: scale(1.08); }
        .people-btn:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; }

        #people-count {
            font-weight: 700;
            font-size: 1.1rem;
            min-width: 24px;
            text-align: center;
            color: var(--primary);
        }

        /* ── RESULTS ─────────────────────────────────────────────── */
        .results {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin: 1.75rem 0;
        }

        .result-card {
            padding: 1rem;
            border-radius: 12px;
            text-align: center;
            animation: fadeIn 0.4s ease-out forwards;
        }

        .result-card h3 { font-size: 0.82rem; margin-bottom: 6px; font-weight: 600; }
        .result-card p  { font-size: 1.25rem; font-weight: 700; }

        .highlight1 { background: #e63946; }
        .highlight1 h3, .highlight1 p { color: white; }

        .highlight2 { background: #3cbee6; }
        .highlight2 h3, .highlight2 p { color: #0c2e3a; }

        .highlight3 { background: #1a97bd; }
        .highlight3 h3, .highlight3 p { color: white; }

        .highlight4 { background: #4361ee; }
        .highlight4 h3, .highlight4 p { color: white; }

        /* ── BUTTONS ─────────────────────────────────────────────── */
        #calculate-btn {
            width: 100%;
            padding: 1rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1.05rem;
            font-weight: 600;
            font-family: 'Poppins', sans-serif;
            cursor: pointer;
            transition: all 0.2s;
        }

        #calculate-btn:hover { background: var(--secondary); transform: translateY(-2px); }

        .download-btn {
            width: 100%;
            padding: 0.875rem;
            background: #4caf50;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 0.95rem;
            font-family: 'Poppins', sans-serif;
            font-weight: 600;
            margin-top: 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .download-btn:hover { background: #3e8e41; transform: translateY(-2px); }
        .download-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

        /* Inline toast feedback */
        .calc-toast {
            margin-top: 10px;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            text-align: center;
            display: none;
        }
        .calc-toast.error   { background: #fee2e2; color: #991b1b; display: block; }
        .calc-toast.success { background: #d1fae5; color: #065f46; display: block; }

        /* ── GAMES SECTION ───────────────────────────────────────── */
        .games-section {
            background: white;
            padding: 2.5rem 2rem;
            margin: 2rem auto;
            
            border-radius: 16px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.07);
        }

        .games-section h2 {
            text-align: center;
            color: var(--primary);
            margin-bottom: 8px;
            font-size: 1.7rem;
        }

        .games-section > p {
            text-align: center;
            color: #64748b;
            font-size: 0.9rem;
            margin-bottom: 1.75rem;
        }

        .games-container {
            
            gap: 1.25rem;
        }

        .game-card {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: transform 0.25s, box-shadow 0.25s, border-color 0.2s;
        }

        .game-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 28px rgba(67,97,238,0.15);
            border-color: var(--primary);
        }

        .game-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
        .game-title { color: var(--secondary); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
        .game-desc  { color: #64748b; font-size: 0.85rem; line-height: 1.5; }

        /* ── MODAL ───────────────────────────────────────────────── */
        .game-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.65);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
        }

        .game-modal.visible {
            opacity: 1;
            pointer-events: all;
        }

        .modal-content {
            background: white;
            padding: 2rem;
            border-radius: 16px;
            max-width: 460px;
            width: 100%;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
            transform: translateY(12px);
            transition: transform 0.25s;
        }

        .game-modal.visible .modal-content { transform: translateY(0); }

        .modal-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 4px;
            text-align: center;
        }

        .modal-sub {
            text-align: center;
            color: #64748b;
            font-size: 0.85rem;
            margin-bottom: 1.5rem;
        }

        .close-modal {
            position: absolute;
            top: 14px;
            right: 18px;
            font-size: 1.5rem;
            cursor: pointer;
            color: #94a3b8;
            line-height: 1;
            background: none;
            border: none;
            font-family: inherit;
            padding: 0;
            width: auto;
            box-shadow: none;
        }
        .close-modal:hover { color: var(--danger); background: none; transform: none; box-shadow: none; }

        /* ── WHEEL GAME ──────────────────────────────────────────── */
        .wheel-wrap { text-align: center; }

        #wheel-canvas {
            border-radius: 50%;
            box-shadow: 0 6px 20px rgba(0,0,0,0.15);
            margin-bottom: 1rem;
        }

        .wheel-pointer {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            display: block;
        }

        .wheel-result {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary);
            min-height: 28px;
            margin-bottom: 1rem;
        }

        /* ── MAGIC NUMBER GAME ───────────────────────────────────── */
        .magic-game { text-align: center; }

        .player-rows { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

        .player-row {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #f8fafc;
            padding: 10px 14px;
            border-radius: 10px;
        }

        .player-row label {
            flex: 1;
            text-align: left;
            font-weight: 600;
            font-size: 0.9rem;
            margin: 0;
        }

        .guess-input {
            width: 80px;
            padding: 7px 10px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            text-align: center;
            font-family: 'Poppins', sans-serif;
            font-size: 0.95rem;
        }

        .guess-input:focus { border-color: var(--primary); outline: none; }

        .magic-result {
            margin-top: 16px;
            font-size: 0.95rem;
            min-height: 24px;
        }

        .magic-result .winner { font-size: 1.2rem; font-weight: 700; color: #8a2be2; }

        /* ── ROULETTE GAME ───────────────────────────────────────── */
        .roulette-game { text-align: center; }

        .roulette-players {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin: 14px 0;
        }

        .roulette-player {
            padding: 7px 16px;
            border-radius: 20px;
            background: #e0f2fe;
            color: #0369a1;
            font-weight: 600;
            font-size: 0.88rem;
            transition: all 0.4s;
        }

        .roulette-player.eliminated {
            background: #fee2e2;
            color: #991b1b;
            text-decoration: line-through;
            opacity: 0.5;
        }

        .roulette-player.last-standing {
            background: #e63946;
            color: white;
            animation: pulseRed 0.8s infinite;
        }

        @keyframes pulseRed {
            0%,100% { transform: scale(1); }
            50%      { transform: scale(1.07); }
        }

        .roulette-result {
            margin-top: 14px;
            font-size: 1rem;
            font-weight: 600;
            min-height: 24px;
            color: var(--danger);
        }

        /* ── SHARED GAME BUTTONS ─────────────────────────────────── */
        .game-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 11px 24px;
            border-radius: 50px;
            border: none;
            font-family: 'Poppins', sans-serif;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 4px;
        }

        .game-btn:hover { transform: translateY(-2px); }
        .game-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

        .game-btn-blue   { background: var(--primary); color: white; }
        .game-btn-blue:hover:not(:disabled) { background: var(--secondary); }

        .game-btn-purple { background: #8a2be2; color: white; }
        .game-btn-purple:hover:not(:disabled) { background: #7b1fa2; }

        .game-btn-red    { background: var(--danger); color: white; }
        .game-btn-red:hover:not(:disabled) { background: #d62828; }

        .game-btn-gray   { background: #e2e8f0; color: #334155; }
        .game-btn-gray:hover:not(:disabled) { background: #cbd5e1; }

        /* ── ANIMATIONS ──────────────────────────────────────────── */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* ── RESPONSIVE ──────────────────────────────────────────── */
        @media (max-width: 600px) {
            .container  { margin: 1rem; padding: 1.25rem; }
            .results    { grid-template-columns: 1fr; }
            .games-section { margin: 1rem; padding: 1.5rem 1rem; }
        }

        /* ── SEO CONTENT BLOCK ───────────────────────────────────────
           Prefix: amtip__ (Albert Master TIP calculator)
           100% isolated — no conflict with any include or tool CSS
        ──────────────────────────────────────────────────────────── */
        .amtip__wrapper {
            --amtip-blue:    #4361ee;
            --amtip-blue-dk: #3f37c9;
            --amtip-green:   #059669;
            --amtip-amber:   #d97706;
            --amtip-red:     #e63946;
            --amtip-black:   #212529;
            --amtip-white:   #ffffff;
            --amtip-bg:      #f5f7fa;
            --amtip-surface: #ffffff;
            --amtip-border:  #e2e8f0;
            --amtip-muted:   #64748b;
            --amtip-text:    #1e293b;

            font-family: 'Poppins', sans-serif;
            background: var(--amtip-bg);
            color: var(--amtip-text);
            padding: 64px 20px;
            box-sizing: border-box;
            width: 100%;
        }

        .amtip__wrapper * { box-sizing: border-box; }
        .amtip__inner { width: 95%; margin: 0 auto; }

        .amtip__divider { display: flex; align-items: center; gap: 14px; margin: 52px 0 30px; }
        .amtip__divider-line { flex: 1; height: 1px; background: var(--amtip-border); }
        .amtip__divider-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--amtip-blue); flex-shrink: 0; }

        .amtip__h2 { font-size: 1.55rem; font-weight: 700; color: var(--amtip-black); margin: 0 0 6px; line-height: 1.2; }
        .amtip__h2 span { color: var(--amtip-blue); }
        .amtip__lead { font-size: 0.97rem; color: var(--amtip-muted); margin: 0 0 22px; line-height: 1.65; }
        .amtip__body { font-size: 0.97rem; line-height: 1.78; color: #334155; margin: 0 0 16px; }
        .amtip__body strong { color: var(--amtip-black); font-weight: 600; }

        /* Hero */
        .amtip__hero { background: linear-gradient(135deg, #1a237e 0%, #212529 60%, #2d1b69 100%); border-radius: 16px; padding: 44px 40px; margin-bottom: 48px; position: relative; overflow: hidden; }
        .amtip__hero::after { content: '💵'; position: absolute; right: 20px; top: -10px; font-size: 8rem; opacity: 0.07; line-height: 1; pointer-events: none; user-select: none; }
        .amtip__hero-tag { display: inline-block; background: rgba(67,97,238,0.3); color: #93c5fd; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 12px; border-radius: 20px; margin-bottom: 14px; }
        .amtip__hero-title { font-size: 2rem; font-weight: 700; color: #fff; line-height: 1.15; margin: 0 0 14px; }
        .amtip__hero-title span { color: #93c5fd; }
        .amtip__hero-body { font-size: 0.95rem; color: rgba(255,255,255,0.65); line-height: 1.65; margin: 0; max-width: 560px; }

        /* Stats */
        .amtip__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
        .amtip__stat { background: var(--amtip-surface); border: 1px solid var(--amtip-border); border-radius: 12px; padding: 18px 16px; text-align: center; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
        .amtip__stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
        .amtip__stat::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--amtip-blue); }
        .amtip__stat-val { font-size: 1.8rem; font-weight: 700; color: var(--amtip-blue); line-height: 1; margin-bottom: 5px; }
        .amtip__stat-lbl { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amtip-muted); }

        /* Steps */
        .amtip__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 22px 0; }
        .amtip__step { background: var(--amtip-surface); border: 1px solid var(--amtip-border); border-radius: 12px; padding: 20px; transition: box-shadow 0.2s; }
        .amtip__step:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
        .amtip__step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--amtip-blue); color: #fff; font-size: 0.78rem; font-weight: 700; margin-bottom: 10px; }
        .amtip__step-title { font-size: 0.9rem; font-weight: 700; color: var(--amtip-black); margin: 0 0 5px; }
        .amtip__step-body  { font-size: 0.84rem; color: var(--amtip-muted); line-height: 1.6; margin: 0; }

        /* Table */
        .amtip__table-wrap { overflow-x: auto; margin: 22px 0; border-radius: 12px; border: 1px solid var(--amtip-border); }
        .amtip__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
        .amtip__table thead tr { background: var(--amtip-black); color: #fff; }
        .amtip__table th { padding: 12px 16px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
        .amtip__table td { padding: 12px 16px; border-bottom: 1px solid var(--amtip-border); color: var(--amtip-text); vertical-align: top; }
        .amtip__table tbody tr:last-child td { border-bottom: none; }
        .amtip__table tbody tr:nth-child(even) td { background: #f8fafc; }
        .amtip__table tbody tr:hover td { background: #eff6ff; }

        .amtip__badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
        .amtip__badge-blue  { background: #dbeafe; color: #1d4ed8; }
        .amtip__badge-green { background: #d1fae5; color: #065f46; }
        .amtip__badge-amber { background: #fef3c7; color: #92400e; }
        .amtip__badge-red   { background: #fee2e2; color: #991b1b; }

        /* Callout */
        .amtip__callout { border-left: 4px solid var(--amtip-blue); background: #eff6ff; border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 24px 0; }
        .amtip__callout p { font-size: 1rem; font-weight: 600; color: var(--amtip-black); line-height: 1.5; margin: 0; }
        .amtip__callout span { display: block; font-size: 0.8rem; font-weight: 500; color: var(--amtip-muted); margin-top: 5px; }

        /* Warn */
        .amtip__warn { border-left: 4px solid var(--amtip-amber); background: #fffbeb; border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 20px 0; display: flex; gap: 12px; align-items: flex-start; }
        .amtip__warn-text { font-size: 0.88rem; color: #78350f; line-height: 1.6; margin: 0; }
        .amtip__warn-text strong { color: #92400e; }

        /* FAQ */
        .amtip__faq-list { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
        .amtip__faq-item { background: var(--amtip-surface); border: 1px solid var(--amtip-border); border-radius: 12px; overflow: hidden; }
        .amtip__faq-q { width: 100%; background: none; border: none; text-align: left; padding: 18px 22px; font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--amtip-black); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: background 0.15s; }
        .amtip__faq-q:hover { background: #f8fafc; }
        .amtip__faq-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--amtip-blue); color: #fff; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: transform 0.25s, background 0.2s; }
        .amtip__faq-item.amtip__open .amtip__faq-icon { transform: rotate(45deg); background: var(--amtip-red); }
        .amtip__faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; padding: 0 22px; }
        .amtip__faq-item.amtip__open .amtip__faq-a { max-height: 500px; }
        .amtip__faq-a p { font-size: 0.9rem; line-height: 1.75; color: #475569; margin: 0 0 18px; }
        .amtip__faq-a strong { color: var(--amtip-black); }

        /* Disclaimer */
        .amtip__disclaimer { background: #f1f5f9; border: 1px solid var(--amtip-border); border-radius: 12px; padding: 20px 24px; margin-top: 48px; display: flex; gap: 14px; align-items: flex-start; }
        .amtip__disclaimer-text { font-size: 0.82rem; color: var(--amtip-muted); line-height: 1.65; margin: 0; }
        .amtip__disclaimer-text strong { color: var(--amtip-text); }

        @media (max-width: 640px) {
            .amtip__hero { padding: 28px 22px; }
            .amtip__hero-title { font-size: 1.5rem; }
            .amtip__h2 { font-size: 1.3rem; }
            .amtip__stats { grid-template-columns: repeat(2, 1fr); }
        }