/* =========================================================================
   Gemma-4 theme — light & dark, mobile-first. No framework required.
   ========================================================================= */
:root {
  --bg: #f6f7fb; --bg2: #eef0f7; --card: #ffffff; --text: #0f172a; --text2: #475569; --muted: #64748b; --line: #e2e8f0; --line2: #cbd5e1;
  --pri: #4f46e5; --pri2: #6366f1; --pri-soft: #eef2ff; --acc: #ec4899; --ok: #059669; --ok-soft: #ecfdf5; --err: #dc2626; --err-soft: #fef2f2; --warn: #d97706;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
  --r: 14px; --r-sm: 9px; --sh: 0 1px 2px rgba(15,23,42,.05), 0 4px 16px rgba(15,23,42,.06); --sh-lg: 0 10px 40px rgba(15,23,42,.14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --hdr: 64px; color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1020; --bg2: #111831; --card: #141b33; --text: #e5e7f0; --text2: #b4bdd3; --muted: #8b95b0; --line: #243056; --line2: #33406b;
  --pri: #818cf8; --pri2: #a5b4fc; --pri-soft: #1e2550; --ok-soft: #0c2a22; --err-soft: #331417; --sh: 0 1px 2px rgba(0,0,0,.3), 0 4px 18px rgba(0,0,0,.25); --sh-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; }
a { color: var(--pri); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; } h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 750; } h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; } small { font-size: .82em; } code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--bg2); padding: .1em .35em; border-radius: 5px; }
kbd { border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 0 .4em; font-size: .75em; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }
.muted { color: var(--muted); } .small { font-size: .85em; } .mono { font-family: var(--mono); font-size: 13px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pri); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; } .skip:focus { left: 8px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pri) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sec { margin: 44px auto; } .empty { color: var(--muted); padding: 24px 0; text-align: center; } .empty i { font-size: 2.2rem; display: block; margin-bottom: 8px; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .62em 1.1em; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: transform .08s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--pri2); box-shadow: 0 2px 10px rgba(79,70,229,.15); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--grad); color: #fff !important; border-color: transparent; box-shadow: 0 4px 14px rgba(99,102,241,.35); } .btn-primary:hover { box-shadow: 0 6px 20px rgba(99,102,241,.45); filter: brightness(1.05); }
.btn-ghost { background: transparent; } .btn-danger { background: var(--err); color: #fff; border-color: var(--err); }
.btn-sm { padding: .45em .8em; font-size: .85rem; border-radius: 8px; } .btn-xs { padding: .25em .55em; font-size: .78rem; border-radius: 7px; } .btn-lg { padding: .8em 1.5em; font-size: 1.02rem; } .btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text2); cursor: pointer; font-size: 1rem; transition: background .15s; }
.icon-btn:hover { background: var(--bg2); color: var(--text); }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: .6em .8em; width: 100%; transition: border-color .15s, box-shadow .15s; min-height: 42px; }
textarea { resize: vertical; line-height: 1.5; } input[type=color] { padding: 3px; height: 42px; cursor: pointer; } input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--pri); padding: 0; flex: none; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pri) 20%, transparent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2em; }
label { font-weight: 600; font-size: .9rem; color: var(--text2); }
.form { display: grid; gap: 14px; } .form label { display: grid; gap: 6px; } .form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form h3 { margin: 0; } .form.danger { border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); border-radius: var(--r); padding: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; } .grid-2.wide-left { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; display: flex; gap: 10px; align-items: flex-start; } .alert i { margin-top: 4px; }
.alert-err { background: var(--err-soft); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 25%, transparent); } .alert-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 22px; margin-bottom: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: .3em .7em; border-radius: 999px; background: var(--bg2); color: var(--text2); border: 1px solid var(--line); text-decoration: none !important; }
a.badge[style*="--c"] { color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--card)); border-color: color-mix(in srgb, var(--c) 25%, transparent); }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--pri) 10%, var(--card)); color: var(--pri); font-weight: 600; font-size: .85rem; border: 1px solid color-mix(in srgb, var(--pri) 20%, transparent); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--pri); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 18px; height: var(--hdr); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text) !important; text-decoration: none !important; letter-spacing: -.02em; }
.main-nav { display: flex; gap: 4px; align-items: center; margin-left: 12px; }
.main-nav > a, .mega > a { display: inline-flex; gap: 7px; align-items: center; padding: 8px 12px; border-radius: 9px; color: var(--text2); font-weight: 600; font-size: .93rem; text-decoration: none !important; }
.main-nav > a:hover, .mega > a:hover, .main-nav a.active { color: var(--pri); background: var(--pri-soft); }
.mega { position: relative; } .caret { font-size: .7em; }
.mega-panel { position: absolute; top: calc(100% + 8px); left: -120px; width: min(760px, 92vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 12px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.mega:hover .mega-panel, .mega:focus-within .mega-panel, .mega.open .mega-panel { opacity: 1; visibility: visible; transform: none; }
.mega-panel a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); font-size: .9rem; font-weight: 500; text-decoration: none !important; }
.mega-panel a:hover { background: var(--bg2); } .mega-panel a i { width: 20px; text-align: center; } .mega-panel a small { margin-left: auto; color: var(--muted); font-size: .75rem; }
.mega-panel .mega-all { grid-column: 1 / -1; justify-content: center; font-weight: 700; color: var(--pri); border-top: 1px solid var(--line); border-radius: 0; margin-top: 6px; padding-top: 12px; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cur-select { width: auto; min-height: 36px; padding: 4px 26px 4px 10px; font-size: .88rem; font-weight: 600; border-radius: 9px; background-color: transparent; background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; }
.nav-toggle { display: none; }
.user-menu { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-weight: 800; cursor: pointer; display: inline-grid; place-items: center; font-size: 1rem; }
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; flex: none; }
.user-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 8px; display: none; }
.user-menu.open .user-panel { display: block; }
.user-hd { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; } .user-hd small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-panel a, .user-panel button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); font: 500 .92rem var(--font); background: none; border: 0; cursor: pointer; text-decoration: none !important; text-align: left; }
.user-panel a:hover, .user-panel button:hover { background: var(--bg2); } .user-panel i { width: 18px; color: var(--muted); }
@media (max-width: 960px) {
  .nav-toggle { display: inline-grid; } .hide-sm { display: none !important; }
  .main-nav { position: fixed; inset: var(--hdr) 0 auto 0; background: var(--card); flex-direction: column; align-items: stretch; margin: 0; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--sh-lg); display: none; max-height: calc(100vh - var(--hdr)); overflow: auto; }
  body.nav-open .main-nav { display: flex; }
  .mega-panel { position: static; opacity: 1; visibility: visible; transform: none; width: 100%; grid-template-columns: 1fr 1fr; box-shadow: none; border: 0; padding: 4px 0 0 8px; display: none; }
  .mega.open .mega-panel { display: grid; }
  .cur-select { display: none; }
}
@media (max-width: 340px) { .brand span { display: none; } }

/* ---------- search modal ---------- */
.search-modal { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: grid; align-items: start; justify-items: center; padding: 10vh 16px 16px; }
.search-modal[hidden] { display: none; }
.search-box { width: min(680px, 100%); background: var(--card); border-radius: 16px; box-shadow: var(--sh-lg); border: 1px solid var(--line); overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--line); } .search-in i { color: var(--muted); }
.search-in input { border: 0; box-shadow: none !important; font-size: 1.08rem; padding: 14px 0; background: transparent; }
.search-results { max-height: 60vh; overflow: auto; padding: 6px; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.search-results a.sel, .search-results a:hover { background: var(--pri-soft); }
.search-results a i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--bg2); color: var(--pri); flex: none; }
.search-results a small { margin-left: auto; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.search-results .sr-empty { padding: 20px; text-align: center; color: var(--muted); }
.search-results .sr-hd { padding: 8px 12px 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

/* ---------- hero & home ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; background: radial-gradient(1200px 400px at 10% -10%, color-mix(in srgb, #6366f1 16%, transparent), transparent 60%), radial-gradient(900px 400px at 100% 0%, color-mix(in srgb, #ec4899 14%, transparent), transparent 60%); text-align: center; }
.hero-in { max-width: 900px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 18px 0 14px; letter-spacing: -.03em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.15rem; color: var(--text2); max-width: 680px; margin: 0 auto 26px; }
.hero-search { display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 0 auto; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; padding: 6px 6px 6px 18px; box-shadow: var(--sh-lg); position: relative; }
.hero-search > i { color: var(--muted); } .hero-search input { border: 0; box-shadow: none !important; padding: 10px 0; font-size: 1.05rem; background: transparent; }
.hero-search .btn { border-radius: 12px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 0; }
.hero-tags a { font-size: .85rem; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text2); font-weight: 500; }
.hero-tags a:hover { border-color: var(--pri2); color: var(--pri); text-decoration: none; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 760px; margin: 36px auto 0; }
.hero-stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 10px; display: grid; }
.hero-stats b { font-size: 1.5rem; font-weight: 800; } .hero-stats span { font-size: .82rem; color: var(--muted); }
@media (max-width: 600px) { .hero { padding: 40px 0; } .hero-stats { grid-template-columns: 1fr 1fr; } .hero-search .btn { display: none; } }
.live-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); z-index: 20; text-align: left; padding: 6px; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-hd h2 { margin: 0; display: flex; align-items: center; gap: 10px; } .sec-hd h2 small { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--bg2); padding: 2px 8px; border-radius: 999px; } .sec-hd a { font-weight: 600; font-size: .92rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool-grid.compact { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tool-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text) !important; font-weight: 600; font-size: .93rem; line-height: 1.3; text-decoration: none !important; transition: transform .12s, box-shadow .15s, border-color .15s; min-height: 62px; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--pri) 40%, var(--line)); }
.tc-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, var(--card)); color: var(--c); font-size: 1.05rem; }
.compact .tool-card { padding: 8px 10px; min-height: 50px; font-size: .88rem; } .compact .tc-ico { width: 32px; height: 32px; font-size: .92rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card { display: flex; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text) !important; text-decoration: none !important; transition: .15s; position: relative; overflow: hidden; }
.cat-card::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); opacity: 0; transition: .15s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--sh); } .cat-card:hover::after { opacity: 1; }
.cat-ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 13px; background: color-mix(in srgb, var(--c) 13%, var(--card)); color: var(--c); font-size: 1.3rem; }
.cat-ico.big { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 16px; }
.cat-txt { display: grid; gap: 2px; } .cat-txt small { color: var(--c); font-weight: 700; } .cat-txt em { font-style: normal; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; } .feat i { font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; display: inline-block; } .feat p { color: var(--text2); margin: 0; font-size: .93rem; }
.seo-text { color: var(--text2); } .seo-text h2 { color: var(--text); }
.ad-slot { margin: 24px auto; min-height: 90px; text-align: center; }

/* ---------- page headers ---------- */
.page-hd { padding: 26px 0 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--pri) 6%, var(--bg)), var(--bg)); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-hd p { color: var(--text2); max-width: 820px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--pri); } .crumbs i { font-size: .6rem; opacity: .6; } .crumbs span { color: var(--text2); font-weight: 600; }
.cat-title { display: flex; gap: 18px; align-items: center; } .cat-title h1 { margin: 0 0 4px; } .cat-title h1 small { font-size: .9rem; color: var(--muted); font-weight: 600; } .cat-title p { margin: 0; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 2px 6px 2px 14px; max-width: 560px; }
.filter-bar i { color: var(--muted); } .filter-bar input { border: 0; box-shadow: none !important; background: transparent; } .filter-bar span { color: var(--muted); font-size: .82rem; white-space: nowrap; padding-right: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text2); font-size: .85rem; font-weight: 600; text-decoration: none !important; }
.chip i { color: var(--c, var(--pri)); } .chip small { color: var(--muted); } .chip:hover, .chip.on { border-color: var(--c, var(--pri)); color: var(--text); background: color-mix(in srgb, var(--c, var(--pri)) 9%, var(--card)); }
.cat-block { margin-bottom: 36px; } .hide-filter { display: none !important; }

/* ---------- tool page ---------- */
.tool-hd { padding: 22px 0 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--bg)), var(--bg)); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tool-title { display: flex; gap: 18px; align-items: flex-start; } .tt-txt { flex: 1; min-width: 0; }
.tool-title h1 { margin: 0 0 6px; } .tool-desc { color: var(--text2); margin: 0 0 12px; max-width: 760px; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-btns { display: flex; gap: 8px; }
.fav-btn.on { color: #f59e0b; border-color: #f59e0b; } .fav-btn.on i { color: #f59e0b; }
@media (max-width: 700px) { .tool-title { flex-wrap: wrap; } .tool-title .cat-ico.big { width: 52px; height: 52px; font-size: 1.4rem; } .tool-btns { width: 100%; } }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 1020px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
.tool-app { padding: 24px; min-height: 180px; }
.side-card h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; } .side-card p { color: var(--text2); font-size: .92rem; }
.side-list { list-style: none; padding: 0; margin: 0 0 10px; } .side-list li a { display: flex; gap: 10px; align-items: center; padding: 7px 4px; border-radius: 8px; color: var(--text); font-size: .92rem; font-weight: 500; }
.side-list li a:hover { background: var(--bg2); text-decoration: none; } .side-list i { width: 18px; text-align: center; } .side-card .more { font-weight: 600; font-size: .9rem; }
.sticky { position: sticky; top: calc(var(--hdr) + 16px); }
.formula-card h2 { font-size: 1.1rem; display: flex; gap: 8px; align-items: center; }
.formula { font-family: var(--mono); background: var(--bg2); border-left: 4px solid var(--pri); padding: 14px 16px; border-radius: 8px; white-space: pre-wrap; font-size: .92rem; overflow-x: auto; }

/* ---------- tool engine UI ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; align-content: start; } .field label { font-size: .86rem; }
.field-wide { grid-column: 1 / -1; } .field-wide textarea { min-height: 120px; }
.is-text .field-wide textarea { min-height: 170px; font-size: .95rem; }
.field-check { display: flex; align-items: center; gap: 10px; padding-top: 22px; } .field-check label { font-weight: 500; color: var(--text); cursor: pointer; }
.field textarea[name=code], textarea.code-in { font-family: var(--mono); font-size: 13px; }
.go-row { margin: 18px 0 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.text-tools { margin-top: 10px; } .text-stat { margin-left: auto; color: var(--muted); font-size: .85rem; }
.tool-result { margin-top: 18px; transition: opacity .15s; } .tool-result.loading { opacity: .5; }
.tool-result:empty { display: none; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.res-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; min-width: 0; }
.res-label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.res-val { font-size: 1.12rem; font-weight: 700; word-break: break-word; }
.res-main { grid-column: 1 / -1; background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 22px rgba(99,102,241,.3); padding: 16px 18px; }
.res-main .res-label { color: rgba(255,255,255,.85); } .res-main .res-val { font-size: clamp(1.4rem, 3.5vw, 2rem); }
.res-chart { margin: 16px 0; } .res-html { margin: 16px 0; overflow-x: auto; }
.res-note { color: var(--muted); font-size: .88rem; margin: 12px 0; } .res-note i { color: var(--pri); }
.res-table { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.res-table summary { cursor: pointer; font-weight: 700; padding: 4px; } .res-table summary small { color: var(--muted); font-weight: 500; } .res-table .btn { margin-top: 8px; }
.res-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.res-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--bg2); border-radius: 10px; border: 1px solid var(--line); }
.res-list li span { flex: 1; word-break: break-word; } .res-list .icon-btn { width: 32px; height: 32px; }
.out-area { font-family: var(--mono); font-size: 13.5px; background: var(--bg2); margin-top: 6px; }
pre.code, .code { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px; overflow: auto; max-height: 520px; white-space: pre; font-size: 13px; line-height: 1.55; margin: 10px 0; }
[data-theme="dark"] pre.code { background: #070b17; border: 1px solid var(--line); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); margin: 10px 0; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--bg2); font-weight: 700; font-size: .82rem; color: var(--text2); white-space: nowrap; position: sticky; top: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--pri) 4%, transparent); } .tbl tr:last-child td { border-bottom: 0; }
.tbl td { font-variant-numeric: tabular-nums; } .lookup-tool .tbl td { cursor: copy; }
.tbl-edit td { padding: 4px; } .tbl-edit input { border-color: transparent; background: transparent; min-height: 36px; padding: .35em .5em; } .tbl-edit input:focus { border-color: var(--pri2); background: var(--card); }
.tbl-edit td.c { text-align: center; vertical-align: middle; } .tbl-edit tfoot td { background: var(--bg2); padding: 9px 12px; }
.row-acts { display: inline-flex; gap: 2px; white-space: nowrap; } .row-acts .icon-btn { width: 32px; height: 32px; font-size: .85rem; }
.alert i { flex: none; }
/* charts */
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; } .donut ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.donut li { display: flex; align-items: center; gap: 8px; } .donut li i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; } .donut li b { margin-left: 4px; }
.bars { display: grid; gap: 8px; } .bar-row { display: grid; grid-template-columns: minmax(80px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .bar { height: 12px; background: var(--bg2); border-radius: 99px; overflow: hidden; } .bar-row .bar i { display: block; height: 100%; border-radius: 99px; }
/* list tool */
.list-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; }
.list-title { font-size: 1.25rem; font-weight: 800; border-color: transparent; background: transparent; padding-left: 4px; flex: 1; min-width: 220px; } .list-title:hover { border-color: var(--line); }
.progress { flex: 0 0 220px; height: 30px; background: var(--bg2); border-radius: 99px; position: relative; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--grad); transition: width .3s; } .progress span { position: relative; display: grid; place-items: center; height: 100%; font-size: .82rem; font-weight: 700; mix-blend-mode: normal; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.checklist li.done { background: var(--ok-soft); } .checklist li.done .item-text { text-decoration: line-through; color: var(--muted); }
.item-text { border-color: transparent; background: transparent; min-height: 36px; padding: .3em .4em; } .item-text:focus { background: var(--card); }
.list-add { display: flex; gap: 8px; margin-top: 12px; }
/* file tool */
.dropzone { display: grid; place-items: center; gap: 8px; text-align: center; border: 2px dashed var(--line2); border-radius: var(--r); padding: 38px 20px; cursor: pointer; background: var(--bg2); transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--pri); background: var(--pri-soft); }
.dropzone i.big, .dropzone > i { font-size: 2.4rem; color: var(--pri); } .dropzone b { font-size: 1.05rem; } .dropzone small { color: var(--muted); }
.dropzone.has { padding: 18px; }
.file-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.file-list li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; } .file-list li small { color: var(--muted); } .file-list li > i { color: var(--pri); }
.file-tool .fields { margin-top: 16px; }
.file-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.file-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); display: grid; gap: 8px; align-content: start; }
.file-card img { width: 100%; max-height: 220px; object-fit: contain; background: repeating-conic-gradient(var(--bg2) 0 25%, var(--card) 0 50%) 0 0 / 16px 16px; border-radius: 8px; }
.file-ico { font-size: 2.6rem; color: var(--err); text-align: center; padding: 10px; } .file-meta { display: grid; min-width: 0; } .file-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; } .file-meta small { color: var(--muted); }
.file-card .btn-row { margin: 0; }
.lookup-q { font-size: 1.05rem; margin-bottom: 8px; }
/* canvas-based widgets */
.pdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.pdf-thumb { position: relative; border: 2px solid var(--line); border-radius: 10px; background: var(--card); padding: 6px; cursor: grab; text-align: center; user-select: none; transition: border-color .15s, opacity .15s; }
.pdf-thumb canvas, .pdf-thumb img { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15); background: #fff; }
.pdf-thumb .pn { font-size: .8rem; color: var(--muted); display: block; margin-top: 4px; } .pdf-thumb.sel { border-color: var(--pri); } .pdf-thumb.del { opacity: .35; } .pdf-thumb.drag { opacity: .4; } .pdf-thumb.over { border-color: var(--acc); }
.pdf-thumb .th-acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 3px; opacity: 0; transition: .15s; } .pdf-thumb:hover .th-acts, .pdf-thumb:focus-within .th-acts { opacity: 1; }
.th-acts button { width: 28px; height: 28px; border-radius: 7px; border: 0; background: rgba(15,23,42,.8); color: #fff; cursor: pointer; font-size: .8rem; }
.pdf-stage { position: relative; display: inline-block; margin: 0 auto; box-shadow: var(--sh-lg); background: #fff; touch-action: none; }
.pdf-stage canvas { display: block; } .stage-wrap { overflow: auto; max-height: 78vh; background: var(--bg2); border-radius: 12px; padding: 16px; text-align: center; border: 1px solid var(--line); }
.pdf-stage .ov { position: absolute; border: 2px dashed var(--pri); cursor: move; touch-action: none; }
.pdf-stage .ov img { width: 100%; height: 100%; display: block; pointer-events: none; } .pdf-stage .ov .txt { white-space: pre; pointer-events: none; line-height: 1.15; }
.pdf-stage .ov .h { position: absolute; right: -8px; bottom: -8px; width: 16px; height: 16px; background: var(--pri); border-radius: 50%; cursor: nwse-resize; border: 2px solid #fff; }
.pdf-stage .ov .x { position: absolute; right: -10px; top: -10px; width: 22px; height: 22px; background: var(--err); color: #fff; border-radius: 50%; border: 0; cursor: pointer; font-size: 12px; line-height: 22px; padding: 0; }
.pdf-stage .rd { position: absolute; background: rgba(0,0,0,.85); border: 1px solid #000; } .pdf-stage .rd.hl { background: rgba(250,204,21,.4); border: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: var(--bg2); border-radius: 12px; margin-bottom: 12px; border: 1px solid var(--line); }
.toolbar .sep { width: 1px; align-self: stretch; background: var(--line2); margin: 0 4px; } .toolbar input[type=color] { width: 42px; height: 36px; min-height: 0; } .toolbar select, .toolbar input[type=number] { width: auto; min-height: 36px; padding: 4px 28px 4px 8px; }
.toolbar .btn.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.sig-pad { width: 100%; height: 220px; border: 2px dashed var(--line2); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; font: 600 .92rem var(--font); color: var(--text2); border-bottom: 3px solid transparent; cursor: pointer; text-decoration: none !important; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.on, .tabs button.on, .tabs a:hover, .tabs button:hover { color: var(--pri); border-bottom-color: var(--pri); }
/* calculators & widgets */
.calc { max-width: 460px; margin: 0 auto; background: #0f172a; border-radius: 22px; padding: 18px; box-shadow: var(--sh-lg); }
.calc-screen { background: #1e293b; color: #f8fafc; border-radius: 14px; padding: 12px 16px; text-align: right; margin-bottom: 14px; min-height: 92px; display: grid; align-content: end; }
.calc-expr { font-family: var(--mono); color: #94a3b8; font-size: .92rem; min-height: 1.4em; word-break: break-all; } .calc-out { font-size: 2.1rem; font-weight: 700; word-break: break-all; line-height: 1.2; }
.calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; } .calc-keys.std { grid-template-columns: repeat(4, 1fr); }
.calc-keys button { height: 50px; border-radius: 12px; border: 0; font: 600 1.05rem var(--font); background: #334155; color: #f1f5f9; cursor: pointer; transition: filter .1s, transform .05s; }
.calc-keys button:hover { filter: brightness(1.15); } .calc-keys button:active { transform: scale(.96); }
.calc-keys .fn { background: #1e293b; color: #a5b4fc; font-size: .9rem; } .calc-keys .op { background: #4f46e5; } .calc-keys .eq { background: linear-gradient(135deg, #6366f1, #ec4899); } .calc-keys .clr { background: #be123c; }
.calc-hist { margin-top: 12px; max-height: 160px; overflow: auto; font-family: var(--mono); font-size: .85rem; color: #94a3b8; } .calc-hist div { padding: 4px 6px; cursor: pointer; border-radius: 6px; } .calc-hist div:hover { background: #1e293b; color: #fff; }
.calc-mode { display: flex; gap: 6px; margin-bottom: 10px; } .calc-mode button { background: #1e293b; color: #cbd5e1; border: 0; border-radius: 8px; padding: 4px 10px; font-size: .8rem; cursor: pointer; } .calc-mode button.on { background: #4f46e5; color: #fff; }
.uc-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; } .uc-swap { margin-bottom: 2px; }
@media (max-width: 640px) { .uc-row { grid-template-columns: 1fr; } }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cal-month { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card); break-inside: avoid; } .cal-month h4 { text-align: center; margin: 0 0 8px; color: var(--pri); }
.cal-month table { width: 100%; border-collapse: collapse; text-align: center; font-size: .85rem; } .cal-month th { color: var(--muted); font-size: .72rem; padding: 3px 0; } .cal-month td { padding: 5px 0; border-radius: 6px; }
.cal-month td.we { color: var(--err); } .cal-month td.today { background: var(--pri); color: #fff; font-weight: 700; } .cal-month td.hol { background: color-mix(in srgb, var(--acc) 15%, transparent); font-weight: 700; }
.wheel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; } @media (max-width: 760px) { .wheel-wrap { grid-template-columns: 1fr; } }
.wheel-box { position: relative; max-width: 520px; margin: 0 auto; width: 100%; } .wheel-box canvas { width: 100%; height: auto; display: block; }
.wheel-ptr { position: absolute; top: 50%; right: -6px; transform: translateY(-50%); width: 0; height: 0; border-top: 16px solid transparent; border-bottom: 16px solid transparent; border-right: 30px solid var(--text); filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.wheel-win { text-align: center; font-size: 1.6rem; font-weight: 800; margin: 14px 0; min-height: 1.4em; }
.md-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .md-wrap textarea { min-height: 460px; font-family: var(--mono); font-size: 13.5px; } .md-wrap .md-preview { min-height: 460px; max-height: 70vh; overflow: auto; }
@media (max-width: 760px) { .md-wrap { grid-template-columns: 1fr; } }
.md-preview { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: var(--card); }
.md-preview pre { background: var(--bg2); padding: 12px; border-radius: 8px; overflow: auto; } .md-preview table { border-collapse: collapse; } .md-preview td, .md-preview th { border: 1px solid var(--line); padding: 6px 10px; } .md-preview blockquote { border-left: 4px solid var(--pri); margin: 0; padding: 4px 14px; color: var(--text2); } .md-preview img { max-width: 100%; }
.rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; } .rx-grid .card { margin: 0; padding: 16px; } .rx-grid table { width: 100%; font-size: .88rem; border-collapse: collapse; } .rx-grid td { padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: top; } .rx-grid td:first-child { font-family: var(--mono); color: var(--pri); white-space: nowrap; cursor: copy; font-weight: 600; }
.rx-test { display: grid; grid-template-columns: 1fr 120px; gap: 10px; } .rx-out mark { background: #fde68a; color: #000; border-radius: 3px; padding: 0 1px; }
/* generator / result visuals */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.sw { height: 86px; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; cursor: copy; display: flex; align-items: flex-end; padding: 0; overflow: hidden; } .sw span { width: 100%; background: rgba(255,255,255,.88); color: #111; font: 600 .78rem var(--mono); padding: 5px; text-align: center; }
.color-preview { height: 110px; border-radius: 14px; display: grid; place-items: center; font: 700 1.4rem var(--mono); border: 1px solid var(--line); }
.grad-bar { height: 50px; border-radius: 12px; margin: 10px 0; }
.css-stage { display: grid; place-items: center; min-height: 220px; background: repeating-conic-gradient(var(--bg2) 0 25%, var(--card) 0 50%) 0 0 / 22px 22px; border-radius: 14px; padding: 30px; border: 1px solid var(--line); }
.css-demo { width: 200px; height: 130px; display: grid; place-items: center; background: #6366f1; color: #fff; font-weight: 700; } .css-demo.wide { width: 100%; max-width: 520px; height: 180px; }
.glass-bg { background: linear-gradient(135deg, #f43f5e, #6366f1 50%, #06b6d4); } .filter-demo { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 130'%3E%3Crect width='200' height='130' fill='%2338bdf8'/%3E%3Ccircle cx='150' cy='35' r='20' fill='%23fde047'/%3E%3Cpath d='M0 130 60 50l40 45 30-30 70 65z' fill='%2316a34a'/%3E%3C/svg%3E") center/cover; }
.grid-demo, .flex-demo { display: grid; background: var(--bg2); border-radius: 12px; padding: 12px; min-height: 200px; border: 1px solid var(--line); } .flex-demo { display: flex; }
.grid-demo i, .flex-demo i { font-style: normal; background: var(--grad); color: #fff; border-radius: 8px; display: grid; place-items: center; min-width: 44px; min-height: 40px; font-weight: 700; }
.contrast-demo { padding: 20px; border-radius: 12px; margin: 10px 0; border: 1px solid var(--line); }
.cb-grid { display: grid; gap: 6px; } .cb-row { display: flex; align-items: center; gap: 6px; } .cb-row span { width: 150px; font-size: .85rem; font-weight: 600; flex: none; } .cb-row i { flex: 1; height: 36px; border-radius: 6px; }
.json-tree { font-family: var(--mono); font-size: 13px; background: var(--bg2); border-radius: 10px; padding: 12px 16px; overflow: auto; max-height: 560px; border: 1px solid var(--line); }
.json-tree details { margin-left: 2px; } .json-tree summary { cursor: pointer; color: var(--muted); } .j-tree { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line2); } .j-key { color: #7c3aed; } [data-theme="dark"] .j-key { color: #c4b5fd; }
.j-str { color: #059669; } .j-num { color: #d97706; } .j-bool { color: #2563eb; } .j-null { color: var(--muted); }
.res-html ins, .diff ins { display: block; background: #dcfce7; color: #14532d; text-decoration: none; padding: 0 6px; } .res-html del, .diff del { display: block; background: #fee2e2; color: #7f1d1d; padding: 0 6px; }
.res-html pre > span { display: block; padding: 0 6px; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; margin: 8px 0 16px; }
.sym-grid button { height: 46px; font-size: 1.35rem; border: 1px solid var(--line); background: var(--card); border-radius: 9px; cursor: copy; color: var(--text); } .sym-grid button:hover { border-color: var(--pri); background: var(--pri-soft); }
.sym-h { margin: 14px 0 6px; }
.big-emoji { font-size: 4.5rem; text-align: center; line-height: 1.2; margin: 10px 0; } .big-emoji.coin { width: 130px; height: 130px; margin: 12px auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fde68a, #d97706); color: #7c2d12; font-weight: 900; font-size: 3.4rem; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), 0 8px 24px rgba(217,119,6,.35); animation: flip .6s ease; }
@keyframes flip { from { transform: rotateY(720deg) scale(.6); } to { transform: none; } }
.qr-out { display: grid; justify-items: center; gap: 8px; padding: 16px; background: #fff; border-radius: 14px; border: 1px solid var(--line); } .qr-out img { image-rendering: pixelated; max-width: 280px; height: auto; }
.svg-out { display: grid; place-items: center; padding: 16px; background: var(--bg2); border-radius: 12px; } .svg-out svg { max-width: 320px; height: auto; }
.serp { font-family: Arial, sans-serif; max-width: 600px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.serp-url { color: #202124; font-size: 14px; } .serp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 4px 0; } .serp-desc { color: #4d5156; font-size: 14px; line-height: 1.58; }
.og-card { max-width: 520px; border: 1px solid #dadde1; border-radius: 12px; overflow: hidden; background: #fff; color: #1d2129; } .og-img { height: 260px; background: #e4e6eb center/cover no-repeat; } .og-card.small { display: flex; } .og-card.small .og-img { width: 140px; height: 140px; flex: none; }
.og-body { padding: 10px 14px; background: #f2f3f5; display: grid; gap: 2px; } .og-body small { text-transform: uppercase; color: #606770; font-size: 12px; } .og-body b { font-size: 16px; } .og-body span { color: #606770; font-size: 14px; }
.print-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; background: #fff; color: #111; aspect-ratio: 85 / 55; display: flex; flex-direction: column; break-inside: avoid; }
.pcard-h { background: var(--grad); color: #fff; font-weight: 800; padding: 8px 14px; letter-spacing: .06em; font-size: .9rem; } .pcard-name { font-size: 1.3rem; font-weight: 800; padding: 8px 14px 2px; }
.pcard-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 14px; font-size: .85rem; } .pcard-row span { color: #555; }
.print-cards .badge { display: grid; justify-items: center; gap: 4px; padding: 16px; border-radius: 12px; background: #fff; color: #111; border: 1px solid #ddd; font-size: 1rem; text-align: center; }
.badge-name { font-size: 1.8rem; font-weight: 800; } .print-cards .badge span { color: #fff; padding: 3px 12px; border-radius: 999px; font-size: .85rem; }
.bingo-wrap { display: flex; flex-wrap: wrap; gap: 16px; } .bingo { border-collapse: collapse; background: #fff; color: #111; break-inside: avoid; } .bingo th { background: #4f46e5; color: #fff; width: 48px; height: 40px; font-size: 1.2rem; } .bingo td { border: 2px solid #334155; width: 48px; height: 48px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.tambola td { width: 42px; height: 42px; } .tambola td:empty { background: #e0e7ff; }
.plates { display: flex; flex-wrap: wrap; gap: 12px; } .plate { background: #fff; color: #111; border: 3px solid #111; border-radius: 8px; padding: 8px 16px; font: 800 1.5rem var(--mono); letter-spacing: .08em; cursor: copy; } .plate.uk { background: #facc15; }
.stubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.stub { display: flex; border: 2px dashed #94a3b8; border-radius: 12px; overflow: hidden; background: #fff; color: #111; break-inside: avoid; } .stub > div { padding: 12px; display: grid; gap: 2px; } .stub > div:first-child { flex: 1; } .stub small { color: #555; }
.stub-no { background: #eef2ff; border-left: 2px dashed #94a3b8; text-align: center; font-weight: 800; min-width: 100px; place-content: center; }
.token-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; } .token-grid span { border: 2px dashed var(--line2); border-radius: 10px; text-align: center; padding: 14px 4px; font: 800 1.15rem var(--mono); background: var(--card); }
.seat-front { text-align: center; background: var(--grad); color: #fff; padding: 6px; border-radius: 8px; font-weight: 700; letter-spacing: .1em; margin-bottom: 12px; }
.seat-grid { display: grid; gap: 6px; } .seat { border: 1px solid var(--line2); border-radius: 8px; padding: 8px 4px; text-align: center; font-size: .82rem; font-weight: 600; background: var(--card); display: grid; } .seat em { color: var(--muted); font-weight: 400; } .seat small { color: var(--muted); font-size: .68rem; }
.tag-card { width: 220px; border: 2px solid #111; border-radius: 12px 12px 12px 12px; padding: 18px; display: grid; gap: 4px; background: #fff; color: #111; text-align: center; position: relative; } .tag-card s { color: #777; } .tag-card strong { font-size: 1.8rem; color: #dc2626; }
.att-sheet th, .att-sheet td { text-align: center; padding: 6px; font-size: .8rem; } .att-sheet td:nth-child(2) { text-align: left; white-space: nowrap; }
.clock-big { font: 800 clamp(2.4rem, 8vw, 4.5rem) var(--mono); text-align: center; letter-spacing: .02em; }

/* ---------- prose (blog & info) ---------- */
.prose { font-size: 1.04rem; line-height: 1.75; } .prose h2 { margin-top: 1.8em; } .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; } .prose li { margin: .35em 0; } .prose .lead { font-size: 1.15rem; color: var(--text2); }
.prose img { border-radius: 12px; } .prose table { font-size: .95rem; }
.steps { counter-reset: s; list-style: none; padding-left: 0 !important; } .steps li { counter-increment: s; position: relative; padding-left: 44px; margin: 12px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin: 10px 0; background: var(--card); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; } .faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--pri); } .faq details[open] summary::after { content: '−'; } .faq details p { color: var(--text2); }
.cta-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px; margin: 24px 0; border-radius: var(--r); background: color-mix(in srgb, var(--pri) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--pri) 20%, transparent); } .cta-box span { color: var(--muted); font-size: .9rem; }
.note-box { background: var(--bg2); padding: 12px 16px; border-radius: 10px; }
.rel-links { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; } .rel-links a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: .92rem; }
.cols2 { columns: 2; } @media (max-width: 600px) { .cols2 { columns: 1; } }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-top: 24px; } @media (max-width: 1020px) { .blog-layout { grid-template-columns: minmax(0, 1fr); } }
.post { max-width: 800px; } .post-hd h1 { margin: 12px 0; font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.02em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .9rem; margin-bottom: 20px; } .post-meta i { margin-right: 4px; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin: 10px 0 24px; } .toc summary { cursor: pointer; font-weight: 700; } .toc ol { margin: 10px 0 0; padding-left: 1.3em; columns: 2; font-size: .92rem; } @media (max-width: 600px) { .toc ol { columns: 1; } }
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 30px 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.share-row a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--bg2); color: var(--text2); font-size: 1.05rem; } .share-row a:hover { background: var(--pri); color: #fff; }
.post-side .side-card { text-align: center; } .post-side .cat-ico { margin: 0 auto 10px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: .15s; } .post-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.pc-top { height: 110px; display: grid; place-items: center; font-size: 2.4rem; color: #fff !important; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0f172a)); text-decoration: none !important; }
.pc-body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; align-content: start; } .pc-cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pc-body h3 { margin: 0; font-size: 1.05rem; } .pc-body h3 a { color: var(--text); } .pc-body p { color: var(--text2); font-size: .9rem; margin: 0; } .pc-body time { color: var(--muted); font-size: .8rem; margin-top: auto; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 32px 0; }
.pg { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; text-decoration: none !important; } .pg:hover { border-color: var(--pri); } .pg.cur { background: var(--grad); color: #fff; border-color: transparent; } .pg-gap { align-self: center; color: var(--muted); }

/* ---------- auth / account / admin ---------- */
.auth-wrap { min-height: calc(100vh - var(--hdr) - 200px); display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(700px 300px at 50% 0%, color-mix(in srgb, var(--pri) 12%, transparent), transparent); }
.auth-card { width: min(440px, 100%); padding: 32px; } .auth-card h1 { font-size: 1.6rem; text-align: center; margin: 10px 0 4px; } .auth-card > p { text-align: center; } .auth-logo { text-align: center; } .auth-logo svg { width: 52px; height: 52px; }
.auth-alt { text-align: center; margin: 16px 0 0; font-size: .92rem; }
.acct-hd { display: flex; align-items: center; gap: 18px; } .acct-hd h1 { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; } .stat b { font-size: 1.6rem; font-weight: 800; } .stat span { color: var(--muted); font-size: .85rem; }
.tab-pane h2 { font-size: 1.2rem; display: flex; gap: 10px; align-items: center; } .tab-pane { scroll-margin-top: calc(var(--hdr) + 60px); }
.fav-item { position: relative; } .fav-item .fav-btn { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); }
.acts form { display: flex; flex-wrap: wrap; gap: 4px; } .msg { border-bottom: 1px solid var(--line); padding: 14px 0; } .msg.unread { border-left: 4px solid var(--pri); padding-left: 12px; } .msg p { margin: 8px 0; } .msg form { display: flex; gap: 6px; }
.admin-page .bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; } .admin-page .bar { flex: 1; display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; } .admin-page .bar span { align-self: end; background: var(--grad); border-radius: 4px 4px 0 0; min-height: 2px; } .admin-page .bar small { font-size: .65rem; color: var(--muted); }
.err-page { text-align: center; padding: 60px 20px; } .err-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; } .err-page .hero-search { margin: 20px auto 30px; } .err-page .tool-grid { text-align: left; margin-bottom: 30px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 70px; background: var(--card); border-top: 1px solid var(--line); padding: 44px 0 0; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; } .foot h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.foot a { display: block; color: var(--text2); font-size: .92rem; padding: 3px 0; } .foot-brand p { color: var(--text2); font-size: .92rem; margin: 12px 0; }
.social { display: flex; gap: 8px; } .social a { width: 38px; height: 38px; display: grid !important; place-items: center; border-radius: 10px; background: var(--bg2); font-size: 1.05rem; }
.copy { border-top: 1px solid var(--line); margin-top: 30px; padding: 18px 20px; color: var(--muted); font-size: .85rem; text-align: center; }
@media (max-width: 800px) { .foot { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--sh-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 100; font-weight: 600; font-size: .92rem; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } [data-theme="dark"] .toast { background: #e5e7f0; color: #0f172a; }

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .tool-side, .tool-actions, .go-row, .btn-row, .no-print, .ad-slot, .crumbs, .tool-btns, .tool-info, .formula-card, .search-modal, .toast, .list-add, .text-tools, .file-tool .dropzone, .tool-meta, .share-row, .post-side, .toc, .fields, .tabs { display: none !important; }
  .tool-hd { background: none; border: 0; padding: 0; margin: 0 0 8px; } .tool-hd .cat-ico, .tool-desc { display: none; }
  .card, .tool-app { box-shadow: none; border: 0; padding: 0; } .container { max-width: none; padding: 0; }
  .tool-layout { display: block; } .res-main { background: #eef2ff !important; color: #000 !important; box-shadow: none; } .res-main .res-label { color: #333 !important; }
  .tbl th { position: static; } .checklist li { break-inside: avoid; border-color: #999; } .list-title { border: 0; } .progress { display: none; }
  .print-cards, .stubs, .bingo-wrap, .token-grid { gap: 6mm; } a { color: #000; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.brand em { font-style: normal; }

/* ---------- admin: categories, custom tools, team ---------- */
.tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.role-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:.78rem;font-weight:600;color:var(--c);background:color-mix(in srgb,var(--c) 12%,transparent);border:1px solid color-mix(in srgb,var(--c) 30%,transparent);white-space:nowrap}
.icon-field{display:flex;gap:8px;align-items:center}.icon-field input{flex:1}
.icon-prev{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:var(--pri-soft);color:var(--pri);font-size:1.2rem;flex:none}
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:6px;margin:8px 0 4px;max-height:132px;overflow:auto;padding:2px}
.icon-opt{height:38px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--text2);cursor:pointer}.icon-opt:hover,.icon-opt.on{border-color:var(--pri);color:var(--pri);background:var(--pri-soft)}
.kind-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.kind-card{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid var(--line);border-radius:var(--r);background:var(--bg2);color:var(--text);text-decoration:none;transition:.15s}.kind-card:hover{border-color:var(--pri);transform:translateY(-2px);box-shadow:var(--sh)}
.kind-card i{font-size:1.5rem;color:var(--pri)}.kind-card span{color:var(--muted);font-size:.86rem;line-height:1.45}
.edit-tbl td{padding:4px}.edit-tbl input,.edit-tbl select{width:100%;min-width:90px;padding:7px 8px;font-size:.88rem}
.edit-tbl .w-s{min-width:70px;max-width:110px}.edit-tbl .w-xs{min-width:56px;max-width:70px}
.w-m{max-width:170px}
.inline-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.inline-form select,.inline-form input{padding:6px 8px;font-size:.85rem}
.quick-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.perm-tbl td.c,.perm-tbl th{text-align:center}.perm-tbl td:first-child{text-align:left}
.role-desc p{margin:6px 0;font-size:.9rem;color:var(--text2)}
.tool-editor h4{margin:14px 0 6px}.tool-editor hr,.card.form hr{border:0;border-top:1px solid var(--line);margin:16px 0}
