:root { --bg:#0e1216; --card:#161c23; --card2:#1c242d; --line:#2a333d;
  --tx:#e6ecf2; --dim:#8b97a5; --accent:#2e6cf0; }
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--tx); margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.sk { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
.sk-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.sk-head h1 { font-size: 20px; margin: 0; }
.sk-head a.back { color: var(--dim); text-decoration: none; font-size: 13px; }
.sk-head a.back:hover { color: var(--tx); }
.status { color: var(--dim); font-size: 13px; margin: 4px 0 18px; }
.status.warn { color:#f2c14e; }

.preview { height: 46px; border-radius: 10px; overflow: hidden; display: flex;
  margin-bottom: 20px; border: 1px solid var(--line); }
.preview span { flex: 1; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.tile { display:flex; align-items:center; gap:12px; background: var(--card);
  border:1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
/* The native colour input IS the swatch: it shows its own chosen colour with
   no scripting, which keeps it working under the strict style-src CSP. */
.sw { width:44px; height:44px; flex:none; padding:0; cursor:pointer;
  border:1px solid rgba(255,255,255,.15); border-radius:8px; background:none; }
.sw::-webkit-color-swatch-wrapper { padding:0; }
.sw::-webkit-color-swatch { border:none; border-radius:7px; }
.sw::-moz-color-swatch { border:none; border-radius:7px; }
.tile .meta { display:flex; flex-direction:column; }
.tile .nm { font-size: 14px; }
.tile .hex { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums;
  text-transform: uppercase; }

.bar { display:flex; align-items:center; gap:14px; margin-top: 22px;
  background: var(--card); border:1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.bar label { font-size: 14px; }
select { background: var(--card2); color: var(--tx); border:1px solid var(--line);
  border-radius:7px; padding:7px 10px; font: inherit; }
.grow { flex: 1; }
.btn { background: var(--accent); color:#fff; border:none; border-radius:8px;
  padding:11px 20px; font-weight:600; cursor:pointer; font: inherit; }
.btn:disabled { background:#33414f; color:#7c8896; cursor:default; }
.sub2 { font-size: 15px; margin: 24px 0 4px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .presets { grid-template-columns: repeat(2, 1fr); } }
.preset { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.preset .pstrip { height: 26px; border-radius: 6px; overflow: hidden; display: flex;
  border: 1px solid var(--line); }
.preset .pstrip span { flex: 1; background: #333; }
.preset .plabel { font-size: 12px; color: var(--dim); }
.preset .pbtns { display: flex; gap: 6px; }
.preset .pbtns button { flex: 1; font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 0;
  background: var(--card2); color: var(--tx); }
.preset .pbtns button.apply { background: var(--accent); border-color: var(--accent); color: #fff; }
.msg { font-size: 13px; margin-top: 14px; min-height: 18px; }
.msg.ok { color:#58c98a; } .msg.err { color:#f2c14e; }
.hint { color: var(--dim); font-size: 12px; margin-top: 6px; }
