/* =========================================================
   Mochi UI v2, web preview of the Roblox library.
   Every effect here has a Roblox equivalent:
   corners = UICorner, borders = UIStroke, gradients = UIGradient,
   glows and the mascot = ImageLabels, motion = TweenService.
   No backdrop blur and no masks, since Roblox GUIs can't do either.
   State classes all start with "is-" so they never collide with element classes.
   ========================================================= */

:root {
  --fh: "Fredoka", "Nunito", system-ui, sans-serif;
  --fb: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --soft: cubic-bezier(0.3, 1.25, 0.5, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* ---------- Themes, named after mochi flavours ---------- */
html[data-mochi-theme="Mochi"] {
  --bg: #15111e; --panel: #1a1525; --el: #1f1a2c; --el-top: #251f34; --el-hover: #2a2339; --el-active: #342b48;
  --input: #120e1a; --stroke: rgba(255, 255, 255, 0.06); --stroke-strong: rgba(255, 255, 255, 0.11); --hi: rgba(255, 255, 255, 0.05);
  --text: #f7f1ff; --sub: #aca3c4; --faint: #6f6788;
  --acc1: #ff8fcf; --acc2: #a78bfa; --on-acc: #1a1029; --knob: #fff6fb; --leaf: #6ee7c8; --glow: #ff8fcf;
  --inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow: 0 40px 100px -30px rgba(8, 4, 20, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
  --ok: #5fd3a0; --warn: #f5c15a; --bad: #ff6b86; --info: #8fb8ff;
}
html[data-mochi-theme="Sakura"] {
  --bg: #fff7fa; --panel: #ffeef5; --el: #ffffff; --el-top: #ffffff; --el-hover: #fff5f9; --el-active: #ffe2ef;
  --input: #fff2f7; --stroke: rgba(214, 90, 150, 0.12); --stroke-strong: rgba(214, 90, 150, 0.22); --hi: rgba(255, 255, 255, 0.9);
  --text: #3b2333; --sub: #8a6578; --faint: #b996a9;
  --acc1: #f0609f; --acc2: #f78fc0; --on-acc: #ffffff; --knob: #ffffff; --leaf: #6fbf7f; --glow: #ff9fca;
  --inset: inset 0 1px 3px rgba(150, 60, 100, 0.14);
  --shadow: 0 40px 100px -34px rgba(150, 50, 100, 0.5), 0 0 0 1px rgba(214, 90, 150, 0.08);
  --ok: #1f9d6b; --warn: #c98a0b; --bad: #d6334f; --info: #3d74d6;
}
html[data-mochi-theme="Matcha"] {
  --bg: #121813; --panel: #161e17; --el: #1a231c; --el-top: #1f2a21; --el-hover: #233026; --el-active: #2c3b2e;
  --input: #0d120e; --stroke: rgba(210, 255, 210, 0.06); --stroke-strong: rgba(210, 255, 210, 0.11); --hi: rgba(230, 255, 230, 0.045);
  --text: #eef6ea; --sub: #9db39a; --faint: #62775f;
  --acc1: #a6dd9c; --acc2: #e3f0a0; --on-acc: #13200f; --knob: #f7fbef; --leaf: #a6dd9c; --glow: #a6dd9c;
  --inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow: 0 40px 100px -30px rgba(0, 10, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
  --ok: #7fe0a8; --warn: #f0cf6a; --bad: #ff7d8f; --info: #9cc4ff;
}
html[data-mochi-theme="Ube"] {
  --bg: #170e25; --panel: #1c122d; --el: #22163a; --el-top: #281a43; --el-hover: #2d1f4a; --el-active: #382757;
  --input: #120a1e; --stroke: rgba(210, 180, 255, 0.07); --stroke-strong: rgba(210, 180, 255, 0.13); --hi: rgba(230, 210, 255, 0.05);
  --text: #f3ecff; --sub: #b3a3cf; --faint: #776992;
  --acc1: #d4b3ff; --acc2: #9b7bff; --on-acc: #170b28; --knob: #f8f2ff; --leaf: #d4b3ff; --glow: #9b7bff;
  --inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow: 0 40px 100px -30px rgba(10, 0, 30, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
  --ok: #6fe0b0; --warn: #f5c76a; --bad: #ff7b96; --info: #9fbfff;
}
html[data-mochi-theme="Hojicha"] {
  --bg: #1a1411; --panel: #1f1814; --el: #241c17; --el-top: #2a211b; --el-hover: #2e241e; --el-active: #3a2e25;
  --input: #130e0b; --stroke: rgba(255, 220, 190, 0.06); --stroke-strong: rgba(255, 220, 190, 0.11); --hi: rgba(255, 235, 215, 0.05);
  --text: #f8eee6; --sub: #bba796; --faint: #7d6b5e;
  --acc1: #f0b07c; --acc2: #f8d9a8; --on-acc: #2a1a0f; --knob: #fff7ee; --leaf: #9bc48a; --glow: #f0b07c;
  --inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow: 0 40px 100px -30px rgba(15, 5, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.3);
  --ok: #8fd6a0; --warn: #f5c86a; --bad: #ff8a80; --info: #a5c3ff;
}
html[data-mochi-theme="Yuzu"] {
  --bg: #fffbef; --panel: #fff4d8; --el: #ffffff; --el-top: #ffffff; --el-hover: #fffaeb; --el-active: #ffeec0;
  --input: #fff8e6; --stroke: rgba(200, 150, 30, 0.15); --stroke-strong: rgba(200, 150, 30, 0.27); --hi: rgba(255, 255, 255, 0.9);
  --text: #3a2f12; --sub: #85744a; --faint: #b5a67c;
  --acc1: #f5b324; --acc2: #ffd66b; --on-acc: #3a2a00; --knob: #ffffff; --leaf: #8cc46a; --glow: #ffd66b;
  --inset: inset 0 1px 3px rgba(150, 110, 0, 0.14);
  --shadow: 0 40px 100px -34px rgba(150, 110, 0, 0.45), 0 0 0 1px rgba(200, 150, 30, 0.1);
  --ok: #1f9d6b; --warn: #b87700; --bad: #d6334f; --info: #3d74d6;
}
html[data-mochi-theme] {
  --grad: linear-gradient(135deg, var(--acc1), var(--acc2));
  --ring: color-mix(in srgb, var(--acc1) 30%, transparent);
  --acc-soft: color-mix(in srgb, var(--acc1) 15%, transparent);
}
html.is-theming .mw, html.is-theming .mw *, html.is-theming .mn, html.is-theming .mochi-float {
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, fill 0.35s !important;
}

/* ---------- Shared ---------- */
.ic { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.ic svg { width: 100%; height: 100%; stroke-width: 2.1; }

.mascot { width: 30px; height: 27px; flex: none; overflow: visible; }
.mascot .m-body { fill: var(--knob); stroke: rgba(0, 0, 0, 0.12); stroke-width: 1; }
html[data-mochi-theme="Sakura"] .mascot .m-body, html[data-mochi-theme="Yuzu"] .mascot .m-body { stroke: color-mix(in srgb, var(--acc1) 40%, transparent); stroke-width: 1.6; }
.mascot .m-leaf { fill: var(--leaf); }
.mascot .m-eye { fill: #2b1b2b; }
.mascot .m-line { fill: none; stroke: #2b1b2b; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mascot .m-fill { fill: #7a2b4a; }
.mascot .m-blush { fill: #ff8fbf; opacity: 0.75; }
.mascot .m-drop { fill: #8fd0ff; }

.checker {
  background-color: #fff;
  background-image: conic-gradient(#d9d3e3 25%, transparent 0 50%, #d9d3e3 0 75%, transparent 0);
  background-size: 8px 8px;
}

/* ---------- Window ---------- */
.mw {
  --side-w: 184px;
  position: absolute;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--stroke-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  font-family: var(--fb);
  transform-origin: 50% 0;
  transition: grid-template-columns 0.4s var(--soft), opacity 0.25s, transform 0.5s var(--soft);
  -webkit-font-smoothing: antialiased;
}
.mw * { box-sizing: border-box; }
.mw button, .mw input { font-family: inherit; }
/* Soft accent glow in the corner (an ImageLabel in Roblox) */
.mw::before {
  content: ""; position: absolute; z-index: -1;
  right: -140px; top: -190px; width: 520px; height: 380px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.17; pointer-events: none;
}
.mw.is-collapsed { --side-w: 62px; }
.mw.is-entering { animation: plop 0.7s var(--ease); }
@keyframes plop {
  0% { opacity: 0; transform: translateY(24px) scale(0.7, 0.55); }
  45% { opacity: 1; transform: translateY(-4px) scale(1.04, 0.97); }
  70% { transform: translateY(0) scale(0.99, 1.01); }
  100% { transform: none; }
}
.mw.is-min { opacity: 0; transform: translateY(-30px) scale(0.5, 0.3); pointer-events: none; }
.mw.is-transparent { background: color-mix(in srgb, var(--bg) 80%, transparent); }
.mw.is-transparent .mw-side { background: color-mix(in srgb, var(--panel) 70%, transparent); }

/* Sidebar */
.mw-side {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 10px 8px 8px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--hi);
  overflow: hidden;
}
.mw-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 4px 14px 5px;
  cursor: grab; user-select: none; touch-action: none;
  white-space: nowrap;
}
.mw-brand .mascot { width: 38px; height: 34px; animation: bob 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 50% { transform: translateY(-1.5px) scale(1.04, 0.96); } }
.mw-brand-text { min-width: 0; }
.mw-brand-name { font: 600 17px var(--fh); line-height: 1.05; }
.mw-brand-sub {
  display: inline-block; margin-top: 4px; padding: 1px 7px;
  border-radius: 99px;
  background: var(--acc-soft); color: var(--acc1);
  font-size: 10.5px; font-weight: 800;
}

.mw-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; display: flex; flex-direction: column; gap: 2px; }
.mw-nav-bottom { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.mw-nav-bottom:empty { display: none; }
.mw-nav-label {
  padding: 12px 10px 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap;
}
.mw-nav-label:first-child { padding-top: 2px; }
.mw-pill {
  position: absolute; left: 8px; right: 8px; top: 0; z-index: 0;
  height: 40px; border-radius: 12px;
  background: linear-gradient(90deg, var(--acc-soft), color-mix(in srgb, var(--acc2) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--acc1) 22%, transparent);
  transition: transform 0.5s var(--soft), opacity 0.2s;
  pointer-events: none;
}
.mw-pill.is-hidden { opacity: 0; }
.mw-tab {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  height: 40px; flex: none;
  padding: 0 7px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--sub);
  font-size: 13.5px; font-weight: 700;
  text-align: left; white-space: nowrap; cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.mw-tab:hover:not(.is-active) { background: color-mix(in srgb, var(--el-hover) 75%, transparent); color: var(--text); }
.mw-tab.is-active { color: var(--text); }
.mw-tab-ic {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  transition: background 0.25s, color 0.25s, transform 0.45s var(--spring), box-shadow 0.25s;
}
.mw-tab-ic .ic { width: 16px; height: 16px; }
/* Active tab: the icon swaps to its filled version in white. The label keeps the normal text colour. */
/* Slightly deeper gradient per theme so a white icon stays readable on light accents */
html[data-mochi-theme] { --chip: var(--grad); }
html[data-mochi-theme="Matcha"] { --chip: linear-gradient(135deg, #5aa85e, #8fbf55); }
html[data-mochi-theme="Ube"] { --chip: linear-gradient(135deg, #b088ff, #7c5cff); }
html[data-mochi-theme="Hojicha"] { --chip: linear-gradient(135deg, #c97d48, #dba066); }
html[data-mochi-theme="Yuzu"] { --chip: linear-gradient(135deg, #e3960c, #f2b52e); }
.mw-tab.is-active .mw-tab-ic { background: var(--chip); color: #fff; transform: rotate(-7deg); box-shadow: 0 6px 14px -6px var(--acc1); }
/* Active icons swap to their filled twin.
   Sidebar tab: white on the deeper gradient chip.
   Inside the pages (toggles that are on, primary buttons): style 2, an accent-coloured
   filled icon on a soft accent chip. The card itself stays the same. */
.ic.is-fill { display: none; }
.mw-tab.is-active .mw-tab-ic .ic:not(.is-fill),
.el-toggle.is-on > .el-ic .ic:not(.is-fill),
.el-primary > .el-ic .ic:not(.is-fill) { display: none; }
.mw-tab.is-active .mw-tab-ic .is-fill,
.el-toggle.is-on > .el-ic .is-fill,
.el-primary > .el-ic .is-fill { display: grid; animation: iconPop 0.4s var(--spring); }
.mw-tab.is-active .mw-tab-ic .is-fill { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.28)); }
@keyframes iconPop { 40% { transform: scale(1.22); } }
/* Small check marks on the soft accent */
.is-multi .dd-item.is-sel .dd-check, .th-check { background: color-mix(in srgb, var(--acc1) 26%, var(--bg)) !important; color: var(--acc1) !important; border-color: color-mix(in srgb, var(--acc1) 50%, transparent) !important; }
.th-check { border: 1.5px solid; }
.mw-tab-lbl { overflow: hidden; text-overflow: ellipsis; }

.mw-user {
  display: flex; align-items: center; gap: 9px;
  margin-top: 8px; padding: 7px;
  border-radius: 13px;
  background: var(--el);
  border: 1px solid var(--stroke);
  white-space: nowrap;
}
.mw-avatar {
  position: relative; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: var(--on-acc);
  font: 600 14px var(--fh);
}
.mw-avatar::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--el);
}
.mw-user-text { min-width: 0; }
.mw-user-name { font-size: 12.5px; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.mw-user-sub { font-size: 11px; font-weight: 700; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.mw-user-sub b { color: var(--acc1); font-weight: 800; }

.mw.is-collapsed .mw-brand-text, .mw.is-collapsed .mw-tab-lbl, .mw.is-collapsed .mw-user-text { display: none; }
.mw.is-collapsed .mw-brand { padding-left: 0; padding-right: 0; justify-content: center; }
.mw.is-collapsed .mw-tab { justify-content: center; padding: 0; }
.mw.is-collapsed .mw-user { justify-content: center; padding: 6px 0; background: none; border-color: transparent; }
.mw.is-collapsed .mw-nav-label { font-size: 0; padding: 8px 10px; }
.mw.is-collapsed .mw-nav-label::after { content: ""; display: block; height: 1px; background: var(--stroke-strong); }

/* Main column */
.mw-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mw-top {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0 10px 2px;
  cursor: grab; user-select: none; touch-action: none;
}
.mw-icon-btn, .mw-ctrls button {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--sub);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.mw-icon-btn:hover, .mw-ctrls button:hover { background: var(--el-hover); color: var(--text); }
.mw-icon-btn:active, .mw-ctrls button:active { transform: scale(0.92); }
.mw-ctrls button.is-close:hover { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.mw-icon-btn .ic, .mw-ctrls .ic { width: 15px; height: 15px; }
.mw-head { flex: 1; min-width: 0; padding-left: 2px; }
.mw-head.is-swap { animation: headIn 0.35s var(--ease); }
@keyframes headIn { from { opacity: 0; transform: translateY(6px); } }
.mw-tabtitle { margin: 0; font: 600 21px var(--fh); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-tabdesc { margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-tabdesc:empty { display: none; }
.mw-search {
  display: flex; align-items: center; gap: 7px;
  width: 168px; height: 34px; flex: none;
  padding: 0 8px 0 10px;
  border-radius: 11px;
  background: var(--input);
  border: 1px solid var(--stroke-strong);
  color: var(--faint);
  cursor: text;
  transition: width 0.35s var(--soft), border-color 0.15s, box-shadow 0.15s;
}
.mw-search:focus-within { width: 220px; border-color: var(--acc1); box-shadow: 0 0 0 3px var(--ring); color: var(--acc1); }
.mw-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 12.5px; font-weight: 700; }
.mw-search input::placeholder { color: var(--faint); }
.mw-search-x { display: none; width: 18px; height: 18px; border: 0; border-radius: 6px; background: var(--el-active); color: var(--sub); place-items: center; cursor: pointer; padding: 0; }
.mw-search-x .ic { width: 11px; height: 11px; }
.mw-search.has-text .mw-search-x { display: grid; }
.mw-ctrls { display: flex; gap: 2px; padding: 2px; border-radius: 12px; background: var(--input); border: 1px solid var(--stroke); }
.mw-ctrls button { width: 28px; height: 28px; }

.mw-pages { position: relative; flex: 1; min-height: 0; }
.mw-page {
  position: absolute; inset: 0;
  display: none;
  overflow-y: auto; overflow-x: hidden;
  padding: 2px 6px 16px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--el-active) transparent;
}
.mw-page.is-active { display: block; }
.mw-page.is-enter { animation: pageIn 0.38s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } }
.mw-page > * + * { margin-top: 7px; }
.mw-page > .mw-section { margin-top: 20px; }
.mw-page > .mw-section:first-child { margin-top: 4px; }
.mw-page > .mw-section + * { margin-top: 0; }

.mw-section {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 9px; padding: 0 4px;
  font: 600 13.5px var(--fh);
  color: var(--sub);
  white-space: nowrap;
}
.mw-section::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--grad); transform: rotate(45deg); }
.mw-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--stroke-strong), transparent); }
.mw-group { display: flex; flex-direction: column; gap: 7px; }

/* ---------- Elements ---------- */
.el {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 10px 14px 10px 12px;
  background: linear-gradient(180deg, var(--el-top), var(--el));
  border: 1px solid var(--stroke);
  border-radius: 15px;
  box-shadow: inset 0 1px 0 var(--hi);
  transition: border-color 0.2s, transform 0.25s var(--spring);
}
.el:not(.el-para):not(.el-block):hover { border-color: var(--stroke-strong); background: linear-gradient(180deg, var(--el-hover), var(--el)); }
.el-click, .el-toggle { cursor: pointer; user-select: none; }
.el-click:active, .el-toggle:active { transform: scale(0.985); }
.el-ic {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--acc-soft); color: var(--acc1);
  transition: transform 0.4s var(--spring), background 0.25s, color 0.25s;
}
.el-ic .ic { width: 17px; height: 17px; }
/* Style 2: only the icon chip changes. Soft accent chip, filled icon in the accent colour. */
.el-toggle.is-on .el-ic, .el-primary .el-ic { background: color-mix(in srgb, var(--acc1) 24%, transparent); color: var(--acc1); transform: rotate(-6deg); }
/* Primary buttons also get a faint accent border so they stand apart from plain buttons */
.el-primary { border-color: color-mix(in srgb, var(--acc1) 32%, transparent) !important; }
.el-text { flex: 1; min-width: 0; }
.el-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 800; line-height: 1.25; }
.el-desc { margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--sub); }
.el-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 99px;
  background: var(--grad); color: var(--on-acc);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.el-badge.is-lock { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.el-badge .ic { width: 10px; height: 10px; }
.el-badge .ic svg { stroke-width: 2.8; }
.el-chev { color: var(--faint); transition: transform 0.3s var(--spring), color 0.2s; }
.el-click:hover .el-chev { color: var(--acc1); transform: translateX(3px); }
.el.is-locked { cursor: not-allowed; }
.el.is-locked > :not(.el-text):not(.el-ic) { opacity: 0.35; pointer-events: none; }
.el.is-locked .el-ic { filter: grayscale(1); opacity: 0.6; }
.el.is-shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.el.is-flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 55% { border-color: var(--acc1); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 4px var(--ring); } }

/* Primary button */
/* Primary buttons share the style 2 chip; see .el-toggle.is-on above */
.el-primary .el-chev, .el-primary:hover .el-chev { color: var(--acc1); }
.el-primary:hover { border-color: var(--acc1) !important; }

/* Paragraph / callout */
.el-para { align-items: flex-start; background: color-mix(in srgb, var(--el) 55%, transparent); }
.el-para .el-desc { margin-top: 3px; }
.el-para[data-type] { --c: var(--info); background: color-mix(in srgb, var(--c) 9%, var(--el)); border-color: color-mix(in srgb, var(--c) 28%, transparent); }
.el-para[data-type="success"] { --c: var(--ok); }
.el-para[data-type="warning"] { --c: var(--warn); }
.el-para[data-type="error"] { --c: var(--bad); }
.el-para[data-type] .el-ic { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); width: 30px; height: 30px; border-radius: 10px; }

/* Banner */
.mw-banner {
  position: relative; overflow: hidden;
  min-height: 118px;
  padding: 18px 130px 18px 20px;
  border-radius: 18px;
  background: var(--grad);
  color: var(--on-acc);
  box-shadow: 0 16px 34px -20px var(--acc1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mw-banner::before, .mw-banner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.16); pointer-events: none; }
.mw-banner::before { width: 180px; height: 180px; right: -40px; top: -70px; }
.mw-banner::after { width: 90px; height: 90px; right: 120px; bottom: -50px; }
.mw-banner-title { position: relative; font: 600 21px var(--fh); line-height: 1.15; }
.mw-banner-text { position: relative; margin-top: 4px; max-width: 360px; font-size: 12.5px; font-weight: 700; line-height: 1.45; opacity: 0.82; }
.mw-banner-btns { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mw-banner-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, 0.92); color: #2b1b2b;
  font-size: 12px; font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s var(--spring), background 0.15s;
}
.mw-banner-btn.is-ghost { background: rgba(255, 255, 255, 0.22); color: inherit; }
.mw-banner-btn:hover { transform: translateY(-2px); }
.mw-banner-btn:active { transform: scale(0.95); }
.mw-banner-btn .ic { width: 14px; height: 14px; }
.mw-banner .mascot {
  position: absolute; right: 18px; bottom: -6px;
  width: 112px; height: 100px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.18));
  animation: bannerBob 3.6s ease-in-out infinite;
}
@keyframes bannerBob { 50% { transform: rotate(-5deg) translateY(-4px) scale(1.03, 0.97); } }

/* Stats */
.mw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 7px; }
.mw-stat {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--el-top), var(--el));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--hi);
  min-width: 0;
}
.mw-stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 54px; height: 54px; border-radius: 50%; background: var(--acc-soft); pointer-events: none; }
.mw-stat-k { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.mw-stat-k .ic { width: 13px; height: 13px; color: var(--acc1); }
.mw-stat-v { font: 600 18px var(--fh); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform-origin: left; }
.mw-stat-v.is-bump { animation: bump 0.45s var(--spring); }
@keyframes bump { 40% { transform: translateY(-2px) scale(1.06); color: var(--acc1); } }

/* Toggle: the knob is a tiny mochi. Asleep when off, awake and blushing when on. */
.tg {
  position: relative; flex: none;
  width: 48px; height: 28px;
  border-radius: 99px;
  background: var(--input);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--inset);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.is-on > .tg { background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px -8px var(--acc1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.tg-knob {
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50% 50% 46% 46% / 56% 56% 44% 44%;
  background: var(--knob);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: left 0.42s var(--soft);
}
.is-on > .tg .tg-knob { left: 22px; }
.tg.is-squish .tg-knob { animation: squish 0.42s var(--ease); }
@keyframes squish { 35% { transform: scale(1.32, 0.76); } 70% { transform: scale(0.94, 1.06); } }
.tg-eye { position: absolute; top: 9px; width: 4px; height: 1.6px; border-radius: 2px; background: #2b1b2b; transition: height 0.2s, top 0.2s, border-radius 0.2s, width 0.2s; }
.tg-eye.l { left: 5px; } .tg-eye.r { right: 5px; }
.is-on > .tg .tg-eye { top: 7.5px; width: 3.6px; height: 4px; border-radius: 50%; }
.tg-blush { position: absolute; top: 12px; width: 4.5px; height: 2.4px; border-radius: 50%; background: #ff86b8; opacity: 0; transition: opacity 0.25s; }
.tg-blush.l { left: 1.5px; } .tg-blush.r { right: 1.5px; }
.is-on > .tg .tg-blush { opacity: 0.95; }

/* Slider */
.el-slider { flex-wrap: wrap; row-gap: 12px; }
.sl-val {
  width: 76px; height: 28px; flex: none;
  border-radius: 9px;
  border: 1px solid var(--stroke-strong);
  background: var(--input); color: var(--text);
  font-size: 12px; font-weight: 800; text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sl-val:focus { border-color: var(--acc1); box-shadow: 0 0 0 3px var(--ring); }
.sl-track {
  position: relative; flex-basis: 100%;
  height: 8px; margin: 0 4px 6px;
  border-radius: 9px;
  background: var(--input);
  box-shadow: var(--inset);
  cursor: pointer; touch-action: none;
}
.sl-track::before { content: ""; position: absolute; inset: -10px 0; }
.sl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--grad); }
.sl-knob {
  position: absolute; top: 50%;
  width: 24px; height: 21px;
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background:
    radial-gradient(circle at 34% 54%, #2b1b2b 1.4px, transparent 1.8px),
    radial-gradient(circle at 66% 54%, #2b1b2b 1.4px, transparent 1.8px),
    radial-gradient(ellipse 3px 1.8px at 22% 70%, #ff9fc8, transparent),
    radial-gradient(ellipse 3px 1.8px at 78% 70%, #ff9fc8, transparent),
    var(--knob);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px var(--ring), 0 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--spring);
}
.el-slider.is-drag .sl-knob { transform: translate(-50%, -50%) scale(1.2, 0.86); }
.sl-bubble {
  position: absolute; bottom: 20px;
  padding: 3px 8px; border-radius: 8px;
  background: var(--text); color: var(--bg);
  font-size: 11px; font-weight: 800; white-space: nowrap;
  transform: translateX(-50%) translateY(6px) scale(0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s, transform 0.3s var(--spring);
}
.el-slider.is-drag .sl-bubble { opacity: 1; transform: translateX(-50%); }

/* Segmented control */
.seg {
  position: relative; flex: none;
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--input);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--inset);
}
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 0;
  border-radius: 9px;
  background: var(--grad);
  box-shadow: 0 4px 12px -6px var(--acc1);
  transition: transform 0.45s var(--soft), width 0.45s var(--soft);
}
.seg button {
  position: relative; z-index: 1;
  height: 28px; padding: 0 13px;
  border: 0; background: none;
  color: var(--sub);
  font-size: 12px; font-weight: 800;
  cursor: pointer;
  transition: color 0.25s;
}
.seg button:hover { color: var(--text); }
.seg button.is-active { color: var(--on-acc); }

/* Dropdown */
.dd-box {
  display: flex; align-items: center; gap: 6px;
  min-width: 132px; max-width: 190px; height: 34px; flex: none;
  padding: 0 9px 0 11px;
  border-radius: 11px;
  border: 1px solid var(--stroke-strong);
  background: var(--input); color: var(--text);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dd-box:hover, .dd-box.is-open { border-color: color-mix(in srgb, var(--acc1) 60%, transparent); }
.dd-box.is-open { box-shadow: 0 0 0 3px var(--ring); }
.dd-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.dd-box.is-empty .dd-text { color: var(--faint); }
.dd-more { padding: 1px 6px; border-radius: 99px; background: var(--grad); color: var(--on-acc); font-size: 10.5px; font-weight: 800; }
.dd-box .ic { color: var(--sub); transition: transform 0.35s var(--spring); }
.dd-box.is-open .ic { transform: rotate(180deg); color: var(--acc1); }

.mw-pop {
  position: absolute; z-index: 20;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 15px;
  box-shadow: 0 22px 50px -14px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--hi);
  animation: popIn 0.3s var(--soft);
  transform-origin: top right;
}
.mw-pop.is-up { transform-origin: bottom right; }
@keyframes popIn { from { opacity: 0; transform: scale(0.9) translateY(-6px); } }
.dd-search {
  display: flex; align-items: center; gap: 7px;
  height: 32px; margin-bottom: 6px; padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--input); color: var(--faint);
}
.dd-search:focus-within { border-color: var(--acc1); color: var(--acc1); }
.dd-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 12.5px; font-weight: 700; }
.dd-search input::placeholder { color: var(--faint); }
.dd-list { display: flex; flex-direction: column; gap: 1px; max-height: 204px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--el-active) transparent; }
.dd-item {
  display: flex; align-items: center; gap: 9px;
  height: 32px; flex: none;
  padding: 0 9px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--sub);
  font-size: 12.5px; font-weight: 700;
  text-align: left; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.dd-item:hover { background: var(--el-hover); color: var(--text); }
.dd-item.is-sel { background: var(--acc-soft); color: var(--text); }
.dd-check { width: 17px; height: 17px; flex: none; display: grid; place-items: center; color: var(--acc1); opacity: 0; transition: opacity 0.15s, background 0.15s; }
.dd-check .ic { width: 12px; height: 12px; }
.dd-check .ic svg { stroke-width: 3.2; }
.dd-item.is-sel .dd-check { opacity: 1; }
.is-multi .dd-check { opacity: 1; border: 1.5px solid var(--stroke-strong); border-radius: 6px; color: transparent; }
.is-multi .dd-item.is-sel .dd-check { background: var(--grad); border-color: transparent; color: var(--on-acc); animation: tick 0.3s var(--spring); }
@keyframes tick { 40% { transform: scale(1.25); } }
.dd-empty { padding: 12px; font-size: 12px; font-weight: 700; color: var(--faint); text-align: center; }
.dd-foot { display: flex; justify-content: space-between; margin-top: 6px; padding: 6px 4px 0; border-top: 1px solid var(--stroke); }
.dd-foot button { border: 0; background: none; color: var(--sub); font-size: 11.5px; font-weight: 800; cursor: pointer; padding: 4px 6px; border-radius: 7px; }
.dd-foot button:hover { color: var(--acc1); background: var(--acc-soft); }

/* Input */
.mw-field {
  display: flex; align-items: center; gap: 6px;
  width: 184px; height: 34px; flex: none;
  padding: 0 8px 0 11px;
  border-radius: 11px;
  border: 1px solid var(--stroke-strong);
  background: var(--input);
  box-shadow: var(--inset);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mw-field:focus-within { border-color: var(--acc1); box-shadow: 0 0 0 3px var(--ring); }
.mw-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 12.5px; font-weight: 700; }
.mw-field input::placeholder { color: var(--faint); }
.mw-field-x { display: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 6px; background: var(--el-active); color: var(--sub); place-items: center; cursor: pointer; }
.mw-field-x .ic { width: 11px; height: 11px; }
.mw-field.has-text .mw-field-x { display: grid; }

/* Keybind keycap */
.kb-wrap { display: flex; align-items: center; gap: 8px; flex: none; }
.kb-mode { padding: 2px 7px; border-radius: 99px; background: var(--input); border: 1px solid var(--stroke); font-size: 10.5px; font-weight: 800; color: var(--sub); }
.kb {
  min-width: 34px; height: 30px;
  padding: 0 11px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(180deg, var(--el-top), var(--input));
  box-shadow: 0 3px 0 var(--stroke-strong), inset 0 1px 0 var(--hi);
  font-size: 12px; font-weight: 800;
  transform: translateY(-2px);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.15s, color 0.15s;
}
.kb.is-listen { border-color: var(--acc1); color: var(--acc1); animation: blink 1s ease-in-out infinite; }
.kb.is-down { transform: none; box-shadow: 0 0 0 var(--stroke-strong); border-color: var(--acc1); color: var(--acc1); }
@keyframes blink { 50% { opacity: 0.45; } }

/* Color swatch */
.cp-swatch { position: relative; flex: none; width: 34px; height: 34px; border-radius: 11px; border: 2px solid var(--stroke-strong); overflow: hidden; transition: transform 0.3s var(--spring); }
.el-color:hover .cp-swatch { transform: rotate(-8deg) scale(1.06); }
.cp-swatch::after { content: ""; position: absolute; inset: 0; background: var(--c); opacity: var(--a, 1); }

/* Theme picker */
.el-block { flex-direction: column; align-items: stretch; }
.th-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.th-card {
  position: relative;
  padding: 6px 6px 8px;
  border-radius: 13px;
  border: 2px solid var(--stroke);
  background: var(--input);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.3s var(--spring);
}
.th-card:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.th-card.is-active { border-color: var(--acc1); }
.th-mini { display: flex; gap: 4px; height: 54px; padding: 4px; border-radius: 9px; background: var(--tb); }
.th-mini-side { width: 28%; border-radius: 6px; background: var(--tp); padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; }
.th-mini-side i { height: 5px; border-radius: 3px; background: var(--tt); opacity: 0.25; }
.th-mini-side i:first-child { background: var(--ta); opacity: 1; }
.th-mini-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.th-mini-body i { height: 12px; border-radius: 4px; background: var(--te); display: flex; justify-content: flex-end; align-items: center; padding-right: 3px; }
.th-mini-body i b { width: 12px; height: 7px; border-radius: 9px; background: var(--ta); }
.th-name { margin-top: 6px; font-size: 12px; font-weight: 800; }
.th-check { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--on-acc); transform: scale(0); transition: transform 0.35s var(--spring); }
.th-check .ic { width: 11px; height: 11px; }
.th-check .ic svg { stroke-width: 3.4; }
.th-card.is-active .th-check { transform: scale(1); }

/* Search results */
.sr {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--stroke); border-radius: 13px;
  background: linear-gradient(180deg, var(--el-top), var(--el));
  color: var(--text);
  text-align: left; cursor: pointer;
  transition: border-color 0.15s, transform 0.25s var(--spring);
}
.sr:hover { border-color: var(--acc1); transform: translateX(3px); }
.sr .el-ic { width: 30px; height: 30px; border-radius: 10px; }
.sr-title { font-size: 13px; font-weight: 800; }
.sr-title mark { background: none; color: var(--acc1); }
.sr-crumb { font-size: 11.5px; font-weight: 700; color: var(--faint); }
.sr-type { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: var(--input); border: 1px solid var(--stroke); font-size: 10.5px; font-weight: 800; color: var(--sub); }
.sr-empty { display: grid; place-items: center; gap: 4px; padding: 40px 0; text-align: center; color: var(--sub); font-size: 12.5px; font-weight: 700; }
.sr-empty .mascot { width: 64px; height: 58px; margin-bottom: 6px; }
.sr-empty b { color: var(--text); font: 600 16px var(--fh); }

/* ---------- Overlay, dialogs, color picker ---------- */
.mw-overlay {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center;
  background: rgba(10, 6, 18, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.mw-overlay.is-show { opacity: 1; pointer-events: auto; }
html[data-mochi-theme="Sakura"] .mw-overlay, html[data-mochi-theme="Yuzu"] .mw-overlay { background: color-mix(in srgb, var(--acc1) 14%, rgba(255, 255, 255, 0.55)); }
.dlg {
  width: min(340px, calc(100% - 32px));
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 var(--hi);
  transform: translateY(16px) scale(0.9);
  transition: transform 0.45s var(--soft);
}
.mw-overlay.is-show .dlg { transform: none; }
.dlg-center { text-align: center; }
.dlg-center .mascot { width: 62px; height: 56px; margin: -2px auto 6px; display: block; animation: bob 2.6s ease-in-out infinite; }
.dlg-title { font: 600 19px var(--fh); }
.dlg-content { margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--sub); }
.dlg-btns { display: flex; gap: 8px; margin-top: 18px; }
.dlg-btn {
  flex: 1; height: 38px;
  border-radius: 12px;
  border: 1px solid var(--stroke-strong);
  background: var(--el); color: var(--text);
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, filter 0.15s, transform 0.25s var(--spring);
}
.dlg-btn:hover { background: var(--el-hover); transform: translateY(-1px); }
.dlg-btn:active { transform: scale(0.96); }
.dlg-btn.is-primary { background: var(--grad); color: var(--on-acc); border-color: transparent; box-shadow: 0 8px 20px -10px var(--acc1); }
.dlg-btn.is-primary:hover { filter: brightness(1.06); }
.dlg-btn.is-danger { background: var(--bad); color: #fff; border-color: transparent; }

.cp-sv { position: relative; height: 150px; margin-top: 14px; border-radius: 12px; background: hsl(var(--h), 100%, 50%); cursor: crosshair; touch-action: none; }
.cp-sv::before, .cp-sv::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cp-sv::before { background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.cp-sv::after { background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0)); }
.cp-sv-dot { position: absolute; z-index: 1; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3); transform: translate(-50%, -50%); pointer-events: none; }
.cp-bar { position: relative; height: 12px; margin-top: 12px; border-radius: 99px; cursor: pointer; touch-action: none; }
.cp-hue { background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cp-alpha-grad { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c), transparent); }
.cp-bar-dot { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; background: var(--dot, transparent); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3); transform: translate(-50%, -50%); pointer-events: none; }
.cp-presets { display: flex; gap: 6px; margin-top: 14px; }
.cp-preset { flex: 1; aspect-ratio: 1; max-width: 28px; border-radius: 9px; border: 2px solid var(--stroke-strong); cursor: pointer; padding: 0; transition: transform 0.3s var(--spring); }
.cp-preset:hover { transform: translateY(-2px) rotate(-6deg); }
.cp-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cp-prev { display: flex; width: 56px; height: 32px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke-strong); }
.cp-prev span { flex: 1; }
.cp-hex { flex: 1; display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--stroke-strong); background: var(--input); color: var(--faint); font-size: 12.5px; font-weight: 800; }
.cp-hex:focus-within { border-color: var(--acc1); }
.cp-hex input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 800 12.5px var(--fb); text-transform: uppercase; }
.cp-alpha-num { width: 58px; flex: none; }
.cp-alpha-num input { text-align: center; }

/* Intro splash */
.mw-intro {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-content: center; justify-items: center;
  background: var(--bg);
  border-radius: inherit;
  transition: opacity 0.4s, transform 0.4s;
}
.mw-intro::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, var(--glow), transparent 55%); opacity: 0.18; }
.mw-intro.is-done { opacity: 0; pointer-events: none; }
.mw-intro .mascot { position: relative; width: 92px; height: 83px; animation: drop 1s var(--ease) both, bob 1.6s 1s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes drop {
  0% { transform: translateY(-160px) scale(0.9, 1.1); opacity: 0; }
  45% { transform: translateY(0) scale(1.25, 0.72); opacity: 1; }
  65% { transform: translateY(-14px) scale(0.92, 1.08); }
  85% { transform: translateY(0) scale(1.05, 0.95); }
  100% { transform: none; }
}
.mw-intro-shadow { width: 64px; height: 8px; margin-top: 2px; border-radius: 50%; background: rgba(0, 0, 0, 0.25); animation: shadowIn 1s var(--ease) both; }
@keyframes shadowIn { 0% { transform: scale(0.3); opacity: 0; } 45% { transform: scale(1.2); opacity: 1; } }
.mw-intro-title { position: relative; margin-top: 14px; font: 600 24px var(--fh); animation: rise 0.5s 0.45s var(--ease) both; }
.mw-intro-sub { position: relative; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--sub); animation: rise 0.5s 0.55s var(--ease) both; }
.mw-intro-bar { position: relative; width: 170px; height: 6px; margin-top: 14px; border-radius: 9px; background: var(--input); overflow: hidden; animation: rise 0.5s 0.6s var(--ease) both; }
.mw-intro-bar div { height: 100%; width: 0; border-radius: inherit; background: var(--grad); animation: load 1.3s 0.6s var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes load { to { width: 100%; } }

/* Resize grip */
.mw-resize { position: absolute; right: 0; bottom: 0; z-index: 5; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.mw-resize::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 6px; height: 6px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); border-bottom-right-radius: 3px; opacity: 0.5; }

/* ---------- Notifications ---------- */
.mn-stack {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  width: min(320px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  font-family: var(--fb);
}
.mn {
  --c: var(--acc1);
  position: relative; flex: none;
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  padding: 12px 10px 15px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--stroke-strong);
  border-radius: 17px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0; transform: translateX(110%) scale(0.9);
  transition: transform 0.55s var(--soft), opacity 0.3s, height 0.35s var(--ease), margin 0.35s var(--ease), padding 0.35s var(--ease);
  -webkit-font-smoothing: antialiased;
}
.mn.is-in { opacity: 1; transform: none; }
.mn-success { --c: var(--ok); } .mn-warning { --c: var(--warn); } .mn-error { --c: var(--bad); }
.mn-face { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); }
.mn-face .mascot { width: 28px; height: 25px; }
.mn-body { min-width: 0; padding-top: 1px; }
.mn-title { font: 600 14.5px var(--fh); line-height: 1.2; }
.mn-content { margin-top: 2px; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.mn-sub { margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--sub); }
.mn-x { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.mn-x:hover { background: var(--el-hover); color: var(--text); }
.mn-x .ic { width: 13px; height: 13px; }
.mn-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--c) 15%, transparent); }
.mn-fill { height: 100%; background: var(--c); transform-origin: left; animation: mnbar linear forwards; }
.mn.is-paused .mn-fill { animation-play-state: paused; }
@keyframes mnbar { to { transform: scaleX(0); } }

/* ---------- Floating open button ---------- */
.mochi-float {
  position: fixed; z-index: 90;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 19px;
  border: 1px solid var(--stroke-strong);
  background: var(--bg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  cursor: pointer; touch-action: none;
  opacity: 0; pointer-events: none;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.5s var(--spring);
}
.mochi-float::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.8; }
.mochi-float.is-show { opacity: 1; pointer-events: auto; transform: none; }
.mochi-float .mascot { width: 36px; height: 32px; }
.mochi-float:hover .mascot { animation: bob 0.7s ease-in-out infinite; }

/* =========================================================
   v3: matches the Roblox library as of December 2026.
   Everything below overrides the rules above:
   - Montserrat text (the "Mochi" font set), with a Font picker in Settings
   - corners about half as round
   - no accent glows: focus rings, glow under toggles, tab chips, buttons and the banner
   - a small dark shadow behind the window instead of the big tinted one
   - nothing jumps: no press scaling, icon pop, knob squish, stat bump or overshoot
   - the mascots sway instead of bobbing
   - Background picker (Plain by default) instead of the corner glow
   ========================================================= */

/* ---------- Fonts ---------- */
html[data-mochi-font="Mochi"] { --fh: "Montserrat", system-ui, sans-serif; --fb: "Montserrat", system-ui, sans-serif; }
html[data-mochi-font="Ubuntu"] { --fh: "Ubuntu", system-ui, sans-serif; --fb: "Ubuntu", system-ui, sans-serif; }
html[data-mochi-font="Roboto"] { --fh: "Roboto", system-ui, sans-serif; --fb: "Roboto", system-ui, sans-serif; }
html[data-mochi-font="Classic"] { --fh: "Fredoka", "Nunito", system-ui, sans-serif; --fb: "Nunito", system-ui, sans-serif; }
/* Montserrat runs wide: a touch smaller and tighter so rows keep their layout */
html[data-mochi-font="Mochi"] .mw, html[data-mochi-font="Mochi"] .mn-stack { letter-spacing: -0.01em; }
html[data-mochi-font="Mochi"] .mw-tabtitle, html[data-mochi-font="Mochi"] .mw-banner-title { font-weight: 700; font-size: 19px; }
html[data-mochi-font="Mochi"] .mw-brand-name { font-weight: 700; font-size: 15.5px; }
html[data-mochi-font="Mochi"] .mw-section, html[data-mochi-font="Mochi"] .mw-stat-v,
html[data-mochi-font="Mochi"] .mn-title, html[data-mochi-font="Mochi"] .dlg-title { font-weight: 700; }
html[data-mochi-font="Mochi"] .el-title { font-size: 13px; font-weight: 700; }
html[data-mochi-font="Mochi"] .el-desc { font-size: 11.5px; font-weight: 500; }
html[data-mochi-font="Mochi"] .mw-tab { font-size: 13px; font-weight: 600; }

/* ---------- Shadow: small, plain black, 4px down ---------- */
html[data-mochi-theme] { --shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.3); }
html[data-mochi-theme="Sakura"], html[data-mochi-theme="Yuzu"] { --shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06); }

/* ---------- Corners ---------- */
.mw { border-radius: 12px; }
.mw-side { border-radius: 9px; }
.mw-pill, .mw-tab { border-radius: 7px; }
.mw-tab-ic { border-radius: 5px; }
.mw-user { border-radius: 7px; }
.mw-icon-btn, .mw-ctrls button { border-radius: 5px; }
.mw-search { border-radius: 6px; }
.mw-ctrls { border-radius: 7px; }
.el { border-radius: 8px; }
.el-ic { border-radius: 6px; }
.el-para[data-type] .el-ic { border-radius: 6px; }
.mw-banner { border-radius: 10px; }
.mw-stat { border-radius: 8px; }
.sl-val { border-radius: 5px; }
.seg { border-radius: 7px; }
.seg-pill { border-radius: 5px; }
.dd-box { border-radius: 6px; }
.mw-pop { border-radius: 8px; }
.dd-search { border-radius: 6px; }
.dd-item { border-radius: 5px; }
.mw-field { border-radius: 6px; }
.kb { border-radius: 5px; }
.cp-swatch { border-radius: 6px; }
.th-card { border-radius: 7px; }
.th-mini { border-radius: 5px; }
.sr { border-radius: 7px; }
.sr .el-ic { border-radius: 6px; }
.dlg { border-radius: 11px; }
.dlg-btn { border-radius: 7px; }
.cp-sv { border-radius: 7px; }
.cp-prev, .cp-hex { border-radius: 6px; }
.mn { border-radius: 9px; }
.mn-face { border-radius: 7px; }
.mn-x { border-radius: 4px; }
.mochi-float { border-radius: 10px; }

/* ---------- No glows ---------- */
.mw::before { display: none; }
.mw-tab.is-active .mw-tab-ic { box-shadow: none; }
.is-on > .tg { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.seg-pill { box-shadow: none; }
.mw-banner { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.dlg-btn.is-primary { box-shadow: none; }
.mw-pop { box-shadow: inset 0 1px 0 var(--hi); }
.mochi-float { box-shadow: none; }
.mochi-float::after { display: none; }
/* Fields, dropdowns and search: hover and focus only make the grey border stronger */
html[data-mochi-theme] { --border-hot: color-mix(in srgb, var(--text) 22%, transparent); }
.mw-search { border-color: var(--stroke); }
.mw-search:focus-within { border-color: var(--stroke-strong); box-shadow: none; color: var(--sub); }
.sl-val:focus, .mw-field:focus-within { border-color: var(--border-hot); box-shadow: none; }
.dd-box:hover, .dd-box.is-open { border-color: var(--border-hot); box-shadow: none; }
.dd-box.is-open .ic { color: var(--text); }
.dd-search:focus-within, .cp-hex:focus-within { border-color: var(--border-hot); color: var(--sub); }
/* The search jump flashes the border only */
.el.is-flash { animation: flashBorder 1.6s var(--ease); }
@keyframes flashBorder { 0%, 55% { border-color: var(--acc1); } }

/* ---------- Nothing jumps ---------- */
.el-click:active, .el-toggle:active { transform: none; }
.el { transition: border-color 0.2s; }
.mw-tab.is-active .mw-tab-ic .is-fill,
.el-toggle.is-on > .el-ic .is-fill,
.el-primary > .el-ic .is-fill { animation: none; }
.mw-tab-ic, .el-ic { transition: background 0.25s, color 0.25s, transform 0.3s var(--ease); }
.tg.is-squish .tg-knob { animation: none; }
.tg-knob { transition: left 0.3s var(--ease); }
.mw-stat-v.is-bump { animation: tint 0.45s var(--ease); }
@keyframes tint { 40% { color: var(--acc1); } }

/* ---------- Mascots sway (rotation stays smooth in Roblox, unlike a 1px bob) ---------- */
@keyframes bob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes bannerBob { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(-3deg); } }
.mw-banner .mascot { filter: none; }

/* ---------- Scrollbar: content keeps 10px clear of it ---------- */
.mw-page { padding-right: 10px; }
.dd-list { padding-right: 6px; }

/* ---------- Backgrounds (Window:SetBackground) ---------- */
html[data-mochi-theme] { --bgk: 1; --grid-line: color-mix(in srgb, var(--text) 7%, transparent); }
html[data-mochi-theme="Sakura"], html[data-mochi-theme="Yuzu"] { --bgk: 1.4; --grid-line: color-mix(in srgb, var(--acc1) 16%, transparent); }
.mw[data-bg]::before {
  content: ""; display: block; position: absolute; inset: 0; z-index: -1;
  width: auto; height: auto; right: 0; top: 0;
  border-radius: inherit; opacity: 1; pointer-events: none;
}
.mw[data-bg="Plain"]::before { display: none; }
.mw[data-bg="Soft"]::before {
  background: linear-gradient(45deg, transparent 45%, color-mix(in srgb, var(--glow) calc(14% * var(--bgk)), transparent));
}
.mw[data-bg="Duo"]::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc1) calc(12% * var(--bgk)), transparent), transparent 50%, color-mix(in srgb, var(--acc2) calc(12% * var(--bgk)), transparent));
}
.mw[data-bg="Grid"]::before {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 26px 26px;
  -webkit-mask-image: linear-gradient(45deg, transparent 35%, #000);
  mask-image: linear-gradient(45deg, transparent 35%, #000);
}
.mw[data-bg="Grid"]::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(45deg, transparent 40%, color-mix(in srgb, var(--glow) calc(12% * var(--bgk)), transparent));
}
.mw[data-bg="Ribbons"]::before {
  background:
    linear-gradient(112deg, transparent 36%, color-mix(in srgb, var(--acc1) calc(17% * var(--bgk)), transparent) 43%, transparent 51%),
    linear-gradient(112deg, transparent 51%, color-mix(in srgb, var(--acc2) calc(15% * var(--bgk)), transparent) 56%, transparent 61%),
    linear-gradient(112deg, transparent 61%, color-mix(in srgb, var(--glow) calc(13% * var(--bgk)), transparent) 64.5%, transparent 68%);
}
.mw[data-bg="Sparkles"]::before {
  --dot: color-mix(in srgb, var(--text) calc(28% * var(--bgk)), transparent);
  --dot2: color-mix(in srgb, var(--acc1) calc(45% * var(--bgk)), transparent);
  background:
    radial-gradient(circle at 88% 9%, var(--dot2) 1.6px, transparent 2.2px),
    radial-gradient(circle at 72% 22%, var(--dot) 1.2px, transparent 1.8px),
    radial-gradient(circle at 95% 34%, var(--dot) 1.4px, transparent 2px),
    radial-gradient(circle at 63% 7%, var(--dot) 1px, transparent 1.6px),
    radial-gradient(circle at 81% 41%, var(--dot2) 1.2px, transparent 1.8px),
    radial-gradient(circle at 54% 30%, var(--dot) 1px, transparent 1.6px),
    radial-gradient(circle at 92% 62%, var(--dot) 1.2px, transparent 1.8px),
    radial-gradient(circle at 70% 55%, var(--dot) 1px, transparent 1.6px),
    radial-gradient(circle at 86% 80%, var(--dot2) 1.4px, transparent 2px),
    radial-gradient(circle at 60% 74%, var(--dot) 1px, transparent 1.6px),
    radial-gradient(circle at 77% 92%, var(--dot) 1.2px, transparent 1.8px),
    radial-gradient(circle at 47% 12%, var(--dot2) 1px, transparent 1.6px),
    linear-gradient(45deg, transparent 45%, color-mix(in srgb, var(--glow) calc(8% * var(--bgk)), transparent));
}
