/* Neutral grayscale palette: quiet surfaces with a clear orange accent. */
:root {
  --bg: #e6e7e4;
  --paper: #f5f5f3;
  --ink: #252624;
  --muted: #70716d;
  --line: #d1d2cf;
  --shadow: 0 12px 30px #25262410;
}

body { --photo-background: #fdfdfd; }
body.dark { --photo-background: #383934; }

.image-button,
.image-wrap,
.image-wrap img,
.detail-image,
.detail-image img,
#detail.image-zoomed .detail-image { background-color: var(--photo-background); }

.card .condition { background: var(--paper); }

body.dark {
  --bg: #181917;
  --paper: #282925;
  --ink: #f4f5f0;
  --muted: #b8bab2;
  --line: #4c4e48;
  --shadow: 0 12px 30px #0005;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 21px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.search > .material-symbols-rounded { font-size: 27px; }
.search input[type="search"] { -webkit-appearance:none; appearance:none; background:transparent !important; box-shadow:none !important; color:var(--ink); }
.search input[type="search"]:focus { background:transparent !important; }
.search input[type="search"]:-webkit-autofill,
.search input[type="search"]:-webkit-autofill:hover,
.search input[type="search"]:-webkit-autofill:focus { -webkit-text-fill-color:var(--ink); -webkit-box-shadow:0 0 0 1000px var(--paper) inset !important; caret-color:var(--ink); }
.search-secret-help { position:relative; }
.show-search-secret-help .search-secret-help:hover::after {
  content:attr(data-secret-tooltip);
  position:absolute;
  z-index:40;
  top:calc(100% + 12px);
  left:-12px;
  width:max-content;
  max-width:min(330px,calc(100vw - 32px));
  border:1px solid var(--line);
  border-radius:4px;
  background:var(--paper);
  color:var(--ink);
  box-shadow:0 3px 8px #0004;
  padding:10px 12px;
  font-family:Outfit,Arial,sans-serif;
  font-size:13px;
  font-weight:500;
  line-height:1.55;
  white-space:pre-line;
  pointer-events:none;
}
.view-buttons button { display: grid; place-items: center; padding: 0; }
.view-buttons .material-symbols-rounded { display: block; font-size: 24px; line-height: 1; transform: translateY(1px); }
.filter-toggle { align-items: center; gap: 6px; }
.filter-toggle .material-symbols-rounded { font-size: 20px; }
.brick.material-symbols-rounded { display: inline-grid; font-size: 18px; }
.topbar .brand { position: relative; display: inline-flex; align-items: center; min-width: 0; gap: 5px; font-family: 'Barlow Condensed', sans-serif; font-size: clamp(20px, 2.6vw, 26px); line-height: 34px; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap; }
.card .brand { font-family: Outfit, Arial, sans-serif; font-size: 14px; font-weight: 400; letter-spacing: normal; }
.brand-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; margin-right: 0; }
.brand-icon::before,
.brand-icon::after { content: ''; grid-area: 1 / 1; width: 28px; height: 28px; background: center / contain no-repeat; }
.brand-icon::before { background-image: url('lego-head.svg?v=8#outline'); }
.brand-icon::after { background-image: url('lego-head.svg?v=8#outline-face'); visibility: hidden; }
.dark .brand-icon::before { background-image: url('lego-head.svg?v=8#filled'); }
.dark .brand-icon::after { background-image: url('lego-head.svg?v=8#filled-face'); }
.brand-icon[role="button"] { cursor: pointer; border-radius: 6px; transition: transform .16s ease, opacity .16s ease; }
@media (hover:hover) {
  .brand-icon[role="button"]:hover { transform: translateY(-1px) scale(1.06); }
  .brand-icon[role="button"]:hover::before { visibility: hidden; }
  .brand-icon[role="button"]:hover::after { visibility: visible; }
}
.brand-icon[role="button"]:active { opacity: .72; transform: scale(.94); }
.brand-icon[role="button"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; }
.brand-icon img { grid-area: 1 / 1; display: block; width: 28px; height: 28px; object-fit: contain; visibility: hidden !important; }
.brand-icon-filled { visibility: hidden; }
.dark .brand-icon-outline { visibility: hidden; }
.dark .brand-icon-filled { visibility: visible; }
.brand .brand-name { font-weight: 400; cursor: default; }
.brand .brand-name { display: inline-block; transform: translateY(-1px) scaleY(1.18); transform-origin: center; }
.brand-accent { position: relative; border: 0; background: transparent; color: var(--accent); padding: 0; font: inherit; font-weight: 400; letter-spacing: inherit; line-height: inherit; transform: translateY(-1px) scaleY(1.18); transform-origin: center; }
.demo-badge { flex: 0 0 auto; align-self: flex-end; margin-left: 2px; border-radius: 4px; background: var(--accent); color: var(--paper); padding: 3px 5px 2px; font-family: Outfit, Arial, sans-serif; font-size: 8px; font-weight: 700; line-height: 1; letter-spacing: .5px; cursor: default; user-select: none; -webkit-user-select: none; transform: translateY(2px); }
.demo-badge[hidden] { display: none; }
@keyframes collector-rainbow-glimmer {
  0% { opacity: 0; background-position: 100% 50%; }
  16% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; background-position: 0% 50%; }
}
@media (hover: hover) {
  .brand-accent::after {
    content: 'COLLECTOR';
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(105deg, #ff3b30, #ffcc00, #34c759, #00c7ff, #5856d6, #ff2d95, #ff3b30);
    background-size: 260% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    opacity: 0;
    pointer-events: none;
  }
  .brand-accent:hover::after,
  .brand-accent:focus-visible::after {
    animation: collector-rainbow-glimmer .62s ease-out both;
  }
}
@media (min-width: 601px) {
  #detail.image-zoomed .close,
  #detail.image-zoomed .close .material-symbols-rounded {
    user-select: none;
    -webkit-user-select: none;
  }
}
@media (max-width:600px) {
  .quick-search.is-visible { position:fixed; top:82px; right:max(8px,env(safe-area-inset-right)); z-index:26; display:flex; justify-content:flex-end; width:51px; height:51px; border:1px solid var(--line); border-radius:4px; background:var(--paper); color:var(--ink); box-shadow:0 3px 8px #0004; overflow:hidden; transition:width .2s ease,box-shadow .16s ease; }
  .quick-search.is-visible.is-open { width:70vw; box-shadow:0 3px 8px #0004; }
  .quick-search input { order:1; width:0; min-width:0; height:49px; border:0; outline:0; background:transparent; color:var(--ink); padding:0; opacity:0; transition:width .2s ease,padding .2s ease,opacity .14s ease; }
  .quick-search.is-open input { width:calc(100% - 50px); padding:0 14px; opacity:1; }
  .quick-search button { order:2; display:grid; place-items:center; flex:0 0 50px; width:50px; height:49px; border:0; background:transparent; color:inherit; padding:0; }
  .quick-search .material-symbols-rounded { font-size:27px; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-accent:hover::after,
  .brand-accent:focus-visible::after { animation: none; }
}
.accent-picker { position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; width: 196px; padding: 14px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); font-family: Outfit, sans-serif; font-size: 12px; line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: normal; }
.accent-picker > span { display: block; margin-bottom: 10px; font-weight: 600; }
.accent-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.accent-swatches button { width: 100%; aspect-ratio: 1; border: 2px solid var(--paper); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); }
.accent-swatches button.active { box-shadow: 0 0 0 2px var(--ink); }
.open-custom-accent { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 10px; border: 0; background: transparent; color: var(--muted); padding: 7px 0 0; font-size: 12px; }
.open-custom-accent .material-symbols-rounded { font-size: 17px; }
.custom-color-panel { margin-top: 10px; }
.color-picker-field { display: grid; grid-template-columns: 1fr; gap: 8px; }
#colorCanvas { display: block; width: 168px; height: 112px; border: 1px solid var(--line); cursor: crosshair; }
#colorHue { width: 168px; height: 12px; margin: 0; padding: 0; appearance: none; background: linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); cursor: pointer; }
#colorHue::-webkit-slider-runnable-track { height: 12px; background: transparent; border: 1px solid var(--line); }
#colorHue::-webkit-slider-thumb { appearance: none; width: 5px; height: 16px; margin-top: -3px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); }
#colorHue::-moz-range-track { height: 12px; background: transparent; border: 1px solid var(--line); }
#colorHue::-moz-range-thumb { width: 5px; height: 16px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); }
.custom-color-value { display: grid; grid-template-columns: 28px 1fr; gap: 8px; margin-top: 9px; }
#customColorPreview { border: 1px solid var(--line); background: var(--picker-color); }
#customHex { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 6px 7px; font-family: Outfit, sans-serif; font-size: 11px; text-transform: uppercase; }
.color-number-row { display: grid; grid-template-columns: 28px repeat(3, 1fr); align-items: center; gap: 5px; margin-top: 7px; color: var(--muted); font-family: Outfit, sans-serif; font-size: 10px; }
.color-number-control { display: grid; grid-template-columns: minmax(0, 1fr) 11px; gap: 2px; min-width: 0; }
.color-number-row input { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 5px 2px; font-family: inherit; font-size: 10px; text-align: center; appearance: textfield; }
.color-number-row input::-webkit-inner-spin-button, .color-number-row input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.color-stepper { display: grid; grid-template-rows: 1fr 1fr; gap: 1px; }
.color-stepper button { display: grid; place-items: center; width: 11px; min-width: 0; border: 0; background: transparent; color: var(--muted); padding: 0; line-height: 1; }
.color-stepper button:hover { color: var(--ink); }
.color-stepper .material-symbols-rounded { font-size: 12px; line-height: .6; }
.custom-color-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.custom-color-actions button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 6px 10px; font-size: 11px; }
.custom-color-actions button:last-child { border-color: var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); padding: 0; font-size: 18px; }
.header-actions .material-symbols-rounded { display: block; transform: translateY(0); }
@media (min-width: 601px) and (hover: hover) {
  .header-actions > button,
  .header-actions > .collection-control > button {
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, opacity .16s ease, transform .16s ease, box-shadow .16s ease;
  }
  .header-actions > button:hover,
  .header-actions > .collection-control > button:hover,
  .header-actions > #theme:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, var(--paper));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 18%, transparent);
    transform: none;
  }
  .header-actions > button:active,
  .header-actions > .collection-control > button:active,
  .header-actions > #theme:active {
    opacity: .72;
    transform: scale(.96);
  }
  .header-actions > button:focus-visible,
  .header-actions > .collection-control > button:focus-visible,
  .header-actions > #theme:focus-visible {
    color: var(--accent);
  }
}
.close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); padding: 0; }
.close .material-symbols-rounded { display: block; font-size: 21px; line-height: 1; }
.collection-control { position: relative; }
.collection-menu { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; width: 180px; padding: 5px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.collection-menu button { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; gap: 7px; align-items: center; justify-items: start; width: 100%; height: auto; border: 0; border-radius: 0; background: transparent; color: var(--ink); padding: 9px 10px; text-align: left; font-size: 14px; }
.collection-menu button::before { content: ''; }
.collection-menu button.active::before { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 18px; font-variation-settings: 'wght' 700; line-height: 1; }
.collection-menu button:hover { background: var(--bg); }
.mobile-menu-toggle { display: none; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--ink); padding: 0; }
.mobile-menu-toggle .material-symbols-rounded { font-size: 34px; font-variation-settings: 'wght' 300; }
.mobile-menu-toggle[aria-expanded="false"] .material-symbols-rounded { transform: scaleX(.88); }
.stats[hidden] { display: none; }
.actions .material-symbols-rounded { font-size: 17px; }
.actions button {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}
.actions button .material-symbols-rounded { display: block; line-height: 1; }
.wish .material-symbols-rounded { font-variation-settings: 'FILL' 0; }
.wish .material-symbols-rounded { transform: translateY(1px); }
.wish.selected .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
body .actions .wish.selected { border-color:var(--accent); background:var(--accent); color:#fff; }
body .actions .wish.selected .material-symbols-rounded { color:inherit; }

.stats {
  gap: 1px;
  padding: 1px;
  border: 0;
  background: var(--line);
  margin-bottom: 28px;
}
.stats article { border: 0; background: var(--paper); padding: 20px 24px; }
.stats article:last-child { border: 0; }
.stats > article > span { text-transform: uppercase; letter-spacing: .65px; font-size: 11px; font-weight: 600; }
.stats strong { color: var(--accent); }
.stat-filter-shortcut { display:block; width:max-content; border:0; background:transparent; color:inherit; padding:0; text-align:left; }
.stat-filter-shortcut strong { display:block; transform-origin:left center; transition:transform .15s ease; }
@media(hover:hover){.stat-filter-shortcut:hover strong { transform:scale(1.0715); }}
.stat-filter-shortcut:focus-visible { border-radius:2px; outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:600px){.stat-filter-shortcut,.stat-filter-shortcut:hover,.stat-filter-shortcut:focus,.stat-filter-shortcut:active,.stat-filter-shortcut strong { text-decoration:none!important; }.stat-filter-shortcut strong { transform:none!important; }}
.owned-stat { position: relative; }
.stat-foot { display: flex; align-items: center; gap: 10px; }
.currency-toggle { position: absolute; top: 18px; right: 18px; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.currency-toggle button { border: 0; background: transparent; color: var(--muted); padding: 4px 8px; font-family: 'DM Mono', monospace; font-size: 13px; line-height: 1; }
.currency-toggle button + button { border-left: 1px solid var(--line); }
.currency-toggle button.active { background: var(--ink); color: var(--paper); }
.detail-actions button { display: inline-flex; align-items: center; justify-content: flex-start; width: 100%; min-width: 0; height:46px; gap: 7px; text-align: left; }
.detail-actions .material-symbols-rounded { flex: 0 0 auto; font-size: 18px; }
.detail-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; width: 100%; }
.detail-actions #detailWish { background: var(--accent); }
.detail-actions #detailWish[aria-pressed="false"] { border:1px solid var(--line); background:#fff; color:var(--ink); }
.detail-actions #detailOwn[aria-pressed="false"] { border:1px solid var(--line); background:#fff; color:var(--ink); }
.detail-actions .detail-secondary-action { border: 1px solid var(--line); background: #fff !important; color: var(--ink); }
.detail-actions .detail-secondary-action[aria-expanded="true"] { border-color: var(--ink); background: var(--ink) !important; color: var(--paper); }
.detail-info-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 22px;
  background: #181917d9;
  color: #fff;
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: detail-info-in .18s ease-out;
}
.detail-info-overlay[hidden] { display: none; }
.detail-info-overlay p { min-width: 0; margin: 0; }
.detail-info-overlay b,
.detail-info-overlay span { display: block; }
.detail-info-overlay b { margin-bottom: 4px; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; opacity: .68; }
.detail-info-overlay span { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
@keyframes detail-info-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.detail-info { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.detail-info p { margin: 0; line-height: 1.75; }
.detail-tag-editor { position: relative; width: 100%; min-width: 0; margin-top: 12px; border: 1px solid var(--line); background: var(--bg); padding: 9px 12px; }
.detail-tag-editor > label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.detail-tag-editor > div { display: flex; gap: 7px; }
.detail-tag-editor input { min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 7px 10px; }
.detail-tag-editor button { border: 0; background: var(--ink); color: var(--paper); padding: 7px 13px; font-weight: 600; }
.detail-tag-editor .detail-tag-search { display: grid; flex: 0 0 38px; width: 38px; place-items: center; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 0; }
.detail-tag-search .material-symbols-rounded { font-size: 19px; }
@media(min-width:601px){.detail-tag-editor input{border-right:0}.detail-tag-editor .detail-tag-search{margin-left:-7px}}
.detail-tag-suggestions {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  width: min(360px, calc(100vw - 48px));
  min-width: 0;
  max-height: min(320px, calc(100dvh - 80px));
  gap: 6px;
  margin: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 16px;
  box-shadow: 0 0 0 100vmax #0005, 0 18px 45px #0004;
  transform: translate(-50%, -50%);
  scrollbar-width: none;
}
.detail-tag-suggestions::-webkit-scrollbar { display: none; }
.detail-tag-suggestions[hidden] { display: none; }
.detail-tag-suggestions::before {
  content: 'Used tags';
  flex: 0 0 100%;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.detail-tag-suggestions .detail-tag-suggestions-close { position: absolute; top: 9px; right: 9px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 50%; clip-path: none; background: var(--paper); color: var(--ink); padding: 0; }
.detail-tag-suggestions .detail-tag-suggestions-close::before { display: none; }
.detail-tag-suggestions-close .material-symbols-rounded { font-size: 17px; }
.detail-tag-suggestions .detail-tag-suggestions-close:hover,
.detail-tag-suggestions .detail-tag-suggestions-close:focus-visible { color:#fff; }
.detail-tag-suggestions button {
  position: relative;
  isolation: isolate;
  display: block;
  flex: 0 0 auto;
  width: auto;
  border: 0;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
  background: var(--line);
  color: var(--ink);
  padding: 5px 10px 5px 8px;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}
.detail-tag-suggestions button::before {
  content: '';
  position: absolute;
  inset: .65px;
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - 6.62px) 0, 100% 6.62px, 100% 100%, 0 100%);
  background: var(--paper);
}
.detail-tag-suggestions button[hidden] { display: none; }
.detail-tag-suggestions button:hover,
.detail-tag-suggestions button:focus-visible { color: var(--accent); }
.detail-custom-tags { display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 6px; margin-top: 12px; }
.detail-custom-tag-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-custom-tags:empty { display: none; }
.detail-custom-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.detail-custom-tag-label {
  position: relative;
  isolation: isolate;
  display: block;
  border-radius: 3px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  background: var(--line);
  color: var(--ink);
  padding: 7px 12px;
  font-size: 12px;
}
.detail-custom-tag-label::before {
  content: '';
  position: absolute;
  inset: .65px;
  z-index: -1;
  border-radius: 2.35px;
  clip-path: polygon(0 0, calc(100% - 7.62px) 0, 100% 7.62px, 100% 100%, 0 100%);
  background: #fff;
}
.detail-custom-tag button {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 5px #0001;
  opacity: 0;
  pointer-events: none;
  transform: scale(.8);
  transition: opacity .15s ease, transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.detail-custom-tag:hover button,
.detail-custom-tag:focus-within button,
.detail-custom-tag.remove-visible button {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.detail-custom-tag button .material-symbols-rounded { font-size: 15px; }
.confirm-dialog { width: min(420px, calc(100% - 32px)); max-width: 420px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px #0005; }
.photo-folder-dialog { width:min(520px,calc(100% - 32px)); max-width:520px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); box-shadow:0 24px 70px #0005; }
.photo-folder-dialog form { display:grid; gap:14px; padding:38px; }
.photo-folder-dialog h2 { margin:0; font-size:30px; }
.photo-folder-dialog form>p { margin:0; color:var(--muted); }
.photo-folder-dialog label { margin-top:4px; color:var(--muted); font-size:13px; font-weight:600; }
.photo-folder-dialog input { width:100%; height:44px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:0 12px; }
.photo-folder-choices { display:flex; flex-wrap:wrap; gap:8px; }
.photo-folder-choices:empty { display:none; }
.photo-folder-choices button { border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--ink); padding:8px 12px; }
.photo-folder-choices button:hover,.photo-folder-choices button:focus-visible { border-color:var(--accent); color:var(--accent); }
.photo-folder-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
.photo-folder-actions button { display:flex; align-items:center; gap:6px; min-height:42px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 16px; font-weight:600; }
.photo-folder-actions button[type="submit"] { border-color:var(--accent); background:var(--accent); color:#fff; }
.new-collection-dialog { width:min(520px,calc(100% - 32px)); max-width:520px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); box-shadow:0 24px 70px #0005; }
.new-collection-dialog form { display:grid; gap:14px; padding:38px; }
.new-collection-dialog h2 { margin:0; font-size:30px; }
.new-collection-dialog form>p { margin:0; color:var(--muted); }
.new-collection-dialog label { margin-top:4px; color:var(--muted); font-size:13px; font-weight:600; }
.new-collection-dialog input,.new-collection-dialog select { width:100%; height:44px; border:1px solid var(--line); border-radius:0; background:var(--bg); color:var(--ink); padding:0 12px; }
.new-collection-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
.new-collection-actions button { display:flex; align-items:center; gap:6px; min-height:42px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 16px; font-weight:600; }
.new-collection-actions button[type="submit"] { border-color:var(--accent); background:var(--accent); color:#fff; }
.collection-manager-setting { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,1fr); gap:26px; align-items:start; }
.collection-manager-setting h3,.collection-manager-setting p { margin-top:0; }
.detected-collections { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:12px; }
.detected-collections span { border:1px solid var(--line); background:var(--bg); padding:6px 9px; color:var(--muted); font-size:13px; }
.detected-collections span.active { border-color:var(--accent); color:var(--accent); }
#newCollectionButton { display:inline-flex; align-items:center; gap:6px; min-height:42px; border:1px solid var(--accent); background:var(--accent); color:#fff; padding:0 15px; font-weight:600; }
.collection-menu .collection-menu-new { border-top:1px solid var(--line); color:var(--accent); }
.collection-menu .collection-menu-new::before { display:none; }
.collection-menu .collection-menu-new .material-symbols-rounded { grid-column:1; font-size:18px; line-height:1; }
.collection-menu .collection-name { grid-column:2; min-width:0; }
.collection-menu .collection-delete { grid-column:3; visibility:hidden; cursor:pointer; color:var(--muted); font-size:18px; line-height:1; }
.collection-menu button:hover .collection-delete,.collection-menu button:focus-visible .collection-delete,.collection-menu .collection-delete:focus { visibility:visible; }
.collection-menu .collection-delete:hover,.collection-menu .collection-delete:focus { color:var(--accent); }
#resultCount.photo-uploading { color:var(--accent); }
.settings-dialog { width: min(560px, calc(100% - 32px)); max-width: 560px; max-height: calc(100dvh - 32px); overflow-y:hidden; overscroll-behavior:contain; border:1px solid var(--line); background:var(--paper); color:var(--ink); }
.settings-dialog.is-scrollable { overflow-y:auto; scrollbar-width:thin; scrollbar-color:transparent transparent; scrollbar-gutter:stable; }
.settings-dialog.is-scrollable:hover,.settings-dialog.is-scrollable:focus-within { scrollbar-color:color-mix(in srgb,var(--ink) 34%,transparent) transparent; }
.settings-dialog::-webkit-scrollbar { display:block; width:7px; }
.settings-dialog::-webkit-scrollbar-track { background:transparent; }
.settings-dialog::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:999px; background:transparent; background-clip:padding-box; }
.settings-dialog.is-scrollable:hover::-webkit-scrollbar-thumb,.settings-dialog.is-scrollable:focus-within::-webkit-scrollbar-thumb { background:color-mix(in srgb,var(--ink) 34%,transparent); background-clip:padding-box; }
.settings-copy { min-height: 100%; padding: 34px 34px 10px; }
.settings-copy h2 { margin: 0 46px 8px 0; font-size: 30px; }
.settings-tabs { --settings-tab-index:0; position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0 0 12px; border-bottom:1px solid var(--line); user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.settings-tabs::after { content:''; position:absolute; left:0; bottom:-1px; width:33.3333%; height:3px; background:var(--accent); transform:translateX(calc(var(--settings-tab-index) * 100%)); transition:transform .18s cubic-bezier(.2,.8,.2,1); }
.settings-copy .settings-tabs button[role="tab"] { min-width:0; border:0; background:transparent; color:var(--muted); padding:10px 8px 12px; font:inherit; font-size:13px; font-weight:600; }
.settings-tabs button .material-symbols-rounded { font-size:18px; }
.settings-copy .settings-tabs button[aria-selected="true"] { background:transparent; color:var(--accent); box-shadow:none; }
.settings-tabs button:focus-visible { position:relative; z-index:1; outline:2px solid var(--accent); outline-offset:-2px; }
.settings-tab-panel[hidden] { display:none; }
.settings-tab-panel:focus { outline:none; }
.settings-tab-panel > section:first-child { border-top:0; }
.settings-copy section { border-top: 1px solid var(--line); padding: 20px 0 8px; }
.settings-copy section:last-child { padding-bottom: 0; }
.settings-copy section > :last-child { margin-bottom:0; }
.settings-copy label,.settings-copy h3 { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.settings-copy p { margin: 8px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.settings-copy .settings-save-warning { display:flex; align-items:flex-start; gap:9px; margin:14px 0; border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line)); background:color-mix(in srgb,var(--accent) 10%,var(--paper)); color:var(--ink); padding:11px 12px; }
.settings-save-warning > .material-symbols-rounded { flex:0 0 auto; color:var(--accent); font-size:20px; }
.settings-save-warning strong { color:var(--accent); }
.settings-copy input[type="text"] { width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 11px 12px; }
.settings-copy .desktop-columns-select { position:relative; min-width:0; }
.settings-copy .visually-hidden-select { position:absolute; width:1px !important; height:1px; overflow:hidden; clip-path:inset(50%); opacity:0; pointer-events:none; }
.settings-copy .desktop-column-choice-wrap { display:grid; gap:7px; }
.settings-copy .desktop-column-choice-label { font-size:14px; font-weight:600; }
.settings-copy .desktop-column-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.settings-copy .desktop-column-choices button { display:grid; place-items:center; width:100%; height:42px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0; font:inherit; font-weight:600; }
.settings-copy .desktop-column-choices button.selected { border-color:var(--accent); background:var(--accent); color:#fff; }
.settings-copy .desktop-column-choices button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.settings-copy #desktopMaxColumns { width:150px; min-width:0; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:10px 34px 10px 12px; font-weight:600; }
.settings-copy .column-count-icon { display:none; }
.settings-copy .desktop-columns-setting { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; align-items:center; gap:4px 24px; }
.settings-copy .desktop-columns-setting h3 { grid-column:1; grid-row:1; margin:0; }
.settings-copy .desktop-columns-setting label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.settings-copy .desktop-columns-setting .desktop-columns-select { grid-column:2; grid-row:1 / 3; align-self:center; }
.settings-copy .desktop-columns-setting p { display:block; grid-column:1; grid-row:2; margin:0; }
.settings-copy .google-settings > p:not(.settings-status),.settings-copy .desktop-columns-setting > p { text-align:justify; text-align-last:left; }
.settings-spreadsheet-field { display: grid; grid-template-columns: minmax(0,1fr) 46px; }
.settings-spreadsheet-field #spreadsheetUrl { min-width: 0; border-right: 0; }
.settings-copy #chooseSpreadsheet { width: 46px; min-width: 46px; padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.settings-copy #chooseSpreadsheet .material-symbols-rounded { font-size: 22px; }
.settings-copy textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 11px 12px; font: inherit; line-height: 1.45; }
.settings-copy button:not(.close),.settings-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 10px 14px; font-weight: 600; }
.settings-copy [hidden] { display: none !important; }
.settings-copy #saveSpreadsheet,.settings-copy #saveCollections { background: var(--ink); color: var(--paper); }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.google-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.google-settings-actions button { min-width: 0; }
.google-settings-actions .material-symbols-rounded { font-size: 19px; }
.settings-account-actions { display: grid; grid-template-columns: minmax(0,1.5fr) repeat(2,minmax(0,1fr)); margin-top: 14px; }
.settings-account-actions button { width: 100%; white-space: nowrap; }
.settings-copy #firebaseAuth[aria-pressed="true"] { border-color:var(--accent); background:var(--accent); color:#fff; }
.settings-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; margin: 12px -34px -34px; padding: 14px 34px; border-top: 1px solid var(--line); background: var(--paper); }
.settings-footer:empty { display:none; }
.settings-copy #applySettings { min-width: 112px; background: var(--ink); color: var(--paper); }
.settings-copy #applySettings:disabled,.settings-account-actions button:disabled { cursor: not-allowed; opacity: .42; }
.settings-dialog > #applySettings { position:absolute; top:12px; right:12px; z-index:2; display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--ink); padding:0; transform-origin:right center; }
.settings-dialog > #applySettings.has-changes { right:60px; z-index:3; grid-template-columns:auto auto; gap:7px; width:auto; padding:0 14px; border-radius:19px; animation:settings-apply-split .22s cubic-bezier(.2,.8,.2,1),settings-apply-boomerang .2s ease-in-out .24s 2; }
.settings-dialog > #applySettings .apply-label { white-space:nowrap; font-size:14px; font-weight:400; }
.settings-dialog > #applySettings .material-symbols-rounded { display:block; font-size:21px; line-height:1; }
.settings-dialog > #applySettings:disabled { cursor:not-allowed; visibility:hidden; opacity:0; transform:scale(.82); }
.settings-dialog > #applySettings.has-changes + #closeSettings { animation:settings-close-split .28s cubic-bezier(.2,.8,.2,1); }
@keyframes settings-apply-split { from { opacity:0; transform:translateX(48px) scale(.82); } to { opacity:1; transform:translateX(0) scale(1); } }
@keyframes settings-apply-boomerang { 0%,100% { transform:scale(1); transform-origin:center; } 40% { transform:scale(1.045); transform-origin:center; } 75% { transform:scale(.985); transform-origin:center; } }
@keyframes settings-close-split { 0% { transform:scale(.92); } 100% { transform:scale(1); } }
@media (prefers-reduced-motion:reduce) {
  .settings-dialog > #applySettings.has-changes,
  .settings-dialog > #applySettings.has-changes + #closeSettings { animation:none; }
}
.dark .settings-dialog > #applySettings { background:var(--bg); color:var(--ink); }
.settings-actions .material-symbols-rounded { font-size: 19px; }
.settings-copy .settings-status { min-height: 19px; margin-bottom: 0; color: var(--accent); }
.sync-direction-dialog { width: min(470px, calc(100% - 32px)); max-width: 470px; max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.sync-direction-copy { padding: 30px; }
.sync-direction-copy h2 { margin: 0 0 10px; font-size: 25px; }
.sync-direction-copy > p { margin: 0 0 22px; color: var(--muted); line-height: 1.45; }
.sync-direction-actions { display: grid; gap: 10px; }
.sync-direction-actions button { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 15px; text-align: left; }
.sync-direction-actions button:hover:not(:disabled),.sync-direction-actions button:focus-visible { border-color: var(--accent); }
.sync-direction-actions button:disabled { cursor: not-allowed; opacity: .42; }
.sync-direction-actions .material-symbols-rounded { font-size: 24px; }
.sync-direction-actions strong,.sync-direction-actions small { display: block; }
.sync-direction-actions strong { margin-bottom: 3px; font-size: 16px; }
.sync-direction-actions small { color: var(--muted); font-size: 12px; line-height: 1.35; }
@media(max-width:600px){.settings-dialog{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;overflow:hidden}.settings-copy{height:100%;min-height:0;padding:72px 22px max(28px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}.settings-copy::-webkit-scrollbar{display:none}.settings-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-tabs::after{width:50%}.settings-copy .settings-tabs [data-settings-tab="display"]{display:none!important}.settings-actions{display:grid;grid-template-columns:1fr 1fr}.settings-actions button{min-width:0}.settings-account-actions{grid-template-columns:minmax(0,1.45fr) repeat(2,minmax(0,1fr));gap:5px}.settings-account-actions button{gap:4px;padding:10px 7px;font-size:12px}.settings-account-actions .material-symbols-rounded{font-size:17px}.settings-footer{margin:12px -22px calc(-1 * max(28px,env(safe-area-inset-bottom)));padding:12px 22px max(12px,env(safe-area-inset-bottom))}.detail-actions{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.detail-actions button{justify-content:flex-start;width:100%;min-width:0;text-align:left}.detail-actions .material-symbols-rounded{flex:0 0 auto}}
@media(max-width:600px){.detail-tag-editor .detail-tag-search{display:none}}
.confirm-copy { padding: 24px; }
.confirm-copy h2 { margin: 0 0 8px; font-size: 20px; }
.confirm-copy p { margin: 0; color: var(--muted); line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.confirm-actions button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 9px 15px; }
.confirm-actions #acceptConfirm { border-color: var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; }

body { transition: background-color .2s ease, color .2s ease; }
button:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--accent); }
input, select { color: var(--ink); }
select { appearance:none; -webkit-appearance:none; padding-right:36px !important; background-image:linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%) !important; background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50% !important; background-size:5px 5px,5px 5px !important; background-repeat:no-repeat !important; }
input::placeholder { color: var(--muted); opacity: 1; }
.filters label { color: var(--muted); }
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  column-gap: 4px;
  row-gap: 6px;
}
.tag-filters label {
  position: relative;
  isolation: isolate;
  margin: 0;
  border: 0;
  border-radius: 3px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  background: #8b8d88;
  padding-right: 11px;
  padding-left: 7px;
}
.tag-filters label::before {
  content: '';
  position: absolute;
  inset: .65px;
  z-index: -1;
  border-radius: 2.35px;
  clip-path: polygon(0 0, calc(100% - 7.62px) 0, 100% 7.62px, 100% 100%, 0 100%);
  background: #fff;
}
.tag-filters label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.tag-filters label:has(input:checked)::before { background: var(--accent); }
.filters input[type="checkbox"] { transform: translateY(2px); }
.filter-columns, .filter-secondary { display: contents; }
.filters > .filter-columns { border-top: 0; padding: 0; }
.filter-section { border-top: 1px solid var(--line); padding: 16px 0; }
.view-buttons .active { color: var(--paper); }
.pointer-focus button:focus-visible,
.pointer-focus input:focus-visible,
.pointer-focus select:focus-visible { outline: none; }
.topbar { position:sticky; z-index:30; top:0; background:color-mix(in srgb,var(--bg) 92%,transparent); box-shadow:none; backdrop-filter:blur(14px); transition:box-shadow .18s ease; }
.topbar.is-scrolled { box-shadow:0 4px 10px #00000018; }
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px #25262418; border-color: #bfc0bc; }
.catalogue:not(.list) .card .condition-overlay { background:color-mix(in srgb,#eeece4 80%,transparent); border-color:var(--line); color:#20211e; font-family:Outfit,Arial,sans-serif; font-size:9px; font-weight:500; letter-spacing:.1px; }
.add-photo-overlay { position:absolute; left:10px; bottom:10px; z-index:6; display:grid; place-items:center; width:27px; height:23px; border:1px solid var(--line); border-radius:999px; background:#eeece4; color:#20211e; font-size:15px; line-height:1; }
.add-photo-overlay:hover { border-color:var(--ink); }
.add-photo-overlay:focus-visible { outline:3px solid #ffb09d; outline-offset:2px; }
.catalogue .add-photo-overlay { display:none; }
.detail-add-photo { position:absolute; left:18px; bottom:18px; z-index:3; display:grid; place-items:center; border:0; background:transparent; color:var(--muted); padding:0; opacity:.45; }
.detail-add-photo[hidden] { display:none; }
.detail-add-photo .material-symbols-rounded { font-size:22px; }
.detail-add-photo:hover,.detail-add-photo:focus-visible { color:var(--ink); opacity:1; }
#detail.image-zoomed .detail-add-photo,
#detail.image-zoomed .detail-animation-toggle { display:none; }
.detail-photo-stage { position:absolute; inset:0; }
.detail-photo-stage > .detail-primary-image,.detail-photo-stage > .detail-alternate-image { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.detail-photo-stage > .detail-primary-image { opacity:1; }
.detail-photo-stage > .detail-alternate-image { opacity:0; pointer-events:none; animation:alternate-photo-cycle var(--photo-cycle-duration,6s) ease-in-out infinite; }
.detail-image.animation-paused .detail-photo-stage > .detail-alternate-image { animation-play-state:paused; }
.detail-animation-toggle { position:absolute; z-index:3; width:38px; height:38px; border:0; border-radius:50%; background:transparent; color:var(--muted); opacity:1; box-shadow:none; isolation:isolate; transition:transform .14s ease,filter .14s ease; }
.detail-animation-toggle::before { content:none; }
.detail-animation-toggle:hover,.detail-animation-toggle:focus-visible { background:transparent; color:var(--muted); opacity:1; box-shadow:none; transform:scale(1.06); filter:brightness(1.08); }
.detail-animation-toggle:active { transform:scale(.94); filter:brightness(.94); }
.detail-media-icon { display:block; width:38px; height:38px; overflow:visible; fill:currentColor; opacity:1; shape-rendering:geometricPrecision; }
.detail-animation-toggle[aria-pressed="true"] .detail-media-icon { width:38px; height:38px; transform:none; }
#detailAddPhoto { width:38px; height:38px; border:0; border-radius:50%; background:transparent; color:var(--muted); opacity:1; isolation:isolate; transition:transform .14s ease,filter .14s ease; }
#detailAddPhoto { top:18px; bottom:auto; }
#detailAddPhoto::before { content:none; }
#detailAddPhoto .detail-camera-icon { display:block; width:38px; height:38px; overflow:visible; fill:currentColor; shape-rendering:geometricPrecision; }
#detailAddPhoto:hover,#detailAddPhoto:focus-visible { background:transparent; color:var(--muted); opacity:1; transform:scale(1.06); filter:brightness(1.08); }
#detailAddPhoto:active { transform:scale(.94); filter:brightness(.94); }
.photo-animations-disabled .detail-photo-stage > .detail-alternate-image,.photo-animations-disabled .detail-animation-toggle { display:none; }
.dark .card .condition { border-color: var(--line); background: var(--paper); color: var(--ink); }
.dark .catalogue:not(.list) .card .condition-overlay { border-color:var(--line); background:color-mix(in srgb,var(--paper) 80%,transparent); color:var(--ink); }
.dark .add-photo-overlay { border-color:var(--line); background:var(--paper); color:var(--ink); }
.image-wrap img { transition: transform .35s ease; }
.image-wrap::after { content:''; position:absolute; inset:-18% -42%; z-index:4; pointer-events:none; background:linear-gradient(108deg,transparent 40%,rgba(255,255,255,.06) 46%,rgba(255,255,255,.32) 50%,rgba(255,255,255,.08) 54%,transparent 60%); opacity:0; transform:translateX(-72%) skewX(-9deg); }
.dark .image-wrap::after { background:linear-gradient(108deg,transparent 40%,rgba(255,255,255,.025) 46%,rgba(255,255,255,.13) 50%,rgba(255,255,255,.035) 54%,transparent 60%); }
@media (hover:hover) and (pointer:fine) {
  .card:not(.fallback-card):hover .image-wrap::after { animation:photo-shimmer 2.2s ease-in-out infinite; }
}
@keyframes photo-shimmer {
  0% { opacity:.18; transform:translateX(-72%) skewX(-9deg); }
  7% { opacity:.48; }
  38% { opacity:0; transform:translateX(72%) skewX(-9deg); }
  100% { opacity:0; transform:translateX(72%) skewX(-9deg); }
}
.dark .card:not(.fallback-card):hover .image-wrap::after { animation-name:photo-shimmer-dark; }
@keyframes photo-shimmer-dark {
  0% { opacity:.1; transform:translateX(-72%) skewX(-9deg); }
  7% { opacity:.28; }
  38% { opacity:0; transform:translateX(72%) skewX(-9deg); }
  100% { opacity:0; transform:translateX(72%) skewX(-9deg); }
}
.image-wrap.has-alternate-images img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.image-wrap.has-alternate-images .primary-image { opacity:1; }
.image-wrap.has-alternate-images .alternate-image { animation:alternate-photo-cycle var(--photo-cycle-duration,4s) ease-in-out infinite; }
@keyframes alternate-photo-cycle { 0%,35%,100%{opacity:0} 50%,85%{opacity:1} }
.photo-animations-disabled .image-wrap.has-alternate-images .primary-image { opacity:1; }
.photo-animations-disabled .image-wrap.has-alternate-images .alternate-image { animation:none; opacity:0; }
.card:hover .image-wrap img { transform: scale(1.025); }
.catalogue.list .card { grid-template-columns: 116px minmax(0, 1fr); height: auto; }
.filter-pin, .filter-page-button { display: none; }
.filter-pin { position:relative; }
.filter-pin-icon { display:block; width:20px; height:20px; fill:currentColor; }
.filter-pin.active::after { content:''; position:absolute; top:50%; left:50%; width:23px; height:2px; background:currentColor; box-shadow:0 0 0 1px var(--bg); transform:translate(-50%,-50%) rotate(45deg); pointer-events:none; }
.card-custom-tags { display: none; }
.catalogue.list .card-body { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 0 16px; padding: 12px 14px; }
.catalogue.list .card-custom-tags { display: flex; grid-column: 1 / -1; grid-row: 1; align-self: start; min-width: 0; max-width: 100%; gap: 5px; overflow: hidden; }
.catalogue.list .card-custom-tags-icon { display: block; flex: 0 0 auto; align-self: center; color: var(--muted); font-size: 16px; font-style: normal; line-height: 1; }
.catalogue.list .card-custom-tags span { position: relative; isolation: isolate; display: block; overflow: hidden; max-width: 130px; border: 0; border-radius: 3px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); background: #8b8d88; color: var(--ink); padding: 3px 9px 3px 7px; font-size: 9px; font-weight: 500; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.catalogue.list .card-custom-tags span::before { content: ''; position: absolute; inset: .65px; z-index: -1; border-radius: 2.35px; clip-path: polygon(0 0, calc(100% - 5.62px) 0, 100% 5.62px, 100% 100%, 0 100%); background: #fff; }
.dark .catalogue.list .card-custom-tags span { background: #8f918b; }
.dark .catalogue.list .card-custom-tags span::before { background: var(--bg); }
.catalogue.list .card h2 { grid-column: 1; grid-row: 2; align-self: center; }
.catalogue.list .card .brand { grid-column: 1; grid-row: 3; align-self: end; }
.catalogue.list .card .actions { grid-column: 2; grid-row: 3; align-self: end; justify-self: end; }
.catalogue.list .card .condition { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; }
@media (min-width: 851px) {
  .catalogue:not(.list) { grid-template-columns:repeat(var(--catalogue-columns,5),minmax(0,1fr)); }
}
.catalogue.list .image-button, .catalogue.list .image-wrap { height: auto; }
.catalogue.list .image-button { display: block; line-height: 0; }
.catalogue.list .image-button { position: relative; }
.catalogue.list .image-wrap { display: flex; width: 100%; aspect-ratio: 1; align-items: center; justify-content: center; }
.catalogue.list .placeholder { display: none; }
.catalogue.list .image-wrap.fallback-placeholder .placeholder { display: block; }
.catalogue.list .image-wrap img:not(.fallback-image) { width: 100%; height: 100%; object-fit: cover; }
.catalogue.list .image-wrap img.fallback-image { top: 0; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.catalogue.list .card .condition-list { display: none; }
.catalogue.list .card .condition-overlay:not([hidden]) { position: absolute; inset: auto 8px 8px auto; z-index: 5; display: block !important; visibility: visible; opacity: 1; pointer-events: none; padding: 2px 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); color: var(--ink); font-size: 7px; line-height: normal; transform: none; }
.actions button { transition: transform .15s ease, background-color .15s ease, color .15s ease; }
@media (hover:hover) and (pointer:fine) {
  .actions button:hover { transform: scale(1.08); }
}
.results { min-width: 0; }
.results-summary { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.toolbar { gap:0; margin-bottom:16px; }
.add-figure { display:grid; place-items:center; flex:0 0 48px; width:48px; height:48px; margin:0; border:0; background:var(--accent); color:#fff; }
.add-figure .material-symbols-rounded { font-size:27px; }
.add-figure.is-floating { position:fixed; top:143px; right:max(8px,calc((100vw - min(100vw,1440px))/2 + clamp(20px,5vw,72px) - 46px)); bottom:auto; z-index:25; width:51px; height:51px; margin:0; border-radius:4px; outline:0; box-shadow:0 3px 8px #0004; }
.add-figure.is-floating:focus-visible { outline:0; }
@media (min-width:601px) and (hover:hover) {
  .add-figure.is-floating { transition:box-shadow .16s ease; }
  .add-figure.is-floating .material-symbols-rounded { transition:transform .2s cubic-bezier(.2,.8,.2,1); }
  .add-figure.is-floating:hover { background:var(--accent); color:#fff; box-shadow:0 3px 8px #0004; }
  .add-figure.is-floating:hover .material-symbols-rounded { transform:scale(1.24); }
}
.quick-search { display:none; }
@media (min-width: 601px) {
  .quick-search.is-visible { position:fixed; top:82px; right:max(8px,calc((100vw - min(100vw,1440px))/2 + clamp(20px,5vw,72px) - 46px)); z-index:26; display:flex; justify-content:flex-end; width:51px; height:51px; border:1px solid var(--line); border-radius:4px; background:var(--paper); color:var(--ink); box-shadow:0 3px 8px #0004; overflow:hidden; transition:width .2s ease,color .16s ease,border-color .16s ease,background-color .16s ease,opacity .16s ease,transform .16s ease,box-shadow .16s ease; }
  .quick-search.is-visible:has(> button:hover),
  .quick-search.is-visible:has(> button:focus-visible) { color:var(--accent); border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); background:color-mix(in srgb,var(--accent) 9%,var(--paper)); box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 18%,transparent); transform:none; }
  .quick-search.is-visible:has(> button:active) { opacity:.72; transform:scale(.96); }
  .quick-search.is-visible.is-open { width:min(340px,calc(100vw - 32px)); box-shadow:0 3px 8px #0004; }
  .quick-search input { order:1; width:0; min-width:0; height:49px; border:0; outline:0; background:transparent; color:var(--ink); padding:0; opacity:0; transition:width .2s ease, padding .2s ease, opacity .14s ease; }
  .quick-search.is-open input { width:calc(100% - 50px); padding:0 14px; opacity:1; }
  .quick-search button { order:2; display:grid; place-items:center; flex:0 0 50px; width:50px; height:49px; border:0; background:transparent; color:inherit; padding:0; }
  .quick-search .material-symbols-rounded { font-size:27px; }
}
.quick-search.is-visible.is-open { background:color-mix(in srgb,var(--bg) 92%,transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.quick-search.is-open input { background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; }
.quick-search button { background:var(--paper); }
.search input[type="search"]::-webkit-search-cancel-button,
.quick-search input[type="search"]::-webkit-search-cancel-button { width:10px; height:10px; margin:0; -webkit-appearance:none; appearance:none; background:linear-gradient(45deg,transparent 43%,var(--ink) 43% 57%,transparent 57%),linear-gradient(-45deg,transparent 43%,var(--ink) 43% 57%,transparent 57%); cursor:pointer; }
.add-figure-dialog { width:min(520px,calc(100% - 32px)); max-width:520px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); }
.add-figure-dialog form { display:grid; gap:16px; padding:38px; }
.add-figure-dialog h2 { margin:0; font-size:30px; }
.add-figure-collection { margin:-8px 0 4px; color:var(--muted); }
.add-figure-dialog label { display:grid; gap:7px; color:var(--muted); font-size:13px; font-weight:600; }
.add-figure-dialog input,.add-figure-dialog select { width:100%; height:44px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:0 12px; }
.brand-picker-field { position:relative; display:block; }
.add-figure-dialog .brand-picker-field input { padding-right:44px; }
.brand-picker-field > button { position:absolute; top:0; right:0; display:grid; width:44px; height:44px; place-items:center; border:0; background:transparent; color:var(--ink); padding:0; }
.brand-picker-field > button[hidden] { display:none; }
.brand-picker-field .material-symbols-rounded { font-size:22px; }
.brand-suggestions { position:fixed; top:50%; left:50%; z-index:100; width:min(380px,calc(100% - 36px)); max-height:min(420px,calc(100dvh - 72px)); overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); padding:18px; box-shadow:0 0 0 100vmax #0005,0 18px 45px #0004; transform:translate(-50%,-50%); scrollbar-width:none; }
.brand-suggestions[hidden] { display:none; }
.brand-suggestions::-webkit-scrollbar { display:none; }
.brand-suggestions > strong { display:block; margin:0 36px 14px 0; font-size:14px; }
.brand-suggestions-close { position:absolute; top:9px; right:9px; display:grid; width:28px; height:28px; place-items:center; border:1px solid var(--line); border-radius:50%; background:var(--paper); color:var(--ink); padding:0; }
.brand-suggestions-close .material-symbols-rounded { font-size:17px; }
#brandSuggestionChoices { display:flex; flex-wrap:wrap; gap:8px; }
#brandSuggestionChoices button { position:relative; isolation:isolate; border:0; border-radius:3px; clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%); background:var(--line); color:var(--ink); padding:8px 13px; font-size:12px; white-space:nowrap; }
#brandSuggestionChoices button::before { content:''; position:absolute; inset:.65px; z-index:-1; clip-path:polygon(0 0,calc(100% - 7.62px) 0,100% 7.62px,100% 100%,0 100%); background:var(--paper); }
#brandSuggestionChoices button:hover,#brandSuggestionChoices button:focus-visible { color:var(--accent); }
.dark #brandSuggestionChoices button::before { background:var(--bg); }
.add-figure-dialog #newFigureValue { appearance:textfield; -moz-appearance:textfield; }
.add-figure-dialog #newFigureValue::-webkit-inner-spin-button,.add-figure-dialog #newFigureValue::-webkit-outer-spin-button { margin:0; -webkit-appearance:none; }
.add-figure-dialog .custom-select-native { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); opacity:0; pointer-events:none; }
.custom-currency-control { position:relative; width:100%; }
.custom-currency-toggle { position:relative; display:flex; align-items:center; width:100%; height:44px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:0 38px 0 12px; text-align:left; }
.custom-currency-toggle .select-arrow { position:absolute; right:12px; font-size:20px; line-height:1; pointer-events:none; }
.custom-currency-menu { position:absolute; z-index:12; top:calc(100% + 5px); left:0; width:100%; border:1px solid var(--line); background:var(--paper); box-shadow:0 3px 8px #0004; }
.custom-currency-menu[hidden] { display:none; }
.custom-currency-menu button { display:block; width:100%; border:0; background:transparent; color:var(--ink); padding:10px 12px; text-align:left; }
.custom-currency-menu button:hover,.custom-currency-menu button:focus-visible { background:color-mix(in srgb,var(--accent) 9%,var(--paper)); color:var(--accent); }
.custom-currency-menu button.selected { font-weight:600; }
.add-figure-value { display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:12px; }
.add-figure-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
.add-figure-actions button { min-height:42px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 16px; font-weight:600; }
.add-figure-actions #addNewFigurePhoto { display:flex; align-items:center; gap:6px; margin-right:auto; }
.add-figure-actions #addNewFigurePhoto.photo-selected { border-color:var(--accent); color:var(--accent); }
.card .brand:empty { display:none; }
@media(max-width:420px){.add-figure-actions button{padding-inline:11px}.add-figure-actions #addNewFigurePhoto{min-width:44px;justify-content:center}.add-new-photo-label{display:none}}
.add-figure-actions button[type="submit"] { display:flex; align-items:center; gap:6px; border-color:var(--accent); background:var(--accent); color:#fff; }
.add-figure-actions button:disabled { opacity:.6; cursor:wait; }
.add-photo-dialog { width:min(500px,calc(100% - 32px)); max-width:500px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); }
.add-photo-dialog form { display:grid; gap:12px; padding:38px; }
.add-photo-dialog h2 { margin:0; font-size:30px; }
.add-photo-dialog form>p { margin:0; color:var(--muted); }
.add-photo-dialog label { margin-top:8px; color:var(--muted); font-size:13px; font-weight:600; }
.add-photo-dialog input { width:100%; height:44px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:0 12px; }
.add-photo-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.add-photo-actions button { min-height:42px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 16px; font-weight:600; }
.add-photo-actions button[type="submit"] { display:flex; align-items:center; gap:6px; border-color:var(--accent); background:var(--accent); color:#fff; }
.add-photo-actions button:disabled { opacity:.6; cursor:wait; }
.results-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.results-controls .filter-toggle { align-items:center; justify-content:flex-start; gap:7px; height:40px; padding:0 12px; color:var(--ink); line-height:1; text-align:left; }
.results-controls .filter-toggle .material-symbols-rounded { display: block; color: currentColor; line-height: 1; }
.results-controls .filter-toggle.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sort-control { position: relative; display: flex; align-items: center; gap: 7px; width: 145px; height: 40px; border: 1px solid var(--line); background: var(--paper); padding-left: 9px; color: var(--ink); }
.results-controls .view-buttons { display: flex; flex: 0 0 auto; }
.results-controls .view-buttons button { width: 40px; height: 40px; }
.sort-control .sort-icon { display: block; flex: 0 0 auto; color: currentColor; font-size: 20px; line-height: 1; }
.sort-menu-toggle { display: flex; align-items: center; gap: 7px; width: 100%; height: 100%; border: 0; background: transparent; color: inherit; padding: 0 34px 0 0; text-align: left; }
.sort-control .select-arrow { position: absolute; right: 12px; display: block; pointer-events: none; font-size: 20px; line-height: 1; }
.sort-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: -1px; width: calc(100% + 2px); padding: 5px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.sort-menu button { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; align-items: center; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 8px 6px; text-align: left; }
.sort-menu button:hover { background: var(--bg); }
.sort-menu button::before { content: ''; }
.sort-menu button.active::before { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 18px; font-variation-settings: 'wght' 700; line-height: 1; }
.sort-menu hr { margin: 5px; border: 0; border-top: 1px solid var(--line); }
.empty-state { border: 1px dashed var(--line); padding: 64px 24px; text-align: center; background: var(--paper); }
.empty-state > span { display: block; font-size: 34px; color: var(--accent); }
.empty-state h2 { margin: 10px 0 6px; font-size: 21px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }
.empty-state button { border: 0; background: var(--ink); color: var(--paper); padding: 11px 16px; font-weight: 600; }

body.dark { color-scheme: dark; }
.dark .actions .selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dark .detail-actions button { color: var(--paper); }
.dark .detail-actions #detailWish[aria-pressed="true"] { color:#fff; }
.dark .detail-actions #detailWish[aria-pressed="false"] { border-color:var(--line); background:var(--bg); color:var(--ink); }
.dark .detail-actions #detailOwn[aria-pressed="false"] { border-color:var(--line); background:var(--bg); color:var(--ink); }
.dark .detail-actions .detail-secondary-action { background: var(--bg) !important; color: var(--ink); }
.dark .detail-actions .detail-secondary-action[aria-expanded="true"] {
  border-color: var(--ink);
  background: var(--ink) !important;
  color: var(--paper);
}
.dark .close { background: var(--bg); color: var(--ink); }
.dark .detail-custom-tag-label::before,
.dark .detail-custom-tag button,
.dark .detail-tag-suggestions button::before { background: var(--bg); }
.filters label:has(input:checked) { color: #20211e; }
.dark .filters label:has(input:checked) { color: #fff; }
.filters .tag-filters label:has(input:checked) { color:#fff; }
.filter-brand input[type='checkbox'],
.filter-collection input[type='checkbox'],
.filter-condition input[type='checkbox'] {
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  flex:0 0 16px;
  width:16px;
  height:16px;
  border:1px solid #858780;
  border-radius:3px;
  background:var(--paper);
  margin:0 0 0 4px;
  transform:none;
}
.filter-brand label,
.filter-collection label,
.filter-condition label {
  display:flex;
  align-items:center;
  gap:7px;
}
.filter-brand input[type='checkbox']:checked,
.filter-collection input[type='checkbox']:checked,
.filter-condition input[type='checkbox']:checked {
  border-color:var(--accent);
  background:var(--accent);
}
.filter-brand input[type='checkbox']:checked::after,
.filter-collection input[type='checkbox']:checked::after,
.filter-condition input[type='checkbox']:checked::after {
  content:'';
  position:absolute;
  left:5px;
  top:1.5px;
  width:3px;
  height:7px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.dark .filter-brand input[type='checkbox'],
.dark .filter-collection input[type='checkbox'],
.dark .filter-condition input[type='checkbox'] { background:#3a3b37; }
.dark .filter-brand input[type='checkbox']:checked,
.dark .filter-collection input[type='checkbox']:checked,
.dark .filter-condition input[type='checkbox']:checked { background:var(--accent); }
.dark .detail-tags span { color: #20211e; }
.dark .tag-filters label { background: #8f918b; }
.dark .tag-filters label::before { background: var(--bg); }
.dark .tag-filters label:has(input:checked),
.dark .tag-filters label:has(input:checked)::before { background: var(--accent); }
.dark .card:hover { border-color: #686a63; box-shadow: 0 18px 38px #0007; }

@media (prefers-reduced-motion: reduce) {
  .card .image-wrap::after { animation:none!important; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .image-wrap.has-alternate-images .primary-image { animation:none!important; opacity:1; }
  .image-wrap.has-alternate-images .alternate-image { animation:none!important; opacity:0; }
}

@media (min-width: 851px) {
  .filters { display: flex; flex-direction: column; align-self: start; }
  main:has(.filters.is-pinned) { padding-bottom: 0; }
  .content:has(.filters.is-pinned)::after { content: ''; grid-column: 1 / -1; height: 64px; }
  .filters.is-pinned { position: sticky; top: 82px; max-height: calc(100vh - 92px); overflow: visible; }
  .filter-scroll { display: contents; }
  .filters > .filter-scroll { border: 0 !important; padding: 0 !important; }
  .filters.is-pinned .filter-scroll { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .filters.is-pinned .filter-scroll::-webkit-scrollbar { display: none; }
  .filter-scroll .filter-collection { border-top: 0; }
  .filter-heading { align-items: center; justify-content: flex-start; gap: 6px; }
  .filter-heading > strong { margin-right: auto; }
  .filter-heading #clearFilters { display:inline-flex; align-items:center; justify-content:center; min-height:28px; border:1px solid var(--accent); border-radius:0; background:var(--paper); padding:0 10px; color:var(--accent); line-height:1; }
.filter-heading #clearFilters[hidden] { display:none; }
  .filter-heading .filter-pin { display: grid; place-items: center; width: 22px; height: 28px; margin: -7px 0; border: 0; background: transparent; color: inherit; padding: 0; }
  .filter-pin .material-symbols-rounded { font-size: 20px; }
  .filter-heading .filter-pin.active { color: inherit; }
  .filter-page-button { display: grid; flex: 0 0 28px; place-items: center; align-self: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); padding: 0; transition: color .16s ease, border-color .16s ease, background-color .16s ease, opacity .16s ease, box-shadow .16s ease; }
  .filter-page-button[hidden] { display: none; }
  .filter-page-button .material-symbols-rounded { font-size: 17px; }
  .filter-page-button:disabled { opacity: .25; cursor: default; }
  .filter-page-up { margin-top: -10px; }
  @media (hover: hover) {
    .filter-page-button:not(:disabled):hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, var(--paper)); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 18%, transparent); }
    .filter-page-button:not(:disabled):active { opacity: .72; transform: scale(.96); }
    .filter-page-up:not(:disabled):active { transform: scale(.96); }
    .filter-page-button:not(:disabled):focus-visible { color: var(--accent); }
  }
  .filter-heading { order: 0; }
  .filter-collection { order: 1; }
  .filter-condition { order: 2; }
  .filter-brand { order: 3; }
  .filter-tags { order: 4; }
}

.display-currency-setting,.display-placeholder-setting,.display-photo-animation-setting { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 18px; align-items:center; }
.display-photo-animation-setting { column-gap:24px; }
.display-photo-animation-setting > p { text-align:justify; text-align-last:left; }
.display-currency-setting h3,.display-currency-setting p,.display-placeholder-setting h3,.display-placeholder-setting p,.display-photo-animation-setting h3,.display-photo-animation-setting p { grid-column:1; }
.display-currency-setting p,.display-placeholder-setting p,.display-photo-animation-setting p { margin:0; }
.settings-currency-choices,.settings-placeholder-choices,.photo-animation-controls { grid-column:2; grid-row:1 / span 2; display:grid; width:240px; }
.settings-currency-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
.settings-placeholder-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
.settings-copy .settings-currency-choices button,.settings-copy .settings-placeholder-choices button { min-width:0; border-color:var(--line); background:var(--paper); padding-inline:10px; }
.settings-copy .settings-currency-choices button + button,.settings-copy .settings-placeholder-choices button + button { border-left:0; }
.settings-copy .settings-currency-choices button.selected,.settings-copy .settings-placeholder-choices button.selected { border-color:var(--accent); background:var(--accent); color:#fff; }
.photo-animation-controls { display:flex; align-items:center; justify-content:flex-end; gap:8px; width:176px; }
.settings-copy .settings-switch { position:relative; display:block; flex:0 0 auto; margin:0; cursor:pointer; }
.photo-animation-controls .settings-switch::before { content:'Enabled'; position:absolute; left:0; bottom:calc(100% + 7px); color:var(--ink); font-size:14px; font-weight:600; line-height:1; }
.settings-switch input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.settings-switch-track { position:relative; display:grid; grid-template-columns:1fr 1fr; align-items:center; width:80px; height:42px; overflow:hidden; border:1px solid var(--line); border-radius:0; background:var(--bg); color:var(--ink); font-size:10px; font-weight:700; text-transform:uppercase; transition:background-color .16s ease,border-color .16s ease,color .16s ease; }
.settings-switch-track::after { content:''; position:absolute; z-index:1; top:4px; left:4px; width:32px; height:32px; border:1px solid transparent; border-radius:2px; background:var(--paper); box-shadow:0 1px 3px #0003; transition:transform .16s ease; }
.dark .settings-switch-track::after { background:#fff; }
.settings-switch-on,.settings-switch-off { position:relative; z-index:0; text-align:center; }
.settings-switch-on { grid-column:1; }
.settings-switch-off { grid-column:2; }
.settings-switch input:checked + .settings-switch-track { border-color:var(--accent); background:var(--accent); color:#fff; }
.settings-switch input:checked + .settings-switch-track::after { transform:translateX(38px); }
.settings-switch input:focus-visible + .settings-switch-track { outline:2px solid var(--accent); outline-offset:2px; }
.settings-copy .settings-photo-duration { position:relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:0; width:88px; margin:0; color:var(--ink); font-size:11px; font-weight:400; }
.settings-photo-duration > strong { position:absolute; left:0; bottom:calc(100% + 7px); display:block; font-size:14px; font-weight:600; line-height:1; }
.settings-photo-duration-field { position:relative; display:grid; grid-template-columns:68px 18px; gap:0; width:88px; height:42px; min-width:0; border:1px solid var(--line); background:var(--paper); }
.settings-photo-duration-field::after { content:'s'; position:absolute; top:50%; left:40px; color:var(--ink); font:inherit; font-weight:600; line-height:1; transform:translateY(-50%); pointer-events:none; }
.settings-photo-duration input { width:68px; height:40px; min-width:0; border:0; background:transparent; color:var(--ink); padding:0 26px 0 25px; text-align:left; font:inherit; font-weight:600; line-height:1; outline:0; appearance:textfield; }
.settings-copy .settings-photo-duration,.settings-copy .settings-photo-duration input { font-size:16px; }
.settings-photo-duration input::-webkit-inner-spin-button,.settings-photo-duration input::-webkit-outer-spin-button { appearance:none; margin:0; }
.settings-photo-stepper { display:grid; grid-template-rows:1fr 1fr; gap:1px; }
.settings-copy .settings-photo-stepper button { display:grid; place-items:center; width:18px; min-width:0; border:0; background:transparent; color:var(--muted); padding:0; line-height:1; }
.settings-copy .settings-photo-stepper button:hover { color:var(--ink); }
.settings-photo-stepper .material-symbols-rounded { font-size:13px; line-height:.6; }
.settings-photo-duration-field:focus-within { border-color:var(--accent); }
.settings-photo-duration input:disabled { cursor:not-allowed; opacity:1; }
.settings-photo-duration:has(input:disabled) .settings-photo-duration-field { opacity:.55; pointer-events:none; }
.settings-photo-seconds { display:none; }

html { scrollbar-gutter: stable; }

@media (min-width: 601px) {
  .topbar { padding-inline: max(clamp(20px, 5vw, 72px), calc((100vw - 1440px) / 2 + 72px)); }
}

@media (max-width: 850px) {
  body:not(.dark) #detail .close { background: var(--paper); }
  .content { display: flex; flex-direction: column; gap: 0; }
  .results { display: contents; }
  .results-head { order: 1; }
  .filters { order: 2; }
  .filters.open { display: block; }
  .filters.open .filter-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); column-gap: 28px; }
  .filters.open .filter-secondary { display: block; }
  .filters.open .filter-brand,
  .filters.open .filter-collection { border-top: 0; }
  .filter-secondary .filter-section { padding-top: 10px; padding-bottom: 10px; }
  .filter-secondary .filter-collection label,
  .filter-secondary .filter-condition label { margin-top: 6px; margin-bottom: 6px; }
  .catalogue { order: 3; }
  .empty-state { order: 4; }
  .results-controls .filter-toggle { display: flex; }
}

@media (max-width:600px) {
  .settings-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-tabs::after { width:50%; }
  .settings-copy .settings-tabs [data-settings-tab="display"] { display:flex!important; }
  .desktop-columns-setting { display:none; }
  .settings-tab-panel > .display-currency-setting { border-top:0; }
  .display-currency-setting,.display-placeholder-setting,.display-photo-animation-setting { grid-template-columns:1fr; }
  .display-currency-setting h3,.display-currency-setting p,.settings-currency-choices,.display-placeholder-setting h3,.display-placeholder-setting p,.settings-placeholder-choices,.display-photo-animation-setting h3,.display-photo-animation-setting p,.photo-animation-controls { grid-column:1; grid-row:auto; }
  .settings-currency-choices,.settings-placeholder-choices,.photo-animation-controls { width:100%; margin-top:10px; }
  .photo-animation-controls { align-items:flex-end; justify-content:space-between; margin-top:16px; }
  .settings-copy .settings-photo-duration { padding-top:22px; }
  .settings-photo-duration > strong { top:0; bottom:auto; }
  .settings-copy .settings-account-actions #firebaseAuth[aria-pressed="true"] { border-color:var(--accent); background:var(--accent); color:#fff; }
}

@media (max-width:850px) {
  .filter-heading #clearFilters { display:inline-flex; align-items:center; justify-content:center; min-height:28px; border:1px solid var(--accent); border-radius:0; background:var(--paper); padding:0 10px; color:var(--accent); line-height:1; }
  .filter-heading #clearFilters[hidden] { display:none; }
}

@media (max-width:600px) {
  .settings-copy .desktop-columns-setting { display:none; }
  .collection-manager-setting { grid-template-columns:1fr; gap:10px; }
  .new-collection-dialog { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; }
  .new-collection-dialog form { width:100%; min-width:0; padding:72px 22px max(28px,env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .stats { margin-bottom: 24px; }
  .stats article { padding: 16px 17px; }
  .filter-toggle { display: flex; }
  .toolbar { display:grid; grid-template-columns:minmax(0,1fr) 48px; width:100%; }
  .toolbar .search { display:flex; width:100%; min-width:0; }
  .add-figure { position:static; width:48px; height:48px; margin:0; border-radius:0; box-shadow:none; }
  .add-figure.is-floating { top:auto; right:max(8px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); width:49px; height:49px; }
  .quick-search.is-visible { top:auto; right:max(8px,env(safe-area-inset-right)); bottom:max(81px,calc(env(safe-area-inset-bottom) + 61px)); }
  .quick-search.is-visible { border:0; outline:1px solid var(--line); outline-offset:-1px; }
  .quick-search input { height:51px; }
  .quick-search.is-open input { width:calc(100% - 51px); }
  .quick-search button { flex-basis:51px; width:51px; height:51px; }
  .add-figure-dialog { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; }
  .add-figure-dialog form { width:100%; height:100%; min-width:0; align-content:start; overflow-y:auto; padding:72px 22px max(28px,env(safe-area-inset-bottom)); }
  .add-figure-dialog label,.add-figure-dialog input,.add-figure-dialog select,.add-figure-value { min-width:0; }
  .add-figure-value { grid-template-columns:minmax(0,1fr) 120px; }
  .toolbar .view-buttons { display:none; }
  .results-head { flex-wrap: wrap; gap: 10px; }
  .results-head .results-controls { display:grid; grid-template-columns:max-content minmax(0,1fr) 80px; width:100%; min-width:0; margin-left:0; gap:8px; }
  .results-head .filter-toggle { min-width:0; padding:0 12px; white-space:nowrap; }
  .results-head .sort-control { width:auto; min-width:0; }
  .results-controls .view-buttons { width:80px; }
  .results-controls .view-buttons button { width:40px; min-width:0; }
  .sort-control .sort-icon { display: block; }
  .results-head select { max-width: 170px; }
  .catalogue:not(.list) .card .condition-overlay { right: 5px; bottom: 20px; padding: 2px 5px; font-size: 7px; font-weight: 500; }
  .catalogue:not(.list) .card .add-photo-overlay { left:5px; bottom:20px; width:23px; height:19px; font-size:13px; }
  .card:hover { transform: none; }
}

@media (max-width: 400px) {
  .topbar .brand { gap: 4px; font-size: 23px; letter-spacing: .25px; }
  .topbar .brand-name, .topbar .brand-accent { transform: translateY(0) scaleY(1.22); }
}

/* The upper card container is the badge's only positioning reference. */
.catalogue:not(.list) .image-button {
  position: relative;
  display: block;
}
.catalogue:not(.list) .image-button > .condition-overlay {
  position: absolute !important;
  inset: auto 10px 10px auto !important;
  z-index: 5 !important;
  transform: none !important;
}

@media (max-width: 600px) {
  .topbar { height: 60px; padding-inline: 20px; }
  .topbar .brand { font-size: clamp(18px, 5.2vw, 23px); }
  .mobile-menu-toggle { display: grid; flex: 0 0 44px; }
  .header-actions { display: none; position: absolute; top: calc(100% + 8px); right: 20px; z-index: 50; width: 210px; padding: 6px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .topbar.menu-open .header-actions { display: grid; }
  .header-actions button { display: flex; justify-content: flex-start; gap: 11px; width: 100%; height: 44px; border: 0; border-radius: 0; background: transparent; padding: 0 12px; text-align: left; }
  .header-actions #statsToggle,
  .header-actions #theme { border: 0; border-radius: 0; background: transparent; }
  .collection-control { width: 100%; }
  .collection-control > #collectionToggle { border: 0; border-radius: 0; background: transparent; }
  .collection-menu { position: static; width: 100%; margin: 0 0 4px; border: 0; border-top: 1px solid var(--line); box-shadow: none; padding: 4px 6px; }
  .header-actions .collection-menu button { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; height: 38px; padding-block: 6px; }
  .header-actions button:hover { background: var(--bg); }
  .header-actions button::after { content: attr(data-menu-label); font-size: 14px; white-space: nowrap; }
  .add-photo-dialog { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; border:0; border-radius:0; }
  .add-photo-dialog form { width:100%; min-width:0; padding:72px 22px max(28px,env(safe-area-inset-bottom)); }
}

:where(.close, .detail-tag-suggestions-close, .brand-suggestions-close, .settings-dialog > #applySettings.has-changes) {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.close:hover,
.close:focus-visible,
.detail-tag-suggestions-close:hover,
.detail-tag-suggestions-close:focus-visible,
.brand-suggestions-close:hover,
.brand-suggestions-close:focus-visible,
.settings-dialog > #applySettings.has-changes:hover,
.settings-dialog > #applySettings.has-changes:focus-visible,
.detail-custom-tag button:hover,
.detail-custom-tag button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.mobile-camera-dialog { width:min(560px,calc(100% - 24px)); max-width:560px; border:0; background:#111; color:#fff; }
.mobile-camera-copy { display:grid; gap:12px; padding:22px; }
.mobile-camera-copy h2,.mobile-camera-copy p { margin:0; }
.mobile-camera-copy > p { color:#d3d3d3; }
.mobile-camera-stage { position:relative; width:100%; aspect-ratio:1; overflow:hidden; background:#000; touch-action:none; user-select:none; -webkit-user-select:none; }
.mobile-camera-stage video { display:block; width:100%; height:100%; object-fit:cover; transform:scale(var(--camera-zoom,1)); transform-origin:center; }
.mobile-camera-guide { position:absolute; inset:18px; border:2px solid #fff; box-shadow:0 0 0 999px #0006,0 0 0 1px #0008; pointer-events:none; }
.mobile-camera-guide::before,.mobile-camera-guide::after { content:''; position:absolute; inset:50% auto auto 50%; background:#ffffff88; transform:translate(-50%,-50%); }
.mobile-camera-guide::before { width:28px; height:1px; }
.mobile-camera-guide::after { width:1px; height:28px; }
.mobile-camera-focus { position:absolute; display:block; width:54px; height:54px; margin:-27px 0 0 -27px; border:2px solid #fff; opacity:0; pointer-events:none; transform:scale(1.25); }
.mobile-camera-focus.visible { animation:mobile-camera-focus .65s ease-out; }
@keyframes mobile-camera-focus { 0%{opacity:0;transform:scale(1.35)} 20%,70%{opacity:1;transform:scale(1)} 100%{opacity:0;transform:scale(.9)} }
.mobile-camera-actions { display:flex; justify-content:flex-end; gap:8px; }
.mobile-camera-actions button { display:inline-flex; min-height:44px; align-items:center; justify-content:center; gap:7px; border:1px solid #777; background:#222; color:#fff; padding:0 16px; font-weight:600; }
.mobile-camera-actions #captureMobileCamera { border-color:var(--accent); background:var(--accent); }
@media(max-width:600px){.mobile-camera-dialog{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0}.mobile-camera-copy{height:100%;align-content:center;padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom))}.mobile-camera-actions{display:grid;grid-template-columns:1fr 1fr}.mobile-camera-actions button{width:100%}.mobile-camera-actions #openNativeCamera{grid-column:1/-1;grid-row:1}.mobile-camera-actions #cancelMobileCamera{grid-column:1;grid-row:2}.mobile-camera-actions #captureMobileCamera{grid-column:2;grid-row:2}}

.mobile-camera-dialog.crop-adjustment .mobile-camera-stage video,
.mobile-camera-dialog.crop-adjustment .mobile-camera-focus { display:none; }
.mobile-crop-surface { position:absolute; inset:0; z-index:1; overflow:hidden; background:#000; touch-action:none; user-select:none; -webkit-user-select:none; }
.mobile-crop-surface img { position:absolute; left:50%; top:50%; display:block; max-width:none; max-height:none; opacity:0; pointer-events:none; transform-origin:center; will-change:transform; }
.mobile-crop-surface img.ready { opacity:1; }
.mobile-camera-dialog.crop-adjustment .mobile-camera-guide { z-index:2; }

.settings-copy .desktop-column-choice-label,
.photo-animation-controls .settings-switch::before,
.settings-photo-duration > strong { font-size:11px; font-weight:400; letter-spacing:.08em; text-transform:uppercase; }

.photo-manager-dialog { width:min(480px,calc(100% - 28px)); max-width:480px; }
.photo-manager-copy { padding:38px; }
.photo-manager-copy h2 { margin:0 44px 6px 0; font-size:30px; }
.photo-manager-copy > p { margin:0 0 22px; color:var(--muted); }
.photo-manager-actions { display:grid; gap:9px; }
.photo-manager-actions button { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; align-items:center; width:100%; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:13px 15px; text-align:left; }
.photo-manager-actions button:hover,.photo-manager-actions button:focus-visible { border-color:var(--accent); }
.photo-manager-actions button:disabled { cursor:not-allowed; opacity:.42; }
.photo-manager-actions button:disabled:hover { border-color:var(--line); }
.photo-manager-actions button > .material-symbols-rounded { color:var(--accent); font-size:25px; }
.photo-manager-actions button > span:last-child { display:grid; gap:2px; }
.photo-manager-actions strong { font-size:15px; }
.photo-manager-actions small { color:var(--muted); font-size:12px; }
.photo-manager-actions .photo-manager-delete > .material-symbols-rounded { color:#c83e32; }
.photo-manager-actions .photo-delete-choice { position:relative; grid-template-columns:72px minmax(0,1fr) 24px; padding:10px; }
.photo-delete-choice > img { width:72px; height:72px; border:1px solid var(--line); background:var(--photo-background); object-fit:contain; }
.photo-manager-actions .photo-delete-choice > .photo-delete-choice-icon { color:#c83e32; font-size:22px; }
.photo-delete-choice > span:nth-child(2) { display:grid; gap:2px; }
.photo-delete-choice strong { text-transform:none; }
.photo-manager-actions .photo-replace-choice { position:relative; grid-template-columns:72px minmax(0,1fr) 24px; padding:10px; }
.photo-replace-choice > img { width:72px; height:72px; border:1px solid var(--line); background:var(--photo-background); object-fit:contain; }
.photo-replace-choice > span:nth-child(2) { display:grid; gap:2px; }
.photo-manager-actions .photo-replace-choice > .photo-replace-choice-icon { color:var(--accent); font-size:22px; }
@media(max-width:600px){.photo-manager-dialog{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0}.photo-manager-copy{display:grid;align-content:center;height:100%;padding:72px 22px max(28px,env(safe-area-inset-bottom))}}

.filter-heading #clearFilters {
  position:absolute;
  top:50%;
  right:0;
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
  transform:translateY(-50%);
}
.filter-heading { position:relative; }

.card.batch-selected { position:relative; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent),var(--shadow); }
.card.batch-selected::after { content:none; }
.card:has(> .batch-selection-toggle) { position:relative; }
.batch-selection-toggle { position:absolute; top:9px; left:9px; z-index:7; display:grid; place-items:center; box-sizing:border-box; width:20px; height:20px; border:0; border-radius:4px; background:#20211e; color:#fff; padding:0 0 2px; font-size:20px; line-height:1; opacity:0; transition:opacity .14s ease,background-color .14s ease,color .14s ease; }
.batch-selection-toggle.is-selected,
.batch-selection-toggle:not(.is-selected):hover,
.batch-selection-toggle:not(.is-selected):focus-visible { opacity:1; }
.batch-selection-toggle.is-selected { background:var(--accent); color:#fff; }
body:not(.dark) .batch-selection-toggle:not(.is-selected) { border:0; outline:1px solid var(--line); outline-offset:-1px; background:color-mix(in srgb,#eeece4 80%,transparent); color:#20211e; }
.dark .card.batch-selected,
.dark .card.batch-selected:hover {
  border-color:var(--accent);
  box-shadow:0 0 0 2px var(--accent),var(--shadow);
}
.dark .batch-selection-toggle { border:0; outline:1px solid var(--line); outline-offset:-1px; padding:0 0 2px; }
.dark .batch-selection-toggle.is-selected { outline-color:var(--accent); background:var(--accent); color:#fff; }
.batch-tag-bar { position:fixed; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); z-index:35; display:flex; align-items:center; gap:8px; transform:translateX(-50%); border:1px solid var(--line); border-radius:4px; background:var(--paper); color:var(--ink); box-shadow:0 10px 32px #0005; padding:9px; }
.batch-tag-bar[hidden] { display:none; }
.batch-tag-bar strong { padding:0 8px; white-space:nowrap; }
.batch-tag-bar button { display:inline-flex; align-items:center; gap:5px; min-height:38px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 12px; font-weight:600; }
.batch-tag-bar [data-batch-add] { border-color:var(--accent); background:var(--accent); color:#fff; }
.batch-tag-dialog { width:min(440px,calc(100% - 32px)); max-width:440px; border:1px solid var(--line); background:var(--paper); color:var(--ink); }
.batch-tag-dialog form { display:grid; gap:14px; padding:38px; }
.batch-tag-dialog h2,.batch-tag-dialog p { margin:0; }
.batch-tag-dialog p { color:var(--muted); }
.batch-tag-editor { margin-top:2px; }
.batch-tag-editor .detail-tag-suggestions > [data-batch-suggestion-buttons] { display:contents; }

.detail-edit-button { position:absolute; right:18px; bottom:18px; display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:var(--paper); color:var(--ink); padding:0; transition:background-color .15s ease,color .15s ease,border-color .15s ease; }
body:not(.dark) .detail-edit-button { border-color:var(--line); background:#fff; color:var(--ink); }
.detail-edit-button:hover,.detail-edit-button:focus-visible,.dark .detail-edit-button:hover,.dark .detail-edit-button:focus-visible { border-color:var(--ink); background:var(--ink); color:var(--paper); }
.detail-edit-button .material-symbols-rounded { display:block; font-size:21px; line-height:1; }
.detail-copy.detail-editing { overflow:visible; padding:38px; }
#detail:has(.detail-copy.detail-editing) { overflow:visible; }
#detail:has(.detail-copy.detail-editing) > #closeDetail { display:none; }
.detail-edit-form { display:flex; flex-direction:column; min-height:100%; gap:14px; }
.detail-edit-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.detail-copy .detail-edit-title { margin:0; padding:0; font-size:20px; line-height:1.2; }
.detail-edit-status-actions { display:flex; align-items:center; gap:5px; }
.detail-edit-status-actions button { display:grid; place-items:center; width:28px; height:28px; border:1px solid var(--line); border-radius:50%; background:var(--paper); color:var(--ink); padding:0; line-height:1; transition:transform .15s ease,background-color .15s ease,color .15s ease; }
.detail-edit-status-actions button:hover { transform:scale(1.08); }
.detail-edit-status-actions .material-symbols-rounded { display:block; font-size:17px; line-height:1; }
.detail-edit-status-actions [data-detail-status="Wishlist"] .material-symbols-rounded { position:relative; top:2px; transform:none; font-variation-settings:'FILL' 0; }
.detail-edit-status-actions button[aria-pressed="true"] { border-color:var(--ink); background:var(--ink); color:var(--paper); }
.detail-edit-status-actions [data-detail-status="Wishlist"][aria-pressed="true"] { border-color:var(--accent); background:var(--accent); color:#fff; }
.detail-edit-status-actions [data-detail-status="Wishlist"][aria-pressed="true"] .material-symbols-rounded { font-variation-settings:'FILL' 1; }
.detail-edit-fields { display:grid; gap:10px; }
.detail-edit-name-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.detail-edit-brand-origin { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.detail-menu-picker { position:relative; display:block; }
.detail-menu-picker input { padding-right:40px; }
.detail-menu-picker > button { position:absolute; top:0; right:0; display:grid; place-items:center; width:40px; height:40px; border:0; background:transparent; color:var(--ink); padding:0; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.detail-menu-picker > button:hover,.detail-menu-picker > button:focus-visible { color:var(--accent); }
.detail-menu-picker .material-symbols-rounded { font-size:21px; user-select:none; -webkit-user-select:none; }
.detail-picker-menu { position:absolute; z-index:12; top:calc(100% + 5px); left:0; display:block; width:100%; max-height:190px; overflow-y:auto; border:1px solid var(--line); background:var(--paper); box-shadow:0 3px 8px #0004; }
.detail-picker-menu[hidden] { display:none; }
.detail-picker-menu button { display:block; width:100%; min-height:38px; border:0; background:transparent; color:var(--ink); padding:8px 12px; text-align:left; }
.detail-picker-menu button:hover,.detail-picker-menu button:focus-visible { background:color-mix(in srgb,var(--accent) 9%,var(--paper)); color:var(--accent); }
.detail-picker-menu [data-picker-add] { border-top:1px solid var(--line); }
.detail-edit-fields label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:600; }
.detail-edit-fields input,.detail-edit-fields select { width:100%; min-width:0; height:40px; border:1px solid var(--line); background:var(--bg); color:var(--ink); padding:0 11px; }
.detail-edit-fields input[type="number"] { appearance:textfield; -moz-appearance:textfield; }
.detail-edit-fields input[type="number"]::-webkit-inner-spin-button,
.detail-edit-fields input[type="number"]::-webkit-outer-spin-button { margin:0; -webkit-appearance:none; appearance:none; }
.detail-edit-value { display:grid; grid-template-columns:68px 89px minmax(0,1fr); gap:10px; }
.detail-edit-message { min-height:18px; margin:0; color:var(--accent); font-size:12px; }
.detail-edit-actions { display:grid; grid-template-columns:auto 1fr auto auto; gap:8px; margin-top:auto; transition:column-gap .18s ease; }
.detail-edit-form:not(.is-dirty) .detail-edit-actions { column-gap:0; }
.detail-edit-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; border:1px solid var(--line); background:var(--paper); color:var(--ink); padding:0 13px; font-weight:600; }
.detail-edit-actions button[type="submit"] { justify-content:flex-start; width:87px; min-width:0; overflow:hidden; gap:7px; border-color:var(--ink); background:var(--ink); color:var(--paper); padding:0 15px 0 10px; white-space:nowrap; opacity:1; transform:translateX(0); transition:width .18s cubic-bezier(.2,.8,.2,1),padding .18s ease,border-width .18s ease,opacity .12s ease,transform .18s cubic-bezier(.2,.8,.2,1); }
.detail-edit-form:not(.is-dirty) .detail-edit-actions button[type="submit"] { width:0; padding-inline:0; border-width:0; opacity:0; transform:translateX(-8px); pointer-events:none; }
.detail-edit-icon-actions { display:flex; gap:6px; }
.detail-edit-icon-actions button { width:40px; padding:0; }
.detail-edit-icon-actions .material-symbols-rounded { font-size:19px; }
.detail-edit-actions .detail-delete-figure { justify-content:flex-start; width:40px; overflow:hidden; gap:7px; color:var(--accent); padding:0 10px; white-space:nowrap; transition:width .18s cubic-bezier(.2,.8,.2,1),background-color .15s ease,color .15s ease,border-color .15s ease; }
.detail-edit-actions .detail-delete-figure::after { content:'Delete'; opacity:0; transform:translateX(-4px); transition:opacity .12s ease,transform .18s cubic-bezier(.2,.8,.2,1); }
.detail-edit-actions .detail-delete-figure:hover,.detail-edit-actions .detail-delete-figure:focus-visible { width:97px; }
.detail-edit-actions .detail-delete-figure:hover::after,.detail-edit-actions .detail-delete-figure:focus-visible::after { opacity:1; transform:translateX(0); }
.detail-edit-actions .detail-delete-figure:hover,.detail-edit-actions .detail-delete-figure:focus-visible { border-color:var(--accent); background:var(--accent); color:#fff; }
@media(prefers-reduced-motion:reduce){.detail-edit-status-actions button,.detail-edit-actions button[type="submit"],.detail-edit-actions .detail-delete-figure,.detail-edit-actions .detail-delete-figure::after{transition:none}.detail-edit-status-actions button:hover{transform:none}}
.dark .detail-edit-button { background:var(--bg); }
body:not(.dark) .detail-edit-button:hover,
body:not(.dark) .detail-edit-button:focus-visible,
.dark .detail-edit-button:hover,
.dark .detail-edit-button:focus-visible { border-color:var(--ink); background:var(--ink); color:var(--paper); }
@media(max-width:600px){.detail-copy.detail-editing{padding:28px 22px}.detail-edit-form{min-height:auto}.detail-edit-name-row,.detail-edit-brand-origin{grid-template-columns:1fr}.detail-edit-value{grid-template-columns:68px 89px minmax(100px,1fr)}.detail-edit-actions{grid-template-columns:auto 1fr auto auto}}

/* About and version refresh */
.about-dialog{position:relative;width:min(440px,calc(100% - 32px));max-width:none;padding:0;border:1px solid var(--line);border-radius:0;background:var(--paper);color:var(--ink);box-shadow:0 18px 48px rgba(0,0,0,.24)}
.about-dialog::backdrop{background:rgba(0,0,0,.55)}
.about-dialog>.close{position:absolute;z-index:2;top:16px;right:16px}
.about-copy{padding:34px}
.about-copy h2{margin:0 56px 6px 0;font-size:30px;line-height:1.1}
.about-product{margin:0 0 26px;color:var(--muted);font-weight:700}
.about-versions{display:grid;gap:0;margin:0 0 18px;border-top:1px solid var(--line)}
.about-versions>div{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid var(--line)}
.about-versions dt{color:var(--muted)}
.about-versions dd{margin:0;font-weight:800;text-align:right}
.about-version-status{min-height:22px;margin:0 0 12px;color:var(--muted)}
.about-refresh{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:52px;border:1px solid var(--ink);border-radius:0;background:var(--ink);color:var(--paper);font:inherit;font-weight:800;cursor:pointer}
.about-refresh:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.about-refresh:disabled{cursor:wait;opacity:.7}
.about-data-note{margin:12px 0 0;color:var(--muted);font-size:13px;text-align:center}
@media(max-width:600px){.about-copy{padding:30px 22px 24px}.about-dialog>.close{top:12px;right:12px}}
.settings-copy .settings-about-copy{padding:8px 0 4px}
.settings-copy .settings-about-copy .about-product{font-size:18px;color:var(--ink)}
@media(max-width:600px){.settings-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-tabs::after{width:33.3333%}.settings-copy .settings-tabs [data-settings-tab="display"]{display:flex!important}.settings-copy .settings-about-copy{padding:8px 0 4px}}
