@font-face {
  font-family: "Inter Variable";
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f4f0e8;
  --texture: #53472a0c;
  --surface: #fffdf8;
  --ink: #111111;
  --quiet: #514a3e;
  --line: #c9c2b5;
  --accent: #3554f5;
  --on-accent: #fff;
  --wash: #ebe5d8;
  --danger: #9b244b;
  color: var(--ink);
  background: repeating-linear-gradient(135deg, transparent 0 33px, var(--texture) 33px 34px, transparent 34px 68px), var(--page);
  font-family: "Inter Variable", "Helvetica Neue", Arial, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111111;
  --texture: #ffffff09;
  --surface: #181818;
  --ink: #faf1ff;
  --quiet: #d2cbbf;
  --line: #444139;
  --accent: #b8c4ff;
  --on-accent: #111111;
  --wash: #26241f;
  --danger: #ffa9ca;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 3; padding: 12px; background: var(--surface); }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.nav { min-height: 67px; display: flex; align-items: center; gap: 17px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.46rem; font-weight: 780; letter-spacing: -.05em; text-decoration: none; }
.wordmark-symbol { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--accent); border-radius: 48% 48% 48% 12%; transform: rotate(-14deg); }
.wordmark-symbol::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.view-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-inline: auto; }
.nav button, .nav select { color: var(--quiet); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 7px 11px; font-size: .86rem; }
.nav button:hover, .nav button[aria-pressed="true"] { color: var(--ink); background: var(--wash); }
.nav select, #theme { border-color: var(--line); background: var(--surface); }

.hero, .tool-intro { padding: clamp(29px, 6vw, 65px) 0 clamp(18px, 3vw, 31px); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px 28px; align-items: end; }
.hero h1, .tool-intro h1 { margin: 0; font-size: clamp(2.1rem, 5.6vw, 4.35rem); font-weight: 680; letter-spacing: -.06em; line-height: 1.08; }
:lang(zh-Hant) :is(.hero,.tool-intro) h1 { letter-spacing: -.045em; line-height: 1.18; }
.hero p, .tool-intro p { margin: 12px 0 0; color: var(--quiet); line-height: 1.6; }
.privacy-note { align-self: end; white-space: nowrap; color: var(--accent); font-size: .86rem; font-weight: 650; }
.privacy-note span { margin-inline-start: 5px; }

#catalog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.search { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search > span { font-size: 1.48rem; line-height: 1; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding-block: 10px; }
.search input::placeholder { color: var(--quiet); }
kbd { font-family: inherit; font-size: .72rem; border: 1px solid var(--line); border-radius: 5px; color: var(--quiet); padding: 3px 6px; white-space: nowrap; }
.catalog-head { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.catalog-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.035em; }
#count, .tool-type, #tool-category { color: var(--quiet); font-size: .78rem; }
.filters { display: flex; gap: 5px 13px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters button { padding: 7px 3px; background: transparent; color: var(--quiet); border: 0; border-bottom: 2px solid transparent; font-size: .86rem; }
.filters button:hover, .filters [aria-pressed="true"] { color: var(--accent); border-bottom-color: currentColor; }
.filters [aria-pressed="true"] { font-weight: 720; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.card { position: relative; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.card:hover, .card:focus-within { border-color: var(--accent); }
.card-main { display: flex; align-items: center; gap: 11px; padding: 13px 43px 13px 12px; width: 100%; min-height: 79px; border-radius: inherit; text-decoration: none; }
.card-main strong, .card-main small { display: block; overflow-wrap: anywhere; }
.card-main strong { font-size: .9rem; line-height: 1.3; }
.card-main small { margin-top: 4px; color: var(--quiet); line-height: 1.4; font-size: .76rem; }
.icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--wash); color: var(--accent); font-family: inherit; font-size: .85rem; font-weight: 650; }
.star { position: absolute; inset: 50% 7px auto auto; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: var(--accent); background: transparent; font-size: 1.25rem; }
.star:hover, .star[aria-pressed="true"] { background: var(--wash); }
.empty { grid-column: 1 / -1; padding: 18px 0; color: var(--quiet); }

.sponsor-placement, .footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; margin-top: 26px; border-top: 1px solid var(--line); color: var(--quiet); font-size: .82rem; }
.ad-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; text-decoration: none; }
.ad-banner img { max-width: min(100%, 220px); max-height: 100px; object-fit: contain; }
.footer-brand { color: var(--ink); font-size: 1.08rem; font-weight: 780; }
.footer nav { display: flex; flex-wrap: wrap; gap: 9px 16px; }

.tool-intro > a { color: var(--accent); font-size: .86rem; }
.tool-intro h1 { margin-top: 14px; font-size: clamp(2rem, 5vw, 3.6rem); }
.tool-intro p, .content-page { max-width: 66ch; }
.tool-intro .primary { margin-top: 16px; }
.content-page { margin: 0 0 30px; line-height: 1.65; }
.content-page section { border-top: 1px solid var(--line); padding-block: 14px; }
.content-page h2 { font-size: 1.12rem; margin: 0 0 5px; }
.content-page p { margin: 0; color: var(--quiet); }

dialog {
  position: fixed; inset: 14px 14px 14px auto; margin: 0; width: min(640px,calc(100% - 28px)); max-width: none; max-height: none;
  border: 1px solid var(--line); border-radius: 18px; padding: clamp(17px,4vw,32px); overflow-y: auto;
  background: var(--surface); color: var(--ink); box-shadow: 0 16px 46px #0005;
}
dialog::backdrop { background: #0008; }
:is(#account-dialog, #donation-dialog) {
  background: color-mix(in srgb, var(--surface) 96%, white);
  border-color: var(--strong-line);
  box-shadow: 0 18px 48px #0006;
}
:root[data-theme="dark"] :is(#account-dialog, #donation-dialog) {
  background: #262626;
}
#account-status:not(:empty) { border-inline-start: 2px solid var(--accent); padding-inline-start: 10px; color: var(--ink); }
.dialog-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.dialog-bar h2 { margin: 5px 0 0; letter-spacing: -.04em; line-height: 1.16; }
.dialog-bar button, .download, .copy { border: 1px solid var(--line); border-radius: 8px; background: var(--page); color: var(--ink); }
.dialog-bar button { font-size: 1.3rem; padding-inline: 9px; }
.dialog-bar + p { color: var(--quiet); margin: 14px 0 17px; }
#fields { display: grid; gap: 12px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; font-size: .86rem; }
.field input:not([type="checkbox"]), .field textarea, .field select, .result-text { width: 100%; min-width: 0; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.field textarea, .result-text { min-height: 100px; font-family: inherit; resize: vertical; }
.field:has(input[type="checkbox"]) { display: flex; align-items: center; }
.file-hint { color: var(--quiet); font-size: .76rem; }
.file-hint:empty { display: none; }
.primary { border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.primary:disabled { opacity: .65; cursor: wait; }
.result-text { display: block; margin-top: 13px; }
.download, .copy { display: inline-block; margin: 7px 5px 0 0; padding: 7px 10px; text-decoration: none; }
.result-error { color: var(--danger); }
.batch-summary { margin: 8px 0 0; }
.batch-results { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.batch-result { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.batch-filename, .batch-result .download { overflow-wrap: anywhere; }
.batch-filename { display: block; font-weight: 600; }
.batch-result .result-error { margin: 6px 0 0; }
.pdf-page-picker:empty { display: none; }
.pdf-page-picker details { border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 6px; }
.pdf-page-picker summary { padding: 6px; cursor: pointer; overflow-wrap: anywhere; }
.pdf-page-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; font-size: .8rem; }
.pdf-page-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,100px),1fr)); gap: 8px; }
.pdf-page-picker button, .pdf-page-card, .file-order button { color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-height: 36px; }
.pdf-page-card { min-width: 0; text-align: center; display: grid; align-content: start; gap: 5px; font-size: .8rem; }
.pdf-page-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.pdf-page-card[aria-pressed="true"] span::before { content: '✓ '; }
.pdf-page-card canvas { max-width: 100%; height: auto; margin: 0 auto; background: white; }
.pdf-page-nav button:disabled, .pdf-page-card button:disabled, .file-order button:disabled { opacity: .45; }
.file-order { padding-inline-start: 22px; margin: 0; }
.file-order li { padding: 3px 0; overflow-wrap: anywhere; }
.file-order button { margin-inline-start: 6px; }
.crop-preview { display: block; max-width: 100%; max-height: min(55vh,400px); width: auto; height: auto; object-fit: contain; touch-action: none; cursor: crosshair; margin-inline: auto; }
.result-image { display: block; max-width: min(100%,280px); max-height: 230px; margin-top: 8px; }
.result-preview { max-height: 185px; overflow: auto; }
.result-preview table { border-collapse: collapse; font-size: .82rem; }
.result-preview td, .result-preview th { border: 1px solid var(--line); padding: 4px 8px; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 36px); }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .nav { flex-wrap: wrap; gap: 8px; padding-block: 11px; }
  .language { margin-left: auto; }
  .view-nav { width: 100%; order: 1; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 495px) {
  .cards { grid-template-columns: 1fr; }
  .card-main { min-height: 69px; }
  .search kbd { display: none; }
}

#most-used { margin: 0 0 25px; }
#most-used h2 { margin: 0 0 10px; font-size: 1.18rem; }
#most-tools { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.quick-link { display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 6px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; text-decoration: none; }
.quick-link:hover { border-color: var(--accent); }
[data-cat="pdf"] { --category-color: #a92443; --category-bg: #fae3e8; }
[data-cat="images"] { --category-color: #285ca1; --category-bg: #e2edff; }
[data-cat="data"] { --category-color: #166649; --category-bg: #d9f3e5; }
[data-cat="developer"] { --category-color: #6439a2; --category-bg: #eee3fc; }
[data-cat="text"] { --category-color: #865300; --category-bg: #fff0cb; }
[data-cat="files"] { --category-color: #995222; --category-bg: #ffe9d6; }
[data-cat="utilities"] { --category-color: #00616d; --category-bg: #d7f3f5; }
[data-cat="security"] { --category-color: #95336c; --category-bg: #f9e1ef; }
[data-cat="media"] { --category-color: #435394; --category-bg: #e6eaff; }
.icon[data-cat] { color: var(--category-color); background: var(--category-bg); }
.category-groups { display: grid; gap: 25px; }
.category-group { scroll-margin-top: 18px; }
.category-heading { margin: 0 0 9px; padding: 8px 12px; border-radius: 8px; background: var(--category-bg); color: var(--category-color); font-size: 1rem; }
.filters { gap: 7px; border: 0; }
.filters a { padding: 5px 9px; border-radius: 8px; color: var(--category-color); background: var(--category-bg); font-size: .8rem; text-decoration: none; }
.filters a:hover { text-decoration: underline; }
#account-open { display: flex; align-items: center; gap: 5px; }
#account-dialog { inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 28px); width: min(480px, calc(100% - 28px)); }
#account-form { display: grid; gap: 10px; margin-top: 12px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: baseline; }
#ratings button { padding: 2px 5px; font-size: 1.23rem; color: var(--accent); }
#ratings button:hover { text-decoration: underline; }
#coffee-link { font-weight: 700; }
:root[data-skin="lagoon"]:not([data-theme="dark"]) { --wash: #d1eeeb; --accent: #176b72; --ink: #0f3741; --line: #b5d9da; }
:root[data-skin="peach"]:not([data-theme="dark"]) { --wash: #fee5d6; --accent: #9e4228; --ink: #4a2a26; --line: #ebc8b6; }
:root[data-skin="orchid"]:not([data-theme="dark"]) { --wash: #f7dff3; --accent: #85296e; --ink: #4d2549; --line: #e7bddd; }
:root[data-skin="lagoon"][data-theme="dark"] { --accent: #98edeb; --wash: #1e4145; --line: #426568; }
:root[data-skin="peach"][data-theme="dark"] { --accent: #ffb895; --wash: #543226; --line: #775045; }
:root[data-skin="orchid"][data-theme="dark"] { --accent: #f3b3e7; --wash: #4a2a4e; --line: #6f4b72; }
@media (max-width: 620px) { #most-tools { grid-template-columns: repeat(2,minmax(0,1fr)); } .nav { column-gap: 5px; } }

.brand-lockup { display: flex; align-items: center; gap: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .logo:hover .wordmark-symbol, .logo:focus-visible .wordmark-symbol { background: var(--wash); }
}
.nav button, .nav select, .primary, .copy, .download, .quick-link, .directory-links a {
  border-radius: 6px;
}
.nav button { background: var(--wash); border-color: var(--line); }
.nav button[aria-pressed="true"], .nav button:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.hero, #most-used, #catalog, .directory-page, .tool-intro, .content-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: clamp(14px, 3vw, 30px);
}
.hero, .directory-page, .tool-intro { margin-top: 22px; }
.hero { margin-bottom: 18px; }
.directory-page h1 { margin: 0 0 16px; font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 630; letter-spacing: -.015em; }
#most-used { margin-bottom: 18px; }
.quick-link, .search { background: var(--page); }
.category-group { background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.category-heading { border-radius: 5px; }
.card { border-radius: 7px; }
.sponsor-placement { padding-inline: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.content-page { margin-top: 15px; }
.directory-links { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; }
.directory-links a { display: flex; align-items: center; min-height: 42px; height: 100%; padding: 8px 11px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; overflow-wrap: anywhere; }
.directory-links a { font-size: .9rem; font-weight: 570; line-height: 1.3; }
.directory-links a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 720px) { .directory-links { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 420px) { .directory-links { grid-template-columns: 1fr; } }

.mobile-nav { display: none; }
.explore-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface);
}
.explore-label { color: var(--quiet); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.explore-bar .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding: 3px; min-width: 0; }
.explore-bar .filters a { flex: none; }
.category-group { scroll-margin-top: 75px; }
.catalog-head { margin-top: 0; }
.hero, #most-used, #catalog, .directory-page, .tool-intro, .content-page {
  box-shadow: 0 2px 0 var(--line);
}
.quick-link { font-weight: 650; }
.quick-link:hover { background: #f9d96c; color: #111; border-color: #a38945; }
.nav-icon, .back-link {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0;
  background: var(--wash); color: var(--ink); border: 1px solid var(--line); border-radius: 7px; text-decoration: none;
}
#donation-open, #donation-link { display: inline-grid; padding: 0; color: #111; background: #f9d96c; border-color: #a38945; }
#donation-open:hover, #donation-link:hover { background: #ffe694; color: #111; }
.back-link span {
  width: 9px; height: 9px; margin-left: 3px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(45deg);
}
.back-link:hover { background: var(--accent); color: var(--on-accent); }
.directory-page > .back-link { margin-bottom: 10px; }
#member-preview { font-size: .63rem; line-height: 1; font-weight: 760; }
#donation-dialog { inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 28px); width: min(420px,calc(100% - 28px)); }

@media (prefers-reduced-motion: no-preference) {
  .wordmark-symbol { animation: logo-tilt 5s ease-in-out infinite; }
  .wordmark-text { animation: logo-lift 5s ease-in-out infinite; }
  .wordmark-symbol::after { animation: logo-dot 5s ease-in-out infinite; }
}
@keyframes logo-tilt {
  0%, 33%, 100% { transform: rotate(-14deg) translateY(0); }
  10% { transform: rotate(15deg) translateY(-4px); }
  22% { transform: rotate(-19deg) translateY(1px); }
}
@keyframes logo-lift {
  0%, 35%, 100% { transform: translateY(0); }
  13% { transform: translateY(-2px); }
}
@keyframes logo-dot {
  0%, 35%, 100% { transform: scale(1); }
  12% { transform: translate(2px,-2px) scale(1.28); }
}
@media (max-width: 620px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .nav { min-height: 56px; }
  .view-nav { display: none; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; z-index: 4; inset: auto 0 0;
    padding: 3px 6px calc(3px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: var(--surface); box-shadow: 0 -4px 16px #1112;
  }
  .mobile-nav :is(a,button) {
    min-height: 49px; display: grid; align-content: center; justify-items: center; gap: 2px;
    border: 0; border-radius: 7px; text-decoration: none; color: var(--quiet); background: transparent; font-size: .69rem;
  }
  .mobile-nav :is([aria-pressed="true"],[aria-current="page"]) { background: var(--wash); color: var(--ink); font-weight: 680; }
  .mobile-nav span:first-child { font-size: 1.04rem; line-height: 1; }
  .explore-bar { gap: 6px; padding-inline: 8px; }
  .explore-label { font-size: .74rem; }
}

h1, h2, h3, .logo, .explore-label, .view-nav, .mobile-nav, .local-menu summary {
  text-transform: uppercase;
}
:root { --sticker: #f9d96c; --local: #9fe3b4; --strong-line: #22201e; }
:root[data-theme="dark"] { --strong-line: #e6dfd1; }
.top { border-bottom: 2px solid var(--strong-line); }
.nav { gap: 10px; min-height: 60px; }
.brand-lockup { gap: 5px; flex: none; }
.logo { gap: 8px; font-weight: 900; letter-spacing: -.065em; }
.wordmark-symbol {
  width: 31px; height: 25px; display: inline-block;
  border: 2px solid #231c31; border-radius: 48% 48% 42% 45%; z-index: 0;
  box-shadow: 2px 2px 0 var(--strong-line);
  background: radial-gradient(circle at 30% 47%, #21182a 0 1.5px, transparent 2px),
              radial-gradient(circle at 72% 47%, #21182a 0 1.5px, transparent 2px),
              radial-gradient(circle at 19% 65%, #fb9ead 0 2px, transparent 2.5px),
              radial-gradient(circle at 82% 65%, #fb9ead 0 2px, transparent 2.5px), var(--sticker);
}
.wordmark-symbol::before {
  content: ""; position: absolute; width: 8px; height: 8px; inset: -6px 3px auto auto;
  z-index: -1; border: 2px solid #231c31; border-radius: 5px 6px 4px 3px; background: #b7d6ff; transform: rotate(16deg);
}
.wordmark-symbol::after {
  position: absolute; inset: 12px 0 auto; margin-inline: auto; width: 8px; height: 5px;
  border: solid #231c31; border-width: 0 1.5px 1.5px; border-radius: 0 0 8px 8px; background: transparent; animation: none;
}
.logo:focus-visible .wordmark-symbol, .logo:hover .wordmark-symbol { background-color: #ffe394; }
.local-menu { position: relative; flex: none; z-index: 6; }
.local-menu summary, #donation-link, #donation-open {
  min-height: 36px; border: 2px solid var(--strong-line); box-shadow: 2px 2px var(--strong-line); border-radius: 6px;
}
.local-menu summary {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px; cursor: pointer; list-style: none;
  background: var(--local); color: #141e17; font-size: .74rem; font-weight: 820; letter-spacing: .045em;
}
.local-menu summary::-webkit-details-marker { display: none; }
.local-dot { width: 9px; height: 9px; background: #fff9ed; border: 2px solid #272223; border-radius: 50%; }
.local-note {
  position: absolute; inset: calc(100% + 10px) 0 auto auto; width: min(230px,calc(100vw - 30px)); padding: 12px; font-size: .84rem; line-height: 1.45;
  background: var(--surface); color: var(--ink); border: 2px solid var(--strong-line); box-shadow: 3px 3px var(--strong-line); border-radius: 7px;
}
.local-note p { margin-block: 6px; color: var(--quiet); }

.hero { align-items: center; border: 0; box-shadow: none; background: transparent; padding: clamp(20px,4vw,45px) 0; gap: 14px 36px; }
.hero h1 { font-size: clamp(2.36rem,7.1vw,5.8rem); font-weight: 900; line-height: .95; letter-spacing: -.072em; max-width: 18ch; text-wrap: balance; }
:lang(zh-Hant) .hero h1 { letter-spacing: -.06em; line-height: 1.04; }
.hero p { font-weight: 620; max-width: 46ch; }
.hero-search {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 53px; padding: 12px 18px;
  color: #171717; background: var(--sticker); border: 2px solid var(--strong-line); box-shadow: 3px 3px var(--strong-line);
  border-radius: 8px; text-transform: uppercase; font-weight: 760;
}
.hero-search:hover { background: #ffe693; }
.search-shape { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; display: block; position: relative; margin-right: 4px; }
.search-shape::after { content: ""; position: absolute; top: 10px; left: 10px; width: 7px; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(43deg); transform-origin: left center; }
.quick-link, .category-group, .search { border-radius: 6px; }
#mobile-settings { inset: auto 12px 12px; margin: auto; max-height: calc(100% - 24px); height: fit-content; width: min(460px,calc(100% - 24px)); }
.mobile-options { display: grid; gap: 9px; padding-top: 10px; }
.mobile-options .copy { width: 100%; margin: 0; text-align: start; }

@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .nav { display: flex; flex-wrap: nowrap; min-height: 54px; padding-block: 7px; gap: 8px; }
  .nav .language, .nav #account-open, .nav #theme { display: none; }
  .logo { font-size: 1.15rem; }
  .wordmark-symbol { width: 29px; height: 23px; }
  .local-menu { margin-left: auto; }
  .local-menu summary, #donation-link, #donation-open { min-height: 32px; }
  #donation-link, #donation-open { width: 32px; height: 32px; }
  .hero { grid-template-columns: 1fr; margin-block: 12px 16px; }
  .hero h1 { font-size: clamp(2.28rem,10.5vw,4.15rem); }
  .hero-search { justify-self: start; min-height: 42px; margin-top: 5px; }
  .mobile-nav {
    grid-template-columns: repeat(5,minmax(0,1fr)); align-items: center; border-top: 2px solid var(--strong-line);
    padding-inline: 7px; min-height: 58px;
  }
  .mobile-nav .bottom-symbol { font-size: 1.48rem; font-weight: 650; line-height: 1; }
  .mobile-nav .mobile-search {
    justify-self: center; width: 43px; height: 43px; min-height: 0; border: 2px solid var(--strong-line);
    box-shadow: 2px 2px var(--strong-line); color: #171717; background: var(--sticker);
  }
  .mobile-nav .mobile-search:hover { background: #ffe693; }
}
@media (max-width: 360px) {
  .nav { gap: 6px; }
  .logo { gap: 5px; }
  .local-menu summary { padding-inline: 6px; }
}
.top { position: sticky; top: 0; z-index: 7; }
.explore-bar { top: 62px; }
.category-group { scroll-margin-top: 122px; }
#catalog { scroll-margin-top: 122px; }
@media (max-width: 620px) {
  .explore-bar { top: 56px; }
  .category-group, #catalog { scroll-margin-top: 112px; }
}

/* Zupdo aqua and concrete theme */
:root {
  --aqua: #85ced1;
  --aqua-ink: #103633;
  --page: #dce0df;
  --surface: #edf0ee;
  --ink: #1d2928;
  --quiet: #4c5a57;
  --line: #bcc7c4;
  --accent: #225d66;
  --on-accent: #edf9f7;
  --wash: #d3dfdc;
  --texture: #4b5b5a0c;
  --strong-line: #aebbb7;
  --sticker: var(--aqua);
  --local: #65cc8d;
}
:root[data-theme="dark"] {
  --page: #0d0d0d;
  --surface: #191919;
  --ink: #f1f1f1;
  --quiet: #b8b8b8;
  --line: #3e3e3e;
  --accent: #85ced1;
  --on-accent: #101a1c;
  --wash: #262626;
  --texture: #ffffff07;
  --strong-line: #565656;
}
:root { background: radial-gradient(circle at 1px 1px,var(--texture) 1px,transparent 1.4px) 0 0/12px 12px,var(--page); }
body { line-height: 1.55; }
.top { border-bottom: 1px solid var(--line); }
.nav { min-height: 64px; }
.logo { font-weight: 790; letter-spacing: -.04em; }
h1, h2, h3, .logo, .explore-label, .view-nav, .mobile-nav { line-height: 1.2; }
.hero { display: block; margin-block: 18px 16px; padding: 22px 0 4px; }
.hero h1 {
  max-width: 20ch; font-size: clamp(2.1rem,4.4vw,4.3rem); line-height: 1.12;
  letter-spacing: -.042em; font-weight: 710; text-wrap: balance;
}
:lang(zh-Hant) .hero h1 { line-height: 1.24; letter-spacing: -.025em; }
.catalog-head h2, #most-used h2, .sponsor-placement h2 { font-weight: 630; letter-spacing: -.015em; }
.category-heading, .quick-link, .card-main strong { font-weight: 570; }
.card-main { padding-block: 15px; }
.card-main small { line-height: 1.52; font-size: .8rem; }
.category-group { padding: 12px; }
.search > span, .local-dot { color: var(--accent); }
#donation-link, #donation-open { background: var(--aqua); color: var(--aqua-ink); }
#donation-link:hover, #donation-open:hover, .quick-link:hover { background: #a6dfe1; color: var(--aqua-ink); border-color: var(--accent); }
.local-menu summary, #theme {
  display: grid; place-items: center; width: 34px; min-height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer; list-style: none;
  background: var(--surface); color: var(--ink); box-shadow: none;
}
.local-dot { width: 11px; height: 11px; border: 0; background: var(--local); box-shadow: 0 0 0 3px color-mix(in srgb,var(--local) 24%,transparent); }
.theme-options {
  display: grid; gap: 3px; position: absolute; inset: calc(100% + 8px) 0 auto auto;
  min-width: 128px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  box-shadow: 0 6px 16px #101e1826;
}
.theme-options button { width: 100%; text-align: start; font-size: .8rem; }
.local-note { right: 0; box-shadow: 0 6px 16px #101e1826; }
.nav select, .nav button, .mobile-nav, .field select { font-family: inherit; font-size: .81rem; font-weight: 510; }
.nav select { min-height: 34px; }
.wordmark-symbol { overflow: visible; background-color: #85ced1; }
.wordmark-symbol::before { content: none; }
.winter-hat {
  position: absolute; top: -8px; left: 1px; width: 21px; height: 11px;
  border-radius: 14px 10px 2px 2px; background: #bc3b4b; border: 1px solid #78313b;
}
.winter-hat::before { content: ""; position: absolute; bottom: -2px; left: -2px; right: -2px; height: 4px; border-radius: 4px; background: #fff3ea; }
.winter-hat::after { content: ""; position: absolute; right: -4px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff3ea; }

.workspace { position: relative; display: flex; flex-direction: column; gap: 16px; }
.dashboard-extras { order: -1; }
#most-used, .sponsor-placement { margin: 0; }
.sponsor-placement {
  display: grid; gap: 6px; margin-top: 12px; padding: 13px 15px;
  border: 1px dashed var(--strong-line); box-shadow: none;
}
.sponsor-placement h2 { margin: 0; font-size: .96rem; color: var(--ink); }
#ad-content { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.footer-signature { display: flex; align-items: center; column-gap: 9px; row-gap: 3px; flex-wrap: wrap; }
.footer-brand, .footer-slogan { line-height: 1.2; }
.footer-slogan { font-size: .82rem; transform: translateY(-.5px); }
.explore-bar .filters a {
  color: var(--ink); background: color-mix(in srgb,var(--category-bg) 31%,var(--surface));
  border: 1px solid color-mix(in srgb,var(--category-color) 35%,var(--line)); font-weight: 550;
}
:root[data-theme="dark"] .explore-bar .filters a:not(:hover):not(:focus-visible) {
  background: var(--wash);
  border-color: var(--line);
}
.explore-bar .filters a:hover, .explore-bar .filters a:focus-visible { background: var(--aqua); color: var(--aqua-ink); }
.explore-bar .filters a[data-cat] { box-shadow: inset 3px 0 color-mix(in srgb,var(--category-color) 75%,var(--line)); }
.rail-directory { display: none; }

@media (min-width: 1000px) {
  main:has(.explore-bar:not([hidden])) {
    width: min(1420px,calc(100% - 257px));
    margin-left: max(233px,calc((100% - 1630px)/2 + 210px));
    margin-right: auto;
  }
  .explore-bar {
    position: fixed; inset: 79px auto auto max(16px,calc((100% - 1630px)/2)); width: 196px;
    max-height: calc(100dvh - 100px); overflow-y: auto; display: block; padding: 13px;
  }
  .explore-label { display: block; margin: 1px 0 8px; }
  .explore-bar .filters { display: grid; gap: 6px; overflow: visible; padding: 0; }
  .explore-bar .filters a { padding: 7px 10px; min-width: 0; }
  .rail-directory { display: inline-block; font-size: .8rem; margin: 14px 5px 0; }
  .workspace:has(.dashboard-extras:not([hidden])) {
    display: grid; grid-template-columns: minmax(0,1fr) clamp(220px,24%,310px);
    grid-template-areas: "catalog extras"; align-items: start;
  }
  .workspace:has(.dashboard-extras:not([hidden])) #catalog { grid-area: catalog; }
  .workspace:has(.dashboard-extras:not([hidden])) .dashboard-extras { grid-area: extras; }
  .dashboard-extras #most-tools { grid-template-columns: 1fr; }
  #catalog, .category-group { scroll-margin-top: 80px; }
  .cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); }
}

@media (max-width: 620px) {
  .nav { min-height: 55px; gap: 6px; }
  .nav .language, .nav #theme { display: block; }
  .nav .language { margin-left: auto; }
  .nav select { max-width: 85px; padding: 3px 4px; min-height: 30px; }
  .local-menu { margin-left: 0; }
  .local-menu summary, #theme, #donation-link, #donation-open {
    width: 29px; min-height: 30px; height: 30px; box-shadow: none; border-width: 1px;
  }
  .brand-lockup { gap: 4px; }
  .logo { font-size: 1rem; gap: 5px; }
  .wordmark-symbol { width: 25px; height: 20px; }
  .wordmark-symbol::after { top: 10px; }
  .nav #member-mark { width: 17px; min-width: 17px; height: 18px; padding: 0; }
  .hero { padding: 9px 0 2px; }
  .hero h1 { font-size: clamp(1.9rem,8.5vw,3.25rem); }
  .mobile-nav {
    inset: auto 10px max(6px,env(safe-area-inset-bottom)); min-height: 53px; padding: 3px 6px;
    border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 7px 24px #101e1833;
  }
  .mobile-nav :is(a,button) { min-height: 43px; font-size: .65rem; }
  .mobile-nav .mobile-search {
    width: 39px; height: 39px; border: 1px solid var(--line); box-shadow: none; background: var(--aqua); color: var(--aqua-ink);
  }
  .mobile-nav .bottom-symbol { font-size: 1.26rem; }
  .mobile-nav .account-symbol {
    position: relative; width: 15px; height: 7px; margin: 9px 0 3px; border: 1.5px solid currentColor; border-radius: 8px 8px 3px 3px;
  }
  .account-symbol::before { content: ""; position: absolute; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; left: 3px; bottom: 6px; }
  .footer .footer-desktop { display: none; }
}
[data-cat="design"] { --category-color: #74326a; --category-bg: #f3deef; }

/* File Potion mascot and shared tool progress. */
.logo { text-transform: none; }
.wordmark-symbol {
  width: 28px; height: 24px; margin-top: 6px; border-radius: 12px 12px 9px 9px;
  border: 2px solid #173e39; background: linear-gradient(170deg,#e5fff0 48%,var(--aqua) 49%);
  box-shadow: 2px 2px 0 var(--strong-line);
}
.logo:hover .wordmark-symbol, .logo:focus-visible .wordmark-symbol { background: linear-gradient(170deg,#f2fff9 43%,#a6dfe1 44%); }
.wordmark-symbol::after { content: none; }
.potion-stopper {
  position: absolute; inset: -8px auto auto 6px; width: 12px; height: 8px;
  border: 2px solid #173e39; border-radius: 3px; background: #f0ae77;
}
.potion-face {
  position: absolute; top: 9px; left: 4px; width: 16px; height: 6px;
  background: radial-gradient(circle at 23% 50%,#153c36 0 1.2px,transparent 1.7px),
              radial-gradient(circle at 76% 50%,#153c36 0 1.2px,transparent 1.7px);
}
.potion-face::after {
  content: ""; position: absolute; width: 4px; height: 3px; top: 4px; left: 6px;
  border: solid #153c36; border-width: 0 1px 1px; border-radius: 0 0 4px 4px;
}
.hero h1 { line-height: 1.18; text-transform: none; }
.brew-overlay {
  position: absolute; z-index: 3; inset: 0; display: grid; align-items: start; justify-items: center;
  padding: min(22vh,190px) 12px 15px; background: color-mix(in srgb,var(--page) 79%,transparent);
}
.brew-panel {
  display: grid; justify-items: center; gap: 9px; min-width: min(188px,100%); padding: 18px;
  border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: var(--surface); box-shadow: 0 8px 22px #10241e29;
}
.brew-panel strong { letter-spacing: .035em; }
.brew-panel progress { width: 80px; height: 7px; accent-color: var(--accent); }
.brew-cauldron {
  display: flex; justify-content: center; gap: 4px; align-items: flex-start;
  width: 42px; height: 24px; margin-top: 16px; border: 2px solid var(--accent);
  border-radius: 4px 4px 14px 14px; background: var(--aqua);
}
.brew-cauldron i { width: 6px; height: 6px; margin-top: -6px; border-radius: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .brew-cauldron i { animation: brew-rise .92s infinite ease-out; }
  .brew-cauldron i:nth-child(2) { animation-delay: .25s; }
  .brew-cauldron i:nth-child(3) { animation-delay: .48s; }
}
@keyframes brew-rise {
  from { transform: translateY(5px) scale(.65); opacity: 0; }
  25% { opacity: 1; }
  to { transform: translateY(-14px) scale(1.15); opacity: 0; }
}
@media (max-width: 360px) {
  .logo { font-size: .94rem; gap: 4px; }
  .wordmark-symbol { width: 23px; }
  .potion-face { left: 2px; }
}

.desktop-rail { display: none; }

@media (min-width: 1000px) {
  :root { --rail-width: 246px; --header-height: 65px; }
  .nav .view-nav, .explore-bar:not([hidden]) { display: none; }
  .nav .language { margin-left: auto; }
  .nav { width: calc(100% - 36px); }
  .desktop-rail {
    position: fixed; inset: var(--header-height) auto 0 0; z-index: 5;
    width: var(--rail-width); display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .rail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 12px; overscroll-behavior: contain; }
  #rail-search {
    width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px;
    background: var(--page); border: 1px solid var(--line); border-radius: 7px;
    color: var(--ink); font-size: .8rem; text-align: start;
  }
  #rail-search .search-shape { color: var(--accent); flex: none; }
  #rail-search kbd { margin-left: auto; }
  .rail-shortcuts, #rail-categories { display: grid; gap: 3px; }
  .rail-shortcuts { margin: 10px 0 15px; }
  .rail-shortcuts button, .rail-category {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px;
    padding: 4px 7px; background: transparent; border: 1px solid transparent;
    border-radius: 6px; text-align: start; text-decoration: none; color: var(--ink); font-size: .82rem;
  }
  .rail-shortcuts button span:first-child { width: 19px; text-align: center; }
  .rail-shortcuts button:hover, .rail-category:hover, .rail-shortcuts [aria-pressed="true"] { background: var(--wash); }
  .rail-shortcuts [aria-pressed="true"] { border-color: var(--line); }
  .rail-categories h2, #rail-extras #most-used h2, #rail-extras .sponsor-placement h2 {
    margin: 0 0 6px; color: var(--quiet); font-size: .74rem; font-weight: 650; letter-spacing: .04em;
  }
  .rail-icon {
    display: grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 5px;
    background: var(--category-bg); color: var(--category-color); font-size: .72rem; font-weight: 650;
  }
  .rail-count { margin-left: auto; color: var(--quiet); font-size: .72rem; font-variant-numeric: tabular-nums; }
  #rail-extras .dashboard-extras { margin-top: 14px; }
  #rail-extras #most-used { padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  #rail-extras #most-tools { gap: 3px; grid-template-columns: 1fr 1fr; }
  #rail-extras .quick-link { min-height: 32px; padding: 4px 5px; gap: 4px; font-size: .72rem; line-height: 1.25; }
  #rail-extras .quick-link .icon { width: 19px; height: 19px; font-size: .62rem; }
  #rail-extras .sponsor-placement { padding: 8px; }
  #rail-extras .sponsor-placement h2 { margin: 0; }
  .rail-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px;
    padding: 11px 12px; border-top: 1px solid var(--line); background: var(--surface);
    color: var(--quiet); font-size: .7rem;
  }
  .rail-footer a { text-decoration: none; }
  .rail-footer a:hover, .rail-footer a:focus-visible { color: var(--accent); text-decoration: underline; }
  main.wrap, main.wrap:has(.explore-bar:not([hidden])), .footer.wrap {
    width: min(1350px,calc(100% - var(--rail-width) - 48px));
    margin-left: max(calc(var(--rail-width) + 24px),calc((100% - 1350px + var(--rail-width))/2));
    margin-right: auto;
  }
}

.social-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 14px 0 9px; }
.social-options .copy { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 0; padding: 7px 4px; font-size: .82rem; }
.social-options .copy > span { font-weight: 800; color: var(--accent); }
.social-options .copy:disabled { opacity: .68; cursor: default; }
#social-note { color: var(--quiet); font-size: .8rem; margin: 0; }

#social-title { margin: 12px 0 8px; font-size: .9rem; font-weight: 630; }


.dialog-bar h2 { font-size: 1.18rem; font-weight: 630; }
dialog { font-size: .93rem; line-height: 1.55; }
@media (min-width: 1000px) {
  .hero h1 { max-width: none; text-wrap: initial; font-size: clamp(1.8rem, 3.1vw, 3.35rem); }
}
.wordmark-symbol,
.logo:is(:hover,:focus-visible) .wordmark-symbol {
  width: 25px;
  height: 22px;
  margin-top: 4px;
  flex: none;
  border: 1.5px solid #13292b;
  border-radius: 6px 6px 9px 9px;
  background: linear-gradient(165deg,#d0f1f2 42%,var(--aqua) 43%);
  box-shadow: inset 2px 0 #f1ffff9e, 1px 2px 0 var(--strong-line);
  transform: rotate(-8deg);
}
.jar-lid {
  position: absolute;
  inset: -5px 1px auto;
  height: 6px;
  border: 1px solid #13292b;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg,#4e7f84 0 1px,#abdbdd 1px 3px);
}
.jar-face {
  position: absolute;
  inset: 7px 3px auto;
  height: 7px;
  background: radial-gradient(circle at 27% 40%,#13292b 0 1px,transparent 1.5px),
    radial-gradient(circle at 73% 40%,#13292b 0 1px,transparent 1.5px),
    radial-gradient(circle at 14% 90%,#faafbd 0 1.5px,transparent 2px),
    radial-gradient(circle at 86% 90%,#faafbd 0 1.5px,transparent 2px);
}
.jar-face::after {
  content: "";
  position: absolute;
  inset: 4px 35% auto;
  height: 3px;
  border-bottom: 1.5px solid #13292b;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .wordmark-symbol { animation: jar-wiggle 8s ease-in-out infinite; }
  .wordmark-text { animation: none; }
}
@keyframes jar-wiggle {
  0%, 19%, 100% { transform: rotate(-8deg); }
  5% { transform: translateY(-3px) rotate(7deg); }
  11% { transform: rotate(-13deg); }
  15% { transform: rotate(2deg); }
}

@media (max-width: 999px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .nav .language { margin-inline-start: auto; }
  .nav #account-open { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 4;
    inset: auto 10px max(6px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    min-height: 56px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 6px 20px #0003;
  }
  .mobile-nav :is(a,button), .mobile-nav .mobile-search {
    display: grid;
    grid-template-rows: 20px auto;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-height: 48px;
    width: 100%;
    height: auto;
    padding: 3px 1px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--quiet);
    box-shadow: none;
    text-decoration: none;
    text-transform: none;
    font-size: clamp(.64rem, 2vw, .8rem);
    font-weight: 560;
    line-height: 1.1;
    text-align: center;
  }
  .mobile-nav :is([aria-pressed="true"],[aria-current="page"],:hover,:focus-visible) {
    background: var(--wash);
    color: var(--ink);
  }
  .mobile-nav .mobile-search:hover { background: var(--aqua); color: var(--aqua-ink); }
  .mobile-nav .bottom-symbol {
    display: grid;
    place-items: center;
    position: relative;
    width: 20px;
    height: 20px;
    font-size: 21px;
    line-height: 1;
  }
  .bottom-symbol::before, .bottom-symbol::after { position: absolute; box-sizing: border-box; }
  .bottom-home::before {
    content: ""; width: 11px; height: 10px; top: 8px;
    border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 2px 2px;
  }
  .bottom-home::after {
    content: ""; width: 10px; height: 10px; top: 4px;
    border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg);
  }
  .bottom-grid::before {
    content: ""; width: 5px; height: 5px; top: 4px; left: 4px; border-radius: 1px;
    background: currentColor; box-shadow: 7px 0 currentColor, 0 7px currentColor, 7px 7px currentColor;
  }
  .bottom-search::before, .bottom-clock::before {
    content: ""; border: 1.5px solid currentColor; border-radius: 50%;
  }
  .bottom-search::before { width: 11px; height: 11px; inset: 3px auto auto 3px; }
  .bottom-search::after {
    content: ""; width: 7px; height: 1.5px; inset: 14px auto auto 11px;
    background: currentColor; transform: rotate(45deg);
  }
  .bottom-clock::before { width: 15px; height: 15px; }
  .bottom-clock::after {
    content: ""; width: 5px; height: 5px; inset: 5px auto auto 9px;
    border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  }
  .bottom-account::before {
    content: ""; width: 7px; height: 7px; top: 2px;
    border: 1.5px solid currentColor; border-radius: 50%;
  }
  .bottom-account::after {
    content: ""; width: 14px; height: 7px; bottom: 3px;
    border: 1.5px solid currentColor; border-radius: 8px 8px 2px 2px;
  }
}

.member-star {
  color: var(--accent);
  font-size: .65em;
  line-height: 1;
  letter-spacing: 0;
}
.account-benefit {
  margin-block: 12px;
  padding: 10px 12px;
  border-inline-start: 2px solid var(--accent);
}
.account-benefit p {
  margin: 4px 0 0;
  color: var(--quiet);
  font-size: .85em;
}

#tool-dialog {
  box-sizing: border-box;
  inset-block-end: auto;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  overscroll-behavior-y: contain;
}
#tool-result .download {
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  #tool-dialog {
    inset: max(8px, env(safe-area-inset-top)) 8px auto;
    width: auto;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  }
  #tool-result .download { min-height: 44px; }
}

.category-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  list-style: none;
  cursor: pointer;
}
.category-group > summary::-webkit-details-marker { display: none; }
.category-group > summary::after {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-inline-end: 3px;
}
.category-group[open] > summary::after { transform: rotate(225deg); }
.category-group:not([open]) > summary { margin-bottom: 0; }
#back-to-top {
  position: fixed;
  inset: auto max(10px, env(safe-area-inset-right)) 16px auto;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--strong-line);
  border-radius: 11px;
  box-shadow: 0 4px 16px #0003;
}
#back-to-top span {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border: solid currentColor;
  border-width: 2px 0 0 2px;
  transform: rotate(45deg);
}
#back-to-top:hover { background: var(--accent); color: var(--on-accent); }
@media (max-width: 999px) {
  #back-to-top { bottom: calc(max(6px, env(safe-area-inset-bottom)) + 6px); }
  body:has(#back-to-top:not([hidden])) .mobile-nav { right: calc(max(10px, env(safe-area-inset-right)) + 52px); }
}
@media (min-width: 1000px) {
  main.wrap, main.wrap:has(.explore-bar:not([hidden])), .footer.wrap {
    width: auto;
    margin-left: calc(var(--rail-width) + clamp(24px, 2.5vw, 48px));
    margin-right: max(64px, calc(env(safe-area-inset-right) + 60px));
  }
}
#member-look-title { display: block; margin-top: 10px; }
#member-looks { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0 8px; min-width: 0; }
#member-looks legend { padding-inline: 5px; font-size: .86rem; }
.member-look-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.member-look-options button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  color: var(--ink);
  padding: 8px;
  min-height: 44px;
  font-size: .8rem;
}
.member-look-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
:root[data-member-look] {
  color-scheme: dark;
  --sticker: var(--accent);
  --aqua: var(--accent);
  --aqua-ink: var(--on-accent);
}
:root[data-member-look] :is(#account-dialog,#donation-dialog) { background: var(--surface); }
:root[data-member-look="forest"] {
  --page: #172600;
  --surface: #302f27;
  --ink: #fbf6e8;
  --quiet: #d2c9b5;
  --line: #544e41;
  --strong-line: #756c57;
  --wash: #3d3e30;
  --accent: #c9e691;
  --on-accent: #172600;
  background:
    conic-gradient(from 155deg at 50% 18%, #a2c77724 0deg 50deg, transparent 51deg) 95% 110px/24px 34px no-repeat,
    conic-gradient(from 155deg at 50% 18%, #d3eb9b26 0deg 50deg, transparent 51deg) 97% 120px/16px 25px no-repeat,
    conic-gradient(from 155deg at 50% 18%, #8adb9a17 0deg 50deg, transparent 51deg) 92% 140px/28px 38px no-repeat,
    var(--page);
}
:root[data-member-look="night"] {
  --page: #000000;
  --surface: #171717;
  --ink: #fafafa;
  --quiet: #c4c4c4;
  --line: #373737;
  --strong-line: #616161;
  --wash: #202020;
  --accent: #eeeeee;
  --on-accent: #111111;
  background:
    radial-gradient(ellipse at 75% 9%, #ffffff0d, transparent 42%) 0 0/100% 560px no-repeat,
    radial-gradient(circle at 15% 20%,#ffffffb3 1px,transparent 1.8px) 0 0/147px 179px,
    radial-gradient(circle at 67% 60%,#ffffff65 .8px,transparent 1.5px) 31px 19px/59px 101px,
    radial-gradient(circle at 32% 74%,#ffffff36 .7px,transparent 1.35px) 7px 11px/41px 67px,
    radial-gradient(circle at 70% 14%,#ffffffd9 1.1px,#ffffff2e 2px,transparent 5px) 27px 41px/281px 257px,
    var(--page);
}
:root[data-member-look="office"] {
  color-scheme: light;
  --page: #e8e4d9;
  --surface: #f5f0e2;
  --ink: #30231d;
  --quiet: #5b4b3e;
  --line: #baac9b;
  --strong-line: #8a7768;
  --wash: #ded1ba;
  --accent: #823d23;
  --on-accent: #fff4df;
  background: repeating-linear-gradient(0deg,#7a593816 0 1px,transparent 1px 23px),var(--page);
}
:root[data-member-look="forest"] .logo .wordmark-symbol {
  background: linear-gradient(155deg,#e9f6bc 42%,#9dbd61 43%);
}
:root[data-member-look="forest"] .jar-lid {
  background: #628243;
}
:root[data-member-look="forest"] .jar-lid::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 5px;
  left: 5px;
  top: -5px;
  border-radius: 100% 0;
  background: #b4dd70;
  transform: rotate(-20deg);
}
:root[data-member-look="forest"] .member-star { color: #d5ed8c; }
:root[data-member-look="night"] .logo .wordmark-symbol {
  background: radial-gradient(circle at 72% 24%,white 0 1px,transparent 1.5px),linear-gradient(155deg,#f6f6f6 42%,#868686 43%);
}
:root[data-member-look="night"] .jar-lid { background: #777777; }
:root[data-member-look="night"] .member-star { color: #ffffff; text-shadow: 0 0 6px #ffffff99; }
:root[data-member-look="office"] .logo .wordmark-symbol { background: linear-gradient(150deg,#fff1d0 43%,#dda776 44%); }
:root[data-member-look="office"] .jar-lid { background: #82543c; }
:root[data-member-look="office"] .jar-face {
  inset: 4px 1px auto;
  height: 10px;
  background:
    radial-gradient(ellipse at 25% 48%, white 0 3.2px, #693416 3.3px 3.8px, transparent 4px),
    radial-gradient(ellipse at 75% 48%, white 0 3.2px, #693416 3.3px 3.8px, transparent 4px);
}
:root[data-member-look="office"] .jar-face::before {
  content: "";
  position: absolute;
  top: 1px;
  left: calc(25% - 1px);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #30231d;
  box-shadow: 10px 0 #30231d;
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-member-look="office"] .jar-face::before { animation: office-eye-roll 4.8s ease-in-out infinite; }
}
@keyframes office-eye-roll {
  0%, 66%, 100% { transform: translate(0,0); }
  72% { transform: translate(1px,4px); }
  80% { transform: translate(-2px,2px); }
  88% { transform: translate(0,-1px); }
}
:root[data-member-look="office"] .jar-face::after { top: 9px; border-radius: 0; transform: rotate(-12deg); }
:root[data-member-look="office"] .member-star {
  padding: 2px;
  background: #f6dc89;
  color: #693416;
  box-shadow: 1px 2px 0 #8459344d;
  transform: rotate(9deg);
}

:root[data-member-look="forest"] .category-group {
  background: #25251e;
}
:root[data-member-look="forest"] :is(.card,.quick-link,.directory-links a) {
  background: #38352d;
}
:root[data-member-look="night"] .category-group { background: #111111; }
:root[data-member-look="night"] :is(.card,.quick-link,.directory-links a) {
  background: #1d1d1d;
}
:root:is([data-member-look="forest"],[data-member-look="night"]) .category-heading {
  background: var(--wash);
  color: var(--ink);
  box-shadow: inset 3px 0 var(--category-color);
}
#support-reminder {
  position: fixed;
  z-index: 5;
  inset: auto max(12px,env(safe-area-inset-right)) 70px auto;
  display: grid;
  gap: 6px;
  width: min(260px, calc(100% - 24px));
  padding: 11px 41px 11px 13px;
  border: 1px solid var(--strong-line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 6px 22px #0004;
  color: var(--ink);
  font-size: .83rem;
}
#support-reminder a { width: fit-content; color: var(--accent); font-weight: 680; }
#support-dismiss {
  position: absolute;
  inset: 5px 5px auto auto;
  min-width: 32px;
  min-height: 32px;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
}
body:has(dialog[open]) #notice-stack #support-reminder { display: none; }
@media (max-width: 999px) {
  #support-reminder { bottom: calc(max(6px, env(safe-area-inset-bottom)) + 66px); }
  body:has(#support-reminder:not([hidden])) { padding-bottom: calc(164px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1000px) {
  body:has(#support-reminder:not([hidden])) { padding-bottom: 110px; }
}

/* A restrained top edge and short shadow keep adjacent panels distinct. */
:root {
  --panel-depth: inset 0 1px 0 #ffffff48, 0 2px 0 #22302515, 0 5px 13px #22302514;
  --card-depth: inset 0 1px 0 #ffffff3d, 0 2px 4px #22302519;
}
:root:is([data-theme="dark"],[data-member-look="forest"],[data-member-look="night"]) {
  --panel-depth: inset 0 1px 0 #ffffff15, 0 2px 0 #0008, 0 5px 13px #0005;
  --card-depth: inset 0 1px 0 #ffffff11, 0 2px 4px #0006;
}
:root[data-member-look="office"] {
  --panel-depth: inset 0 1px 0 #ffffff48, 0 2px 0 #38271721, 0 5px 13px #3827171a;
  --card-depth: inset 0 1px 0 #ffffff3d, 0 2px 4px #38271725;
}
:is(.hero,#catalog,.category-group,.sponsor-placement,.tool-intro,.directory-page,.content-page,#most-used) {
  box-shadow: var(--panel-depth);
}
:is(.card,.quick-link,.directory-links a) { box-shadow: var(--card-depth); }
:root[data-member-look="night"] {
  --local: #dedede;
  --local-ink: #161616;
}
:root[data-member-look="night"] [data-cat] {
  --category-bg: #242424;
  --category-color: #d2d2d2;
}

.mascot-logo {
  display: block;
  translate: 0 -2px;
  width: clamp(26px, 3vw, 34px);
  height: auto;
  flex: none;
  object-fit: contain;
}
@media (prefers-reduced-motion: no-preference) {
  .mascot-logo { animation: jar-wiggle 8s ease-in-out infinite; }
}
.support-heart { color: #e75578; white-space: nowrap; }
.count-roll {
  position: relative;
  display: inline-grid;
  overflow: hidden;
  vertical-align: top;
  perspective: 160px;
}
.count-roll > span { grid-area: 1 / 1; }
.count-in { animation: count-flip-in .52s cubic-bezier(.17,.67,.29,1) both; }
.count-out { animation: count-flip-out .52s cubic-bezier(.17,.67,.29,1) both; }
@keyframes count-flip-in {
  from { transform: translateY(95%) rotateX(-55deg); opacity: .45; }
  to { transform: translateY(0) rotateX(0); opacity: 1; }
}
@keyframes count-flip-out {
  from { transform: translateY(0) rotateX(0); opacity: 1; }
  to { transform: translateY(-95%) rotateX(55deg); opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  .count-in,.count-out { animation-duration: .001s; }
}

:root[data-member-look="forest"] {
  color-scheme: light;
  --page: #f1f2ed;
  --surface: #fbfcf7;
  --ink: #2e2d1d;
  --quiet: #525649;
  --line: #b9c0ad;
  --strong-line: #5b6d49;
  --wash: #e5e9dc;
  --accent: #0c3c01;
  --on-accent: #f1f2ed;
  --panel-depth: inset 0 1px 0 #fff9, 0 2px 0 #2e2d1d18, 0 5px 13px #2e2d1d17;
  --card-depth: inset 0 1px 0 #fff8, 0 2px 4px #2e2d1d19;
  background:
    conic-gradient(from 155deg at 50% 18%, #a2ac823a 0deg 50deg, transparent 51deg) 96% 105px/24px 34px no-repeat,
    conic-gradient(from 155deg at 50% 18%, #5b6d4929 0deg 50deg, transparent 51deg) 93% 135px/21px 31px no-repeat,
    var(--page);
}
:root[data-member-look="forest"] .hero {
  background: #0c3c01;
  color: #f1f2ed;
  border-color: #5b6d49;
}
:root[data-member-look="forest"] .hero h1 { color: inherit; }
:root[data-member-look="forest"] .category-group { background: #e5e9dc; }
:root[data-member-look="forest"] .category-heading { background: #a2ac82; color: #2e2d1d; }
:root[data-member-look="forest"] :is(.card,.quick-link,.directory-links a) { background: #fbfcf7; }
:root[data-member-look="forest"] .member-star { color: #5b6d49; }

#most-used .quick-link, #most-used .quick-link strong { font-weight: 400; }

#tool-dialog {
  width: min(1120px, calc(100vw - 36px)); padding: clamp(14px,2.3vw,28px);
  color: var(--ink); background: var(--surface); border-color: var(--strong-line);
}
#tool-dialog .dialog-bar { align-items: center; }
#tool-category { font-size: .76rem; font-weight: 600; letter-spacing: .065em; color: var(--quiet); }
#tool-dialog #close { min-height: 44px; min-width: 44px; }
.tool-toolbar { display: flex; align-items: center; gap: 8px; }
.tool-toolbar a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.tool-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); align-items: start; gap: 16px; }
.tool-workspace:has(.pdf-page-picker [open]) { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); }
.tool-settings, .tool-output { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--wash); padding: 14px; }
.tool-output:has(#tool-preview[hidden]):has(#tool-result:empty) { display: none; }
.tool-workspace:has(.tool-output #tool-preview[hidden]):has(#tool-result:empty) { grid-template-columns: minmax(0,1fr); }
.tool-workspace :is(.primary,.download,.copy,.file-order button,.pdf-page-picker button) { min-height: 44px; }
.tool-workspace :is(.download,.copy) { display: inline-flex; align-items: center; padding: 8px 12px; }
.tool-workspace :is(.download,.copy):hover { border-color: var(--accent); }
.tool-workspace .download:first-child { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.tool-workspace textarea { min-height: 7rem; }
.tool-workspace .tool-file-picker { padding: 10px; border: 1px dashed var(--strong-line); border-radius: 10px; background: var(--page); }
.tool-workspace .tool-file-picker.is-drop-target { border-color: var(--accent); }
.tool-workspace .tool-file-picker input[type="file"] { padding: 3px; border: none; background: transparent; }
.tool-file-picker input::file-selector-button { background: var(--accent); color: var(--on-accent); border: none; border-radius: 7px; font: inherit; padding: 10px 12px; min-height: 42px; margin-inline-end: 8px; cursor: pointer; }
.range-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.range-value { font-variant-numeric: tabular-nums; color: var(--quiet); }
.tool-workspace input[type="range"] { accent-color: var(--accent); min-height: 38px; padding-inline: 0; }
#tool-preview > label { margin-bottom: 10px; }
.image-comparison {
  --comparison-position: 50%; position: relative; isolation: isolate; display: grid; overflow: hidden; margin: 0;
  --checker: conic-gradient(var(--page) 25%,var(--surface) 0 50%,var(--page) 0 75%,var(--surface) 0) 0 0/18px 18px;
  border: 1px solid var(--line); border-radius: 10px; min-height: 112px;
  background: var(--checker);
}
.image-comparison img { grid-area: 1/1; width: 100%; height: 100%; max-height: min(53dvh,520px); min-height: 0; object-fit: contain; }
.comparison-output { background: var(--checker); clip-path: inset(0 0 0 var(--comparison-position)); }
.comparison-original,.comparison-label { position: absolute; top: 8px; z-index: 1; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; font-size: .72rem; pointer-events: none; }
.comparison-original { inset-inline-start: 8px; }
.comparison-label { inset-inline-end: 8px; }
.comparison-slider { position: absolute; z-index: 3; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: ew-resize; touch-action: pan-y; }
.image-comparison:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.comparison-marker { position: absolute; inset: 0 auto 0 var(--comparison-position); width: 2px; background: var(--ink); pointer-events: none; }
.comparison-marker::before { content: '↔'; display: grid; place-items: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border: 1px solid var(--strong-line); border-radius: 50%; color: var(--on-accent); background: var(--accent); }
.comparison-stats { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.comparison-stats div { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.comparison-stats dt,.comparison-dimensions,.tool-notice { font-size: .78rem; color: var(--quiet); }
.comparison-stats dd { margin: 4px 0 0; font-weight: 640; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.comparison-dimensions,.tool-notice { margin: 9px 0 0; }
.design-preview { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.tool-output .result-preview { margin-top: 10px; max-height: 250px; }
#tool-dialog[data-tool="image-compress"] .brew-overlay { position: static; display: block; padding: 0; margin-top: 8px; background: none; }
#tool-dialog[data-tool="image-compress"] .brew-panel { box-shadow: none; }
@media(max-width:720px){
  #tool-dialog { width: auto; }
  .tool-workspace,.tool-workspace:has(.pdf-page-picker [open]) { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .tool-settings,.tool-output { padding: 10px; }
  .image-comparison img { max-height: 46dvh; }
}


#analytics-options {
  position: fixed;
  z-index: 8;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  max-height: 55dvh;
  overflow: auto;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 5px 22px #0003;
}
#analytics-options h2 { margin: 0; font-size: .9rem; }
#analytics-options p { margin: 5px 0; font-size: .8rem; line-height: 1.4; }
#analytics-options details { margin-top: 6px; font-size: .8rem; }
#analytics-options summary { cursor: pointer; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.analytics-actions .copy { display: inline-block; margin: 0; font-size: .8rem; min-height: 34px; padding: 4px 8px; }
@media (max-width: 900px) {
  #analytics-options { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
#analytics-settings { margin-inline-start: 8px; }
.pdf-mode-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pdf-page-card[draggable=true] { cursor: grab; }
.pdf-page-card[data-drop-target] { outline: 2px solid var(--accent); }
.pdf-page-card canvas { pointer-events: none; }
.pdf-mode-controls > p { flex-basis: 100%; margin: 4px 0; }
.pdf-mode-controls :is(select,input) { width: auto; max-width: 100%; }
.pdf-mode-controls input[type=number] { width: 7rem; }
#tool-dialog:is([data-tool="pdf-split"],[data-tool="pdf-reorder"]) { width: min(96vw, 1260px); }
#tool-dialog:is([data-tool="pdf-split"],[data-tool="pdf-reorder"]) .tool-workspace { grid-template-columns: minmax(0,1fr); }
.directory-links a:has(.icon) { display: inline-flex; align-items: center; gap: .55rem; }
.directory-links .icon { width: 1.8rem; height: 1.8rem; }

#most-used h2, #catalog[data-view="all"] #catalog-title {
  display: inline-block;
  max-width: 100%;
  padding: .29em .62em;
  border: 1px solid var(--strong-line);
  border-radius: 5px;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 38%, var(--page));
  line-height: 1.3;
}
#rail-extras #most-used h2 { color: var(--on-accent); }
#catalog[data-view="all"] .catalog-head { align-items: center; }
#catalog[data-view="favorites"] .catalog-head { margin-bottom: .35rem; }
#catalog[data-view="favorites"] .empty { margin: 0; padding-block: .3rem .5rem; }
[data-info="privacy"] .content-page section { border-top: 0; padding-block: 1.05rem; }
[data-info="privacy"] .content-page h2 {
  margin-block-end: .65rem;
  padding-block-end: .4rem;
  border-block-end: 1px solid var(--line);
}
[data-info="privacy"] .content-page p { max-inline-size: 65ch; line-height: 1.75; }

.directory-links { grid-auto-rows: 1fr; }
.directory-links li { min-width: 0; }
.directory-links a:has(.icon) {
  display: flex;
  width: 100%;
  min-height: 58px;
  overflow-wrap: anywhere;
}
.directory-links .icon { flex: 0 0 1.8rem; }
#catalog .card[data-cat], #most-used .quick-link[data-cat] {
  background: color-mix(in srgb, var(--category-bg) 18%, var(--surface));
  border-block-end-color: color-mix(in srgb, var(--category-color) 36%, var(--line));
}
#most-used .quick-link[data-cat]:hover {
  background: color-mix(in srgb, var(--category-bg) 35%, var(--surface));
  color: var(--ink);
  border-color: var(--category-color);
}
.hero-typewriter {
  display: inline-grid;
  max-width: 100%;
  vertical-align: baseline;
  color: var(--hero-type-accent, var(--accent));
}
.hero-typewriter > span { grid-area: 1 / 1; }
.hero-type-line, .hero-type-spacer { white-space: nowrap; }
.hero-type-spacer { visibility: hidden; }
:root[data-member-look="forest"] .hero { --hero-type-accent: #c9e691; }
.hero-cursor { animation: hero-cursor-blink 1.05s step-end infinite; font-weight: 460; }
@keyframes hero-cursor-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-cursor, .hero-type-spacer { display: none; }
}

.hero-user-preview {
  display: inline-flex;
  align-items: center;
  gap: .44em;
  padding: .3em .75em;
  border: 1px solid var(--hero-type-accent, var(--accent));
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: .81rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.hero-user-star { line-height: 1; }

.hero:has(.hero-user-preview) {
  margin-block-start: 5px;
  padding-block-start: 6px;
}
.hero:has(.hero-user-preview) > div {
  display: grid;
  justify-items: start;
  gap: clamp(18px, 2.2vw, 28px);
  padding-inline: clamp(12px, 2vw, 24px);
}
.hero p.hero-user-preview { margin: 0; }
.hero:has(.hero-user-preview) h1 { justify-self: stretch; }
.hero h1:has(.hero-type-first) { max-width: none; text-wrap: initial; }
.hero-type-first, .hero-type-second {
  display: table;
  white-space: nowrap;
  font-size: var(--hero-fit, inherit);
}
.hero-typewriter { max-width: none; }

:root[data-member-look="forest"] {
  --page: #e2e9da;
  --surface: #f8f4e7;
  --ink: #1f3127;
  --quiet: #4b5c4b;
  --line: #b1beaa;
  --strong-line: #70866d;
  --wash: #d7e3cc;
  --accent: #265a40;
  --on-accent: #f6f3df;
  background: radial-gradient(ellipse at 88% 22%, #c4d5b8, transparent 40%), var(--page);
}
:root[data-member-look="forest"] .hero {
  --hero-type-accent: #dbeaa2;
  color: #f7f4df;
  border-color: #546e58;
  background:
    conic-gradient(from 150deg at 50% 18%, #a9c28b38 0 60deg, transparent 61deg) 98% 90%/72px 108px no-repeat,
    conic-gradient(from 151deg at 50% 15%, #142c2375 0 58deg, transparent 59deg) 92% 97%/106px 142px no-repeat,
    radial-gradient(ellipse at 88% 0%, #5e7950, transparent 64%),
    linear-gradient(135deg, #223e32, #305639);
}
:root[data-member-look="forest"] .category-group { background: #dde8d7; }
:root[data-member-look="forest"] .category-heading { background: #baceaf; color: #213a2b; }
:root[data-member-look="forest"] .directory-links a { background: var(--surface); }
[data-member-look="office"] .member-look-new, .member-look-new {
  display: inline-block;
  translate: 0 -1.5px;
  margin-inline-start: .45em;
  padding: .12em .45em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .72em;
  font-weight: 700;
  white-space: nowrap;
}
.member-look-options [aria-pressed="true"] .member-look-new { background: var(--on-accent); color: var(--accent); }

.footer { margin-block: 12px 0; padding-block: 10px 4px; }
.nav .logo { font-size: clamp(1.36rem, 2.16vw, 1.86rem); gap: 8px; }
.nav .mascot-logo { width: clamp(36px, 3.7vw, 46px); }
.nav .member-star { font-size: .9em; }
@media (max-width: 700px) {
  .nav .logo { font-size: clamp(1.05rem, 3.8vw, 1.34rem); gap: 4px; }
  .nav .mascot-logo { width: clamp(29px, 7.6vw, 36px); }
  .nav .member-star { font-size: .85em; }
}
@media (max-width: 999px) {
  body { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
  body:has(#support-reminder:not([hidden])) { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1000px) {
  body:has(#support-reminder:not([hidden])) { padding-bottom: 0; }
}
@media (max-width: 380px) {
  .nav { width: calc(100% - 16px); gap: 3px; }
  .nav select { max-width: 58px; }
  .nav :is(.local-menu summary,#theme,#donation-link,#donation-open) { width: 27px; }
}

.nav .logo { gap: 0; }
.nav .logo .member-star { margin-inline-start: 5px; }
@media (max-width: 700px) {
  .nav .logo .member-star { margin-inline-start: 3px; }
}
.account-benefit { margin-block: 10px; padding-block: 7px; }
.benefit-heading { display: flex; align-items: baseline; gap: .5rem; }
.benefit-check { color: var(--accent); font-size: .88em; font-weight: 800; }
.account-benefit #account-benefit-details { list-style: none; padding: 0; margin: .25rem 0; }
#account-benefit-details li { text-align: start; font-size: .86em; line-height: 1.4; }
#account-benefit-limit { margin-block: .15rem .4rem; }
#member-look-title { margin-top: 0; }
.member-look-options button[data-member-look="office"] { display: flex; align-items: center; justify-content: center; gap: .3em; }
.member-look-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-look-options .member-look-new { margin-inline-start: 0; flex: none; }
.account-sparkle { position: absolute; top: -4px; inset-inline-end: -10px; width: 12px; height: 10px; color: var(--accent); pointer-events: none; }
.account-sparkle::before,.account-sparkle::after {
  content: ""; position: absolute; background: currentColor;
  clip-path: polygon(50% 0,65% 36%,100% 50%,65% 64%,50% 100%,35% 64%,0 50%,35% 36%);
}
.account-sparkle::before { inset: 0 auto auto 0; width: 8px; height: 8px; }
.account-sparkle::after { inset: 5px 0 auto auto; width: 5px; height: 5px; }
@media (max-width: 400px) {
  .member-look-options button[data-member-look="office"] { padding-inline: 3px; gap: 3px; }
  .member-look-options .member-look-new { padding-inline: .28em; }
}

#notice-stack {
  position: fixed;
  z-index: 8;
  inset: auto max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(420px, calc(100% - 28px));
  pointer-events: none;
}
#notice-stack > :is(#analytics-options,#support-reminder) {
  position: relative;
  inset: auto;
  transform: none;
  max-width: 100%;
  pointer-events: auto;
}
#notice-stack #analytics-options { width: 100%; padding-inline-end: 38px; }
#analytics-options a { color: var(--accent); }
.analytics-dismiss {
  position: absolute;
  inset: 3px 3px auto auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}
@media (max-width: 999px) {
  #notice-stack { bottom: calc(74px + env(safe-area-inset-bottom)); }
}

#tool-dialog #support-reminder { position: fixed; margin: 0; inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto; }
#tool-dialog #support-reminder[popover]:not(:popover-open) { display: none; }

.account-remember {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  min-height: 32px;
  color: var(--ink);
  font-size: .85rem;
  cursor: pointer;
}
.account-remember input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.explore-bar {
  background: var(--surface);
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface) 92%, var(--accent)), var(--surface) 78%);
  border-color: color-mix(in srgb, var(--line) 72%, var(--accent));
  box-shadow: inset 0 1px color-mix(in srgb, var(--accent) 20%, transparent),
              0 3px 0 color-mix(in srgb, var(--line) 60%, transparent);
}
.explore-bar .explore-label { color: var(--ink); font-weight: 680; }

/* Use the same theme palette for the mobile strip and desktop category panel. */
:root {
  --explore-fill: #286c65;
  --explore-edge: #194d46;
  --explore-ink: #fff;
  --explore-decoration: none;
}
:root[data-theme="dark"] {
  --explore-fill: #89d3cc;
  --explore-edge: #4a9590;
  --explore-ink: #102f30;
}
:root[data-member-look="night"] {
  --explore-fill: #e4e9f2;
  --explore-edge: #929db7;
  --explore-ink: #17233a;
  --explore-decoration: radial-gradient(circle at 94% 9%, #67779e 1px, transparent 2px),
                         radial-gradient(circle at 5% 92%, #7487ac 1px, transparent 2px),
                         linear-gradient(110deg,#f1f3fb,#ccd6e9);
}
:root[data-member-look="forest"] {
  --explore-fill: #cbd5aa;
  --explore-edge: #617b49;
  --explore-ink: #233721;
  --explore-decoration: repeating-linear-gradient(125deg,#526d41 0 2px,#a4b782 2px 6px) top / 100% 4px no-repeat;
}
:root[data-member-look="office"] {
  --explore-fill: #783d25;
  --explore-edge: #4f291a;
  --explore-ink: #fff5e2;
}
.explore-bar, .desktop-rail .rail-categories {
  color: var(--explore-ink);
  background: var(--explore-decoration) var(--explore-fill);
  border: 1px solid var(--explore-edge);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--explore-edge), inset 0 1px #ffffff55;
}
.desktop-rail .rail-categories { margin-block: 8px 12px; padding: 10px; }
.explore-bar .explore-label, .desktop-rail .rail-categories h2 { color: inherit; }
:root :is(.explore-bar, .desktop-rail .rail-categories) a[data-cat] {
  color: #182421;
  background: #f5f4eb;
  box-shadow: inset 3px 0 var(--category-color, #89d3cc);
  border-radius: 7px;
}
:root :is(.explore-bar, .desktop-rail .rail-categories) a[data-cat]:is(:hover,:focus-visible) {
  background: color-mix(in srgb,#f5f4eb 60%,var(--category-color,#89d3cc));
  color: #182421;
}
:root[data-member-look="night"] :is(.explore-label,.rail-categories h2)::before { content: '✦ '; }
:root[data-member-look="forest"] :is(.explore-label,.rail-categories h2)::before { content: '❧ '; }
:root[data-theme="dark"] .explore-bar .filters a[data-cat]:not(:hover):not(:focus-visible) {
  background: #f5f4eb;
  border-color: #18242155;
}
.desktop-rail .rail-categories .rail-count { color: #495952; }

/* The category names label the controls; the navigation keeps its accessible name. */
.explore-bar .explore-label, .desktop-rail .rail-categories h2 { display: none; }
.explore-bar .filters { width: 100%; }
:root:not([data-member-look="night"], [data-member-look="forest"], [data-member-look="office"]) {
  --explore-fill: var(--accent);
  --explore-edge: color-mix(in srgb, var(--accent) 70%, #0c2224);
}
:root :is(.explore-bar .filters, .desktop-rail .rail-categories) a[data-cat] {
  min-height: 36px;
  border: 1px solid #18242166;
  border-inline-start: 3px solid var(--category-color, #89d3cc);
  box-shadow: 0 2px 0 #18242155, inset 0 1px #fff;
}
:root :is(.explore-bar .filters, .desktop-rail .rail-categories) a[data-cat]:focus-visible {
  outline: 2px solid #182421;
  outline-offset: -4px;
}
:root :is(.explore-bar .filters, .desktop-rail .rail-categories) a[data-cat]:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px #18242140;
}

/* Keep the shell snug while preserving each category's hit area. */
.explore-bar:not([hidden]) { padding-block: 3px; }
.explore-bar .filters { padding-block: 2px 3px; }
.desktop-rail .rail-categories { padding-block: 5px 6px; }

.explore-bar:not([hidden]) { padding-block: 2px; }
.explore-bar .filters { padding-block: 1px 2px; }
:root .explore-bar .filters a[data-cat] { padding-block: 4px; }
.desktop-rail .rail-categories { padding-block: 3px 4px; }
.desktop-rail #rail-categories { row-gap: 2px; }
:root .desktop-rail .rail-categories a[data-cat] { min-height: 33px; padding-block: 2px; }

.csv-column-pick { margin: 0; min-height: 36px; white-space: nowrap; }
#tool-result a[download] { overflow-wrap: anywhere; max-width: 100%; }

.design-live-value { display: block; margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#tool-preview .design-preview { margin-bottom: 6px; }
.tool-clear-text { min-height: 38px; }

@media (max-width: 999px) {
  #main-content { --home-toolbar-gap: 12px; }
  #main-content > .explore-bar {
    position: static;
    margin-block: var(--home-toolbar-gap) 0;
  }
  #main-content > .explore-bar:not([hidden]) + .hero {
    margin-block-start: var(--home-toolbar-gap);
    padding-block-start: 0;
  }
  .category-group, #catalog { scroll-margin-top: 74px; }
}
@media (max-width: 620px) {
  .category-group, #catalog { scroll-margin-top: 68px; }
}

.rail-coming-soon { display: none; }
@media (min-width: 1000px) {
  .desktop-home-layout #main-content {
    --desktop-home-gutter: clamp(16px, 1.6vw, 28px);
    margin-inline-start: calc(var(--rail-width) + var(--desktop-home-gutter));
    margin-inline-end: var(--desktop-home-gutter);
  }
  .desktop-home-layout .workspace:has(> .dashboard-extras) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .desktop-home-layout .dashboard-extras #most-tools {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 158px), 1fr));
  }
  .desktop-home-layout .desktop-rail .rail-categories {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .desktop-home-layout .rail-coming-soon {
    display: block;
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--accent);
    border-radius: 9px;
    background: var(--wash);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 650;
  }
  .desktop-home-layout .hero h1[data-hero-inline] { white-space: nowrap; }
  .desktop-home-layout .hero h1[data-hero-inline] :is(.hero-type-first,.hero-type-second) {
    display: inline-block;
    vertical-align: baseline;
  }
  .desktop-home-layout .hero h1[data-hero-inline] .hero-type-first { margin-inline-end: .28em; }
}
@media (min-width: 1190px) {
  .desktop-home-layout .dashboard-extras #most-tools { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

@media (max-width: 999px) {
  #main-content > .explore-bar {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

.tool-intro .core-tool-detail { max-width: 68ch; }
.tool-intro .core-tool-limits { margin-block: 5px 12px; font-size: .82rem; }

.localized-file-picker { position: relative; display: inline-grid; justify-self: start; align-items: center; }
.localized-file-picker > span { min-height: 44px; display: grid; align-items: center; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 650; }
.tool-workspace .localized-file-picker > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.localized-file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

@media (min-width: 1000px) {
  #tool-dialog[open]:not(:modal) {
    inset: var(--header-height) 0 0 var(--rail-width);
    width: auto;
    height: auto;
    max-height: none;
    z-index: 6;
    border-radius: 0;
    box-shadow: none;
    padding: 0 clamp(20px, 2.2vw, 36px) clamp(20px, 2.2vw, 36px);
  }

  #tool-dialog[open]:not(:modal) .dialog-bar {
    position: sticky;
    top: 0;
    z-index: 4;
    padding-block: 14px 12px;
    background: var(--surface);
  }

  html:has(.desktop-tool-open) { overflow: hidden; }
  .desktop-tool-open :is(#notice-stack, #back-to-top) { visibility: hidden; }
}
