

:root {
  --win-bg: #f4f6ff;
  --win-bg2: #eaeefb;
  --panel: #ffffff;
  --panel-rgb: 255, 255, 255;
  --panel-solid: #ffffff;
  --panel2: #f8faff;
  --panel2-rgb: 248, 250, 255;
  --border: #e3e8f5;
  --border-strong: #c9d4ec;
  --text: #1b2333;
  --text-strong: #0f1524;
  --sub: #5f6d8c;
  --support-txt: #5a6a96; 
  --faint: #96a2ba;
  --tab-bg: rgba(40, 70, 160, 0.055);
  --btn-hover: rgba(40, 70, 160, 0.085);
  --input-bg: #f1f4fa;
  --accent: #4f8cff;
  --accent-2: #ff8a3d;
  --accent-grad: linear-gradient(135deg, #4f8cff, #ff8a3d);
  --item-sel: rgba(79, 140, 255, 0.18);
  --radius: 18px;
  --radius-sm: 13px;
  --shadow-sm: 0 3px 14px rgba(50, 80, 170, 0.09);
  --shadow-md: 0 20px 50px rgba(50, 80, 170, 0.16);
  --shadow-glow: 0 8px 26px rgba(79, 140, 255, 0.26);
  --mono: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --font-stack: "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

body[data-theme="dark"] {
  --win-bg: #0b1020;
  --win-bg2: #111834;
  --panel: #141b30;
  --panel-rgb: 20, 27, 48;
  --panel-solid: #141b30;
  --panel2: #0f1528;
  --panel2-rgb: 15, 21, 40;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #e7ecf9;
  --text-strong: #ffffff;
  --sub: #97a3c0;
  --support-txt: #b4c2e6; 
  --faint: #5e6c90;
  --tab-bg: rgba(255, 255, 255, 0.06);
  --btn-hover: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(8, 12, 24, 0.6);
  --accent: #6ea0ff;
  --accent-2: #ffa05e;
  --item-sel: rgba(110, 160, 255, 0.3);
  --shadow-sm: 0 3px 14px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-stack);
  font-size: var(--base-font, 13px);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(79, 140, 255, 0.16), transparent 62%),
    radial-gradient(820px 440px at -8% 104%, rgba(255, 110, 199, 0.11), transparent 62%),
    radial-gradient(720px 400px at 52% 116%, rgba(255, 138, 61, 0.1), transparent 62%),
    linear-gradient(165deg, var(--win-bg), var(--win-bg2));
}

#app { height: 100vh; display: flex; flex-direction: column; }


#topbar {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 22px;
  gap: 14px;
  flex: none;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) calc(var(--panel-opacity, 0.95) * 100%), transparent);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 19px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(79, 140, 255, 0.38);
  flex: none;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-size: 15px; font-weight: 800; letter-spacing: 0.3px;
  color: var(--text-strong);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 9px; color: var(--faint);
  letter-spacing: 2px;
}


.gs-wrap { position: relative; width: min(440px, 38vw); margin-left: 8px; }

.gs-item-icon {
  width: 16px; height: 16px;
  object-fit: contain;
  flex: none;
  vertical-align: middle; 
}
.gs-icon {
  
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
  z-index: 1;
}
#global-search {
  width: 100%;
  padding: 8px 14px 8px 35px;
  border-radius: 13px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.16s;
}
#global-search::placeholder { color: var(--faint); }
#global-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.16);
}
.gs-dropdown {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  max-height: 400px;
  overflow-y: auto;
  
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 80;
}
.gs-group {
  padding: 8px 13px 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-2);
}
.gs-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 13px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}
.gs-item:hover { background: rgba(79, 140, 255, 0.12); }
.gs-item .gs-type {
  
  color: var(--qc, var(--faint));
  background: color-mix(in srgb, var(--qc, #4f8cff) 14%, transparent);
  font-family: var(--mono);
  font-size: 10px;
  flex: none;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.gs-item .gs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-empty { padding: 15px 13px; color: var(--faint); font-size: 12px; text-align: center; }

.tb-spacer { flex: 1; }

.src-ind {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--faint);
  transition: all 0.2s;
  flex: none;
}
.src-ind.r2 {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16), 0 0 12px rgba(34, 197, 94, 0.5);
  animation: blink 2.4s ease-in-out infinite;
}
.src-ind.local {
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16), 0 0 12px rgba(251, 191, 36, 0.48);
}
.src-ind.err {
  background: #ff5d73;
  box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.16), 0 0 12px rgba(255, 93, 115, 0.52);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.tb-status {
  color: var(--sub);
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 13px;
  border-radius: 20px;
  background: var(--tab-bg);
  border: 1px solid var(--border);
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gear {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tab-bg);
  color: var(--sub);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.16s;
  flex: none;
}

@keyframes gear-spin-360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gear.spin { animation: gear-spin-360 0.5s ease; }
@media (hover: hover) {
  .gear:hover { color: var(--accent); border-color: var(--accent); transform: rotate(18deg); }
}


.channel-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  flex: none;
  padding: 12px 0 4px;
}
.channel-tabs {
  display: flex; gap: 5px;
  padding: 5px;
  border-radius: 26px;
  
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.channel-tab {
  --sc: #4f8cff;
  display: flex; align-items: center; gap: 7px;
  padding: 8px 24px;
  border: none;
  border-radius: 21px;
  background: transparent;
  color: var(--sub);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.channel-tab:hover { color: var(--text); background: var(--tab-bg); }
.channel-tab.active {
  color: #fff;
  background: linear-gradient(120deg, var(--sc), color-mix(in srgb, var(--sc) 60%, #7c5cff));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--sc) 36%, transparent);
}
.channel-tab svg { flex: none; }
body[data-theme="dark"] .channel-tab.active { color: #fff; }
.ch-arrow {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--sub);
  cursor: pointer;
  transition: all 0.16s;
  box-shadow: var(--shadow-sm);
}
.ch-arrow:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.ch-arrow:disabled { opacity: 0.35; cursor: default; }


#content {
  flex: 1; min-height: 0;
  overflow: hidden;
  padding: 8px 22px 14px;
  display: flex; flex-direction: column;
}
.track-wrap { flex: 1; min-height: 0; overflow: hidden; }
.track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.3, 0.9, 0.3, 1);
  
}
.channel {
  width: calc(100% / 3);
  height: 100%;
  flex: none;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 0 4px;
}
.ch-head { flex: none; padding: 6px 6px 12px; }
.ch-code {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-2);
}
.ch-title {
  font-size: 24px; font-weight: 800;
  margin-top: 2px;
  letter-spacing: 0.4px;
  background: linear-gradient(120deg, #2f3d5c, #4f8cff 60%, #ff8a3d);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body[data-theme="dark"] .ch-title {
  background: linear-gradient(120deg, #e2e9f8, #8fb0ff 60%, #ffb078);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ch-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.db-body-holder { }

.sub-tabs { display: flex; gap: 6px; margin-top: 10px; }
.sub-tab {
  background: var(--tab-bg);
  color: var(--sub);
  border: 1px solid var(--border);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: all 0.16s;
}
.sub-tab:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.sub-tab.active {
  color: #fff;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 140, 255, 0.3);
}

.sub-page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }


#statusbar {
  display: flex; align-items: center;
  height: 30px;
  padding: 0 22px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: var(--faint);
  font-size: 11px;
  flex: none;
  gap: 8px;
}
#statusbar .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}
.status-spacer { flex: 1; }


.loading-panel {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  color: var(--sub);
  background: var(--win-bg);
}
.spinner {
  width: 46px; height: 46px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-right-color: #ff8a3d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 24px rgba(79, 140, 255, 0.16);
}
@keyframes spin { to { transform: rotate(360deg); } }


.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.card:hover { border-color: var(--border-strong); }


button { font-family: inherit; }
.btn {
  position: relative;
  overflow: hidden;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: filter 0.14s, transform 0.14s, box-shadow 0.14s;
  box-shadow: 0 6px 18px rgba(79, 140, 255, 0.32);
  letter-spacing: 0.2px;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.5s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:hover::after { transform: translateX(120%); }
.btn:disabled { background: rgba(130, 145, 175, 0.35); color: rgba(255, 255, 255, 0.6); box-shadow: none; cursor: default; }
.btn.secondary { background: var(--tab-bg); color: var(--text); box-shadow: none; border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--btn-hover); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn.small { padding: 4px 12px; font-size: 11px; border-radius: 9px; }


input[type="text"], input[type="number"], input[type="search"], select, textarea {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 7px 11px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.14);
}
select option { background: var(--panel); color: var(--text); }
textarea { resize: vertical; }

.form-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.form-row label { width: 86px; color: var(--sub); font-size: 12px; flex: none; }
.form-row input[type="text"], .form-row select { flex: 1; min-width: 0; }

.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; color: var(--text); }
.checkbox input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }


.db-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.db-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px 12px; flex: none; }

.db-header select { max-width: 150px; }
.db-header input[type="search"] { width: 230px; }
.db-header .filters { display: flex; align-items: center; gap: 6px; }
.db-header .filters label { color: var(--sub); font-size: 11px; white-space: nowrap; }
.db-body { flex: 1; min-height: 0; display: flex; gap: 14px; }


.cat-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.cat-chip {
  --cc: #8a93a6;
  
  background-color: rgba(var(--panel-rgb), var(--chip-op, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  color: var(--sub);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s;
  box-shadow: var(--shadow-sm);
}
.cat-chip:hover { color: var(--text); background: var(--btn-hover); transform: translateY(-1px); }
.cat-chip.active {
  color: #fff;
  background: var(--cc);
  border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--cc) 36%, transparent);
}
body[data-theme="dark"] .cat-chip.active { color: #fff; }

.db-list-panel {
  width: 320px; flex: none;
  display: flex; flex-direction: column;
  padding: 10px;
  overflow: hidden;
}
.db-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  list-style: none;
  display: flex; flex-direction: column; gap: 5px;
  padding: 2px;
}
.db-list li {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px 8px 14px;
  min-height: 48px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  position: relative;
  
  background: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  box-shadow: 0 1px 5px rgba(50, 80, 170, 0.06);
  transition: all 0.15s;
}
.db-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 18%;
  height: 64%; width: 4px;
  border-radius: 4px;
  background: var(--cc, var(--accent));
  opacity: 0.5;
}
.db-list li[data-type="character"] { --cc: #4f8cff; }
.db-list li[data-type="enemy"] { --cc: #ff5d73; }
.db-list li[data-type="environment"] { --cc: #17c98b; }
.db-list li[data-type="job"] { --cc: #38bdf8; }
.db-list li[data-type="framework"] { --cc: #ff9f5e; }
.db-list li[data-type="plugin"] { --cc: #ff6ec7; }
.db-list li[data-type="azban"] { --cc: #9d5cff; }

.db-list li:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--cc, var(--accent)) 45%, var(--border));
  box-shadow: 0 6px 18px rgba(50, 80, 170, 0.1);
}
.db-list li.active {
  border-color: color-mix(in srgb, var(--cc, var(--accent)) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc, var(--accent)) 28%, transparent), 0 6px 18px rgba(50, 80, 170, 0.1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc, var(--accent)) 12%, var(--panel)), var(--panel));
}
.db-list li::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--cc, var(--accent));
  opacity: 0;
}
.db-list li.active::after { opacity: 1; }
.db-list li .li-thumb {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.14), rgba(255, 138, 61, 0.1));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 0.16s;
}
.db-list li:hover .li-thumb { transform: scale(1.07); }
.db-list li .li-thumb img { width: 32px; height: 32px; object-fit: contain; }

.db-detail {
  flex: 1; min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 16px 20px;
  
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  
}

.db-back { display: none !important; }
.db-detail-scroll { height: 100%; overflow-y: auto; padding-right: 6px; }


.doll-stage {
  position: absolute; inset: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
  display: none;
}
.doll-stage img.doll-bg {
  position: absolute; inset: -8%;
  width: 116%; height: 116%;
  object-fit: cover;
  opacity: 0.5;
  pointer-events: none;
}
.doll-stage img.doll-faction {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.28;
  pointer-events: none;
}
.doll-stage img.doll-char {
  position: absolute;
  transform-origin: center;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
  filter: drop-shadow(0 18px 40px rgba(30, 50, 100, 0.35));
}
.doll-stage img.doll-char.dragging { cursor: grabbing; }
.doll-stage::after {
  
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(240, 244, 252, 0.30) 0%, rgba(240, 244, 252, 0) 15%, rgba(240, 244, 252, 0) 85%, rgba(240, 244, 252, 0.30) 100%),
    linear-gradient(180deg, rgba(248, 250, 255, 0.04) 0%, transparent 30%, rgba(240, 244, 252, 0.38) 76%, rgba(235, 240, 250, 0.7) 100%);
  pointer-events: none;
  z-index: 1;
}
body[data-theme="dark"] .doll-stage::after {
  background:
    linear-gradient(90deg, rgba(8, 10, 16, 0.34) 0%, rgba(8, 10, 16, 0) 15%, rgba(8, 10, 16, 0) 85%, rgba(8, 10, 16, 0.34) 100%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.05) 0%, transparent 32%, rgba(8, 10, 16, 0.4) 76%, rgba(8, 10, 16, 0.66) 100%);
}

.db-detail.no-overlay .doll-stage::after { display: none; }


.doll-l2d {
  position: absolute; inset: 0;
  z-index: 0;
  touch-action: none;
}
.doll-l2d canvas { display: block; width: 100%; height: 100%; }

.doll-stage.l2d-on img.doll-char { display: none !important; }

.btn.ghost.doll-l2d-btn {
  position: relative;
  
  width: 52px; height: 24px; padding: 0 9px 0 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: flex-end; flex: none;
  font-size: 9px; font-weight: 900; letter-spacing: .2px; line-height: 1;
  color: #bcd9ff;
  
  -webkit-text-fill-color: currentColor;
  
  background: rgba(12, 20, 36, .38);
  border: 1px solid rgba(120, 165, 240, .45);
  text-shadow: 0 1px 2px rgba(0, 12, 40, .55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18), inset 0 -1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  backdrop-filter: blur(6px) saturate(130%);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease, padding .2s ease, filter .2s ease;
}

.btn.ghost.doll-l2d-btn .l2d-knob {
  
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #a9b9d0, #6b7c96 68%, #46536a);
  
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: left .22s cubic-bezier(.5, 1.5, .5, 1), background .2s ease, box-shadow .2s ease;
}
.btn.ghost.doll-l2d-btn .l2d-txt { pointer-events: none; }


.btn.ghost.doll-l2d-btn:hover,
.btn.ghost.doll-l2d-btn:focus-visible {
  color: #eaf3ff;
  background: rgba(28, 46, 78, .52);
  border-color: rgba(150, 190, 255, .72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25), 0 0 10px rgba(79, 140, 255, .35);
}
.btn.ghost.doll-l2d-btn:hover .l2d-knob {
  background: radial-gradient(circle at 35% 28%, #c3d2e6, #8296b3 68%, #56657d);
}
.btn.ghost.doll-l2d-btn:active { transform: scale(.96); }


.btn.ghost.doll-l2d-btn.on {
  color: #fff;
  justify-content: flex-start; padding: 0 0 0 9px;
  background: linear-gradient(135deg, rgba(30, 78, 180, .72) 0%, rgba(58, 118, 232, .62) 100%);
  border-color: rgba(200, 225, 255, .78);
  
  text-shadow: 0 1px 2px rgba(0, 15, 50, .75), 0 0 1px rgba(0, 15, 50, .80);
  box-shadow: 0 0 8px rgba(79, 140, 255, .46), inset 0 0 14px rgba(0, 20, 70, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: dollL2dPulse 2.6s ease-in-out infinite;
}
.btn.ghost.doll-l2d-btn.on .l2d-knob {
  left: calc(100% - 20px);
  background: radial-gradient(circle at 35% 28%, #fff, #e2ecff 70%, #c3d6f5);
  box-shadow: 0 1px 1.5px rgba(0, 20, 60, .40), inset 0 1px 0 #fff, 0 0 8px rgba(255, 255, 255, .75);
}

.btn.ghost.doll-l2d-btn.on:hover {
  color: #fff; border-color: #fff; filter: brightness(1.05);
  background: linear-gradient(135deg, rgba(44, 96, 206, .78) 0%, rgba(74, 136, 248, .68) 100%);
}


.btn.ghost.doll-l2d-btn:hover,
.btn.ghost.doll-l2d-btn:focus-visible,
.btn.ghost.doll-l2d-btn.on:hover,
.btn.ghost.doll-l2d-btn:active { transform: none; }

@keyframes dollL2dPulse {
  0%, 100% { box-shadow: 0 0 7px rgba(79, 140, 255, .40), inset 0 1px 0 rgba(255, 255, 255, .30); }
  50%      { box-shadow: 0 0 11px rgba(79, 140, 255, .60), inset 0 1px 0 rgba(255, 255, 255, .42); }
}


.detail-html {
  position: relative;
  z-index: 2;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text);
}
.detail-html .dl-name {
  
  font-size: max(22px, calc(var(--dl-fs, 13px) * 1.6)) !important;
  font-weight: 800;
  margin-bottom: 3px;
  letter-spacing: 0.4px;
  background: linear-gradient(120deg, #2f3b57, #4f7df2 60%, #ff8a3d);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-theme="dark"] .detail-html .dl-name {
  background: linear-gradient(120deg, #eef1f8, #9db8ff 60%, #ffb078);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-html .dl-sub { color: var(--sub); font-size: 11px; }
.detail-html a { color: var(--text); text-decoration: none; }
.detail-html a:hover { text-decoration: underline; }
.detail-html img.ic { vertical-align: -4px; margin-right: 1px; }

.voice-row { transition: background 0.12s; border-radius: 8px; padding: 5px 8px !important; }
.voice-row:hover { background: var(--btn-hover); }
.voice-play { font-size: 11.5px !important; padding: 3px 8px !important; }
.voice-list { max-height: calc(100% - 30px); overflow-y: auto; }
.detail-html .sec {
  font-weight: 700;
  margin-top: 11px;
  margin-bottom: 3px;
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: 1.5px;
  position: relative;
  padding-bottom: 3px;
}
.detail-html .sec::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 34px; height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
  opacity: 0.7;
}
.right-col .sec::after { left: auto; right: 0; }

.detail-html .sec.sec-with-lvstage {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.detail-html .skill-row { margin: 3px 0; }
.detail-html .skill-desc {
  margin-left: 8px; 
  color: var(--text); 
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
  padding-left: 8px; 
}

.detail-html .env-note {
  margin: 8px 0 2px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.detail-html .env-ap {
  color: #FF9600;
  font-weight: 600;
}
.detail-html table.stats { margin-top: 5px; border-collapse: collapse; }
.detail-html table.stats td { padding: 2px 10px 2px 0; }
.detail-html table.stats b {
  font-weight: 700;
  background: linear-gradient(120deg, #2f3b57, #4f7df2 65%, #ff8a3d);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-theme="dark"] .detail-html table.stats b {
  background: linear-gradient(120deg, #eef1f8, #9db8ff 60%, #ffb078);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-html .pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: 18px; padding: 4px 11px; margin: 2px 5px 2px 0;
  cursor: pointer; font-size: 12px;
  transition: all 0.14s;
}
.detail-html .pill:hover { background: var(--btn-hover); border-color: var(--border-strong); }
.detail-html .pill.active { background: var(--item-sel); border-color: var(--accent); }
.detail-html .pill img { width: 24px; height: 24px; object-fit: contain; }


.skill-row {
  display: flex;
  align-items: center;
  min-height: 29px;
  padding: 2px 7px;
  border-radius: 9px;
  transition: background 0.12s;
  position: relative;
}
.skill-row::before {
  content: '';
  position: absolute;
  left: 0; top: 22%;
  height: 56%; width: 3px;
  border-radius: 3px;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity 0.14s;
}
.skill-row:hover { background: var(--btn-hover); }
.skill-row:hover::before { opacity: 0.8; }
.skill-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  line-height: 1;
  font-size: 12.5px;
}
.right-col .skill-row { justify-content: flex-end; }

.right-col .skill-desc {
  
  margin-left: auto !important;
  margin-right: 8px !important; 
  padding-left: 0;
  padding-right: 8px;
  text-align: right !important;
  width: fit-content;
  max-width: calc(100% - 50px);
}
.dl-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bar-track {
  display: inline-block;
  width: 190px; height: 12px;
  border-radius: 6px;
  background: var(--tab-bg);
  vertical-align: middle;
  overflow: hidden;
}
.bar-fill {
  
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--accent-grad);
}


.calc-page { flex: 1; min-height: 0; display: flex; gap: 14px; }

.calc-panels-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.calc-panels { display: flex; flex: 1; min-height: 0; gap: 14px; }
.calc-indicators { display: none; }

.calc-col { width: 330px; flex: none; padding: 15px; overflow-y: auto;  overflow-x: clip; }
.calc-mid { flex: 1; min-width: 0; padding: 0; overflow: auto; position: relative; overflow-x: clip; }
.calc-right { width: 330px; flex: none; padding: 15px; overflow-y: auto; overflow-x: clip; }
.calc-col h3, .calc-right h3, .calc-mid h3 {
  font-size: 13px;
  margin-bottom: 13px;
  color: var(--accent-2);
  letter-spacing: 1.5px;
  font-weight: 700;
}
.calc-fields { display: flex; flex-direction: column; gap: 8px; }

.result-box {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.65;
  min-height: 90px;
  max-height: 260px;
  overflow-y: auto;
}



.batch-table-wrap {
  flex: 1; min-height: 0; overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  box-shadow: var(--shadow-sm);
}
table.batch {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}
table.batch th {
  position: sticky; top: 0;
  
  background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  background-image: linear-gradient(180deg, rgba(79, 140, 255, 0.16), rgba(79, 140, 255, 0.07));
  color: var(--text-strong);
  padding: 7px 9px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
table.batch th:hover {
  background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  background-image: linear-gradient(180deg, rgba(79, 140, 255, 0.28), rgba(79, 140, 255, 0.13));
}
table.batch td {
  padding: 5px 9px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid rgba(50, 80, 170, 0.06);
  color: var(--text);
}
table.batch tr:nth-child(even) td { background: rgba(50, 80, 170, 0.03); }
table.batch tr:hover td { background: rgba(79, 140, 255, 0.06); }
table.batch td.num { text-align: center; font-variant-numeric: tabular-nums; } 
table.batch td.editable { cursor: pointer; }
table.batch td.editable:hover { background: var(--item-sel); }
.batch-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 10px; }



.settings-page { padding: 0; background: transparent; border-radius: 0; margin: 0; }
.settings-card {
  padding: 14px 18px;
  margin-bottom: 10px;
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
}
.settings-card h3 { font-size: 13px; margin-bottom: 12px; color: var(--accent-2); letter-spacing: 1.2px; }
.settings-row { display: flex; align-items: center; gap: 0; margin-bottom: 8px; flex-wrap: nowrap; }
.settings-row label { width: 64px; color: var(--sub); flex: none; font-size: 0.9em; padding-right: 8px; }
.settings-row input[type="text"],
.settings-row input[type="range"] { flex: 1; min-width: 140px; max-width: 360px; }
.settings-row > span { flex: none; margin-left: 10px; min-width: 40px; text-align: right; }
.settings-page input[type="range"] { width: 100% !important; max-width: 360px; }
.settings-row input[type="text"] { flex: 1; min-width: 240px; }
.color-swatch {
  width: 64px; height: 26px; border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(128, 128, 128, 0.4);
}


.modal-mask {
  position: fixed; inset: 0;
  background: rgba(25, 35, 65, 0.42);
  
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex; align-items: center; justify-content: center;
  
  z-index: 1500;
  animation: fade-in 0.16s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur, 0px));
  min-width: 440px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-head, .modal-body { background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95)); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; 
  border-bottom: 0;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-strong);
}
.modal-close {
  background: transparent; border: none; color: var(--sub);
  font-size: 16px; cursor: pointer; padding: 2px 9px; border-radius: 8px;
  transition: all 0.12s;
}
.modal-close:hover { background: var(--btn-hover); color: var(--text); }
.modal-body { padding: 0 18px 16px 18px; overflow-y: auto; }


.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.plugin-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: linear-gradient(180deg, #ffffff, #edf1f8);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 7px 4px;
  cursor: pointer;
  font-size: 11px;
  text-align: center;
  transition: all 0.14s;
  color: var(--text);
}
.plugin-cell:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(79, 140, 255, 0.16);
}
.plugin-cell img { width: 54px; height: 54px; object-fit: contain; }
body[data-theme="dark"] .plugin-cell {
  background: linear-gradient(180deg, #1d2436, #151a29);
  border-color: rgba(255, 255, 255, 0.12);
}


.error-panel {
  padding: 28px 32px;
  border: 1px solid rgba(255, 93, 115, 0.35);
  background: linear-gradient(180deg, rgba(255, 93, 115, 0.07), rgba(255, 93, 115, 0.03));
  border-radius: 16px;
  color: var(--text);
  line-height: 1.7;
  max-width: 760px;
  margin: 40px auto;
  box-shadow: var(--shadow-md);
}
.error-panel code {
  background: var(--input-bg);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
}
.error-panel pre {
  background: var(--input-bg);
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  overflow-x: auto;
  margin-top: 10px;
  white-space: pre-wrap;
}


::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 140, 190, 0.26);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 140, 190, 0.46); }

.toast {
  position: fixed;
  bottom: 46px; left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--panel2-rgb), 0.9); 
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 11px 22px;
  box-shadow: var(--shadow-md);
  z-index: 3000; 
  font-size: 13px;
  color: var(--text);
  animation: toast-in 0.22s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }




.home-page { overflow-y: auto; padding: 6px 4px 20px; }
.home-head { flex: none; padding: 6px 2px 18px; }
.home-code {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
}
.home-title {
  font-size: 27px; font-weight: 800;
  margin-top: 3px;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, #16222e, #4f8cff 52%, #ff8a3d);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body[data-theme="dark"] .home-title {
  background: linear-gradient(120deg, #eef4ff, #6ea0ff 52%, #ffa05e);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-sub { color: var(--sub); font-size: 12.5px; margin-top: 5px; }

body[data-theme="light"] .home-sub { color: #44547b; }
body[data-theme="dark"] .home-sub { color: #b9c4e0; }


.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  flex: none;
}
.module-tile {
  --mc: #4f8cff; --mc2: #ff8a3d;
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  overflow: hidden;
}
.module-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mc), var(--mc2));
  opacity: 0.95;
}
.module-tile::after {
  content: '进入 →';
  position: absolute; right: 16px; top: 18px;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700;
  color: var(--mc);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.16s, transform 0.16s;
}
.module-tile:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--mc) 55%, transparent);
  box-shadow: 0 22px 44px color-mix(in srgb, var(--mc) 24%, transparent),
    0 0 0 1px color-mix(in srgb, var(--mc) 22%, transparent);
}
.module-tile:hover::after { opacity: 1; transform: none; }
.mt-head { display: flex; align-items: center; gap: 11px; }
.module-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--mc), var(--mc2));
  box-shadow: 0 9px 22px color-mix(in srgb, var(--mc) 38%, transparent);
  flex: none;
  transition: transform 0.18s;
}
.module-tile:hover .module-icon { transform: scale(1.07) rotate(-3deg); }
.module-name { font-size: 1.27em; font-weight: 800; color: var(--text-strong); }
.module-desc { font-size: 0.88em; color: var(--sub); line-height: 1.55; min-height: 34px; }
.module-stat { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.module-stat b {
  font-family: var(--mono);
  font-size: 1.7em; font-weight: 800;
  color: var(--mc);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px color-mix(in srgb, var(--mc) 42%, transparent);
}
.module-stat .stat-unit { font-size: 10.5px; color: var(--faint); }


.home-sec-label {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px;
  color: var(--faint);
  margin-bottom: 10px;
}

body[data-theme="light"] .home-sec-label { color: #5c6c93; }
body[data-theme="dark"] .home-sec-label { color: #c3cee8; }


.home-recent { flex: none; margin-top: 26px; }
.recent-list { display: flex; gap: 9px; flex-wrap: wrap; }
.recent-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.recent-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(79, 140, 255, 0.18);
}
.recent-item .recent-type {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--tab-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  flex: none;
}
.recent-item .recent-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-empty { color: var(--faint); font-size: 12px; padding: 2px 2px; }


.home-quick { flex: none; margin-top: 26px; }
.quick-chips { display: flex; gap: 9px; flex-wrap: wrap; }
.quick-chip {
  --qc: #4f8cff;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background-color: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
  border: 1px solid var(--border);
  border-radius: 999px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--sub);
  font-size: 12.5px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s;
}
.quick-chip .chip-count {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--qc) 14%, transparent);
  color: var(--qc);
  font-variant-numeric: tabular-nums;
}
.quick-chip:hover {
  color: var(--text-strong);
  border-color: color-mix(in srgb, var(--qc) 60%, transparent);
  background: color-mix(in srgb, var(--qc) 9%, var(--panel));
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--qc) 24%, transparent);
}


.module-bar {
  display: flex; align-items: center; gap: 10px;
  flex: none;
  padding: 2px 6px 10px;
}
.crumb {
  background: transparent; border: none;
  color: var(--sub); font-size: 12px;
  cursor: pointer;
  padding: 5px 11px; border-radius: 9px;
  transition: all 0.14s;
}
.crumb:hover { color: var(--accent); background: var(--btn-hover); }
.crumb-sep { color: var(--faint); }
.crumb-cur { font-weight: 700; font-size: 12.5px; color: var(--text-strong); }
.mb-spacer { flex: 1; }
.mb-switch { display: flex; gap: 8px; }
.mb-dot {
  --sc: #4f8cff;
  position: relative;
  width: 34px; height: 34px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  color: var(--sub);
  cursor: pointer;
  transition: all 0.16s;
}
.mb-dot::before { content: '●'; font-size: 9px; }
.mb-dot:hover {
  color: var(--sc);
  border-color: color-mix(in srgb, var(--sc) 55%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--sc) 30%, transparent);
}
.mb-dot.active {
  color: #fff;
  background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 55%, #ff8a3d));
  border-color: transparent;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sc) 45%, transparent);
}


.page-hero { flex: none; padding: 2px 6px 12px; }
.hero-code {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--accent);
  text-transform: uppercase;
}
.hero-title {
  font-size: 26px; font-weight: 800;
  margin-top: 2px;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, #16222e, #4f8cff 52%, #ff8a3d);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body[data-theme="dark"] .hero-title {
  background: linear-gradient(120deg, #eef4ff, #6ea0ff 52%, #ffa05e);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--sub); font-size: 12px; margin-top: 3px; }


.tab-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.home-page { overflow-y: auto; }  
.module-bar { flex: none; }
.page-hero { flex: none; }
.sub-tabs { flex: none; }


.module-bar .channel-tabs { flex: none; }
.module-bar .channel-tab,
.tb-center-nav .channel-tab { padding: 7px 16px; font-size: 1em; }
.module-bar .channel-tab,
.tb-center-nav .channel-tab {
  background: transparent;
  color: var(--sub);
}
.module-bar .channel-tab:hover,
.tb-center-nav .channel-tab:hover {
  background: color-mix(in srgb, var(--sc, #4f8cff) calc(var(--panel-opacity, 0.95) * 50%), transparent);
  backdrop-filter: blur(var(--glass-blur, 0px));
  color: var(--text);
}
.module-bar .channel-tab.active,
.tb-center-nav .channel-tab.active {
  background: color-mix(in srgb, var(--sc, #4f8cff) calc(var(--panel-opacity, 0.95) * 85%), transparent) !important;
  backdrop-filter: blur(var(--glass-blur, 0px));
  color: #fff;
}




#topbar { position: relative; }
.tb-center-nav {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
}
.tb-center-nav .channel-tabs {
  display: flex; gap: 4px;
  padding: 4px;
  border-radius: 24px;
  
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tb-center-nav .channel-tab {
  position: relative;
  padding: 6px 18px;
  font-size: 12.5px;
  border-radius: 19px;
  overflow: hidden;
}

.tb-center-nav .channel-tab {
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s, box-shadow 0.18s, background 0.18s;
}
.tb-center-nav .channel-tab:hover { transform: translateY(-2px); }
.tb-center-nav .channel-tab.active { transform: translateY(-1px); }


.mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 6px 12px;
  flex: none;
}
.mod-head .hero-title { margin: 0; }
.mod-head .sub-tabs { margin: 0; flex: none; }
.mod-head .hero-code { flex: none; }


.preview-root::after {
  
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(240, 244, 252, 0.30) 0%, rgba(240, 244, 252, 0) 15%, rgba(240, 244, 252, 0) 85%, rgba(240, 244, 252, 0.30) 100%),
    linear-gradient(180deg, rgba(248, 250, 255, 0) 26%, rgba(248, 250, 255, 0.42) 74%, rgba(240, 244, 252, 0.82) 100%);
  pointer-events: none;
  z-index: 1;
}
body[data-theme="dark"] .preview-root::after {
  background:
    linear-gradient(90deg, rgba(8, 10, 16, 0.34) 0%, rgba(8, 10, 16, 0) 15%, rgba(8, 10, 16, 0) 85%, rgba(8, 10, 16, 0.34) 100%),
    linear-gradient(180deg, rgba(8, 10, 16, 0) 26%, rgba(8, 10, 16, 0.4) 74%, rgba(8, 10, 16, 0.78) 100%);
}


.db-detail { --dl-fs: 13px; }
.db-detail .detail-html {
  font-size: var(--dl-fs);
  line-height: 1.55;
}
.db-detail .detail-html .dl-name { font-size: 1.75em; margin-bottom: 0.14em; }
.db-detail .detail-html .dl-sub { font-size: 0.85em; }
.db-detail .detail-html .sec { font-size: 0.92em; }
.db-detail .detail-html table.stats td { font-size: 1em; }
.db-detail .detail-html .skill-desc { font-size: 0.9em; }
.db-detail .detail-html .env-note { font-size: 0.9em; }

.db-detail .detail-html img.ic {
  height: 1.45em !important;
  width: auto !important;
  vertical-align: -0.18em !important;
}

.db-detail .detail-html img.ic-em { height: 2.4em !important; }
.db-detail .detail-html .ic-layer {
  height: 1.45em !important;
  width: auto !important;
  vertical-align: -0.18em !important;
}
.db-detail .detail-html .ic-layer img.ic-img { height: 1.45em !important; }

.db-detail .detail-html .pill { font-size: 0.92em; padding: 0.3em 0.85em; }
.db-detail .detail-html .pill img {
  height: 1.3em !important;
  width: auto !important;
}

.db-detail .detail-html .skill-row { min-height: 2.1em; padding: 2px 0; background: transparent; transition: none; }
.db-detail .detail-html .skill-row::before { display: none; }
.db-detail .detail-html .skill-row:hover { background: transparent; }
.db-detail .detail-html .skill-name {
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 9px;
  transition: background 0.12s;
}
.db-detail .detail-html .skill-name:hover { background: var(--btn-hover); }
.db-detail .detail-html .skill-row { min-height: 2.1em; }
.db-detail .detail-html .skill-row .ic-layer,
.db-detail .detail-html .skill-row .ic-layer img.ic-img { height: 1.45em !important; }


.db-detail .detail-html .skill-name > span:not(.ic-layer) { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; } 




.tb-center-nav .channel-tabs {
  position: relative;
}
.tb-center-nav .channel-tab {
  z-index: 1;
}
.tb-center-nav .channel-tab.active {
  z-index: 2;
}

.tab-page.anim {
  animation: tabFadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}




.tb-p59 {
  width: 48px; height: 48px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 3px;
  flex: none;
}
.tb-center-nav { gap: 10px; }


.brand .brand-logo {
  background: transparent;
  box-shadow: none;
  border-radius: 10px;
  object-fit: contain;
  width: 38px; height: 38px;
  cursor: pointer;
  flex: none;
}
.tb-p59 {
  width: 48px; height: 48px;
  object-fit: contain;
  flex: none;
  
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 8px;
}

.tb-center-nav {
  transform: translate(calc(-50% - 21px), -50%);
}




.tb-center-nav {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}
.tb-center-nav .tb-p59 {
  grid-column: 1;
  justify-self: start;
}
.tb-center-nav .channel-tabs {
  grid-column: 2;
  justify-self: center;
  position: relative; 
}


.tb-center-nav .channel-tabs .tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px; left: 0;
  width: 0; 
  border-radius: 19px;
  background: linear-gradient(120deg, var(--mc, #4F8CFF), color-mix(in srgb, var(--mc, #4F8CFF) 60%, #9b6eff));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--mc, #4F8CFF) 36%, transparent);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1), background 0.38s;
  pointer-events: none;
  z-index: 0;
}
.tb-center-nav .channel-tab {
  background: transparent !important; 
  z-index: 1;
}
.tb-center-nav .channel-tab.active { color: #fff !important; }
body[data-theme="light"] .tb-center-nav .channel-tab.active { color: #fff !important; }


.db-detail .detail-html .skill-row { min-height: 2.4em; padding: 3px 0; }
.db-detail .detail-html .skill-name {
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  cursor: pointer;
  padding: 5px 8px 7px 8px; 
  border-radius: 9px;
  transition: background 0.12s;
}
.db-detail .detail-html .skill-row .ic-layer,
.db-detail .detail-html .skill-row .ic-layer img.ic-img { height: 1.45em !important; }




#arms-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  
  filter: blur(var(--glass-blur, 0px));
  transform: scale(var(--bg-scale, 1)); 
}
body,
body[data-theme="dark"] {
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(79, 140, 255, 0.5), transparent 62%),
    radial-gradient(820px 440px at -8% 104%, rgba(255, 110, 199, 0.35), transparent 62%),
    radial-gradient(720px 400px at 52% 116%, rgba(255, 138, 61, 0.3), transparent 62%),
    linear-gradient(165deg, var(--win-bg), var(--win-bg2));
}
body[data-theme="dark"] {
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(110, 160, 255, 0.6), transparent 62%),
    radial-gradient(820px 440px at -8% 104%, rgba(255, 110, 199, 0.45), transparent 62%),
    radial-gradient(720px 400px at 52% 116%, rgba(255, 138, 61, 0.4), transparent 62%),
    linear-gradient(165deg, var(--win-bg), var(--win-bg2));
}


.db-detail .detail-html .ic-layer { vertical-align: -0.24em !important; }
.db-detail .detail-html img.ic { vertical-align: -0.22em !important; }
.db-detail .detail-html .skill-name { vertical-align: middle; }






.db-detail { overflow: visible !important; padding: 0 !important; }
.db-detail-scroll { padding: 16px 20px 16px 24px !important; overflow-y: auto; overflow-x: hidden; }


.db-detail .detail-html .skill-row { min-height: 0 !important; padding: 4px 0 !important; background: transparent; }
.db-detail .detail-html .skill-row::before { display: none; }
.db-detail .detail-html .skill-name {
  font-size: 1em;
  display: inline !important;
  vertical-align: -0.2em;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 9px;
  transition: background 0.12s;
}
.db-detail .detail-html .skill-name:hover { background: var(--btn-hover); }
.db-detail .detail-html .skill-name .ic-layer,
.db-detail .detail-html .skill-name img.ic { vertical-align: -0.2em !important; }


.db-detail .detail-html .dl-name-row .ic-layer,
.db-detail .detail-html .dl-name-row { display: flex; align-items: center; line-height: 1.9; }
.db-detail .detail-html .dl-name-row > span { display: inline-flex; align-items: center; }


.db-detail .detail-html img[src*="AP.png"] { height: 0.95em !important; width: auto !important; vertical-align: -0.2em !important; }


.db-detail .detail-html .dl-name-row { align-items: center !important; }
.db-detail .detail-html .dl-name-row > span:last-child {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 0 !important;
  padding: 0 !important;
  height: 0.6em !important;
}
.db-detail .detail-html .dl-name-row .ic-layer img.ic-img[src*="AP"] {
  height: 0.6em !important;
  width: auto !important;
  vertical-align: middle !important;
}
.db-detail .detail-html .dl-name-row > span:last-child .ic-layer {
  height: 0.6em !important;
  line-height: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}







.db-detail .detail-html .skill-name {
  font-size: 1em;
  display: inline-flex !important;
  align-items: center !important;
  gap: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 1px 0 2px 0; 
  border-radius: 9px;
  transition: background 0.12s;
  vertical-align: middle;
}
.db-detail .detail-html .skill-name:hover { background: var(--btn-hover); }
.db-detail .detail-html .skill-name .ic-layer,
.db-detail .detail-html .skill-name img.ic { vertical-align: middle !important; }


.preview-root { --dl-fs: 13px; }
.preview-root .detail-html {
  font-size: var(--dl-fs);
  line-height: 1.55;
}
.preview-root .detail-html .dl-name { font-size: 1.75em; margin-bottom: 0.14em; }
.preview-root .detail-html .sec { font-size: 0.92em; }
.preview-root .detail-html table.stats td { font-size: 1em; }
.preview-root .detail-html .skill-desc { font-size: 0.9em; }

.preview-root .detail-html img.ic {
  height: 1.45em !important;
  width: auto !important;
  vertical-align: -0.18em !important;
}


.preview-root .skill-row {
  min-height: 2.1em;
  padding: 2px 0;
  background: transparent !important;
  transition: none;
}
.preview-root .skill-row::before { display: none; }
.preview-root .skill-row:hover { background: transparent !important; }
.preview-root .skill-name {
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: background 0.12s;
  vertical-align: middle;
}
.preview-root .skill-name:hover { background: var(--btn-hover); }
.preview-root .skill-name .ic-layer,
.preview-root .skill-name img.ic { vertical-align: middle !important; }

.preview-root .skill-name > span:not(.ic-layer) { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; } 


:root {
  --panel-opacity: 0.95;
  --glass-blur: 0px;
}


#topbar,
.card,
.module-tile,
.db-detail,
.preview-root,
.calc-col,
.calc-col-mid,
.calc-col-side {
  background-color: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
}


.doll-stage {
  pointer-events: none;
}


input, select, textarea, button.btn {
  background-color: var(--panel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


#topbar {
  background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
}



.db-detail .detail-html img.ic,
.preview-root .detail-html img.ic { height: 1.7em !important; width: auto !important; vertical-align: -0.18em !important; }
.db-detail .detail-html img.ic-em { height: 2.6em !important; }
.db-detail .detail-html .ic-layer,
.preview-root .detail-html .ic-layer { height: 1.7em !important; width: auto !important; vertical-align: -0.18em !important; }
.db-detail .detail-html .ic-layer img.ic-img,
.preview-root .detail-html .ic-layer img.ic-img { height: 1.7em !important; }

.preview-root .skill-name .ap-icons .ic-layer,
.preview-root .skill-name .ap-icons .ic-layer img.ic-img { height: 1.47em !important; }


.calc-col .skill-row,
.calc-page .skill-row { background: transparent !important; padding: 1px 0; min-height: 1.6em; }
.calc-col .skill-row::before,
.calc-page .skill-row::before { display: none; }
.calc-col .skill-row:hover,
.calc-page .skill-row:hover { background: transparent !important; }
.calc-col .skill-name,
.calc-page .skill-name { padding: 2px 6px; border-radius: 8px; }
.calc-col .skill-name:hover,
.calc-page .skill-name:hover { background: var(--btn-hover); }


.calc-right .btn-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.calc-right .btn-row .btn { margin: 0; }


.icon-dd { position: relative; flex: 1; min-width: 0; }
.icon-dd {
  
  position: relative;
  
  min-width: 0;
  max-width: 100%;
}
.icon-dd-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 34px;
}
.icon-dd-input .icon-dd-icons img { height: 1.35em; width: auto; vertical-align: middle; }
.icon-dd-input .icon-dd-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-dd.azban-centered .icon-dd-label { text-align: center; }

.icon-dd.rarity-centered .icon-dd-input { position: relative; justify-content: center; }
.icon-dd.rarity-centered .icon-dd-label { flex: none; }
.icon-dd.rarity-centered .icon-dd-arrow { position: absolute; right: 10px; }
.icon-dd-input .icon-dd-arrow { color: var(--faint); font-size: 10px; flex: none; }
.icon-dd-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  
  width: max-content;
  min-width: 100%;
  max-width: min(340px, calc(100vw - 32px));
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  display: none;
  padding: 4px;
}
.icon-dd.open .icon-dd-list { display: block; }
.icon-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
}
.icon-dd-item:hover { background: var(--btn-hover); }
.icon-dd-item.active { background: var(--item-sel); }
.icon-dd-item img { height: 1.4em; width: auto; object-fit: contain; flex: none; }
.icon-dd-item .icon-dd-item-name { overflow: visible; text-overflow: clip; }

.icon-dd-item.icon-dd-item-centered { justify-content: center; }
.icon-dd-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 9px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  margin-bottom: 4px;
}



.db-bg-btn { font-size: 11.5px; white-space: nowrap; flex-shrink: 0; }



.db-detail .detail-html img.ic,
.preview-root .detail-html img.ic { height: 2.1em !important; width: auto !important; }
.db-detail .detail-html img.ic-em { height: 3em !important; }

.db-detail .detail-html .ic-layer,
.preview-root .detail-html .ic-layer { height: 2.1em !important; width: auto !important; }
.db-detail .detail-html .ic-layer img.ic-img,
.preview-root .detail-html .ic-layer img.ic-img { height: 2.1em !important; }


.db-detail .detail-html .skill-name { gap: 18px; }


.preview-root .detail-html .skill-name { gap: 16px; }
.preview-root .detail-html img.ic,
.preview-root .detail-html .ic-layer { vertical-align: middle !important; }


.db-header .filters label { color: var(--text); }


.batch .icon-dd { min-width: 130px; }
.batch .icon-dd-input { min-height: 30px; padding: 5px 8px; font-size: 12px; }

.batch-toolbar .icon-dd { min-width: 110px; max-width: 150px; }
.batch-toolbar .icon-dd-input { min-height: 30px; padding: 5px 8px; font-size: 12px; }



.db-detail .detail-html .ic-layer.ic-layer-multi,
.preview-root .detail-html .ic-layer.ic-layer-multi,
.detail-html .ic-layer.ic-layer-multi { width: 2.1em !important; height: 2.1em !important; }
.db-detail .detail-html .ic-layer.ic-layer-multi img.ic-img,
.preview-root .detail-html .ic-layer.ic-layer-multi img.ic-img { height: 2.1em !important; }


.home-quick .quick-chip,
.module-bar .channel-tab,
.sub-tabs .sub-tab {
  background-color: transparent;
  backdrop-filter: none;
}

.home-recent .recent-item {
  background-color: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: none;
}
.home-recent .recent-item:hover,

.home-quick .quick-chip { background-color: rgba(var(--panel-rgb), var(--panel-opacity, 0.95)); }
.home-quick .quick-chip:hover { background-color: rgba(var(--panel-rgb), calc(var(--panel-opacity, 0.95) * 1.15)); }


.brand-name { font-size: 19px; }
.brand-sub { font-size: 10.5px; letter-spacing: 1.5px; }


.batch-toolbar .btn-group-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.batch-toolbar .btn { min-height: 34px; }
.batch-toolbar .btn.small { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }


.calc-mid { display: flex; flex-direction: column; }
.calc-mid .preview-root { flex: 1; min-height: 100%; height: 100%; overflow: auto; }


#btn-darkmode .dm-icon-sun { display: block; }
#btn-darkmode .dm-icon-moon { display: none; }
body[data-theme="dark"] #btn-darkmode .dm-icon-sun { display: none; }
body[data-theme="dark"] #btn-darkmode .dm-icon-moon { display: block; }


.settings-version {
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  padding: 10px 0 4px;
  user-select: none;
}


.db-header .filters .icon-dd { min-width: 96px; max-width: 150px; }
.db-header .filters .icon-dd-input { min-height: 28px; padding: 4px 8px; font-size: 11.5px; }


.settings-page input[type="text"],
.settings-page select,
.settings-page textarea {
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 7px 12px;
}

.settings-page input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background-color: transparent; border: 0; outline: 0;
  width: 100%; max-width: 240px; height: 24px;
  padding: 0 10px; box-sizing: border-box;
  display: block; margin: 0 auto;
  cursor: pointer;
}
.settings-page input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--accent) 0 var(--pct, 0%), rgba(var(--panel-rgb), 0.4) var(--pct, 0%) 100%);
  border: 1px solid var(--border);
  border-radius: 10px; height: 8px;
}
.settings-page input[type="range"]::-moz-range-track {
  background: linear-gradient(to right, var(--accent) 0 var(--pct, 0%), rgba(var(--panel-rgb), 0.4) var(--pct, 0%) 100%);
  border: 1px solid var(--border);
  border-radius: 10px; height: 8px;
}
.settings-page input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-grad);
  border: 2px solid rgba(255,255,255,0.65);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  margin-top: -6px;
}
.settings-page input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-grad);
  border: 2px solid rgba(255,255,255,0.65);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}


.db-detail .detail-html .skill-name { gap: 5px; }
.preview-root .detail-html .skill-name { gap: 5px; }

.db-detail .detail-html,
.preview-root .detail-html { font-size: var(--dl-fs, 13px) !important; }


.db-detail .detail-html > div > img.ic,
.preview-root .detail-html > div > img.ic { margin-right: 0px; }
.db-detail .detail-html > div > .ic-layer,
.preview-root .detail-html > div > .ic-layer { margin-right: 0px; }



.db-detail .detail-html img.fw-bar-ic { height: 0.88em !important; width: auto !important; }


.btn, .btn.small, .btn.secondary,
.form-row label, .form-row input[type="text"], .form-row select,
.icon-dd-input, .icon-dd-item,
.db-list li, .settings-row label, .settings-row input,
.checkbox, .sub-tab, .channel-tab,
.settings-card h3, .settings-card label, .settings-version,
.db-header .filters label, .db-header .filters input,
.calc-col h3, .calc-right h3, .calc-mid h3,
.batch .btn, .batch-toolbar input,
.gs-wrap input, .brand-name, .brand-sub,
.tb-status, .src-ind {
  font-size: 1em;
}


.form-row, .form-row label, .form-row input, .form-row select,
.settings-row, .settings-row label, .settings-row input,
.db-header .filters, .db-header .filters label, .db-header .filters input,
.batch-toolbar, .batch-toolbar input, .batch-toolbar label,
.calc-col, .calc-right, .calc-mid,
.channel-tabs, .sub-tabs, .gs-wrap, .gs-wrap input,
.modal-body, .settings-card,
.batch-table-wrap, .icon-dd, .icon-dd-input, .icon-dd-item,
.db-list, .db-list-panel, .db-detail, .preview-root, .tab-page,
.home-page, .home-recent, .home-quick,

.db-detail .skill-name, .preview-root .skill-name,
.db-detail .sec, .preview-root .sec,
.db-list li,
.cat-chip, .home-recent .recent-item, .home-quick .quick-chip,
.sub-tab, .channel-tab, .checkbox, .modal, .settings-card h3,
.db-header, .batch, .db-page {
  font-size: 1em !important;
}


.bar-track { box-shadow: inset 0 1px 2px rgba(0,0,0,0.15); }
.bar-fill { box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 50%, transparent); transition: width 0.3s ease; }


.db-detail .detail-html .dl-name-row .ic-layer img.ic-img { height: 1.25em !important; }
.db-detail .detail-html .dl-name-row img[src*="AP.png"] { height: 0.5em !important; }


.src-ver {
  font-size: 11px;
  color: var(--faint);
  margin-left: 8px;
  white-space: nowrap;
  user-select: none;
}


.plugin-grid {
  max-height: 472px;
  overflow-y: auto;
  padding-right: 4px;
}


.settings-row label { padding-right: 14px; }
.settings-row > span { text-align: left; }


.settings-page label { white-space: nowrap; }

.settings-row .bg-label { width: auto !important; white-space: nowrap; padding-right: 10px; }


.settings-page .settings-row input[type="range"] {
  flex: 0 0 240px !important;
  width: 240px !important;
  max-width: 240px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}




#app { height: 100vh; height: 100dvh; }


@media (max-width: 900px) and (orientation: portrait) {
  
  #topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 7px 12px;
    gap: 6px 10px;
  }
  .brand { order: 1; }
  .brand-logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
  .brand-name { font-size: 13.5px; }
  .brand-sub { display: none; }
  .gs-wrap { order: 2; flex: 1 1 110px; min-width: 0; width: auto; margin-left: 0; }
  
  .gs-dropdown { right: auto; width: min(61.6vw, 238px); left: 50%; transform: translateX(-50%); }
  .tb-spacer { display: none; }
  .src-ind, .src-ver, .bg-volume, #btn-darkmode, #btn-settings { order: 3; }
  .src-ver { display: none; }
  #btn-darkmode, #btn-settings { width: 32px; height: 32px; }
  .bg-volume { margin-left: 2px; }
  .tb-center-nav {
    order: 4;
    position: static;
    transform: none;
    min-width: 100vw;
    display: flex;
    justify-content: center;
    margin-top: 2px;
  }
  .tb-center-nav .tb-p59 { display: none; }
  .tb-center-nav .channel-tab { padding: 6px 15px; font-size: 12.5px; }

  
  .module-grid { grid-template-columns: 1fr; gap: 10px; }
  .module-tile { padding: 16px 16px 14px; gap: 6px; }
  .home-head { padding: 2px 2px 12px; }
  .home-title { font-size: 22px; }
  .home-sub { font-size: 11.5px; }
  .quick-chips { gap: 7px; }
  .quick-chip { padding: 9px 14px; font-size: 12px; }
  .recent-list, .home-recent { padding-top: 2px; }

  
  .db-body { flex-direction: column; gap: 10px; }
  .db-list-panel { width: 100%; max-height: 34vh; }
  .db-list li { min-height: 44px; font-size: 12.5px; }
  .db-header input[type="search"] { width: 100%; }
  .db-header select { max-width: none; }
  .cat-chip { padding: 6px 13px; font-size: 11.5px; }
  .db-detail { padding: 12px 14px; }
  .db-detail .detail-html .dl-name { font-size: 1.5em; }

  
  .calc-page { flex-direction: column; gap: 10px; }
  .calc-col, .calc-right { width: 100%; max-height: 36vh; padding: 12px; }
  .calc-mid { width: 100%; min-height: 180px; padding: 0;  }

  
  .modal { min-width: 0; width: 94vw; max-width: 94vw; }
  .settings-row { flex-wrap: wrap; }
  .settings-row label { width: auto; min-width: 56px; }
  .settings-row input[type="text"] { min-width: 0; width: 100%; }
  .settings-card { padding: 12px 14px; }
}


@media (max-width: 520px) and (orientation: portrait) {
  #topbar { padding: 6px 10px; gap: 5px 8px; }
  .gs-wrap { flex-basis: 96px; }
  .tb-center-nav .channel-tab { padding: 5px 11px; font-size: 12px; }
  .home-title { font-size: 20px; }
  .home-code { font-size: 9px; }
  .db-list-panel { max-height: 30vh; }
  .calc-col, .calc-right { max-height: 32vh; }
  .modal { width: 96vw; max-width: 96vw; max-height: 92vh; }
  .modal-body { padding: 0 12px 12px; }
  .detail-html { font-size: 0.95em; }
}




.rotate-hint {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 92vw;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  color: var(--text);
  animation: modal-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.rotate-hint .rh-icon { flex: none; font-size: 16px; }
.rotate-hint .rh-close {
  flex: none;
  margin-left: 6px;
  padding: 4px 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}


@media (max-width: 900px) and (orientation: landscape) and (max-height: 640px) and (pointer: coarse) {
  #topbar { padding: 0 14px; gap: 10px; height: 48px; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-sub { display: none; }
  .page-hero { padding: 0 6px 4px; }
  .page-hero .hero-title { font-size: 15px; }
  .page-hero .hero-code { display: none; }
  
  .db-header { flex-wrap: nowrap; overflow-x: auto; padding: 4px 6px; gap: 6px; }
  .db-header > * { flex: 0 0 auto; min-width: 0; }
  .db-header .cat-chips { display: flex; flex-wrap: nowrap; flex: 0 0 auto; gap: 3px; }
  .db-header .cat-chips .cat-chip { flex: 0 0 auto; }
  .db-header input[type="search"] { flex: 0 1 140px; min-width: 100px; }
  .db-header .filters { display: flex; flex-wrap: nowrap; flex: 0 0 auto; align-items: center; gap: 3px; }
  .cat-chip { padding: 3px 10px; font-size: 11px; }
  .db-list-panel { width: 260px; padding: 6px; }
  .db-list li { min-height: 36px; padding: 4px 8px 4px 11px; font-size: 11.5px; }
  .db-detail { padding: 6px 10px; }
  .db-detail .detail-html .dl-name { font-size: 1.3em; }
  .calc-col, .calc-right { width: 240px; padding: 8px; }
  .calc-mid { padding: 0; } 
  
  .db-detail { display: flex; }
  .db-detail-scroll { flex: 1; min-width: 0; padding: 6px 10px !important; }
  .doll-stage { left: auto; right: 0; top: 0; width: 46%; height: 100%; }
}


@media (max-width: 900px) and (orientation: portrait) {
  body.force-landscape #app {
    position: fixed;
    top: 0;
    left: 100vw;
    width: 100vh;
    height: 100vw;
    transform-origin: top left;
    transform: rotate(90deg);
  }

  
  body.force-landscape #topbar { flex-wrap: nowrap; height: 48px; padding: 0 14px; gap: 12px; }
  body.force-landscape .brand { order: 0; }
  body.force-landscape .gs-wrap { order: 0; flex: 1 1 auto; width: min(440px, 38vw); min-width: 0; margin-left: 8px; }
  body.force-landscape .tb-spacer { display: block; order: 0; }
  body.force-landscape .src-ind,
  body.force-landscape .src-ver,
  body.force-landscape .bg-volume,
  body.force-landscape #btn-darkmode,
  body.force-landscape #btn-settings { order: 0; }
  body.force-landscape .src-ver { display: inline; }
  body.force-landscape .tb-center-nav {
    order: 0;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: auto; min-width: 0; flex: none;
    margin-top: 0;
  }
  body.force-landscape .tb-center-nav .tb-p59 { display: block; }
  body.force-landscape .tb-center-nav .channel-tab { padding: 6px 16px; font-size: 12.5px; }

  
  body.force-landscape .db-body { flex-direction: row; gap: 14px; }
  body.force-landscape .db-list-panel { width: 270px; max-height: none; padding: 10px; }
  body.force-landscape .db-list li { min-height: 36px; font-size: 12.5px; }
  body.force-landscape .db-detail { flex: 1; min-width: 0; padding: 10px 14px; }

  
  body.force-landscape .page-hero { padding: 0 6px 4px; }
  body.force-landscape .page-hero .hero-title { font-size: 15px; }
  body.force-landscape .page-hero .hero-code { display: none; }
  body.force-landscape .db-header { flex-wrap: nowrap; overflow-x: auto; padding: 4px 6px; gap: 6px; }
  body.force-landscape .db-header > * { flex: 0 0 auto; min-width: 0; }
  body.force-landscape .db-header .cat-chips { display: flex; flex-wrap: nowrap; flex: 0 0 auto; gap: 3px; }
  body.force-landscape .db-header .cat-chips .cat-chip { flex: 0 0 auto; }
  body.force-landscape .db-header input[type="search"] { flex: 0 1 140px; min-width: 100px; }
  body.force-landscape .db-header .filters { display: flex; flex-wrap: nowrap; flex: 0 0 auto; align-items: center; gap: 3px; }
  body.force-landscape .cat-chip { padding: 3px 10px; font-size: 11px; }

  
  body.force-landscape .calc-page { flex-direction: row; gap: 12px; }
  body.force-landscape .calc-col,
  body.force-landscape .calc-right { width: 250px; max-height: none; padding: 10px; }
  body.force-landscape .calc-mid { min-height: 0; padding: 0; } 

  
  body.force-landscape .db-detail { display: flex; }
  body.force-landscape .db-detail-scroll { flex: 1; min-width: 0; padding: 6px 10px !important; }
  body.force-landscape .doll-stage { left: auto; right: 0; top: 0; width: 46%; height: 100%; }
}


@media (max-width: 900px) and (orientation: portrait) {
  .db-body { position: relative; overflow: hidden; }
  
  .db-list-panel { flex: 0 0 100%; width: 100%; max-height: none; height: 100%; transition: transform 0.22s ease, opacity 0.18s ease; }
  
  .db-detail { position: absolute; inset: 0; z-index: 5; transform: translateX(100%); transition: transform 0.22s ease; }
  
  .db-body.db-open .db-list-panel { transform: translateX(-16%); opacity: 0.5; pointer-events: none; }
  .db-body.db-open .db-detail { transform: translateX(0); }
  
  .db-body.db-open .db-back,
  .db-detail .db-back {
    display: inline-flex !important; 
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 8px; left: 8px; 
    z-index: 10;
    padding: 5px 9px;   
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }
  
  .db-detail-scroll { padding: 33px 8px 6px 8px !important; } 
  .db-detail .detail-html { padding-left: 0 !important; }   
  
  .db-detail .voice-mode-btn { display: none !important; }
  .db-detail .voice-mode-btn-mobile {
    display: inline-flex !important;
    position: absolute;
    top: 8px;
    left: 112px; 
    z-index: 10;
    background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95)) !important;
  }
  
  .db-page.db-open .db-header { display: none; }
  
  .db-header .m-float-only { display: none !important; }
}




@media (max-width: 900px) and (orientation: portrait) {
  .tb-center-nav { display: none !important; }
}


@media (max-width: 900px) and (orientation: portrait) {
  .calc-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .calc-panels-wrap {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
  .calc-panels {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0; 
  }
  .calc-panels > .calc-col,
  .calc-panels > .calc-mid,
  .calc-panels > .calc-right {
    flex: 0 0 100%;
    width: 100%;
    max-height: none;
    scroll-snap-align: start;
    padding: 12px;
    overflow-y: auto;
    box-sizing: border-box;
  }
  
  .calc-panels > .calc-mid {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    padding: 0 !important; 
  }
  
  .calc-panels > .calc-mid .preview-root .detail-html {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 100%;
  }
  .calc-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 14px;
    flex: 0 0 auto;
  }
  .calc-indicators span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.18s, transform 0.18s;
  }
  .calc-indicators span.active {
    background: var(--accent);
    transform: scale(1.4);
  }
}



@media (max-width: 900px) and (orientation: portrait) {
  .sub-tabs { display: none !important; }
  
  .hero-title { white-space: nowrap; }
  
  
}




@media (max-width: 900px) and (orientation: portrait) {
  ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  ::-webkit-scrollbar-track { background: transparent !important; }
  ::-webkit-scrollbar-thumb { background: transparent !important; }
  * { scrollbar-width: none !important; -ms-overflow-style: none !important; }
  
  .db-list::-webkit-scrollbar { display: block !important; width: 5px !important; height: 5px !important; }
  .db-list::-webkit-scrollbar-thumb { background: rgba(120, 140, 190, 0.4) !important; border-radius: 4px; }
  .db-list { scrollbar-width: thin !important; -ms-overflow-style: auto !important; }
  
  .icon-dd-list::-webkit-scrollbar { display: block !important; width: 4px !important; height: 4px !important; }
  .icon-dd-list::-webkit-scrollbar-thumb { background: rgba(120, 140, 190, 0.4) !important; border-radius: 4px; }
  .icon-dd-list { scrollbar-width: thin !important; -ms-overflow-style: auto !important; }
}

.filter-arrow { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  .filters-wrap {
    position: relative;
    max-width: 100%;
    flex: 0 1 auto;
    min-width: 0;
  }
  
  .filters-wrap .filters { max-width: 100%; }
  .filter-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 10px;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
  }
  .filter-arrow-l { left: 2px; }
  .filter-arrow-r { right: 2px; }
  .filters-wrap.can-left .filter-arrow-l { opacity: 1; }
  .filters-wrap.can-right .filter-arrow-r { opacity: 1; }
}
@media (max-width: 900px) and (orientation: portrait) {
  
  .db-header .filters {
    flex-wrap: nowrap;
    flex: 0 0 auto;
    max-width: 100%;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .db-header .filters > * { flex: 0 0 auto; }
  
  .db-header { padding: 0 2px 0 !important; }
  
  .db-body { gap: 4px !important; }
  .db-list { padding: 0 !important; }
  .db-list li { padding: 5px 11px 8px 14px !important; min-height: 40px !important; }
  
  #tab-database { position: relative; }
  .db-page.db-open .db-body {
    position: absolute;
    inset: 0;
    z-index: 30;
  }
  
  .db-page.db-open .db-detail {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    z-index: 999 !important;
    background: var(--panel);
    overflow: hidden auto;
  }
  
  body.db-detail-mobile-open { overflow: hidden !important; }
  
  .db-page.db-open .db-back {
    z-index: 1100 !important;
  }
  
  .db-body.db-open .db-list-panel { display: none !important; }
}


.azban-mobile-float .filters label { display: none !important; }
.azban-mobile-float .filters { gap: 0; }


.azban-mobile-float { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
.azban-mobile-float .filters label { display: none !important; }
.azban-mobile-float .filters { gap: 0; }
.azban-mobile-float .icon-dd-input {
  height: 27px;
  min-height: 27px; 
  padding: 0 6px; 
  border-radius: 12px; 
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.azban-mobile-float .icon-dd .icon-dd-list { max-width: 132px; }
.azban-mobile-float .icon-dd .icon-dd-input { max-width: 132px; }


.enemy-member-float { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
.enemy-member-float .filters { gap: 0; }
.enemy-member-float .icon-dd { max-width: 190px; }
.enemy-member-float .icon-dd-input {
  height: 27px;
  min-height: 27px;
  padding: 0 8px;
  border-radius: 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.enemy-member-float .icon-dd-label { font-size: 11.5px; }


.doll-stage .doll-char.doll-loading,
.preview-root .doll-char.doll-loading {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  max-width: calc(100% - 20px);
  max-height: calc(100% - 20px);
  width: auto;
  height: auto;
  object-fit: contain;
}


.az-repl-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.az-o-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--text); opacity: 0.92; cursor: pointer; }  
.az-repl-arrow {
  color: #FFD700;
  font-size: 0.95em; 
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.55em; 
  margin-right: -0.4em; 
  text-shadow: 0 0 10px #FFD700, 0 0 4px #FFD700, 0 0 2px #FFD700;
}


table.batch th.col-name,
table.batch td.col-name {
  min-width: 150px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.batch td[contenteditable="true"] {
  cursor: text;
  background: rgba(79, 140, 255, 0.04);
}
table.batch td[contenteditable="true"]:hover { background: rgba(79, 140, 255, 0.08); }
table.batch td[contenteditable="true"]:focus { outline: 1px solid var(--accent); }


body.batch-selecting { cursor: crosshair; user-select: none; }
body.batch-selecting td[contenteditable="true"].sel-on {
  background: var(--item-sel) !important;
  outline: 1px solid var(--accent);
}


.db-detail.doll-focus .db-back,
.db-detail.doll-focus .azban-mobile-float,
.db-detail.doll-focus .voice-mode-btn-mobile,
.db-detail.doll-focus .doll-focus-hint {
  display: none !important;
}

.db-detail.doll-focus .db-detail-scroll {
  visibility: hidden;
}
.db-detail.doll-focus .doll-stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  touch-action: none; 
  pointer-events: auto; 
}
.db-detail.doll-focus .doll-stage .doll-char { cursor: grab; }
.db-detail.doll-focus .doll-stage .doll-char.dragging { cursor: grabbing; }


@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="output"] #content,
  body[data-tab="tank"] #content {
    padding: 8px 11px 0; 
  }
}


body.db-detail-mobile-open .db-body,
body.db-detail-mobile-open #topbar {
  visibility: hidden;
}



.lvstage-btn {
  display: inline-block;
  cursor: pointer;
  font-size: 0.55em;              
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e8ecf8);    
  
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 6px;
  line-height: 1.5;
  white-space: nowrap;
  transition: background 0.15s ease;
  vertical-align: middle;
}
.lvstage-btn:hover { background: rgba(127, 127, 127, 0.1); }



.elite-pips {
  display: inline-flex;
  align-items: center;
  
  gap: 0;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
}

.elite-pips > * { position: relative; }
.elite-pips > * + * { margin-left: -5px; }

.elite-pips > *:hover { z-index: 2; }
.elite-pips .ic-em {
  vertical-align: -0.18em;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.elite-pips .ic-em:hover { transform: scale(1.12); filter: brightness(1.15); }

.elite-pips .elite-pip {
  height: 3em !important;         
  width: auto !important;
  vertical-align: -0.18em;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.elite-pips .elite-pip:hover { transform: scale(1.12); filter: brightness(1.15); }
.elite-pips .elite-pip-dim { opacity: 0.45; }

.preview-root .elite-pips .elite-pip { height: 2.1em !important; }



.lvstage-mobile-float {
  display: flex;
  align-items: center;
  height: 27px;
  margin-left: 6px;
}
.lvstage-mobile-float .lvstage-btn {
  font-size: 12px;                
  line-height: 27px;
  height: 27px;
  padding: 0 6px;
  margin: 0;
  color: var(--text, #e8ecf8);    
  -webkit-text-fill-color: currentColor;
}

.btn.ghost.doll-focus-btn {
  position: relative; overflow: hidden;
  color: #a9ccff;
  background: rgba(12, 20, 36, .55);
  border-color: rgba(120, 165, 240, .42);
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.btn.ghost.doll-focus-btn::before,
.btn.ghost.doll-focus-btn::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: dollSonarPing 2.6s ease-out infinite;
  pointer-events: none;
}
.btn.ghost.doll-focus-btn::after {
  animation-delay: -1.3s;
  
  background: none;
  transition: none;
}
@keyframes dollSonarPing {
  0%   { transform: scale(.28); opacity: 1; }
  72%  { opacity: .40; }
  100% { transform: scale(1); opacity: 0; }
}

.btn.ghost.doll-focus-btn .fcb {
  position: relative; z-index: 2;
  width: 4px; height: 4px; border-radius: 50%;
  background: #dff4ff;
  box-shadow: 0 0 5px rgba(159, 224, 255, .90);
  pointer-events: none;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.btn.ghost.doll-focus-btn:hover,
.btn.ghost.doll-focus-btn:focus-visible {
  color: #cfe8ff;
  background: rgba(22, 38, 66, .62);
  border-color: rgba(150, 190, 255, .80);
  box-shadow: 0 0 8px rgba(79, 180, 255, .32);
}
.btn.ghost.doll-focus-btn:hover::before,
.btn.ghost.doll-focus-btn:hover::after,
.btn.ghost.doll-focus-btn:focus-visible::before,
.btn.ghost.doll-focus-btn:focus-visible::after { animation-duration: 1.8s; }
.btn.ghost.doll-focus-btn:hover .fcb,
.btn.ghost.doll-focus-btn:focus-visible .fcb {
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 12px rgba(160, 225, 255, .85);
  transform: scale(1.15);
}
.btn.ghost.doll-focus-btn:active { transform: scale(.94); }

.db-detail.doll-focus .btn.ghost.doll-focus-btn {
  color: #fff;
  border-color: rgba(200, 225, 255, .85);
  background: linear-gradient(135deg, rgba(30, 78, 180, .80), rgba(58, 118, 232, .68));
  box-shadow: 0 0 12px rgba(79, 180, 255, .50);
}
.db-detail.doll-focus .btn.ghost.doll-focus-btn::before,
.db-detail.doll-focus .btn.ghost.doll-focus-btn::after {
  animation-duration: 1.15s; border-width: 2.5px;
}
.db-detail.doll-focus .btn.ghost.doll-focus-btn .fcb {
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 12px rgba(150, 210, 255, .90);
  transform: scale(1.25);
}

.btn.ghost.doll-focus-btn.doll-l2d-btn::before,
.btn.ghost.doll-focus-btn.doll-l2d-btn::after,
.btn.ghost.doll-focus-btn.doll-l2d-btn .fcs,
.btn.ghost.doll-focus-btn.doll-l2d-btn .fcb { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .btn.ghost.doll-focus-btn::before,
  .db-detail.doll-focus .btn.ghost.doll-focus-btn::before {
    animation: none; transform: scale(.72); opacity: .85;
  }
  .btn.ghost.doll-focus-btn::after,
  .db-detail.doll-focus .btn.ghost.doll-focus-btn::after { animation: none; display: none; }
}



.lvstage-mobile-float .doll-focus-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-left: 2px;
  flex: none;
  align-self: center;
}


.lvstage-pop {
  position: fixed;
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
  padding: 6px 8px;
  box-sizing: border-box;
  z-index: 9000;
}
.lvstage-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;     
  gap: 4px;
  position: relative;
  margin-bottom: 4px;             
}
.lvstage-row:last-child { margin-bottom: 0; }
.lvstage-lab {
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  width: auto;
  flex: none;
  white-space: nowrap;
}
.lvstage-input {
  width: 32px;                    
  height: 24px;                   
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  
  padding: 0 1px !important;
  text-indent: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg, rgba(127,127,127,0.06));
  color: var(--text);
  outline: none;
  text-align: center;
  
  -moz-appearance: textfield;
  appearance: textfield;
  box-sizing: border-box;
}
.lvstage-input::-webkit-outer-spin-button,
.lvstage-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.lvstage-input:focus { border-color: var(--accent); }
.lvstage-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 0px));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 9100;
}
.lvstage-opt {
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  white-space: nowrap;
  text-align: center;
}
.lvstage-opt:hover { background: rgba(127, 127, 127, 0.1); }
.lvstage-opt.sel { color: var(--accent); font-weight: 700; }


.db-list li .li-label { flex: 1; min-width: 0; overflow: hidden; }
.db-list li .li-name { display: inline-block; white-space: nowrap; padding-right: 10px; }
.db-list li.scroll-name .li-name {
  animation: li-name-scroll var(--scroll-sec, 6s) ease-in-out infinite alternate;
}
@keyframes li-name-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(var(--scroll-px, -40px)); }
}
@media (prefers-reduced-motion: reduce) {
  .db-list li.scroll-name .li-name { animation: none; }
}


.db-list { overflow-x: clip; }


label.checkbox .sw {
  position: relative; display: inline-block; flex: none;
  width: 40px; height: 22px; border-radius: 12px; vertical-align: middle;
  background: color-mix(in srgb, var(--sub, #8a93a6) 28%, transparent);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: background 0.2s;
}
label.checkbox .sw > input[type="checkbox"] {
  position: absolute; inset: 0; margin: 0; opacity: 0;
  width: 100% !important; height: 100% !important; cursor: pointer; z-index: 3;
}
label.checkbox .sw::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.45);
  transition: left 0.22s cubic-bezier(.4,0,.2,1), width 0.12s;
}
label.checkbox .sw:has(input:checked) {
  background: var(--sw-on, var(--accent, #4f8cff));
  box-shadow: inset 0 1px 2px rgba(0,0,0,.14),
              0 0 9px -2px color-mix(in srgb, var(--sw-on, var(--accent, #4f8cff)) 55%, transparent);
}
label.checkbox .sw:has(input:checked)::after { left: 20px; }


label.checkbox .sw:hover:has(input:active)::after { width: 21px; }


.db-header { --sw-on: #4F8CFF; }                       
body[data-tab="output"] { --sw-on: #FF8A3D; }          
body[data-tab="tank"]   { --sw-on: #2EC4A0; }          


.settings-row:has(> .sw) { display: flex; align-items: center; gap: 10px; }
.settings-row:has(> .sw) > label { width: auto !important; min-width: 0; padding-right: 0; }

@media (prefers-reduced-motion: reduce) {
  label.checkbox .sw, label.checkbox .sw::after { transition: none !important; }
}

.settings-row label.checkbox { width: auto !important; min-width: 0; padding-right: 0; gap: 10px; }


label.checkbox { -webkit-tap-highlight-color: transparent; }


.modal-head .plugin-sort {
  margin-left: auto;      
  margin-right: 8px;
  gap: 6px;
  font-weight: 400;       
  font-size: 12px;
  color: var(--sub);
  user-select: none;
}
.modal-head .plugin-sort .plugin-sort-txt { white-space: nowrap; }


.batch-toolbar .icon-dd .icon-dd-input,
.batch-params .icon-dd .icon-dd-input {
  position: relative;
  justify-content: center;
}
.batch-toolbar .icon-dd .icon-dd-icons,
.batch-toolbar .icon-dd .icon-dd-label,
.batch-params .icon-dd .icon-dd-icons,
.batch-params .icon-dd .icon-dd-label { flex: none; }
.batch-toolbar .icon-dd .icon-dd-label,
.batch-params .icon-dd .icon-dd-label {
  max-width: calc(100% - 36px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-toolbar .icon-dd .icon-dd-arrow,
.batch-params .icon-dd .icon-dd-arrow { position: absolute; right: 10px; }


.batch-toolbar .icon-dd .icon-dd-input { padding-right: 20px; }
.batch-params .icon-dd .icon-dd-input { padding-right: 22px; }


.batch-toolbar .icon-dd-input { min-height: 34px; }
.batch-toolbar input[type="search"] { min-height: 34px; }


.detail-html .skill-name,
.detail-html .dl-sub {
  border-radius: 8px;
  padding: 1px 0 2px 0; 

  


  background: linear-gradient(180deg,
    rgba(var(--panel2-rgb), 0) 0%,
    rgba(var(--panel2-rgb), 0.3) 22%,
    rgba(var(--panel2-rgb), 0.34) 78%,
    rgba(var(--panel2-rgb), 0) 100%);
  
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent),
    linear-gradient(180deg, transparent, #000 4px, #000 calc(100% - 5px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent),
    linear-gradient(180deg, transparent, #000 4px, #000 calc(100% - 5px), transparent);
  mask-composite: intersect;
}
.detail-html .dl-sub {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}


.detail-html .skill-desc {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 3px 10px 3px 10px; 
  background: linear-gradient(180deg,
    rgba(var(--panel2-rgb), 0) 0%,
    rgba(var(--panel2-rgb), 0.24) 18%,
    rgba(var(--panel2-rgb), 0.28) 82%,
    rgba(var(--panel2-rgb), 0) 100%);
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent),
    linear-gradient(180deg, transparent, #000 4px, #000 calc(100% - 6px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent),
    linear-gradient(180deg, transparent, #000 4px, #000 calc(100% - 6px), transparent);
  mask-composite: intersect;
}


@media (hover: none) {
  .db-detail .detail-html .skill-name:hover,
  .preview-root .detail-html .skill-name:hover {
    background: linear-gradient(180deg,
      rgba(var(--panel2-rgb), 0) 0%,
      rgba(var(--panel2-rgb), 0.3) 22%,
      rgba(var(--panel2-rgb), 0.34) 78%,
      rgba(var(--panel2-rgb), 0) 100%);
  }
  .db-detail .detail-html .skill-name:active,
  .preview-root .detail-html .skill-name:active {
    background: var(--btn-hover);
  }
  .db-detail .detail-html .skill-name,
  .preview-root .detail-html .skill-name {
    -webkit-tap-highlight-color: transparent;
  }
}


@media (max-width: 900px) and (orientation: portrait) {
  .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}


.db-detail-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.db-detail-scroll::-webkit-scrollbar { display: none; }



.detail-html .type-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-html .inherit-btn {
  --ihc: #4f8cff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72em; 
  line-height: 1.45;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  padding: 0.1em 0.7em 0.14em;
  border-radius: 999px;
  cursor: pointer;
  vertical-align: middle;
  background: linear-gradient(180deg,
    color-mix(in srgb, #ffffff 30%, var(--ihc)),
    var(--ihc) 48%,
    color-mix(in srgb, #000000 24%, var(--ihc)));
  border: 1px solid color-mix(in srgb, #ffffff 42%, var(--ihc));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.18),
    0 2px 7px rgba(0, 0, 0, 0.26);
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
}
.detail-html .inherit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 3px 10px rgba(0, 0, 0, 0.3);
}
.detail-html .inherit-btn:active { transform: translateY(0); filter: brightness(0.93); }
.detail-html .inherit-btn.off {
  background: transparent;
  color: var(--text);
  text-shadow: none;
  border: 1px dashed var(--border-strong);
  box-shadow: none;
}


.detail-html .sec-sub {
  font-weight: 600;
  color: var(--sub);
  font-size: 0.85em;
  margin: 7px 0 7px; 
}


.detail-html .support-row { position: relative; }
.detail-html .support-sp {
  position: absolute;
  top: calc(70% + 4px); 
  right: 0;
  z-index: 8;
  white-space: nowrap;
  pointer-events: none;
  color: var(--support-txt);
  font-size: 0.65em; 
  line-height: 1.5;
  
}
.detail-html .sec-sub { color: var(--support-txt); }


.detail-html .elite-pips.sp-elite > * + * { margin-left: -14px; }
.preview-root .elite-pips.sp-elite > * + * { margin-left: -9px; } 


.detail-html .type-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-html .type-name-row .inherit-btn {
  align-self: center;
  flex: none;
}

@media (max-width: 900px) {
  .detail-html .type-name-row .inherit-btn { display: none; }
  .detail-html .sec-with-lvstage .inherit-btn,
  .detail-html .cur-job-row .inherit-btn { display: inline-flex; }
}
@media (min-width: 901px) {
  .detail-html .sec-with-lvstage .inherit-btn,
  .detail-html .cur-job-row .inherit-btn { display: none; }
}


.detail-html .sec.cur-job-row { display: flex; align-items: center; gap: 6px; }
.detail-html .inherit-btn.passive-btn { letter-spacing: normal; }
.detail-html .cur-job-row .passive-btn { display: inline-flex; }


.detail-html .skill-name,
.detail-html .dl-sub,
.detail-html .skill-desc {
  background: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  position: relative;
  z-index: 0; 
}
  .detail-html .skill-name::before,
  .detail-html .dl-sub::before,
  .detail-html .skill-desc::before {
  content: '';
  position: absolute;
  inset: -3px -12px -4px -12px; 
  z-index: -1; 
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(var(--panel2-rgb), 0) 0%,
    rgba(var(--panel2-rgb), 0.3) 22%,
    rgba(var(--panel2-rgb), 0.34) 78%,
    rgba(var(--panel2-rgb), 0) 100%);
  
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent),
    linear-gradient(180deg, transparent, #000 6px, #000 calc(100% - 6px), transparent) ;
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent),
    linear-gradient(180deg, transparent, #000 6px, #000 calc(100% - 6px), transparent) ;
  mask-composite: intersect;
}

.detail-html .skill-name:hover::before { background: var(--btn-hover); }

@media (hover: none) {
  .detail-html .skill-name:active::before { background: var(--btn-hover); }
}


.db-detail .detail-html .skill-row,
.preview-root .skill-row {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.db-detail .detail-html .skill-name,
.preview-root .skill-name {
  padding-left: 0 !important;
  padding-right: 0 !important;
}



.db-detail .detail-html .support-row .skill-name,
.preview-root .support-row .skill-name {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.db-detail .detail-html .support-row .skill-name > span,
.preview-root .support-row .skill-name > span {
  position: relative !important;
  display: inline-block !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.db-detail .detail-html .support-row .skill-icons,
.preview-root .support-row .skill-icons {
  position: absolute !important;
  right: calc(100% + 0.3em) !important;
  left: auto !important;
  top: -0.43em !important;
}
.detail-html .skill-desc { margin-left: 0 !important; }
.right-col .skill-desc {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.detail-html .skill-desc { border-left: none !important; }
.right-col .skill-desc { border-right: none !important; }


.detail-html .support-sp { font-size: 0.55em !important; }
.db-detail .detail-html .support-row .skill-icons,
.preview-root .support-row .skill-icons {
  top: -0.55em !important;
  right: calc(100% + 0em) !important;
}
.db-detail .detail-html .support-row .skill-name,
.preview-root .support-row .skill-name {
  padding-bottom: 1px !important;
}
.detail-html .sec.sec-with-lvstage { margin-top: 0 !important; }
.detail-html .dl-name { margin-bottom: 0 !important; }
.detail-html .sec { margin-top: 5px !important; }


.detail-html .skill-name::before,
.detail-html .dl-sub::before,
.detail-html .skill-desc::before {
  background: linear-gradient(90deg,
    rgba(var(--panel2-rgb), 0.25) 0%,
    rgba(var(--panel2-rgb), 0.22) 45%,
    rgba(var(--panel2-rgb), 0.04) 100%);
}
.right-col .skill-name::before,
.right-col .dl-sub::before,
.right-col .skill-desc::before {
  background: linear-gradient(270deg,
    rgba(var(--panel2-rgb), 0.25) 0%,
    rgba(var(--panel2-rgb), 0.22) 45%,
    rgba(var(--panel2-rgb), 0.04) 100%) !important;
}
.db-back { background: var(--input-bg) !important; }


.db-detail .detail-html .support-row .skill-name,
.preview-root .support-row .skill-name {
  width: fit-content !important;
  margin-left: auto !important;
  margin-top: -0.3em !important; 
  padding-top: 0.3em !important; 
  padding-left: 2.45em !important;
  padding-bottom: 0.3em !important; 
  box-sizing: content-box !important;
}
.detail-html .skill-row:not(.support-row) .skill-name {
  margin-top: -1px !important;
  margin-bottom: -2px !important; 
}
.detail-html .skill-desc {
  margin-top: -3px !important;
  margin-bottom: -3px !important; 
}
.detail-html .dl-sub {
  margin-top: -1px !important;
  margin-bottom: -2px !important; 
  padding-bottom: 2px !important; 
}


.right-col .skill-desc {
  margin-left: auto !important;
  margin-right: 0 !important;
}


@media (max-width: 900px) and (orientation: portrait) {
  .db-detail .skill-desc,
  .right-col .skill-desc {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


@media (max-width: 900px) and (orientation: portrait) {
  .db-detail .skill-desc,
  .right-col .skill-desc {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


.home-banner {
  flex: none;
  position: relative;
  width: min(720px, 100%);
  align-self: center;      
  margin-block: auto;      
  border-radius: 16px;
}
.hb-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;                  
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input-bg);
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
  cursor: grab;
}
.hb-track::-webkit-scrollbar { display: none; }
.hb-track.dragging { cursor: grabbing; }
.hb-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;    
  overflow: hidden;
}
.hb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;        
  pointer-events: none;    
  user-select: none;
  -webkit-user-drag: none;
}

.hb-dots {
  position: absolute;
  left: 0; right: 0; bottom: 9px;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;    
  z-index: 2;
}
.hb-dot {
  width: 8px; height: 8px;
  padding: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.18s, transform 0.18s;
}
.hb-dot.active { background: var(--accent); transform: scale(1.4); }

@media (max-width: 900px) and (orientation: portrait) {
  .home-banner { width: 100%; margin: 14px 0; }
  
  .hb-dots { bottom: 8px; }
}



.home-banner {
  width: min(504px, 100%);   
  margin: 18px auto 0;       
  align-self: auto;
}

.home-panels-wrap { display: block; }
.home-panels { display: block; }
.home-panel { display: block; }
.home-indicators { display: none; }

@media (max-width: 900px) and (orientation: portrait) {
  
  .home-page { overflow-y: hidden; }             
  .home-panels-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .home-panels {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;                                      
  }
  .home-panel {
    flex: 0 0 100%;
    min-width: 0;
    overflow-y: auto;
    padding: 6px 4px 20px;                       
  }
  .home-banner { width: 100%; margin: 4px 0 0; } 
  
  
  .home-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 14px;
    flex: 0 0 auto;
  }
  .home-indicators span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.18s, transform 0.18s;
  }
  .home-indicators span.active { background: var(--accent); transform: scale(1.4); }
}


@media (min-width: 901px), (orientation: landscape) {
  .home-page {
    overflow-y: hidden;                              
    padding-bottom: 0;                               
  }
  .home-panels-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .home-panels {
    display: flex;
    flex-direction: column;                          
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0;
  }
  .home-panel-main { flex: none; }                   
  .home-panel-ann {
    flex: 1 1 auto;                                  
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    
  }
  .home-banner {
    width: min(calc(100vw / 3), 100%);               
    margin: auto;                                    
    align-self: auto;
  }
}
@media (max-width: 900px) and (orientation: portrait) {
  
  .home-panel-ann {
    display: flex;
    flex-direction: column;
  }
  .home-banner {
    margin-block: auto;                              
    margin-inline: 0;
  }
}


@media (min-width: 901px), (orientation: landscape) {
  .home-banner {
    width: min(calc((100% - 28px) / 3), 100%);   
  }
}


@media (min-width: 901px), (orientation: landscape) {
  .home-banner {
    width: min(calc((100% - 28px) / 3), 100%);   
  }
}


.home-banner { opacity: var(--panel-opacity, 0.95); }


@keyframes p59-flip-y {
  from { transform: perspective(420px) rotateY(0deg); }
  to   { transform: perspective(420px) rotateY(360deg); }
}
.tb-p59 { cursor: pointer; }
.tb-p59.p59-flipping { animation: p59-flip-y 0.6s ease-in-out; }


#tab-home.home-banner-off .home-banner { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  #tab-home.home-banner-off .home-panel-ann { display: none; }      
  #tab-home.home-banner-off .home-indicators { display: none; }     
}


@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] #content { padding: 8px 8px 0; }   
  #tab-home.home-page { padding: 0; }                      
  #tab-home .home-panel { padding: 8px 0 8px; }            
  #tab-home .home-indicators { padding: 2px 0 6px; }       
}


@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] #content { padding: 8px 8px 0; }   
  #tab-home.home-page { padding: 0; }                      
  #tab-home .home-panel { padding: 8px 0 8px; }            
  #tab-home .home-indicators { padding: 2px 0 6px; }       
}


.home-swipe-hint { display: none; }   

@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] #content { padding: 8px 15px 0; }        
  #tab-home .home-indicators { display: none !important; }       
  #tab-home.home-page { position: relative; }                    
  .home-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1px;
    top: 50%;
    width: 12px;
    height: 64px;
    color: rgba(158, 166, 178, 0.85);                            
    pointer-events: none;                                        
    z-index: 3;
    animation: home-swipe-hint-x 1.5s ease-in-out infinite;
  }
  .home-swipe-hint svg { display: block; }
  @keyframes home-swipe-hint-x {
    0%, 100% { transform: translate(0, -50%);    opacity: 0.45; }
    50%      { transform: translate(-6px, -50%); opacity: 1; }
  }
  .home-swipe-hint.hidden { display: none; }
  #tab-home.home-banner-off .home-swipe-hint { display: none; }  
}


.home-swipe-hint { display: none; }                          

@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] #content { position: relative; }     
  body[data-tab="home"] .home-swipe-hint {
    display: flex;
    right: 2px;                                              
  }
}


.home-swipe-hint { display: none; }                          

@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] #content { position: relative; }     
  body[data-tab="home"] .home-swipe-hint {
    display: flex;
    right: 2px;                                              
  }
}


body[data-tab="home"] .home-swipe-hint.hidden { display: none; }


body[data-tab="home"] .home-swipe-hint.hidden { display: none; }


.home-swipe-hint-left { display: none; }   

@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] .home-swipe-hint-left {
    display: flex;
    left: 2px;
    right: auto;                                                     
    animation: home-swipe-hint-left-x 1.5s ease-in-out infinite;     
  }
  @keyframes home-swipe-hint-left-x {
    0%, 100% { transform: translate(0, -50%);   opacity: 0.45; }
    50%      { transform: translate(6px, -50%); opacity: 1; }
  }
  body[data-tab="home"] .home-swipe-hint-left.hidden { display: none; }
}


.home-swipe-hint-left { display: none; }   

@media (max-width: 900px) and (orientation: portrait) {
  body[data-tab="home"] .home-swipe-hint-left {
    display: flex;
    left: 2px;
    right: auto;                                                     
    animation: home-swipe-hint-left-x 1.5s ease-in-out infinite;     
  }
  @keyframes home-swipe-hint-left-x {
    0%, 100% { transform: translate(0, -50%);   opacity: 0.45; }
    50%      { transform: translate(6px, -50%); opacity: 1; }
  }
  body[data-tab="home"] .home-swipe-hint-left.hidden { display: none; }
}


.announce-bar {
  position: absolute;
  top: 100%;                       
  right: 10px;                     
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(72vw, 520px);
  padding: 5px 6px 5px 11px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.announce-bar:hover { border-color: var(--accent); }
.ab-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-close {
  flex: none;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--sub);
  font-size: 12px; line-height: 1;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.ab-close:hover { background: rgba(var(--panel2-rgb), 1); color: var(--text); }


.announce-body { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.65; }


.announce-restore { margin-left: auto; margin-right: 8px; flex: none; }

@media (max-width: 900px) and (orientation: portrait) {
  .announce-bar { right: 8px; max-width: calc(100vw - 16px); font-size: 12px; }
}


.announce-stack {
  position: absolute;
  top: 100%;                        
  right: 10px;
  z-index: 60;
  width: min(72vw, 460px);
  touch-action: none;               
  cursor: ns-resize;                
}
.announce-page {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 0 11px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: rgba(var(--panel-rgb), var(--panel-opacity, 0.95));
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--text);
  user-select: none;
  cursor: pointer;
  will-change: transform;
  transition: transform 240ms ease, opacity 240ms ease, border-color 0.16s;
}
.announce-stack.dragging .announce-page { transition: none; }   
.announce-page.is-current:hover { border-color: var(--accent); }

.announce-head { justify-content: flex-end; padding: 6px 12px 0; min-height: 26px; }
.announce-head .modal-close { position: static; }

@media (max-width: 900px) and (orientation: portrait) {
  .announce-stack { right: 8px; width: calc(100vw - 16px); }
}


.announce-page:not(.is-current) .ab-text,
.announce-page:not(.is-current) .ab-close { visibility: hidden; }


.announce-page:not(.is-current) .ab-text,
.announce-page:not(.is-current) .ab-close { visibility: hidden; }


.announce-stack { width: auto; }        
.announce-page {
  left: 0;
  right: auto;
  width: max-content;                   
  max-width: min(72vw, 460px);
}


.announce-page { left: 0; right: 0; width: auto; }


.announce-page { left: 0; right: 0; width: auto; }


.modal.announce-modal {
  background-color: rgba(var(--panel2-rgb), var(--panel-opacity, 0.95));
  backdrop-filter: blur(var(--glass-blur, 0px));
}
.modal.announce-modal .modal-head,
.modal.announce-modal .modal-body { background-color: transparent; }
.announce-modal .modal-body { padding: 15px 17px 16px; }


.announce-page {
  background-color: rgba(var(--panel-rgb), 0.5);           
  backdrop-filter: blur(var(--glass-blur, 0px));          
}
.modal.announce-modal {
  background-color: rgba(var(--panel2-rgb), 0.5);         
  backdrop-filter: blur(var(--glass-blur, 0px));          
}


.announce-page {
  background-color: rgba(var(--panel-rgb), 0.5);           
  backdrop-filter: blur(var(--glass-blur, 0px));          
}
.modal.announce-modal {
  background-color: rgba(var(--panel2-rgb), 0.5);         
  backdrop-filter: blur(var(--glass-blur, 0px));          
}
