/* Live Life Happy — /tools/ styles (v2). Loaded after main.min.css; reuses its variables. */

/* ── poster fonts (self-hosted, latin subsets) ────────────── */
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/qm/playfair-500.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 500; font-display: swap; src: url('/assets/fonts/qm/playfair-500i.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/qm/caveat-500.woff2') format('woff2'); }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/qm/bebas-400.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/qm/montserrat-500.woff2') format('woff2'); }
@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/qm/specialelite-400.woff2') format('woff2'); }

/* ── collapse unfilled AdSense units (Google-documented method) ── */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.google-auto-placed:has(> ins[data-ad-status="unfilled"]) { display: none; }

/* ── shared page bits ─────────────────────────────────────── */
.tool-hero { padding: 44px var(--px) 8px; max-width: var(--max); margin: 0 auto; }
.tool-hero .breadcrumb { margin-bottom: 14px; }
.tool-h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.5vw, 44px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.01em; }
.tool-sub { font-family: var(--sans); font-size: clamp(15px, 2vw, 17px); line-height: 1.65; color: var(--ink2); max-width: 640px; margin: 0 0 6px; }
.tool-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; }
.tool-trust li { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--ink3); letter-spacing: 0.04em; display: flex; align-items: center; gap: 6px; }
.tool-trust li::before { content: "✓"; color: var(--ink); font-weight: 600; }

/* ── maker layout ─────────────────────────────────────────── */
.qm { max-width: var(--max); margin: 22px auto 0; padding: 0 var(--px); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .qm { grid-template-columns: 1fr; gap: 18px; } }

.qm-stage { position: sticky; top: 76px; }
@media (max-width: 900px) { .qm-stage { position: static; } }
.qm-canvas-wrap { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: clamp(12px, 3vw, 28px); display: flex; align-items: center; justify-content: center; min-height: 300px; }
#qmCanvas { max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.10); }
.qm-stage-actions { display: flex; gap: 10px; margin-top: 14px; }
.qm-stage-actions .qm-btn { flex: 1; }

.qm-panel { display: flex; flex-direction: column; gap: 18px; }
.qm-field label, .qm-group > span.qm-label { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink3); margin-bottom: 8px; }
.qm-field textarea, .qm-field input[type="text"] { width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; outline: none; transition: border-color 0.15s var(--ease); }
.qm-field textarea:focus, .qm-field input[type="text"]:focus { border-color: var(--ink3); }
.qm-field textarea { min-height: 96px; resize: vertical; }

.qm-quick { display: flex; gap: 10px; }
.qm-quick .qm-btn { flex: 1; }

.qm-btn { font-family: var(--sans); font-size: 14px; font-weight: 500; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: all 0.15s var(--ease); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.qm-btn:hover { border-color: var(--ink3); transform: translateY(-1px); }
.qm-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; padding: 14px 20px; font-size: 15px; }
.qm-btn.primary:hover { background: #262626; }
.qm-btn svg { width: 17px; height: 17px; }

.qm-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qm-swatch { position: relative; border: 2px solid var(--line); border-radius: 8px; height: 62px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; transition: all 0.15s var(--ease); overflow: hidden; }
.qm-swatch span { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 19px; line-height: 1; }
.qm-swatch em { position: absolute; bottom: 3px; font-family: var(--sans); font-style: normal; font-size: 8.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(128,128,128,0.95); background: rgba(255,255,255,0.72); padding: 1px 5px; border-radius: 4px; }
.qm-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.qm-fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qm-font { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 4px 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all 0.15s var(--ease); }
.qm-font b { font-weight: normal; font-size: 20px; line-height: 1.1; color: var(--ink); }
.qm-font em { font-family: var(--sans); font-style: normal; font-size: 8.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink3); }
.qm-font.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qm-font:hover { border-color: var(--ink3); }
.qm-f-fraunces b { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 300; }
.qm-f-playfair b { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; }
.qm-f-inter b { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 17px; }
.qm-f-montserrat b { font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 17px; }
.qm-f-caveat b { font-family: 'Caveat', cursive; font-weight: 500; font-size: 23px; }
.qm-f-bebas b { font-family: 'Bebas Neue', sans-serif; font-size: 21px; }
.qm-f-elite b { font-family: 'Special Elite', monospace; font-size: 17px; }

.qm-aligns { display: flex; gap: 8px; }
.qm-align { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink2); transition: all 0.15s var(--ease); }
.qm-align svg { width: 16px; height: 16px; }
.qm-align.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--ink); }
.qm-align:hover { border-color: var(--ink3); }

.qm-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qm-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 10px; text-align: left; cursor: pointer; transition: all 0.15s var(--ease); font-family: var(--sans); }
.qm-chip strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.qm-chip span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 1px; }
.qm-chip.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qm-chip:hover { border-color: var(--ink3); }

.qm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qm-row label.inline { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 13.5px; color: var(--ink2); cursor: pointer; margin: 0; }
.qm-row input[type="range"] { flex: 1; accent-color: var(--ink); }
.qm-row input[type="checkbox"] { accent-color: var(--ink); width: 16px; height: 16px; }
.qm-hint { font-family: var(--sans); font-size: 12px; color: var(--ink3); line-height: 1.5; margin: 4px 0 0; }

/* ── library modal ────────────────────────────────────────── */
.qm-lib { position: fixed; inset: 0; background: rgba(13,13,13,0.45); display: none; z-index: 300; padding: 4vh var(--px); }
.qm-lib.open { display: flex; align-items: flex-start; justify-content: center; }
.qm-lib-box { background: var(--surface); border-radius: 14px; width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.25); }
.qm-lib-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.qm-lib-head h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0; flex: 1; }
.qm-lib-search { padding: 12px 18px; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 8px; }
.qm-lib-search input { width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: 15px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; outline: none; }
.qm-lib-search input:focus { border-color: var(--ink3); }
#qmLibFull { align-self: flex-start; font-size: 12.5px; padding: 7px 12px; }
.qm-lib-list { overflow-y: auto; padding: 8px 10px 16px; }
.qm-lib-item { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line2); padding: 12px 10px; cursor: pointer; border-radius: 6px; }
.qm-lib-item:hover { background: var(--surface2); }
.qm-lib-text { display: block; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 16px; line-height: 1.45; color: var(--ink); }
.qm-lib-author { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--ink3); margin-top: 4px; }
.qm-lib-empty { font-family: var(--sans); font-size: 14px; color: var(--ink3); padding: 18px 10px; }
.qm-lib-close { background: none; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; font-size: 17px; cursor: pointer; color: var(--ink2); line-height: 1; }

/* ── content sections below the tool ──────────────────────── */
.tool-section { max-width: 800px; margin: 0 auto; padding: 40px var(--px) 8px; }
.tool-section h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 3vw, 30px); margin: 24px 0 10px; }
.tool-section h3 { font-family: var(--sans); font-size: 17px; margin: 22px 0 6px; }
.tool-section p, .tool-section li { font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--ink2); }
.tool-section p { margin: 0 0 14px; }
.tool-steps { counter-reset: step; list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 12px; }
.tool-steps li { position: relative; padding: 16px 18px 16px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tool-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--sans); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.tool-links a { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink2); border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px; text-decoration: none; transition: all 0.15s var(--ease); background: var(--surface); }
.tool-links a:hover { border-color: var(--ink3); color: var(--ink); }

/* ── hub cards ────────────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; max-width: var(--max); margin: 26px auto 0; padding: 0 var(--px); }
.hub-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; text-decoration: none; transition: all 0.18s var(--ease); }
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); border-color: var(--ink4); }
.hub-card .hc-kicker { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); }
.hub-card h2, .hub-card h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; color: var(--ink); margin: 8px 0 6px; }
.hub-card p { font-family: var(--sans); font-size: 13.5px; line-height: 1.6; color: var(--ink2); margin: 0; }
.hub-card .hc-cta { display: inline-block; margin-top: 12px; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink); }

/* ── quote of the day ─────────────────────────────────────── */
.qotd-card { max-width: 760px; margin: 26px auto 0; padding: clamp(34px, 6vw, 64px) clamp(22px, 5vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.qotd-quote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(22px, 3.6vw, 34px); line-height: 1.4; color: var(--ink); margin: 0; }
.qotd-author { font-family: var(--sans); font-size: 14.5px; color: var(--ink3); margin: 18px 0 0; }
.qotd-author a { color: inherit; }
.qotd-date { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink3); margin: 0 0 18px; }
.qotd-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.embed-box { background: #0D0D0D; color: #E8E8E8; border-radius: 10px; padding: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; position: relative; }
.embed-copy { position: absolute; right: 12px; top: 12px; }

/* ── random generator ─────────────────────────────────────── */
.rq-card { max-width: 760px; margin: 26px auto 0; padding: clamp(34px, 6vw, 64px) clamp(22px, 5vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-align: center; min-height: 180px; display: flex; flex-direction: column; justify-content: center; }
.rq-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
