/* Cream Glass Atelier: shared, bounded decoration. Image canvases stay neutral. */
body {
  --glass-bg: #102438e8;
  --glass-line: #7898ae35;
  --glass-shine: #ffffff0b;
  --glass-shadow: 0 14px 34px #02091424;
  --polish-copy: #edf6ff;
  --polish-muted: #adc4d3;
  --polish-accent: #91e1c7;
  --polish-field: #091b2c;
  --polish-soft: #1a3448;
  --polish-border: #3b596f;
  --polish-ease: cubic-bezier(.2,.8,.25,1);
}
body.theme-light {
  --glass-bg: #fffaf3e8;
  --glass-line: #c79e9455;
  --glass-shine: #ffffffd9;
  --glass-shadow: 0 12px 32px #95625312;
  --polish-copy: #4c3540;
  --polish-muted: #795d66;
  --polish-accent: #316f5e;
  --polish-field: #fffefd;
  --polish-soft: #f8eae3;
  --polish-border: #dec5bb;
}
body .cat-hero,
body .cat-tool-hero,
body.cat-project-page header,
body .search-shell,
body #adminPanel.is-modal,
body .floating-search,
body .copy-toast {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-shine), var(--glass-shadow);
  color: var(--polish-copy);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body .cat-hero, body .cat-tool-hero, body.cat-project-page header,
  body .search-shell, body #adminPanel.is-modal, body .floating-search, body .copy-toast {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}
body .cat-hero, body .cat-tool-hero, body.cat-project-page header {
  border-radius: 18px;
  padding: 13px 18px;
  gap: 16px;
}
body .cat-hero { flex-wrap: wrap; }
body.cat-project-page header { box-sizing: border-box; flex-wrap: wrap; width: min(1500px,calc(100% - 34px)); margin-top: 24px; }
body.cat-project-page header > p { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.7; color: var(--polish-muted); }
body.cat-project-page .project-brand { flex: 1; min-width: min(100%,350px); }
body.cat-project-page .project-brand .brand-mark { flex: none; }
body.cat-project-page .project-brand h1 { font-size: 26px; }
body.cat-project-page .project-brand p { font-size: 13px; }
body.cat-project-page .project-actions > a, body.cat-project-page .project-actions > button { white-space: nowrap; }
body.cat-project-page .card { padding-bottom: 38px; }
body .cat-hero .brand-copy h1 { font-size: 19px; }
body .cat-hero .brand-copy p { color: var(--polish-muted); }
body .hero-actions { flex-wrap: wrap; row-gap: 8px; }
body .hero-actions button, body .tool-back, body .project-actions button { min-height: 32px; padding: 6px 11px; border-radius: 10px; }
body .hero-actions #indexBadge { font-size: 11px; }
body #adminPanel.is-modal { width: auto; inset: 18px; max-width: 1480px; }
body .admin-head > div { min-width: 0; }
body #adminClose { flex: none; white-space: nowrap; }
body.cat-tool-page.theme-light .check, body.cat-tool-page.theme-light .result-card b, body.cat-tool-page.theme-light .qa-table { color: var(--polish-copy); }
body.cat-tool-page.theme-light .ghost, body.cat-tool-page.theme-light .button, body.cat-tool-page.theme-light .sprite-cell { color: var(--polish-copy); background: var(--polish-field); border-color: var(--polish-border); }
body.cat-tool-page.theme-light .primary { color: #fff; background: #a64560; border-color: #a64560; }
body.cat-tool-page.theme-light .green { color: #316f5e; background: #e4f3ea; border-color: #9dcdb7; }
body.cat-tool-page.theme-light .empty { color: var(--polish-muted); border-color: var(--polish-border); }
body.cat-tool-page.theme-light .badge { color: var(--polish-muted); background: var(--polish-soft); border-color: var(--polish-border); }
body.cat-tool-page.theme-light .qa-table th { color: #316f5e; }
body.cat-tool-page.theme-light .qa-table :is(th,td) { border-color: var(--polish-border); }
body.cat-tool-page.theme-light .pass { color: #25744e; }
body.cat-tool-page.theme-light .warn { color: #90520d; }
body.cat-tool-page.theme-light .fail { color: #aa3459; }
body .motion-setting { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--polish-muted); font-size: 12px; }
body .motion-setting select { width: auto; min-height: 32px; margin: 0; padding: 4px 23px 4px 9px; border: 1px solid var(--polish-border); border-radius: 10px; background-color: var(--polish-field); color: var(--polish-copy); font: inherit; cursor: pointer; }
body .hero-showcase { min-height: 288px; padding: 26px 34px; margin: 18px 0; border-radius: 24px; }
body .showcase-copy h2 { font-size: clamp(32px,3.5vw,50px); }
body .showcase-art { min-height: 238px; }
body .showcase-art img { max-height: 282px; }
body .showcase-mini-stats { margin-top: 21px; }
body .showcase-mini-stats small, body .showcase-copy p { color: var(--polish-muted); }
body .search-shell { position: relative; padding: 18px 22px 16px; }
body .search-title { position: relative; align-items: center; }
body .search-title h2 { font-size: 19px; }
body .search-shell .searchbar { border-radius: 16px; }
body .search-shell .searchbar input { min-width: 0; font-size: 15px; }
body .search-meta, body .section-heading>span { color: var(--polish-muted); }
body .quick-searches button { min-height: 30px; padding: 5px 12px; font-size: 12px; }
body .quick-collections { margin: 22px 0 18px; }
body .collection-card { min-height: 112px; padding: 14px 16px; }
body .collection-card .collection-icon { width: 30px; height: 30px; margin-bottom: 8px; }
body .collection-card small { color: var(--polish-muted); }
body .card { border-radius: 18px; box-shadow: 0 4px 12px #02091409; }
body .card:hover { box-shadow: 0 10px 24px #02091418; border-color: var(--ui-border); }
body .card .body { padding: 15px 14px; gap: 10px; }
body .card h3 { font-size: 15px; line-height: 1.4; }
body .card .sub { min-height: 0; margin: 0; font-size: 12px; line-height: 1.6; }
body .card .tags-primary { margin: 0; min-height: 25px; align-items: center; gap: 5px; }
body .card .tag { font-size: 11px; padding: 3px 7px; border-radius: 7px; }
body .card .asset-id { gap: 6px; flex-wrap: wrap; margin: 0; }
body .card .asset-id code { font-size: 11px; overflow-wrap: anywhere; }
body .card .copy-id { font-size: 11px; min-height: 29px; min-width: 4.5em; border-radius: 8px; }
body .copy-id.copied { color: var(--ui-success); border-color: var(--ui-success); background: var(--ui-tint); }
body .card .asset-actions { padding-top: 11px; border-top: 1px solid var(--ui-border-soft); gap: 8px; }
body .card .asset-actions a { font-size: 12px; padding-block: 4px; }
body .card .admin-load { min-height: 30px; border-radius: 9px; font-size: 12px; }
body .card-details { width: 100%; color: var(--ui-muted); font-size: 12px; }
body .card-details summary { width: fit-content; cursor: pointer; padding: 5px 0; color: var(--ui-muted); list-style-position: inside; user-select: none; }
body .card-details summary:hover { color: var(--ui-link); }
body .card-details-content { margin-top: 5px; padding: 10px; border: 1px solid var(--ui-border-soft); border-radius: 10px; background: var(--ui-field); }
body .card-details-content .meta { margin-top: 10px; gap: 6px; flex-wrap: wrap; }
body .card .tags-secondary { margin-top: 8px; }
body .card .tags-secondary .tag { overflow-wrap: anywhere; }
body .detail-kind { overflow-wrap: anywhere; }
body #chips { display: flex; flex-wrap: wrap; gap: 7px; }
body #chips[hidden] { display: none; }
body .filters, body .content, body #results, body #projectHits { scroll-margin-top: 90px; }
body .chip-removable { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; padding: 6px 10px 6px 12px; border: 1px solid var(--polish-border); border-radius: 999px; background: var(--polish-soft); color: var(--polish-copy); font-size: 12px; max-width: 100%; text-align: left; }
body .chip-label { overflow-wrap: anywhere; }
body .chip-remove { font-size: 16px; line-height: 16px; color: var(--polish-muted); }
body .chip-removable:hover { border-color: var(--polish-accent); }
body .copy-toast { position: fixed; bottom: 24px; right: 24px; z-index: 1300; padding: 14px 18px 14px 55px; border-radius: 16px; max-width: min(420px,calc(100vw - 32px)); font-size: 13px; line-height: 1.5; pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(8px); transition: opacity .18s ease,transform .22s var(--polish-ease),visibility .22s; overflow-wrap: anywhere; }
body .copy-toast::before { content: ''; position: absolute; width: 40px; height: 40px; left: 9px; top: 50%; margin-top: -20px; background: url('ui-assets/cat-mascot-v1.png') center / contain no-repeat; }
body .copy-toast.is-visible { visibility: visible; opacity: 1; transform: none; }
body .search-companion { display: flex; align-items: center; gap: 3px; margin-left: auto; margin-right: 15px; color: var(--polish-accent); font-size: 12px; }
body .search-companion img { height: 47px; width: 47px; object-fit: contain; transform-origin: 50% 85%; }
body .search-companion span { max-width: 130px; }
body .floating-search { position: fixed; z-index: 80; top: 12px; left: 50%; transform: translateX(-50%); width: min(820px,calc(100% - 32px)); display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px; }
body .floating-search[hidden] { display: none; }
body .floating-search img { width: 34px; height: 34px; object-fit: contain; }
body .floating-search input { flex: 1; width: 0; min-width: 60px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--polish-border); background: var(--polish-field); color: var(--polish-copy); font: inherit; font-size: 14px; }
body .floating-search button { min-height: 36px; padding: 7px 14px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
body .floating-search .floating-count { flex: none; max-width: 145px; font-size: 11px; color: var(--polish-muted); }
body .floating-search .floating-submit { background: linear-gradient(130deg,#ff9b79,#f585a0); border: 1px solid #ee8b8e; color: #432831; font-weight: 700; }
body .floating-search .floating-filters { color: var(--polish-copy); border: 1px solid var(--polish-border); background: var(--polish-field); }
body button, body .card, body .collection-card, body summary {
  transition: background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .22s var(--polish-ease),color .18s ease;
}
body button:not(:disabled):active { transform: scale(.975); }
body :is(button,a,input,select,summary):focus-visible { outline: 2px solid var(--polish-accent); outline-offset: 3px; }
html[data-motion='full'] body { --polish-ease: cubic-bezier(.2,1.45,.45,1); }
html[data-motion='full'] .search-companion.is-reacting img { animation: cat-greeting .65s ease both; }
html[data-motion='light'] .search-companion.is-reacting span { animation: gentle-feedback .35s ease both; }
html:not([data-motion='off']) #adminPanel.is-modal:not([hidden]),
html:not([data-motion='off']) .image-viewer:not([hidden]) { animation: panel-arrive .22s ease both; }
@keyframes cat-greeting { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg) translateY(-2px); } 65% { transform: rotate(7deg) translateY(-1px); } }
@keyframes gentle-feedback { from { opacity: .4; } to { opacity: 1; } }
@keyframes panel-arrive { from { opacity: 0; } to { opacity: 1; } }
/* Disable all decorative motion, including legacy hover transforms. */
html[data-motion='off'] *, html[data-motion='off'] *::before, html[data-motion='off'] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion='off'] button:hover, html[data-motion='off'] button:active, html[data-motion='off'] .card:hover, html[data-motion='off'] .card:focus-within, html[data-motion='off'] .tool-card:hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  body button:hover, body button:active, body .card:hover, body .card:focus-within, body .tool-card:hover { transform: none; }
}
@media (min-width:1250px) {
  body .search-shell { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 14px 20px; }
  body .search-title { margin: 0; }
  body .search-title kbd { display: none; }
  body .search-companion { position: absolute; top: -46px; right: -6px; margin: 0; }
  body .search-companion span { padding: 4px 7px; border-radius: 8px; background: var(--glass-bg); }
  body .search-meta { grid-column: 1 / -1; margin: 0; }
}
@media (max-width:860px) {
  body .cat-hero { padding: 12px 14px; gap: 12px; }
  body .hero-showcase { padding: 25px; }
  body .showcase-art { min-height: 220px; }
  body .search-companion span { display: none; }
  body .floating-search .floating-count { display: none; }
  body .search-shell { padding: 16px; }
}
@media (max-width:560px) {
  body .cat-hero .brand-copy h1 { font-size: 16px; white-space: normal; }
  body .brand-copy p { line-height: 1.5; }
  body .hero-actions { gap: 7px; }
  body .motion-setting { justify-content: center; }
  body .hero-showcase { padding: 23px 20px; }
  body .showcase-copy h2 { font-size: 32px; }
  body .showcase-art { width: 124px; height: 134px; min-height: 0; opacity: 1; right: 0; bottom: 0; }
  body .showcase-art img { max-height: 134px; }
  body .showcase-art :is(.art-orbit,.art-spark,.art-sticker) { display: none; }
  body .showcase-link { display: none; }
  body .showcase-mini-stats { gap: 14px; }
  body.cat-project-page .project-brand { min-width: 0; width: 100%; flex-basis: 100%; }
  body.cat-project-page .project-brand h1 { font-size: 20px; }
  body .search-title h2 { font-size: 17px; }
  body .search-companion { margin-right: 4px; }
  body .search-companion img { width: 38px; height: 38px; }
  body .copy-toast { right: 16px; bottom: 16px; }
  body .floating-search { top: 8px; padding: 8px; gap: 6px; }
  body .floating-search img { display: none; }
  body .floating-search button { padding: 7px 10px; }
  body .section-heading>span { display: none; }
}
