:root{
  --primary:#0d6efd;--background:#f8f9fa;--card:#fff;--text:#212529;--muted:#6c757d;--radius:12px;--shadow:0 2px 12px rgba(0,0,0,.06);
}
*{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--background);color:var(--text);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial}
.container{max-width:760px;margin:0 auto;padding:16px}
header{display:flex;align-items:center;gap:12px;margin-top:8px;position:relative}
#siteLogo{width:48px;height:48px}
h1{margin:0;font-size:28px}
#tagline{margin:2px 0 12px;color:var(--muted);font-size:14px}
.nav{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
.nav a{display:inline-block;padding:8px 12px;border-radius:999px;background:var(--card);box-shadow:var(--shadow);text-decoration:none;color:var(--primary);font-weight:600}
.nav a.active{background:var(--primary);color:#fff}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;margin:14px 0}
.card h3{margin:0 0 10px 0}
label{display:block;font-weight:600;margin:8px 0 4px}
input,select{width:100%;padding:10px;border-radius:10px;border:1px solid #dce3ed}
.result{margin-top:8px;padding:10px;border-radius:10px;background:#e9f2ff;min-height:38px;display:flex;align-items:center;justify-content:space-between}
.result .value{word-break:break-word}
.btn{display:inline-block;border:0;padding:8px 10px;border-radius:10px;background:var(--primary);color:#fff;cursor:pointer}
.row{display:grid;grid-template-columns:1fr;gap:12px}
.footer{display:flex;gap:16px;justify-content:center;margin:22px 0;color:var(--muted);font-size:14px}
.history{display:flex;align-items:center;justify-content:space-between}
.history-list{margin:8px 0 0 0;padding-left:18px}
.theme{position:absolute;right:0;top:0}
.dark{--background:#0b0e14;--card:#121723;--text:#e6e9ef;--muted:#9aa4b2}

/* Cookie Settings modal */
.cookie-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:1000}
.cookie-modal.open{display:flex}
.cookie-modal .backdrop{position:absolute;inset:0;background:rgba(0,0,0,.4)}
.cookie-modal .panel{position:relative;z-index:1;width:min(720px,calc(100% - 32px));background:var(--card);border-radius:12px;box-shadow:var(--shadow);padding:16px}
.cookie-modal .header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cookie-modal .body{display:flex;flex-direction:column;gap:10px;max-height:70vh;overflow:auto}
.cookie-modal .row{display:flex;align-items:center;gap:16px;justify-content:space-between;border-bottom:1px solid #eee;padding:8px 0}
.cookie-modal .row:last-child{border-bottom:0}
.cookie-modal .meta{flex:1}
.cookie-modal .title{font-weight:700;margin-bottom:2px}
.cookie-modal .desc{color:var(--muted);font-size:14px}
.cookie-modal .actions{margin-top:12px;display:flex;gap:8px;justify-content:flex-end}
.cookie-modal .close-btn{border:0;padding:8px 10px;border-radius:10px;background:#e9ecef;cursor:pointer}
/* simple iOS-like switch */
.cookie-switch{position:relative;display:inline-block;width:48px;height:26px}
.cookie-switch input{opacity:0;width:0;height:0}
.cookie-switch .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#cbd3df;border-radius:999px;transition:.2s}
.cookie-switch .slider:before{content:"";position:absolute;height:20px;width:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.cookie-switch input:checked + .slider{background:var(--primary)}
.cookie-switch input:checked + .slider:before{transform:translateX(22px)}
