:root {
            --ink: #202938;
            --muted: #667386;
            --bg: #f6f8fb;
            --panel: #ffffff;
            --edge: #dbe2eb;
            --accent: #3578e5;
            color-scheme: light;
           /*  box-sizing: border-box; */
            padding-top: env(safe-area-inset-top, 0px);
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        * {
           /*  box-sizing: border-box */
        }

        body {
            margin: 0;
            /* background: var(--bg); */
            color: var(--ink);
            font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif
        }

        main {
            max-width: 860px;
            margin: 0 auto;
            padding: 20px
        }

        h1 {
            font-size: 20px;
            margin: 0 0 4px
        }

        .sub {
            margin: 0 0 12px;
            color: var(--muted)
        }

        svg {
            width: 100%;
            height: auto;
            display: block;
            background: #fff;
            border-radius: 8px;
            border: 1px solid var(--edge);
            cursor: pointer
        }

        .tabs {
            display: flex;
            gap: 10px;
            margin: 14px 0 10px;
            flex-wrap: wrap
        }

        .tab {
            flex: 1 1 150px;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--panel);
            color: var(--ink);
            border: 2px solid var(--edge);
            border-radius: 8px;
            font: inherit;
            cursor: pointer;
            text-align: left
        }

        .swap { flex: 0 0 48px; align-self: stretch; border: 1px solid var(--edge); border-radius: 8px; background: #eef3fa; color: var(--ink); font-size: 25px; cursor: pointer; }
        .swap:hover { background: #dfeafa; }
        .swap:disabled { opacity: .35; cursor: not-allowed; }
        .tab[aria-pressed=true],
        .sw[aria-pressed=true] {
            border-color: var(--accent)
        }

        .chip {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            border: 1px solid var(--muted);
            flex: none
        }

        .tab small {
            display: block;
            color: var(--muted)
        }

        .prompt {
            margin: 4px 0 8px;
            font-weight: 600
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
            gap: 8px
        }

        .sw {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 4px;
            background: var(--panel);
            color: var(--ink);
            border: 2px solid var(--edge);
            border-radius: 8px;
            font: 12px/1.2 inherit;
            cursor: pointer
        }

        .sw i {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: 1px solid var(--muted)
        }

        .preset-heading { margin: 18px 0 8px; font-weight: 650; }
        .preset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:8px; }
        .preset { display:flex; align-items:center; gap:9px; padding:9px; background:#fff; border:2px solid var(--edge); border-radius:9px; cursor:pointer; color:var(--ink); text-align:left; font:inherit; }
        .preset[aria-pressed=true] { border-color:var(--accent); }
        .preset-dot { display:block; flex:none; width:32px; height:32px; border-radius:50%; border:1px solid #9aa4b1; }
        .opts {
            display: flex;
            gap: 18px;
            align-items: center;
            flex-wrap: wrap;
            margin-top: 14px;
            color: var(--muted)
        }

        label {
            display: flex;
            gap: 8px;
            align-items: center;
            cursor: pointer
        }

        input[type=color] {
            width: 38px;
            height: 30px;
            padding: 0;
            border: 1px solid var(--edge);
            border-radius: 6px;
            background: none;
            cursor: pointer
        }

        button:focus-visible,
        input:focus-visible {
            outline: 3px solid var(--accent);
            outline-offset: 2px
        }
    
        @media (max-width: 600px) {
            .tabs { flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
            .tab { flex: 1 1 0; min-width: 0; padding: 9px 7px; gap: 6px; }
            .tab .chip { width: 22px; height: 22px; }
            .tab strong, .tab small { overflow-wrap: anywhere; }
            .swap { flex: 0 0 42px; align-self: stretch; }
        }
