/* Free tools under /tools/. Built on the tokens in css/styles.css. */
[data-for][hidden] { display: none; }

/* ---------- Shared ---------- */
.tool-hero { padding: 48px 0 28px; text-align: center; }
.tool-hero .h1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.04; margin: 0 0 14px; }
.tool-hero .h1 .pop { color: var(--green-2); }
.tool-hero p { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 640px; margin: 0 auto; font-weight: 500; }
.tool-main, .tool-final { padding: 0; }

.tool-card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); padding: 20px; }
.tool-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tool-pane { display: flex; flex-direction: column; min-width: 0; }
.tool-pane-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; min-height: 36px; margin-bottom: 8px; }
.tool-pane-head label, .ap-label { font-weight: 800; font-size: 15px; white-space: nowrap; }
.tool-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tool-link { background: none; border: 0; padding: 8px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--green-2); cursor: pointer; border-radius: 8px; }
.tool-link:hover { background: var(--green-tint); }
.tool-area { width: 100%; min-height: 280px; flex: 1; resize: vertical; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 14px; font: 500 16px/1.5 'Manrope', sans-serif; color: var(--ink); background: var(--bg); }
.tool-area:focus-visible { outline: 3px solid var(--green-pop); outline-offset: 1px; }
#rf-out { background: var(--paper); }

.tool-opts { border: 0; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; }
.tool-opts legend { font-weight: 800; font-size: 15px; padding: 0; margin-bottom: 6px; }
.tool-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.tool-opt input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--green-2); }

.tool-case, .ap-dest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.tool-case-label { font-weight: 800; font-size: 14.5px; margin-right: 4px; }
.tool-case label, .ap-dest label { cursor: pointer; }
.tool-case input, .ap-dest input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tool-case label span, .ap-dest label span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--paper); transition: background .12s ease; }
.tool-case label:hover span, .ap-dest label:hover span { background: var(--green-tint); }
.tool-case label input:checked + span, .ap-dest label input:checked + span { background: var(--ink); color: #fff; }
.tool-case input:focus-visible + span, .ap-dest input:focus-visible + span { outline: 3px solid var(--green-pop); outline-offset: 2px; }

.tool-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1.5px solid var(--line); }
.tool-result-text { min-width: 0; flex: 1 1 280px; }
.tool-counts { font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--ink-2); margin: 0; }
.tool-summary { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; min-height: 20px; }
.tool-copy { height: 52px; padding: 0 28px; font-size: 16px; font-weight: 800; }
.tool-copy[disabled], .tr-download[disabled], .tr-bar .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.tool-copy.is-copied, .uc-action.is-copied { background: var(--ink); color: #fff; }

.tool-cta { margin-top: 24px; padding: 26px 28px; background: var(--green-tint); border: 1.5px solid var(--ink); border-radius: 22px; transition: background .25s ease, box-shadow .25s ease; }
.tool-cta.is-ready { background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.tool-cta-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.tool-cta-copy { flex: 1 1 340px; min-width: 0; }
.tool-cta h2 { font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
.tool-cta p { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0; font-weight: 500; }
.tool-cta p a { color: var(--green-2); font-weight: 700; text-decoration: underline; }
.tool-cta.is-ready p a { color: var(--ink); }
.tool-cta .tool-fine { font-size: 13.5px; margin-top: 10px; }
.tool-cta-action { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 280px; }
.tool-qr { width: 164px; height: 164px; margin: 0; box-sizing: border-box; border: 1.5px solid var(--ink); border-radius: 12px; background: #fff; padding: 6px; }
.tool-qr-note { font-size: 12.5px; font-weight: 700; }
.tool-trust { font-size: 13.5px; font-weight: 800; color: var(--ink); text-align: center; }
.tool-cta .tool-proof { font-size: 13px; line-height: 1.4; font-weight: 700; color: var(--ink-2); text-align: center; margin: 2px 0 0; }
.tool-proof q { font-weight: 600; }

.tool-section { padding: 72px 0 0; }
.tool-section h2 { font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 14px; }
.tool-section > .container-narrow > p { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.tool-section > .container-narrow > p.tool-after { font-size: 15.5px; margin: 16px 0 0; }
.tool-after a { color: var(--green-2); font-weight: 700; text-decoration: underline; }
.tool-table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--paper); }
.tool-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.tool-table th, .tool-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tool-table tr:last-child td { border-bottom: 0; }
.tool-table th { font-weight: 800; background: var(--bg-2); }
.tool-table td:first-child { font-weight: 700; }
.tool-table a { color: var(--green-2); font-weight: 700; text-decoration: underline; }

.faq-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.faq-item { background: #fff; border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); }
.faq-item summary { font-weight: 800; font-size: 17px; cursor: pointer; list-style: none; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .sign, .uc-fixes summary .sign { font-size: 24px; font-weight: 400; color: var(--green-2); line-height: 1; flex-shrink: 0; transition: transform .2s ease; }
.faq-item[open] summary .sign, .uc-fixes[open] summary .sign { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 22px 20px; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); margin: 0; }

.tool-more { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-more a { display: block; padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; transition: transform .12s ease, box-shadow .12s ease; }
.tool-more a:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.tool-more b { display: block; font-weight: 800; font-size: 15.5px; margin-bottom: 4px; }
.tool-more span { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

.tool-final { margin: 72px 0; }

/* ---------- Hub ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.hub-card { display: flex; flex-direction: column; padding: 26px; border: 1.5px solid var(--ink); border-radius: 22px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink); transition: transform .14s ease, box-shadow .14s ease; }
.hub-card:hover { transform: translate(-3px, -3px) rotate(-0.5deg); box-shadow: 7px 7px 0 var(--ink); }
.hub-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 14px; margin-bottom: 18px; background: var(--paper); }
.hub-lime .hub-icon { background: var(--lime); }
.hub-sky .hub-icon { background: var(--sky); }
.hub-lilac .hub-icon { background: var(--lilac); }
.hub-peach .hub-icon { background: var(--peach); }
.hub-lemon .hub-icon { background: var(--lemon); }
.hub-card h2 { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 8px; }
.hub-card p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; flex: 1; }
.hub-go { font-weight: 800; font-size: 14px; color: var(--green-2); }

/* ---------- Clipboard Viewer ---------- */
.cv-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 22px; }
.cv-board { position: relative; background: var(--green); border: 1.5px solid var(--ink); border-radius: 26px; padding: 44px 22px 22px; box-shadow: 6px 6px 0 var(--ink); }
.cv-clip { position: absolute; top: -20px; left: 50%; width: 118px; height: 46px; margin-left: -59px; display: flex; align-items: center; justify-content: center; gap: 16px; background: var(--ink); border-radius: 12px 12px 16px 16px; }
.cv-clip::before { content: ''; position: absolute; top: -10px; left: 50%; width: 44px; height: 20px; margin-left: -22px; border: 5px solid var(--ink); border-bottom: 0; border-radius: 14px 14px 0 0; }
.cv-eye { position: relative; width: 16px; height: 16px; background: #fff; border-radius: 50%; animation: cv-blink 5s infinite; }
.cv-eye::after { content: ''; position: absolute; top: 5px; left: 5px; width: 7px; height: 7px; background: var(--ink); border-radius: 50%; }
.cv-paper { min-height: 320px; display: flex; background-color: #fff; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 32px; background-position: 0 44px; border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; }
.cv-empty, .cv-result { width: 100%; padding: 28px 24px; }
.cv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; }
.cv-kicker { font-family: 'Geist Mono', monospace; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.cv-show { height: 60px; padding: 0 32px; font-size: 18px; font-weight: 800; }
.cv-hint { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin: 0; max-width: 340px; }
.cv-manual { width: 100%; text-align: left; }
.cv-manual label, .uc-manual label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.cv-manual textarea, .uc-manual textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 12px; font: 500 16px/1.4 'Manrope', sans-serif; background: var(--bg); }
.cv-result { display: flex; flex-direction: column; gap: 14px; }
.cv-result[hidden], .cv-empty[hidden] { display: none; }
.cv-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cv-kind { padding: 4px 11px; background: var(--ink); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; }
.cv-count { font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--ink-2); }
.cv-content { max-height: 340px; overflow: auto; flex: 1; font-size: 18px; line-height: 32px; font-weight: 600; word-break: break-word; }
.cv-text { white-space: pre-wrap; }
.cv-content img { display: block; max-width: 100%; max-height: 280px; margin-bottom: 8px; border: 1.5px solid var(--ink); border-radius: 10px; }
.cv-reveal { align-self: flex-start; padding: 8px 14px; background: var(--lemon); border: 1.5px solid var(--ink); border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.cv-again { align-self: flex-start; padding-left: 0; }
.cv-board.is-reveal .cv-result { animation: cv-slide .42s cubic-bezier(.2,.9,.3,1.15); }
.cv-side { display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.cv-big { font-weight: 800; font-size: clamp(88px, 11vw, 148px); line-height: .9; letter-spacing: -0.05em; color: var(--green-2); margin: 0 0 8px; }
.cv-truth h2, .cv-extra h2 { font-weight: 800; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
.cv-truth p:not(.cv-big), .cv-extra p { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0; font-weight: 500; }
.cv-extra { padding: 20px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); animation: cv-slide .42s cubic-bezier(.2,.9,.3,1.15); }
.cv-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; }
.cv-tags li { padding: 5px 12px; background: var(--peach); border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 800; }
.cv-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.cv-tabs button { padding: 6px 12px; background: none; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cv-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cv-rich iframe { width: 100%; height: 180px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.cv-rich pre { max-height: 180px; overflow: auto; margin: 0; padding: 12px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; font: 12.5px/1.5 'Geist Mono', monospace; white-space: pre-wrap; word-break: break-all; }
@keyframes cv-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes cv-slide { from { transform: translateY(-14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Text Replacement Builder ---------- */
.tr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.tr-details, .tr-card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); padding: 22px; }
.tr-details h2 { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 4px; }
.tr-details > p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; }
.tr-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tr-field span { display: block; font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.tr-field input, .tr-add input { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 11px; font: 500 16px 'Manrope', sans-serif; background: var(--bg); }
.tr-field input:focus-visible, .tr-add input:focus-visible { outline: 3px solid var(--green-pop); outline-offset: 1px; }
.tr-group { margin-top: 30px; padding: 0; }
.tr-group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 10px; }
.tr-group-head h3 { font-weight: 800; font-size: 20px; letter-spacing: -0.015em; margin: 0; }
.tr-group-head > span { font-size: 14px; color: var(--ink-2); flex: 1 1 200px; }
.tr-list { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--paper); overflow: hidden; }
.tr-list:empty { display: none; }
.tr-row { display: grid; grid-template-columns: 24px minmax(82px, auto) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px 9px 14px; border-bottom: 1px solid var(--line); transition: background .12s ease; }
.tr-row:last-child { border-bottom: 0; }
.tr-row.is-on { background: var(--green-tint); }
.tr-check { width: 24px; height: 24px; margin: 0; accent-color: var(--green-2); cursor: pointer; }
.tr-key { justify-self: start; min-width: 44px; padding: 5px 9px; background: #fff; border: 1.5px solid var(--ink); border-bottom-width: 3.5px; border-radius: 9px; font: 500 13.5px 'Geist Mono', monospace; text-align: center; cursor: text; }
.tr-row.is-bad .tr-key { background: var(--peach); }
.tr-phrase { min-width: 0; font-size: 15px; line-height: 1.4; font-weight: 500; white-space: pre-wrap; word-break: break-word; padding: 3px 5px; border-radius: 6px; cursor: text; }
.tr-key:focus-visible, .tr-phrase:focus-visible { outline: 3px solid var(--green-pop); outline-offset: 1px; }
.tr-row.is-empty .tr-phrase { color: var(--ink-3); font-style: italic; }
.tr-copy { padding: 6px 11px; background: none; border: 1.5px solid transparent; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 800; color: var(--green-2); cursor: pointer; }
.tr-copy:hover { background: var(--paper); border-color: var(--ink); }
.tr-copy.is-copied { background: var(--ink); color: #fff; }
.tr-add { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.tr-add .btn { height: 44px; }
.tr-error { font-size: 14px; font-weight: 700; color: #A3321C; margin: 8px 0 0; }
.tr-panel { position: sticky; top: calc(var(--nav-h, 72px) + 16px); }
.tr-tally { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.tr-tally b { display: block; font-size: 54px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--green-2); margin-bottom: 2px; }
.tr-skipped { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 0; }
.tr-download { width: 100%; height: 52px; justify-content: center; margin-top: 14px; font-size: 16px; font-weight: 800; }
.tr-steps { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tr-steps h3 { font-size: 14.5px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.tr-steps ol { margin: 0 0 8px; padding-left: 20px; }
.tr-steps p { margin: 0 0 8px; }
.tr-steps b { color: var(--ink); }
.tr-try { margin-top: 16px; padding-top: 16px; border-top: 1.5px solid var(--line); }
.tr-try label { display: block; font-size: 14.5px; font-weight: 800; margin-bottom: 8px; }
.tr-bubble textarea { width: 100%; padding: 11px 15px; border: 0; border-radius: 18px 18px 5px 18px; background: #0A66D6; color: #fff; font: 500 16px/1.35 'Manrope', sans-serif; resize: none; }
.tr-bubble textarea::placeholder { color: rgba(255,255,255,.92); }
.tr-bubble textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.tr-bubble textarea.is-flash { animation: tr-flash .4s ease; }
.tr-bar { display: none; }
@keyframes tr-flash { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* ---------- AI Paste Fixer ---------- */
.ap-source { font: 500 14.5px/1.55 'Geist Mono', monospace; }
.ap-doc { flex: 1; min-height: 280px; max-height: 460px; overflow: auto; padding: 18px 20px; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; font: 15px/1.55 Georgia, 'Times New Roman', serif; color: #1c1c1c; }
.ap-doc:focus-visible { outline: 3px solid var(--green-pop); outline-offset: 1px; }
.ap-doc h1, .ap-doc h2, .ap-doc h3, .ap-doc h4, .ap-doc h5, .ap-doc h6 { font-family: 'Manrope', sans-serif; font-weight: 800; line-height: 1.25; margin: 14px 0 6px; }
.ap-doc h1 { font-size: 24px; } .ap-doc h2 { font-size: 20px; } .ap-doc h3 { font-size: 17px; } .ap-doc h4, .ap-doc h5, .ap-doc h6 { font-size: 15px; }
.ap-doc > :first-child { margin-top: 0; }
.ap-doc p { margin: 0 0 10px; }
.ap-doc ul, .ap-doc ol { margin: 0 0 10px; padding-left: 24px; }
.ap-doc table { margin: 0 0 12px; font-size: 14px; }
.ap-doc a { color: #0B57D0; text-decoration: underline; }
.ap-doc hr { border: 0; border-top: 1px solid #ccc; margin: 14px 0; }
.ap-placeholder { color: var(--ink-3); font-style: italic; }
.ap-plain { margin: 0; font: 13.5px/1.55 'Geist Mono', monospace; white-space: pre-wrap; word-break: break-word; }

/* ---------- Universal Clipboard Test ---------- */
.uc-relay { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -4px 0 26px; }
.uc-device { display: block; background: var(--paper); border: 1.5px solid var(--ink); }
.uc-phone { width: 36px; height: 66px; border-radius: 9px; box-shadow: 3px 3px 0 var(--ink); background: linear-gradient(var(--lime), var(--green-soft)); }
.uc-laptop { position: relative; width: 92px; height: 58px; border-radius: 7px 7px 0 0; background: linear-gradient(var(--sky), #fff); }
.uc-laptop::after { content: ''; position: absolute; left: -12px; right: -12px; bottom: -9px; height: 9px; background: var(--ink); border-radius: 0 0 8px 8px; }
.uc-wire { position: relative; width: min(38vw, 220px); height: 0; border-top: 2.5px dashed var(--ink); }
.uc-spark { position: absolute; top: -8px; left: 0; width: 14px; height: 14px; background: var(--green); border: 1.5px solid var(--ink); border-radius: 50%; animation: uc-travel 2.6s ease-in-out infinite alternate; }
.uc-open { display: flex; align-items: center; gap: 20px; padding: 18px 22px; margin-bottom: 26px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; }
.uc-open img { flex-shrink: 0; width: 120px; height: 120px; border: 1.5px solid var(--ink); border-radius: 12px; }
.uc-open h2 { font-weight: 800; font-size: 20px; letter-spacing: -0.015em; margin: 0 0 4px; }
.uc-open p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.uc-open a { color: var(--green-2); font-weight: 700; text-decoration: underline; }
.uc-open b { word-break: break-word; }
.uc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.uc-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px 22px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); }
.uc-step { position: absolute; top: -13px; left: 20px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--lime); border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 800; font-size: 15px; }
.uc-card h2 { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin: 4px 0 4px; }
.uc-card > p { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin: 0 0 14px; }
.uc-card > p.uc-note { min-height: 21px; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--green-2); margin: 10px 0 0; }
.uc-code { align-self: flex-start; margin-bottom: 14px; padding: 8px 14px; background: #fff; border: 1.5px solid var(--ink); border-bottom-width: 4px; border-radius: 11px; font: 500 24px 'Geist Mono', monospace; letter-spacing: .12em; }
.uc-action { width: 100%; height: 54px; justify-content: center; margin-top: auto; font-size: 16px; font-weight: 800; }
.uc-manual { margin-top: 12px; }
.uc-result { display: flex; align-items: center; gap: 22px; margin-top: 18px; padding: 22px 26px; border: 1.5px solid var(--ink); border-radius: 20px; }
.uc-result[hidden] { display: none; }
.uc-result:focus { outline: none; }
.uc-result h2 { font-weight: 800; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; }
.uc-result p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.uc-pass { background: var(--green-soft); }
.uc-fail { background: var(--peach); }
.uc-fail p { color: var(--ink); }
.uc-stamp { flex-shrink: 0; padding: 10px 14px; border: 3px solid var(--green-2); border-radius: 12px; color: var(--green-2); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; text-transform: uppercase; transform: rotate(-7deg); }
.uc-pass.is-in .uc-stamp { animation: uc-stamp .4s cubic-bezier(.2,1.4,.4,1); }
.uc-fixes { margin-top: 18px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; }
.uc-fixes summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 800; font-size: 16px; cursor: pointer; list-style: none; }
.uc-fixes summary::-webkit-details-marker { display: none; }
.uc-checks { list-style: none; margin: 0; padding: 0 20px; }
.uc-checks li { border-top: 1px solid var(--line); }
.uc-checks label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.uc-checks b { color: var(--ink); }
.uc-checks input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--green-2); }
.uc-checks input:checked + span { opacity: .55; }
.uc-more { font-size: 14.5px; margin: 0; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.uc-more a { color: var(--green-2); font-weight: 700; text-decoration: underline; }
@keyframes uc-travel { from { left: 0; } to { left: calc(100% - 14px); } }
@keyframes uc-stamp { from { transform: rotate(-7deg) scale(1.7); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .cv-stage, .tr-layout { grid-template-columns: minmax(0, 1fr); }
  .tr-panel { position: static; order: -1; }
  .tr-try { display: none; }
}
@media (max-width: 760px) {
  .tool-hero { padding: 32px 0 20px; }
  .tool-hero p { font-size: 16px; }
  .tool-card { padding: 14px; border-radius: 18px; }
  .tool-panes, .uc-grid, .tool-more { grid-template-columns: 1fr; }
  .tool-actions { justify-content: flex-start; margin-left: -8px; }
  .tool-area, .ap-doc { min-height: 170px; }
  .tool-copy { width: 100%; justify-content: center; }
  .tool-cta { padding: 20px; }
  .tool-cta-row { gap: 18px; }
  .tool-cta-action { width: 100%; max-width: none; }
  .tool-cta-action .appstore-btn { width: 100%; justify-content: center; }
  .tool-section { padding-top: 52px; }
  .tool-final { margin: 52px 0; }
  .faq-item summary { font-size: 15.5px; padding: 16px 18px; }
  .faq-item .faq-a { padding: 0 18px 18px; font-size: 15px; }
  .hub-grid { grid-template-columns: 1fr; }
  .cv-board { padding: 38px 14px 14px; box-shadow: 4px 4px 0 var(--ink); }
  .cv-paper { min-height: 260px; }
  .cv-empty, .cv-result { padding: 22px 16px; }
  .tr-row { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "check key copy" "phrase phrase phrase"; gap: 4px 10px; padding: 10px 10px 10px 12px; }
  .tr-check { grid-area: check; }
  .tr-key { grid-area: key; }
  .tr-copy { grid-area: copy; }
  .tr-phrase { grid-area: phrase; }
  .tr-group-head { justify-content: space-between; align-items: center; }
  .tr-group-head > span { flex: 1 1 100%; order: 3; }
  .tr-add { grid-template-columns: minmax(0, 1fr) auto; }
  .tr-add #tr-add-phrase { grid-column: 1 / -1; grid-row: 2; }
  .tr-add .btn { grid-column: 2; grid-row: 1; }
  .tr-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1.5px solid var(--ink); font-size: 15px; font-weight: 700; }
  .tr-bar b { font-size: 20px; font-weight: 800; color: var(--green-2); }
  .tr-bar .btn { height: 44px; font-weight: 800; }
  body[data-tool="text-replacement-builder"] { padding-bottom: 66px; }
  .uc-open { flex-direction: column; align-items: flex-start; }
  .uc-relay { margin-bottom: 16px; }
  .uc-result { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-cta, .faq-item summary .sign, .uc-fixes summary .sign, .hub-card, .tool-more a, .tr-row { transition: none; }
  .cv-eye, .cv-board.is-reveal .cv-result, .cv-extra, .tr-bubble textarea.is-flash, .uc-spark, .uc-pass.is-in .uc-stamp { animation: none; }
  .hub-card:hover { transform: none; }
}
