:root {
  color-scheme: light;
  --ink: #18323a;
  --muted: #5d7480;
  --paper: #f3f8fa;
  --panel: #ffffff;
  --line: #d5e6ea;
  --teal: #008c91;
  --teal-dark: #075f67;
  --navy: #10252c;
  --amber: #f4b536;
  --gold: #ffd966;
  --rose: #d64d67;
  --violet: #7a55d9;
  --sky: #55b9e8;
  --rare: #4d82d8;
  --epic: #8c55cd;
  --unique: #d7952e;
  --accent-primary: #8a5200;
  --accent-primary-strong: #6f4200;
  --accent-primary-soft: #fff4d6;
  --accent-brand: #ff5a1f;
  --accent-info: #075f67;
  --surface-nav: #ffffff;
  --surface-panel: #ffffff;
  --surface-panel-raised:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98)),
    var(--surface-panel);
  --surface-field: #fbfefe;
  --surface-chip: #ffffff;
  --surface-chip-hover: #fff8ef;
  --surface-chip-active: #fff1cf;
  --border-soft: #d5e6ea;
  --shadow: 0 18px 45px rgba(16, 49, 58, 0.18);
  --shadow-raised: 0 16px 34px rgba(16, 49, 58, 0.12);
  --app-bg-top: #10252c;
  --app-bg-mid: #163840;
  --nav-bg: var(--surface-nav);
  --nav-border: #e9eef1;
  --nav-link: #111820;
  --nav-link-muted: #424d54;
  --nav-accent: var(--accent-primary);
  --field-bg: var(--surface-field);
  --field-soft: #f7fcfc;
  --chip-bg: var(--surface-chip);
  --chip-hover: var(--surface-chip-hover);
  --chip-active-bg: var(--surface-chip-active);
  --chip-border: #e1e8eb;
  --subnav-bg: rgba(255, 255, 255, 0.72);
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --nav-shell-bg: rgba(255, 255, 255, 0.74);
  --nav-shell-border: rgba(213, 230, 234, 0.82);
  --nav-link-hover-bg: rgba(11, 112, 120, 0.08);
  --nav-link-active-bg: linear-gradient(180deg, #ffd872, #f4b536);
  --nav-link-active-ink: #241703;
  --nav-shell-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 28px rgba(16, 49, 58, 0.08);
}

html[data-initial-view="catalog"] .hero-panel,
html[data-initial-view="chaosSim"] .hero-panel,
html[data-initial-view]:not([data-initial-view="home"]) #home,
html[data-initial-view]:not([data-initial-view="simulator"]) #simulator,
html[data-initial-view]:not([data-initial-view="simulator"]) #rates {
  display: none !important;
}

html[data-initial-view]:not([data-initial-view="simulator"]) .cube-tabs {
  display: none !important;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf6f8;
  --muted: #9fb2bb;
  --paper: #0f171c;
  --panel: #151f25;
  --line: #2b3d46;
  --teal: #16b2b8;
  --teal-dark: #78e6ec;
  --navy: #090f13;
  --amber: #f4b536;
  --accent-primary: #f4b536;
  --accent-primary-strong: #ffd166;
  --accent-primary-soft: #2a2110;
  --accent-brand: #ff7a38;
  --accent-info: #78e6ec;
  --surface-nav: #0c1217;
  --surface-panel: #151f25;
  --surface-panel-raised:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 44%),
    var(--surface-panel);
  --surface-field: #101920;
  --surface-chip: #131e25;
  --surface-chip-hover: #1b2a33;
  --surface-chip-active: #2a2110;
  --border-soft: #2b3d46;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  --shadow-raised: 0 18px 42px rgba(0, 0, 0, 0.34);
  --app-bg-top: #080d11;
  --app-bg-mid: #101b22;
  --nav-bg: var(--surface-nav);
  --nav-border: #202d35;
  --nav-link: #edf6f8;
  --nav-link-muted: #a8b7bf;
  --nav-accent: var(--accent-primary);
  --field-bg: var(--surface-field);
  --field-soft: #142129;
  --chip-bg: var(--surface-chip);
  --chip-hover: var(--surface-chip-hover);
  --chip-active-bg: var(--surface-chip-active);
  --chip-border: #2d404a;
  --subnav-bg: rgba(12, 18, 23, 0.72);
  --nav-shell-bg: rgba(255, 255, 255, 0.055);
  --nav-shell-border: rgba(255, 255, 255, 0.08);
  --nav-link-hover-bg: rgba(255, 255, 255, 0.075);
  --nav-link-active-bg: linear-gradient(180deg, #ffd872, #f4b536);
  --nav-link-active-ink: #241703;
  --nav-shell-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 30px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    linear-gradient(180deg, var(--app-bg-top) 0, var(--app-bg-mid) 280px, var(--paper) 280px, var(--paper) 100%);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"],
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

.topbar {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(24px, 1fr) minmax(0, 1100px) minmax(24px, 1fr);
  grid-template-rows: 58px 56px;
  align-items: center;
  gap: 0;
  min-height: 114px;
  padding: 0;
  color: var(--nav-link);
  border-bottom: 1px solid var(--nav-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0)),
    var(--nav-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.topbar::after {
  content: "";
  position: absolute;
  top: 58px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--nav-border);
}

.brand {
  display: inline-grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: 30px max-content;
  align-items: center;
  justify-self: start;
  gap: 8px;
  color: var(--nav-link);
  text-decoration: none;
}

.brand-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  filter: none;
}

.brand-logo-mark {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 10px rgba(76, 230, 211, 0.18));
}

.home-v2-tool-icon,
.home-v2-tool-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
}

.home-v2-tool-icon img {
  display: block;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.brand-orbit {
  display: none;
}

.brand-cube {
  position: relative;
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.16));
}

.brand-copy strong {
  display: block;
  color: var(--nav-link);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-copy small {
  display: none;
}

.topnav {
  display: flex;
  align-items: center;
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
  justify-self: start;
  gap: 34px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.topnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--nav-link-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease;
}

.topnav a::after {
  content: "";
  display: block;
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 0;
  background: var(--nav-accent);
  opacity: 0;
  transform: scaleX(0.52);
  transform-origin: center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.topnav a:hover {
  color: var(--nav-link);
  background: transparent;
}

.topnav a.is-active {
  color: var(--nav-link);
  background: transparent;
  box-shadow: none;
}

.topnav a.is-active::after,
.topnav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.topnav a[aria-disabled="true"] {
  color: #9aa5aa;
}

.group-subnav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0;
  padding: 0 24px;
  border: 0;
  border-bottom: 1px solid var(--nav-border);
  border-radius: 0;
  background: color-mix(in srgb, var(--nav-bg) 88%, transparent);
  box-shadow: none;
  backdrop-filter: none;
}

.group-subnav-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--nav-shell-border);
  border-radius: 0;
  background: transparent;
  color: var(--nav-link-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.group-subnav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  width: min(100%, 1100px);
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.group-subnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nav-link-muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease;
}

.group-subnav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--nav-accent);
  opacity: 0;
  transform: scaleX(0.55);
  transform-origin: center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.group-subnav a.is-active {
  background: transparent;
  color: var(--nav-link);
  box-shadow: none;
}

.group-subnav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.group-subnav a:not(.is-active):hover {
  background: transparent;
  color: var(--nav-link);
}

.group-subnav a:not(.is-active):hover::after {
  opacity: 0.65;
  transform: scaleX(1);
}

.topnav a:focus-visible {
  outline: 3px solid #ffd75d;
  outline-offset: 2px;
}

.group-subnav a:focus-visible {
  outline: 3px solid #087783;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(255, 215, 93, 0.5);
}

.view-ranking .group-subnav,
.view-notice .group-subnav {
  display: none !important;
}

.auth-area {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  justify-self: end;
  gap: 6px;
  flex: 0 0 auto;
}

.theme-toggle-button,
.top-notice-button,
.discord-login-button,
.auth-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  color: var(--nav-link);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.theme-toggle-button,
.top-notice-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    var(--field-soft);
}

.theme-toggle-icon {
  display: none;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.theme-toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="dark"] .theme-toggle-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle-moon {
  display: block;
}

.top-notice-wrap {
  position: relative;
  display: inline-flex;
}

.top-notice-button {
  position: relative;
}

.top-notice-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-notice-button.has-updates {
  border-color: rgba(255, 122, 56, 0.72);
  color: var(--nav-accent);
}

.top-notice-badge {
  position: absolute;
  right: -5px;
  top: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--nav-bg);
  border-radius: 999px;
  background: #ff5a1f;
  color: #ffffff;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}

.top-notice-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: min(360px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(10, 20, 26, 0.24);
}

.top-notice-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--nav-border);
  border-top: 1px solid var(--nav-border);
  background: var(--panel);
  transform: rotate(45deg);
}

.top-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.top-notice-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.top-notice-head span {
  color: var(--nav-accent);
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.top-notice-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.top-notice-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field-soft);
}

.top-notice-item.is-new {
  border-color: rgba(255, 122, 56, 0.52);
  background: var(--chip-active-bg);
}

.top-notice-item span {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 1000;
}

.top-notice-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-notice-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.top-notice-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.top-notice-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--nav-link);
  font-size: 12px;
  font-weight: 1000;
  text-decoration: none;
}

.top-notice-more:hover,
.top-notice-more:focus {
  border-color: var(--nav-accent);
  background: var(--chip-hover);
  color: var(--nav-accent);
}

.discord-login-button {
  gap: 7px;
  padding: 0 11px;
  background: var(--nav-bg);
  box-shadow: none;
}

.theme-toggle-button:hover,
.theme-toggle-button:focus,
.top-notice-button:hover,
.top-notice-button:focus,
.discord-login-button:hover,
.discord-login-button:focus {
  border-color: var(--nav-accent);
  color: var(--nav-accent);
  background: var(--chip-hover);
}

.discord-login-button.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.discord-mark,
.auth-label {
  letter-spacing: 0;
}

.auth-label {
  display: inline-block;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.auth-avatar {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--field-soft) center / cover no-repeat;
}

.auth-area.is-signed-in .discord-mark {
  display: none;
}

.auth-logout-button {
  padding: 0 9px;
  background: var(--field-soft);
}

.auth-logout-button:hover,
.auth-logout-button:focus {
  border-color: var(--nav-accent);
  color: var(--nav-accent);
  background: var(--chip-hover);
}

:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .cube-stage,
:root[data-theme="dark"] .control-panel,
:root[data-theme="dark"] .rate-card,
:root[data-theme="dark"] .option-card,
:root[data-theme="dark"] .luck-card,
:root[data-theme="dark"] .mastery-card,
:root[data-theme="dark"] .scroll-card,
:root[data-theme="dark"] .scrollwork-card,
:root[data-theme="dark"] .maker-card,
:root[data-theme="dark"] .maker-side-card,
:root[data-theme="dark"] .zakum-card,
:root[data-theme="dark"] .boss-drop-card,
:root[data-theme="dark"] .ranking-card,
:root[data-theme="dark"] .notice-card,
:root[data-theme="dark"] .support-card,
:root[data-theme="dark"] .donate-card,
:root[data-theme="dark"] .challenge-card,
:root[data-theme="dark"] .challenge-panel,
:root[data-theme="dark"] .efficiency-card,
:root[data-theme="dark"] .stat-card {
  border-color: var(--border-soft);
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

:root[data-theme="dark"] .hero-panel {
  background:
    radial-gradient(circle at 0 0, rgba(244, 181, 54, 0.16), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(22, 178, 184, 0.14), transparent 30%),
    var(--surface-panel-raised);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .target-fieldset,
:root[data-theme="dark"] .maker-field-grid label,
:root[data-theme="dark"] .maker-gem-slot,
:root[data-theme="dark"] .maker-scroll-panel,
:root[data-theme="dark"] .scrollwork-filter-panel,
:root[data-theme="dark"] .scrollwork-scroll-option,
:root[data-theme="dark"] .scrollwork-item-card,
:root[data-theme="dark"] .boss-drop-pool-row,
:root[data-theme="dark"] .zakum-input-grid fieldset,
:root[data-theme="dark"] .zakum-member-row,
:root[data-theme="dark"] .feature-request-list li,
:root[data-theme="dark"] .notice-list button,
:root[data-theme="dark"] .ranking-row,
:root[data-theme="dark"] .stat-upload-card,
:root[data-theme="dark"] .stat-form-card {
  border-color: var(--line);
  background: var(--field-bg);
  color: var(--ink);
}

:root[data-theme="dark"] .secondary.light,
:root[data-theme="dark"] .quick-actions button,
:root[data-theme="dark"] .ghost,
:root[data-theme="dark"] .compact-select,
:root[data-theme="dark"] .cube-tab,
:root[data-theme="dark"] .catalog-equipment-part-grid button,
:root[data-theme="dark"] .scrollwork-part-grid button,
:root[data-theme="dark"] .scrollwork-chip-row button {
  border-color: var(--line);
  background: var(--field-soft);
  color: var(--ink);
}

:root[data-theme="dark"] .secondary.light:hover,
:root[data-theme="dark"] .quick-actions button:hover,
:root[data-theme="dark"] .ghost:hover {
  border-color: var(--nav-accent);
  color: var(--nav-accent);
  background: var(--chip-hover);
}

:root[data-theme="dark"] .expected-value,
:root[data-theme="dark"] .meso-badge,
:root[data-theme="dark"] .attempt-badge,
:root[data-theme="dark"] .rankings-status,
:root[data-theme="dark"] .boss-drop-stat-grid div,
:root[data-theme="dark"] .zakum-fee-grid div,
:root[data-theme="dark"] .condition-strip span {
  border-color: #54421c;
  background: #221d12;
  color: #ffd98a;
}

:root[data-theme="dark"] .cube-stage .expected-value,
:root[data-theme="dark"] .cube-stage .attempt-badge {
  border: 1px solid rgba(92, 225, 222, 0.32);
  background:
    linear-gradient(180deg, rgba(32, 184, 186, 0.16), rgba(18, 46, 53, 0.28)),
    #111f25;
  color: #dffcff;
  box-shadow: inset 0 1px 0 rgba(223, 252, 255, 0.05);
}

:root[data-theme="dark"] .cube-stage .attempt-badge span {
  color: #92cbd0;
}

:root[data-theme="dark"] .cube-stage .attempt-badge strong {
  color: #f3feff;
}

:root[data-theme="dark"] .cube-stage .meso-badge,
:root[data-theme="dark"] .cube-stage .expected-value {
  border-color: rgba(255, 199, 87, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 194, 71, 0.16), rgba(45, 34, 14, 0.4)),
    #181711;
  color: #ffe7a6;
}

:root[data-theme="dark"] .cube-stage .meso-badge span {
  color: #c9a866;
}

:root[data-theme="dark"] .cube-stage .meso-badge strong,
:root[data-theme="dark"] .cube-stage .expected-value {
  color: #fff1bf;
}

:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .hero-kicker,
:root[data-theme="dark"] .mini-head span {
  color: #7ae6ec;
}

:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .hero-panel p,
:root[data-theme="dark"] .scrollwork-item-meta,
:root[data-theme="dark"] .maker-select-copy p,
:root[data-theme="dark"] .notice-list p,
:root[data-theme="dark"] .feature-request-list p {
  color: var(--muted);
}

:root[data-theme="dark"] .toast {
  border-color: var(--line);
  background: #17222a;
  color: var(--ink);
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 217, 102, 0.72);
  border-radius: 8px;
  color: #fff8d5;
  background: rgba(15, 45, 52, 0.72);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.presence-pill span,
.presence-pill em {
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.presence-pill strong {
  color: var(--gold);
  font-size: 19px;
  line-height: 1;
}

.presence-pill.is-error {
  border-color: rgba(214, 77, 103, 0.7);
  color: #ffdce3;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  width: min(100% - 28px, 1240px);
  margin: 18px auto 28px;
  padding: 12px 14px;
  border-top: 1px solid rgba(47, 96, 104, 0.18);
  color: #4f6872;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer-copy {
  color: #526b75;
}

.site-footer-links,
.site-footer-source {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.site-footer-links a + a::before,
.site-footer-source a + span::before {
  content: "";
}

.site-footer-links a:not(:first-child)::before {
  content: "|";
  margin-right: 10px;
  color: rgba(82, 107, 117, 0.65);
}

.site-footer a {
  color: #075f67;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--teal);
  text-decoration: underline;
}

.privacy-card {
  max-width: 920px;
  margin-inline: auto;
}

.privacy-copy {
  display: grid;
  gap: 16px;
  color: #49636f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.privacy-copy p {
  margin: 0;
}

.privacy-copy section {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(119, 153, 169, 0.28);
}

.privacy-copy section:first-of-type {
  padding-top: 4px;
  border-top: 0;
}

.privacy-copy h3 {
  margin: 0;
  color: #163642;
  font-size: 15px;
  font-weight: 950;
}

.privacy-copy ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.privacy-copy li::marker {
  color: var(--teal);
}

.privacy-updated {
  color: #0a7d87;
  font-size: 13px;
  font-weight: 950;
}

.privacy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 112, 123, 0.22);
  border-radius: 7px;
  background: rgba(229, 250, 252, 0.62);
  color: #006f7b;
  font-weight: 950;
  text-decoration: none;
}

.privacy-links a:hover,
.privacy-links a:focus {
  border-color: rgba(0, 112, 123, 0.42);
  background: rgba(210, 246, 250, 0.9);
  color: #004d57;
  text-decoration: none;
}

.privacy-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 12, 18, 0.72);
  backdrop-filter: blur(8px);
}

.privacy-consent-modal {
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(148, 190, 205, 0.42);
  border-radius: 12px;
  background: #fbfeff;
  color: #18323a;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.privacy-consent-head {
  display: grid;
  gap: 4px;
}

.privacy-consent-head span {
  color: #00828c;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.privacy-consent-head strong {
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: 0;
}

.privacy-consent-modal p,
.privacy-consent-modal ul {
  margin: 0;
  color: #48616b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.privacy-consent-modal ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.privacy-consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(0, 112, 123, 0.22);
  border-radius: 8px;
  background: rgba(229, 250, 252, 0.62);
  color: #143842;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.5;
}

.privacy-consent-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #f4b536;
}

.privacy-consent-links a {
  color: #00737d;
  font-size: 13px;
  font-weight: 1000;
}

.privacy-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.privacy-consent-actions button {
  min-height: 40px;
}

.view-efficiency .hero-panel,
.view-catalog .hero-panel,
.view-chaos-sim .hero-panel {
  display: none;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 16px auto 48px;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 156px;
  padding: 28px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, rgba(244, 181, 54, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(0, 140, 145, 0.16), transparent 30%),
    var(--surface-panel-raised);
  color: var(--ink);
  box-shadow: var(--shadow-raised);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 900;
}

.hero-panel h1 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.12;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.cube-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.cube-tab {
  display: grid;
  grid-template-columns: 50px minmax(100px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 184px;
  min-height: 68px;
  padding: 9px 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--chip-bg);
  text-align: left;
}

.cube-tab.is-active {
  border-color: rgba(244, 181, 54, 0.68);
  background: var(--chip-active-bg);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.2);
}

:root[data-theme="dark"] .cube-tab.is-active {
  border-color: rgba(244, 181, 54, 0.68);
  background: var(--chip-active-bg);
  color: var(--ink);
}

.cube-tab strong,
.cube-tab small {
  display: block;
}

.cube-tab small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cube-item-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.25));
}

.cube-item-icon.is-miracle-cube-image {
  width: 56px;
  height: 56px;
  margin: -4px;
}

.home-section {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.home-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

.home-lead h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.home-lead p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.home-search-link {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
  min-height: 64px;
  padding: 13px 16px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-field);
  text-decoration: none;
}

.home-search-link:hover,
.home-search-link:focus-visible {
  border-color: rgba(244, 181, 54, 0.78);
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 181, 54, 0.16);
}

.home-search-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.home-search-link strong {
  font-size: 16px;
  font-weight: 1000;
}

.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-panel);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.home-tool-card:hover,
.home-tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(244, 181, 54, 0.74);
  background: var(--chip-hover);
  outline: none;
}

.home-tool-card.is-featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(244, 181, 54, 0.15), rgba(22, 178, 184, 0.08)),
    var(--surface-panel);
}

.home-tool-icon,
.home-tool-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--surface-field);
}

.home-tool-icon img {
  display: block;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, 0.28));
}

.home-tool-badge {
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 1000;
}

.home-tool-card strong,
.home-tool-card small {
  display: block;
  min-width: 0;
}

.home-tool-card strong {
  font-size: 18px;
  font-weight: 1000;
}

.home-tool-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.view-home main {
  width: min(960px, calc(100% - 32px));
}

.view-home .hero-panel {
  display: none;
}

.view-home .home-section {
  gap: 14px;
  margin-top: 0;
}

.view-home .home-lead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 18px;
  align-items: stretch;
  min-height: 162px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(122, 230, 236, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 36, 43, 0.98), rgba(10, 18, 24, 0.99)),
    #0d171d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 44px rgba(0, 0, 0, 0.22);
}

.view-home .home-lead::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(122, 230, 236, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 230, 236, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 82%);
}

.view-home .home-lead > * {
  position: relative;
  z-index: 1;
}

.view-home .home-lead .eyebrow {
  color: #7ae6ec;
  font-size: 11px;
}

.view-home .home-lead h2 {
  max-width: 520px;
  margin: 8px 0 8px;
  color: #f5fbff;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.06;
}

.view-home .home-lead p {
  max-width: 520px;
  color: #93a8b2;
  font-size: 14px;
}

.view-home .home-search-link {
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 4px 14px;
  min-height: 0;
  width: 100%;
  padding: 18px;
  border-color: rgba(244, 181, 54, 0.4);
  background:
    linear-gradient(135deg, rgba(244, 181, 54, 0.16), rgba(122, 230, 236, 0.055)),
    #111c22;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.view-home .home-search-link::after {
  content: "GO";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f4b536;
  color: #2c1a00;
  font-size: 12px;
  font-weight: 1000;
}

.view-home .home-search-link:hover,
.view-home .home-search-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(244, 181, 54, 0.74);
  background:
    linear-gradient(135deg, rgba(244, 181, 54, 0.22), rgba(122, 230, 236, 0.08)),
    #142128;
}

.view-home .home-search-link span {
  color: #9fb2bb;
  font-size: 12px;
}

.view-home .home-search-link strong {
  color: #f8fdff;
  font-size: 21px;
}

.view-home .home-tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.view-home .home-tool-card {
  position: relative;
  min-height: 96px;
  padding: 14px;
  overflow: hidden;
  border-color: rgba(122, 230, 236, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #0f1b21;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.view-home .home-tool-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  transition: background 0.14s ease;
}

.view-home .home-tool-card:hover,
.view-home .home-tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(122, 230, 236, 0.34);
  background:
    linear-gradient(180deg, rgba(122, 230, 236, 0.075), rgba(255, 255, 255, 0)),
    #13242b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.view-home .home-tool-card:hover::before,
.view-home .home-tool-card:focus-visible::before {
  background: #7ae6ec;
}

.view-home .home-tool-card.is-featured,
.view-home .home-tool-card:nth-child(2) {
  grid-column: span 2;
  min-height: 124px;
  padding: 18px;
  border-color: rgba(244, 181, 54, 0.32);
  background:
    linear-gradient(135deg, rgba(244, 181, 54, 0.13), rgba(122, 230, 236, 0.055)),
    #101d23;
}

.view-home .home-tool-card.is-featured::before,
.view-home .home-tool-card:nth-child(2)::before {
  background: rgba(244, 181, 54, 0.8);
}

.view-home .home-tool-icon,
.view-home .home-tool-badge {
  width: 46px;
  height: 46px;
  border-color: rgba(122, 230, 236, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    #0a151b;
}

.view-home .home-tool-card.is-featured .home-tool-icon,
.view-home .home-tool-card:nth-child(2) .home-tool-icon {
  width: 54px;
  height: 54px;
}

.view-home .home-tool-icon img {
  max-width: 38px;
  max-height: 38px;
}

.view-home .home-tool-card.is-featured .home-tool-icon img,
.view-home .home-tool-card:nth-child(2) .home-tool-icon img {
  max-width: 46px;
  max-height: 46px;
}

.view-home .home-tool-badge {
  color: #f4b536;
  font-size: 12px;
}

.view-home .home-tool-card strong {
  color: #f6fbff;
  font-size: 16px;
}

.view-home .home-tool-card.is-featured strong,
.view-home .home-tool-card:nth-child(2) strong {
  font-size: 20px;
}

.view-home .home-tool-card small {
  display: -webkit-box;
  overflow: hidden;
  color: #8fa6b1;
  font-size: 12px;
  line-height: 1.34;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.view-home .home-v2 {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.view-home .home-v2-command,
.view-home .home-v2-side-card,
.view-home .home-v2-tool-card,
.view-home .home-v2-mini-actions a {
  border: 1px solid rgba(139, 221, 226, 0.13);
  background: #0f1b21;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.view-home .home-v2-command {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(18, 31, 37, 0.98), rgba(9, 17, 22, 0.98)),
    #0b151a;
}

.view-home .home-v2-kicker,
.view-home .home-v2-section-head span,
.view-home .home-v2-side-title span,
.view-home .home-v2-search span {
  color: #66dfe9;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.view-home .home-v2-command h2 {
  margin: 6px 0 5px;
  color: #f4fbff;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 900;
  line-height: 1.08;
}

.view-home .home-v2-command p {
  margin: 0;
  color: #8ea6b1;
  font-size: 13px;
  font-weight: 800;
}

.view-home .home-v2-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  min-height: 64px;
  padding: 13px 14px;
  border: 1px solid rgba(245, 200, 75, 0.34);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(245, 200, 75, 0.095), rgba(62, 214, 197, 0.04)),
    #0b151a;
  color: #f4fbff;
  text-decoration: none;
}

.view-home .home-v2-search strong {
  grid-column: 1;
  color: #f4fbff;
  font-size: 18px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-home .home-v2-search b {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  border-radius: 7px;
  background: #f5c84b;
  color: #241800;
  font-size: 12px;
  font-weight: 1000;
}

.view-home .home-v2-search:hover,
.view-home .home-v2-search:focus-visible,
.view-home .home-v2-mini-actions a:hover,
.view-home .home-v2-mini-actions a:focus-visible {
  border-color: rgba(245, 200, 75, 0.68);
  outline: none;
}

.view-home .home-v2-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.view-home .home-v2-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(139, 221, 226, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #a7bdc6;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.view-home .home-v2-tags a:hover,
.view-home .home-v2-tags a:focus-visible {
  border-color: rgba(102, 223, 233, 0.36);
  color: #eafcff;
  outline: none;
}

.view-home .home-v2-task-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.view-home .home-v2-task-row a {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(139, 221, 226, 0.12);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #0d181e;
  color: #f4fbff;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.028);
}

.view-home .home-v2-task-row a:hover,
.view-home .home-v2-task-row a:focus-visible {
  border-color: rgba(245, 200, 75, 0.42);
  background:
    linear-gradient(180deg, rgba(245, 200, 75, 0.06), rgba(255, 255, 255, 0)),
    #101e24;
  outline: none;
}

.view-home .home-v2-task-row strong {
  color: #f4fbff;
  font-size: 14px;
  font-weight: 1000;
}

.view-home .home-v2-task-row span {
  color: #8da6b1;
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-home .home-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.view-home .home-v2-tools,
.view-home .home-v2-side {
  display: grid;
  gap: 10px;
}

.view-home .home-v2-section-head,
.view-home .home-v2-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.view-home .home-v2-section-head strong,
.view-home .home-v2-side-title strong {
  color: #f4fbff;
  font-size: 15px;
  font-weight: 1000;
}

.view-home .home-v2-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.view-home .home-v2-tool-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border-radius: 9px;
  color: #f4fbff;
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.view-home .home-v2-tool-card:hover,
.view-home .home-v2-tool-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(102, 223, 233, 0.34);
  background: #13252b;
  outline: none;
}

.view-home .home-v2-tool-card.is-primary {
  border-color: rgba(245, 200, 75, 0.3);
}

.view-home .home-v2-tool-icon,
.view-home .home-v2-tool-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(139, 221, 226, 0.13);
  border-radius: 8px;
  background: #0a1419;
}

.view-home .home-v2-tool-icon img {
  display: block;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.24));
}

.view-home .home-v2-tool-badge {
  color: #f5c84b;
  font-size: 11px;
  font-weight: 1000;
}

.view-home .home-v2-tool-card strong {
  display: block;
  min-width: 0;
  color: #f4fbff;
  font-size: 15px;
  font-weight: 1000;
}

.view-home .home-v2-tool-card small {
  display: block;
  min-width: 0;
  margin-top: 3px;
  color: #8da6b1;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-home .home-v2-side-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border-radius: 9px;
}

.view-home .home-v2-side-card a {
  display: block;
  padding: 8px 0;
  border-top: 1px solid rgba(139, 221, 226, 0.09);
  color: #a9bdc6;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.view-home .home-v2-side-card a:hover,
.view-home .home-v2-side-card a:focus-visible {
  color: #f4fbff;
  outline: none;
}

.view-home .home-v2-mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.view-home .home-v2-mini-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  color: #e2f1f5;
  font-size: 12px;
  font-weight: 1000;
  text-decoration: none;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.cube-stage,
.control-panel,
.rate-card,
.option-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

.cube-stage,
.control-panel {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -2px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.section-head.compact h2 {
  font-size: 20px;
}

.expected-value {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 8px 0 0;
  padding: 0 10px;
  border: 1px solid #e7c66d;
  border-radius: 6px;
  background: #fff7dc;
  color: #6a4300;
  font-size: 13px;
  font-weight: 900;
}

.sim-counter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.eyebrow {
  display: block;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.attempt-badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 92px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e8f7f4;
  color: var(--teal-dark);
}

.meso-badge {
  min-width: 178px;
  background: #fff7dc;
  color: #6a4300;
}

.attempt-badge span {
  font-size: 12px;
  font-weight: 800;
}

.attempt-badge strong {
  font-size: 22px;
}

.meso-badge strong {
  font-size: 17px;
  white-space: nowrap;
}

.cube-stage > .section-head .sim-counter-row {
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.cube-stage > .section-head .attempt-badge {
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 76px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.cube-stage > .section-head .attempt-badge + .attempt-badge {
  border-left: 1px solid var(--chip-border);
  border-radius: 0 6px 6px 0;
}

.cube-stage > .section-head .meso-badge {
  min-width: 148px;
}

.cube-stage > .section-head .attempt-badge span {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.cube-stage > .section-head .attempt-badge strong {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
}

.cube-stage > .section-head .meso-badge strong {
  font-size: 15px;
}

:root[data-theme="dark"] .cube-stage > .section-head .sim-counter-row {
  border-color: rgba(133, 178, 190, 0.28);
  background: rgba(10, 25, 31, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .cube-stage > .section-head .attempt-badge,
:root[data-theme="dark"] .cube-stage > .section-head .meso-badge {
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

:root[data-theme="dark"] .cube-stage > .section-head .attempt-badge + .attempt-badge {
  border-left: 1px solid rgba(133, 178, 190, 0.24);
}

:root[data-theme="dark"] .cube-stage > .section-head .attempt-badge span,
:root[data-theme="dark"] .cube-stage > .section-head .meso-badge span {
  color: #8fb5bd;
}

:root[data-theme="dark"] .cube-stage > .section-head .attempt-badge strong,
:root[data-theme="dark"] .cube-stage > .section-head .meso-badge strong {
  color: #f2fbfd;
}

.game-window {
  position: relative;
  overflow: hidden;
  border: 1px solid #2e5960;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    #16313a;
  color: #f5fbff;
}

.game-window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 44%, rgba(255, 255, 255, 0.88) 0 8%, rgba(202, 242, 255, 0.38) 9% 34%, transparent 35%),
    linear-gradient(180deg, rgba(228, 250, 255, 0.34), rgba(86, 178, 229, 0.18));
  opacity: 0;
  pointer-events: none;
}

.game-window.is-upgrading {
  box-shadow:
    0 0 0 2px rgba(198, 240, 255, 0.75),
    0 0 34px rgba(139, 221, 255, 0.44);
}

.game-window.is-upgrading::after {
  animation: cube-window-flash 1.45s steps(6, end) forwards;
}

@keyframes cube-window-flash {
  0% { opacity: 0; }
  14% { opacity: 0.96; }
  34% { opacity: 0.72; }
  56% { opacity: 0.34; }
  100% { opacity: 0; }
}

.upgrade-effect {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 46%, rgba(255, 255, 255, 0.54) 0 14%, rgba(174, 236, 255, 0.32) 15% 38%, transparent 39%),
    linear-gradient(180deg, rgba(217, 248, 255, 0.28), rgba(94, 191, 239, 0.16) 54%, rgba(8, 28, 37, 0.12));
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
}

.upgrade-effect.show {
  animation: maple-cube-reset-glow 1.55s ease-out forwards;
}

.upgrade-effect::before {
  content: "";
  position: absolute;
  left: 34%;
  top: 46%;
  width: min(72%, 360px);
  aspect-ratio: 1;
  border: 8px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.42);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.24) 0 36%, rgba(159, 230, 255, 0.18) 37% 60%, transparent 61%);
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.62),
    0 0 22px rgba(255, 255, 255, 0.76),
    0 0 42px rgba(159, 230, 255, 0.44);
  animation: maple-cube-reset-ring 1.55s ease-out forwards;
}

.upgrade-effect::after {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle at 13% 26%, rgba(255, 255, 255, 0.98) 0 1px, transparent 3px),
    radial-gradient(circle at 22% 67%, rgba(255, 255, 255, 0.92) 0 2px, transparent 4px),
    radial-gradient(circle at 36% 39%, rgba(255, 244, 119, 0.95) 0 1px, transparent 3px),
    radial-gradient(circle at 43% 83%, rgba(255, 255, 255, 0.88) 0 2px, transparent 5px),
    radial-gradient(circle at 57% 23%, rgba(255, 255, 255, 0.86) 0 1px, transparent 3px),
    radial-gradient(circle at 66% 69%, rgba(255, 244, 119, 0.9) 0 1px, transparent 4px),
    radial-gradient(circle at 80% 42%, rgba(255, 255, 255, 0.96) 0 2px, transparent 4px),
    radial-gradient(circle at 92% 72%, rgba(255, 255, 255, 0.84) 0 1px, transparent 3px);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.92));
  opacity: 0;
  animation: maple-cube-sparkle-field 1.55s ease-out forwards;
}

.upgrade-effect strong {
  display: none;
}

.upgrade-effect small {
  display: none;
}

.burst {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  z-index: 2;
  width: var(--size, 14px);
  height: var(--size, 14px);
  clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
  background: var(--spark-color, #fff4a4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  opacity: 0;
}

.upgrade-effect.show .burst {
  animation: maple-cube-star-pop 1.42s ease-out forwards;
}

.b1 { --sx: 18%; --sy: 28%; --tx: -8px; --ty: -28px; --size: 18px; }
.b2 { --sx: 30%; --sy: 58%; --tx: 12px; --ty: 30px; --spark-color: #fff; --size: 24px; }
.b3 { --sx: 48%; --sy: 35%; --tx: -16px; --ty: -18px; --spark-color: #fff5a4; --size: 14px; }
.b4 { --sx: 62%; --sy: 76%; --tx: 18px; --ty: 20px; --spark-color: #fff; --size: 22px; }
.b5 { --sx: 76%; --sy: 45%; --tx: 10px; --ty: -24px; --spark-color: #fff; --size: 20px; }
.b6 { --sx: 88%; --sy: 68%; --tx: -14px; --ty: 24px; --spark-color: #fff5a4; --size: 14px; }

@keyframes maple-cube-reset-glow {
  0% { opacity: 0; filter: brightness(1); }
  8% { opacity: 1; filter: brightness(1.28); }
  38% { opacity: 0.92; filter: brightness(1.12); }
  100% { opacity: 0; filter: brightness(1); }
}

@keyframes maple-cube-reset-ring {
  0% { transform: translate(-50%, -50%) scale(0.34); opacity: 0; }
  10% { opacity: 0.98; }
  100% { transform: translate(-50%, -50%) scale(1.42); opacity: 0; }
}

@keyframes maple-cube-sparkle-field {
  0% { opacity: 0; transform: translateY(8px); }
  10% { opacity: 1; }
  70% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes maple-cube-star-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25) rotate(0deg); }
  14% { opacity: 1; }
  72% { opacity: 0.98; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(90deg); }
}

.window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  font-weight: 900;
}

.window-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--unique);
  color: #1c1607;
  font-size: 12px;
}

.item-preview {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(290px, 1.18fr);
  gap: 16px;
  align-items: center;
  padding: 22px;
}

.cube-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 229, 138, 0.28), transparent 39%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.24));
}

.cube-visual::before,
.cube-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.cube-visual::before {
  border: 2px solid rgba(255, 238, 146, 0.76);
  box-shadow:
    0 0 12px rgba(255, 229, 113, 0.64),
    inset 0 0 14px rgba(255, 255, 255, 0.34);
  transform: scale(0.72);
}

.cube-visual::after {
  background:
    radial-gradient(circle at 50% 0, #fff8ba 0 3px, transparent 4px),
    radial-gradient(circle at 90% 50%, #86e7ff 0 3px, transparent 4px),
    radial-gradient(circle at 50% 100%, #fff8ba 0 3px, transparent 4px),
    radial-gradient(circle at 10% 50%, #ffffff 0 3px, transparent 4px);
  transform: scale(0.48) rotate(0deg);
}

.game-window.is-rolling .cube-visual::before,
.luck-window.is-rolling .cube-visual::before {
  animation: cube-use-ring 0.54s ease-out;
}

.game-window.is-tier-up .cube-visual::before {
  border-color: rgba(232, 252, 255, 0.98);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.9),
    0 0 32px rgba(128, 220, 255, 0.72),
    inset 0 0 18px rgba(255, 255, 255, 0.62);
  animation: cube-tier-up-ring 1.72s cubic-bezier(0.16, 0.84, 0.24, 1) forwards;
}

.game-window.is-rolling .cube-visual::after,
.luck-window.is-rolling .cube-visual::after {
  animation: cube-use-orbit 0.54s ease-out;
}

.game-window.is-tier-up .cube-visual::after {
  background:
    radial-gradient(circle at 50% 0, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 90% 50%, #c8f7ff 0 4px, transparent 5px),
    radial-gradient(circle at 50% 100%, #fff4a8 0 4px, transparent 5px),
    radial-gradient(circle at 10% 50%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 25% 25%, #fff4a8 0 2px, transparent 4px),
    radial-gradient(circle at 75% 75%, #ffffff 0 2px, transparent 4px);
  animation: cube-tier-up-orbit 1.72s cubic-bezier(0.16, 0.84, 0.24, 1) forwards;
}

.cube-glow {
  position: absolute;
  width: 142px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 228, 132, 0.7);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}

.game-window.is-rolling .cube-glow,
.luck-window.is-rolling .cube-glow {
  animation: cube-glow-burst 0.54s ease-out;
}

.game-window.is-tier-up .cube-glow {
  animation: cube-tier-up-glow 1.72s ease-out forwards;
}

@keyframes pulse {
  50% {
    transform: scale(1.12);
    opacity: 0.58;
  }
}

@keyframes cube-glow-burst {
  0% {
    opacity: 0.36;
    transform: scale(0.9);
  }
  36% {
    opacity: 1;
    transform: scale(1.08);
    border-color: rgba(255, 247, 186, 0.98);
    box-shadow:
      0 0 14px rgba(255, 230, 122, 0.78),
      0 0 28px rgba(105, 190, 255, 0.36);
  }
  100% {
    opacity: 0.2;
    transform: scale(1.24);
  }
}

@keyframes cube-use-ring {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes cube-use-orbit {
  0% {
    opacity: 0;
    transform: scale(0.48) rotate(0deg);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.14) rotate(95deg);
  }
}

@keyframes cube-tier-up-ring {
  0% { opacity: 0; transform: scale(0.72); }
  10% { opacity: 1; transform: scale(0.9); }
  54% { opacity: 0.9; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(2.05); }
}

@keyframes cube-tier-up-orbit {
  0% { opacity: 0; transform: scale(0.48) rotate(0deg); }
  12% { opacity: 1; }
  64% { opacity: 0.85; transform: scale(1.45) rotate(180deg); }
  100% { opacity: 0; transform: scale(1.9) rotate(310deg); }
}

@keyframes cube-tier-up-glow {
  0% {
    opacity: 0.28;
    transform: scale(0.92);
  }
  18% {
    opacity: 1;
    transform: scale(1.14);
    border-color: rgba(240, 254, 255, 1);
    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.86),
      0 0 42px rgba(112, 215, 255, 0.76),
      0 0 72px rgba(255, 244, 148, 0.38);
  }
  100% {
    opacity: 0.14;
    transform: scale(1.62);
  }
}

.cube-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 104px;
  height: 104px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34));
}

.cube-image.is-miracle-cube-image {
  width: 136px;
  height: 136px;
}

.game-window.is-rolling .cube-image {
  animation: cube-reroll 0.54s cubic-bezier(0.16, 0.84, 0.28, 1);
}

.game-window.is-tier-up .cube-image {
  animation: cube-tier-up-reroll 1.72s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}

@keyframes cube-reroll {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34));
  }
  18% {
    transform: translateY(-8px) scale(1.05);
    filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.28)) brightness(1.15);
  }
  38% {
    transform: translateY(2px) scale(0.94);
    filter:
      drop-shadow(0 0 14px rgba(255, 233, 124, 0.76))
      drop-shadow(0 18px 22px rgba(0, 0, 0, 0.34))
      brightness(1.32);
  }
  64% {
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34));
  }
}

@keyframes cube-tier-up-reroll {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34));
  }
  12% {
    transform: translateY(-10px) scale(1.08);
    filter:
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.82))
      drop-shadow(0 14px 14px rgba(0, 0, 0, 0.3))
      brightness(1.24);
  }
  34% {
    transform: translateY(2px) scale(0.92);
    filter:
      drop-shadow(0 0 22px rgba(255, 255, 255, 0.96))
      drop-shadow(0 0 34px rgba(125, 220, 255, 0.82))
      drop-shadow(0 18px 22px rgba(0, 0, 0, 0.34))
      brightness(1.56);
  }
  64% {
    transform: translateY(-4px) scale(1.03);
    filter:
      drop-shadow(0 0 16px rgba(255, 244, 150, 0.72))
      drop-shadow(0 18px 18px rgba(0, 0, 0, 0.32))
      brightness(1.2);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.34));
  }
}

@keyframes cubeShake {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  24% {
    transform: translate(-4px, -2px) scale(1.02);
  }
  48% {
    transform: translate(4px, 1px) scale(0.98);
  }
  72% {
    transform: translate(-2px, 2px) scale(1.01);
  }
}

.cube-art,
.brand-cube {
  --cube-top: #f6e0ff;
  --cube-left: #7759de;
  --cube-right: #4c91db;
  position: relative;
}

.cube-art.mini {
  width: 46px;
  height: 46px;
}

.cube-art.large {
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.32));
}

.miracle-cube {
  --cube-top: #fff1a8;
  --cube-left: #7c56e4;
  --cube-right: #5da7ef;
}

.suspicious-cube {
  --cube-top: #f4f7fb;
  --cube-left: #8fa8b6;
  --cube-right: #526c7d;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
}

.cube-face.top {
  clip-path: polygon(50% 0, 100% 25%, 50% 50%, 0 25%);
  background: linear-gradient(145deg, #ffffff, var(--cube-top));
}

.cube-face.left {
  clip-path: polygon(0 25%, 50% 50%, 50% 100%, 0 75%);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), var(--cube-left));
}

.cube-face.right {
  clip-path: polygon(50% 50%, 100% 25%, 100% 75%, 50% 100%);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), var(--cube-right));
}

.brand-cube .cube-face {
  border-width: 1px;
}

.cube-gem {
  position: absolute;
  left: 38%;
  top: 37%;
  width: 24%;
  height: 24%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  background: radial-gradient(circle, #fff 0 26%, #f8cc52 27% 58%, rgba(255, 255, 255, 0.18) 59%);
  box-shadow: 0 0 16px rgba(255, 221, 110, 0.74);
}

.cube-art.large .cube-gem {
  border-radius: 9px;
}

.cube-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff4a2;
  box-shadow: 0 0 12px rgba(255, 237, 159, 0.9);
  animation: twinkle 1.7s ease-in-out infinite;
}

.cube-spark.s1 { left: 12%; top: 26%; }
.cube-spark.s2 { right: 8%; top: 42%; animation-delay: 0.35s; }
.cube-spark.s3 { left: 45%; bottom: 6%; animation-delay: 0.7s; }

@keyframes twinkle {
  50% {
    transform: scale(1.7);
    opacity: 0.48;
  }
}

@keyframes cube-spark-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--spark-x), var(--spark-y)) scale(2.25);
  }
}

.potential-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.potential-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 240, 154, 0.26), transparent 38%),
    rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
}

.grade-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--unique);
  font-size: 13px;
  font-weight: 900;
}

.grade-ribbon.rare,
.window-chip.rare {
  background: var(--rare);
  color: #fff;
}

.grade-ribbon.epic,
.window-chip.epic {
  background: var(--epic);
  color: #fff;
}

.grade-ribbon.unique,
.window-chip.unique {
  background: var(--unique);
  color: #281a00;
}

.potential-card h3 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.item-sub {
  margin: 0 0 10px;
  color: #a7e7e8;
  font-weight: 900;
}

.potential-lines {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.potential-lines li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  color: #f8fffb;
  font-weight: 800;
}

@keyframes potential-line-reveal {
  0% {
    opacity: 0.35;
    transform: scale(0.995);
    background: rgba(255, 238, 145, 0.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes potential-card-refresh {
  0% {
    opacity: 0;
  }
  34% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.line-copy {
  position: relative;
  display: block;
  min-width: 0;
  outline: none;
}

.line-ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  z-index: 80;
  display: none;
  width: max-content;
  max-width: min(420px, 72vw);
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #f8fffb;
  background: #17323a;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
}

.line-copy:hover .line-tooltip,
.line-copy:focus .line-tooltip,
.line-copy.is-tooltip-visible .line-tooltip {
  display: block;
}

.potential-lines li.target-match {
  border-color: rgba(255, 218, 99, 0.78);
  background: rgba(255, 207, 75, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 218, 99, 0.18);
}

.line-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #dff7ef;
  font-size: 12px;
}

.cube-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  padding: 0 22px 22px;
}

.primary,
.secondary,
.quick-actions button,
.ghost {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.primary {
  border: 0;
  color: #12272e;
  background: linear-gradient(180deg, #ffd76d, #f0ad26);
  box-shadow: inset 0 -2px 0 rgba(91, 54, 0, 0.25);
}

.secondary {
  border: 1px solid var(--chip-border);
  color: var(--ink);
  background: var(--field-soft);
}

.secondary.light {
  border-color: var(--chip-border);
  color: var(--muted);
  background: var(--field-soft);
}

.primary.compact {
  min-height: 38px;
}

.link-button {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quick-actions button,
.ghost {
  border: 1px solid var(--chip-border);
  color: var(--ink);
  background: var(--chip-bg);
}

.primary:disabled,
.secondary:disabled,
.quick-actions button:disabled,
.ghost:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.field-grid,
.target-fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.target-fieldset {
  grid-template-columns: 1fr;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.target-fieldset legend {
  padding: 0 6px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.challenge-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf6, #f7fbfc);
}

.challenge-panel h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.challenge-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.challenge-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.challenge-status {
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf7f8;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.luck-record-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7caa4;
  border-radius: 8px;
  background: rgba(255, 252, 237, 0.72);
}

.luck-record-panel ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.luck-record-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #e5d9b5;
  border-radius: 8px;
  background: #fffdf5;
}

.luck-record-panel li > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.luck-record-panel strong {
  color: #5b3c00;
  font-size: 13px;
  white-space: nowrap;
}

.luck-record-panel .item-link {
  min-width: 0;
  color: var(--teal-dark);
  text-align: right;
}

.challenge-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.view-luck .cube-tabs {
  display: none;
}

.view-luck .hero-panel {
  display: none;
}

.luck-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.luck-section > .luck-grid {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.luck-section > .megaphone-card {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 92px;
}

.luck-section > .megaphone-card .megaphone-form {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.luck-section > .megaphone-card .megaphone-form button {
  width: 100%;
}

.luck-section > .megaphone-card-wide #megaphoneList {
  max-height: 520px;
}

.luck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.luck-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f0dc;
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
  min-width: 0;
}

.luck-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px);
  gap: 10px;
  margin: 8px 0 12px;
}

.luck-controls label {
  display: grid;
  gap: 5px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.luck-controls select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #bcdce2;
  border-radius: 8px;
  background: #fbffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.auto-rank-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.auto-rank-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #bfdde3;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #eefafb;
  font-size: 12px;
  font-weight: 900;
}

.auto-rank-chip.is-active {
  border-color: rgba(244, 181, 54, 0.8);
  background: #fff7dc;
  color: #5b3c00;
}

.auto-rank-chip em {
  color: var(--muted);
  font-style: normal;
}

.luck-window {
  overflow: visible;
  margin-top: 12px;
  border: 1px solid #14343d;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 231, 140, 0.15), transparent 34%),
    linear-gradient(180deg, #244a55, #132d35);
  color: #fff;
}

.luck-window.is-rolling .cube-image {
  animation: cube-reroll 0.54s cubic-bezier(0.16, 0.84, 0.28, 1);
}

.luck-window.is-success {
  box-shadow: 0 0 0 3px rgba(255, 221, 94, 0.58), 0 0 34px rgba(255, 207, 72, 0.5);
}

.luck-window.is-success .potential-card {
  border-color: rgba(255, 218, 99, 0.78);
  background: rgba(255, 207, 75, 0.14);
}

.luck-roll-button {
  width: calc(100% - 32px);
  min-height: 54px;
  margin: 0 16px 10px;
  font-size: 18px;
}

.luck-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
}

.view-home .cube-tabs,
.view-books .cube-tabs,
.view-chaos-sim .cube-tabs,
.view-efficiency .cube-tabs,
.view-scroll .cube-tabs,
.view-catalog .cube-tabs,
.view-maker .cube-tabs,
.view-scrollwork .cube-tabs,
.view-challenge .cube-tabs,
.view-ranking .cube-tabs,
.view-notice .cube-tabs,
.view-zakum .cube-tabs,
.view-bossdrop .cube-tabs,
.view-request .cube-tabs,
.view-donate .cube-tabs {
  display: none;
}

.chaos-goal-section,
.mastery-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.chaos-goal-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.chaos-goal-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chaos-goal-rule-line {
  justify-self: end;
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.chaos-goal-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(360px, 1fr) minmax(300px, 380px);
  gap: 12px;
  align-items: start;
}

.chaos-goal-column,
.chaos-goal-form {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.chaos-goal-search-panel,
.chaos-goal-settings-panel,
.chaos-goal-detail-panel {
  align-self: stretch;
}

.chaos-goal-detail-panel {
  display: grid;
  gap: 8px;
}

.chaos-goal-search-panel {
  align-self: start;
}

.chaos-goal-output-panel {
  position: sticky;
  top: 112px;
  align-self: start;
}

.chaos-goal-output-slot {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chaos-goal-item-picker {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-item-picker label {
  display: grid;
  gap: 6px;
  align-content: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-goal-item-picker input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.chaos-goal-selected-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
}

.chaos-goal-selected-item:has(p) {
  display: block;
}

.chaos-goal-selected-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-goal-selected-media {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.chaos-goal-selected-media img {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.chaos-goal-selected-item div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chaos-goal-selected-item strong,
.chaos-goal-selected-item span,
.chaos-goal-selected-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chaos-goal-selected-item strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.chaos-goal-selected-item span,
.chaos-goal-selected-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.chaos-goal-item-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  align-content: start;
  gap: 7px;
  max-height: clamp(220px, 38vh, 420px);
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.chaos-goal-item-list li.empty {
  grid-column: 1 / -1;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-goal-item-list button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 7px 8px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--ink);
  text-align: left;
}

.chaos-goal-item-list button:hover,
.chaos-goal-item-list button:focus-visible,
.chaos-goal-item-list button.is-active {
  border-color: rgba(244, 181, 54, 0.72);
  background: var(--chip-active-bg);
}

.chaos-goal-item-list img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}

.chaos-goal-item-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chaos-goal-item-list strong,
.chaos-goal-item-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chaos-goal-item-list strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.chaos-goal-item-list em,
.chaos-goal-item-list small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.chaos-goal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chaos-goal-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-goal-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chaos-goal-stat-editor {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 2px;
}

.chaos-goal-mode label {
  position: relative;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--panel-bg);
  color: var(--muted);
  cursor: pointer;
}

.chaos-goal-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chaos-goal-mode span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.chaos-goal-mode em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chaos-goal-mode label:has(input:checked) {
  border-color: rgba(255, 197, 74, 0.78);
  background: rgba(255, 197, 74, 0.14);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 197, 74, 0.22);
}

.chaos-goal-mode-hint {
  margin: 0 0 2px;
  color: var(--accent-primary-strong);
  font-size: 11px;
  font-weight: 950;
}

.chaos-goal-stat-editor-head,
.chaos-goal-stat-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.chaos-goal-stat-editor-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.chaos-goal-stat-row {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.chaos-goal-stat-row > span {
  color: var(--accent-primary-strong);
}

.chaos-goal-stat-row input {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 950;
}

.chaos-goal-stat-editor[data-goal-mode="combo"] .chaos-goal-stat-editor-head,
.chaos-goal-stat-editor[data-goal-mode="combo"] .chaos-goal-stat-row {
  display: none;
}

.chaos-goal-combo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--chip-border);
}

.chaos-goal-stat-editor[data-goal-mode="combo"] .chaos-goal-combo-row {
  padding-top: 0;
  border-top: 0;
}

.chaos-goal-stat-editor[data-goal-mode="individual"] .chaos-goal-combo-row {
  display: none;
}

.chaos-goal-combo-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.chaos-goal-combo-row select,
.chaos-goal-combo-row input {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 950;
}

.chaos-goal-input-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-input-card h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.chaos-goal-input-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-goal-input-card input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.chaos-goal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chaos-goal-result {
  display: grid;
  gap: 10px;
}

.chaos-goal-history-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-history-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.chaos-goal-selected-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.chaos-goal-selected-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.chaos-goal-selected-toolbar button:hover,
.chaos-goal-selected-toolbar button:focus-visible {
  border-color: rgba(244, 181, 54, 0.72);
  color: var(--ink);
}

.chaos-goal-detail-shell {
  overflow: visible;
}

.chaos-goal-detail-shell .maple-item-detail-box {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  padding: 10px 12px;
  overflow: visible;
}

.chaos-goal-detail-box .maple-item-name strong {
  font-size: 20px;
}

.chaos-goal-detail-shell .maple-item-name {
  margin-bottom: 6px;
}

.chaos-goal-detail-shell .maple-item-name span {
  font-size: 13px;
}

.chaos-goal-detail-shell .maple-item-top {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
}

.chaos-goal-detail-shell .maple-item-icon-frame {
  width: 76px;
  height: 76px;
}

.chaos-goal-detail-shell .maple-item-icon-frame img {
  width: 52px;
  height: 52px;
}

.chaos-goal-detail-shell .maple-item-reqs span,
.chaos-goal-detail-shell .maple-item-stats li,
.chaos-goal-detail-shell .maple-item-jobs,
.chaos-goal-detail-shell .maple-item-recent {
  font-size: 12px;
  line-height: 1.22;
}

.chaos-goal-detail-shell .maple-item-jobs {
  gap: 6px;
  margin-top: 8px;
}

.chaos-goal-completed-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-completed-item.is-empty {
  min-height: 360px;
}

.chaos-goal-output-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 300px;
  padding: 18px;
  border: 1px dashed var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
  text-align: center;
}

.chaos-goal-output-empty strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
}

.chaos-goal-output-empty span {
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.chaos-goal-completed-detail .maple-item-detail-box {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  padding: 12px 14px;
  overflow: visible;
}

.chaos-goal-completed-detail .maple-item-top {
  grid-template-columns: 96px minmax(0, 1fr);
}

.chaos-goal-completed-detail .maple-item-icon-frame {
  width: 96px;
  height: 96px;
}

.chaos-goal-completed-detail .maple-item-icon-frame img {
  width: 62px;
  height: 62px;
}

.chaos-goal-completed-detail .maple-item-name strong {
  font-size: 22px;
}

.chaos-goal-completed-detail .maple-item-name span,
.chaos-goal-completed-detail .maple-item-reqs span,
.chaos-goal-completed-detail .maple-item-stats li,
.chaos-goal-completed-detail .maple-item-jobs,
.chaos-goal-completed-detail .maple-item-recent {
  font-size: 13px;
  line-height: 1.24;
}

.chaos-goal-detail-empty {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 16px;
  border: 1px dashed var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.chaos-goal-result-head {
  display: grid;
  gap: 5px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 18%, rgba(244, 181, 54, 0.18), transparent 34%),
    var(--field-bg);
}

.chaos-goal-result-head.is-hit {
  border-color: rgba(244, 181, 54, 0.72);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 218, 99, 0.28), transparent 36%),
    var(--chip-active-bg);
}

.chaos-goal-result-head.is-miss {
  border-color: rgba(214, 77, 103, 0.42);
}

.chaos-goal-result-head span {
  color: var(--accent-primary-strong);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.chaos-goal-result-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
}

.chaos-goal-result-head em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.chaos-goal-stat-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chaos-goal-stat-list li {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
}

.chaos-goal-stat-list li.is-hit {
  border-color: rgba(57, 180, 120, 0.52);
  background: rgba(57, 180, 120, 0.12);
}

.chaos-goal-stat-list li.is-ignored {
  border-style: dashed;
  opacity: 0.78;
}

.chaos-goal-stat-list span,
.chaos-goal-stat-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chaos-goal-stat-list strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 1000;
}

.chaos-goal-combo-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
}

.chaos-goal-combo-result.is-hit {
  border-color: rgba(57, 180, 120, 0.52);
  background: rgba(57, 180, 120, 0.12);
}

.chaos-goal-combo-result span,
.chaos-goal-combo-result em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chaos-goal-combo-result strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
}

.chaos-goal-mini-log {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.chaos-goal-mini-log > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.chaos-goal-mini-log ol,
.chaos-goal-history {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chaos-goal-mini-log li,
.chaos-goal-history li {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
}

.chaos-goal-mini-log li.hit,
.chaos-goal-history li.hit {
  border-color: rgba(244, 181, 54, 0.55);
}

.chaos-goal-mini-log strong,
.chaos-goal-history strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.chaos-goal-mini-log span,
.chaos-goal-history span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mastery-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.mastery-main-card {
  background:
    linear-gradient(180deg, #fffaf0, #ffffff 42%),
    var(--panel);
}

.mastery-window {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 248px;
  margin-top: 14px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #14343d;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #2d5360, #122a33 64%),
    #122a33;
  color: #fff;
}

.mastery-book-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
}

.mastery-book-glow {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 102, 0.34), rgba(85, 185, 232, 0.08) 58%, transparent 70%);
}

.mastery-book-visual img {
  position: relative;
  width: 92px;
  height: 92px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.35));
}

.mastery-mark {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffe793;
  font-size: 18px;
  font-weight: 900;
}

.mastery-result {
  min-width: 0;
}

.mastery-result h3 {
  margin: 4px 0 10px;
  font-size: 30px;
  line-height: 1.15;
}

.mastery-result p {
  min-height: 30px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 900;
}

.mastery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mastery-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #dff7ef;
  font-size: 13px;
  font-weight: 900;
}

.mastery-window.is-rolling .mastery-book-visual img {
  animation: cubeShake 0.42s ease-in-out;
}

.mastery-window.is-success {
  box-shadow: 0 0 0 3px rgba(255, 221, 94, 0.58), 0 0 34px rgba(255, 207, 72, 0.44);
}

.mastery-window.is-success .mastery-mark {
  background: #f4b536;
  color: #10252c;
}

.mastery-window.is-fail {
  box-shadow: 0 0 0 3px rgba(214, 77, 103, 0.3);
}

.mastery-window.is-fail .mastery-mark {
  background: #d64d67;
  color: #fff;
}

.mastery-actions {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1fr 1.25fr;
  gap: 10px;
  margin-top: 12px;
}

.mastery-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.mastery-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.mastery-history {
  margin-top: 14px;
}

.maker-section {
  display: grid;
  grid-template-columns: minmax(560px, 0.96fr) minmax(360px, 0.74fr);
  gap: 16px;
  margin-top: 16px;
}

.maker-card {
  min-width: 0;
}

.maker-main-card {
  padding: 0;
  overflow: hidden;
  border: 2px solid #7c98ad;
  border-radius: 6px;
  background: #dce8f1;
  box-shadow:
    0 0 0 1px #f9ffff inset,
    0 12px 28px rgba(22, 56, 64, 0.12);
}

.maker-side-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.maker-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 4px 7px 4px 14px;
  border-bottom: 2px solid #90a7b7;
  color: #20313a;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.44) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #f7fbff, #d7e4ee);
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.maker-titlebar span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #e8fbff;
  border-radius: 4px;
  color: #fff;
  background: #2ca2bf;
  background-color: #16748e;
  box-shadow: inset 0 -2px 0 rgba(0, 72, 99, 0.35);
  font-family: Arial, sans-serif;
  line-height: 1;
}

.maker-window {
  min-height: 704px;
  padding: 14px;
  border: 1px solid #b8ccd9;
  border-top: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #eaf4fb, #d7e6f0 72%, #b4c9dc);
}

.maker-select-panel {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  min-height: 134px;
  padding: 14px;
  border: 2px solid #5d93bf;
  border-radius: 6px;
  background:
    radial-gradient(circle at 28% 0%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(180deg, #77add6, #4d8abf);
  background-color: #5d9ac9;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    inset 0 -4px 0 rgba(43, 102, 151, 0.25);
}

.maker-visual {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 96px;
  border: 2px solid #f4f4f4;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px #cfd8de,
    0 2px 0 rgba(0, 74, 115, 0.18);
}

.maker-glow {
  position: absolute;
  width: 62px;
  height: 12px;
  margin-top: 54px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(111, 120, 120, 0.22), transparent 68%);
}

.maker-item-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  image-rendering: pixelated;
}

.maker-result-mark {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #7f9bb0;
  border-radius: 4px;
  color: #557386;
  background: #eef5f9;
  font-size: 12px;
  font-weight: 900;
}

.maker-window.is-rolling .maker-item-icon {
  animation: cubeShake 0.42s ease-in-out;
}

.maker-window.is-success .maker-result-mark {
  border-color: #ba8315;
  color: #4f3100;
  background: #ffd75f;
}

.maker-window.is-fail .maker-result-mark {
  border-color: #ad3150;
  color: #fff;
  background: #d64d67;
}

.maker-select-copy {
  min-width: 0;
}

.maker-select-copy p {
  height: 30px;
  margin: 4px 0 14px;
  overflow: hidden;
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
  line-height: 30px;
  text-shadow:
    0 2px 0 rgba(0, 63, 112, 0.45),
    1px 0 0 rgba(0, 63, 112, 0.28);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maker-field-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(220px, 1fr);
  gap: 10px;
}

.maker-field-grid label {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.maker-field-grid span {
  color: #083f69;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.maker-field-grid select,
.maker-gem-slot select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 2px solid #c2cbd2;
  border-radius: 4px;
  color: #111;
  background: #ffffff;
  font-weight: 900;
}

.maker-create-body {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.maker-needed-panel,
.maker-extra-panel {
  position: relative;
  padding: 32px 20px 16px;
  border: 2px solid #c5d5df;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.maker-window-label,
.maker-extra-head {
  position: absolute;
  left: 16px;
  top: -3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 31px;
  color: #225d91;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 1px 0 #ffffff;
}

.maker-window-label::before,
.maker-extra-head span::before {
  content: "·";
  color: #315f90;
  font-size: 30px;
  line-height: 1;
}

.maker-material-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 44px;
  min-height: 184px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.maker-material-list li {
  position: relative;
  display: grid;
  align-content: end;
  justify-items: center;
  min-height: 112px;
  padding: 80px 4px 3px;
  overflow: visible;
  color: #31516c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.maker-material-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 74px;
  height: 74px;
  border: 2px solid #d4d4d4;
  background:
    linear-gradient(135deg, transparent 47%, #c3c3c3 48%, #c3c3c3 52%, transparent 53%),
    repeating-linear-gradient(45deg, #f7f7f7 0 2px, #eeeeee 2px 4px);
  box-shadow: inset 0 0 0 2px #fdfdfd;
  transform: translateX(-50%);
}

.maker-material-list img {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 1;
  width: 50px;
  height: 50px;
  object-fit: contain;
  image-rendering: pixelated;
  transform: translateX(-50%);
}

.maker-material-list span {
  position: relative;
  z-index: 1;
}

.maker-extra-head {
  right: 20px;
  justify-content: space-between;
}

.maker-extra-head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.maker-extra-head strong {
  margin-left: auto;
  color: #24537a;
  font-size: 18px;
  font-weight: 900;
}

.maker-extra-grid {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.maker-stimulant-toggle {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 104px;
  padding: 8px;
  border: 0;
  color: #52616b;
  background: transparent;
  cursor: pointer;
}

.maker-stimulant-toggle img {
  width: 74px;
  height: 74px;
  padding: 8px;
  border: 2px solid #d4d4d4;
  background:
    linear-gradient(135deg, transparent 47%, #c3c3c3 48%, #c3c3c3 52%, transparent 53%),
    repeating-linear-gradient(45deg, #f7f7f7 0 2px, #eeeeee 2px 4px);
  filter: grayscale(1);
  image-rendering: pixelated;
  opacity: 0.42;
  object-fit: contain;
}

.maker-stimulant-toggle strong,
.maker-stimulant-toggle em {
  display: block;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.maker-stimulant-toggle strong {
  font-size: 13px;
}

.maker-stimulant-toggle em {
  color: #52616b;
  font-size: 11px;
}

.maker-stimulant-toggle.is-active {
  color: #1b5f84;
}

.maker-stimulant-toggle.is-active img {
  border-color: #f0c13f;
  background: #fff3b8;
  box-shadow: 0 0 0 3px rgba(244, 181, 54, 0.2);
  filter: none;
  opacity: 1;
}

.maker-slot-panel {
  min-width: 0;
}

.maker-slot-panel .mini-head {
  min-height: 24px;
  margin-bottom: 6px;
  color: #6a8cb0;
}

.maker-slot-panel .mini-head h3 {
  color: #6a8cb0;
  font-size: 15px;
}

.maker-gem-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
}

.maker-gem-slot {
  display: grid;
  grid-template-columns: 24px 58px minmax(150px, 1fr);
  grid-template-rows: 32px 32px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.maker-slot-index {
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  color: #7892a6;
  font-size: 12px;
  font-weight: 900;
}

.maker-gem-icon {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 54px;
  height: 54px;
  border: 2px solid #d4d4d4;
  background:
    linear-gradient(135deg, transparent 47%, #c3c3c3 48%, #c3c3c3 52%, transparent 53%),
    repeating-linear-gradient(45deg, #f7f7f7 0 2px, #eeeeee 2px 4px);
}

.maker-gem-icon img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  object-fit: contain;
}

.maker-gem-icon.is-empty::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #c5c5c5;
  border-radius: 50%;
}

.maker-gem-slot select[data-maker-gem] {
  grid-column: 3;
}

.maker-gem-slot select[data-maker-grade] {
  grid-column: 3;
}

.maker-rule-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.maker-rule-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #b3c8d8;
  border-radius: 6px;
  color: #24537a;
  background: #eef6fb;
  font-size: 11px;
  font-weight: 900;
}

.maker-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 86px;
  margin: 14px -14px -14px;
  padding: 16px 172px 18px;
  border-top: 2px solid #96adbf;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #adc7de, #90b0cf);
}

.maker-actions,
.maker-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.maker-actions button,
.maker-quick-actions button {
  min-height: 34px;
  border: 2px solid #6f7f8c;
  border-radius: 4px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.maker-actions button {
  min-width: 136px;
  color: #ffffff;
}

#makerUseButton {
  background: linear-gradient(180deg, #f4f4f4, #acb4bd);
  color: #ffffff;
  text-shadow: 0 1px 0 #6a6a6a;
}

#makerResetButton {
  border-color: #8a245d;
  background: linear-gradient(180deg, #ff58bf, #d62b8d);
  text-shadow: 0 1px 0 #7b064e;
}

.maker-quick-actions button {
  min-width: 66px;
  color: #23445f;
  background: #e9f3fa;
}

.maker-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.maker-item-detail {
  min-height: 430px;
  overflow: visible;
}

.maker-item-detail .maple-item-detail-box {
  min-height: 430px;
  height: auto;
}

.maker-maple-detail .maple-item-recent {
  min-height: 96px;
}

.maker-maple-detail .maple-item-recent strong {
  -webkit-line-clamp: 3;
}

.maker-scroll-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.maker-scroll-entry button {
  min-width: 112px;
  min-height: 34px;
}

.maker-scroll-entry span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.maker-scroll-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #b8ced7;
  border-radius: 8px;
  background: #f7fcfd;
}

.maker-scroll-panel[hidden] {
  display: none;
}

.maker-scroll-panel label {
  display: grid;
  gap: 6px;
}

.maker-scroll-panel label span {
  color: #416173;
  font-size: 12px;
  font-weight: 900;
}

.maker-scroll-panel select {
  width: 100%;
  min-height: 38px;
}

.maker-scroll-panel p {
  display: -webkit-box;
  height: 38px;
  margin: 0;
  overflow: hidden;
  color: #1f3d4d;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

:root[data-theme="dark"] .maker-window,
:root[data-theme="dark"] .maker-select-panel,
:root[data-theme="dark"] .maker-needed-panel,
:root[data-theme="dark"] .maker-extra-panel,
:root[data-theme="dark"] .maker-bottom-bar,
:root[data-theme="dark"] .maker-scroll-panel {
  color-scheme: light;
}

:root[data-theme="dark"] .maker-field-grid label,
:root[data-theme="dark"] .maker-gem-slot {
  border: 0;
  background: transparent;
  color: #31516c;
}

:root[data-theme="dark"] .maker-field-grid select,
:root[data-theme="dark"] .maker-gem-slot select,
:root[data-theme="dark"] .maker-scroll-panel select,
:root[data-theme="dark"] .maker-field-grid option,
:root[data-theme="dark"] .maker-gem-slot option,
:root[data-theme="dark"] .maker-scroll-panel option {
  border-color: #c2cbd2;
  background: #ffffff;
  color: #111111;
  color-scheme: light;
}

:root[data-theme="dark"] .maker-scroll-panel {
  border-color: #b8ced7;
  background: #f7fcfd;
  color: #1f3d4d;
}

.maker-scroll-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.maker-history {
  margin-top: 12px;
}

#makerHistoryList {
  display: grid;
  gap: 8px;
  max-height: 252px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

#makerHistoryList li {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

#makerHistoryList li.hit {
  border-color: rgba(255, 200, 63, 0.9);
  background: #fffaf0;
}

.maker-item-link {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.maker-item-link > img {
  width: 38px;
  height: 38px;
  padding: 5px;
  border: 1px solid #d7e4e7;
  border-radius: 7px;
  background: #f2fbfb;
  image-rendering: pixelated;
  object-fit: contain;
}

#makerHistoryList strong,
#makerHistoryList span,
#makerHistoryList em {
  display: block;
}

#makerHistoryList em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.45;
}

.scrollwork-section {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 16px;
  margin-top: 16px;
  transition: grid-template-columns 220ms ease;
}

.scrollwork-section:not(.is-detail-open) {
  grid-template-columns: minmax(0, 1fr);
}

.scrollwork-section:not(.is-detail-open) .scrollwork-control-card {
  display: none;
}

.scrollwork-section.is-detail-open .scrollwork-control-card {
  animation: scrollwork-detail-enter 220ms ease both;
}

@keyframes scrollwork-detail-enter {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.scrollwork-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

.scrollwork-list-card {
  background: var(--surface-panel-raised);
}

.scrollwork-count {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #cde3e7;
  border-radius: 8px;
  background: #eef8f9;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.scrollwork-filter-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
}

.scrollwork-filter-block,
.scrollwork-search {
  display: grid;
  gap: 8px;
}

.scrollwork-filter-block > span,
.scrollwork-search > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.scrollwork-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scrollwork-chip-row button,
.scrollwork-part-grid button {
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.scrollwork-chip-row button {
  min-height: 36px;
  padding: 0 12px;
}

.scrollwork-chip-row button em {
  display: inline-flex;
  align-items: center;
  min-width: 20px;
  height: 20px;
  justify-content: center;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
}

.scrollwork-source-block .scrollwork-chip-row button {
  min-width: 96px;
}

.scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted {
  min-width: 64px;
  margin-left: auto;
  border-color: rgba(214, 77, 103, 0.24);
  color: #9b3144;
  background: rgba(255, 244, 246, 0.86);
}

.scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted:hover,
.scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted:focus {
  border-color: rgba(214, 77, 103, 0.46);
  background: rgba(255, 232, 237, 0.96);
}

.scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.scrollwork-chip-row button.is-active,
.scrollwork-part-grid button.is-active {
  border-color: rgba(244, 181, 54, 0.68);
  background: var(--chip-active-bg);
  color: var(--accent-primary-strong);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.18);
}

.scrollwork-part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}

.scrollwork-part-grid button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 66px;
  padding: 7px 5px;
}

.scrollwork-part-grid img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.scrollwork-part-grid button > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffd166;
  font-size: 11px;
}

.scrollwork-part-grid em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrollwork-search input {
  width: 100%;
  min-height: 40px;
  border-color: #2d3740;
  background: #0e1116;
  color: #ffffff;
}

.scrollwork-search input::placeholder {
  color: #738493;
}

.scrollwork-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 10px;
  max-height: none;
  margin-top: 12px;
  overflow: visible;
  padding-right: 0;
}

.scrollwork-item-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 126px;
  padding: 30px 10px 10px;
  border: 1px solid #d7e4e7;
  border-radius: 8px;
  background: #fbfefe;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.scrollwork-item-card.is-active {
  border-color: #f4b536;
  background: #fffaf0;
  box-shadow: 0 0 0 2px rgba(244, 181, 54, 0.18);
}

.scrollwork-item-card.is-crafted {
  align-content: start;
  min-height: 152px;
  border-color: rgba(244, 181, 54, 0.5);
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.98), rgba(248, 254, 255, 0.96));
}

.scrollwork-level-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 48px;
  padding: 4px 7px;
  border: 1px solid rgba(244, 181, 54, 0.75);
  border-radius: 999px;
  background: #12343c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: #ffd166;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.scrollwork-item-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.scrollwork-item-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scrollwork-item-card .scrollwork-item-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrollwork-scroll-panel {
  grid-template-columns: minmax(0, 1fr) 150px;
  margin-top: 12px;
}

.scrollwork-scroll-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

.scrollwork-scroll-field > span {
  color: #416173;
  font-size: 12px;
  font-weight: 900;
}

.scrollwork-scroll-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.scrollwork-empty-picker,
.scrollwork-empty-detail {
  display: grid;
  min-height: 112px;
  align-items: center;
  justify-items: center;
  padding: 16px;
  border: 1px dashed #c6dce3;
  border-radius: 8px;
  background: #f6fbfc;
  color: #5f7886;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.scrollwork-empty-picker {
  grid-column: 1 / -1;
}

.scrollwork-scroll-option {
  display: grid;
  min-height: 100px;
  padding: 8px 6px 7px;
  border: 1px solid #d4e2e8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  gap: 5px;
  justify-items: center;
  text-align: center;
}

.scrollwork-scroll-option.is-active {
  border-color: #f2b635;
  background: #fff8dc;
  box-shadow: inset 0 0 0 2px rgba(242, 182, 53, 0.22);
}

.scrollwork-scroll-icon {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 3px;
  place-items: center;
}

.scrollwork-scroll-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}

.scrollwork-scroll-icon em {
  position: absolute;
  bottom: -4px;
  left: 50%;
  min-width: 30px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 240, 162, 0.82);
  border-radius: 999px;
  background: #141d2a;
  color: #fff0a2;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
}

.scrollwork-scroll-option strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scrollwork-scroll-summary {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #5f7886;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrollwork-scroll-panel label:first-child {
  grid-column: 1 / -1;
}

.scrollwork-scroll-panel input {
  min-height: 38px;
}

.scrollwork-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr 0.85fr 0.85fr;
  gap: 8px;
}

.scrollwork-detail-shell {
  position: relative;
  min-width: 0;
}

.scrollwork-detail {
  max-height: none;
  margin-top: 12px;
  overflow: visible;
}

.scrollwork-detail .scrollwork-empty-detail {
  min-height: 540px;
}

.scrollwork-detail .maple-item-detail-box {
  height: auto;
  min-height: 540px;
}

.scrollwork-scroll-effect {
  border-radius: 8px;
}

.scrollwork-status-window {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #c8dbe2;
  border-radius: 8px;
  background: #f7fbfc;
  color: var(--ink);
}

.scrollwork-status-window.is-rolling {
  border-color: #f2b635;
  background: #fff8dc;
}

.scrollwork-status-window.is-success {
  border-color: #63b37b;
  background: #effaf2;
}

.scrollwork-status-window.is-fail {
  border-color: #d48585;
  background: #fff3f3;
}

.scrollwork-result-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(9, 105, 114, 0.3);
  border-radius: 50%;
  background: #ffffff;
  color: var(--teal-dark);
  font-size: 16px;
  font-weight: 900;
  place-items: center;
}

.scrollwork-status-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scrollwork-status-copy strong,
.scrollwork-status-copy p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrollwork-status-copy strong {
  font-size: 15px;
}

.scrollwork-status-copy p {
  color: #486779;
  font-size: 12px;
  font-weight: 900;
}

.scrollwork-history {
  margin-top: 14px;
}

#scrollworkHistoryList {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  list-style: none;
}

#scrollworkHistoryList li {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

#scrollworkHistoryList li.hit {
  border-color: rgba(255, 200, 63, 0.9);
  background: #fffaf0;
}

#scrollworkHistoryList li.destroyed {
  border-color: rgba(214, 77, 103, 0.48);
  background: #fff4f6;
}

#scrollworkHistoryList strong,
#scrollworkHistoryList span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#scrollworkHistoryList strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

#scrollworkHistoryList span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.scroll-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  margin-top: 16px;
}

.scroll-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.scroll-main-card {
  background:
    linear-gradient(180deg, #f5fbfc, #ffffff 44%),
    var(--panel);
}

.scroll-window {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 220px;
  margin-top: 14px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #14343d;
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 217, 102, 0.16), transparent 34%),
    linear-gradient(135deg, #385e68, #132d35 66%);
  color: #fff;
}

.scroll-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
}

.scroll-glow {
  position: absolute;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 102, 0.32), rgba(85, 185, 232, 0.08) 60%, transparent 72%);
}

.scroll-visual img {
  position: relative;
  width: 86px;
  height: 86px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.35));
}

.scroll-mark {
  position: absolute;
  right: 10px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffe793;
  font-size: 18px;
  font-weight: 900;
}

.scroll-result h3 {
  margin: 4px 0 10px;
  font-size: 30px;
  line-height: 1.15;
}

.scroll-result p {
  display: -webkit-box;
  height: 42px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scroll-window.is-rolling .scroll-visual img {
  animation: cubeShake 0.42s ease-in-out;
}

.scroll-window.is-success {
  box-shadow: 0 0 0 3px rgba(255, 221, 94, 0.58), 0 0 34px rgba(255, 207, 72, 0.42);
}

.scroll-window.is-success .scroll-mark {
  background: #f4b536;
  color: #10252c;
}

.scroll-window.is-fail {
  box-shadow: 0 0 0 3px rgba(214, 77, 103, 0.3);
}

.scroll-window.is-fail .scroll-mark {
  background: #d64d67;
  color: #fff;
}

.scroll-item-detail {
  height: 660px;
  margin-top: 12px;
  overflow: hidden;
}

.maple-item-detail-box {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  height: 100%;
  margin: 0 auto;
  padding: 14px 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 233, 92, 0.9);
  background:
    linear-gradient(180deg, rgba(20, 25, 54, 0.9), rgba(45, 43, 83, 0.86)),
    rgba(13, 21, 39, 0.92);
  color: #ffffff;
  font-family: Arial, "Noto Sans KR", sans-serif;
  text-shadow: 0 1px 0 #000000, 1px 0 0 #000000;
  box-shadow: 0 14px 30px rgba(16, 36, 44, 0.22);
}

.maple-item-name {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: 8px;
  text-align: center;
}

.maple-item-name strong {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
}

.maple-item-name span {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.maple-item-detail-box.quality-low .maple-item-name strong {
  color: #aaaaaa;
}

.maple-item-detail-box.quality-normal .maple-item-name strong {
  color: #ffffff;
}

.maple-item-detail-box.quality-high .maple-item-name strong {
  color: #76f6ff;
}

.maple-item-detail-box.quality-great .maple-item-name strong {
  color: #b47cff;
}

.maple-item-detail-box.quality-premium .maple-item-name strong {
  color: #ffe341;
}

.maple-item-detail-box.quality-excellent .maple-item-name strong {
  color: #aaff00;
}

.maple-item-detail-box.quality-special .maple-item-name strong {
  color: #ff2f62;
}

.maple-item-top {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.maple-item-icon-frame {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(234, 235, 242, 0.78);
}

.maple-item-icon-frame img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  image-rendering: pixelated;
}

.maple-item-reqs {
  display: grid;
  gap: 2px;
}

.maple-item-reqs span,
.maple-item-stats li,
.maple-item-jobs,
.maple-item-recent {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.28;
}

.maple-item-jobs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: #f23535;
}

.maple-item-jobs span:not(.is-allowed) {
  color: rgba(255, 255, 255, 0.55);
}

.maple-item-rule {
  height: 2px;
  margin: 9px 0;
  background: rgba(255, 255, 255, 0.94);
}

.maple-item-stats {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  overflow: visible;
  padding: 0;
  list-style: none;
}

.maple-item-stats li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.maple-item-stats em {
  color: #dbeeff;
  font-style: normal;
}

.maple-item-stats em.plus {
  color: #7dffb8;
}

.maple-item-stats em.minus {
  color: #ff8f9d;
}

.maple-item-recent {
  display: grid;
  flex: 0 0 64px;
  gap: 4px;
  min-height: 64px;
}

.maple-item-recent span {
  color: #e4c5ff;
}

.maple-item-recent strong {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scroll-stat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.scroll-stat-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fcfc;
}

.scroll-stat-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.scroll-stat-list strong {
  color: var(--ink);
  font-size: 18px;
}

.scroll-stat-list em {
  min-width: 34px;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.scroll-stat-list em.plus {
  color: #008c58;
}

.scroll-stat-list em.minus {
  color: #d64d67;
}

.scroll-actions {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1fr 1.25fr;
  gap: 10px;
  margin-top: 12px;
}

.scroll-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.scroll-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.scroll-history {
  margin-top: 14px;
}

.scroll-ranking-card {
  grid-column: 1 / -1;
}

.chaos-ranking-select {
  min-height: 34px;
  max-width: min(260px, 100%);
  padding: 0 10px;
  border: 1px solid #b7d8dd;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #f7fcfc;
  font-size: 13px;
  font-weight: 900;
}

.chaos-ranking-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chaos-ranking-group {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.chaos-ranking-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chaos-ranking-title strong {
  color: var(--ink);
  font-weight: 900;
}

.chaos-ranking-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chaos-ranking-group ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.chaos-ranking-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid #dbe9ec;
  border-radius: 7px;
  background: #ffffff;
}

.chaos-ranking-entry strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.chaos-ranking-entry span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.chaos-ranking-entry em {
  color: var(--teal-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chaos-ranking-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.zakum-section {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(420px, 1.18fr);
  gap: 16px;
  margin-top: 16px;
}

.zakum-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.zakum-party-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: #f7fcfc;
}

.catalog-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.catalog-section.is-detail-open {
  grid-template-columns: minmax(330px, 0.9fr) minmax(460px, 1.1fr);
}

.catalog-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

.catalog-count,
.catalog-detail-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.catalog-list-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.catalog-detail-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
}

.catalog-density-toggle {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--chip-bg);
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.catalog-density-toggle.is-active {
  border-color: rgba(244, 181, 54, 0.62);
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
}

.catalog-rate-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--chip-border);
  border-radius: 9px;
  background: var(--chip-bg);
}

.catalog-rate-toggle button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.catalog-rate-toggle button.is-active {
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.5);
}

.catalog-search {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.catalog-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field-bg);
  font-weight: 800;
}

.catalog-equipment-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-panel) 84%, transparent);
}

.catalog-equipment-tools[hidden] {
  display: none;
}

.catalog-equipment-block {
  display: grid;
  grid-column: 1 / 2;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.catalog-equipment-block[hidden] {
  display: none;
}

.catalog-equipment-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.catalog-equipment-chip-row {
  display: flex;
  min-width: 0;
  overflow-x: visible;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 1px;
}

.catalog-equipment-chip-row button,
.catalog-equipment-part-grid button {
  flex: 0 0 auto;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--ink);
  font-weight: 900;
  background: var(--chip-bg);
  cursor: pointer;
}

.catalog-equipment-chip-row button {
  min-width: 48px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.catalog-equipment-chip-row button.is-active,
.catalog-equipment-part-grid button.is-active {
  border-color: rgba(244, 181, 54, 0.7);
  background: var(--chip-active-bg);
  color: var(--accent-primary-strong);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.18);
}

.catalog-level-filter-line {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.catalog-level-filter-line input {
  flex: 0 0 76px;
  width: 76px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--ink);
  background: var(--field-bg);
  font-size: 11px;
  font-weight: 900;
}

.catalog-level-quick-row {
  flex: 1 1 auto;
}

.catalog-equipment-part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px;
  padding-bottom: 1px;
}

.catalog-equipment-part-grid button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 66px;
  padding: 7px 5px;
}

.catalog-equipment-part-grid img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-equipment-part-grid button > span {
  display: grid;
  width: 30px;
  height: 30px;
  color: #ffd166;
  font-size: 11px;
  place-items: center;
}

.catalog-equipment-part-grid em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-equipment-tools > button {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  min-height: 30px;
  padding: 0 12px;
  white-space: nowrap;
}

.catalog-equipment-tools small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.catalog-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.catalog-filter-row[hidden] {
  display: none;
}

.catalog-filter-row button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--muted);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-filter-row button.is-active {
  border-color: rgba(244, 181, 54, 0.68);
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
}

.catalog-result-list {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: max-content;
  height: auto;
  margin-top: 10px;
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  overscroll-behavior: auto;
}

.catalog-filter-row:not([hidden]) ~ .catalog-result-list {
  margin-top: 0;
}

.catalog-result-list.is-equipment-mode {
  gap: 6px;
}

.catalog-result-list.is-compact-results {
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 7px;
}

.catalog-result-list.is-compact-results.is-equipment-mode {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-equipment-results {
  display: grid;
  gap: 8px;
}

.catalog-equipment-results-compact {
  gap: 8px;
}

.catalog-equipment-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 7px;
}

.catalog-equipment-summary-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-panel) 92%, transparent);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-equipment-summary-bar > span {
  min-width: 0;
}

.catalog-equipment-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
}

.catalog-equipment-sort select {
  min-width: 112px;
  min-height: 30px;
  border-color: var(--chip-border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}

.catalog-equipment-type-section,
.catalog-equipment-section {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.catalog-equipment-type-section + .catalog-equipment-type-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--chip-border);
}

.catalog-equipment-type-head,
.catalog-equipment-section-head {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-equipment-type-head {
  padding-bottom: 5px;
  border-bottom: 1px solid color-mix(in srgb, var(--chip-border) 72%, transparent);
}

.catalog-equipment-type-head span,
.catalog-equipment-section-head span {
  overflow: hidden;
  color: var(--accent-primary-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrollwork-crafted-options {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  color: #0b6b73;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.catalog-equipment-type-head b,
.catalog-equipment-section-head b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.catalog-equipment-part-stack {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-left: 14px;
}

.catalog-equipment-section.is-child {
  padding-left: 0;
}

.catalog-equipment-section.is-child + .catalog-equipment-section.is-child {
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--chip-border) 58%, transparent);
}

.catalog-equipment-section.is-child .catalog-equipment-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 28px;
  justify-content: initial;
  gap: 10px;
  padding-right: 8px;
  padding-left: 0;
}

.catalog-equipment-section.is-child .catalog-equipment-section-head::before {
  content: none;
}

.catalog-equipment-section.is-child .catalog-equipment-section-head span {
  color: var(--accent-primary-strong);
}

.catalog-equipment-section .catalog-equipment-row-block {
  padding: 0;
}

.catalog-equipment-group,
.catalog-equipment-subgroup {
  min-width: 0;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--field-bg) 88%, transparent);
}

.catalog-equipment-subgroup {
  margin-top: 6px;
  border-style: dashed;
}

.catalog-equipment-group > summary,
.catalog-equipment-subgroup > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  list-style: none;
}

.catalog-equipment-group > summary::-webkit-details-marker,
.catalog-equipment-subgroup > summary::-webkit-details-marker {
  display: none;
}

.catalog-equipment-group > summary::before,
.catalog-equipment-subgroup > summary::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  width: 0;
  height: 0;
  border-color: transparent transparent transparent var(--accent-primary-strong);
  border-style: solid;
  border-width: 4px 0 4px 6px;
  align-self: center;
  justify-self: start;
}

.catalog-equipment-group[open] > summary::before,
.catalog-equipment-subgroup[open] > summary::before {
  border-color: var(--accent-primary-strong) transparent transparent transparent;
  border-width: 6px 4px 0 4px;
}

.catalog-equipment-group > summary span,
.catalog-equipment-subgroup > summary span {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-equipment-group > summary b,
.catalog-equipment-subgroup > summary b {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}

.catalog-equipment-level-label {
  margin: 6px 8px 4px;
  color: var(--accent-primary-strong);
  font-size: 11px;
  font-weight: 1000;
}

.catalog-equipment-row-block {
  display: grid;
  gap: 4px;
  padding: 0 6px 6px;
}

.catalog-equipment-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(120px, 0.75fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-panel) 68%, transparent);
  text-align: left;
  cursor: pointer;
}

.catalog-equipment-row:hover,
.catalog-equipment-row.is-active {
  border-color: rgba(244, 181, 54, 0.74);
  background: var(--chip-active-bg);
}

.catalog-equipment-row img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-equipment-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalog-equipment-row-copy strong,
.catalog-equipment-row-copy em,
.catalog-equipment-row-stats {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-equipment-row-copy strong {
  font-size: 13px;
  font-weight: 1000;
}

.catalog-equipment-row-copy em,
.catalog-equipment-row-stats {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.catalog-equipment-row-stats {
  justify-self: end;
  max-width: 100%;
  color: var(--ink);
}

.catalog-equipment-empty-row {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.catalog-result-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field-bg);
  text-align: left;
}

.catalog-result-item.is-active {
  border-color: rgba(244, 181, 54, 0.76);
  background: var(--chip-active-bg);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.16);
}

.catalog-result-item img {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-result-item.is-monster img {
  width: 54px;
  height: 54px;
  margin: -3px;
}

.catalog-result-item.is-map img {
  width: 48px;
  height: 34px;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.5);
}

.catalog-map-thumb {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 48px;
  height: 48px;
}

.catalog-map-thumb b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
  font-size: 11px;
  font-weight: 1000;
}

.catalog-map-thumb b[hidden] {
  display: none;
}

.catalog-monster-thumb {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-result-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.catalog-result-item strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-result-item em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-result-item small {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 4px;
}

.catalog-result-item i {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
}

.catalog-result-list.is-compact-results .catalog-result-item {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  justify-items: center;
  min-height: 112px;
  padding: 8px;
  text-align: center;
}

.catalog-result-list.is-compact-results .catalog-result-item img,
.catalog-result-list.is-compact-results .catalog-map-thumb,
.catalog-result-list.is-compact-results .catalog-monster-thumb {
  grid-row: auto;
  width: 40px;
  height: 40px;
  margin: 0;
}

.catalog-result-list.is-compact-results .catalog-result-item.is-monster img {
  width: 44px;
  height: 44px;
  margin: -2px 0;
}

.catalog-result-list.is-compact-results .catalog-result-item.is-map img {
  width: 44px;
  height: 32px;
}

.catalog-result-list.is-compact-results .catalog-map-thumb b {
  width: 40px;
  height: 40px;
}

.catalog-result-list.is-compact-results .catalog-result-item span {
  width: 100%;
  justify-items: center;
  gap: 2px;
}

.catalog-result-list.is-compact-results .catalog-result-item strong {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.18;
}

.catalog-result-list.is-compact-results .catalog-result-item em {
  max-width: 100%;
  font-size: 10px;
  line-height: 1.15;
}

.catalog-result-list.is-compact-results .catalog-result-item small {
  display: none;
}

.catalog-detail-card {
  position: sticky;
  top: 16px;
  align-self: start;
}

.catalog-detail-card > .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
}

.catalog-detail-card > .section-head > div:not(.catalog-detail-side) {
  grid-column: 1;
}

.catalog-detail-card > .section-head .catalog-detail-side {
  grid-column: 2;
  grid-row: 2;
}

.catalog-detail-back {
  display: inline-flex;
  grid-column: 1 / -1;
  justify-self: start;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-detail-card[hidden] {
  display: none;
}

.catalog-detail-card.is-open {
  animation: catalogDetailSlideIn 180ms ease-out both;
}

.catalog-detail-card.is-closing {
  pointer-events: none;
  animation: catalogDetailSlideOut 220ms ease-in both;
}

@keyframes catalogDetailSlideIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes catalogDetailSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(14px);
  }
}

.catalog-detail-body {
  margin-top: 12px;
}

.catalog-detail-grid,
.catalog-info-stack {
  display: grid;
  gap: 12px;
}

.catalog-detail-preview .maple-item-detail-box {
  height: auto;
  max-width: none;
  overflow: visible;
}

.catalog-item-info-tooltip {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  box-sizing: border-box;
  width: min(100%, 540px);
  min-height: 156px;
  padding: 14px 18px;
  border: 1px solid #19cfff;
  background:
    radial-gradient(circle at 78% 22%, rgba(55, 142, 191, 0.24), transparent 38%),
    linear-gradient(90deg, rgba(25, 28, 58, 0.9) 0%, rgba(18, 55, 88, 0.86) 58%, rgba(14, 80, 122, 0.82) 100%);
  color: #ffffff;
  font-family: "Gulim", "굴림", "Dotum", "돋움", sans-serif;
  text-shadow:
    1px 0 0 #000000,
    0 1px 0 #000000,
    1px 1px 0 #000000;
  box-shadow:
    inset 0 0 0 1px rgba(144, 224, 255, 0.22),
    inset 0 18px 42px rgba(255, 255, 255, 0.055),
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.catalog-item-info-icon-pane {
  display: grid;
  place-items: center;
  min-height: 0;
  background: transparent;
}

.catalog-item-info-icon-frame {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(242, 243, 249, 0.78), rgba(204, 208, 222, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.catalog-item-info-icon-frame img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-item-info-copy {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 0;
}

.catalog-item-info-copy strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.12;
  text-align: left;
}

.catalog-item-info-rule {
  display: none;
}

.catalog-item-info-copy p,
.catalog-item-info-copy ul {
  margin: 11px 0 0;
  padding: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: 0;
  word-break: keep-all;
}

.catalog-item-info-copy ul {
  display: grid;
  gap: 4px;
  list-style: none;
}

.catalog-scroll-detail-box {
  display: grid;
  gap: 14px;
  width: 100%;
  min-height: 230px;
  padding: 24px 26px;
  border: 2px solid rgba(255, 232, 92, 0.9);
  background:
    linear-gradient(180deg, rgba(36, 33, 64, 0.82), rgba(23, 28, 48, 0.78)),
    rgba(9, 16, 30, 0.84);
  color: #ffffff;
  font-family: Arial, "Pretendard Variable", "Noto Sans KR", sans-serif;
  text-shadow: 0 1px 0 #000000, 1px 0 0 #000000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.catalog-scroll-name {
  display: block;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.catalog-scroll-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.catalog-scroll-icon-frame {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  background: rgba(238, 238, 244, 0.82);
}

.catalog-scroll-icon-frame img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-scroll-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
}

.catalog-scroll-copy em {
  font-style: normal;
}

.catalog-throwing-detail-box {
  min-height: 210px;
}

.catalog-throwing-body {
  align-items: start;
}

.catalog-throwing-name {
  margin-bottom: 2px;
  text-align: left;
}

.catalog-throwing-copy {
  align-content: start;
  padding-top: 6px;
  font-size: 22px;
  line-height: 1.34;
}

.catalog-throwing-copy span {
  max-width: 520px;
}

.catalog-info-stack section {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.catalog-info-stack h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.catalog-map-detail {
  display: grid;
  gap: 10px;
}

.catalog-map-stage {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.catalog-map-stage img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-map-stage span {
  color: var(--accent-primary-strong);
  font-size: 18px;
  font-weight: 1000;
}

.catalog-map-stage span[hidden] {
  display: none;
}

.catalog-map-meta {
  display: grid;
  gap: 4px;
}

.catalog-map-meta strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
}

.catalog-map-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.catalog-map-monster-list {
  display: grid;
  gap: 7px;
}

.catalog-map-monster-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--ink);
  background: var(--chip-bg);
  text-align: left;
}

.catalog-map-monster-list button:hover,
.catalog-map-monster-list button:focus-visible,
.catalog-map-monster-list button.is-active {
  border-color: rgba(244, 181, 54, 0.72);
  background: var(--chip-active-bg);
}

.catalog-map-monster-list img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-map-monster-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalog-map-monster-list strong,
.catalog-map-monster-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-map-monster-list strong {
  font-size: 13px;
  font-weight: 1000;
}

.catalog-map-monster-list em,
.catalog-map-monster-list small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.catalog-map-drop-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.catalog-map-drop-head img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-map-drop-head span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.catalog-map-drop-head strong,
.catalog-map-drop-head em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-map-drop-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.catalog-map-drop-head em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-source-list {
  display: grid;
  gap: 6px;
}

.catalog-source-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--ink);
  background: var(--chip-bg);
  font-weight: 900;
}

.catalog-source-list span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-source-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-source-more {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.catalog-source-more summary {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--accent-primary-strong);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  list-style: none;
}

.catalog-source-more summary::-webkit-details-marker {
  display: none;
}

.catalog-source-more[open] summary {
  border-color: rgba(244, 181, 54, 0.68);
  background: var(--chip-active-bg);
}

.catalog-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px;
}

.catalog-material-grid span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  background: var(--chip-bg);
}

.catalog-material-grid img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-material-grid em {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-monster-detail {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 250px;
  padding: 14px;
  border: 1px solid rgba(244, 181, 54, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(244, 181, 54, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(29, 52, 58, 0.96), rgba(18, 27, 33, 0.96));
}

.catalog-monster-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(121, 180, 191, 0.16), rgba(18, 27, 33, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 4px);
  overflow: hidden;
}

.catalog-monster-stage img {
  max-width: 96%;
  max-height: 214px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.3));
}

.catalog-monster-stage span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(244, 181, 54, 0.36);
  border-radius: 999px;
  color: #ffd369;
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  font-weight: 1000;
}

.catalog-monster-meta {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.catalog-monster-meta strong {
  color: #f7f1dc;
  font-size: 26px;
  font-weight: 1000;
  line-height: 1.12;
}

.catalog-monster-meta span {
  color: rgba(247, 241, 220, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.catalog-monster-attributes {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.catalog-monster-attributes b {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
}

.catalog-monster-attributes div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-monster-attributes em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #f7f1dc;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}

.catalog-monster-attributes em.is-weak {
  border-color: rgba(255, 211, 105, 0.46);
  color: #ffe08a;
  background: rgba(244, 181, 54, 0.16);
}

.catalog-monster-attributes em.is-resistant {
  border-color: rgba(104, 180, 255, 0.36);
  color: #aad9ff;
  background: rgba(68, 130, 190, 0.18);
}

.catalog-monster-attributes em.is-immune {
  border-color: rgba(255, 120, 120, 0.38);
  color: #ffb3b3;
  background: rgba(180, 58, 58, 0.18);
}

.catalog-monster-attributes em.is-trait {
  border-color: rgba(166, 126, 255, 0.42);
  color: #d8c6ff;
  background: rgba(116, 72, 190, 0.18);
}

.catalog-monster-attributes em.is-neutral {
  color: rgba(247, 241, 220, 0.68);
}

.catalog-monster-drop-sections {
  display: grid;
  gap: 12px;
}

.catalog-monster-drop-section {
  display: grid;
  gap: 7px;
}

.catalog-monster-drop-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-monster-drop-rate-note {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.catalog-monster-drop-rate-note strong {
  color: var(--accent-primary-strong);
  font-size: 12px;
}

.catalog-monster-drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 54px);
  justify-content: start;
  gap: 7px;
}

.catalog-monster-drop-grid .boss-drop-item {
  width: 100%;
}

.catalog-monster-drop-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.catalog-monster-drop-list.catalog-book-drop-grid {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-drop-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 4px 8px;
  overflow: visible;
  border: 1px solid var(--chip-border);
  border-radius: 7px;
  color: var(--ink);
  background: color-mix(in srgb, var(--chip-bg) 88%, transparent);
  text-align: left;
}

.catalog-drop-row:hover,
.catalog-drop-row:focus-visible {
  border-color: rgba(244, 181, 54, 0.72);
  background: var(--chip-active-bg);
  outline: none;
}

.catalog-drop-row-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.catalog-drop-row-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
}

.catalog-drop-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-drop-row-copy strong,
.catalog-drop-row-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-drop-row-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.catalog-drop-row-copy em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.catalog-drop-row.is-book .catalog-drop-row-copy strong {
  color: #fff1a8;
}

.catalog-book-drop-grid {
  grid-template-columns: repeat(auto-fill, 62px);
}

.catalog-book-drop-grid .boss-drop-item.compact.is-book {
  width: 62px;
  height: 56px;
}

.catalog-book-drop-grid .boss-drop-item.compact.is-book img {
  width: 28px;
  height: 28px;
}

.catalog-muted,
.catalog-empty,
.catalog-more {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.catalog-result-list > .catalog-empty,
.catalog-result-list > .catalog-more {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
}

.catalog-empty-request {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.catalog-empty-request strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-empty-request span {
  color: var(--muted);
}

.catalog-empty-request button {
  min-height: 40px;
  padding: 0 12px;
}

.challenge-section,
.ranking-section,
.notice-section {
  margin-top: 16px;
}

.ranking-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.challenge-card,
.ranking-card,
.notice-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

.challenge-card {
  position: relative;
  isolation: isolate;
  padding: 18px;
}

.challenge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 0, rgba(244, 181, 54, 0.18), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(22, 178, 184, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%);
  pointer-events: none;
}

.challenge-card > * {
  position: relative;
  z-index: 1;
}

.challenge-card > .section-head {
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--border-soft) 72%, transparent);
}

.challenge-card .section-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.16;
}

.glove-challenge-card {
  grid-column: 1 / -1;
  width: 100%;
}

.challenge-mini-copy,
.ranking-note,
.ranking-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ranking-board-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
  padding: 4px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--field-bg);
}

.ranking-board-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}

.ranking-board-tabs button.is-active {
  border-color: rgba(244, 181, 54, 0.68);
  color: var(--accent-primary-strong);
  background: var(--chip-active-bg);
  box-shadow: inset 0 0 0 1px rgba(244, 181, 54, 0.18);
}

.notice-card {
  position: sticky;
  top: 92px;
}

.notice-section .notice-card {
  position: static;
}

.notice-page-card {
  max-width: 860px;
  margin: 0 auto;
}

.notice-page-card .notice-list {
  gap: 10px;
}

.notice-page-card .notice-item summary {
  min-height: 54px;
  padding: 11px 12px;
}

.notice-page-card .notice-item p {
  padding: 0 12px 12px;
  font-size: 13px;
}

.notice-head {
  margin-bottom: 10px;
}

.notice-list {
  display: grid;
  gap: 8px;
}

.notice-item {
  border: 1px solid #d8e8ec;
  border-radius: 8px;
  background: #fbfefe;
  overflow: hidden;
}

.notice-item summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.notice-item summary::-webkit-details-marker {
  display: none;
}

.notice-item summary::after {
  content: "+";
  grid-column: 3;
  grid-row: 1;
  color: #2f7f92;
  font-size: 15px;
  font-weight: 1000;
}

.notice-item[open] summary::after {
  content: "-";
}

.notice-item summary span {
  color: #2f7f92;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.notice-item summary strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-item p {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.notice-item ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 12px 12px 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.notice-item li::marker {
  color: var(--accent-strong);
}

.challenge-intro,
.challenge-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.challenge-intro {
  position: relative;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--amber) 24%, var(--border-soft));
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(244, 181, 54, 0.14), rgba(22, 178, 184, 0.08) 48%, transparent),
    color-mix(in srgb, var(--surface-panel) 86%, var(--paper));
}

.challenge-intro::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--amber) 20%, transparent);
  border-radius: 10px;
  pointer-events: none;
}

.challenge-intro-detail,
.challenge-item-panel {
  position: relative;
  min-width: 0;
}

.challenge-item-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border-soft) 78%, transparent);
  border-radius: 11px;
  background:
    radial-gradient(circle at 14% 0, rgba(244, 181, 54, 0.1), transparent 30%),
    color-mix(in srgb, var(--surface-panel) 84%, var(--field-soft));
}

.challenge-item-panel > .maple-item-detail-box {
  justify-self: center;
  width: 100%;
  max-width: 520px;
}

.challenge-intro-detail {
  display: grid;
  justify-items: center;
  gap: 10px;
  align-self: stretch;
}

.challenge-intro-detail > .maple-item-detail-box {
  justify-self: center;
  width: 100%;
  max-width: 520px;
}

.challenge-prize-label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--border-soft));
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(244, 181, 54, 0.16), rgba(244, 181, 54, 0.04)),
    var(--field-soft);
}

.challenge-prize-label span {
  color: var(--accent-primary-strong);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.challenge-prize-label strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 1000;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-intro-detail > .maple-item-detail-box,
.challenge-intro-detail > .maker-item-detail {
  min-height: 470px;
}

.challenge-intro-detail > .maker-item-detail .maple-item-detail-box {
  min-height: 470px;
}

.claw-scroll-effect {
  --scroll-main: #f6cf44;
  --scroll-soft: rgba(255, 236, 134, 0.58);
  --scroll-deep: #8d5b07;
  position: absolute;
  inset: 0;
  z-index: 14;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92);
}

.claw-scroll-effect.show {
  animation: claw-scroll-shell 1120ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.claw-scroll-effect.is-fail {
  --scroll-main: #9aa6ad;
  --scroll-soft: rgba(94, 111, 119, 0.42);
  --scroll-deep: #39464c;
}

.claw-scroll-effect.is-destroyed {
  --scroll-main: #ff5959;
  --scroll-soft: rgba(255, 77, 77, 0.48);
  --scroll-deep: #6c171d;
}

.claw-scroll-effect::before,
.claw-scroll-effect::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.claw-scroll-effect::before {
  width: min(240px, 72%);
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 7%, var(--scroll-soft) 8% 36%, transparent 37%),
    repeating-conic-gradient(from 12deg, transparent 0 13deg, color-mix(in srgb, var(--scroll-main) 74%, white) 14deg 18deg, transparent 19deg 32deg);
  filter: drop-shadow(0 0 16px var(--scroll-soft));
  animation: claw-scroll-burst 1120ms ease-out both;
}

.claw-scroll-effect::after {
  width: min(178px, 58%);
  aspect-ratio: 1;
  border: 3px solid color-mix(in srgb, var(--scroll-main) 78%, white);
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, 0.16),
    0 0 22px var(--scroll-soft),
    inset 0 0 18px var(--scroll-soft);
  animation: claw-scroll-ring 1120ms ease-out both;
}

.claw-scroll-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(206px, 66%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.86) 49% 51%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, 0.86) 49% 51%, transparent 53%);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: claw-scroll-cross 1120ms ease-out both;
}

.claw-scroll-badge {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 116px;
  justify-items: center;
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--scroll-main) 82%, white), var(--scroll-deep));
  box-shadow: 0 8px 22px rgba(19, 24, 30, 0.24), inset 0 1px rgba(255, 255, 255, 0.42);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
  animation: claw-scroll-badge 1120ms ease-out both;
}

.claw-scroll-badge strong {
  font-size: 25px;
  font-weight: 1000;
  line-height: 1;
}

.claw-scroll-badge span {
  max-width: 170px;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claw-scroll-effect i {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--scroll-main) 84%, white);
  box-shadow: 0 0 12px color-mix(in srgb, var(--scroll-main) 70%, white);
  transform: translate(-50%, -50%) scale(0);
  animation: claw-scroll-spark 1120ms ease-out both;
  animation-delay: calc(var(--i) * 22ms);
}

.claw-scroll-effect.is-fail::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.65) 0 6%, var(--scroll-soft) 8% 38%, transparent 39%),
    repeating-conic-gradient(from 18deg, transparent 0 17deg, rgba(75, 88, 96, 0.6) 18deg 28deg, transparent 29deg 42deg);
  filter: blur(0.2px) drop-shadow(0 0 12px rgba(68, 79, 86, 0.28));
}

.claw-scroll-effect.is-fail .claw-scroll-ring {
  background:
    linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.75) 48% 52%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, rgba(255, 255, 255, 0.75) 48% 52%, transparent 55%);
}

.claw-scroll-effect.is-destroyed .claw-scroll-ring {
  background:
    linear-gradient(35deg, transparent 43%, rgba(255, 255, 255, 0.8) 47% 52%, transparent 56%),
    linear-gradient(-25deg, transparent 43%, rgba(255, 255, 255, 0.8) 47% 52%, transparent 56%),
    linear-gradient(90deg, transparent 47%, rgba(255, 120, 120, 0.9) 49% 51%, transparent 53%);
}

@keyframes claw-scroll-shell {
  0% { opacity: 0; transform: scale(0.86); }
  12% { opacity: 1; transform: scale(1.03); }
  68% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes claw-scroll-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.22) rotate(-18deg); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(0.9) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.34) rotate(38deg); }
}

@keyframes claw-scroll-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.28); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(0.9); }
  76% { opacity: 0.72; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28); }
}

@keyframes claw-scroll-cross {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-20deg); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(0.95) rotate(4deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18) rotate(34deg); }
}

@keyframes claw-scroll-badge {
  0% { opacity: 0; transform: translateY(10px) scale(0.82); }
  18% { opacity: 1; transform: translateY(0) scale(1.04); }
  58% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

@keyframes claw-scroll-spark {
  0%, 12% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

.challenge-intro-copy,
.challenge-side,
.challenge-control-card {
  min-width: 0;
}

.challenge-intro-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 360px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--border-soft) 78%, transparent);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0, rgba(244, 181, 54, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.2)),
    color-mix(in srgb, var(--surface-panel) 78%, var(--field-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.challenge-intro-copy h3,
.challenge-control-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.challenge-intro-copy p,
.challenge-control-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.challenge-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.challenge-hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--amber) 38%, var(--border-soft));
  border-radius: 999px;
  color: var(--accent-primary-strong);
  background: color-mix(in srgb, var(--accent-primary-soft) 78%, transparent);
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.challenge-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.challenge-stat-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border-soft) 82%, transparent);
  border-radius: 9px;
  background: var(--field-soft);
}

.challenge-stat-card span,
.challenge-step span,
.challenge-reward-strip span,
.challenge-reward-strip em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.32;
}

.challenge-stat-card strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-stat-card em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--accent-info);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-step-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.challenge-step {
  position: relative;
  min-width: 0;
  padding: 10px 9px 10px 38px;
  border: 1px solid color-mix(in srgb, var(--border-soft) 82%, transparent);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.14));
}

.challenge-step em {
  position: absolute;
  left: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #241703;
  background: linear-gradient(180deg, #ffd872, #f4b536);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  box-shadow: 0 4px 10px rgba(244, 181, 54, 0.22);
}

.challenge-step strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-reward-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--border-soft));
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(244, 181, 54, 0.18), rgba(22, 178, 184, 0.08)),
    var(--field-soft);
}

.challenge-reward-strip span {
  grid-row: span 2;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid color-mix(in srgb, var(--amber) 32%, transparent);
  color: var(--accent-primary-strong);
  letter-spacing: 0.02em;
}

.challenge-reward-strip strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-reward-strip em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-login-note {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8c982;
  border-radius: 8px;
  color: #70511b;
  background: #fff8df;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.35;
}

.challenge-login-note.is-ready {
  border-color: #b9dcc7;
  color: #25643c;
  background: #edf8ef;
}

.challenge-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.challenge-status-strip span,
.challenge-score-box {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe9ec;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.22)),
    #f7fcfc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.challenge-status-strip em,
.challenge-score-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.challenge-status-strip strong,
.challenge-score-box strong {
  display: block;
  margin-top: 3px;
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 1000;
}

.challenge-control-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(244, 181, 54, 0.1), transparent 30%),
    linear-gradient(180deg, #fbfefe, #f5fbfc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.challenge-cube-simulator {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.challenge-cube-simulator .section-head {
  margin-bottom: 0;
}

.challenge-cube-simulator .section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.challenge-cube-select {
  display: grid;
  gap: 5px;
}

.challenge-cube-select > span,
.challenge-cube-simulator small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.challenge-cube-simulator small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-cube-window .item-preview {
  grid-template-columns: minmax(132px, 0.7fr) minmax(230px, 1.3fr);
  gap: 12px;
  padding: 16px;
}

.challenge-cube-window .cube-visual {
  min-height: 218px;
}

.challenge-cube-window .cube-image {
  width: 92px;
  height: 92px;
}

.challenge-cube-window .cube-image.is-miracle-cube-image {
  width: 122px;
  height: 122px;
}

.challenge-cube-window .potential-card {
  min-height: 218px;
  padding: 14px;
}

.challenge-cube-window .potential-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
}

.challenge-cube-window .cube-actions {
  grid-template-columns: 1fr 1.35fr 1fr;
  padding: 0 16px 16px;
}

.challenge-cube-window .cube-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.challenge-control-card label {
  display: grid;
  gap: 5px;
}

.challenge-control-card label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.challenge-scroll-field {
  display: grid;
  gap: 8px;
}

.challenge-scroll-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.challenge-scroll-picker {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}

.challenge-scroll-option {
  min-height: 96px;
}

.claw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.challenge-intro .claw-actions .primary,
.challenge-control-card .claw-actions .primary {
  min-height: 42px;
  padding-inline: 16px;
  font-weight: 1000;
}

.challenge-intro .claw-actions .primary {
  min-width: 156px;
}

.challenge-side {
  display: grid;
  gap: 10px;
}

.challenge-control-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.challenge-rule-card,
.challenge-rank-insight {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe9ec;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.18)),
    #f7fcfc;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.challenge-rule-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--teal-dark);
  font-size: 11px;
}

.challenge-rule-card span {
  display: block;
  color: var(--muted);
}

.challenge-rank-insight {
  border-color: #f1d58b;
  background: #fff8df;
  color: #70511b;
}

.challenge-cube-visual {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

.challenge-cube-visual img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.challenge-cube-visual strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.challenge-log {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.challenge-log li {
  min-height: 28px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid #dbe9ec;
  border-radius: 7px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26)),
    #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-theme="dark"] .challenge-login-note,
:root[data-theme="dark"] .challenge-status-strip span,
:root[data-theme="dark"] .challenge-score-box,
:root[data-theme="dark"] .challenge-control-card,
:root[data-theme="dark"] .challenge-rule-card,
:root[data-theme="dark"] .challenge-rank-insight,
:root[data-theme="dark"] .challenge-log li {
  color-scheme: light;
}

:root[data-theme="dark"] .challenge-control-card,
:root[data-theme="dark"] .challenge-status-strip span,
:root[data-theme="dark"] .challenge-score-box,
:root[data-theme="dark"] .challenge-rule-card,
:root[data-theme="dark"] .challenge-log li {
  border-color: #dbe9ec;
  background: #f7fcfc;
  color: #18323a;
}

:root[data-theme="dark"] .challenge-control-card {
  border-color: #cfe3e8;
  background: #fbfefe;
}

:root[data-theme="dark"] .challenge-control-card h3,
:root[data-theme="dark"] .challenge-score-box strong,
:root[data-theme="dark"] .challenge-log li {
  color: #18323a;
}

:root[data-theme="dark"] .challenge-control-card p,
:root[data-theme="dark"] .challenge-control-card small,
:root[data-theme="dark"] .challenge-control-card label > span,
:root[data-theme="dark"] .challenge-status-strip em,
:root[data-theme="dark"] .challenge-score-box span,
:root[data-theme="dark"] .challenge-rule-card span,
:root[data-theme="dark"] .challenge-cube-select > span,
:root[data-theme="dark"] .challenge-cube-simulator small {
  color: #5d7480;
}

:root[data-theme="dark"] .challenge-status-strip strong,
:root[data-theme="dark"] .challenge-rule-card strong,
:root[data-theme="dark"] .challenge-cube-visual strong {
  color: #075f67;
}

:root[data-theme="dark"] .challenge-login-note {
  border-color: #d8c982;
  background: #fff8df;
  color: #70511b;
}

:root[data-theme="dark"] .challenge-login-note.is-ready {
  border-color: #b9dcc7;
  background: #edf8ef;
  color: #25643c;
}

:root[data-theme="dark"] .challenge-rank-insight {
  border-color: #f1d58b;
  background: #fff8df;
  color: #70511b;
}

:root[data-theme="dark"] .challenge-control-card input,
:root[data-theme="dark"] .challenge-control-card select,
:root[data-theme="dark"] .challenge-cube-select select {
  border-color: #c6dbe2;
  background: #ffffff;
  color: #18323a;
  color-scheme: light;
}

:root[data-theme="dark"] .challenge-cube-simulator .attempt-badge {
  border: 1px solid rgba(92, 225, 222, 0.32);
  background:
    linear-gradient(180deg, rgba(32, 184, 186, 0.16), rgba(18, 46, 53, 0.28)),
    #111f25;
  color: #dffcff;
}

:root[data-theme="dark"] .challenge-cube-simulator .attempt-badge span {
  color: #92cbd0;
}

:root[data-theme="dark"] .challenge-cube-simulator .attempt-badge strong {
  color: #f3feff;
}

:root[data-theme="dark"] .challenge-cube-simulator .meso-badge {
  border-color: rgba(255, 199, 87, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 194, 71, 0.16), rgba(45, 34, 14, 0.4)),
    #181711;
  color: #ffe7a6;
}

:root[data-theme="dark"] .challenge-cube-simulator .meso-badge span {
  color: #c9a866;
}

:root[data-theme="dark"] .challenge-cube-simulator .meso-badge strong {
  color: #fff1bf;
}

:root[data-theme="dark"] .challenge-intro {
  border-color: rgba(244, 181, 54, 0.22);
  background:
    radial-gradient(circle at 0 0, rgba(244, 181, 54, 0.14), transparent 32%),
    radial-gradient(circle at 100% 18%, rgba(22, 178, 184, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015)),
    #101920;
}

:root[data-theme="dark"] .challenge-intro::before {
  border-color: rgba(244, 181, 54, 0.12);
}

:root[data-theme="dark"] .challenge-intro-copy,
:root[data-theme="dark"] .challenge-item-panel,
:root[data-theme="dark"] .challenge-stat-card,
:root[data-theme="dark"] .challenge-step,
:root[data-theme="dark"] .challenge-prize-label,
:root[data-theme="dark"] .challenge-reward-strip,
:root[data-theme="dark"] .challenge-control-card,
:root[data-theme="dark"] .challenge-status-strip span,
:root[data-theme="dark"] .challenge-score-box,
:root[data-theme="dark"] .challenge-rule-card,
:root[data-theme="dark"] .challenge-log li {
  color-scheme: dark;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012)),
    #121e25;
  color: var(--ink);
}

:root[data-theme="dark"] .challenge-intro-copy {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .challenge-hero-badges span {
  border-color: rgba(244, 181, 54, 0.28);
  background: rgba(244, 181, 54, 0.1);
  color: #ffd872;
}

:root[data-theme="dark"] .challenge-prize-label span,
:root[data-theme="dark"] .challenge-reward-strip span,
:root[data-theme="dark"] .challenge-stat-card em {
  color: #ffd872;
}

:root[data-theme="dark"] .challenge-prize-label strong,
:root[data-theme="dark"] .challenge-stat-card strong,
:root[data-theme="dark"] .challenge-step strong,
:root[data-theme="dark"] .challenge-reward-strip strong,
:root[data-theme="dark"] .challenge-control-card h3,
:root[data-theme="dark"] .challenge-score-box strong,
:root[data-theme="dark"] .challenge-log li {
  color: #edf6f8;
}

:root[data-theme="dark"] .challenge-intro-copy p,
:root[data-theme="dark"] .challenge-control-card p,
:root[data-theme="dark"] .challenge-control-card small,
:root[data-theme="dark"] .challenge-control-card label > span,
:root[data-theme="dark"] .challenge-status-strip em,
:root[data-theme="dark"] .challenge-score-box span,
:root[data-theme="dark"] .challenge-rule-card span,
:root[data-theme="dark"] .challenge-stat-card span,
:root[data-theme="dark"] .challenge-step span,
:root[data-theme="dark"] .challenge-reward-strip em,
:root[data-theme="dark"] .challenge-cube-select > span,
:root[data-theme="dark"] .challenge-cube-simulator small {
  color: #9fb2bb;
}

:root[data-theme="dark"] .challenge-status-strip strong,
:root[data-theme="dark"] .challenge-rule-card strong,
:root[data-theme="dark"] .challenge-cube-visual strong {
  color: #78e6ec;
}

:root[data-theme="dark"] .challenge-login-note {
  color-scheme: dark;
  border-color: rgba(244, 181, 54, 0.32);
  background: rgba(244, 181, 54, 0.12);
  color: #ffe3a3;
}

:root[data-theme="dark"] .challenge-login-note.is-ready {
  border-color: rgba(122, 230, 170, 0.32);
  background: rgba(56, 166, 105, 0.14);
  color: #baf2cf;
}

:root[data-theme="dark"] .challenge-rank-insight {
  border-color: rgba(244, 181, 54, 0.32);
  background: rgba(244, 181, 54, 0.12);
  color: #ffe3a3;
}

.maple-item-potential-lines {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: #b68dff;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  text-shadow: 1px 1px #000;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 82px 72px 150px 92px 110px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid #dbe9ec;
  border-radius: 8px;
  background: #ffffff;
}

.ranking-rank {
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 1000;
}

.ranking-item {
  justify-content: flex-start;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #d4e8ec;
  border-radius: 7px;
  color: var(--ink);
  background: #f7fcfc;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.ranking-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-badge {
  display: inline-flex;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 999px;
  color: #064f56;
  background: #e8f7f5;
  font-size: 11px;
  font-weight: 900;
}

.ranking-medal {
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.ranking-medal.gold {
  border-color: #e1a831;
  color: #4a2f00;
  background: #fff0a8;
}

.ranking-medal.silver {
  border-color: #a7b5c4;
  color: #415061;
  background: #eef3f8;
}

.ranking-medal.bronze {
  border-color: #d69a62;
  color: #5b2e13;
  background: #ffe1c4;
}

.ranking-medal.fourth {
  border-color: #9bc5da;
  color: #27576c;
  background: #e2f6ff;
}

.ranking-medal.fifth {
  border-color: #c4bdd8;
  color: #5b4b80;
  background: #eee8ff;
}

.ranking-medal.is-empty {
  color: transparent;
  background: transparent;
  border-color: transparent;
}

#rankingList .ranking-badge {
  color: #064f56;
}

#rankingList .ranking-medal.gold {
  color: #4a2f00;
}

#rankingList .ranking-medal.silver {
  color: #415061;
}

#rankingList .ranking-medal.bronze {
  color: #5b2e13;
}

#rankingList .ranking-medal.fourth {
  color: #27576c;
}

#rankingList .ranking-medal.fifth {
  color: #5b4b80;
}

.ranking-row > span:not(.ranking-badge):not(.ranking-medal) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ranking-empty {
  padding: 18px;
  border: 1px dashed #cfe3e8;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfefe;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.zakum-section-label.compact {
  margin-top: 0;
}

.zakum-party-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zakum-party-actions span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.zakum-party-actions .icon {
  width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.zakum-party-actions .icon:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.zakum-ratio-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 9px 4px 5px;
  border: 1px solid #b8d7df;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
}

.zakum-ratio-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.zakum-ratio-switch-track {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #c7d9de;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.zakum-ratio-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(30, 74, 82, 0.24);
  content: "";
  transition: transform 0.16s ease;
}

.zakum-ratio-switch input:checked + .zakum-ratio-switch-track {
  background: var(--teal);
}

.zakum-ratio-switch input:checked + .zakum-ratio-switch-track::after {
  transform: translateX(18px);
}

.zakum-ratio-switch input:focus-visible + .zakum-ratio-switch-track {
  box-shadow: 0 0 0 3px rgba(24, 148, 159, 0.18);
}

.zakum-ratio-switch-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.zakum-ratio-switch input:checked ~ .zakum-ratio-switch-text {
  color: var(--teal-dark);
}

.zakum-member-head,
.zakum-member-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(86px, 0.68fr) minmax(86px, 0.68fr);
  align-items: center;
  gap: 6px;
}

.zakum-party-card.is-ratio-enabled .zakum-member-head,
.zakum-party-card.is-ratio-enabled .zakum-member-row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(72px, 0.52fr) minmax(86px, 0.68fr) minmax(86px, 0.68fr);
}

.zakum-party-card:not(.is-ratio-enabled) [data-zakum-ratio-column] {
  display: none;
}

.zakum-member-head {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.zakum-head-stack {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}

.zakum-head-stack small {
  color: #2f7f92;
  font-size: 10px;
  font-weight: 900;
}

.zakum-member-list {
  display: grid;
  gap: 6px;
}

.zakum-member-row {
  padding: 6px;
  border: 1px solid #dbe9ec;
  border-radius: 8px;
  background: #ffffff;
}

.zakum-member-row.is-me {
  border-color: #9fd3d2;
  background: #f0fbfa;
}

.zakum-member-row strong {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.zakum-member-row input {
  min-height: 34px;
  padding: 0 8px;
}

.zakum-sale-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.zakum-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.zakum-section-label strong {
  color: var(--ink);
  font-size: 14px;
}

.zakum-mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: #eefafb;
}

.zakum-mode-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.zakum-mode-tabs button.is-active {
  color: #ffffff;
  background: var(--teal);
}

.zakum-simple-grid,
.zakum-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.zakum-simple-grid .span-2 {
  grid-column: span 2;
}

.zakum-comp-grid {
  margin-top: 8px;
}

.zakum-subtitle {
  margin-top: 4px;
  padding: 7px 10px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #eefafb;
  font-size: 13px;
  font-weight: 900;
}

.zakum-drop-list {
  display: grid;
  gap: 6px;
}

.zakum-drop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr) 34px;
  gap: 6px;
}

.zakum-drop-row input {
  min-height: 36px;
}

.zakum-drop-row button {
  min-height: 36px;
  border: 1px solid #e2c7c7;
  border-radius: 8px;
  color: #9a3248;
  background: #fff6f6;
  font-size: 18px;
  font-weight: 900;
}

.zakum-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.zakum-item-actions strong {
  color: var(--teal-dark);
  font-size: 13px;
  white-space: nowrap;
}

.zakum-input-grid fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.zakum-input-grid legend {
  padding: 0 6px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.zakum-result-card {
  align-self: start;
}

.zakum-rule-card {
  grid-column: 1 / -1;
}

.zakum-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}

.zakum-summary-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: #f3f8fa;
}

.zakum-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.zakum-summary-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.zakum-help-line {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #ead9aa;
  border-radius: 8px;
  background: #fffaf0;
  color: #8a5300;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.zakum-help-line strong {
  color: #654000;
}

.zakum-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.zakum-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  background: #ffffff;
}

.zakum-table th,
.zakum-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.zakum-table th {
  color: var(--teal-dark);
  background: #eefafb;
  font-weight: 900;
}

.zakum-table th:first-child,
.zakum-table td:first-child {
  text-align: left;
}

.zakum-table tbody tr:last-child td {
  border-bottom: 0;
}

.zakum-table tr.is-me td {
  background: #fffaf0;
  font-weight: 900;
}

.zakum-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.zakum-check {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #ead9aa;
  border-radius: 8px;
  background: #fffaf0;
  color: #8a5300;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.zakum-detail {
  margin-top: 10px;
}

.zakum-detail summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.zakum-fee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.zakum-fee-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.zakum-fee-grid strong {
  color: var(--ink);
}

.zakum-fee-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.zakum-fee-grid em {
  color: var(--teal-dark);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

:root[data-theme="dark"] .zakum-party-card,
:root[data-theme="dark"] .zakum-sale-card,
:root[data-theme="dark"] .zakum-summary-grid,
:root[data-theme="dark"] .zakum-table-wrap,
:root[data-theme="dark"] .zakum-table,
:root[data-theme="dark"] .zakum-help-line,
:root[data-theme="dark"] .zakum-check,
:root[data-theme="dark"] .zakum-detail,
:root[data-theme="dark"] .zakum-fee-grid {
  color-scheme: light;
}

:root[data-theme="dark"] .zakum-party-card,
:root[data-theme="dark"] .zakum-sale-card {
  border-color: #cfe3e8;
  background: #f7fcfc;
  color: #18323a;
}

:root[data-theme="dark"] .zakum-sale-card {
  background: #fbfefe;
}

:root[data-theme="dark"] .zakum-section-label strong,
:root[data-theme="dark"] .zakum-summary-grid strong,
:root[data-theme="dark"] .zakum-table td,
:root[data-theme="dark"] .zakum-fee-grid strong {
  color: #18323a;
}

:root[data-theme="dark"] .zakum-member-head,
:root[data-theme="dark"] .zakum-ratio-switch-text,
:root[data-theme="dark"] .zakum-summary-grid span,
:root[data-theme="dark"] .zakum-table td span,
:root[data-theme="dark"] .zakum-detail summary,
:root[data-theme="dark"] .zakum-fee-grid span {
  color: #5d7480;
}

:root[data-theme="dark"] .zakum-party-actions span,
:root[data-theme="dark"] .zakum-member-row strong,
:root[data-theme="dark"] .zakum-head-stack small,
:root[data-theme="dark"] .zakum-item-actions strong,
:root[data-theme="dark"] .zakum-input-grid legend,
:root[data-theme="dark"] .zakum-subtitle,
:root[data-theme="dark"] .zakum-fee-grid em {
  color: #075f67;
}

:root[data-theme="dark"] .zakum-ratio-switch {
  border-color: #b8d7df;
  background: #ffffff;
  color: #18323a;
}

:root[data-theme="dark"] .zakum-member-row {
  border-color: #dbe9ec;
  background: #ffffff;
  color: #18323a;
}

:root[data-theme="dark"] .zakum-member-row.is-me {
  border-color: #9fd3d2;
  background: #f0fbfa;
}

:root[data-theme="dark"] .zakum-section input,
:root[data-theme="dark"] .zakum-section select,
:root[data-theme="dark"] .zakum-section textarea {
  border-color: #c6dbe2;
  background: #ffffff;
  color: #18323a;
  color-scheme: light;
}

:root[data-theme="dark"] .zakum-section input::placeholder,
:root[data-theme="dark"] .zakum-section textarea::placeholder {
  color: #7b929d;
}

:root[data-theme="dark"] .zakum-mode-tabs {
  border-color: #cfe3e8;
  background: #eefafb;
}

:root[data-theme="dark"] .zakum-mode-tabs button {
  color: #5d7480;
  background: transparent;
}

:root[data-theme="dark"] .zakum-mode-tabs button.is-active {
  color: #ffffff;
  background: #008c91;
}

:root[data-theme="dark"] .zakum-summary-grid div,
:root[data-theme="dark"] .zakum-fee-grid div {
  border-color: #cfe3e8;
  background: #f3f8fa;
  color: #18323a;
}

:root[data-theme="dark"] .zakum-help-line,
:root[data-theme="dark"] .zakum-check {
  border-color: #ead9aa;
  background: #fffaf0;
  color: #8a5300;
}

:root[data-theme="dark"] .zakum-help-line strong {
  color: #654000;
}

:root[data-theme="dark"] .zakum-table-wrap {
  border-color: #d5e6ea;
}

:root[data-theme="dark"] .zakum-table {
  background: #ffffff;
  color: #18323a;
}

:root[data-theme="dark"] .zakum-table th,
:root[data-theme="dark"] .zakum-table td {
  border-color: #d5e6ea;
}

:root[data-theme="dark"] .zakum-table th {
  color: #075f67;
  background: #eefafb;
}

:root[data-theme="dark"] .zakum-table tr.is-me td {
  background: #fffaf0;
  color: #18323a;
}

.boss-drop-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 16px;
  margin-top: 16px;
}

.boss-drop-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.boss-drop-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.boss-drop-controls select {
  flex: 1 1 172px;
  min-width: 172px;
  min-height: 38px;
}

.boss-drop-window {
  overflow: hidden;
  border: 1px solid #2e5960;
  border-radius: 8px;
  background: #17343d;
  color: #f5fbff;
}

.boss-drop-window.is-rolling .boss-monster-stage img {
  animation: bossHit 0.52s ease-out;
}

.boss-drop-window.is-rolling .boss-drop-item {
  animation: bossDropPop 0.34s ease-out both;
}

.boss-monster-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at 24% 22%, rgba(250, 230, 126, 0.18), transparent 34%),
    linear-gradient(135deg, #214f5d, #112c35 68%);
}

.boss-monster-stage {
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 1px solid rgba(202, 238, 244, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 72%, rgba(244, 247, 221, 0.18), transparent 42%),
    rgba(0, 0, 0, 0.18);
}

.boss-monster-stage img {
  max-width: min(360px, 100%);
  max-height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.38));
}

.boss-monster-copy span {
  display: inline-flex;
  margin-bottom: 8px;
  color: #9be1ea;
  font-size: 12px;
  font-weight: 900;
}

.boss-monster-copy h3 {
  margin: 0;
  color: #ffffff;
  font-size: 30px;
  letter-spacing: 0;
}

.boss-monster-copy p {
  margin: 8px 0 0;
  color: #d8f0f3;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.boss-drop-result {
  padding: 14px;
  border-top: 1px solid rgba(202, 238, 244, 0.2);
}

.boss-meso-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #d8f0f3;
  font-size: 13px;
  font-weight: 900;
}

.boss-meso-line strong {
  color: #ffe089;
}

.boss-drop-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 8px;
  min-height: 82px;
  padding: 10px;
  overflow: visible;
  border: 1px solid rgba(202, 238, 244, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  white-space: normal;
}

.boss-drop-item {
  position: relative;
  display: grid;
  flex: 0 0 58px;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #b8dce3;
  border-radius: 8px;
  background: #f8ffff;
  cursor: pointer;
}

.boss-drop-item:hover,
.boss-drop-item:focus,
.boss-drop-item.is-tooltip-visible {
  border-color: #ffcf45;
  box-shadow: 0 0 0 3px rgba(255, 207, 69, 0.24);
}

.boss-drop-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.boss-drop-icon-fallback {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 220, 99, 0.7);
  border-radius: 7px;
  color: #ffe58b;
  background: #1b2638;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
}

.boss-drop-icon-fallback[hidden] {
  display: none;
}

.boss-drop-meso-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #9b6b10;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff0a6 0 18%, #ffd24a 42%, #c98210 100%);
  color: #5b3900;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
}

.boss-drop-item.is-book {
  flex-basis: 72px;
  grid-template-rows: 34px 17px;
  align-content: center;
  gap: 2px;
  width: 72px;
  height: 62px;
  padding: 4px;
}

.boss-drop-item.is-book img {
  width: 34px;
  height: 34px;
}

.boss-drop-book-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 1px 3px;
  border: 1px solid rgba(255, 234, 107, 0.55);
  border-radius: 4px;
  color: #fff6b0;
  background: #25304d;
  font-weight: 900;
  line-height: 1.1;
}

.boss-drop-book-label small {
  color: #9fe8ff;
  font-size: 9px;
  font-weight: 900;
}

.boss-drop-book-label i {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-drop-item em {
  position: absolute;
  right: 3px;
  bottom: 2px;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 999px;
  color: #ffffff;
  background: #1f6e78;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.3;
}

.boss-drop-chance-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  display: block;
  min-width: 0;
  padding: 1px 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 99, 0.62);
  border-radius: 5px;
  color: #fff2ae;
  background: rgba(20, 29, 42, 0.92);
  font-size: 9px;
  font-weight: 1000;
  line-height: 1.1;
  pointer-events: none;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-drop-item.is-book > em {
  bottom: 20px;
}

.boss-drop-item.compact {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
}

.boss-drop-item.compact.has-chance {
  flex-basis: 54px;
  width: 54px;
  height: 54px;
  padding-bottom: 12px;
}

.boss-drop-item.compact img {
  width: 34px;
  height: 34px;
}

.boss-drop-item.compact.has-chance img {
  width: 30px;
  height: 30px;
}

.boss-drop-item.compact.has-chance .boss-drop-icon-fallback {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.boss-drop-item.compact.is-book {
  flex-basis: 58px;
  grid-template-rows: 30px 16px;
  width: 58px;
  height: 54px;
  padding: 3px;
}

.boss-drop-item.compact.is-book img {
  width: 30px;
  height: 30px;
}

.boss-drop-item.compact.is-book.has-chance {
  flex-basis: 72px;
  grid-template-rows: 27px 15px 12px;
  width: 72px;
  height: 68px;
  padding-bottom: 13px;
}

.boss-drop-item.compact.is-book.has-chance img {
  width: 28px;
  height: 28px;
}

.boss-drop-item.compact.is-book.has-chance .boss-drop-icon-fallback {
  width: 28px;
  height: 28px;
}

.boss-drop-item.compact.is-book > em {
  bottom: 17px;
}

.boss-drop-item.compact .boss-drop-book-label {
  grid-template-columns: minmax(0, 1fr);
  padding: 1px 2px;
}

.boss-drop-item.compact .boss-drop-book-label i {
  font-size: 9px;
}

.boss-drop-item.compact .boss-drop-book-label small {
  display: none;
}

.boss-drop-item .item-tooltip {
  display: none !important;
}

.boss-drop-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.boss-drop-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.boss-drop-stat-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: #f3f8fa;
}

.boss-drop-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.boss-drop-stat-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
}

.boss-drop-pool {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.boss-drop-pool-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.boss-drop-pool-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-drop-pool-row span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.boss-drop-empty {
  padding: 10px;
  color: #cfeff4;
  font-weight: 900;
}

.boss-drop-pool .boss-drop-empty {
  color: var(--muted);
}

@keyframes bossHit {
  0% {
    transform: translateX(0) scale(1);
  }
  34% {
    transform: translateX(-8px) scale(1.02);
  }
  68% {
    transform: translateX(5px) scale(0.99);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes bossDropPop {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.86);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stat-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(360px, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.stat-summary-card {
  grid-column: 1 / -1;
}

.stat-ranking-card {
  grid-column: 1 / -1;
}

.stat-upload-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(180px, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.stat-upload-box {
  min-height: 220px;
  padding: 14px;
  border: 2px dashed #99c8d0;
  border-radius: 8px;
  background: #f5fbfc;
  align-content: center;
  text-align: center;
}

.stat-upload-box input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.stat-upload-box strong,
.stat-upload-box em {
  display: block;
}

.stat-upload-box strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
}

.stat-upload-box em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.stat-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid #bed7dc;
  border-radius: 8px;
  background: #eef6f7;
}

.stat-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  image-rendering: pixelated;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(320px, 720px);
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.support-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.feature-request-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.feature-request-form label,
.feature-request-form p {
  margin: 0;
}

.feature-request-form label {
  display: grid;
  gap: 6px;
}

.feature-request-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.feature-request-form .span-2 {
  grid-column: 1 / -1;
}

.feature-request-form textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #b7d8dd;
  border-radius: 8px;
  background: #fbfefe;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.45;
}

.feature-request-form button {
  min-height: 42px;
}

.feature-request-form button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.feature-request-form p {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.donate-name-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 12px;
  padding: 26px 16px;
  border: 1px solid #d7c169;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff8d8, #fffef4);
  text-align: center;
}

.donate-name-card span {
  color: #6a4300;
  font-size: 13px;
  font-weight: 900;
}

.donate-name-card strong {
  color: #2c2512;
  font-size: 44px;
  line-height: 1;
}

.donate-name-card p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.ocr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.ocr-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ocr-text {
  width: 100%;
  min-height: 92px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #bed7dc;
  border-radius: 8px;
  color: var(--ink);
  background: #fbfefe;
  font: 12px/1.45 Consolas, "Noto Sans KR", monospace;
  resize: vertical;
}

.stat-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.stat-summary-grid div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.stat-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stat-summary-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.stat-ranking-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.stat-ranking-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.stat-ranking-list .rank {
  color: #0e6975;
  font-size: 18px;
  font-weight: 1000;
}

.stat-ranking-list strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-ranking-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stat-ranking-list em {
  color: #5b3c00;
  font-size: 16px;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}

.stat-ranking-list .empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-weight: 900;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

select,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bed7dc;
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: #fbfefe;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 139, 146, 0.15);
}

.condition-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.condition-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf7f7;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stats-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.stats-grid span,
.mini-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
}

.compact-select {
  width: auto;
  min-width: 118px;
  min-height: 34px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 900;
}

.efficiency-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fcfc, #ffffff);
}

.efficiency-section {
  margin-top: 16px;
}

.efficiency-section .efficiency-panel {
  gap: 16px;
  margin-top: 0;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
}

.efficiency-basis-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.efficiency-basis-strip span {
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid #bfdde3;
  border-radius: 8px;
  background: #eefafb;
}

.efficiency-basis-strip em,
.efficiency-basis-strip strong {
  display: block;
}

.efficiency-basis-strip em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.efficiency-basis-strip strong {
  margin-top: 5px;
  color: var(--teal-dark);
  font-size: 17px;
}

.efficiency-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
}

.efficiency-inputs,
.efficiency-results {
  min-width: 0;
}

.efficiency-inputs {
  display: grid;
  align-content: start;
  gap: 14px;
}

.efficiency-card-shell {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.maple-stat-window,
.maple-potential-editor {
  min-width: 0;
  border: 2px solid #46535f;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52) 1px, transparent 1px) 0 0 / 4px 4px,
    #d7d4c7;
  box-shadow: inset 0 0 0 2px #f5f8f8, 0 10px 20px rgba(22, 56, 64, 0.1);
  overflow: hidden;
}

.maple-window-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  min-height: 34px;
  padding: 4px 7px 4px 10px;
  border-bottom: 2px solid #8d9fa8;
  background: #f8fbfb;
}

.maple-window-title strong {
  color: #17282e;
  font-size: 13px;
  letter-spacing: 0;
}

.maple-window-title span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #2c7ea7;
  border-radius: 4px;
  background: #5fc4e8;
}

.maple-window-title span::before,
.maple-window-title span::after {
  grid-area: 1 / 1;
  content: "";
  width: 11px;
  height: 2px;
  background: #ffffff;
}

.maple-window-title span::before {
  transform: rotate(45deg);
}

.maple-window-title span::after {
  transform: rotate(-45deg);
}

.maple-window-title.potential {
  background: #fff7d5;
}

.maple-stat-form {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.maple-stat-form.compact {
  padding-top: 8px;
}

.maple-sub-title {
  margin: 1px 8px 0;
  padding: 5px 8px;
  border: 1px solid #7d95a1;
  border-radius: 4px;
  color: #ffffff;
  background: #6f9fc2;
  font-size: 12px;
  font-weight: 900;
}

.maple-stat-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.62fr) minmax(0, 1fr);
  gap: 4px;
  min-height: 31px;
}

.maple-stat-label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #8ba2ad;
  border-radius: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.maple-stat-label.blue {
  background: #5e94bc;
}

.maple-stat-label.pink {
  background: #c75a91;
}

.maple-stat-row input,
.maple-stat-input-wrap,
.maple-stat-range {
  min-width: 0;
  min-height: 31px;
  border: 1px solid #b8b7a8;
  border-radius: 2px;
  background: #f1f0df;
  color: #111f24;
  font-size: 17px;
  font-weight: 900;
}

.maple-stat-row input {
  width: 100%;
  padding: 0 9px;
  box-shadow: none;
}

.maple-stat-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
}

.maple-stat-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: center;
}

.maple-stat-input-wrap input {
  border: 0;
  background: transparent;
}

.maple-stat-range input {
  min-height: 29px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  text-align: right;
}

.maple-stat-input-wrap em,
.maple-stat-range em {
  color: #d71920;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.efficiency-results > .efficiency-basis-strip {
  margin-bottom: 12px;
}

.maple-potential-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px 10px;
  padding: 0 12px 12px;
  padding-bottom: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.58) 1px, transparent 1px) 0 0 / 4px 4px,
    #eee5c2;
}

.maple-potential-editor .maple-window-title {
  grid-column: 1 / -1;
  margin: 0 -12px;
}

.maple-potential-editor label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.maple-potential-editor label > span {
  color: #6a4300;
  font-size: 12px;
  font-weight: 900;
}

.maple-potential-editor select,
.maple-potential-editor input {
  min-height: 36px;
  border-color: #c7b26e;
  background: #fffdf0;
  font-weight: 900;
}

.efficiency-compare-head {
  margin-top: 14px;
}

.efficiency-section .efficiency-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.efficiency-section .efficiency-option-row {
  grid-template-columns: minmax(0, 1fr) 104px;
}

.efficiency-section .efficiency-line-list {
  max-height: 280px;
}

.efficiency-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.efficiency-field-grid input,
.efficiency-option-row input,
.efficiency-option-row select {
  min-height: 38px;
}

.efficiency-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.efficiency-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  overflow: hidden;
}

.efficiency-card.is-muted,
.efficiency-line-list li.is-muted {
  background: #f3f8fa;
  color: var(--muted);
}

.efficiency-card-head {
  display: grid;
  gap: 3px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #ead9aa;
  background: #fff6d9;
}

.efficiency-card-head strong {
  color: var(--ink);
  font-size: 18px;
}

.efficiency-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.efficiency-main-gain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid #ead9aa;
}

.efficiency-main-gain span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.efficiency-main-gain strong {
  color: #8a5300;
  font-size: 30px;
  line-height: 1;
}

.efficiency-stat-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.efficiency-stat-block {
  padding: 10px;
  border: 1px solid #ead9aa;
  border-radius: 8px;
  background: #fffdf7;
}

.efficiency-stat-block > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
}

.efficiency-stat-block.is-muted {
  opacity: 0.62;
}

.efficiency-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.efficiency-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid #ead9aa;
  border-radius: 8px;
  background: #fffdf7;
}

.efficiency-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.efficiency-metric strong {
  display: block;
  color: var(--teal-dark);
  font-size: 15px;
  font-weight: 900;
}

.efficiency-lines-head {
  margin-top: 2px;
}

.efficiency-line-list {
  display: grid;
  gap: 6px;
  max-height: 170px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.efficiency-line-list li {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.efficiency-line-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.efficiency-line-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.efficiency-line-head span {
  color: #8a5300;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.efficiency-line-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.efficiency-line-list span,
.efficiency-line-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
}

.efficiency-line-metrics em {
  min-width: 0;
  padding: 5px 6px;
  border-radius: 6px;
  background: #edf7f8;
  color: var(--teal-dark);
  text-align: center;
}

.history-panel {
  margin-top: 14px;
}

.community-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.rankings-section {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.92fr);
  gap: 16px;
  margin-top: 16px;
}

.rankings-primary-card {
  grid-column: 1 / -1;
}

.rankings-head {
  align-items: center;
}

.rankings-head > div {
  min-width: 0;
}

.ranking-card,
.megaphone-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 56, 64, 0.08);
  min-width: 0;
}

.view-luck .ranking-card,
.view-luck .megaphone-card {
  border-color: #7f8f9a;
  background: #f6f0dc;
}

.megaphone-card-wide {
  min-height: 0;
}

.megaphone-card-wide #megaphoneList {
  max-height: 178px;
}

.megaphone-card .mini-head {
  margin-bottom: 8px;
}

.mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.mini-head h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.mini-head h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ghost.slim {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.ranking-tabs button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #bfdde3;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #eefafb;
  font-size: 13px;
  font-weight: 900;
}

.ranking-tabs button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

#historyList,
#rankingList {
  display: grid;
  gap: 8px;
  max-height: 252px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-section #rankingList {
  max-height: none;
  overflow: visible;
  margin-top: 12px;
}

.ranking-section #rankingList .ranking-rank {
  margin-right: 0;
}

.ranking-section #rankingList .ranking-item span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

#megaphoneList {
  display: block;
  max-height: 252px;
  overflow: auto;
  margin: 0;
  padding: 5px 6px;
  border: 2px solid #b77700;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      180deg,
      #ffd44d 0,
      #ffd44d 24px,
      #f6bd2d 24px,
      #f6bd2d 26px
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 246, 122, 0.9),
    inset 0 -10px 0 rgba(170, 99, 0, 0.12);
  list-style: none;
}

#historyList li,
#rankingList li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

#megaphoneList li {
  border: 0;
  border-radius: 0;
  background: transparent;
}

#historyList li.hit {
  border-color: rgba(255, 200, 63, 0.9);
  background: #fffaf0;
}

#historyList strong {
  display: block;
  margin-bottom: 4px;
}

#historyList span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#rankingList strong,
#megaphoneList strong {
  display: inline-block;
  margin-right: 8px;
}

#rankingList span,
#megaphoneList span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.megaphone-form {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #b88b22;
  border-radius: 4px;
  background: #ffe070;
}

.item-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #bfdde3;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #eefafb;
  font-weight: 900;
}

.megaphone-line {
  position: relative;
  min-height: 24px;
  padding: 2px 4px 2px 6px;
  color: #3c2500;
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
  text-shadow: 0 1px 0 rgba(255, 242, 126, 0.75);
  word-break: keep-all;
}

.megaphone-line.empty {
  color: #5d3b00;
}

#megaphoneList .mega-channel {
  color: #8a3b00;
  font-size: 12px;
}

#megaphoneList .mega-name {
  display: inline;
  margin: 0 2px 0 4px;
  color: #241000;
  font-size: 12px;
}

#megaphoneList .mega-separator,
#megaphoneList .mega-message {
  color: #351c00;
  font-size: 12px;
}

#megaphoneList .mega-count {
  display: inline-flex;
  min-height: 18px;
  margin-left: 5px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: #744600;
  background: transparent;
  font-size: 11px;
  line-height: 17px;
  vertical-align: middle;
}

.mega-item-link {
  position: relative;
  display: inline;
  min-height: 0;
  margin: 0 2px;
  padding: 0;
  border: 0;
  color: #7255dd;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-shadow: 0 1px 0 rgba(255, 242, 126, 0.7);
  vertical-align: baseline;
}

.mega-item-link:hover,
.mega-item-link:focus,
.maker-item-link:hover,
.maker-item-link:focus {
  color: #a020a8;
}

.item-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: none;
  min-width: 280px;
  padding: 10px;
  border: 2px solid #c7c7c7;
  border-radius: 4px;
  color: #f8fffb;
  background: #1b2428;
  box-shadow: var(--shadow);
  text-align: left;
}

.item-link:hover .item-tooltip,
.item-link:focus .item-tooltip,
.item-link.is-tooltip-visible .item-tooltip,
.mega-item-link:hover .item-tooltip,
.mega-item-link:focus .item-tooltip,
.mega-item-link.is-tooltip-visible .item-tooltip,
.maker-item-link:hover .item-tooltip,
.maker-item-link:focus .item-tooltip,
.maker-item-link.is-tooltip-visible .item-tooltip {
  display: grid;
  gap: 6px;
}

.item-tooltip span {
  color: #f8fffb !important;
  font-size: 12px;
  line-height: 1.35;
}

.maple-tooltip .tooltip-name {
  display: block;
  margin-bottom: 2px;
  color: #ffd96b;
  font-size: 13px;
  font-weight: 900;
}

.maple-tooltip .tooltip-name.epic {
  color: #c997ff;
}

.maple-tooltip .tooltip-name.rare {
  color: #8ec4ff;
}

.maple-tooltip .tooltip-meta {
  color: #d7e5e8 !important;
}

.maple-tooltip .tooltip-divider {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.22);
}

.maple-tooltip .tooltip-section {
  color: #ffd96b !important;
  font-weight: 900;
}

.maple-tooltip .tooltip-line {
  color: #a7e7ff !important;
}

#megaphoneList .mega-item-link .item-tooltip {
  display: none !important;
}

#makerHistoryList .maker-item-link .item-tooltip,
#makerHistoryList li > .item-tooltip {
  display: none !important;
}

#rankingList .maker-item-link .item-tooltip {
  display: none !important;
}

.floating-item-tooltip {
  position: fixed;
  z-index: 1000;
  display: none;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 16px));
  padding: 10px;
  border: 2px solid #c7c7c7;
  border-radius: 4px;
  color: #f8fffb;
  background: #1b2428;
  box-shadow: var(--shadow);
  text-align: left;
  pointer-events: none;
}

.floating-item-tooltip.show {
  display: grid;
  gap: 6px;
}

.floating-item-tooltip.is-maker-detail {
  max-width: min(520px, calc(100vw - 16px));
  padding: 0;
  border: 0;
  background: transparent;
}

.floating-item-tooltip.is-maker-detail .maker-maple-detail {
  width: min(520px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
}

.floating-item-tooltip span {
  color: #f8fffb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.floating-item-tooltip.is-maker-detail .maple-item-name span {
  font-size: 18px;
}

.floating-item-tooltip.is-maker-detail .maple-item-reqs span,
.floating-item-tooltip.is-maker-detail .maple-item-stats li,
.floating-item-tooltip.is-maker-detail .maple-item-jobs,
.floating-item-tooltip.is-maker-detail .maple-item-recent {
  font-size: 16px;
  line-height: 1.28;
}

.floating-item-tooltip.is-maker-detail .maple-item-jobs span.is-allowed {
  color: #f23535;
}

.floating-item-tooltip.is-maker-detail .maple-item-jobs span:not(.is-allowed) {
  color: rgba(255, 255, 255, 0.55);
}

.floating-item-tooltip.is-maker-detail .maple-item-recent span {
  color: #e4c5ff;
}

.tables-section {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.rate-card,
.option-card {
  overflow: hidden;
}

.rate-card h2,
.option-card h2 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #e9f4fb;
  color: #204652;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e3eef1;
  text-align: left;
  vertical-align: middle;
}

td:last-child,
.right {
  text-align: right;
  font-weight: 900;
  color: #116b73;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.option-card > div {
  max-height: 420px;
  overflow: auto;
}

.empty {
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid #b7d8dd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 900;
}

:root[data-theme="dark"] .rate-card h2,
:root[data-theme="dark"] .option-card h2 {
  border-color: var(--line);
  background: #172832;
  color: var(--ink);
}

:root[data-theme="dark"] .rate-card th,
:root[data-theme="dark"] .rate-card td,
:root[data-theme="dark"] .option-card th,
:root[data-theme="dark"] .option-card td {
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .rate-card td:last-child,
:root[data-theme="dark"] .rate-card .right,
:root[data-theme="dark"] .option-card td:last-child,
:root[data-theme="dark"] .option-card .right {
  color: #7ae6ec;
}

:root[data-theme="dark"] #historyList li,
:root[data-theme="dark"] #rankingList li,
:root[data-theme="dark"] #makerHistoryList li {
  border-color: var(--line);
  background: var(--field-bg);
  color: var(--ink);
}

:root[data-theme="dark"] #historyList li.hit,
:root[data-theme="dark"] #makerHistoryList li.hit {
  border-color: #7a5a20;
  background: #241d10;
  color: #ffe6a0;
}

:root[data-theme="dark"] #historyList strong,
:root[data-theme="dark"] #rankingList strong,
:root[data-theme="dark"] #makerHistoryList strong {
  color: var(--ink);
}

:root[data-theme="dark"] #historyList span,
:root[data-theme="dark"] #rankingList span,
:root[data-theme="dark"] #makerHistoryList span,
:root[data-theme="dark"] #makerHistoryList em {
  color: var(--muted);
}

:root[data-theme="dark"] .view-luck .ranking-card,
:root[data-theme="dark"] .view-luck .megaphone-card,
:root[data-theme="dark"] .megaphone-form,
:root[data-theme="dark"] #megaphoneList {
  color-scheme: light;
}

:root[data-theme="dark"] .view-luck .ranking-card,
:root[data-theme="dark"] .view-luck .megaphone-card {
  color: #18323a;
}

:root[data-theme="dark"] .view-luck .megaphone-card .mini-head h2,
:root[data-theme="dark"] .view-luck .megaphone-card .mini-head h3 {
  color: #3c2500;
}

:root[data-theme="dark"] .view-luck .megaphone-card .mini-head span,
:root[data-theme="dark"] .view-luck .megaphone-card .mini-head .ghost,
:root[data-theme="dark"] .megaphone-form label > span {
  color: #6a4300;
}

:root[data-theme="dark"] #megaphoneList span,
:root[data-theme="dark"] #megaphoneList .megaphone-line.empty span {
  color: #5d3b00;
}

:root[data-theme="dark"] #megaphoneList strong {
  color: #241000;
}

:root[data-theme="dark"] .view-luck .ranking-card .mini-head h2,
:root[data-theme="dark"] .view-luck .ranking-card .mini-head h3,
:root[data-theme="dark"] .view-luck .ranking-card strong {
  color: #18323a;
}

:root[data-theme="dark"] .view-luck .ranking-card .mini-head span,
:root[data-theme="dark"] .view-luck .ranking-card span,
:root[data-theme="dark"] .view-luck .ranking-card em {
  color: #5d7480;
}

:root[data-theme="dark"] .view-luck .challenge-status,
:root[data-theme="dark"] .view-luck .auto-rank-chip {
  border-color: #cfe3e8;
  background: #f7fcfc;
  color: #18323a;
  color-scheme: light;
}

:root[data-theme="dark"] .view-luck .auto-rank-chip strong,
:root[data-theme="dark"] .view-luck .item-link {
  color: #075f67;
}

:root[data-theme="dark"] .scrollwork-count {
  border-color: #cde3e7;
  background: #eef8f9;
  color: #075f67;
  color-scheme: light;
}

:root[data-theme="dark"] .scrollwork-empty-picker,
:root[data-theme="dark"] .scrollwork-empty-detail {
  border-color: var(--line);
  background: var(--field-soft);
  color: var(--muted);
}

:root[data-theme="dark"] .maker-select-panel .maker-select-copy p {
  color: #ffffff;
  text-shadow:
    0 2px 0 rgba(0, 63, 112, 0.55),
    1px 0 0 rgba(0, 63, 112, 0.28);
}

#makerUseButton {
  background: linear-gradient(180deg, #ffe28a, #f0ad26);
  color: #352100;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

:root[data-theme="dark"] .ranking-board-tabs {
  border-color: var(--line);
  background: var(--field-soft);
}

:root[data-theme="dark"] .ranking-board-tabs button {
  color: var(--muted);
}

:root[data-theme="dark"] .ranking-board-tabs button.is-active {
  border-color: rgba(255, 122, 56, 0.46);
  background: var(--field-bg);
  color: var(--nav-accent);
}

:root[data-theme="dark"] .ranking-row,
:root[data-theme="dark"] .notice-item {
  border-color: var(--line);
  background: var(--field-bg);
  color: var(--ink);
}

:root[data-theme="dark"] .ranking-item {
  border-color: var(--line);
  background: var(--field-soft);
  color: var(--ink);
}

:root[data-theme="dark"] .ranking-rank,
:root[data-theme="dark"] .notice-item summary span,
:root[data-theme="dark"] .notice-item summary::after {
  color: #7ae6ec;
}

:root[data-theme="dark"] .notice-item summary strong {
  color: var(--ink);
}

:root[data-theme="dark"] .notice-item p,
:root[data-theme="dark"] .notice-item ul,
:root[data-theme="dark"] .ranking-row > span:not(.ranking-badge):not(.ranking-medal) {
  color: var(--muted);
}

:root[data-theme="dark"] .ranking-badge {
  background: #12343a;
  color: #dffcff;
}

:root[data-theme="dark"] .ranking-medal.gold {
  border-color: #e1a831;
  background: #fff0a8;
  color: #5f3f00;
}

:root[data-theme="dark"] .ranking-medal.silver {
  border-color: #a7b5c4;
  background: #eef3f8;
  color: #415061;
}

:root[data-theme="dark"] .ranking-medal.bronze {
  border-color: #d69a62;
  background: #ffe1c4;
  color: #70421d;
}

:root[data-theme="dark"] .ranking-medal.fourth {
  border-color: #9bc5da;
  background: #e2f6ff;
  color: #27576c;
}

:root[data-theme="dark"] .ranking-medal.fifth {
  border-color: #c4bdd8;
  background: #eee8ff;
  color: #5b4b80;
}

:root[data-theme="dark"] .zakum-section label > span {
  color: #5d7480;
}

:root[data-theme="dark"] .zakum-section .ghost {
  border-color: #b7d8dd;
  background: #f2fbfa;
  color: #075f67;
}

:root[data-theme="dark"] .boss-monster-stage img {
  filter: drop-shadow(0 0 10px rgba(180, 240, 255, 0.35));
}

:root[data-theme="dark"] .floating-item-tooltip .tooltip-name {
  color: #ffd96b;
}

:root[data-theme="dark"] .floating-item-tooltip .tooltip-meta {
  color: #d7e5e8;
}

:root[data-theme="dark"] .donate-name-card {
  color-scheme: light;
}

:root[data-theme="dark"] .donate-name-card p,
:root[data-theme="dark"] .donate-name-card strong {
  color: #2c2512;
}

:root[data-theme="dark"] .donate-name-card span {
  color: #6a4300;
}

.cube-stage,
.control-panel,
.rate-card,
.option-card,
.luck-card,
.mastery-card,
.scroll-card,
.scrollwork-card,
.maker-side-card,
.zakum-card,
.boss-drop-card,
.catalog-card,
.ranking-card,
.notice-card,
.support-card,
.donate-card,
.challenge-card,
.challenge-panel,
.efficiency-card,
.stat-card {
  border-color: var(--border-soft);
  background: var(--surface-panel-raised);
  box-shadow: var(--shadow-raised);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    padding: 10px 18px;
    min-height: 0;
  }

  .topbar::after {
    display: none;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .auth-area {
    grid-column: 2;
    grid-row: 1;
  }

  .topnav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 24px;
    height: 48px;
    min-height: 48px;
    border-radius: 0;
    scrollbar-width: none;
  }

  .topnav a {
    height: 48px;
    min-height: 48px;
    font-size: 14px;
  }

  .topnav a::after {
    bottom: 0;
  }

  .group-subnav {
    width: 100%;
    max-width: none;
    padding: 0 18px;
  }

  .group-subnav-list {
    flex-wrap: nowrap;
    gap: 22px;
    height: 42px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-color: #8eb9c1 transparent;
    scrollbar-width: thin;
  }

  .group-subnav-list::-webkit-scrollbar {
    display: block;
    height: 4px;
  }

  .group-subnav-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #8eb9c1;
  }

  .auth-area {
    justify-self: end;
  }

  .workspace,
  .community-section,
  .stat-section,
  .rankings-section,
  .ranking-section,
  .support-section,
  .luck-section,
  .chaos-goal-section,
  .chaos-goal-layout,
  .mastery-section,
  .scroll-section,
  .catalog-section,
  .catalog-section.is-detail-open,
  .scrollwork-section,
  .maker-section,
  .zakum-section,
  .boss-drop-section,
  .challenge-intro,
  .challenge-workbench,
  .efficiency-layout,
  .efficiency-basis-strip,
  .efficiency-stat-blocks,
  .luck-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .catalog-section.is-detail-open .catalog-search-card {
    display: none;
  }

  .catalog-section.is-detail-open .catalog-detail-card {
    min-height: calc(100dvh - 116px);
  }

  .stat-summary-card {
    grid-column: auto;
  }

  .stat-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .home-lead,
  .item-preview {
    flex-direction: column;
    align-items: stretch;
  }

  .view-home .home-lead {
    grid-template-columns: 1fr;
  }

  .view-home .home-tool-card,
  .view-home .home-tool-card.is-featured,
  .view-home .home-tool-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .view-home .home-tool-card.is-featured,
  .view-home .home-tool-card:nth-child(2) {
    min-height: 96px;
    padding: 14px;
  }

  .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-home .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-home .home-v2-layout {
    grid-template-columns: 1fr;
  }

  .view-home .home-v2-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-preview {
    grid-template-columns: 1fr;
  }

  .cube-tabs {
    justify-content: flex-start;
  }

  .ranking-row {
    grid-template-columns: 50px minmax(0, 1fr) 82px;
  }

  .ranking-row > span {
    grid-column: 2 / -1;
  }

  .ranking-row .ranking-medal {
    grid-column: 3;
    grid-row: 1;
  }

  .notice-card {
    position: static;
  }

  .catalog-detail-card {
    position: static;
    margin-top: 0;
  }

  .catalog-detail-card > .section-head {
    grid-template-columns: 1fr;
  }

  .catalog-detail-back {
    display: inline-flex;
  }

  .catalog-result-list {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .catalog-equipment-tools {
    grid-template-columns: 1fr;
  }

  .catalog-equipment-tools > button {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .catalog-monster-detail {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .catalog-monster-stage {
    min-height: 190px;
  }

  .catalog-monster-stage img {
    max-height: 184px;
  }

  .catalog-detail-side {
    grid-column: 1 !important;
    grid-row: auto !important;
    justify-items: start;
    width: 100%;
  }

  .chaos-goal-output-panel {
    position: static;
  }

  .luck-section > .luck-grid {
    grid-column: 1;
    grid-row: 1;
  }

  .luck-section > .megaphone-card {
    grid-column: 1;
    grid-row: 2;
    position: static;
  }

  .luck-section > .megaphone-card-wide #megaphoneList {
    max-height: 252px;
  }
}

@media (max-width: 640px) {
  .view-home main {
    width: min(100% - 20px, 480px);
    margin-top: 10px;
  }

  .view-home .home-lead > div {
    display: none;
  }

  .view-home .home-section {
    gap: 10px;
    margin-top: 0;
    padding-bottom: 104px;
  }

  .view-home .home-lead {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .view-home .home-lead::before {
    display: none;
  }

  .view-home .home-search-link {
    width: 100%;
    min-height: 62px;
    padding: 13px 14px;
  }

  .home-tool-grid,
  .view-home .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .view-home .home-tool-card,
  .view-home .home-tool-card.is-featured,
  .view-home .home-tool-card:nth-child(2),
  .view-home .home-tool-card:nth-child(7),
  .view-home .home-tool-card:nth-child(8) {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    min-height: 78px;
    padding: 11px;
    grid-column: auto;
  }

  .view-home .home-tool-icon,
  .view-home .home-tool-badge,
  .view-home .home-tool-card.is-featured .home-tool-icon,
  .view-home .home-tool-card:nth-child(2) .home-tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .view-home .home-tool-icon img,
  .view-home .home-tool-card.is-featured .home-tool-icon img,
  .view-home .home-tool-card:nth-child(2) .home-tool-icon img {
    max-width: 30px;
    max-height: 30px;
  }

  .view-home .home-tool-card strong,
  .view-home .home-tool-card.is-featured strong,
  .view-home .home-tool-card:nth-child(2) strong {
    font-size: 14px;
  }

  .view-home .home-tool-card small {
    display: none;
  }

  .view-home .home-v2 {
    gap: 9px;
  }

  .view-home .home-v2-command {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
    border-radius: 9px;
  }

  .view-home .home-v2-command-copy {
    display: none;
  }

  .view-home .home-v2-search {
    min-height: 60px;
    padding: 12px;
  }

  .view-home .home-v2-search strong {
    font-size: 15px;
  }

  .view-home .home-v2-search b {
    min-width: 38px;
    height: 30px;
  }

  .view-home .home-v2-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .view-home .home-v2-tags::-webkit-scrollbar {
    display: none;
  }

  .view-home .home-v2-tags a {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 9px;
  }

  .view-home .home-v2-task-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .view-home .home-v2-task-row::-webkit-scrollbar {
    display: none;
  }

  .view-home .home-v2-task-row a {
    flex: 0 0 150px;
    min-height: 54px;
    padding: 9px 10px;
    border-radius: 8px;
  }

  .view-home .home-v2-task-row strong {
    font-size: 13px;
  }

  .view-home .home-v2-layout,
  .view-home .home-v2-tools,
  .view-home .home-v2-side {
    gap: 9px;
  }

  .view-home .home-v2-section-head {
    display: none;
  }

  .view-home .home-v2-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .view-home .home-v2-tool-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    min-height: 74px;
    padding: 10px;
    border-radius: 8px;
  }

  .view-home .home-v2-tool-icon,
  .view-home .home-v2-tool-badge {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .view-home .home-v2-tool-icon img {
    max-width: 27px;
    max-height: 27px;
  }

  .view-home .home-v2-tool-card strong {
    font-size: 14px;
  }

  .view-home .home-v2-tool-card small {
    font-size: 11px;
  }

  .view-home .home-v2-side-card {
    padding: 10px;
  }

  .view-home .home-v2-side-card a {
    padding: 7px 0;
  }

  .catalog-result-list {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .catalog-detail-card .section-head {
    display: grid;
    gap: 10px;
  }

  .catalog-rate-toggle {
    width: 100%;
  }

  .catalog-rate-toggle button {
    flex: 1 1 0;
    padding: 0 8px;
  }

  .catalog-item-info-tooltip {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    min-height: 118px;
    padding: 10px;
  }

  .catalog-item-info-icon-pane {
    min-height: 0;
  }

  .catalog-item-info-icon-frame {
    width: 66px;
    height: 66px;
  }

  .catalog-item-info-icon-frame img {
    width: 52px;
    height: 52px;
  }

  .catalog-item-info-copy {
    padding: 0;
  }

  .catalog-item-info-copy strong {
    font-size: 17px;
  }

  .catalog-item-info-rule {
    display: none;
  }

  .catalog-item-info-copy p,
  .catalog-item-info-copy ul {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.26;
  }

  .catalog-equipment-summary-bar {
    position: static;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .catalog-equipment-sort {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-equipment-sort select {
    flex: 1 1 auto;
  }

  .catalog-equipment-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px 8px;
    min-height: 58px;
  }

  .catalog-equipment-row img {
    grid-row: span 2;
    width: 32px;
    height: 32px;
  }

  .catalog-equipment-row-stats {
    grid-column: 2;
    justify-self: start;
    width: 100%;
  }

  .catalog-equipment-tools {
    grid-template-columns: 1fr;
  }

  .chaos-goal-card .section-head {
    display: grid;
    gap: 8px;
  }

  .chaos-goal-rule-line {
    justify-self: start;
    white-space: normal;
  }

  .chaos-goal-inputs,
  .chaos-goal-item-list,
  .chaos-goal-actions,
  .chaos-goal-stat-list,
  .chaos-goal-combo-row {
    grid-template-columns: 1fr;
  }

  .chaos-goal-stat-editor-head,
  .chaos-goal-stat-row {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
  }

  body {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, var(--app-bg-top) 0, var(--app-bg-mid) 260px, var(--paper) 260px, var(--paper) 100%);
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: 58px;
    min-height: 58px;
    padding: 0 14px;
    gap: 8px;
    border-bottom: 1px solid var(--nav-border);
    background: var(--nav-bg);
  }

  .brand {
    grid-template-columns: 30px minmax(0, 1fr);
    min-width: 0;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy {
    min-width: 0;
  }

  .topnav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0;
    width: calc(100% - 8px);
    max-width: 620px;
    height: 66px;
    min-height: 0;
    justify-self: auto;
    margin: 0 auto;
    padding: 5px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--nav-shell-border) 80%, transparent);
    border-radius: 25px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.055)),
      color-mix(in srgb, var(--nav-bg) 78%, transparent);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.08),
      0 18px 42px rgba(0, 0, 0, 0.34),
      0 3px 10px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    transform: translateX(-50%);
  }

  .topnav a {
    display: inline-flex;
    min-width: 0;
    height: 54px;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--nav-link-muted);
    font-size: 0;
    font-weight: 900;
    line-height: 1;
    transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  }

  .topnav a::before {
    content: none;
  }

  .topnav a::after {
    content: attr(data-mobile-label);
    display: inline-flex;
    position: static;
    width: fit-content;
    min-width: 0;
    min-height: 38px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    overflow: hidden;
    border-radius: 999px;
    background: transparent;
    font-size: 10px;
    font-weight: 1000;
    line-height: 1;
    opacity: 1;
    text-overflow: ellipsis;
    transform: none;
    white-space: nowrap;
    transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  }

  .topnav a.is-active {
    border: 0;
    background: transparent;
    color: var(--nav-link-active-ink);
    box-shadow: none;
    transform: none;
  }

  .topnav a.is-active::after {
    background: var(--nav-link-active-bg);
    color: var(--nav-link-active-ink);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.48),
      inset 0 -1px 0 rgba(116, 71, 0, 0.16),
      0 5px 12px rgba(244, 181, 54, 0.18);
    transform: none;
  }

  .topnav a:hover {
    background: transparent;
    color: var(--nav-link-muted);
    transform: none;
  }

  .topnav a:hover::after {
    opacity: 1;
    transform: none;
  }

  .topnav a.is-active:hover {
    color: var(--nav-link-active-ink);
  }

  .topnav a.is-active:hover::after {
    background: var(--nav-link-active-bg);
    color: var(--nav-link-active-ink);
    transform: none;
  }

  .topnav a.is-active::before {
    content: none;
  }

  .discord-login-button {
    min-height: 40px;
    padding: 0 9px;
  }

  .auth-area {
    gap: 4px;
  }

  .theme-toggle-button,
  .top-notice-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .top-notice-menu {
    position: fixed;
    top: 56px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 84px);
    overflow: hidden;
  }

  .top-notice-menu::before {
    right: 78px;
  }

  .top-notice-list {
    max-height: calc(100dvh - 184px);
  }

  .discord-mark {
    display: none;
  }

  .group-subnav {
    width: 100%;
    max-width: none;
    margin-top: 0;
    padding: 0 12px;
  }

  .group-subnav-label {
    display: none;
  }

  .group-subnav a {
    flex: 0 0 auto;
    min-width: 58px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  .group-subnav-list {
    width: 100%;
    height: 40px;
    gap: 8px;
    padding: 0;
    overflow-x: auto;
    border-radius: 0;
  }

  .challenge-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenge-card {
    padding: 12px;
  }

  .challenge-intro {
    padding: 10px;
  }

  .challenge-intro-copy {
    min-height: 0;
    padding: 12px;
  }

  .challenge-stat-grid {
    grid-template-columns: 1fr;
  }

  .challenge-step-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenge-reward-strip {
    grid-template-columns: 1fr;
  }

  .challenge-reward-strip span {
    grid-row: auto;
    min-height: 22px;
    padding: 0 0 6px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--amber) 32%, transparent);
  }

  .claw-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-badge,
  .ranking-row > span {
    grid-column: 2 / -1;
  }

  main {
    width: min(100% - 20px, 1240px);
    margin-top: 10px;
  }

  .hero-panel,
  .cube-stage,
  .control-panel {
    padding: 14px;
  }

  .hero-panel h1 {
    font-size: 29px;
  }

  .cube-tab {
    width: 100%;
  }

  .field-grid,
  .stats-grid,
  .quick-actions,
  .challenge-actions,
  .luck-controls,
  .luck-quick-actions,
  .efficiency-section .efficiency-field-grid,
  .efficiency-section .efficiency-option-row,
  .efficiency-field-grid,
  .efficiency-option-row,
  .efficiency-metrics,
  .efficiency-line-metrics,
  .mastery-window,
  .mastery-actions,
  .scroll-window,
  .scroll-actions,
  .scrollwork-scroll-panel,
  .scrollwork-actions,
  .scroll-stat-list,
  .maker-window,
  .maker-actions,
  .maker-item-detail,
  .maker-stat-list,
  .maker-material-list,
  .maker-gem-slot,
  .zakum-simple-grid,
  .zakum-drop-row,
  .zakum-input-grid,
  .zakum-summary-grid,
  .zakum-fee-grid,
  .boss-monster-panel,
  .boss-drop-actions,
  .boss-drop-pool-row,
  .megaphone-form,
  .feature-request-form,
  .stat-upload-grid,
  .stat-form-grid,
  .stat-summary-grid {
    grid-template-columns: 1fr;
  }

  .cube-actions {
    grid-template-columns: 1fr;
  }

  .cube-actions #rollButton {
    order: 1;
  }

  .cube-actions .unique-grade-button {
    order: 2;
  }

  .boss-drop-actions #bossDropKillButton {
    order: 1;
  }

  .boss-drop-actions [data-boss-drop-runs] {
    order: 2;
  }

  .zakum-simple-grid .span-2 {
    grid-column: auto;
  }

  .zakum-member-head {
    display: none;
  }

  .zakum-member-row {
    grid-template-columns: 1fr;
  }

  .zakum-member-row strong {
    text-align: left;
  }

  .boss-drop-main-card .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .boss-drop-main-card .section-head > div:first-child {
    min-width: 0;
  }

  .boss-drop-main-card .section-head h2 {
    line-height: 1.15;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .boss-drop-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    gap: 6px;
  }

  .boss-drop-controls select {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }

  .boss-drop-controls .ghost {
    grid-column: 1 / -1;
    min-height: 40px;
    min-width: 0;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .maker-window {
    min-height: 0;
    padding: 12px;
  }

  .maker-extra-grid,
  .maker-field-grid {
    grid-template-columns: 1fr;
  }

  .maker-field-grid label {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .maker-select-copy p {
    height: 30px;
    min-height: 0;
    white-space: nowrap;
  }

  .maker-material-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .maker-gem-slots {
    grid-template-columns: 1fr;
  }

  .maker-gem-slot {
    grid-template-columns: 24px 58px minmax(150px, 1fr);
    grid-template-rows: 32px 32px;
  }

  .maker-bottom-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .maker-actions,
  .maker-quick-actions {
    justify-content: center;
  }

  .maker-actions button {
    min-width: 128px;
  }

  .maple-item-detail-box {
    height: 500px;
    padding: 12px;
  }

  .maker-item-detail .maple-item-detail-box {
    min-height: 0;
    height: auto;
  }

  .scroll-item-detail {
    height: 640px;
  }

  .scroll-item-detail .maple-item-detail-box {
    height: 100%;
  }

  .scrollwork-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .scrollwork-part-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scrollwork-detail {
    max-height: none;
    overflow: visible;
  }

  .scrollwork-detail .maple-item-detail-box {
    height: auto;
    min-height: 520px;
  }

  .catalog-scroll-detail-box {
    min-height: 0;
    padding: 18px;
  }

  .catalog-scroll-name {
    font-size: 23px;
  }

  .catalog-scroll-body {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }

  .catalog-scroll-icon-frame {
    width: 96px;
    height: 96px;
  }

  .catalog-scroll-icon-frame img {
    width: 68px;
    height: 68px;
  }

  .catalog-scroll-copy {
    font-size: 15px;
  }

  .maple-item-top {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  .maple-item-icon-frame {
    width: 96px;
    height: 96px;
  }

  .maple-item-icon-frame img {
    width: 66px;
    height: 66px;
  }

  .maple-item-name strong {
    font-size: 22px;
  }

  .maple-item-name span,
  .maple-item-reqs span,
  .maple-item-stats li,
  .maple-item-jobs,
  .maple-item-recent {
    font-size: 15px;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .home-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chaos-goal-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .chaos-goal-output-panel {
    grid-column: 2;
    position: static;
  }

  .maker-side-card {
    padding: 14px;
  }

  .maker-item-detail {
    min-height: 0;
  }

  .maker-item-detail .maple-item-detail-box {
    max-width: none;
    min-height: 0;
    padding: 12px 14px;
  }

  .maker-item-detail .maple-item-top {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .maker-item-detail .maple-item-icon-frame {
    width: 112px;
    height: 112px;
  }

  .maker-item-detail .maple-item-icon-frame img {
    width: 74px;
    height: 74px;
  }

  .maker-item-detail .maple-item-name strong {
    font-size: 24px;
  }

  .maker-item-detail .maple-item-name span,
  .maker-item-detail .maple-item-reqs span,
  .maker-item-detail .maple-item-stats li,
  .maker-item-detail .maple-item-jobs,
  .maker-item-detail .maple-item-recent {
    font-size: 15px;
    line-height: 1.22;
  }

  .maker-item-detail .maple-item-rule {
    margin: 7px 0;
  }
}

.primary,
#makerUseButton {
  background-color: #f0ad26;
}

.donate-name-card {
  background-color: #fff8d8;
}

:root[data-theme="dark"] .view-luck .auto-rank-chip em,
:root[data-theme="dark"] .luck-record-panel li > span {
  color: #5d7480;
}

:root[data-theme="dark"] .luck-record-panel,
:root[data-theme="dark"] .luck-record-panel li {
  color-scheme: light;
}

:root[data-theme="dark"] .luck-record-panel li {
  border-color: #e5d9b5;
  background: #fffdf5;
  color: #18323a;
}

:root[data-theme="dark"] .luck-record-panel strong {
  color: #5b3c00;
}

:root[data-theme="dark"] .luck-record-panel .item-link {
  color: #075f67;
}

:root[data-theme="dark"] #scrollworkHistoryList li {
  border-color: var(--line);
  background: var(--field-bg);
  color: var(--ink);
}

:root[data-theme="dark"] #scrollworkHistoryList li.hit {
  border-color: #7a5a20;
  background: #241d10;
}

:root[data-theme="dark"] #scrollworkHistoryList li.destroyed {
  border-color: rgba(214, 77, 103, 0.42);
  background: #2a171e;
}

:root[data-theme="dark"] #scrollworkHistoryList strong {
  color: var(--ink);
}

:root[data-theme="dark"] #scrollworkHistoryList span {
  color: var(--muted);
}

:root[data-theme="dark"] .scrollwork-item-card.is-crafted {
  border-color: rgba(244, 181, 54, 0.46);
  background: linear-gradient(180deg, rgba(38, 31, 16, 0.96), rgba(13, 28, 36, 0.96));
}

:root[data-theme="dark"] .scrollwork-crafted-options {
  color: #9feaf0;
}

:root[data-theme="dark"] .scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted {
  border-color: rgba(214, 77, 103, 0.3);
  color: #ffb8c5;
  background: rgba(68, 24, 35, 0.58);
}

:root[data-theme="dark"] .scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted:hover,
:root[data-theme="dark"] .scrollwork-source-block .scrollwork-chip-row .scrollwork-clear-crafted:focus {
  border-color: rgba(255, 139, 160, 0.5);
  background: rgba(88, 28, 43, 0.75);
}

:root[data-theme="dark"] .ranking-row .ranking-medal.gold {
  color: #5f3f00;
}

:root[data-theme="dark"] .ranking-row .ranking-medal.silver {
  color: #415061;
}

:root[data-theme="dark"] .ranking-row .ranking-medal.bronze {
  color: #70421d;
}

:root[data-theme="dark"] #rankingList .ranking-row .ranking-medal.gold {
  color: #5f3f00;
}

:root[data-theme="dark"] #rankingList .ranking-row .ranking-medal.silver {
  color: #415061;
}

:root[data-theme="dark"] #rankingList .ranking-row .ranking-medal.bronze {
  color: #70421d;
}

:root[data-theme="dark"] #rankingList .ranking-row .ranking-medal.fourth {
  color: #27576c;
}

:root[data-theme="dark"] #rankingList .ranking-row .ranking-medal.fifth {
  color: #5b4b80;
}

:root[data-theme="dark"] .site-footer {
  color: #9fb2bb;
}

:root[data-theme="dark"] .site-footer span {
  color: #9fb2bb;
}

:root[data-theme="dark"] .site-footer a {
  color: #9feaf0;
}

:root[data-theme="dark"] .privacy-copy {
  color: #b8cbd4;
}

:root[data-theme="dark"] .privacy-copy section {
  border-top-color: rgba(151, 200, 218, 0.16);
}

:root[data-theme="dark"] .privacy-copy h3 {
  color: #f4fbff;
}

:root[data-theme="dark"] .privacy-updated {
  color: #7df4ff;
}

:root[data-theme="dark"] .privacy-links a {
  border-color: rgba(134, 219, 227, 0.22);
  background: rgba(8, 33, 43, 0.72);
  color: #97f2f8;
}

:root[data-theme="dark"] .privacy-links a:hover,
:root[data-theme="dark"] .privacy-links a:focus {
  border-color: rgba(255, 199, 71, 0.56);
  background: rgba(255, 199, 71, 0.12);
  color: #ffd45f;
}

:root[data-theme="dark"] .privacy-consent-modal {
  border-color: rgba(151, 200, 218, 0.22);
  background: #111d24;
  color: #f4fbff;
}

:root[data-theme="dark"] .privacy-consent-head span {
  color: #7df4ff;
}

:root[data-theme="dark"] .privacy-consent-modal p,
:root[data-theme="dark"] .privacy-consent-modal ul {
  color: #b8cbd4;
}

:root[data-theme="dark"] .privacy-consent-check {
  border-color: rgba(134, 219, 227, 0.24);
  background: rgba(8, 33, 43, 0.72);
  color: #e9f8fb;
}

:root[data-theme="dark"] .privacy-consent-links a {
  color: #97f2f8;
}

:root[data-theme="dark"] .window-chip.rare,
:root[data-theme="dark"] .grade-ribbon.rare {
  background-color: #356daf;
}

:root[data-theme="dark"] .maker-main-card {
  background-color: #dce8f1;
  color: #20313a;
}

:root[data-theme="dark"] .maker-titlebar {
  background-color: #e8f1f8;
  color: #20313a;
}

:root[data-theme="dark"] .maker-window {
  background-color: #eaf4fb;
  color: #20313a;
}

:root[data-theme="dark"] .maker-select-panel {
  background-color: #5d9ac9;
  color: #102f44;
}

:root[data-theme="dark"] .maker-needed-panel,
:root[data-theme="dark"] .maker-extra-panel {
  background-color: #fbfefe;
  color: #20313a;
}

:root[data-theme="dark"] .maker-window-label,
:root[data-theme="dark"] .maker-extra-head,
:root[data-theme="dark"] .maker-extra-head strong {
  color: #225d91;
}

:root[data-theme="dark"] .maker-field-grid span {
  color: #083f69;
}

:root[data-theme="dark"] .maker-field-grid label {
  color: #102f44;
}

:root[data-theme="dark"] .maker-material-list li {
  color: #31516c;
}

:root[data-theme="dark"] .maker-titlebar span {
  background-color: #16748e;
}

:root[data-theme="dark"] .maker-stimulant-toggle,
:root[data-theme="dark"] .maker-stimulant-toggle em {
  color: #52616b;
}

:root[data-theme="dark"] .maker-slot-panel .mini-head,
:root[data-theme="dark"] .maker-slot-panel .mini-head h3,
:root[data-theme="dark"] .maker-slot-panel .mini-head span {
  color: #24537a;
}

:root[data-theme="dark"] .maker-slot-index {
  color: #526d82;
}

:root[data-theme="dark"] #makerResetButton {
  background-color: #a51669;
}

:root[data-theme="dark"] .scrollwork-scroll-summary {
  color: #a8bdc7;
}

:root[data-theme="dark"] .zakum-detail summary {
  color: #9fb2bb;
}

:root[data-theme="dark"] .zakum-mode-tabs button.is-active {
  background: #006e75;
}

:root[data-theme="dark"] .boss-drop-item {
  color: #18323a;
}

:root[data-theme="dark"] .boss-drop-item em {
  color: #ffffff;
}

:root[data-theme="dark"] .boss-drop-pool-row strong {
  color: var(--ink);
}

:root[data-theme="dark"] .boss-drop-pool-row span {
  color: #7ae6ec;
}

:root[data-theme="dark"] .donate-name-card {
  color: #2c2512;
}

@media (min-width: 641px) {
  .topnav a.is-active {
    color: var(--nav-link);
  }

  .topnav a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (min-width: 861px) and (max-width: 980px) {
  .catalog-section.is-detail-open {
    grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.08fr);
  }

  .catalog-section.is-detail-open .catalog-search-card {
    display: block;
  }

  .catalog-section.is-detail-open .catalog-detail-card {
    position: sticky;
    top: 16px;
    align-self: start;
    min-height: 0;
  }
}
