



*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  







  color-scheme: only light;

  --bg: #f5f6fa;
  --bg-elev: #ffffff;
  --bg-soft: #f0f2f7;
  --line: #e2e5ec;
  --text: #1f2330;
  --text-muted: #6b7080;
  --text-faint: #9aa0ac;
  
















  --primary: #545454;
  --primary-hover: #3d3d3d;
  --primary-soft: #ececec;
  






  


  --dock-accent-a: #3c6693;
  --dock-accent-b: #1f3a5f;
  --danger: #e0445b;
  --success: #21a85a;
  --warn: #f3a93b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 32, 0.05);
  --shadow-md: 0 6px 18px rgba(20, 23, 32, 0.06);
  --shadow-lg: 0 16px 40px rgba(20, 23, 32, 0.08);
  --top-h: clamp(56px, 16vw, 64px);   

  














  --m-padx: clamp(12px, 3.5vw, 14px);          
  --m-pad-bottom: clamp(78px, 24vw, 96px);     
  --m-bar-gap: clamp(7px, 2.25vw, 9px);        
  --m-rail-gap: clamp(6px, 2vw, 8px);          
  --m-chip-py: clamp(6px, 2vw, 8px);           
  --m-chip-px: clamp(11px, 3.5vw, 14px);
  --m-chip-fs: clamp(12px, 3.25vw, 13px);      
  --m-grid-r: clamp(13px, 4.5vw, 18px);        
  --m-grid-c: clamp(10px, 3.5vw, 14px);        
  --m-card-r: clamp(9px, 3vw, 12px);           
  --m-code-fs: clamp(11px, 3vw, 12px);         
  







  --m-dock-btn: clamp(32px, 10vw, 40px);       
  --m-dock-icon: clamp(18px, 5vw, 20px);       
  --m-dock-bottom: clamp(16px, 5vw, 20px);     
  













  --dock-lift: 0px;
  
  --dock-gap: calc(var(--m-dock-bottom) + env(safe-area-inset-bottom, 0px) + var(--dock-lift, 0px));
  





  --bottom-inset: max(
    calc(var(--m-pad-bottom) + env(safe-area-inset-bottom, 0px)),
    calc(var(--dock-gap) + var(--m-dock-btn) + 10px + 16px)
  );
  --m-btt: clamp(38px, 11vw, 44px);            
  --m-btt-icon: clamp(17px, 4.5vw, 18px);      
  --m-btt-right: clamp(12px, 3.5vw, 14px);     
  


  


  --m-welcome-title: clamp(26px, 8vw, 32px);       
  --m-welcome-title-en: clamp(20px, 6.25vw, 25px); 
  --m-welcome-icon: clamp(30px, 8.5vw, 34px);      
  --m-welcome-glyph: clamp(17px, 5.25vw, 21px);    
  --m-welcome-btn: clamp(44px, 13vw, 52px);        
  --m-welcome-gap: clamp(14px, 5.5vw, 22px);       
  
  --lb-media-min: 120px;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

























html.app-root,
html.app-root body {
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}





.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  background: var(--bg-soft);
  color: var(--text);
  transition: background 0.15s ease, transform 0.05s ease;
  border: 1px solid transparent;
}
.btn:hover {
  background: #e7eaf2;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-hover);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  background: var(--bg-soft);
}
.btn.danger {
  background: #fde9eb;
  color: var(--danger);
}
.btn.danger:hover {
  background: #fbd5da;
}
.btn.sm {
  padding: 5px 12px;
  font-size: 12px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15);
}
.textarea {
  min-height: 80px;
  resize: vertical;
}

.select-sm {
  width: auto;
  min-width: 150px;
  max-width: 220px;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}





.app {
  

















  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}


.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}






.topbar {
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.topbar .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar .icon-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.topbar .icon-btn svg {
  width: 22px;
  height: 22px;
}

.search {
  flex: 1;
  position: relative;
  max-width: 540px;
}
.search input {
  width: 100%;
  padding: 10px 44px 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15);
}
.search .search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search .search-btn:hover {
  background: #000;
}
.search .search-btn svg {
  width: 16px;
  height: 16px;
}

.topbar .spacer {
  flex: 1;
}

.topbar .admin-entry[hidden] {
  display: none;
}













.topbar-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
  color: var(--text);
}
.topbar-brand-logo {
  display: block;
  height: var(--brand-h, 32px);
  width: auto;
  
  max-width: min(220px, 42vw);
  object-fit: contain;
}
.topbar-brand-name {
  font-weight: 600;
  
  font-size: clamp(14px, calc(var(--brand-h, 32px) * 0.46), 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar[data-branded] .icon-btn[aria-label='home'] {
  display: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 4px;
  font-size: 13px;
}
.lang-switch button {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
}
.lang-switch button.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}



















.cat-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  











  





  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  
  padding: 10px var(--m-padx, 14px) 8px;
  min-height: 52px;
  min-width: 0;
  background: none;
  border-bottom: 0;
  pointer-events: none;
}

















.cat-sticky .cat-select,
.cat-sticky .cat-rail,
.cat-sticky .cat-gbtn {
  pointer-events: auto;
}





.cat-sticky .cat-all-btn {
  pointer-events: auto;
}



.pagehead {
  display: flex;
  align-items: center;
  



  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.pagehead-master {
  









  display: flex;
  align-items: center;
  gap: var(--m-bar-gap, 9px);
  flex: 0 0 auto;
  min-width: 0;
  pointer-events: auto;
}



.cat-gbtn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cat-gbtn:hover {
  border-color: #c5cad6;
  color: var(--text);
}
.cat-gbtn:active {
  background: var(--bg-soft);
}


.pagehead-master > .cat-wrap {
  flex: 0 0 auto;
}




#cat-wrap {
  


  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  padding: 9px 0 0;
}

.cat-rail-empty {
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 6px 0;
}




@media (max-width: 640px) {
  



  .cat-sticky {
    padding-top: 8px;
    padding-bottom: 6px;
  }
}





.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  





  overscroll-behavior-y: contain;
  


  padding: 0;
}




.content-inner {
  


  padding: clamp(8px, 2.5vw, 10px) 28px var(--bottom-inset);
}















.filter-row {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}


.fav-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.fav-entry:hover {
  border-color: #c5cad6;
}
.fav-entry svg {
  width: 16px;
  height: 16px;
}
.fav-entry.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.fav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fav-count[hidden] {
  display: none;
}
.fav-entry.active .fav-count {
  background: #fff;
}




.admin-entry {
  height: 38px;
  padding: 0 11px;
}
.admin-entry .admin-label {
  display: none;
}
.admin-entry .admin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.admin-entry .admin-icon svg {
  width: 16px;
  height: 16px;
}



@media (max-width: 640px) {
  .topbar {
    gap: clamp(8px, 2.5vw, 10px);
    padding: 0 var(--m-padx);
  }
  




  .topbar-brand-logo {
    max-width: 34vw;
    margin-left: calc(var(--brand-h, 32px) * -0.2857);
  }
  .topbar-brand-name {
    max-width: 34vw;
  }
  .lang-switch button {
    padding: clamp(4px, 1.25vw, 5px) clamp(7px, 2.25vw, 9px);
  }
  .fav-entry {
    gap: 6px;
    padding: 0 11px;
  }
  .fav-entry .fav-label {
    display: none;
  }
}


.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip.active .chip-count {
  background: var(--primary);
  color: #fff;
}

.chip-empty {
  color: var(--text-faint);
}
.chip-empty .chip-count {
  color: var(--text-faint);
}





.lightbox-fav {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}
.lightbox-fav svg {
  width: 20px;
  height: 20px;
}


.lightbox-fav .i-off,
.lightbox-fav .i-on {
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.lightbox-fav .i-off {
  display: flex;
}
.lightbox-fav:hover {
  border-color: #c5cad6;
}
.lightbox-fav.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.lightbox-fav.on .i-off {
  display: none;
}
.lightbox-fav.on .i-on {
  display: flex;
}


























.back-to-top {
  position: fixed;
  right: 24px;
  bottom: calc(var(--dock-gap) + var(--m-dock-btn) / 2 + 5px - var(--m-btt) / 2);
  width: var(--m-btt);
  height: var(--m-btt);
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 32, 0.07);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 23, 32, 0.1);
  
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    background 0.15s ease, border-color 0.15s ease;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #fff;
  border-color: #c5cad6;
}
.back-to-top svg {
  width: var(--m-btt-icon);
  height: var(--m-btt-icon);
}


html.dock-searching .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

@media (max-width: 640px) {
  .back-to-top {
    right: var(--m-btt-right);
  }
}












.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--dock-gap);
  


  width: calc(var(--m-dock-btn) * var(--dock-cols, 5) + 20px);
  height: calc(var(--m-dock-btn) + 10px);
  padding: 5px 9px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(20, 23, 32, 0.07);
  box-shadow: 0 12px 32px rgba(20, 23, 32, 0.14);
  z-index: 45;
  transition: width 0.22s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.18s ease, border-color 0.18s ease;
}
.dock-btns {
  display: flex;
  align-items: center;
  gap: 0;
}

.dock.dock--no-ai {
  --dock-cols: 4;
}









.dock.dock--pending {
  opacity: 0;
  pointer-events: none;
}


.dock-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.dock.searching .dock-btns {
  display: none;
}
.dock-btn {
  position: relative;
  flex: 0 0 auto;
  width: var(--m-dock-btn);
  height: var(--m-dock-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.dock-btn svg {
  width: var(--m-dock-icon);
  height: var(--m-dock-icon);
}
.dock-btn:hover {
  color: var(--text);
}












.dock-btn.active {
  background: none;
  color: transparent;              
  transition: color 0.15s ease;
}
.dock-btn.active svg [stroke] {
  stroke: url(#dock-grad) currentColor;
}
.dock-btn.active svg [fill] {
  fill: url(#dock-grad) currentColor;
}


.dock-btn.active svg {
  color: var(--primary);
}













.dock-search {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 4px;
}
.dock.searching .dock-search {
  display: flex;
}
.dock.searching {
  width: 343px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15),
    0 12px 32px rgba(20, 23, 32, 0.14);
}
.dock-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  color: var(--text-faint);
}
.dock-search-icon svg {
  width: 18px;
  height: 18px;
}
.dock-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 2px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
}
.dock-search input::placeholder {
  color: var(--text-faint);
}
.dock-search-clear {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted);
  line-height: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.dock-search-clear:hover {
  background: rgba(20, 23, 32, 0.07);
  color: var(--text);
}
.dock-search-clear svg {
  width: 15px;
  height: 15px;
}


@media (max-width: 380px) {
  .dock.searching {
    width: calc(100vw - 28px);
  }
}

@media (max-width: 640px) {
  .dock-search input {
    font-size: 16px;
  }
}


.fav-empty {
  padding: 64px 20px;
  text-align: center;
}







.content.is-empty {
  display: flex;
  flex-direction: column;
}
.content.is-empty .content-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.content.is-empty .card-grid {
  flex: 1 1 auto;
  align-content: center;
}
.fav-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-empty-icon svg {
  width: 24px;
  height: 24px;
}
.fav-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.fav-empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.fav-empty .btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.chip-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: var(--m-chip-fs);
  font-weight: 500;
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: #c5cad6;
}
.chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}






.cat-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
  

  flex: 0 1 auto;
}




.cat-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  

  max-width: none;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(20, 23, 32, 0.07);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(20, 23, 32, 0.14);
}
.cat-select-label {
  




  min-width: 0;
  white-space: nowrap;
}













.cat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}



.cat-pin {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 46%;
}
.cat-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  background: var(--line);
}
.cat-divider[hidden] {
  display: none;
}







.cat-rail {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 4px 0;
  margin: -4px 0;
}
.cat-rail::-webkit-scrollbar {
  display: none;
}








.cat-rail .chip.is-pin:not(.is-clone) {
  position: sticky;
  left: 0;
  z-index: 2;
}


























.cat-rail .chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary);
}


.cat-rail .chip.chip-empty {
  color: var(--text-faint);
}



.cat-rail .chip .chip-count {
  background: #fff;
}
.cat-rail .chip.active .chip-count {
  background: var(--primary-soft);
  color: var(--text-muted);
}
.cat-rail .chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}










.cat-rail .chip.active {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}






.cat-rail .chip.is-lead-in {
  animation: chipLeadIn 0.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes chipLeadIn {
  from {
    opacity: 0.35;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}




.cat-rail[data-fade~='start'] {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px);
}
.cat-rail[data-fade~='end'] {
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 18px);
  mask-image: linear-gradient(270deg, transparent 0, #000 18px);
}
.cat-rail[data-fade~='start'][data-fade~='end'] {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 18px,
    #000 calc(100% - 18px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 18px,
    #000 calc(100% - 18px),
    transparent 100%
  );
}



@media (max-width: 640px) {
  .content-inner {
    padding-left: var(--m-padx);
    padding-right: var(--m-padx);
  }
  .cat-bar {
    gap: var(--m-bar-gap);
  }
  .cat-rail {
    gap: var(--m-rail-gap);
  }
  .cat-rail .chip {
    padding: var(--m-chip-py) var(--m-chip-px);
  }
  .cat-pin {
    max-width: 44%;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--m-grid-r) var(--m-grid-c);
}

@media (max-width: 1280px) {
  .card-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  border-radius: var(--m-card-r);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.card .swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--m-card-r);
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.card .swatch img.lazy {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card .swatch img.lazy.loaded {
  opacity: 1;
}
.card .code {
  margin-top: clamp(4px, 1.5vw, 6px);
  font-size: var(--m-code-fs);
  color: var(--text-muted);
  letter-spacing: 0.4px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}




.card-mine .swatch::after {
  content: '';
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20, 23, 32, 0.55);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-faint);
}















.pager {
  position: relative;
  display: flex;
  justify-content: center;
  


  margin: auto 0 0;
  padding-bottom: 6px;
  --pg-control: 42px;            
  --pg-trigger-h: 56px;
  --pg-trigger-radius: 16px;
  --pg-cell: 30px;               
  --pg-page-w: 36px;             
  --pg-row-page-w: 36px;         
  --pg-grad-w: 100px;
  --pg-grad-h: 36px;
  --pg-dash-h: 22px;
  --pg-dash-margin: 6px;
  --pg-panel-w: 335px;           
  --pg-panel-pad: 8px;
  --pg-row-h: 48px;
  --pg-row-gap: 5px;
  --pg-scroll-h: 289px;          

  
  --pg-line: var(--line);
  --pg-line-strong: #c5cad6;
  --pg-row-line: #e9ebf0;
  --pg-dash: #d8dce5;
  
  --pg-active-line: #8f929b;
  --pg-active-ink: var(--primary);
  --pg-hover-bg: #fcfcfd;
}
.pager[hidden] {
  display: none;
}








.content--pager {
  display: flex;
  flex-direction: column;
}



.content--pager > * {
  flex: 0 0 auto;
}
.content--pager > .content-inner {
  flex: 1 0 auto;   
}
.content-inner--pager {
  display: flex;
  flex-direction: column;
}
.content-inner--pager .card-grid {
  flex: 0 0 auto;
  margin-bottom: 28px;
}


.pg-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-nav {
  width: var(--pg-control);
  height: var(--pg-control);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--pg-line);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.pg-nav:hover:not(:disabled) {
  border-color: var(--pg-line-strong);
  background: var(--pg-hover-bg);
}
.pg-nav:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  box-shadow: none;
}
.pg-nav svg {
  width: 14px;
  height: 14px;
}


.pg-trigger {
  height: var(--pg-trigger-h);
  display: flex;
  align-items: center;
  gap: 6px;
  
  padding: 6px;
  border-radius: var(--pg-trigger-radius);
  border: 1px solid var(--pg-line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pg-trigger:hover {
  border-color: var(--pg-line-strong);
}
.pg-trigger[aria-expanded="true"] {
  border-color: var(--pg-line-strong);
  box-shadow: var(--shadow-md);
}

.pg-page {
  width: var(--pg-page-w);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pg-grad {
  display: block;
  border-radius: 8px;
  background-color: var(--bg-soft);
  box-shadow: inset 0 0 0 1px rgba(20, 23, 32, 0.06);
}
.pg-grad--trigger {
  width: var(--pg-grad-w);
  height: var(--pg-grad-h);
  flex: 0 0 auto;
}

.pg-right {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 0 0 auto;
}
.pg-total {
  width: var(--pg-cell);
  height: var(--pg-cell);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pg-rule {
  width: 1px;
  height: var(--pg-dash-h);
  flex: 0 0 auto;
  margin: 0 var(--pg-dash-margin);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--pg-dash) 0 2px,
    transparent 2px 6px
  );
}
.pg-expand {
  width: var(--pg-cell);
  height: var(--pg-cell);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
}
.pg-expand svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.pg-trigger[aria-expanded="true"] .pg-expand svg {
  transform: rotate(180deg);
}


.pg-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 13px);
  width: var(--pg-panel-w);
  padding: var(--pg-panel-pad);
  background: #fff;
  border: 1px solid var(--pg-line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.985);
  transform-origin: 50% 100%;
  transition: opacity 0.17s ease, transform 0.22s cubic-bezier(0.22, 0.78, 0.26, 1),
    visibility 0s linear 0.22s;
  z-index: 2;
}

.pg-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 11px;
  height: 11px;
  background: #fff;
  border-right: 1px solid var(--pg-line);
  border-bottom: 1px solid var(--pg-line);
  transform: translateX(-50%) rotate(45deg);
  border-bottom-right-radius: 2px;
}
.pager.is-open .pg-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition: opacity 0.17s ease, transform 0.22s cubic-bezier(0.22, 0.78, 0.26, 1),
    visibility 0s;
}

.pg-scroll {
  position: relative;          
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
}
.pg-scroll.is-scrollable {
  height: var(--pg-scroll-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pg-scroll.is-scrollable::-webkit-scrollbar {
  display: none;
}
.pg-list {
  display: flex;
  flex-direction: column;
  gap: var(--pg-row-gap);
  width: 100%;
}

.pg-row {
  width: 100%;
  height: var(--pg-row-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--pg-row-line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pg-row:hover {
  border-color: #d4d8e1;
  background: #fbfbfd;
}
.pg-row.is-active {
  border: 1.5px solid var(--pg-active-line);
}
.pg-row-page {
  width: var(--pg-row-page-w);
  height: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pg-row.is-active .pg-row-page {
  font-weight: 700;
  color: var(--pg-active-ink);
}
.pg-row-rule {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0 6px 0 0;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--pg-dash) 0 2px,
    transparent 2px 6px
  );
}
.pg-row-grad-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 5px 0 0;
}
.pg-row-grad {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  background-color: var(--bg-soft);
  box-shadow: inset 0 0 0 1px rgba(20, 23, 32, 0.06);
}


.pg-fade {
  position: absolute;
  left: var(--pg-panel-pad);
  right: var(--pg-panel-pad);
  bottom: var(--pg-panel-pad);
  height: 14px;
  border-radius: 0 0 13px 13px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 96%);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.16s ease;
}
.pg-fade.is-hidden {
  opacity: 0;
}


.pager button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}




.pager.is-pointer-focus button:focus {
  outline: none;
}


@media (max-width: 640px) {
  .pager {
    --pg-control: 44px;
    --pg-trigger-h: 52px;
    --pg-trigger-radius: 14px;
    --pg-cell: 34px;
    --pg-page-w: 30px;
    --pg-row-page-w: 32px;
    --pg-grad-w: 84px;
    --pg-grad-h: 34px;
    --pg-dash-h: 20px;
    --pg-dash-margin: 5px;
    --pg-panel-pad: 7px;
    --pg-row-h: 46px;
    --pg-row-gap: 4px;
    --pg-scroll-h: 273px;
  }
  .pg-pager { gap: 7px; }
  .pg-trigger { gap: 5px; padding: 5px; }
  .pg-total { font-size: 12.5px; }
  .pg-panel {
    width: min(366px, calc(100vw - 24px));
    border-radius: 18px;
  }
  .pg-row { border-radius: 13px; }
  .pg-row-page { font-size: 12.5px; }
  .pg-row-rule { height: 22px; margin-right: 5px; }
  .pg-row-grad-wrap { padding-right: 4px; }
  .pg-row-grad { height: 34px; }
}

@media (max-width: 380px) {
  .pager {
    --pg-control: 44px;
    --pg-cell: 36px;
    --pg-page-w: 28px;
    --pg-row-page-w: 30px;
    --pg-grad-w: 76px;
    --pg-dash-margin: 4px;
    --pg-panel-pad: 6px;
  }
  .pg-pager { gap: 5px; }
  .pg-trigger { gap: 4px; padding: 4px; }
}


@media (max-width: 344px) {
  .pager {
    --pg-control: 40px;
    --pg-trigger-h: 50px;
    --pg-trigger-radius: 13px;
    --pg-cell: 34px;
    --pg-page-w: 26px;
    --pg-row-page-w: 28px;
    --pg-grad-w: 60px;
    --pg-grad-h: 32px;
    --pg-dash-h: 18px;
    --pg-dash-margin: 3px;
  }
  .pg-pager { gap: 4px; }
  .pg-trigger { gap: 3px; padding: 3px; }
  .pg-total { font-size: 12px; }
  .pg-panel { border-radius: 16px; }
  .pg-row-grad { height: 30px; }
}





@keyframes pop {
  from {
    transform: translateY(-4px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 32, 0.4);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade 0.15s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s ease;
}
.modal .modal-head {
  padding: 18px 22px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal .modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.modal .modal-head .close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
}
.modal .modal-head .close:hover {
  background: var(--bg-soft);
}
.modal .modal-body {
  padding: 14px 22px;
  max-height: 70vh;
  overflow: auto;
}
.modal .modal-foot {
  padding: 12px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}





.lightbox {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 860px;
  
  



  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  




  max-height: min(900px, calc(100vh - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  animation: pop 0.18s ease;
  overflow: hidden;
}
.lightbox-head {
  flex: 0 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}









@media (min-width: 1600px) {
  .lightbox {
    max-width: 1040px;
  }
}
@media (min-width: 2100px) {
  .lightbox {
    max-width: 1180px;
  }
}
.lightbox-title {
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-head .close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}







.lightbox-head .close svg {
  width: 32px;
  height: 32px;
  display: block;
}
.lightbox-head .close:hover {
  background: var(--bg-soft);
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}


.tc-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.tc-switch-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
}
.tc-switch-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.tc-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tc-switch-track {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d4d8e1;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tc-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 23, 32, 0.25);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tc-switch-input:checked + .tc-switch-track {
  background: var(--primary);
}
.tc-switch-input:checked + .tc-switch-track .tc-switch-thumb {
  transform: translateX(18px);
}
.tc-switch-input:focus-visible + .tc-switch-track {
  box-shadow: 0 0 0 3px var(--primary-soft);
}


.lightbox-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lightbox-panel {
  flex: 1 1 auto;
  
  min-height: var(--lb-media-min);
  display: flex;
  flex-direction: column;
  min-width: 0;
  
  position: relative;
}







.lightbox-panel:not(.picker-panel) {
  overflow: hidden;
}

.lightbox-color {
  flex: 1 1 auto;
  width: 100%;
  min-height: var(--lb-media-min);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--bg-soft);
}










.mine-pair {
  flex: 1 1 auto;
  min-height: var(--lb-media-min);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  


  position: relative;
}

.mine-pair.single {
  grid-template-columns: 1fr;
}
.mine-half {
  min-width: 0;
  



  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  background: var(--bg-soft);
}
.mine-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mine-shot {
  display: block;
  max-width: 100%;
  max-height: 100%;
}





















.recolor-slot {
  flex: 1 1 auto;
  width: 100%;
  min-height: var(--lb-media-min);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  position: relative;
}











.recolor-slot .lightbox-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.recolor-loading,
.recolor-error {
  font-size: 13px;
  color: var(--text-muted);
}
.recolor-error {
  color: #c0392b;
}

.recolor-fallback-note {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}



.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}



.admin-filter {
  margin-bottom: 12px;
  gap: 8px;
}
.admin-filter:empty {
  display: none;
}
.admin-filter .chip {
  padding: 5px 14px;
  font-size: 12px;
}


#panel-cards .col-check {
  display: none;
}
#panel-cards.bulk-mode .col-check {
  display: table-cell;
}

.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid #d9e0f0;
}
.bulk-bar[hidden] {
  display: none;
}
.bulk-bar .spacer {
  flex: 1;
}
.bulk-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
}
.bulk-all input[type='checkbox'],
.table input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.table tr.row-selected > td {
  background: #f6f8fc;
}

.csv-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.csv-text {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
  overflow: auto;
}
.csv-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}
.csv-modes .radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.csv-report {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.csv-report.ok {
  color: #1a7f37;
}
.csv-report.warn {
  color: #9a6700;
}
.csv-report.error {
  color: #c0392b;
}
.csv-errors {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #c0392b;
  font-size: 12px;
  max-height: 130px;
  overflow: auto;
}
.csv-errors li {
  margin: 2px 0;
}


.cat-default {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cat-default input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.cat-default-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #d9e0f0;
  border-radius: 999px;
  padding: 1px 8px;
}
.cat-default-text:empty {
  display: none;
}







.cat-row-child td {
  background: rgba(84, 84, 84, 0.028);
}
.cat-row-child .cat-name-cell {
  border-left: 2px solid rgba(84, 84, 84, 0.28);
  padding-left: 10px;
}
.cat-name-indent {
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cat-name-cell {
  white-space: nowrap;
}

.cat-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: 1px;
}
.cat-badge--group {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #d9e0f0;
}
.cat-badge--child {
  color: #6b7080;
  background: #f0f2f7;
  border: 1px solid var(--line);
}
.cat-badge--sealed {
  color: #8a5b12;
  background: #fdf6ec;
  border: 1px solid #f3dfbd;
}

.cat-cardcount {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.cat-cardcount::before {
  content: '· ';
}

.cat-meta {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-faint);
}

.cat-row-top.drag-over td,
.cat-row-child.drag-over td {
  box-shadow: inset 0 0 0 9999px rgba(84, 84, 84, 0.07);
}
.cat-row-top.drag-over:not(.dragging) td:first-child,
.cat-row-child.drag-over:not(.dragging) td:first-child {
  box-shadow: inset 0 3px 0 -1px var(--primary);
}


.drag-into td {
  background: var(--primary-soft) !important;
  box-shadow: inset 0 0 0 2px rgba(84, 84, 84, 0.42);
}
.drag-into .cat-name-cell::after {
  content: ' ⤵';
  color: var(--primary);
  font-weight: 600;
}


.cat-kind-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 2px;
}
.cat-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.cat-kind input[type='radio'] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}
.cat-kind input[type='radio']:disabled + span {
  color: var(--text-faint);
}
.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}







.cat-personal-sec {
  margin-top: 22px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.cat-personal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.cat-personal-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.cat-personal-tag {
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  white-space: nowrap;
}
.cat-personal-hint {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 720px;
}
.cat-personal-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.cat-personal-row .field {
  flex: 1 1 220px;
  min-width: 180px;
}






.cat-personal-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 20px;
  margin-top: 14px;
}
.cat-personal-assets .field {
  margin-bottom: 10px;
}
.cat-personal-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.seed-picker {
  position: relative;
  width: 100%;
  max-height: 46vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.seed-picker canvas {
  display: block;
  max-width: 100%;
  cursor: crosshair;
}
.seed-picker .seed-fallback {
  padding: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.seed-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.seed-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.seed-preview {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgb(128 128 128);
}
.seed-in {
  width: 82px;
}
.lightbox-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}


.similar {
  flex: 0 0 auto;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 14px;
  padding-top: 14px;
  



  position: relative;
  z-index: 1;
}
.similar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.similar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}
.similar-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.similar-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 132px;
  max-width: 190px;
  padding: 6px 30px 6px 12px;
  border-radius: 999px;
  background-color: #fff;
  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.similar-select:hover {
  border-color: #c5cad6;
}
.similar-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.similar-select option {
  color: var(--text);
  background: #fff;
}
.similar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.similar-item {
  position: relative;
  display: block;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.similar-swatch {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-soft);
  background-size: cover;
  background-position: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.similar-swatch.is-tc:not(.loaded) {
  background-image: linear-gradient(
    100deg,
    #eef1f6 30%,
    #f7f9fc 50%,
    #eef1f6 70%
  );
  background-size: 220% 100%;
  animation: swatchShimmer 1.1s linear infinite;
}











.similar-swatch.is-tc.failed {
  background-image: none;
}
@keyframes swatchShimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}
.similar-item:hover .similar-swatch {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}








.similar-code {
  display: block;
  margin-top: 7px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-item:hover .similar-code {
  color: var(--text);
}
.similar-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0;
}
.similar-hint.error {
  color: #c0392b;
}



@media (max-width: 900px) {
  .similar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}




@media (min-width: 641px) and (max-width: 900px) {
  .similar {
    margin-top: 10px;
    padding-top: 10px;
  }
  .similar-head {
    margin-bottom: 8px;
  }
  .similar-grid {
    gap: 8px;
  }
  .similar-swatch {
    aspect-ratio: 2 / 1;
    border-radius: 8px;
  }
  .similar-code {
    margin-top: 5px;
    font-size: 10.5px;
  }
}

@media (max-width: 640px) {
  .lightbox-mask {
    padding: 6px 0 0;
    align-items: stretch;
  }
  






  .lightbox-mask::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    pointer-events: none;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  









  .lightbox {
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    animation: none;
  }
  



  .lightbox-mask .lightbox {
    max-width: 100%;
    height: calc(100vh - 6px);
    height: calc(100dvh - 6px);
    max-height: calc(100vh - 6px);
    max-height: calc(100dvh - 6px);
    border-radius: 20px 20px 0 0;
  }
  .lightbox-head {
    padding: 12px 14px;
    background: #fff;
  }
  


  .lightbox-body {
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  }
  

  .lightbox-title {
    flex: 0 1 auto;
    min-width: 0;
  }
  .lightbox-actions {
    flex: 0 0 auto;
  }
  





  .mine-pair {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .mine-pair.single {
    grid-template-rows: 1fr;
  }
  
  .similar {
    margin-top: 10px;
    padding-top: 10px;
  }
  .similar-head {
    margin-bottom: 8px;
  }
  .similar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .similar-swatch {
    aspect-ratio: 3 / 2;
    border-radius: 8px;
  }
  .similar-code {
    margin-top: 5px;
    font-size: 10.5px;
  }
}

@media (max-width: 640px) and (max-height: 700px) {
  .lightbox-head {
    padding: 10px 12px;
  }
  

  .lightbox-body {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .similar {
    margin-top: 8px;
    padding-top: 8px;
  }
  .similar-head {
    margin-bottom: 6px;
  }
  .similar-grid {
    gap: 5px;
  }
  .similar-swatch {
    aspect-ratio: 2 / 1;
  }
  .similar-code {
    margin-top: 4px;
    font-size: 10px;
  }
}

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 23, 32, 0.92);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.bad {
  background: rgba(224, 68, 91, 0.95);
}





.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef1f8 0%, #f7f8fc 100%);
  padding: 24px;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.auth-card .sub {
  color: var(--text-muted);
  margin-bottom: 22px;
  font-size: 13px;
}
.auth-card .foot {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-card .foot a {
  color: var(--primary);
  font-weight: 500;
}

.admin-shell {
  display: grid;
  grid-template-rows: var(--top-h) 1fr;
  



  height: 100vh;
  height: 100dvh;
}
.admin-shell > .topbar {
  border-bottom: 1px solid var(--line);
}
.admin-body {
  overflow: auto;
  


  overscroll-behavior-y: contain;
  




  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  padding: 0;
}




.admin-side {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - var(--top-h));
  height: calc(100dvh - var(--top-h));
  overflow-y: auto;
  padding: 18px 12px 22px;
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
}
.admin-main {
  min-width: 0;
  padding: 22px 28px 60px;
}
















.tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.tabs button {
  


  order: 99;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}



.tabs button::before {
  content: '';
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--tab-ico) center / contain no-repeat;
  mask: var(--tab-ico) center / contain no-repeat;
}

.tabs button[data-tab='cards'] {
  order: 1;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7.5' height='7.5' rx='1.6'/%3E%3Crect x='13.5' y='3' width='7.5' height='7.5' rx='1.6'/%3E%3Crect x='13.5' y='13.5' width='7.5' height='7.5' rx='1.6'/%3E%3Crect x='3' y='13.5' width='7.5' height='7.5' rx='1.6'/%3E%3C/svg%3E");
}
.tabs button[data-tab='categories'] {
  order: 2;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.2'/%3E%3C/svg%3E");
}
.tabs button[data-tab='ai'] {
  order: 3;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.4 3.6 12.1 8.3 16.8 10 12.1 11.7 10.4 16.4 8.7 11.7 4 10 8.7 8.3Z'/%3E%3Cpath d='M17.6 13.9 18.4 16.1 20.6 16.9 18.4 17.7 17.6 19.9 16.8 17.7 14.6 16.9 16.8 16.1Z'/%3E%3C/svg%3E");
}






.tabs button[data-tab='recolor'] {
  order: 4;
  margin-top: 18px;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.7l5.7 5.7a8 8 0 1 1-11.4 0z'/%3E%3C/svg%3E");
}
.tabs button[data-tab='site'] {
  order: 5;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M4.6 4.6l2.1 2.1M17.3 17.3l2.1 2.1M2.5 12h3M18.5 12h3M4.6 19.4l2.1-2.1M17.3 6.7l2.1-2.1'/%3E%3C/svg%3E");
}
.tabs button[data-tab='cache'] {
  order: 6;
  margin-top: 18px;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5.5' rx='8.5' ry='3.2'/%3E%3Cpath d='M3.5 5.5v13c0 1.8 3.8 3.2 8.5 3.2s8.5-1.4 8.5-3.2v-13'/%3E%3Cpath d='M3.5 12c0 1.8 3.8 3.2 8.5 3.2s8.5-1.4 8.5-3.2'/%3E%3C/svg%3E");
}
.tabs button[data-tab='update'] {
  order: 7;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2M3 12a9 9 0 0 1 15.5-6.2'/%3E%3Cpath d='M21 3v6h-6M3 21v-6h6'/%3E%3C/svg%3E");
}

.tabs button[data-tab='mail'] {
  order: 8;
  margin-top: 18px;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4.5' width='19' height='15' rx='2.4'/%3E%3Cpath d='M3.2 6.2 12 12.6l8.8-6.4'/%3E%3C/svg%3E");
}


.tabs button[data-tab='users'] {
  order: 9;
  --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.4'/%3E%3Cpath d='M2.8 19.4a6.2 6.2 0 0 1 12.4 0'/%3E%3Cpath d='M16 5.4a3.4 3.4 0 0 1 0 5.2M17.8 13.6a6.2 6.2 0 0 1 3.4 5.8'/%3E%3C/svg%3E");
}
.tabs button:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.tabs button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.tabs button.active:hover {
  background: var(--primary-hover);
  color: #fff;
}


.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.panel-head h3 {
  margin: 0;
}



@media (max-width: 900px) {
  .admin-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-side {
    position: static;
    height: auto;
    overflow-y: visible;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tabs button {
    

    height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }
  .tabs button[data-tab='recolor'],
  .tabs button[data-tab='cache'],
  .tabs button[data-tab='mail'],
  .tabs button[data-tab='users'] {
    margin-top: 0;
  }
  .admin-main {
    padding: 16px 14px 48px;
  }
}

.section {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.section h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--bg-soft);
}
.table tr:last-child td {
  border-bottom: none;
}
.table .row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}


.drag-cell {
  width: 52px;
  padding-right: 0 !important;
}
.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--text-faint);
  cursor: grab;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.drag-handle:hover {
  background: var(--bg-soft);
  color: var(--text-muted);
}
.drag-handle:active {
  cursor: grabbing;
}
.drag-handle svg {
  width: 15px;
  height: 15px;
}
.table tr.dragging {
  opacity: 0.45;
}
.table tr.drag-over > td {
  box-shadow: inset 0 2px 0 0 var(--primary);
}
.color-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-right: 8px;
}
.image-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}

.lab-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-preview {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: lab(50 0 0);
}
.lab-in {
  width: 88px;
}

.preview-card {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}


































.picker-mask {
  z-index: 95;
}



.picker {
  max-width: 620px;
  position: relative;
}







@media (min-width: 1600px) {
  .picker {
    max-width: 880px;
  }
}
@media (min-width: 2100px) {
  .picker {
    max-width: 1000px;
  }
}









.picker-drop {
  flex: 1 1 auto;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 20px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--line);
  background: var(--bg-soft);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.picker-drop.over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.picker-drop-ic {
  line-height: 0;
  color: var(--primary);
}
.picker-drop-ic svg {
  width: 42px;
  height: 42px;
}
.picker-drop-title {
  font-size: 16px;
  font-weight: 600;
}
.picker-drop-or {
  font-size: 12px;
  color: var(--text-faint);
}
.picker-pick {
  margin-top: 2px;
}
.picker-drop-note {
  font-size: 12px;
  color: var(--text-muted);
}

.picker-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 210px;
  border-radius: 12px;
  overflow: hidden; 
  touch-action: none; 
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  
  background-color: #f0f2f7;
  background-image: linear-gradient(45deg, #e4e8ef 25%, transparent 25%),
    linear-gradient(-45deg, #e4e8ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e8ef 75%),
    linear-gradient(-45deg, transparent 75%, #e4e8ef 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.picker-img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.picker-sel {
  position: absolute;
  z-index: 2;
  border: 1.5px solid var(--primary);
  border-radius: 4px;
  

  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95),
    0 0 0 9999px rgba(20, 23, 32, 0.38);
  pointer-events: none; 
}
.picker-sel[hidden] {
  display: none;
}
.picker-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(20, 23, 32, 0.3);
  pointer-events: auto; 
  touch-action: none;
}
.picker-handle[data-h="nw"] {
  left: -9px;
  top: -9px;
  cursor: nwse-resize;
}
.picker-handle[data-h="ne"] {
  right: -9px;
  top: -9px;
  cursor: nesw-resize;
}
.picker-handle[data-h="sw"] {
  left: -9px;
  bottom: -9px;
  cursor: nesw-resize;
}
.picker-handle[data-h="se"] {
  right: -9px;
  bottom: -9px;
  cursor: nwse-resize;
}

@media (pointer: coarse) {
  .picker-handle {
    width: 24px;
    height: 24px;
  }
  .picker-handle[data-h="nw"],
  .picker-handle[data-h="ne"] {
    top: -12px;
  }
  .picker-handle[data-h="sw"],
  .picker-handle[data-h="se"] {
    bottom: -12px;
  }
  .picker-handle[data-h="nw"],
  .picker-handle[data-h="sw"] {
    left: -12px;
  }
  .picker-handle[data-h="ne"],
  .picker-handle[data-h="se"] {
    right: -12px;
  }
}


.picker-sel-size {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(20, 23, 32, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.picker-mag {
  position: absolute;
  z-index: 3;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 2px solid #fff;
  box-shadow: 0 6px 20px rgba(20, 23, 32, 0.28);
  image-rendering: pixelated;
  pointer-events: none;
}
.picker-mag[hidden] {
  display: none;
}
.picker-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 23, 32, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.picker-stage.has-sel .picker-hint {
  opacity: 0;
}





.picker-sw {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-sm);
  background-color: #f0f2f7;
  background-image: linear-gradient(45deg, #e4e8ef 25%, transparent 25%),
    linear-gradient(-45deg, #e4e8ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e8ef 75%),
    linear-gradient(-45deg, transparent 75%, #e4e8ef 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}

.picker-sw.on {
  background-image: none;
}


.picker-acts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.picker-acts-gap {
  flex: 1 1 auto;
}








.picker-panel {
  min-height: 132px;
}






.picker-edit.at-left {
  right: auto;
  left: 12px;
}







.picker-tc-slot {
  display: flex;
  align-items: center;
}










.picker-similar {
  flex: 0 0 auto;
}


.picker-code {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.picker-code:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15);
}



.picker-status {
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.picker-status:empty {
  display: none;
}
.picker-status.good {
  color: var(--success);
}

.picker-status.warn {
  color: #b8791d;
}
.picker-status.bad {
  color: var(--danger);
}




.picker-name {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 23, 32, 0.38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 0.12s ease;
}
.picker-name-card {
  width: 100%;
  max-width: 340px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s ease;
}
.picker-name-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}




@media (max-width: 640px) {
  .picker {
    max-width: 100%;
  }
  .picker-name {
    padding: 12px;
  }
}
















html[data-i18n-pending] [data-i18n],
html[data-i18n-pending] [data-i18n-html] {
  visibility: hidden;
}












.welcome-mask {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 23, 32, 0.4);
  opacity: 1;
  transition: opacity 0.22s ease;
}

.welcome-mask.is-out {
  opacity: 0;
}


.welcome-card {
  box-sizing: border-box;
  



  width: 368px;
  max-width: 100%;
  padding: 28px;
  

  border-radius: 20px;
  background: var(--bg-elev);
  border: 0.5px solid rgba(20, 23, 32, 0.08);
  

  outline: none;
}





.welcome-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 500;
  
  letter-spacing: -0.3px;
  color: var(--text);
}
html[lang='en'] .welcome-title {
  font-size: 25px;
}
.welcome-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.welcome-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.welcome-ic {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}
.welcome-ic svg {
  display: block;
  width: 21px;
  height: 21px;
}


.welcome-ic .ic-front {
  fill: var(--primary-soft);
}
.welcome-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.welcome-item-title {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
}
.welcome-item-sub {
  

  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.welcome-start {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 28px;
  border: 0;
  border-radius: 15px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.welcome-start:hover {
  background: var(--primary-hover);
}

@media (max-width: 640px) {
  
  .welcome-mask {
    align-items: flex-end;
    padding: 0;
  }
  .welcome-card {
    width: 100%;
    max-width: none;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 0.5px solid rgba(20, 23, 32, 0.08);
    border-radius: 22px 22px 0 0;
  }
  .welcome-title {
    font-size: var(--m-welcome-title);
    line-height: 1.25;
  }
  

  html[lang='en'] .welcome-title {
    font-size: var(--m-welcome-title-en);
  }
  .welcome-list {
    gap: var(--m-welcome-gap);
    margin-top: 20px;
  }
  .welcome-item {
    gap: 12px;
  }
  .welcome-ic {
    width: var(--m-welcome-icon);
    height: var(--m-welcome-icon);
    border-radius: 10px;
  }
  .welcome-ic svg {
    width: var(--m-welcome-glyph);
    height: var(--m-welcome-glyph);
  }
  .welcome-start {
    height: var(--m-welcome-btn);
    font-size: 15px;
  }
}














.coach-mask {
  position: fixed;
  inset: 0;
  z-index: 97;
  overflow: hidden;          
}



.coach-dim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.coach-dim path {
  fill: rgba(20, 23, 32, 0.55);
}



.coach-hole {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}
.coach-tip {
  position: absolute;
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
  


  padding: 18px 20px 16px;
  border-radius: 18px;
  background: var(--bg-elev);
  border: 0.5px solid rgba(20, 23, 32, 0.08);
}



.coach-tip-title {
  margin: 0;
  

  font-size: 20px;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.coach-tip-sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}
.coach-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
}




.coach-next {
  height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background-color 0.18s ease;
}
.coach-next:hover {
  background: var(--primary-hover);
}




@media (max-width: 640px) {
  .coach-tip {
    padding: 16px 18px 14px;
    border-radius: 18px;
  }
  .coach-next {
    height: 38px;
  }
}













.upd-grid { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.upd-stat { flex:1 1 190px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.upd-stat .k { font-size:12px; color:var(--text-muted); margin-bottom:4px; }
.upd-stat .v { font-size:15px; font-weight:600; }
.upd-drop { border:1.5px dashed var(--line); border-radius:12px; padding:22px 18px; text-align:center; background:#fafbfc; }
.upd-drop.on { border-color:var(--primary); background:var(--primary-soft,#eef5ff); }
.upd-drop p { margin:8px 0 0; color:var(--text-muted); font-size:13px; }
.upd-bar { height:6px; border-radius:99px; background:#eceef2; overflow:hidden; margin-top:14px; display:none; }
.upd-bar.on { display:block; }
.upd-bar > i { display:block; height:100%; width:0; background:var(--primary); transition:width .18s ease; }
.upd-preview { margin-top:16px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; display:none; }
.upd-preview.on { display:block; }
.upd-preview .row { display:flex; justify-content:space-between; gap:12px; padding:4px 0; font-size:14px; }
.upd-preview .row .k { color:var(--text-muted); }
.upd-ver { font-weight:700; }
.upd-log { margin-top:14px; border:1px solid var(--line); border-radius:12px; max-height:280px; overflow:auto; display:none; }
.upd-log.on { display:block; }
.upd-log .item { display:flex; gap:10px; padding:9px 14px; border-bottom:1px solid #f3f4f6; font-size:13.5px; }
.upd-log .item:last-child { border-bottom:none; }
.upd-log .ic { flex:0 0 16px; font-weight:700; }
.upd-log .ic.ok { color:#059669; }
.upd-log .ic.bad { color:#dc2626; }
.upd-log .nm { flex:0 0 100px; color:var(--text-muted); }
.upd-log .ms { flex:1; }











.upd-prog {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}
.upd-prog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13.5px;
}
.upd-prog-label { color: var(--text-muted); }
.upd-prog-pct {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.upd-prog-track {
  height: 8px;
  border-radius: 99px;
  background: #eceef2;
  overflow: hidden;
}
.upd-prog-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.25s ease;
}
.upd-prog-tip { margin: 9px 0 0; font-size: 12.5px; color: var(--text-faint); }
.upd-prog.is-bad { border-color: #f3c9d0; background: #fdf4f5; }
.upd-prog.is-bad .upd-prog-track > i { background: var(--danger); }
.upd-prog.is-bad .upd-prog-pct { color: var(--danger); }

.upd-done {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #bfe6cf;
  border-radius: 12px;
  background: #f2fbf6;
}
.upd-done-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
}
.upd-done-ic {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 12px;
}
.upd-done-msg {
  margin: 8px 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.upd-done.is-pending { border-color: #f0dcb4; background: #fdf9f0; }
.upd-done.is-pending .upd-done-ic { background: var(--warn); }


.upd-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.upd-page {
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.upd-page:hover:not(:disabled) { color: var(--text); border-color: #d3d8e2; }
.upd-page.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.upd-page:disabled { opacity: 0.42; cursor: default; }
.upd-page-info { margin-left: 4px; font-size: 12.5px; color: var(--text-faint); }
.upd-actions { margin-top:16px; display:flex; gap:10px; align-items:center; }
.upd-note { font-size:12.5px; color:var(--text-muted); margin-top:10px; line-height:1.7; }
.upd-badge { display:inline-block; padding:1px 8px; border-radius:99px; font-size:12px; font-weight:600; }
.upd-badge.ok { background:#ecfdf5; color:#065f46; }
.upd-badge.rb { background:#fff7ed; color:#9a3412; }
.upd-mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px; }

.site-grid { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.site-col { flex:1 1 320px; min-width:0; background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; }
.site-col h4 { margin:0 0 4px; font-size:14px; }
.site-sub { margin:0 0 14px; font-size:12.5px; color:var(--text-muted); line-height:1.6; }
.site-field { margin-bottom:12px; }
.site-label { display:block; font-size:12.5px; color:var(--text-muted); margin-bottom:6px; }
.site-input { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid var(--line); border-radius:10px; font-size:13.5px; background:#fff; color:var(--text); font-family:inherit; }
.site-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(84,84,84,.15); }
.site-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.site-range { flex:1 1 120px; min-width:100px; }
.site-num { width:72px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; font-size:13px; text-align:center; font-family:inherit; }
.site-preview { margin-top:10px; padding:10px 12px; border:1px dashed var(--line); border-radius:10px; background:#fafbfd; display:flex; align-items:center; justify-content:center; min-height:60px; }
.site-preview img { max-width:100%; }
.site-preview .empty { font-size:12.5px; color:var(--text-muted); }
.site-fav { width:40px; height:40px; object-fit:contain; }
.site-msg { margin-top:14px; padding:10px 12px; border-radius:10px; font-size:13.5px; background:#f8fafc; color:var(--text-muted); display:none; }
.site-msg.show { display:block; }
.site-msg.ok { background:#ecfdf5; color:#065f46; }
.site-msg.bad { background:#fef2f2; color:#991b1b; }
.site-hint { margin:8px 0 0; font-size:12px; color:var(--text-muted); line-height:1.65; }
.site-file { display:none; }
.site-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }

.rc-grid { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.rc-card { flex:1 1 340px; min-width:0; background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; }
.rc-card.wide { flex:1 1 100%; }
.rc-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.rc-head h4 { margin:0; font-size:14px; }
.rc-sub { margin:0 0 12px; font-size:12.5px; color:var(--text-muted); line-height:1.6; }
.rc-kv { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; font-size:12.5px; }
.rc-kv dt { color:var(--text-muted); white-space:nowrap; }
.rc-kv dd { margin:0; font-family:ui-monospace,Menlo,Consolas,monospace; word-break:break-all; }
.rc-field { margin-bottom:12px; }



.ai-model-row { margin-bottom:12px; }
.rc-label { display:block; font-size:12.5px; color:var(--text-muted); margin-bottom:6px; }
.rc-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rc-range { flex:1 1 120px; min-width:100px; }
.rc-num { width:76px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; font-size:13px; text-align:center; font-family:inherit; }
.rc-hint { margin:8px 0 0; font-size:12px; color:var(--text-muted); line-height:1.65; }
.rc-badge { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; background:#f1f5f9; color:var(--text-muted); }
.rc-badge.ok { background:#ecfdf5; color:#065f46; }
.rc-badge.bad { background:#fef2f2; color:#991b1b; }
.rc-badge.busy { background:#eff6ff; color:#1d4ed8; }
.rc-bar { height:8px; border-radius:999px; background:#eef2f7; overflow:hidden; margin-top:8px; }
.rc-bar > i { display:block; height:100%; width:0; background:var(--primary); transition:width .25s ease; }
.rc-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.rc-table th { text-align:left; font-weight:600; color:var(--text-muted); padding:8px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.rc-table td { padding:8px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.rc-table tr:last-child td { border-bottom:none; }
.rc-pick { width:104px; height:78px; object-fit:cover; border-radius:8px; border:1px solid var(--line); cursor:crosshair; display:block; }
.rc-swatch { display:inline-block; width:16px; height:16px; border-radius:4px; border:1px solid var(--line); vertical-align:-3px; margin-right:6px; }
.rc-mono { font-family:ui-monospace,Menlo,Consolas,monospace; }
.rc-seed { width:92px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-size:12.5px; font-family:ui-monospace,Menlo,Consolas,monospace; text-align:center; }
.rc-ops { display:flex; gap:6px; flex-wrap:wrap; }
.rc-msg { margin-top:14px; padding:10px 12px; border-radius:10px; font-size:13px; background:#f8fafc; color:var(--text-muted); display:none; }
.rc-msg.show { display:block; }
.rc-msg.ok { background:#ecfdf5; color:#065f46; }
.rc-msg.bad { background:#fef2f2; color:#991b1b; }
.rc-file { display:none; }


.rc-warm { margin-top:14px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fafbfd; }
.rc-warm[hidden] { display:none; }
.rc-warm-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.rc-warm-title { font-size:13px; font-weight:600; }
.rc-warm-stat { margin-top:8px; font-size:12.5px; color:var(--text-muted); line-height:1.7; }
.rc-warm-err { margin-top:4px; font-size:12px; color:#991b1b; line-height:1.7; word-break:break-all; }
.rc-table tr.rc-warming td { background:#eff6ff; }


.rc-table button[data-op]:disabled { opacity:.45; cursor:not-allowed; }

.ck-grid { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; }
.ck-card { flex:1 1 340px; min-width:0; background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; }
.ck-card.wide { flex:1 1 100%; }
.ck-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.ck-head h4 { margin:0; font-size:14px; }
.ck-kv { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; font-size:12.5px; }
.ck-kv dt { color:var(--text-muted); white-space:nowrap; }
.ck-kv dd { margin:0; font-family:ui-monospace,Menlo,Consolas,monospace; word-break:break-all; }
.ck-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.ck-table th { text-align:left; font-weight:600; color:var(--text-muted); padding:8px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.ck-table td { padding:8px 8px; border-bottom:1px solid var(--line); vertical-align:middle; }
.ck-table tr:last-child td { border-bottom:none; }
.ck-mono { font-family:ui-monospace,Menlo,Consolas,monospace; }
.ck-tag { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11.5px; }
.ck-tag.asset { background:#fef3c7; color:#92400e; }
.ck-tag.regen { background:#ecfdf5; color:#065f46; }
.ck-hint { margin:8px 0 0; font-size:12px; color:var(--text-muted); line-height:1.65; }



.ck-hint.ck-over { color:#991b1b; }
.ck-sub { margin:0 0 12px; font-size:12.5px; color:var(--text-muted); line-height:1.6; }
.ck-bar { height:8px; border-radius:999px; background:#eef2f7; overflow:hidden; margin-top:8px; }
.ck-bar > i { display:block; height:100%; width:0; background:var(--primary); transition:width .25s ease; }
.ck-msg { margin-top:14px; padding:10px 12px; border-radius:10px; font-size:13px; background:#f8fafc; color:var(--text-muted); display:none; }
.ck-msg.show { display:block; }
.ck-msg.ok { background:#ecfdf5; color:#065f46; }
.ck-msg.bad { background:#fef2f2; color:#991b1b; }














.ai-wrap { max-width: 660px; margin: 0 auto; }
.ai-title { margin: 8px 0 2px; font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.ai-sub { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }


.ai-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ai-card.dragover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(84, 84, 84, .14);
}


.ai-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-refs:not(:empty) { margin-bottom: 8px; }

.ai-ref-add {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--line);
  background: transparent;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ai-ref-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.ai-ref-add:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ai-ref {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
  background-size: cover;
  background-position: center;
}

.ai-ref-x {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(20, 23, 32, .74);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-ref-x:hover { background: rgba(20, 23, 32, .92); }


.ai-textarea {
  display: block;
  width: 100%;
  min-height: 44px;         
  max-height: 220px;
  padding: 6px 2px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  overflow-y: auto;
}
.ai-textarea::placeholder { color: var(--text-faint); }






.ai-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ai-model {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: default;
}

.ai-model-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.ai-model-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}

.ai-model.off { background: transparent; border-style: dashed; }
.ai-model.off .ai-model-dot { background: var(--text-faint); box-shadow: none; }
.ai-model.off .ai-model-name { color: var(--text-faint); font-weight: 400; }
.ai-send-wrap { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ai-count { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.ai-send {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.ai-send svg { width: 18px; height: 18px; }
.ai-send:hover:not(.off) { background: var(--primary-hover); }

.ai-send.off,
.ai-send:disabled { background: var(--primary-soft); color: var(--text-faint); cursor: not-allowed; }
.ai-send:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ai-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: ai-spin .7s linear infinite; }
.ai-send.busy svg { display: none; }
.ai-send.busy .ai-spin { display: block; }
@keyframes ai-spin { to { transform: rotate(360deg); } }






.ai-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.ai-progress[hidden] { display: none; }
.ai-meta { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.ai-stage { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-muted); }
.ai-stage[hidden] { display: none; }
.ai-stage.bad { color: var(--danger); }

@keyframes ai-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }


.ai-tip { margin-top: 18px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-soft); color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }


.ai-notice { padding: 22px 18px; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--bg-elev); color: var(--text-muted); font-size: 13.5px; line-height: 1.8; text-align: center; }
.ai-notice-btn { margin-top: 14px; margin-left: 8px; }





.ai-hist-wrap { margin-top: 26px; }
.ai-hist-wrap[hidden] { display: none; }
.ai-hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ai-hist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ai-hist {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  overflow: hidden;
  
  position: relative;
}
.ai-hist-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.ai-hist-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ai-hist-none { font-size: 12px; color: var(--text-faint); }

.ai-hist-text {
  margin: 8px 10px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-hist-meta { margin: 4px 10px 0; font-size: 11.5px; color: var(--text-faint); }

.ai-hist-ops { display: flex; gap: 6px; padding: 9px 10px 10px; margin-top: auto; }
.ai-hist-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ai-hist-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.ai-hist-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.ai-hist-btn.bad:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: #fef2f2; }

.ai-hist-btn:disabled { opacity: .45; cursor: not-allowed; }
.ai-hist-empty { grid-column: 1 / -1; margin: 0; padding: 20px 0; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.ai-hist-more { display: block; margin: 12px auto 0; }
.ai-hist-more[hidden] { display: none; }


@media (max-width: 640px) {
  
  .ai-hist-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-title { font-size: 20px; }
  
  .ai-hist-ops { flex-wrap: wrap; }
  .ai-hist-btn { flex: 1 1 auto; min-width: 56px; padding: 5px 10px; }
}














.ai-progress .ai-stage { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
.ai-progress .ai-stage::before {
  content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint); box-shadow: 0 0 0 0 rgba(84, 84, 84, .35);
}

.ai-stage[data-phase='submit']::before { background: #4a90d9; animation: ai-dot-breathe 1.6s ease-in-out infinite; }

.ai-stage[data-phase='waiting']::before { background: #7b5cd6; animation: ai-dot-pulse 1.8s ease-out infinite; }
.ai-stage.bad::before { background: var(--danger); animation: none; }

.ai-stage { display: flex; align-items: center; gap: 8px; }
@keyframes ai-dot-breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ai-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(123, 92, 214, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(123, 92, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 92, 214, 0); }
}

.ai-timer {
  flex: 0 0 auto; font-size: 12.5px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
  letter-spacing: .2px; white-space: nowrap;
}
.ai-timer[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .ai-stage[data-phase]::before { animation: none; box-shadow: none; }
}



.ai-hist-thumb.bad {
  flex-direction: column;   
  gap: 2px;
  font-size: 12px;
  color: var(--text-faint);
  padding: 8px;
}
.ai-hist-why { font-size: 11px; color: var(--text-faint); word-break: break-all; text-align: center; }







.ai-hist-thumb.skeleton {
  background: linear-gradient(100deg, #eef0f5 30%, #f7f8fb 50%, #eef0f5 70%);
  background-size: 200% 100%;
  animation: ai-shimmer 1.2s linear infinite;
}
.ai-hist.pending .ai-hist-meta { color: var(--text-faint); }




.ai-hist-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 23, 32, .82);
  color: #fff;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .2px;
  pointer-events: none;   
}

.ai-hist.is-new {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.ai-hist.fresh .ai-hist-meta { color: var(--primary); }


.ai-hist-thumb { cursor: zoom-in; }
.ai-ref { cursor: zoom-in; }














.ai-lightbox {
  height: auto;
  max-height: 88vh;
  max-width: min(920px, 94vw);
}

.ai-lightbox .lightbox-title {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-lightbox .lightbox-body { padding: 12px; }
.ai-lightbox-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: 12px;
}

.ai-lightbox-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(74vh, 760px);
  object-fit: contain;
}












[hidden] {
  display: none !important;
}













.topbar .topbar-user {
  display: flex;
  align-items: center;
}
.topbar .user-btn.is-out {
  height: 38px;
}
.topbar .icon-btn.user-btn {
  padding: 0;
}
.topbar .user-icon {
  display: flex;
}
.topbar .user-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}




.topbar .topbar-user.is-pending {
  visibility: hidden;
}


.auth-mask {
  z-index: 95;
}
.auth-mask[hidden] {
  display: none !important;
}
.auth-modal .auth-seg {
  margin-bottom: 16px;
}








.seg {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 4px;
  width: 100%;
  font-size: 13.5px;
}
.seg button {
  flex: 1;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.seg button.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}


.btn.block {
  width: 100%;
}


.hint {
  font-size: 11.5px;
  color: var(--text-faint);
}






.btn[hidden] {
  display: none !important;
}


.auth-modal .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}





.auth-modal .modal-foot {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 22px 18px;
}

.auth-modal .modal-foot .btn {
  flex: 0 0 auto;
  width: auto;
}

.auth-modal .modal-foot .btn.primary {
  flex: 1 1 0;
  min-width: 0;
  padding: 11px;
}

.auth-modal .modal-foot .btn.ghost {
  flex: 1 1 100%;
}


.auth-modal .modal-foot .btn.ghost.auth-back {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.auth-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-head-right .lang-switch {
  font-size: 12px;
}
.auth-head-right .lang-switch button {
  padding: 4px 10px;
}
.auth-forgot-tip {
  margin: 2px 0 0;
  line-height: 1.6;
}
.auth-code-title {
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.auth-code-to {
  margin: 0;
  text-align: center;
}
.auth-code-row {
  justify-content: center;
  margin: 14px 0 0;
}
.auth-code-exp {
  margin: 6px 0 0;
  text-align: center;
}
.auth-err {
  margin: 10px 0 0;
}
.auth-err2 {
  margin: 8px 0 0;
  text-align: center;
}
.auth-lang {
  

  display: flex;
  align-items: center;
}


.code-row {
  display: flex;
  gap: 8px;
}
.code-cell {
  width: 48px;
  height: 56px;
  padding: 0;
  text-align: center;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.code-cell:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15);
}
.code-cell.is-filled {
  border-color: var(--primary);
}
.code-cell.is-bad {
  border-color: var(--danger);
  background: #fff5f6;
  color: var(--danger);
}


.account-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 0 40px;
}
.acct-loading {
  padding: 44px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.acct-row:last-child {
  border-bottom: 0;
}
.acct-k {
  font-size: 13px;
  color: var(--text-muted);
}
.acct-v {
  font-size: 13.5px;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}
.acct-codewrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.acct-code-row .code-cell {
  width: 44px;
  height: 52px;
}
.err.is-ok {
  color: var(--success);
}






.account-page .card:hover {
  transform: none;
}


@media (max-width: 640px) {
  .code-cell {
    width: 44px;
    height: 52px;
  }
}


.mail-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.mail-preview-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}
.mail-preview-subject {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--text-muted);
  word-break: break-all;
}
.mail-preview-frame {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
  background: #fff;
}
.mail-log {
  font-size: 12.5px;
  color: var(--text-muted);
}
.mail-log-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.mail-log-row:last-child {
  border-bottom: 0;
}
.mail-log-ok {
  color: var(--success);
}
.mail-log-bad {
  color: var(--danger);
}
.mail-log-t {
  margin-left: auto;
  color: var(--text-faint);
  white-space: nowrap;
}












.adm-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.adm-pager[hidden] {
  display: none;
}
.adm-pager-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.adm-pager-btn:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: #d4d8e1;
}
.adm-pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.adm-pager-info {
  min-width: 74px;
  text-align: center;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.adm-pager-total {
  color: var(--text-faint);
  font-size: 12px;
}








.fav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  min-height: 32px;
}
.fav-bar[hidden] {
  display: none !important;
}
.fav-bar-info {
  margin-right: auto;
  font-size: 13px;
  color: var(--text-muted);
}









.fav-action {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--dock-gap) + var(--m-dock-btn) + 10px + 8px);
  z-index: 44;
  width: min(340px, calc(100vw - 40px));
  height: 52px;
  padding: 0 6px 0 16px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(20, 23, 32, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fav-action[hidden] {
  display: none !important;
}



.fav-action-all {
  margin-right: auto;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font: inherit;
  font-size: 12.5px;
  color: var(--primary);
  cursor: pointer;
}



.fav-select .card-grid {
  padding-bottom: 76px;
}




.card .pick-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}


.fav-select .card .pick-dot {
  display: flex;
}
.fav-select .card {
  cursor: pointer;
}

.card .pick-dot::after {
  content: none;
}

.card.is-picked .pick-dot::after {
  content: '';
  width: 10px;
  height: 5px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  border-radius: 0;
  background: none;
  transform: rotate(-45deg) translate(1px, -2px);
}
.card.is-picked .pick-dot {
  background: var(--primary);
  border-color: var(--primary);
  
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(20, 23, 32, 0.16);
}






.fav-select .card.is-picked .swatch {
  border-color: transparent;
  box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(20, 23, 32, 0.14);
}


.skel-card {
  display: flex;
  flex-direction: column;
}
.skel-card .swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--m-card-r);
  background: var(--bg-soft);
}
.skel-card .code {
  width: 46%;
  height: 10px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--bg-soft);
}


.fav-del-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
}


.users-table-wrap {
  margin-top: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.users-table th,
.users-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.users-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
}
.users-table tbody tr:last-child td {
  border-bottom: 0;
}
.users-th-ops {
  width: 150px;
}
.users-email {
  word-break: break-all;
}
.users-me {
  color: var(--text-faint);
  font-size: 12px;
}
.users-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
}

.users-badge.is-user {
  background: var(--bg-soft);
  color: var(--text-muted);
}
.users-ops {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.users-row-form .field {
  margin-bottom: 12px;
}

















.auth-body {
  min-width: 0;
}






.auth-fg-aux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 7px;
  min-height: 18px;
}
.auth-modal.is-forgot .auth-code-exp {
  margin: 0;
}

.auth-modal.is-forgot .auth-code-exp::after {
  content: '·';
  margin: 0 7px;
  color: #cfd4de;
}
.auth-modal.is-forgot .auth-fg-aux .btn {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
.auth-modal.is-forgot .auth-fg-aux .btn:disabled {
  color: var(--text-faint);
}








.code-cell {
  background: var(--bg-soft);
  border: 1px solid transparent;
}
.code-cell:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(84, 84, 84, 0.15);
}
.code-cell.is-filled {
  border-color: var(--primary);
}


.account-page {
  max-width: 640px;   
}
.acct-head {
  padding: 10px 2px 0;
}
.acct-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.acct-sub {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
}
.acct-gtitle {
  margin: 22px 4px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.acct-group {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 4px 18px;
}
.acct-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.acct-opt:last-child {
  border-bottom: 0;
}
.acct-opt.is-on {
  font-weight: 600;
}
.acct-opt-link {
  text-decoration: none;
}
.acct-chk {
  width: 15px;
  height: 15px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.acct-chv {
  width: 15px;
  height: 15px;
  stroke: #c4c8d2;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}
.acct-opt-acc.is-open .acct-chv {
  transform: rotate(90deg);
}
.acct-acc-body {
  padding: 2px 0 16px;
  border-top: 1px solid var(--line);
}
.acct-acc-body .field {
  margin-top: 14px;
}
.acct-acc-body .field:first-child {
  margin-top: 16px;
}
.acct-acc-body #acct-submit {
  margin-top: 16px;
}



.acct-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.acct-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 0;
  font-size: 13.5px;
}
.acct-backsite {
  color: var(--text-muted);
  text-decoration: none;
}
.acct-v.is-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
}
.acct-v.is-ok .acct-chk {
  stroke: var(--success);
  width: 13px;
  height: 13px;
}
.acct-guest {
  margin-top: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.acct-guest-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}














.cat-layout { display: block; }
.cat-side { display: none; }



.cat-all-btn { display: none; }

.cat-side-group + .cat-side-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}







.cat-side-cap {
  


  



  width: fit-content;
  margin-left: 10px;
  


  height: 30px;
  margin-bottom: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-faint);
}
.cat-side-cap.is-group-on {
  border-bottom-color: #1f3a5f;
  font-weight: 600;
  color: var(--text);
}
.cat-side-row {
  width: 100%;
  


  height: 30px;
  margin-bottom: 3px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  display: flex;
  align-items: center;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.cat-side-row:hover {
  background: #f4f5f8;
  color: var(--text);
}
.cat-side-row.is-on {
  background: #eef1f6;
  color: #1f3a5f;
  font-weight: 600;
}
.cat-side-row:last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  
  .cat-sticky { display: none; }

  .cat-layout {
    display: flex;
    align-items: stretch;
  }
  

  .content--pager > .cat-layout { flex: 1 0 auto; }

  .cat-side {
    display: block;
    align-self: flex-start;
    position: sticky;
    top: 0;
    flex: 0 0 clamp(208px, 17vw, 248px);
    width: clamp(208px, 17vw, 248px);
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg-elev);
    border-right: 1px solid var(--line);
    padding: 26px 16px 26px clamp(20px, 1.7vw, 28px);
    scrollbar-width: none;
  }
  .cat-side::-webkit-scrollbar { display: none; }

  






  html.has-cat-side .topbar-brand-logo {
    margin-left: calc(var(--brand-h, 32px) * -0.2857 + clamp(20px, 1.7vw, 28px) - 24px);
  }

  .cat-layout > .content-inner {
    flex: 1 1 auto;
    min-width: 0;
  }

  





  html.has-cat-side {
    --cat-side-cx: clamp(104px, 8.5vw, 124px);
  }

  
  html.has-cat-side .dock {
    left: calc(50% + var(--cat-side-cx));
  }
  




  html.has-cat-side .fav-action {
    left: calc(50% + var(--cat-side-cx));
  }
}


@media (min-width: 1281px) {
  html.has-cat-side .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 961px) and (max-width: 1280px) {
  html.has-cat-side .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 900px) and (max-width: 960px) {
  html.has-cat-side .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


@media (max-width: 899px) {
  .cat-sticky {
    


    padding: 4px var(--m-padx, 14px) 6px;
    

    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    








    pointer-events: auto;
  }
  .cat-sticky .pagehead-master {
    gap: 22px;
    align-items: stretch;
  }
  






  .cat-sticky .pagehead-master.is-tape {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 4px 0;
    margin: -4px 0;
  }
  .cat-sticky .pagehead-master.is-tape::-webkit-scrollbar { display: none; }
  


  .cat-sticky #cat-wrap-master {
    display: flex;
    align-items: stretch;
  }
  
  .cat-sticky .cat-select {
    

    height: 32px;
    padding: 0;
    gap: 0;
    border: 0;
    border-bottom: 2px solid #1f3a5f;
    border-radius: 0;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
  }
  .cat-sticky .cat-gbtn {
    height: 32px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--text-faint);
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
  }
  .cat-sticky .cat-gbtn:hover {
    color: var(--text);
    border-color: transparent;
  }
  .cat-sticky .cat-gbtn:active { background: none; }
  

  .cat-sticky .cat-gbtn.is-on {
    color: var(--text);
    font-weight: 600;
    border-bottom-color: #1f3a5f;
  }
  




  .cat-sticky .cat-gbtn.is-pin:not(.is-clone) {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-elev);
  }
  





  .cat-sticky .cat-rail .chip.is-pin:not(.is-clone):not(.active) {
    background: var(--bg-elev);
  }

  
  .cat-sticky #cat-wrap { padding-top: 8px; }
  
  .cat-sticky .cat-rail { gap: 3px; }
  .cat-sticky .cat-rail .chip {
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
  }
  .cat-sticky .cat-rail .chip:hover {
    background: #f4f5f8;
    color: var(--text);
  }
  .cat-sticky .cat-rail .chip.active {
    background: #eef1f6;
    border: 0;
    color: #1f3a5f;
    font-weight: 600;
  }
  .cat-sticky .cat-rail .chip.chip-empty { color: var(--text-faint); }
  
  .cat-sticky .cat-rail .chip .chip-count { display: none; }

  
  .cat-sticky .cat-rail.is-draggable { cursor: grab; }
  .cat-sticky .cat-rail.is-dragging { cursor: grabbing; }
  .cat-sticky .cat-rail.is-dragging .chip { pointer-events: none; }

  



  .cat-all-btn {
    order: 9999;
    margin-left: auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  }
  .cat-all-btn svg { width: 14px; height: 14px; flex: 0 0 auto; }
  .cat-all-btn:hover { color: var(--text); border-color: #d3d8e2; }
  .cat-all-btn:active { background: var(--bg-soft); }
}







@media (min-width: 641px) and (max-width: 899px) {
  .cat-sticky {
    padding-left: 28px;
    padding-right: 28px;
  }
}










.cat-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 23, 32, 0.34);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.cat-drawer-mask.is-open { opacity: 1; }
.cat-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(78vw, 300px);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(20, 23, 32, 0.16);
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cat-drawer-mask.is-open .cat-drawer { transform: none; }
.cat-drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 10px 18px;
}
.cat-drawer-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.cat-drawer-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.cat-drawer-close svg { width: 16px; height: 16px; }
.cat-drawer-close:hover { color: var(--text); }
.cat-drawer-close:active { background: var(--line); }
.cat-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 14px calc(20px + env(safe-area-inset-bottom));
}
.cat-drawer-body .cat-side-group + .cat-side-group { margin-top: 14px; }


html.cat-drawer-open #content { overflow: hidden; }


@media (min-width: 900px) {
  .cat-drawer-mask { display: none; }
}
