@import url(https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@latest/fonts.css);
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */
  tab-size: 4; /* 3 */
  font-family: EliceDigitalBaeum-Bd, D2Coding, sans-serif; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.\!container {
  width: 100% !important;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .\!container {
    max-width: 640px !important;
  }

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .\!container {
    max-width: 768px !important;
  }

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .\!container {
    max-width: 1024px !important;
  }

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .\!container {
    max-width: 1280px !important;
  }

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .\!container {
    max-width: 1536px !important;
  }

  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.collapse {
  visibility: collapse;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: -webkit-sticky;
  position: sticky;
}
.inset-0 {
  inset: 0px;
}
.bottom-0 {
  bottom: 0px;
}
.left-0 {
  left: 0px;
}
.right-0 {
  right: 0px;
}
.top-0 {
  top: 0px;
}
.isolate {
  isolation: isolate;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.z-50 {
  z-index: 50;
}
.z-\[1000\] {
  z-index: 1000;
}
.z-\[100\] {
  z-index: 100;
}
.z-\[9999\] {
  z-index: 9999;
}
.mb-0 {
  margin-bottom: 0px;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.ml-2 {
  margin-left: 0.5rem;
}
.mr-2 {
  margin-right: 0.5rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.aspect-square {
  aspect-ratio: 1 / 1;
}
.h-10 {
  height: 2.5rem;
}
.h-16 {
  height: 4rem;
}
.h-9 {
  height: 2.25rem;
}
.h-\[95vh\] {
  height: 95vh;
}
.h-full {
  height: 100%;
}
.max-h-24 {
  max-height: 6rem;
}
.max-h-\[90vh\] {
  max-height: 90vh;
}
.min-h-0 {
  min-height: 0px;
}
.min-h-\[80px\] {
  min-height: 80px;
}
.min-h-screen {
  min-height: 100vh;
}
.w-10 {
  width: 2.5rem;
}
.w-16 {
  width: 4rem;
}
.w-9 {
  width: 2.25rem;
}
.w-full {
  width: 100%;
}
.min-w-0 {
  min-width: 0px;
}
.min-w-\[120px\] {
  min-width: 120px;
}
.max-w-5xl {
  max-width: 64rem;
}
.max-w-\[800px\] {
  max-width: 800px;
}
.flex-1 {
  flex: 1 1;
}
.flex-shrink {
  flex-shrink: 1;
}
.flex-shrink-0 {
  flex-shrink: 0;
}
.shrink-0 {
  flex-shrink: 0;
}
.flex-grow {
  flex-grow: 1;
}
.border-collapse {
  border-collapse: collapse;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.cursor-pointer {
  cursor: pointer;
}
.touch-manipulation {
  touch-action: manipulation;
}
.select-none {
  -webkit-user-select: none;
          user-select: none;
}
.resize {
  resize: both;
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flex-row {
  flex-direction: row;
}
.flex-col {
  flex-direction: column;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-start {
  align-items: flex-start;
}
.items-center {
  align-items: center;
}
.items-stretch {
  align-items: stretch;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}
.gap-0 {
  gap: 0px;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-1\.5 {
  gap: 0.375rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.overflow-auto {
  overflow: auto;
}
.overflow-hidden {
  overflow: hidden;
}
.overflow-y-auto {
  overflow-y: auto;
}
.overflow-x-hidden {
  overflow-x: hidden;
}
.break-all {
  word-break: break-all;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-full {
  border-radius: 9999px;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-xl {
  border-radius: 0.75rem;
}
.border {
  border-width: 1px;
}
.border-2 {
  border-width: 2px;
}
.border-b {
  border-bottom-width: 1px;
}
.border-r {
  border-right-width: 1px;
}
.border-t {
  border-top-width: 1px;
}
.border-black {
  --tw-border-opacity: 1;
  border-color: rgb(0 0 0 / 1);
  border-color: rgb(0 0 0 / var(--tw-border-opacity, 1));
}
.border-tfd-border {
  --tw-border-opacity: 1;
  border-color: rgb(66 66 66 / 1);
  border-color: rgb(66 66 66 / var(--tw-border-opacity, 1));
}
.bg-\[\#3ac224\] {
  --tw-bg-opacity: 1;
  background-color: rgb(58 194 36 / 1);
  background-color: rgb(58 194 36 / var(--tw-bg-opacity, 1));
}
.bg-\[\#b753f6\] {
  --tw-bg-opacity: 1;
  background-color: rgb(183 83 246 / 1);
  background-color: rgb(183 83 246 / var(--tw-bg-opacity, 1));
}
.bg-\[\#dd783a\] {
  --tw-bg-opacity: 1;
  background-color: rgb(221 120 58 / 1);
  background-color: rgb(221 120 58 / var(--tw-bg-opacity, 1));
}
.bg-black {
  --tw-bg-opacity: 1;
  background-color: rgb(0 0 0 / 1);
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}
.bg-black\/70 {
  background-color: rgb(0 0 0 / 0.7);
}
.bg-black\/80 {
  background-color: rgb(0 0 0 / 0.8);
}
.bg-gray-500 {
  --tw-bg-opacity: 1;
  background-color: rgb(107 114 128 / 1);
  background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1));
}
.bg-green-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(22 163 74 / 1);
  background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
}
.bg-red-600 {
  --tw-bg-opacity: 1;
  background-color: rgb(220 38 38 / 1);
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}
.bg-tfd-accent {
  --tw-bg-opacity: 1;
  background-color: rgb(66 165 245 / 1);
  background-color: rgb(66 165 245 / var(--tw-bg-opacity, 1));
}
.bg-tfd-bg {
  --tw-bg-opacity: 1;
  background-color: rgb(18 18 18 / 1);
  background-color: rgb(18 18 18 / var(--tw-bg-opacity, 1));
}
.bg-tfd-bg\/95 {
  background-color: rgb(18 18 18 / 0.95);
}
.bg-tfd-card {
  --tw-bg-opacity: 1;
  background-color: rgb(44 44 44 / 1);
  background-color: rgb(44 44 44 / var(--tw-bg-opacity, 1));
}
.bg-tfd-darker {
  --tw-bg-opacity: 1;
  background-color: rgb(26 26 26 / 1);
  background-color: rgb(26 26 26 / var(--tw-bg-opacity, 1));
}
.bg-tfd-hover\/10 {
  background-color: rgb(44 44 44 / 0.1);
}
.bg-tfd-panel {
  --tw-bg-opacity: 1;
  background-color: rgb(30 30 30 / 1);
  background-color: rgb(30 30 30 / var(--tw-bg-opacity, 1));
}
.bg-transparent {
  background-color: transparent;
}
.bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / 1);
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops));
}
.from-black\/90 {
  --tw-gradient-from: rgb(0 0 0 / 0.9) var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.via-black\/60 {
  --tw-gradient-to: rgb(0 0 0 / 0)  var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / 0.6) var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.to-transparent {
  --tw-gradient-to: transparent var(--tw-gradient-to-position);
}
.object-contain {
  object-fit: contain;
}
.object-cover {
  object-fit: cover;
}
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-8 {
  padding: 2rem;
}
.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}
.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.pb-16 {
  padding-bottom: 4rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.pt-3 {
  padding-top: 0.75rem;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-\[10px\] {
  font-size: 10px;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-bold {
  font-weight: 700;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.uppercase {
  text-transform: uppercase;
}
.lowercase {
  text-transform: lowercase;
}
.italic {
  font-style: italic;
}
.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-feature-settings: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.leading-tight {
  line-height: 1.25;
}
.text-black {
  --tw-text-opacity: 1;
  color: rgb(0 0 0 / 1);
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
}
.text-gray-200 {
  --tw-text-opacity: 1;
  color: rgb(229 231 235 / 1);
  color: rgb(229 231 235 / var(--tw-text-opacity, 1));
}
.text-gray-300 {
  --tw-text-opacity: 1;
  color: rgb(209 213 219 / 1);
  color: rgb(209 213 219 / var(--tw-text-opacity, 1));
}
.text-tfd-accent {
  --tw-text-opacity: 1;
  color: rgb(66 165 245 / 1);
  color: rgb(66 165 245 / var(--tw-text-opacity, 1));
}
.text-tfd-text {
  --tw-text-opacity: 1;
  color: rgb(224 224 224 / 1);
  color: rgb(224 224 224 / var(--tw-text-opacity, 1));
}
.text-tfd-text-light {
  --tw-text-opacity: 1;
  color: rgb(160 160 160 / 1);
  color: rgb(160 160 160 / var(--tw-text-opacity, 1));
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / 1);
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.line-through {
  -webkit-text-decoration-line: line-through;
          text-decoration-line: line-through;
}
.shadow-2xl {
  --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-\[0_-4px_6px_-1px_rgba\(0\2c 0\2c 0\2c 0\.1\)\] {
  --tw-shadow: 0 -4px 6px -1px rgba(0,0,0,0.1);
  --tw-shadow-colored: 0 -4px 6px -1px var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-md {
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-sm {
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.outline {
  outline-style: solid;
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow {
  --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.drop-shadow-lg {
  --tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.invert {
  --tw-invert: invert(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.backdrop-blur-md {
  --tw-backdrop-blur: blur(12px);
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-blur-sm {
  --tw-backdrop-blur: blur(4px);
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.backdrop-filter {
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
}
.transition {
  transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-200 {
  transition-duration: 200ms;
}
.duration-300 {
  transition-duration: 300ms;
}
.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.bg-tfd-accent {
    background-color: #42A5F5 !important;
    background-color: var(--accent-color) !important;
  }
.text-tfd-accent {
    color: #42A5F5 !important;
    color: var(--accent-color) !important;
  }
/* TFD 스타일 박스 wrapper - 삼각형을 clip-path 밖에 배치하기 위함 */
.tfd-box-wrapper {
    position: relative;
  }
/* TFD 스타일 박스 - 네 모서리가 모두 잘린 사각형 */
.tfd-box {
    position: relative;
    background: linear-gradient(135deg, #0d7377 0%, #14213d 100%);
    /* 네 모서리 모두 12px씩 잘림 */
    -webkit-clip-path: polygon(
      12px 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% calc(100% - 12px),
      calc(100% - 12px) 100%,
      12px 100%,
      0 calc(100% - 12px),
      0 12px
    );
    clip-path: polygon(
      12px 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% calc(100% - 12px),
      calc(100% - 12px) 100%,
      12px 100%,
      0 calc(100% - 12px),
      0 12px
    );
    /* Safari에서 clip-path와 border가 충돌하므로 border 제거 - SVG로 대체 */
  }
/* TFD 박스 테두리를 SVG로 그리기 (Safari 호환) */
/* 좌상단 직각 삼각형 (왼쪽 위 모서리 잘린 부분) - 크기 축소 */
.tfd-box-wrapper::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 0;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
    z-index: 10;
  }
/* 우하단 직각 삼각형 (오른쪽 아래 모서리 잘린 부분) - 크기 축소 */
.tfd-box-wrapper::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 6px 6px;
    border-color: transparent transparent rgba(255, 255, 255, 0.95) transparent;
    z-index: 10;
  }
/* 우상단 및 좌하단 직각 삼각형 wrapper */
.tfd-box-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
  }
/* 우상단 직각 삼각형 (오른쪽 위 모서리 잘린 부분) - 크기 축소 */
.tfd-box-corners::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 6px 0;
    border-color: transparent rgba(255, 255, 255, 0.95) transparent transparent;
  }
/* 좌하단 직각 삼각형 (왼쪽 아래 모서리 잘린 부분) - 크기 축소 */
.tfd-box-corners::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 0 6px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  }
/* 기존 span 기반 테두리 숨기기 - TFDBoxBorder 컴포넌트로 대체 */

/* Pretendard 폰트 */
@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'EliceDigitalBaeum-Bd';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_elice@1.0/EliceDigitalBaeum-Bd.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    /* 이 폰트 파일의 hhea/win 어센트(1160/1000em = 116%)가 실제 글자 잉크(최대 약 80%em)보다 훨씬 커서
       (fsSelection의 useTypoMetrics 비트가 꺼져 있어 브라우저가 hhea 값을 씀) 매 사용처마다 글자 위에
       빈 공간이 크게 남고 아래로 처져 보임. 폰트 자체 OS/2 typo 메트릭(880/-120, 합이 정확히 1000em)이
       훨씬 균형잡혀 있어서 이 값으로 오버라이드 - 이 폰트를 쓰는 모든 곳에 한 번에 적용됨
    */
    ascent-override: 88%;
    descent-override: 12%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'D2Coding';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_three@1.0/D2Coding.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
  /* Light Mode (Default) */
  --bg-color: #f0f2f5;
  --panel-bg-color: #ffffff;
  --text-color: #212529;
  --text-color-light: #6c757d;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --panel-border-color: #dee2e6;
  --border-color-light: #e9ecef;
  --bg-color-dark: #e9ecef;
  --placeholder-text-color: #bdbdbd;
  --disabled-text-color: #adb5bd;
  --button-bg-color: #f8f9fa;
  --button-text-color: #343a40;
  --logo-filter: invert(1);
  --icon-filter: invert(1);
  --capacity-text-color: #000000;
  --socket-icon-filter: invert(1);
  --gauge-tick-color: #ced4da; /* Ticks for light mode */
  --accent-color: #42A5F5;
  --accent-color-translucent: rgba(66, 165, 245, 0.1);
  --hover-bg-color: #e9ecef;
  --border-color: #ced4da;
  --border-color-heavy: #adb5bd;
  --background-color-light: #f8f9fa;
  --background-color-deep: #e9ecef;
  --bg-secondary: #e9ecef;
  --module-image-bg-color: #e9ecef;
  --info-box-text-color: #000000; /* Black text for light mode */
  --separator-color: #000000; /* Black separator for light mode */
  --primary-color: #FFA500; /* 주황색 추가 */
  --primary-color-light: #FFD700; /* 주황색 밝은 버전 */
  --primary-color-shadow: rgba(255, 165, 0, 0.3); /* 주황색 그림자 */
  
  /* Enhancement Controls - Light Mode */
  --enhancement-bg: linear-gradient(135deg, #f8f9fa, #e9ecef);
  --enhancement-shadow: rgba(0, 0, 0, 0.1);
  --level-display-bg: linear-gradient(135deg, #e9ecef, #f8f9fa);
  --level-display-text: #212529;
  --level-display-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.1);
  --level-display-text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
  --level-btn-bg: linear-gradient(135deg, #6c757d, #495057);
  --level-btn-border: #343a40;
  --level-btn-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  --level-btn-hover-bg: linear-gradient(135deg, #868e96, #6c757d);
  --level-btn-hover-border: #495057;
  --level-btn-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  
  /* Tier Colors */
  --tier-0-color: #6c757d;
  --tier-1-color: #26A69A;
  --tier-2-color: #8E24AA;
  --tier-3-color: #C79121;
  --tier-4-color: #C62828;
}

[data-theme='dark'] {
  --bg-color: #000000;
  --panel-bg-color: #1e1e1e;
  --text-color: #e0e0e0;
  --text-color-light: #a0a0a0;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --panel-border-color: #424242;
  --border-color-light: #3a3a3a;
  --bg-color-dark: #2c2c2c;
  --placeholder-text-color: #757575;
  --disabled-text-color: #5a5a5a;
  --button-bg-color: #2c2c2c;
  --button-text-color: #e0e0e0;
  --logo-filter: none;
  --icon-filter: none;
  --capacity-text-color: #FFFFFF;
  --socket-icon-filter: none;
  --gauge-tick-color: #4f4f4f; /* Ticks for dark mode */
  --accent-color: #42A5F5;
  --accent-color-translucent: rgba(66, 165, 245, 0.1);
  --hover-bg-color: #2c2c2c;
  --border-color: #424242;
  --border-color-heavy: #616161;
  --background-color-light: #2c2c2c;
  --background-color-deep: #1a1a1a;
  --bg-secondary: #2c2c2c;
  --module-image-bg-color: #3a3a3a;
  --info-box-text-color: #FFFFFF; /* White text for dark mode */
  --separator-color: #FFFFFF; /* White separator for dark mode */
  --primary-color: #FF8C00; /* 주황색 추가 (다크 모드) */
  --primary-color-light: #FFB000; /* 주황색 밝은 버전 (다크 모드) */
  --primary-color-shadow: rgba(255, 140, 0, 0.3); /* 주황색 그림자 (다크 모드) */
  
  /* Enhancement Controls - Dark Mode */
  --enhancement-bg: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  --enhancement-shadow: rgba(0, 0, 0, 0.3);
  --level-display-bg: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  --level-display-text: #ffffff;
  --level-display-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --level-display-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  --level-btn-bg: linear-gradient(135deg, #6c757d, #495057);
  --level-btn-border: #343a40;
  --level-btn-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  --level-btn-hover-bg: linear-gradient(135deg, #868e96, #6c757d);
  --level-btn-hover-border: #495057;
  --level-btn-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  
  /* Tier Colors (same for dark mode) */
  --tier-0-color: #6c757d;
  --tier-1-color: #26A69A;
  --tier-2-color: #8E24AA;
  --tier-3-color: #C79121;
  --tier-4-color: #C62828;
}

html {
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Hide scrollbar for Chrome, Safari and Opera - 모든 요소 (드롭다운 제외) */
*:not(.custom-select-options):not(.dropdown-options):not(.db-builds-scroll):not(.modal-scroll)::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox - 모든 요소 (드롭다운 제외) */
*:not(.custom-select-options):not(.dropdown-options):not(.db-builds-scroll):not(.modal-scroll) {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* 드롭다운 스크롤바 스타일 복원 */
.custom-select-options::-webkit-scrollbar,
.dropdown-options::-webkit-scrollbar {
  width: 8px;
  display: block;
}

.custom-select-options::-webkit-scrollbar-track,
.dropdown-options::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb,
.dropdown-options::-webkit-scrollbar-thumb {
  background: #42A5F5;
  background: var(--accent-color, #42A5F5);
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover,
.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: #64B5F6;
  background: var(--accent-hover, #64B5F6);
}

.custom-select-options,
.dropdown-options {
  -ms-overflow-style: auto;  /* IE and Edge */
  scrollbar-width: thin;  /* Firefox */
  scrollbar-color: #42A5F5 #1a1a1a;
  scrollbar-color: var(--accent-color, #42A5F5) #1a1a1a;
}

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

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f0f2f5;
  background-color: var(--bg-color);
  color: #212529;
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  min-height: 100vh;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 전역 Select/Option 스타일 - 모든 드롭다운에 적용 */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #f0f2f5 !important;
  background-color: var(--bg-color, #1a1a1a) !important;
  color: #212529 !important;
  color: var(--text-primary, #ffffff) !important;
  border: 1px solid #ced4da;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #42A5F5 !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2) !important;
}

select option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
}

select option:checked {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color) !important;
  background: linear-gradient(#42A5F5, #42A5F5) !important;
  background: linear-gradient(var(--accent-color), var(--accent-color)) !important;
  color: #ffffff !important;
}

select option:hover {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color) !important;
  background: linear-gradient(#42A5F5, #42A5F5) !important;
  background: linear-gradient(var(--accent-color), var(--accent-color)) !important;
  color: #ffffff !important;
}

/* Tailwind accent color utilities using CSS variables */

/* TFD 스타일 구분선 - 회색 줄에 양 끝 흰 사각형 점 */
.tfd-divider {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.tfd-divider::before,
.tfd-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.tfd-divider::before {
  left: 0;
}

.tfd-divider::after {
  right: 0;
}

/* TFD 내부 박스 - 회색 테두리에 네 모서리 흰 사각형 점 */
.tfd-inner-box-wrapper {
  position: relative;
}

.tfd-inner-box-wrapper .tfd-inner-box-corners {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* 네 모서리에 흰색 정사각형 */
.tfd-inner-box-wrapper .tfd-inner-box-corners::before,
.tfd-inner-box-wrapper .tfd-inner-box-corners::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
}

/* 좌상단 */
.tfd-inner-box-wrapper .tfd-inner-box-corners::before {
  top: -2px;
  left: -2px;
}

/* 우상단 */
.tfd-inner-box-wrapper .tfd-inner-box-corners::after {
  top: -2px;
  right: -2px;
}

/* wrapper에 추가 pseudo-element로 좌하단, 우하단 */
.tfd-inner-box-wrapper::before,
.tfd-inner-box-wrapper::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1;
}

/* 좌하단 */
.tfd-inner-box-wrapper::before {
  bottom: -2px;
  left: -2px;
}

/* 우하단 */
.tfd-inner-box-wrapper::after {
  bottom: -2px;
  right: -2px;
}

.tfd-inner-box {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 16px;
}

/* 중앙 콘텐츠 영역 스크롤바 숨김 */
.center-content-scroll::-webkit-scrollbar {
  display: none;
}
.hover\:border-gray-500:hover {
  --tw-border-opacity: 1;
  border-color: rgb(107 114 128 / 1);
  border-color: rgb(107 114 128 / var(--tw-border-opacity, 1));
}
.hover\:border-tfd-accent:hover {
  --tw-border-opacity: 1;
  border-color: rgb(66 165 245 / 1);
  border-color: rgb(66 165 245 / var(--tw-border-opacity, 1));
}
.hover\:border-tfd-primary:hover {
  --tw-border-opacity: 1;
  border-color: rgb(255 140 0 / 1);
  border-color: rgb(255 140 0 / var(--tw-border-opacity, 1));
}
.hover\:bg-green-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(21 128 61 / 1);
  background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1));
}
.hover\:bg-red-600:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(220 38 38 / 1);
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}
.hover\:bg-red-700:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(185 28 28 / 1);
  background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
}
.hover\:bg-tfd-border:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(66 66 66 / 1);
  background-color: rgb(66 66 66 / var(--tw-bg-opacity, 1));
}
.hover\:bg-tfd-card:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(44 44 44 / 1);
  background-color: rgb(44 44 44 / var(--tw-bg-opacity, 1));
}
.hover\:bg-tfd-hover:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(44 44 44 / 1);
  background-color: rgb(44 44 44 / var(--tw-bg-opacity, 1));
}
.hover\:bg-tfd-hover\/5:hover {
  background-color: rgb(44 44 44 / 0.05);
}
.hover\:text-tfd-accent:hover {
  --tw-text-opacity: 1;
  color: rgb(66 165 245 / 1);
  color: rgb(66 165 245 / var(--tw-text-opacity, 1));
}
.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / 1);
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.hover\:shadow-lg:hover {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.hover\:shadow-tfd-accent\/20:hover {
  --tw-shadow-color: rgb(66 165 245 / 0.2);
  --tw-shadow: var(--tw-shadow-colored);
}
.hover\:shadow-tfd-accent\/30:hover {
  --tw-shadow-color: rgb(66 165 245 / 0.3);
  --tw-shadow: var(--tw-shadow-colored);
}
.hover\:bg-tfd-accent-hover:hover:hover {
    background-color: var(--accent-hover) !important;
  }
.hover\:text-tfd-accent:hover {
    color: #42A5F5 !important;
    color: var(--accent-color) !important;
  }
.hover\:border-tfd-accent:hover {
    border-color: #42A5F5 !important;
    border-color: var(--accent-color) !important;
  }
.focus\:border-tfd-primary:focus {
  --tw-border-opacity: 1;
  border-color: rgb(255 140 0 / 1);
  border-color: rgb(255 140 0 / var(--tw-border-opacity, 1));
}
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus\:ring-2:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.focus\:ring-green-500:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));
}
.focus\:ring-red-500:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));
}
.focus\:ring-tfd-accent:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(66 165 245 / var(--tw-ring-opacity, 1));
}
.focus\:ring-offset-2:focus {
  --tw-ring-offset-width: 2px;
}
.focus\:ring-tfd-accent:focus {
    --tw-ring-color: var(--accent-color) !important;
  }
.active\:scale-95:active {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.active\:scale-\[0\.99\]:active {
  --tw-scale-x: 0.99;
  --tw-scale-y: 0.99;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.active\:border-tfd-accent:active {
  --tw-border-opacity: 1;
  border-color: rgb(66 165 245 / 1);
  border-color: rgb(66 165 245 / var(--tw-border-opacity, 1));
}
.active\:border-tfd-primary:active {
  --tw-border-opacity: 1;
  border-color: rgb(255 140 0 / 1);
  border-color: rgb(255 140 0 / var(--tw-border-opacity, 1));
}
.active\:bg-red-700:active {
  --tw-bg-opacity: 1;
  background-color: rgb(185 28 28 / 1);
  background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
}
.active\:border-tfd-accent:active {
    border-color: #42A5F5 !important;
    border-color: var(--accent-color) !important;
  }
.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}
.group:hover .group-hover\:scale-110 {
  --tw-scale-x: 1.1;
  --tw-scale-y: 1.1;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@media (min-width: 640px) {

  .sm\:mr-4 {
    margin-right: 1rem;
  }

  .sm\:h-10 {
    height: 2.5rem;
  }

  .sm\:h-20 {
    height: 5rem;
  }

  .sm\:h-\[90vh\] {
    height: 90vh;
  }

  .sm\:max-h-\[90vh\] {
    max-height: 90vh;
  }

  .sm\:min-h-\[100px\] {
    min-height: 100px;
  }

  .sm\:w-10 {
    width: 2.5rem;
  }

  .sm\:w-24 {
    width: 6rem;
  }

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:gap-3 {
    gap: 0.75rem;
  }

  .sm\:gap-4 {
    gap: 1rem;
  }

  .sm\:rounded-2xl {
    border-radius: 1rem;
  }

  .sm\:rounded-xl {
    border-radius: 0.75rem;
  }

  .sm\:p-3 {
    padding: 0.75rem;
  }

  .sm\:p-4 {
    padding: 1rem;
  }

  .sm\:p-5 {
    padding: 1.25rem;
  }

  .sm\:p-6 {
    padding: 1.5rem;
  }

  .sm\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .sm\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .sm\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .sm\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .sm\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .sm\:hover\:scale-105:hover {
    --tw-scale-x: 1.05;
    --tw-scale-y: 1.05;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  }
}
@media (min-width: 768px) {

  .md\:block {
    display: block;
  }

  .md\:p-4 {
    padding: 1rem;
  }
}
@media (min-width: 1024px) {

  .lg\:block {
    display: block;
  }

  .lg\:flex {
    display: flex;
  }

  .lg\:hidden {
    display: none;
  }

  .lg\:h-auto {
    height: auto;
  }

  .lg\:rounded-none {
    border-radius: 0px;
  }

  .lg\:border-none {
    border-style: none;
  }

  .lg\:bg-transparent {
    background-color: transparent;
  }

  .lg\:p-0 {
    padding: 0px;
  }

  .lg\:pb-0 {
    padding-bottom: 0px;
  }
}


.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px 15px;
  background-color: var(--panel-bg-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  transition: background-color 0.3s;
}

/* 모바일 헤더 높이 증가 */
@media (max-width: 767px) {
  .main-header {
    padding: 12px 15px;
    min-height: 56px;
  }
}

.header-logo {
  height: 36px;
  width: auto;
  filter: var(--logo-filter);
  transition: filter 0.3s;
}

.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-color);
}

.theme-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #888;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.theme-toggle-switch.toggled {
  background-color: #007bff;
}

.theme-toggle-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease-in-out;
}

.theme-toggle-switch.toggled .theme-toggle-thumb {
  transform: translateX(20px);
}

.page-content-split {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 15px;
  align-items: center;
  min-height: calc(100vh - 60px);
  margin: 60px auto 0 auto;
  max-width: 450px;
  width: 100%;
}

.main-left-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-right-column {
  /* 모바일에서는 JS 토글로 제어 */
}

.right-panel-section {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 768px) {
  .right-panel-section {
    flex: none;
  }
}

.left-panel {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border-radius: 12px;
  padding: 15px;
  background-color: var(--panel-bg-color);
  transition: all 0.3s ease;
  box-sizing: border-box;
  position: relative;
  min-height: -webkit-fit-content;
  min-height: fit-content;
}

.left-panel.collapsed {
  padding: 10px 10px 0 10px;
  gap: 0;
}

/* 패널 접기/펼치기 버튼 */
.panel-toggle-button {
  width: 100%;
  height: 24px;
  background: linear-gradient(to bottom, transparent, var(--panel-bg-color) 50%);
  border: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  color: var(--text-color);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-top: auto;
  opacity: 0.7;
}


.descendant-info-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--placeholder-text-color);
  font-size: 1.2rem;
  width: 100%;
}

.initial-selection-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  /* Use flex-grow to fill available space */
  cursor: pointer;
  /* Portal 박스(z-index: 100)보다 위에 위치하도록 설정 */
  position: relative;
  z-index: 101;
}

.initial-selection-placeholder span {
  font-size: 20px;
  font-weight: 600;
  color: var(--placeholder-text-color);
}

/* === Descendant Info Styles Start === */
.descendant-info-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
}

.descendant-image-container {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.descendant-image-container img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 2px solid var(--panel-border-color);
  object-fit: cover;
  animation: fadeIn 0.4s ease-in-out;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.descendant-image-container:hover .image-overlay {
  opacity: 1;
}

.descendant-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ultimate-toggle {
  position: relative;
  width: 80px;
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
}

.ultimate-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  display: flex;
  background-color: #495057;
  border-radius: 14px;
  transform: translateX(-50%);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ultimate-toggle.toggled .ultimate-toggle-track {
  transform: translateX(0);
  background-color: #c89b3c;
}

.toggle-text-option {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #f8f9fa;
  box-sizing: border-box;
}

.toggle-text-option:first-child {
  /* 얼티밋 */
  padding-right: 26px;
}

.toggle-text-option:last-child {
  /* 일반 */
  padding-left: 26px;
}

.ultimate-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: #f8f9fa;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ultimate-toggle.toggled .ultimate-toggle-thumb {
  transform: translateX(52px);
}

/* === Descendant Info Styles End === */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.selector-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.selector-modal-content {
  background: var(--panel-bg-color);
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  text-align: center;
  position: relative;
  color: var(--text-color);
  /* --- Additions for flexible height --- */
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  /* Use 85% of the viewport height */
}

.close-modal-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
}

.descendant-grid-2rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-gap: 15px;
  gap: 15px;
  /* max-height: 320px; <-- This is removed */
  flex-grow: 1;
  /* Allow the grid to fill available space */
  overflow-y: auto;
  /* Enable scrolling within the grid */
  margin-top: 20px;
  padding: 5px;
}

.descendant-card-small {
  border: 2px solid var(--panel-border-color);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: var(--bg-color);
}

.descendant-card-small:hover {
  transform: translateY(-3px);
}

.descendant-card-small.selected {
  border-color: #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.descendant-card-small img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 5px;
}

.descendant-card-small span {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-color);
}

.chrome-frame {
  width: 100%;
  border: none;
  background-color: transparent;
  padding: 0;
}

.simulator-content-area {
  width: 100%;
  background-color: transparent;
  padding: 0;
  box-sizing: border-box;
}

.placeholder-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  color: var(--text-color-secondary);
  font-size: 1.2rem;
}

/* === Live Display Animation === */
.live-display-wrapper {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, max-height 0.4s ease-out, transform 0.4s ease-out;
  display: none;
  /* Hide by default */
}

.live-display-wrapper.visible {
  display: block;
  opacity: 1;
  max-height: 1000px;
  transform: translateY(0);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* 탭 초기화 로딩 모달 */
.tab-init-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.tab-init-loading-modal {
  background-color: var(--panel-bg-color);
  border-radius: 12px;
  padding: 40px 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
  min-width: 400px;
  max-width: 500px;
}

.tab-init-loading-modal h3 {
  margin: 20px 0 15px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

.tab-init-current {
  font-size: 16px;
  color: var(--secondary-text-color);
  margin: 10px 0 20px 0;
  font-weight: 500;
}

.tab-init-progress-bar {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 15px;
}

.tab-init-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.tab-init-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #007bff;
  border-radius: 50%;
  animation: tab-init-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes tab-init-spin {
  to {
    transform: rotate(360deg);
  }
}


/* 플로팅 컨택 메뉴 */
.floating-contact-menu {
  position: fixed;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

/* 메인 버튼 (?) */
.contact-main-button {
  width: 50px;
  height: 50px;
  background-color: var(--panel-bg-color);
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--panel-border-color);
}

.floating-contact-menu:hover .contact-main-button {
  background-color: var(--panel-border-color);
  transform: rotate(360deg);
}

/* 서브 메뉴 아이템들 (디스코드, DC) */
.contact-menu-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.floating-contact-menu:hover .contact-menu-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contact-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  text-decoration: none;
  background-color: white;
  /* 아이콘 배경 */
}

.contact-item:hover {
  transform: scale(1.1);
}

/* 디스코드 아이콘 스타일 */
.discord-item {
  background-color: #5865F2;
  color: white;
}

/* DC 아이콘 스타일 */
.dc-item {
  background-color: #2e3548;
  /* DC Inside Dark Theme Color */
  overflow: hidden;
  /* 원형 마스킹 */
}

.dc-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 서버 저장 빌드 리스트 스크롤바 (5개 높이 제한) */
/* 스크롤 컨테이너 내부에서는 호버 시 위로 뜨는 translateY 효과 제거 (최상단 카드 잘림 방지) */
.db-builds-scroll .recent-nickname-btn:hover {
  transform: none;
}
@keyframes db-builds-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* 빌드 선택 패널 내부 컨텐츠 (높이 변화는 hero-search-anim 에서 처리) */
.build-select-panel {
  animation: build-select-fade 0.3s ease-out;
}
@keyframes build-select-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* hero-search 내부 컨텐츠 높이 전환 — intro ↔ select ↔ loading 간 부드러운 리사이즈 */
.hero-search-anim {
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.db-builds-scroll::-webkit-scrollbar {
  width: 6px;
}
.db-builds-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.db-builds-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
}
.db-builds-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
.db-builds-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
  overflow-y: scroll !important;
}

/* === 메인 컨테이너 === */
.user-lookup-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  z-index: 9999;
}

/* 모바일에서만 배경 패닝 애니메이션 */
@media (max-width: 768px) {
  .user-lookup-page > .bg-layer {
    background-size: auto 100% !important;
    animation: backgroundPanRightToLeft 80s linear infinite;
  }
}

/* 배경 우->좌 이동 애니메이션 (단방향, 모바일 전용) */
@keyframes backgroundPanRightToLeft {
  0% {
    background-position: 100% center;
  }

  100% {
    background-position: 0% center;
  }
}

/* 배경 오버레이 */
.user-lookup-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
}

/* === 화면 전환 암전 오버레이 === */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.4s ease-in-out;
}

.transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}


/* === 테마 토글 버튼 (우상단 고정) === */
.theme-toggle-btn-fixed {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--panel-bg-color);
  border: 1px solid var(--panel-border-color);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn-fixed:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* === 메인 콘텐츠 - 좌측 정렬 === */
.lookup-main-centered {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 10px 20px 10px;
  position: relative;
  z-index: 10000;
}

/* PC: hero 중심이 화면의 1/4 지점에 위치 */
@media (min-width: 769px) {
  .lookup-main-centered {
    justify-content: flex-start;
    padding-left: calc(25vw - 250px);
  }
}

.lookup-hero {
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 로고 (제목 대신 사용) === */
.hero-logo-title {
  width: 220px;
  max-width: 90%;
  height: auto;
  margin: 0 auto 16px auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  display: block;
}

/* === 검색 섹션 === */
.hero-search {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.hero-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
  line-height: 1.6;
}

/* === 입력 그룹 === */
.hero-input-group {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 24px;
  align-items: stretch;
}

.hero-input {
  flex: 1 1;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.hero-input:focus {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.1);
}

.hero-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hero-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* === 버튼 스타일 === */
.hero-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  position: relative;
  overflow: hidden;
}

/* 모바일에서 버튼 텍스트 숨김, PC에서 표시 */
.btn-text {
  display: none;
}

@media (min-width: 640px) {
  .btn-text {
    display: inline;
  }
}

/* 입력 그룹 내부 버튼 (불러오기)은 너비 자동 조절 */
.hero-input-group .hero-btn {
  width: auto;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 72px;
  padding-left: 16px;
  padding-right: 16px;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-btn svg {
  font-size: 20px;
  z-index: 1;
}

.hero-btn.primary {
  background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
  background: linear-gradient(135deg, var(--accent-color, #42A5F5) 0%, var(--accent-hover, #64B5F6) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(66, 165, 245, 0.4);
}

.hero-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(66, 165, 245, 0.5);
}

.hero-btn.primary:active:not(:disabled) {
  transform: translateY(0);
}

.hero-btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hero-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
}

.hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* === 버튼 스피너 === */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === 에러 메시지 === */
.hero-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  margin-top: 16px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 12px;
  color: #ff6b6b;
  font-size: 14px;
  animation: shake 0.5s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

/* === 최근 닉네임 === */
.recent-nickname,
.recent-nickname-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 0 auto;
  padding: 0 12px;
  height: 36px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.recent-nickname:hover,
.recent-nickname-btn:hover {
  background: rgba(20, 20, 20, 1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.recent-nickname:active,
.recent-nickname-btn:active {
  transform: translateY(0);
}

.recent-nickname-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.recent-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.recent-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.recent-value {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* === 로딩 디스플레이 === */
.hero-loading-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 샌드박스 스텝 전환 애니메이션 */
@keyframes sandboxSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sandboxSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sandbox-step-forward {
  animation: sandboxSlideUp 0.3s ease-out;
}

.sandbox-step-backward {
  animation: sandboxSlideDown 0.3s ease-out;
}

.loading-portrait {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid rgba(66, 165, 245, 0.6);
  border: 3px solid var(--accent-color, rgba(66, 165, 245, 0.6));
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 8px 32px rgba(66, 165, 245, 0.3);
  box-shadow: 0 8px 32px var(--accent-color, rgba(66, 165, 245, 0.3));
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loading-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-content .descendant-name {
  font-size: 28px;
  font-weight: 700;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.loading-step-text {
  font-size: 16px;
  color: #42A5F5;
  color: var(--accent-color, #42A5F5);
  font-weight: 500;
  text-align: center;
  min-height: 24px;
}

/* === 프로그래스 바 === */
.loading-progress-container {
  width: 100%;
  height: 46px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(66, 165, 245, 0.3);
  border: 2px solid var(--accent-color, rgba(66, 165, 245, 0.3));
  margin-top: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
  background: linear-gradient(135deg, var(--accent-color, #42A5F5) 0%, var(--accent-hover, #64B5F6) 100%);
  transition: width 0.5s ease;
  border-radius: 10px;
}

.loading-progress-text {
  font-size: 13px;
  font-weight: 600;
  color: white;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.loading-confirm-btn {
  margin-top: 8px;
  padding: 14px 48px;
  background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
  background: linear-gradient(135deg, var(--accent-color, #42A5F5) 0%, var(--accent-hover, #64B5F6) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 165, 245, 0.4);
}

.loading-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(66, 165, 245, 0.5);
}

.loading-confirm-btn:active {
  transform: translateY(0);
}

/* === 구분선 === */
.hero-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.7;
}

.hero-divider::before,
.hero-divider::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: var(--border-color);
}

.hero-divider span {
  padding: 0 12px;
}

/* === 푸터 === */
.lookup-footer {
  padding: 10px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-label {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.footer-logo {
  height: 13px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.footer-logo.nexon-logo {
  height: 11px;
}

.footer-logo.ai-logo {
  height: 13px;
}

.footer-separator {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.footer-gemini-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  vertical-align: middle;
}

.footer-logo.gemini-icon {
  margin-right: 2px;
  vertical-align: middle;
}

.footer-gemini-text {
  font-family: 'Google Sans Flex', 'Google Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  line-height: 13px;
  vertical-align: middle;
}

/* === 라이트 테마 === */
[data-theme="light"] .user-lookup-page {
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

[data-theme="light"] .hero-search {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero-input {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .hero-btn.secondary {
  background: white;
}

[data-theme="light"] .hero-btn.secondary:hover {
  background: #f8f9fa;
}
/* 계승자 헤더 메인 컨테이너 - 단일 구조 */
.descendant-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  /* 탭 네비게이션 absolute positioning을 위해 */
}

/* 계승자 이미지 컨테이너 */
.descendant-header .image-container {
  width: 36px !important;
  /* PC 크기 축소 */
  height: 36px !important;
  /* PC 크기 축소 */
  flex-shrink: 0;
  /* 크기 고정 */
  position: relative;
  cursor: pointer;
}

/* 계승자 이미지 스타일 */
.descendant-header .image-container img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  border: 1px solid var(--panel-border-color);
  object-fit: cover;
  animation: fadeIn 0.4s ease-in-out;
  /* 이미지 변경 시 페이드인 애니메이션 */
}

/* 이미지 호버 시 표시되는 오버레이 */
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

/* 이미지 호버 시 오버레이 표시 */
.descendant-header .image-container:hover .image-overlay {
  opacity: 1;
}

/* 클릭 비활성화 상태 */
.descendant-header .image-container.no-click {
  cursor: default;
}

.descendant-header .image-container.no-click:hover .image-overlay {
  opacity: 0;
}

/* 계승자 정보 컨테이너 (이름, 스킬) */
.info-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1;
  /* 탭 네비게이션보다 앞에 */
  justify-content: center;
  /* 세로 가운데 정렬 */
}

/* 탭 네비게이션 래퍼 */
.tab-navigation-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 0;
  /* info-container 뒤에 */
}

/* 검색 영역 전체 컨테이너 */
.search-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 검색창 + 로고 컨테이너 */
.search-logo-container {
  display: flex;
  align-items: center;
  gap: 0;
  background-color: #000;
  border-radius: 8px;
  /* 탭 전환 버튼과 동일한 곡률 */
  padding: 10px 16px;
  /* 상하 패딩 증가: 6px → 10px */
  border: none;
  /* 테두리 제거 */
  transition: background-color 0.2s;
}

/* 헤더 로고 이미지 */
.header-logo {
  height: 20px;
  /* 크기 축소: 24px → 20px */
  width: auto;
  flex-shrink: 0;
  margin-left: 4px;
  /* 왼쪽 간격 추가 */
  margin-right: 12px;
  /* 오른쪽 간격 */
  opacity: 0.8;
}

/* 헤더 닉네임 표시 */
.header-nickname-display {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

/* 이름과 스탯을 담는 컨테이너 */
.name-and-stats {
  display: flex;
  flex-direction: row;
  /* 가로 배치 */
  align-items: center;
  gap: 16px;
}

/* 기본 스탯 1x4 가로 배치 */
.base-stats-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* 개별 스탯 아이템 */
.stat-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 스탯 라벨 */
.stat-label {
  font-size: 16px;
  /* 크기 증가: 14px → 16px */
  color: #888;
  color: var(--text-secondary, #888);
  font-weight: 600;
}

/* 스탯 값 */
.stat-value {
  font-size: 20px;
  /* 크기 증가: 18px → 20px */
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 700;
  font-family: 'EliceDigitalBaeum-Bd', monospace, sans-serif;
}

/* 헤더 전용 스탯 값 */
.header-stat-value {
  font-size: 16px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 700;
  font-family: 'D2Coding', monospace, sans-serif;
}

/* 스탯 보너스 */
.stat-bonus {
  font-size: 15px;
  /* 크기 증가: 13px → 15px */
  font-weight: 600;
  font-family: 'D2Coding', monospace, sans-serif;
}

.stat-bonus.positive {
  color: #4ade80;
}

.stat-bonus.negative {
  color: #f87171;
}

/* 스탯 상세 모달 오버레이 */
.stat-detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  pointer-events: none;
}

/* 스탯 상세 모달 */
.stat-detail-modal {
  position: fixed;
  background-color: var(--panel-bg-color);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 1101;
}

/* 모달 헤더 */
.stat-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-shrink: 0;
}

.stat-detail-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color-primary);
}

.stat-detail-close {
  background: none;
  border: none;
  color: var(--text-color-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-detail-close:hover {
  opacity: 0.7;
}

/* 모달 컨텐츠 */
.stat-detail-content {
  padding: 10px;
  border-radius: 6px;
  margin: 0 10px 10px 10px;
  overflow-y: auto;
  flex: 1 1;
}

/* 스탯 상세 리스트 */
.stat-detail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 개별 스탯 아이템 (SkillDamagePanel의 damage-row 스타일) */
.stat-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 18px;
}

/* 스탯 출처 (SkillDamagePanel의 damage-label 스타일) */
.stat-item-source {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* 스탯 값 (SkillDamagePanel의 damage-value 스타일) */
.stat-item-value {
  color: var(--text-primary);
  font-family: 'D2Coding', monospace;
  font-size: 13px;
  font-weight: 600;
}

/* 빈 상태 */
.stat-detail-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-color-light);
  font-size: 12px;
}

/* 기본값 항목 */
.stat-base-item {
  padding-top: 6px;
}

.stat-base-item .stat-item-source {
  font-weight: 700;
}

/* 합연산 합계 항목 (SkillDamagePanel의 coefficient-sum 스타일) */
.stat-subtotal-item {
  border-top: 1px solid var(--border-color-light);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 600;
}

.stat-subtotal-item .stat-item-source {
  color: var(--text-primary);
  font-weight: 700;
}

.stat-subtotal-item .stat-item-value {
  font-weight: 700;
}

/* 최종값 항목 (SkillDamagePanel의 final-damage 스타일) */
.stat-final-item {
  padding-top: 6px;
  font-weight: bold;
}

.stat-final-item .stat-item-source {
  font-weight: 700;
}

.stat-final-item .stat-item-value {
  color: var(--accent-color);
  font-size: 14px;
  font-weight: bold;
}

/* 이름 라인 아래 콘텐츠 영역 - 더 이상 사용하지 않음 */
.name-line-content {
  margin-top: 8px;
}

/* 계승자 이름 스타일 */
.descendant-name {
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  font-size: 1.3rem;
  /* rem 단위로 변경 */
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* 계승자 이름 텍스트만 패딩 적용 */
.descendant-name-text {
  padding-bottom: 4px;
  /* 폰트가 아래로 치우친 것을 보정 */
}

/* 타입 아이콘 (토글 썸 안에 표시) - 이제 사용 안 함 */
.type-icon {
  width: 18px;
  height: 18px;
}

/* 타입 아이콘 (일반 헤더) */
.type-icon-large {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* 타입 아이콘 (collapsed 상태) */
.type-icon-standalone {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* 타입 아이콘 (이름 뒤에 인라인 표시) */
.type-icon-inline {
  width: 18px;
  /* PC 크기 축소 */
  height: 18px;
  /* PC 크기 축소 */
  margin-left: 0;
  /* gap으로 간격 조정 */
  vertical-align: middle;
  display: inline-block;
}

/* ULT 뱃지 스타일 */
.ult-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #98702E;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: bold;
  font-family: 'Pretendard', sans-serif;
  padding: 0px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
  margin-left: 0;
  margin-right: 0;
  height: 100%;
  flex-shrink: 0;
}

.ult-badge:hover:not(.disabled) {
  background-color: #b8924e;
  transform: translateY(-1px);
}

.ult-badge.active {
  background-color: #c89b3c;
  box-shadow: 0 0 8px rgba(200, 155, 60, 0.5);
}

.ult-badge.disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 인라인 스킬 정보 컨테이너 (이름 오른쪽) */
.skills-container-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 인라인 개별 스킬 라인 */
.skill-line-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  background-color: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color-light);
}

/* 인라인 스킬 아이콘 */
.skill-icon-inline {
  width: 16px;
  height: 16px;
  filter: var(--icon-filter);
  /* 테마에 따른 아이콘 필터 */
}

/* 기존 스킬 정보 컨테이너 (사용하지 않음) */
.skills-container {
  display: none;
}

/* 기존 개별 스킬 라인 (사용하지 않음) */
.skill-line {
  display: none;
}

/* 기존 스킬 아이콘 (사용하지 않음) */
.skill-icon {
  display: none;
}

/* === 얼티밋 토글 스위치 스타일 === */

/* 토글 스위치 컨테이너 */
.ultimate-toggle-container {
  position: relative;
  width: 70px;
  /* 가로 길이 축소 */
  height: 28px;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

/* 비활성화 상태 (얼티밋 버전이 없는 경우) */
.ultimate-toggle-container.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* 토글 트랙 (배경과 텍스트) */
.ultimate-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  /* 두 배 너비로 설정하여 슬라이드 효과 구현 */
  height: 100%;
  display: flex;
  background-color: #6c757d;
  /* 기본 '일반' 상태 색상 */
  transform: translateX(-50%);
  /* 초기 위치: 일반 모드 */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 토글된 상태 (얼티밋 모드) */
.ultimate-toggle-track.toggled {
  transform: translateX(0);
  background-color: #c89b3c;
  /* 얼티밋 상태 색상 */
}

/* 토글 텍스트 옵션 */
.toggle-text-option {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #f8f9fa;
  box-sizing: border-box;
}

/* 얼티밋 텍스트 패딩 조정 */
.toggle-text-option:first-child {
  padding-right: 22px;
}

/* 일반 텍스트 패딩 조정 */
.toggle-text-option:last-child {
  padding-left: 22px;
}

/* 토글 썸 (이동하는 원형 버튼) */
.ultimate-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background-color: #f8f9fa;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 토글된 상태의 썸 위치 */
.ultimate-toggle-thumb.toggled {
  transform: translateX(42px);
  /* 이동 거리 */
}

/* 이미지 변경 시 페이드인 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 기본 스탯 표시 - 컴팩트한 형태 */
.descendant-base-stats {
  margin-top: 12px;
  padding: 8px 0;
}

.base-stats-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.base-stat-compact {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.stat-name-compact {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value-compact {
  color: var(--text-primary);
  font-weight: 600;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

/* 빌드 공유 영역 */
.build-share-section {
  margin-top: 4px;
  padding: 10px;
  background: var(--bg-color-light);
  border: 1px solid var(--border-color-light);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.build-code-row,
.build-import-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.build-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 50px;
  text-align: left;
  font-family: D2Coding, Consolas, monospace;
}

.build-code-display,
.build-import-input {
  flex: 1 1;
  padding: 3px 6px;
  font-size: 10px;
  font-family: D2Coding, Consolas, monospace;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--text-primary);
  min-height: 20px;
  box-sizing: border-box;
}

.build-code-display {
  background: var(--bg-color-darker);
  cursor: default;
  -webkit-user-select: text;
          user-select: text;
}

.build-import-input::placeholder {
  color: var(--text-disabled);
  font-style: italic;
}

.build-import-input:focus,
.build-code-display:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px rgba(var(--accent-color-rgb), 0.3);
}

.build-action-btn {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 500;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  height: 24px;
  font-family: inherit;
}

.build-action-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.build-action-btn:disabled {
  background: var(--text-disabled);
  cursor: not-allowed;
  transform: none;
}

/* 모바일 스타일 (1023px 이하에만 적용) */
@media (max-width: 1023px) {
  /* 계승자 이미지 크기 (모바일) */
  .descendant-header .image-container {
    width: 36px !important;
    height: 36px !important;
  }

  /* 계승자 이름 폰트 크기 (모바일) */
  .descendant-name {
    font-size: 14px !important;
  }

  /* 타입 아이콘 (모바일) */
  .type-icon-inline {
    width: 16px !important;
    height: 16px !important;
  }
}

/* 스킬 라인 박스 크기 (모바일 기본값) */
.skill-line-inline {
  padding: 1px 2px;
  font-size: 10px;
  gap: 2px;
}

.skill-icon-inline {
  width: 10px;
  height: 10px;
}

.build-share-section {
  margin-top: 6px;
  padding: 4px;
  gap: 3px;
}

.build-label {
  font-size: 9px;
  min-width: 35px;
}

.build-code-display,
.build-import-input {
  font-size: 8px;
  padding: 2px 3px;
  min-height: 16px;
}

.build-action-btn {
  font-size: 8px;
  padding: 2px 6px;
  min-width: 28px;
  height: 20px;
}

.build-code-row,
.build-import-row {
  gap: 3px;
}

/* 헤더 스탯: 모바일에서 숨김, PC에서 표시 */
.base-stats-inline {
  display: none;
}

@media (min-width: 1024px) {
  .base-stats-inline {
    display: flex;
  }
}


/* 접힌 상태 스타일 */
.collapsed-header {
  gap: 12px !important;
}

.collapsed-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 12px;
}

.collapsed-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* 접힌 상태의 작은 이미지 */
.image-container.collapsed-image {
  width: 50px;
  height: 50px;
  cursor: pointer;
}

.image-container.collapsed-image img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  border: 1px solid var(--panel-border-color);
  object-fit: contain;
}

.collapsed-descendant-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.collapsed-descendant-name:hover {
  background-color: var(--hover-bg-color);
}

.ultimate-toggle-container.collapsed {
  width: 70px;
  height: 28px;
}
/* 커스텀 드롭다운 컨테이너 */
.custom-select {
  position: relative;
  width: 100%;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.custom-select.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 선택된 값 표시 영역 */
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background-color: #1a1a1a;
  background-color: var(--card-bg-color, #1a1a1a);
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.custom-select:not(.disabled):hover .custom-select-trigger {
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  background: #0d0d0d;
  background: var(--bg-color-dark, #0d0d0d);
}

.custom-select:focus .custom-select-trigger,
.custom-select.open .custom-select-trigger {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 2px color-mix(in srgb, #42A5F5 15%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-color, #42A5F5) 15%, transparent);
}

.custom-select-value {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  margin-left: 8px;
  font-size: 10px;
  transition: transform 0.2s ease;
  color: #999;
  color: var(--text-secondary, #999);
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

/* 드롭다운 옵션 목록 */
.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background-color: #1a1a1a;
  background-color: var(--bg-color, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

/* Portal로 렌더링된 드롭다운 */
.custom-select-portal {
  z-index: 10000 !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 옵션 스크롤바 */
.custom-select-options::-webkit-scrollbar {
  width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: #42A5F5;
  background: var(--accent-color, #42A5F5);
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: #64B5F6;
  background: var(--accent-hover, #64B5F6);
}

/* 개별 옵션 */
.custom-select-option {
  padding: 8px 10px;
  background-color: transparent;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-select-option:hover {
  background-color: color-mix(in srgb, #42A5F5 15%, transparent);
  background-color: color-mix(in srgb, var(--accent-color, #42A5F5) 15%, transparent);
  color: white;
}

.custom-select-option.selected {
  background-color: color-mix(in srgb, #42A5F5 25%, transparent);
  background-color: color-mix(in srgb, var(--accent-color, #42A5F5) 25%, transparent);
  color: #ffffff;
  font-weight: 500;
}

/* 반응형 - 모바일 기본 */
.custom-select-trigger {
  padding: 10px 12px;
  font-size: 13px;
}

.custom-select-option {
  padding: 12px;
  font-size: 13px;
}

/* 마키 텍스트 컴포넌트 스타일 */

/* 바운싱 마키 애니메이션 (좌→우→좌 반복) */
@keyframes marquee-bounce {
  0%, 15% {
    transform: translateX(0);
  }
  42.5%, 57.5% {
    transform: translateX(-30px);
    transform: translateX(var(--marquee-distance, -30px));
  }
  85%, 100% {
    transform: translateX(0);
  }
}

/* 마키 텍스트 래퍼 */
.marquee-wrapper {
  display: inline-block;
  overflow: hidden;
  flex-shrink: 0;
}

/* 마키 텍스트 내부 */
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  color: #ccc;
  font-size: 12px;
}

/* 애니메이션 적용 */
.marquee-inner.animate {
  animation: marquee-bounce 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* 모듈 시뮬레이터 메인 컨테이너 - 모바일 전용 */
.module-simulator {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* 모듈 시뮬레이터가 활성 탭일 때만 표시 */
.module-simulator.visible {
  display: flex;
}

.module-simulator.hidden {
  display: none;
}

/* 누적 능력치 테이블 섹션 */
.module-stats-section {
  background: var(--card-bg-color);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-top: 20px;
}

.module-stats-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 14px;
}

.module-stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-color);
}

.module-stats-table tr:last-child td {
  border-bottom: none;
}

.module-stats-table tr:hover {
  background-color: var(--bg-color-dark);
}

.module-stats-table .stat-operator {
  text-align: center;
  width: 15%;
  padding: 8px 4px;
  color: var(--text-color-light);
}

.module-stats-table .stat-name {
  text-align: left;
  width: 55%;
  font-weight: 500;
  font-size: 14px;
}

.module-stats-table .stat-value {
  text-align: right;
  width: 30%;
  font-weight: 600;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-size: 14px;
}

.module-stats-table .stat-positive {
  color: #4CAF50;
  color: var(--stat-positive-color, #4CAF50);
  font-size: 14px;
}

.module-stats-table .stat-negative {
  color: #f44336;
  color: var(--stat-negative-color, #f44336);
  font-size: 14px;
}

/* 조건부 능력치 스타일 */
.module-stats-table .conditional-stat {
  background: rgba(255, 193, 7, 0.1);
}

.module-stats-table .conditional-stat:hover {
  background: rgba(255, 193, 7, 0.15);
}

.module-stats-table .conditional-label {
  color: #FFC107;
  font-weight: 600;
  font-size: 0.85em;
  margin-right: 8px;
  padding: 2px 6px;
  background: rgba(255, 193, 7, 0.2);
  border-radius: 4px;
}

.module-stats-table .conditional-value {
  color: #FFC107 !important;
}

/* 구분선 스타일 */
.module-stats-table .stats-divider {
  height: 20px;
}

.module-stats-table .stats-divider td {
  padding: 10px 0;
  border-bottom: none;
}

.module-stats-table .divider-line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 0 20px;
}

/* 연산자 박스 스타일 */
.module-stats-table .operator-box {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
}

.module-stats-table .operator-box.operator-\+ {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.module-stats-table .operator-box.operator-x {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.module-stats-table .operator-box.operator-- {
  background: linear-gradient(135deg, #6c757d, #adb5bd);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.module-stats-table .operator-box.operator-merged {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 조건부 능력치의 연산자 박스는 약간 투명하게 */
.module-stats-table .operator-box.conditional-operator {
  opacity: 0.9;
}

/* 스킬 데미지 계산 섹션 - 모바일 전용 */
.skill-damage-section {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.skill-damage-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 16px;
  gap: 16px;
}

.skill-damage-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.skill-damage-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-type-title {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 스킬 아이콘 이미지 스타일 - 모바일 전용 */
.skill-icon-image {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  object-fit: contain;
}

.damage-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.damage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.damage-row.final-damage {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--accent-color);
  font-weight: bold;
}

.damage-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.damage-value {
  color: var(--text-primary);
  font-family: 'D2Coding', monospace;
  font-size: 13px;
  font-weight: 600;
}

.damage-value.final {
  color: var(--accent-color);
  font-size: 15px;
  font-weight: bold;
}

/* 상세 정보 스타일 */
.damage-label.clickable {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: color 0.2s ease;
}

.damage-label.clickable:hover {
  color: var(--accent-color);
}

.damage-details {
  margin-left: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 6px;
  background-color: var(--bg-color-dark);
  border-radius: 4px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-size: 10px;
}

.detail-source-box {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, #495057, #6c757d);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  flex: 1 1;
  margin-right: 6px;
}

.detail-operator-box {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  min-width: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  margin-right: 3px;
}

.detail-operator-box.operator-\+ {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-x {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-absolute {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-default {
  background: linear-gradient(135deg, #6c757d, #adb5bd);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-source-text {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  flex: 1 1;
  margin-right: 6px;
  text-align: left;
}

.detail-value {
  color: var(--accent-color);
  font-family: 'D2Coding', monospace;
  font-weight: 600;
  width: 60px;
  text-align: right;
}

/* 모바일 스타일이 기본값으로 적용됨 - @media 조건 제거됨 */

/* 스킬 치명타 섹션 스타일 - 모바일 전용 */
.critical-section {
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color-light);
  border-bottom: 1px solid var(--border-color-light);
}

.critical-section .damage-row {
  margin-bottom: 5px;
}

.critical-section .damage-row:last-child {
  margin-bottom: 0;
}

.damage-value.critical-average {
  color: #28a745;
  font-weight: 600;
}

.damage-value.damage-increase {
  color: #17a2b8;
  font-weight: 600;
}

/* 조건부 보너스 버튼 컨테이너 - 모바일 전용 */
.conditional-bonuses-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px;
  background: var(--bg-color-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* 헤일리 전용 체크박스 + 드롭다운 레이아웃 */
.conditional-bonuses-container.hailey-variant {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hailey-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
}

.hailey-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4a9eff;
}

.hailey-skill-dropdown {
  padding: 8px 12px;
  background: var(--card-bg-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.hailey-skill-dropdown:not(:disabled):hover {
  border-color: #42A5F5;
  background: var(--bg-color-dark);
}

.hailey-skill-dropdown:focus {
  outline: none;
  border-color: #42A5F5;
  box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.hailey-skill-dropdown option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 4px;
}

.hailey-skill-dropdown option:checked,
.hailey-skill-dropdown option:hover {
  background-color: #42A5F5 !important;
  color: #ffffff !important;
}

.hailey-skill-dropdown:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* CustomSelect 오버라이드 - 계승자별 추가효과 드롭다운 */
.hailey-skill-dropdown.custom-select,
.blair-recipe-dropdown.custom-select,
.nel-module-dropdown.custom-select,
.luna-buff-dropdown.custom-select {
  max-width: 180px;
}

.hailey-skill-dropdown.custom-select .custom-select-trigger,
.blair-recipe-dropdown.custom-select .custom-select-trigger,
.nel-module-dropdown.custom-select .custom-select-trigger,
.luna-buff-dropdown.custom-select .custom-select-trigger {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
}

.hailey-skill-dropdown.custom-select:not(.disabled):hover .custom-select-trigger,
.blair-recipe-dropdown.custom-select:not(.disabled):hover .custom-select-trigger,
.nel-module-dropdown.custom-select:not(.disabled):hover .custom-select-trigger,
.luna-buff-dropdown.custom-select:not(.disabled):hover .custom-select-trigger {
  border: none;
  background: transparent;
}

.hailey-skill-dropdown.custom-select:focus .custom-select-trigger,
.hailey-skill-dropdown.custom-select.open .custom-select-trigger,
.blair-recipe-dropdown.custom-select:focus .custom-select-trigger,
.blair-recipe-dropdown.custom-select.open .custom-select-trigger,
.nel-module-dropdown.custom-select:focus .custom-select-trigger,
.nel-module-dropdown.custom-select.open .custom-select-trigger,
.luna-buff-dropdown.custom-select:focus .custom-select-trigger,
.luna-buff-dropdown.custom-select.open .custom-select-trigger {
  border: none;
  box-shadow: none;
}

.hailey-skill-dropdown.custom-select.disabled,
.blair-recipe-dropdown.custom-select.disabled,
.nel-module-dropdown.custom-select.disabled,
.luna-buff-dropdown.custom-select.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 이네즈 전용 체크박스 + 숫자 입력 레이아웃 */
.conditional-bonuses-container.inez-variant {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inez-mental-power-input {
  width: 80px;
  padding: 8px 12px;
  background: var(--card-bg-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.inez-mental-power-input:not(:disabled):hover {
  border-color: #4a9eff;
  background: var(--bg-color-dark);
}

.inez-mental-power-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inez-max-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.7;
}

/* 일반 체크박스 라벨 (밸비 등) */
.conditional-bonus-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
}

.conditional-bonus-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4a9eff;
}

/* 조건부 보너스 버튼 - 모바일 전용 */
.conditional-bonus-button {
  padding: 6px 12px;
  background: var(--card-bg-color);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.conditional-bonus-button:hover {
  background: var(--bg-color-dark);
  border-color: #4a9eff;
  transform: translateY(-1px);
}

.conditional-bonus-button.active {
  background: linear-gradient(135deg, #4a9eff, #357abd);
  border-color: #357abd;
  color: white;
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}

.conditional-bonus-button.active:hover {
  background: linear-gradient(135deg, #357abd, #2a5f8f);
  transform: translateY(-1px);
}

/* 트리거 모듈 설명 스크롤바 숨김 */
.trigger-description-scroll::-webkit-scrollbar {
  display: none;
}
/* 스킬 데미지 계산 패널 */
.skill-damage-panel {
  background: var(--card-bg-color);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .skill-damage-panel {
    max-height: none;
    height: auto;
    padding: 0 !important;
    background: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
  }

  .skill-info-pc {
    padding: 0 !important;
  }
}

.skill-damage-panel::-webkit-scrollbar {
  display: none;
}

.skill-damage-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.skill-damage-panel-title {
  margin: 0 0 12px 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

/* 스킬 타입 컨트롤 스타일 */
.skill-damage-controls {
  margin-bottom: 8px;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  width: 100%;
}

.skill-damage-controls .card-header {
  background: #027bff;
  background: var(--accent-color, #027bff);
  opacity: 0.55;
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
  justify-content: center;
  min-height: auto;
}

/* PC에서는 컴팩트하게 - 내용물에 딱 맞게 */
@media (min-width: 768px) {
  .skill-damage-controls {
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
  }

  .skill-damage-controls .card-header {
    padding: 4px 10px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* 스킬 컨트롤 입력 영역 (세로 배치 - 모바일) */
.skill-control-inputs-inline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

/* PC에서는 좌우 배치 + 가운데 정렬 */
.skill-control-inputs-inline.pc-horizontal {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
}

.skill-control-inputs-inline.pc-horizontal .custom-dropdown-wrapper-compact {
  width: auto;
  min-width: 110px;
}

.skill-control-inputs-inline.pc-horizontal .skill-coefficient-input-compact {
  flex: 1 1;
  width: auto;
  max-width: none;
  padding: 6px 10px;
  font-size: 13px;
}

/* 커스텀 드롭다운 래퍼 (컴팩트) */
.custom-dropdown-wrapper-compact {
  width: 120px;
  position: relative;
  flex-shrink: 0;
}

/* 스킬 계수 입력 (컴팩트) */
.skill-coefficient-input-compact {
  flex: 1 1;
  height: 34px;
  padding: 6px 10px;
  background: var(--card-bg-color);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-family: 'D2Coding', 'Consolas', 'Monaco', monospace;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 숫자 입력 화살표 제거 (Chrome, Safari, Edge, Opera) */
.skill-coefficient-input-compact::-webkit-outer-spin-button,
.skill-coefficient-input-compact::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 숫자 입력 화살표 제거 (Firefox) */
.skill-coefficient-input-compact[type=number] {
  -moz-appearance: textfield;
}

.skill-coefficient-input-compact:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb, 0, 123, 255), 0.15);
}

.skill-coefficient-input-compact::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 커스텀 드롭다운 래퍼 (기존 - 더 이상 사용 안 함) */
.custom-dropdown-wrapper {
  flex: 1 1;
  position: relative;
}

/* 드롭다운 버튼 */
.custom-dropdown-button {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--card-bg-color);
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-dropdown-button:hover {
  border-color: var(--accent-color);
  background: var(--bg-color-dark);
}

.custom-dropdown-button:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb, 0, 123, 255), 0.15);
}

.dropdown-button-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.dropdown-button-text {
  flex: 1 1;
  text-align: left;
}

.dropdown-arrow {
  font-size: 10px;
  color: var(--text-secondary);
  margin-left: auto;
}

/* 드롭다운 메뉴 */
.custom-dropdown-menu {
  /* position, top, left, width는 인라인 스타일로 Portal에서 제어 */
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  overflow: hidden;
  margin-top: 4px; /* 버튼 아래 간격 */
}

/* 드롭다운 옵션 */
.custom-dropdown-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-dropdown-option:hover {
  background-color: color-mix(in srgb, #42A5F5 15%, transparent);
  background-color: color-mix(in srgb, var(--accent-color, #42A5F5) 15%, transparent);
}

.custom-dropdown-option.selected {
  background-color: color-mix(in srgb, #42A5F5 25%, transparent);
  background-color: color-mix(in srgb, var(--accent-color, #42A5F5) 25%, transparent);
  color: #42A5F5;
  color: var(--accent-color, #42A5F5);
}

.dropdown-option-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.dropdown-option-text {
  font-size: 1.1rem;
  font-weight: 500;
}

/* 스킬 위력 계수 입력 */
.skill-coefficient-input {
  flex: 1 1;
  padding: 6px 10px;
  background: var(--card-bg-color);
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.skill-coefficient-input:hover {
  border-color: var(--accent-color);
  background: var(--bg-color-dark);
}

.skill-coefficient-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb, 0, 123, 255), 0.15);
}

/* 숫자 입력 스피너 버튼 제거 */
.skill-coefficient-input::-webkit-inner-spin-button,
.skill-coefficient-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.skill-coefficient-input[type=number] {
  -moz-appearance: textfield;
}

/* 그래프 적용 버튼 */
.apply-visualizer-button {
  width: 100%;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ffffff, #e0e0e0);
  color: #333333;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.2);
  text-align: center;
}

.apply-visualizer-button:hover {
  background: linear-gradient(135deg, #f5f5f5, #cccccc);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.apply-visualizer-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
}

.skill-damage-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1;
}

.skill-damage-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color-light);
  border-radius: 8px;
  padding: 14px;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.skill-damage-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-type-title {
  margin: 0 0 10px 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 스킬 아이콘 이미지 스타일 */
.skill-icon-image {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.damage-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 그룹 구분선 */
.damage-group-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color-light), transparent);
  margin: 10px 0;
}

/* 계수 합계 행 스타일 */
.coefficient-sum {
  border-top: 1px solid var(--border-color-light);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 600;
}

.coefficient-sum .damage-label {
  color: var(--text-primary);
  font-weight: 700;
}

.coefficient-sum .damage-value {
  color: var(--accent-color);
  font-weight: 700;
}

.damage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 18px;
}

.damage-row.final-damage {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 2px solid var(--accent-color);
  font-weight: bold;
}

.damage-label {
  color: white;
  font-size: 1rem;
  font-weight: 500;
}

.damage-value {
  color: var(--text-primary);
  font-family: 'D2Coding', monospace;
  font-size: 16px;
  font-weight: 600;
}

.damage-value.final {
  color: var(--accent-color);
  font-size: 16px;
  font-weight: bold;
}

/* 상세 정보 스타일 */
.damage-label.clickable {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: color 0.2s ease;
}

.damage-label.clickable:hover {
  color: var(--accent-color);
}

.damage-details {
  margin: 6px;
  text-align: left;
}

.detail-row {
  display: flex;
  align-items: center;
  padding: 1px 14px;
  font-size: 12px;
  gap: 8px;
}

/* 이미지 박스 (모듈/반응로/외장부품 이미지 표시) */
.detail-image-box {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  margin-right: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-image {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

/* 반응로 이미지는 170% 크기로 */
.detail-image.reactor-image {
  max-width: 170%;
  max-height: 170%;
  width: auto;
  height: auto;
}

.detail-operator-box {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
  min-width: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  margin-right: 6px;
}

.detail-operator-box.operator-\+ {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-x {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-absolute {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-default {
  background: linear-gradient(135deg, #6c757d, #adb5bd);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-operator-box.operator-increase {
  background: linear-gradient(135deg, #17a2b8, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 마키(바운싱) 애니메이션 - 텍스트가 길 때 좌우로 천천히 흐름 */
@keyframes bounceMarquee {
  0%, 15% {
    transform: translateX(0);
  }
  42.5%, 57.5% {
    transform: translateX(-30px);
    transform: translateX(var(--marquee-distance, -30px));
  }
  85%, 100% {
    transform: translateX(0);
  }
}

.detail-source-text {
  /* MarqueeText 컴포넌트 - 고정 너비 강제 */
  width: 100px !important;
  max-width: 100px !important;
  min-width: 100px !important;
  flex: 0 0 100px !important;
  overflow: hidden;
  color: #ccc;
  font-size: 12px;
  text-align: left;
}

/* 영어 모드에서 detail-row 사이 세로 간격 추가 */
.detail-row.lang-en {
  margin-top: 4px;
  margin-bottom: 4px;
}

.detail-value {
  color: #ffffff;
  font-family: 'D2Coding', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
  margin-left: auto;
}

/* 사용 스킬 정보 - 유틸리티 항목 펼침 패널 안의 detail-row 축소 버전 (이미지/텍스트 더 작게) */
.utility-detail-compact .detail-row {
  padding: 1px 4px;
  font-size: 9px;
  gap: 6px;
}

.utility-detail-compact .detail-image-box {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.utility-detail-compact .detail-source-text {
  width: 70px !important;
  max-width: 70px !important;
  min-width: 70px !important;
  flex: 0 0 70px !important;
  font-size: 10px;
}

/* MarqueeText는 실제 텍스트를 .marquee-inner에 렌더링하며 자체 font-size(12px)를 갖고 있어
   .detail-source-text의 font-size가 상속되지 않으므로 별도로 재정의해야 함 */
.utility-detail-compact .marquee-inner {
  font-size: 10px;
}

.utility-detail-compact .detail-value {
  font-size: 9px;
  min-width: 44px;
}

/* 계산식 행 스타일 */
.calculation-formula {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  justify-content: center;
}

.formula-text {
  color: #ffc107;
  font-family: 'D2Coding', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  width: 100%;
}

/* 조건부 보너스 체크박스 컨테이너 */
.conditional-bonuses-container {
  display: flex;
  gap: 15px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #444;
  border-radius: 6px;
}

.conditional-bonus-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.conditional-bonus-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.conditional-bonus-checkbox span {
  white-space: nowrap;
}

/* 스킬 치명타 섹션 스타일 */
.critical-section {
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color-light);
  border-bottom: 1px solid var(--border-color-light);
}

.critical-section .damage-row {
  margin-bottom: 4px;
}

.critical-section .damage-row:last-child {
  margin-bottom: 0;
}

.damage-value.critical-average {
  color: white;
  font-weight: 600;
}

.damage-value.damage-increase {
  color: #17a2b8;
  font-weight: 600;
}

/* 모바일 스탯 박스 스타일 */
.mobile-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-stat-box:active {
  transform: scale(0.95);
  background-color: var(--bg-color-dark);
  border-color: var(--accent-color);
}

.mobile-stat-box .stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.mobile-stat-box .stat-value {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
  font-family: 'D2Coding', monospace;
}

/* 모바일 스탯 상세 모달 스타일 */
.mobile-stat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  padding: 20px;
}

.mobile-stat-modal-content {
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mobile-stat-modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.2);
}

.mobile-stat-modal-content .modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.mobile-stat-modal-content .close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.mobile-stat-modal-content .modal-body {
  padding: 16px;
}

.mobile-stat-modal-content .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-stat-modal-content .detail-row:last-child {
  border-bottom: none;
}

.mobile-stat-modal-content .detail-row .label {
  color: var(--text-secondary);
}

.mobile-stat-modal-content .detail-row .value {
  color: var(--text-primary);
  font-family: 'D2Coding', monospace;
  font-weight: 600;
}

.mobile-stat-modal-content .base-row {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-stat-modal-content .subtotal-row {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-color-light);
  font-weight: 600;
}

.mobile-stat-modal-content .subtotal-row .value {
  color: var(--accent-color);
}

.mobile-stat-modal-content .final-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--accent-color);
  font-size: 15px;
  font-weight: bold;
}

.mobile-stat-modal-content .final-row .value {
  color: var(--accent-color);
  font-size: 18px;
}

/* 스킬 네비게이션 스타일 */
.skill-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 8px;
}

.nav-button {
  background: var(--button-bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.nav-button:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.nav-button:active {
  transform: scale(0.95);
}

.skill-type-title.main-title {
  flex-grow: 1;
  margin: 0;
  padding: 0;
  border: none;
}

/* 라디오 버튼 네비게이션 스타일 */
.skill-damage-radio-group {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.skill-radio-label {
  background-color: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-user-select: none;
          user-select: none;
}

.skill-radio-label input[type="radio"] {
  display: none;
}

.skill-radio-label:hover {
  background-color: var(--bg-color-dark);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.skill-radio-label.active {
  color: var(--accent-color);
  background-color: rgba(0, 123, 255, 0.1);
  background-color: rgba(var(--accent-color-rgb, 0, 123, 255), 0.1);
  border-color: var(--accent-color);
}

.skill-radio-label .skill-icon-image {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.skill-radio-label.active .skill-icon-image {
  opacity: 1;
}

/* 아르케 조율 효과 섹션 스타일 */
.arche-effects-section {
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(123, 31, 162, 0.08), rgba(156, 39, 176, 0.08));
  border-radius: 8px;
  border: 1px solid rgba(156, 39, 176, 0.3);
  box-shadow: 0 2px 8px rgba(123, 31, 162, 0.15);
}

.damage-row.arche-header {
  border-bottom: 2px solid rgba(156, 39, 176, 0.5);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.damage-row.arche-header .damage-label {
  color: #ce93d8;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.arche-effect-row {
  padding: 4px 0;
  border-bottom: 1px solid rgba(156, 39, 176, 0.1);
}

.arche-effect-row:last-child {
  border-bottom: none;
}

.arche-effect-label {
  color: #ba68c8;
  font-size: 13px;
  font-weight: 500;
}

.arche-effect-value {
  color: #e1bee7;
  font-family: 'D2Coding', monospace;
  font-size: 13px;
  font-weight: 700;
}

/* 반응로 정보 섹션 스타일 */
.reactor-info-section {
  margin-bottom: 12px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 87, 34, 0.08));
  border-radius: 8px;
  border: 1px solid rgba(255, 152, 0, 0.3);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.reactor-info-header {
  color: #ffb74d;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(255, 152, 0, 0.5);
  text-align: center;
}

.reactor-info-details {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 6px 10px;
  gap: 6px 10px;
  align-items: center;
}

.reactor-info-label {
  color: #ffcc80;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.reactor-info-value {
  color: #ffe0b2;
  font-family: 'D2Coding', monospace;
  font-size: 12px;
  font-weight: 700;
}

/* 모바일 아르케 효과 스타일 기본 적용 */
.arche-effects-section {
  margin-top: 12px;
  padding: 10px;
}

.damage-row.arche-header .damage-label {
  font-size: 14px;
}

.arche-effect-label,
.arche-effect-value {
  font-size: 12px;
}

/* 카드 헤더 스타일 */
.damage-row.card-header {
  padding: 6px 16px !important;
  margin: 0 !important;
  border-radius: 0;
  font-weight: 600;
  font-size: 15px;
  background: rgba(40, 40, 40, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.damage-row.card-header .damage-label {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.damage-row.card-header .damage-value {
  font-size: 24px;
  font-weight: 700;
}

/* 하단 토글 버튼 */
.card-toggle-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.card-toggle-bottom:hover {
  color: var(--accent-color);
  background: var(--bg-color-dark);
}

/* 블러 처리된 콘텐츠 */
.damage-breakdown.blurred-content {
  filter: blur(5px);
  pointer-events: none;
}

/* 입력 요구 오버레이 */
.input-required-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.overlay-message {
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 20px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* PC 고정 비주얼라이저 섹션 */
.pc-fixed-visualizer {
  display: block;
  margin-top: 24px;
  margin-bottom: 16px;
  width: 100%;
}

.skill-damage-controls .card-header {
  border: none;
  padding: 5px 0;
  background: transparent;
}

/* PC 화면에서 모바일 전용 카드 숨기기 (768px 이상) */
@media (min-width: 768px) {
  .mobile-only-card {
    display: none;
  }

  /* PC에서 비주얼라이저를 화면 우측 하단에 고정 */
  .pc-fixed-visualizer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    max-width: calc(100vw - 40px);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease-in;
  }

  .pc-fixed-visualizer.visible {
    opacity: 1;
  }

  /* PC에서 스킬 유틸리티 카드 별도 박스 스타일 */
  .pc-utility-card {
    position: fixed;
    bottom: 20px;
    right: 360px;
    width: 280px;
    max-width: calc(100vw - 400px);
    background: var(--card-bg-color);
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    padding: 14px;
    margin: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in;
  }

  .pc-utility-card.visible {
    opacity: 1;
  }
}

/* 제이버 "최대 터릿 설치 계수" 아이콘 - 1번째/2번째 스킬 이미지가 픽셀화(블러+대비)되면서 계속 서로 바뀜 */
.jayber-turret-icon-cycle {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.jayber-turret-icon-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: jayber-turret-pixel-cycle 3s infinite;
}

.jayber-turret-icon-frame-1 {
  animation-delay: 0s;
}

.jayber-turret-icon-frame-2 {
  animation-delay: 1.5s;
}

@keyframes jayber-turret-pixel-cycle {
  /* 0%(안 보임)에서 바로 100%(선명)로 뿅 튀지 않도록, 등장/퇴장 양쪽 다 블러를 거쳐 서서히 전환되게 함 */
  0% {
    opacity: 0;
    filter: blur(4px) contrast(1.8);
  }
  15% {
    opacity: 1;
    filter: blur(0) contrast(1);
  }
  35% {
    opacity: 1;
    filter: blur(0) contrast(1);
  }
  50% {
    opacity: 0.3;
    filter: blur(4px) contrast(1.8);
  }
  65%, 100% {
    opacity: 0;
    filter: blur(4px) contrast(1.8);
  }
}

/* 치명타 비주얼라이저 컴팩트 버전 전용 스타일 */
.critical-visualizer-compact {
  margin: 0 !important;
}

.critical-visualizer-compact .card-header {
}

/* 모바일 전용: 데미지 정보 카드 */
.mobile-damage-info-card {
  display: block;
}

/* 모바일에서는 컴팩트 버전 숨김 */
@media (max-width: 767px) {
  .critical-visualizer-compact {
    display: none !important;
  }
}

/* PC에서는 모바일 데미지 정보 카드 숨김 */
@media (min-width: 768px) {
  .mobile-damage-info-card {
    display: none !important;
  }
}

/* PC에서 .pc-fixed-visualizer 안에 있을 때 스타일 */
@media (min-width: 768px) {
  .pc-fixed-visualizer .critical-visualizer-compact {
    margin: 0 !important;
  }

  .pc-fixed-visualizer {
    width: 280px;
  }
}

/* 조건부 보너스 콘텐츠 영역 */
.conditional-bonus-content {
  padding: 12px 12px 8px 12px;
  position: relative;
  pointer-events: auto; /* blurred-content 안에 있어도 클릭 가능하게 */
}

.conditional-bonus-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

/* 에이잭스 패시브 체크박스/드롭다운을 임시로 숨긴 동안, 상단 구분선만 덩그러니 남지 않도록 함께 숨김 */
.conditional-bonus-content.no-top-divider::before {
  display: none;
}

.conditional-bonus-content.no-top-divider {
  padding: 8px 12px;
}

.conditional-bonus-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.conditional-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-color);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.conditional-checkbox-label input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.conditional-checkbox-label input[type="checkbox"]:hover {
  border-color: #027bff;
  border-color: var(--accent-color, #027bff);
}

.conditional-checkbox-label input[type="checkbox"]:checked {
  background: #027bff;
  background: var(--accent-color, #027bff);
  border-color: #027bff;
  border-color: var(--accent-color, #027bff);
}

.conditional-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.conditional-select {
  flex: 1 1;
  padding: 6px 10px;
  background: var(--panel-bg-color);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 13px;
  height: 34px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.conditional-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.conditional-select:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.conditional-bonus-inez {
  padding: 4px 0;
}

/* 블레어 "불판 개수" 슬라이더 - 주황→빨강 그라데이션 트랙(accentColor는 단색만 지원해서 트랙 자체를
   webkit/moz 슬라이더 트랙 의사요소로 직접 스타일링함) */
.blair-griddle-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #f97316, #dc2626);
  outline: none;
  cursor: pointer;
}

.blair-griddle-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #f97316, #dc2626);
}

.blair-griddle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #dc2626;
  cursor: pointer;
}

.blair-griddle-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #f97316, #dc2626);
}

.blair-griddle-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #dc2626;
  cursor: pointer;
}

.conditional-bonus-simple {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reactor-simulator-wrapper {
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
  gap: 14px;
  display: flex;
  flex-direction: column;
}

/* 컴팩트 모드 스타일 - Dev 페이지용 가로 레이아웃 */
.reactor-simulator-wrapper.compact-mode {
  padding: 10px;
  gap: 15px;
  font-size: 1em;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* 모바일 레이아웃 - 세로 배치 */
.reactor-compact-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  min-height: 400px;
}

.reactor-controls-panel {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
}

.reactor-stats-panel {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
}

.reactor-controls-section h3,
.reactor-stats-section.compact h3 {
  margin: 0 0 15px 0;
  color: #ffffff;
  font-size: 1.2rem;
}

.reactor-header.compact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.reactor-header.compact .reactor-title {
  font-size: 1.3rem;
  margin: 0;
  color: var(--text-color);
}

.reactor-header.compact .reactor-icon {
  width: 32px;
  height: 32px;
}

.reactor-stats-section.compact .reactor-stats-table {
  width: 100%;
  margin-top: 10px;
}

/* 컴팩트 모드 선택기 및 슬라이더 스타일 */
.compact-selector {
  font-size: 1rem;
  padding: 8px 10px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
}

.compact-slider {
  height: 4px;
  position: relative;
  z-index: auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

.compact-slider::-webkit-slider-track {
  background: rgba(255, 255, 255, 0.8);
  height: 4px;
  border-radius: 2px;
}

.compact-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.compact-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.compact-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.8);
  height: 4px;
  border-radius: 2px;
  border: none;
}

.compact-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.compact-values {
  font-size: 0.9rem;
  /* 값 표시 글자 크기 증가 */
}

.compact-values .min-val,
.compact-values .max-val {
  font-size: 0.85rem;
  /* 최소/최대값 글자 크기 증가 */
}

.compact-mode .stat-input-group label {
  font-size: 1rem;
  /* 레이블 글자 크기 증가 */
  margin-bottom: 5px;
}

/* 컴팩트 모드 컨테이너 - 좌우 분할 */
.reactor-compact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  /* 좌우 간격 감소 */
  width: 100%;
}

.reactor-compact-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* 요소 간격 증가 */
}

.reactor-compact-right {
  display: flex;
  flex-direction: column;
}

/* 컴팩트 모드 반응로 선택 영역 */
.reactor-selection-compact {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* 행 간격 증가 */
}

.reactor-selection-row {
  display: flex;
  align-items: center;
  gap: 12px;
  /* 요소 간격 증가 */
}

.selection-label {
  width: 80px;
  /* 레이블 너비 증가 */
  font-size: 0.95rem;
  /* 글자 크기 증가 */
  font-weight: 500;
  color: var(--text-color-primary);
  flex-shrink: 0;
  white-space: nowrap;
}

.selection-control {
  flex: 1 1;
  min-width: 0;
}

.slider-row {
  padding-left: 80px;
  /* 라벨 너비만큼 패딩 */
}

.compact-slider-section {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  position: relative;
  z-index: auto;
}

.compact-slider-section .compact-values {
  min-width: 80px;
  flex-shrink: 0;
}

.compact-slider-section .compact-slider {
  flex: 1 1;
}

/* 컴팩트 모드 능력치 리스트 */
.compact-stats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 능력치 항목 간격 증가 */
}

.compact-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  /* 패딩 증가 */
  background-color: var(--bg-secondary);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  min-height: 40px;
  /* 최소 높이 설정 */
}

.compact-stat-name {
  color: var(--text-color-secondary);
  font-size: 1rem;
  /* 스탯 이름 글자 크기 증가 */
}

.compact-stat-value {
  font-weight: 600;
  font-size: 1.05rem;
  /* 스탯 값 글자 크기 증가 */
}

/* 컴팩트 모드 강화창 버튼 */
.reactor-enhancement-pagination.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  height: 48px;
  /* 버튼 크기에 맞춰 높이 증가 */
  box-sizing: border-box;
  width: 100%;
  /* control-input과 동일한 너비 */
}

.reactor-enhancement-pagination.compact .pagination-btn {
  width: 32px;
  /* 버튼 크기 증가 */
  height: 32px;
  /* 버튼 크기 증가 */
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  /* 아이콘 크기 증가 */
}

.reactor-enhancement-pagination.compact .pagination-btn:hover {
  background-color: #ffffff;
}

.reactor-enhancement-pagination.compact .pagination-circles {
  display: flex;
  gap: 3px;
  margin: 0 4px;
}

.reactor-enhancement-pagination.compact .pagination-circle {
  width: 6px;
  height: 6px;
}

/* 반응로 능력치 헤더 */
.reactor-stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
}

.reactor-stats-header h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
}

.save-reactor-btn {
  padding: 6px 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-reactor-btn:hover {
  background-color: var(--primary-hover-color);
  transform: translateY(-1px);
}

.save-reactor-btn:active {
  transform: translateY(0);
}

/* 상단 헤더 (이미진 + 제목) */
.reactor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.reactor-title {
  font-size: 1.1rem;
  color: var(--text-color-primary);
  margin: 0;
  font-weight: 600;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 단일 컬럼 카드 그리드 (모바일) */
.reactor-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 10px;
}

/* 컴팩트 모드의 카드 그리드 */
.reactor-cards-container.compact-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* 헤더의 이미지 섭션 */
.reactor-header .reactor-image-section {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

/* 반응로 아이콘 컨테이너 */
.reactor-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 기본 도형 스타일 */
.reactor-shape {
  position: absolute;
  transition: all 0.3s ease;
}

/* 스킬 타입별 도형 */
/* 융합 - 원 */
.reactor-shape.fusion {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* 특이 - 다이아몬드 (정사각형을 45도 회전) */
.reactor-shape.singular {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  border-radius: 1px;
}

/* 공학 - 별모양 (정사각형 + 45도 회전 정사각형) */
.reactor-shape.tech {
  width: 18px;
  height: 18px;
  position: relative;
}

.reactor-shape.tech::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  border-radius: 1px;
}

.reactor-shape.tech::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  transform: rotate(45deg);
  border-radius: 1px;
}

/* 차원 - 삼각형 (clip-path 방식) */
.reactor-shape.dimension {
  width: 20px;
  height: 17px;
  -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
          clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* 속성별 색상 */
/* 화염 속성 */
.reactor-shape.fire {
  background-color: #ff4444;
  border-color: #ff4444;
}

/* 냉기 속성 - 하늘색 계열 */
.reactor-shape.ice {
  background-color: #87ceeb;
  border-color: #87ceeb;
}

/* 전기 속성 - 진한 파랑색 */
.reactor-shape.electric {
  background-color: #1e4d8b;
  border-color: #1e4d8b;
}

/* 독 속성 */
.reactor-shape.poison {
  background-color: #44ff44;
  border-color: #44ff44;
}

/* 무속성 */
.reactor-shape.none {
  background-color: #888888;
  border-color: #888888;
}

/* 카드 스타일 */
.reactor-card {
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reactor-header .reactor-image {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* 카드 헤더 */
.card-header {
  display: flex;
  align-items: center;
}

/* 카드 컨텐츠 */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-selector {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color-dark);
  color: var(--text-color);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.card-selector:focus {
  outline: none;
  border-color: #ffffff;
}

/* 조건부 능력치 옵션 그룹 스타일 */
.card-selector optgroup {
  font-weight: bold;
  font-size: 13px;
  color: var(--text-color-primary);
  background-color: var(--panel-bg-color);
  padding: 4px 0;
}

.card-selector optgroup[label*="조건부"] {
  color: #ffc107;
  background-color: rgba(255, 193, 7, 0.1);
}

.card-selector option {
  padding: 6px 12px;
  background-color: var(--bg-color-dark);
  color: var(--text-color);
}

/* 카드 슬라이더 섭션 */
.card-slider-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-number-line {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
}

.card-number-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #5399CD, #EBD989);
  border-radius: 3px;
  transform: translateY(-50%);
}

.card-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.card-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  -webkit-transition: transform 0.2s;
  transition: transform 0.2s;
}

.card-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.card-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000000;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
}

.card-values .min-val {
  color: #5399CD;
  font-weight: 600;
}

.card-values .current-val {
  background-color: var(--text-color);
  color: var(--bg-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
}

.card-values .max-val {
  color: #EBD989;
  font-weight: 600;
}

.stat-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 수직선 컨테이너 */
.number-line-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
}

/* 수직선 메인 */
.number-line {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

/* 수직선 트랙 */
.number-line-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
      #5399CD,
      #EBD989);
  background: linear-gradient(90deg,
      var(--theme-blue, #5399CD),
      var(--theme-yellow, #EBD989));
  border-radius: 2px;
  transform: translateY(-50%);
}

/* 라이트 모드 색상 오버라이드 */
[data-theme="light"] .number-line-track {
  background: linear-gradient(90deg, #2563EB, #CA8A04);
}

/* 수직선 슬라이더 */
.number-line-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.number-line-slider::-webkit-slider-track {
  background: transparent;
  height: 40px;
}

.number-line-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  background: var(--thumb-color, var(--accent-color));
  cursor: pointer;
  border: 3px solid var(--panel-bg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.number-line-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  filter: brightness(1.2);
}

.number-line-slider::-moz-range-track {
  background: transparent;
  height: 40px;
  border: none;
}

.number-line-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  background: var(--thumb-color, var(--accent-color));
  cursor: pointer;
  border: 3px solid var(--panel-bg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 수직선 라벨 */
.number-line-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  margin-top: 4px;
}

.number-line-labels .min-value {
  color: #5399CD;
  color: var(--theme-blue, #5399CD);
  text-align: left;
  font-weight: 600;
}

.number-line-labels .current-value {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  background-color: var(--bg-color-dark);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent-color);
}

/* 라이트 모드 현재값 창 색상 */
[data-theme="light"] .number-line-labels .current-value {
  background-color: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

/* 다크 모드 현재값 창 색상 */
[data-theme="dark"] .number-line-labels .current-value {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.number-line-labels .max-value {
  color: #EBD989;
  color: var(--theme-yellow, #EBD989);
  text-align: right;
  font-weight: 600;
}

/* 라이트 모드 라벨 색상 오버라이드 */
[data-theme="light"] .number-line-labels .min-value {
  color: #2563EB;
}

[data-theme="light"] .number-line-labels .max-value {
  color: #CA8A04;
}

.stat-number-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--panel-border-color);
  background-color: var(--panel-bg-color);
  color: var(--text-color);
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-number-input:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--accent-color-translucent);
}

.stat-range-info {
  text-align: center;
  font-size: 12px;
  color: var(--text-color-light);
  background-color: var(--bg-color-dark);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 하단 강화 컨트롤 (페이지네이션 스타일) */
.reactor-enhancement-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.pagination-btn {
  background-color: var(--button-bg-color);
  color: var(--button-text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  width: 44px;
  height: 44px;
}

.pagination-btn:hover {
  background-color: var(--hover-bg-color);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.pagination-circles {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 8px;
}

.pagination-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: default;
}

/* 회색 빈 원 (강화되지 않음) */
.pagination-circle.gray-empty {
  background-color: #6c757d;
  border: 2px solid #6c757d;
}

/* 노란색 강화 (1-2강) */
.pagination-circle.yellow-enhanced {
  background-color: #FFBC09;
  border: 2px solid #FFBC09;
  box-shadow: 0 2px 8px rgba(255, 188, 9, 0.4);
}

/* 주황색 강화 (3-5강) */
.pagination-circle.orange-enhanced {
  background-color: #FA4F02;
  border: 2px solid #FA4F02;
  box-shadow: 0 2px 8px rgba(250, 79, 2, 0.4);
}

/* 능력치 정보 섹션 */
.reactor-stats-section {
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-top: 8px;
}

/* 컴팩트 모드 스탯 섹션 스타일 */
.reactor-stats-section.compact {
  margin-top: 10px;
  padding: 5px;
  background-color: rgba(30, 30, 30, 0.7);
  border-radius: 5px;
}

.compact-stats-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 5px;
  gap: 5px;
  padding: 5px;
}

.compact-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 5px;
  font-size: 12px;
  background-color: rgba(40, 40, 40, 0.5);
  border-radius: 3px;
}

.compact-stat-name {
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
  text-align: left;
}

.compact-stat-value {
  font-weight: bold;
  padding-left: 5px;
}

/* 모바일용 능력치 섹션 - 기본 적용 */
.reactor-stats-section {
  padding: 10px;
  margin-top: 4px;
}

.reactor-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.reactor-stats-table td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--border-color-light);
  text-align: left;
  vertical-align: middle;
}

.reactor-stats-table tr:last-child td {
  border-bottom: none;
}

.reactor-stats-table tr:hover {
  background-color: var(--bg-color-dark);
}

.reactor-stats-table .stat-operator {
  text-align: center;
  width: 20%;
  padding: 6px 4px;
  color: var(--text-color-light);
}

.reactor-stats-table .stat-name {
  text-align: left;
  width: 50%;
  font-weight: 500;
  font-size: 13px;
  color: #ffffff;
}

.reactor-stats-table .stat-value {
  text-align: right !important;
  width: 30%;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  padding-right: 4px;
}

.operator-box {
  display: inline-block;
  padding: 2px 3px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  min-width: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
}

.operator-box.operator-\+ {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 절댓값 연산자 박스 (붉은색) */
.operator-box.operator-absolute {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.operator-box.operator-x {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.operator-box.operator-- {
  background: linear-gradient(135deg, #6c757d, #adb5bd);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reactor-stats-table .stat-value {
  width: 90px;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  padding-right: 8px;
}

.reactor-stats-table .stat-positive {
  color: var(--text-color);
}

.reactor-stats-table .stat-negative {
  color: var(--text-color);
}

/* 조건부 능력치 스타일 */
.conditional-row {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.conditional-stat-name {
  color: #ffc107 !important;
  font-weight: 600;
  font-style: italic;
}

.conditional-stat {
  color: #ffc107 !important;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 193, 7, 0.3);
}

.conditional-row:hover {
  background-color: rgba(255, 193, 7, 0.2) !important;
}

/* 반응로 데이터 저장 버튼 */
.reactor-save-button {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.2s ease;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.reactor-save-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, #004085);
}

.reactor-save-button:active {
  transform: translateY(0);
}

/* 조건부 능력치 스타일 - 모바일 기본 적용 */
.conditional-row {
  border-left: 2px solid #ffc107;
  background-color: rgba(255, 193, 7, 0.08);
}

.conditional-stat-name {
  font-size: 12px;
}

.conditional-stat {
  font-size: 12px;
}

/* 저장 버튼 - 모바일 기본 적용 */
.reactor-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.reactor-save-button {
  padding: 8px 14px;
  font-size: 12px;
  align-self: stretch;
}

/* 개별 항목 비활성화 효과 */
.disabled-item {
  position: relative;
  pointer-events: none;
}

.disabled-item::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  z-index: 5;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.disabled-item::after {
  content: '기본수치에 영향 없음';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 6;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.disabled-item * {
  filter: blur(1px);
  opacity: 0.5;
}

/* 반응로 컨트롤 테이블 */
.reactor-controls-table {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.control-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  grid-gap: 15px;
  gap: 15px;
  min-height: 40px;
  margin-bottom: 8px;
}

.control-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color-primary);
  text-align: left;
  white-space: nowrap;
}

.control-input {
  display: flex;
  align-items: center;
  min-height: inherit;
}

/* 반응로 레이아웃 - 모바일 기본 적용 */

/* 반응로 2단 레이아웃 - 좌측(이미지+이름) + 우측(능력치 표) */
.reactor-display-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
}

.reactor-info-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 150px;
}

.reactor-name-title {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.reactor-stats-column {
  flex: 1 1;
  min-width: 0;
}

/* 반응로 3단 레이아웃 - 모바일에서는 세로 배치 */
.reactor-three-column-layout {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 좌측 컬럼 - 이미지 + 속성/스킬 + 강화 컨트롤 (모바일 그리드) */
.reactor-left-column {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: auto auto auto;
  grid-gap: 3px;
  gap: 3px;
  align-items: start;
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.reactor-image-wrapper {
  grid-column: 1;
  grid-row: 1 / 3;
  height: 100px;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.reactor-api-image {
  max-height: 90px;
  max-width: 100%;
  object-fit: contain;
}

.reactor-attribute-skill-row {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.reactor-dropdown-group label {
  display: none;
}

.reactor-enhancement-pagination {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: 12px;
  gap: 8px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 14px;
}

.pagination-circles {
  gap: 6px;
  margin: 0;
}

/* 중앙 컬럼 - 부가옵션 */
.reactor-middle-column {
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

/* 우측 컬럼 - 스텟 표 */
.reactor-right-column {
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.control-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.control-label {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.reactor-right-column .reactor-stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgb(200, 200, 200);
}

.reactor-right-column .reactor-stats-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #ffffff;
}

.reactor-attribute-skill-row {
  display: flex;
  gap: 10px;
}

.reactor-dropdown-group {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reactor-dropdown-group label {
  font-size: 0.9rem;
  color: var(--text-color-secondary);
}

.reactor-option-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reactor-option-section label {
  font-size: 0.95rem;
  color: var(--text-color-primary);
  font-weight: 500;
}


.reactor-option-slider {
  display: flex;
  align-items: center;
  gap: 15px;
}

.reactor-option-slider input[type="range"] {
  flex: 1 1;
  min-width: 0;
}

.reactor-option-slider .option-value-display {
  min-width: 80px;
  text-align: right;
  font-family: monospace;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
}

.reactor-option-slider {
  padding: 0;
  height: 30px;
  border-radius: 0;
  align-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.reactor-option-slider input[type="range"] {
  height: 4px;
  margin: 0;
  padding: 0;
  flex: 1 1;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(80, 80, 80, 0.5);
  border-radius: 2px;
  outline: none;
}

/* 슬라이더 트랙 - 어두운 회색 배경 */
.reactor-option-slider input[type="range"]::-webkit-slider-track {
  height: 4px;
  background: rgba(80, 80, 80, 0.5);
  border-radius: 2px;
}

.reactor-option-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: rgba(80, 80, 80, 0.5);
  border-radius: 2px;
  border: none;
}

/* Firefox - filled portion (밝은 회색) */
.reactor-option-slider input[type="range"]::-moz-range-progress {
  height: 4px;
  background: rgba(200, 200, 200, 0.8);
  border-radius: 2px;
}

/* 슬라이더 핸들 - 흰색 */
.reactor-option-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.reactor-option-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.reactor-option-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.reactor-api-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reactor-name-title {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.reactor-stats-column {
  flex: 1 1;
  min-width: 0;
}

/* PC 레이아웃 정의 제거됨 - 모바일 레이아웃만 사용 */

/* 코어 선택 모달 V2 스타일 - 슬라이더 기반 */
.core-selection-modal-v2-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.core-selection-modal-v2-content {
  background: var(--card-background);
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--header-background);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-modal-button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-modal-button:hover {
  background: var(--hover-background);
  color: var(--text-primary);
}

.modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 허용된 코어 타입 정보 */
.allowed-core-type-info {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.3);
  transition: all 0.3s ease;
}

.core-type-title {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin: 0 0 12px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* 코어 타입별 색상 스타일 */
.core-type-firepower {
  background: linear-gradient(135deg, #d68f61, #b67041) !important;
  border-color: #d68f61 !important;
  box-shadow: 0 4px 20px rgba(214, 143, 97, 0.3) !important;
}

.core-type-attribute {
  background: linear-gradient(135deg, #6ab3ea, #4a93ca) !important;
  border-color: #6ab3ea !important;
  box-shadow: 0 4px 20px rgba(106, 179, 234, 0.3) !important;
}

.core-type-strike {
  background: linear-gradient(135deg, #c24938, #a03028) !important;
  border-color: #c24938 !important;
  box-shadow: 0 4px 20px rgba(194, 73, 56, 0.3) !important;
}

.core-type-operation {
  background: linear-gradient(135deg, #70b351, #509331) !important;
  border-color: #70b351 !important;
  box-shadow: 0 4px 20px rgba(112, 179, 81, 0.3) !important;
}

.core-type-precision {
  background: linear-gradient(135deg, #d1bc53, #b19c33) !important;
  border-color: #d1bc53 !important;
  box-shadow: 0 4px 20px rgba(209, 188, 83, 0.3) !important;
}

.core-type-special {
  background: linear-gradient(135deg, #b842ea, #9822ca) !important;
  border-color: #b842ea !important;
  box-shadow: 0 4px 20px rgba(184, 66, 234, 0.3) !important;
}

.core-type-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.universal-core-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 600;
  color: white;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

/* 코어 옵션 선택 단계 */
.core-options-selection {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.core-options-selection h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
}

/* 기존 그리드 레이아웃 (사용 안함) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

/* 새로운 세로 레이아웃 */
.options-horizontal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
  max-width: 500px;
  margin: 0 auto;
}

/* 기존 그리드용 카드 스타일 (사용 안함) */
.option-card {
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option-card:hover {
  border-color: var(--primary-color);
  background: var(--primary-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.2);
}

/* 새로운 세로 카드 스타일 */
.option-card-horizontal {
  background: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  flex: 0 0 auto;
}

.option-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-core-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}

/* 코어 타입별 원 아이콘 색상 */
.option-core-icon.core-type-firepower {
  background: #d68f61;
}

.option-core-icon.core-type-attribute {
  background: #6ab3ea;
}

.option-core-icon.core-type-strike {
  background: #c24938;
}

.option-core-icon.core-type-operation {
  background: #70b351;
}

.option-core-icon.core-type-precision {
  background: #d1bc53;
}

.option-core-icon.core-type-special {
  background: #b842ea;
}

.option-card-horizontal:hover {
  border-color: var(--primary-color);
  background: var(--primary-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.2);
}

.option-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
  line-height: 1;
}

.option-range {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right;
  line-height: 1;
}

.option-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* 옵션이 없을 때 메시지 */
.no-options-message {
  text-align: center;
  padding: 40px 20px;
  background: var(--background-secondary);
  border-radius: 12px;
  border: 2px dashed var(--border-color);
}

.no-options-message p {
  margin: 8px 0;
  color: var(--text-primary);
}

.no-options-message small {
  color: var(--text-secondary);
  font-family: monospace;
}

/* 슬라이더 섹션 */
.core-slider-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent !important;
  border: none !important;
  color: inherit !important;
}

.selected-option-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.back-btn {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--hover-background);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.selected-option-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* 코어 옵션 카드 */
.core-option-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.core-option-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(var(--primary-color-rgb), 0.2);
}

.core-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.core-option-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.core-option-range {
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--background-secondary);
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

/* 슬라이더 컨테이너 */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.slider-wrapper {
  position: relative;
  padding: 20px 20px;
  width: calc(100% - 40px);
  overflow: hidden;
  box-sizing: border-box;
}

/* 슬라이더 스타일 */
.core-value-slider {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.core-value-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(var(--primary-color-rgb), 0.4);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-value-slider::-webkit-slider-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.6);
}

.core-value-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(var(--primary-color-rgb), 0.4);
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-value-slider::-moz-range-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.6);
}

/* 증강 타입별 슬라이더 색상 */
.core-slider-section.core-type-firepower .core-value-slider::-webkit-slider-thumb {
  background: #d68f61;
  box-shadow: 0 2px 6px rgba(214, 143, 97, 0.4);
}

.core-slider-section.core-type-firepower .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(214, 143, 97, 0.6);
}

.core-slider-section.core-type-attribute .core-value-slider::-webkit-slider-thumb {
  background: #6ab3ea;
  box-shadow: 0 2px 6px rgba(106, 179, 234, 0.4);
}

.core-slider-section.core-type-attribute .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(106, 179, 234, 0.6);
}

.core-slider-section.core-type-strike .core-value-slider::-webkit-slider-thumb {
  background: #c24938;
  box-shadow: 0 2px 6px rgba(194, 73, 56, 0.4);
}

.core-slider-section.core-type-strike .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(194, 73, 56, 0.6);
}

.core-slider-section.core-type-operation .core-value-slider::-webkit-slider-thumb {
  background: #70b351;
  box-shadow: 0 2px 6px rgba(112, 179, 81, 0.4);
}

.core-slider-section.core-type-operation .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(112, 179, 81, 0.6);
}

.core-slider-section.core-type-precision .core-value-slider::-webkit-slider-thumb {
  background: #d1bc53;
  box-shadow: 0 2px 6px rgba(209, 188, 83, 0.4);
}

.core-slider-section.core-type-precision .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(209, 188, 83, 0.6);
}

.core-slider-section.core-type-special .core-value-slider::-webkit-slider-thumb {
  background: #b842ea;
  box-shadow: 0 2px 6px rgba(184, 66, 234, 0.4);
}

.core-slider-section.core-type-special .core-value-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(184, 66, 234, 0.6);
}

/* 슬라이더 마커 */
.slider-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.slider-marker {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 40px;
}

.marker-dot {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  border: 2px solid var(--card-background);
}

.marker-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--card-background);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

/* 선택된 값 정보 */
.selected-value-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--background-secondary) !important;
  border-radius: 8px;
  border: 1px solid var(--border-light) !important;
}

.current-value {
  font-size: 16px;
  color: var(--text-primary);
}

.current-value strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* 증강 타입별 텍스트 강조 색상 */
.core-slider-section.core-type-firepower .current-value strong {
  color: #d68f61;
}

.core-slider-section.core-type-attribute .current-value strong {
  color: #6ab3ea;
}

.core-slider-section.core-type-strike .current-value strong {
  color: #c24938;
}

.core-slider-section.core-type-operation .current-value strong {
  color: #70b351;
}

.core-slider-section.core-type-precision .current-value strong {
  color: #d1bc53;
}

.core-slider-section.core-type-special .current-value strong {
  color: #b842ea;
}

.required-grade {
  font-size: 14px;
  color: var(--text-primary);
  text-align: right;
}

.required-grade strong {
  color: var(--success-color);
  font-weight: 700;
}

.grade-range {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 코어 설정 요약 */
.core-config-summary {
  background: var(--primary-background) !important;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 16px;
}

/* 증강 타입별 요약 박스 테두리 색상 */
.core-slider-section.core-type-firepower ~ * .core-config-summary,
.core-slider-section.core-type-firepower .core-config-summary {
  border-color: #d68f61 !important;
}

.core-slider-section.core-type-attribute ~ * .core-config-summary,
.core-slider-section.core-type-attribute .core-config-summary {
  border-color: #6ab3ea !important;
}

.core-slider-section.core-type-strike ~ * .core-config-summary,
.core-slider-section.core-type-strike .core-config-summary {
  border-color: #c24938 !important;
}

.core-slider-section.core-type-operation ~ * .core-config-summary,
.core-slider-section.core-type-operation .core-config-summary {
  border-color: #70b351 !important;
}

.core-slider-section.core-type-precision ~ * .core-config-summary,
.core-slider-section.core-type-precision .core-config-summary {
  border-color: #d1bc53 !important;
}

.core-slider-section.core-type-special ~ * .core-config-summary,
.core-slider-section.core-type-special .core-config-summary {
  border-color: #b842ea !important;
}

.core-config-summary h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
}

/* 증강 타입별 요약 박스 제목 색상 */
.core-slider-section.core-type-firepower ~ * .core-config-summary h4,
.core-slider-section.core-type-firepower .core-config-summary h4 {
  color: #d68f61 !important;
}

.core-slider-section.core-type-attribute ~ * .core-config-summary h4,
.core-slider-section.core-type-attribute .core-config-summary h4 {
  color: #6ab3ea !important;
}

.core-slider-section.core-type-strike ~ * .core-config-summary h4,
.core-slider-section.core-type-strike .core-config-summary h4 {
  color: #c24938 !important;
}

.core-slider-section.core-type-operation ~ * .core-config-summary h4,
.core-slider-section.core-type-operation .core-config-summary h4 {
  color: #70b351 !important;
}

.core-slider-section.core-type-precision ~ * .core-config-summary h4,
.core-slider-section.core-type-precision .core-config-summary h4 {
  color: #d1bc53 !important;
}

.core-slider-section.core-type-special ~ * .core-config-summary h4,
.core-slider-section.core-type-special .core-config-summary h4 {
  color: #b842ea !important;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.summary-option {
  color: var(--text-primary);
  font-weight: 500;
  min-width: 120px;
}

.summary-value {
  color: var(--primary-color);
  font-weight: 700;
}

/* 증강 타입별 요약 값 색상 */
.core-slider-section.core-type-firepower ~ * .summary-value,
.core-slider-section.core-type-firepower .summary-value {
  color: #d68f61 !important;
}

.core-slider-section.core-type-attribute ~ * .summary-value,
.core-slider-section.core-type-attribute .summary-value {
  color: #6ab3ea !important;
}

.core-slider-section.core-type-strike ~ * .summary-value,
.core-slider-section.core-type-strike .summary-value {
  color: #c24938 !important;
}

.core-slider-section.core-type-operation ~ * .summary-value,
.core-slider-section.core-type-operation .summary-value {
  color: #70b351 !important;
}

.core-slider-section.core-type-precision ~ * .summary-value,
.core-slider-section.core-type-precision .summary-value {
  color: #d1bc53 !important;
}

.core-slider-section.core-type-special ~ * .summary-value,
.core-slider-section.core-type-special .summary-value {
  color: #b842ea !important;
}

.summary-grade {
  color: var(--success-color);
  font-size: 12px;
  font-weight: 600;
}

/* 모달 푸터 */
.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--header-background);
}

.apply-btn,
.unequip-btn {
  flex: 1 1;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.apply-btn {
  background: var(--primary-color);
  color: white;
}

.apply-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

/* 증강 타입별 적용 버튼 색상 */
.core-slider-section.core-type-firepower ~ * .apply-btn:not(:disabled) {
  background: #d68f61 !important;
}

.core-slider-section.core-type-firepower ~ * .apply-btn:not(:disabled):hover {
  background: #b67041 !important;
  box-shadow: 0 4px 12px rgba(214, 143, 97, 0.3) !important;
}

.core-slider-section.core-type-attribute ~ * .apply-btn:not(:disabled) {
  background: #6ab3ea !important;
}

.core-slider-section.core-type-attribute ~ * .apply-btn:not(:disabled):hover {
  background: #4a93ca !important;
  box-shadow: 0 4px 12px rgba(106, 179, 234, 0.3) !important;
}

.core-slider-section.core-type-strike ~ * .apply-btn:not(:disabled) {
  background: #c24938 !important;
}

.core-slider-section.core-type-strike ~ * .apply-btn:not(:disabled):hover {
  background: #a03028 !important;
  box-shadow: 0 4px 12px rgba(194, 73, 56, 0.3) !important;
}

.core-slider-section.core-type-operation ~ * .apply-btn:not(:disabled) {
  background: #70b351 !important;
}

.core-slider-section.core-type-operation ~ * .apply-btn:not(:disabled):hover {
  background: #509331 !important;
  box-shadow: 0 4px 12px rgba(112, 179, 81, 0.3) !important;
}

.core-slider-section.core-type-precision ~ * .apply-btn:not(:disabled) {
  background: #d1bc53 !important;
}

.core-slider-section.core-type-precision ~ * .apply-btn:not(:disabled):hover {
  background: #b19c33 !important;
  box-shadow: 0 4px 12px rgba(209, 188, 83, 0.3) !important;
}

.core-slider-section.core-type-special ~ * .apply-btn:not(:disabled) {
  background: #b842ea !important;
}

.core-slider-section.core-type-special ~ * .apply-btn:not(:disabled):hover {
  background: #9822ca !important;
  box-shadow: 0 4px 12px rgba(184, 66, 234, 0.3) !important;
}

.apply-btn:disabled {
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.unequip-btn {
  background: var(--danger-color);
  color: white;
}

.unequip-btn:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--danger-color-rgb), 0.3);
}

/* 세로 스크롤 스타일링 */
.options-horizontal-list::-webkit-scrollbar {
  width: 8px;
}

.options-horizontal-list::-webkit-scrollbar-track {
  background: var(--background-secondary);
  border-radius: 4px;
}

.options-horizontal-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.options-horizontal-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* 반응형 디자인 - 모바일 기본 */
.core-selection-modal-v2-content {
  width: 95%;
  max-height: 95vh;
}

.modal-body {
  padding: 16px;
}

.core-option-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.selected-value-info {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.required-grade {
  text-align: left;
}

.core-type-title {
  font-size: 24px;
}

/* 모바일에서 세로 카드 크기 조정 */
.option-card-horizontal {
  width: 100%;
  padding: 12px 16px;
}

.modal-footer {
  flex-direction: column;
}

.apply-btn,
.unequip-btn {
  flex: none;
}

.core-option-card {
  padding: 16px;
}
/* 외장 부품 시뮬레이터 메인 컨테이너 */
.external-simulator {
  padding: 0;
  background: transparent;
}

/* 인라인 슬라이더 스타일링 */
.external-simulator input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
}

.external-simulator input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.external-simulator input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.external-simulator input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.external-simulator input[type="range"]::-webkit-slider-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

.external-simulator input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
  border: none;
}

/* Firefox - filled portion */
.external-simulator input[type="range"]::-moz-range-progress {
  height: 4px;
  background: rgba(200, 200, 200, 0.8);
  border-radius: 2px;
}

/* 세트 효과 래퍼 (드롭다운 + 패널) */
.external-effects-wrapper {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 세트 선택 드롭다운 - 박스 외부 */
.external-set-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.external-set-selector label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.set-dropdown {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-background);
  color: var(--text-primary);
  transition: all 0.2s ease;
  flex: 1 1;
}

.set-dropdown:hover {
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  background: var(--hover-background);
}

.set-dropdown:focus {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.set-dropdown option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 4px;
}

.set-dropdown option:checked,
.set-dropdown option:hover {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color, #42A5F5) !important;
  color: #ffffff !important;
}

/* CustomSelect 사용 시 세트 선택 외곽 박스 제거 */
.external-set-selector .custom-select .custom-select-trigger {
  background-color: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

.external-set-selector .custom-select:not(.disabled):hover .custom-select-trigger {
  border: none;
}

.external-set-selector .custom-select:focus .custom-select-trigger,
.external-set-selector .custom-select.open .custom-select-trigger {
  border: none;
  box-shadow: none;
}

/* 외장 부품 메인 레이아웃 - 좌측 2x2, 우측 세트효과 */
.external-main-layout {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
}

/* 외장 부품 슬롯 컨테이너 - 세로 배치 */
.external-slots-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1;
  max-width: 400px;
}

.external-slot-section {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0;
  background: var(--card-background);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

/* 범주 제목 헤더 */
.external-category-header {
  padding: 8px 12px;
  background: rgba(128, 128, 128, 0.15);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.5px;
}

.external-slot-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 25%;
}

/* 외장 부품 카드 스타일 */
.external-component-card {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  padding: 10px;
}

/* 드롭다운 영역 (이미지 옆) - 제목과 드롭다운을 좌우로 */
.external-dropdown-wrapper {
  flex: 1 1;
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

/* 이미지 옆 컨텐츠 영역 (드롭다운 + 기본 수치) */
.external-content-wrapper {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.external-dropdown-wrapper .unified-dropdown {
  width: 100%;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.3;
}

/* CustomSelect 사용 시 외곽 박스 제거 */
.external-dropdown-wrapper .custom-select .custom-select-trigger {
  background-color: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

.external-dropdown-wrapper .custom-select:not(.disabled):hover .custom-select-trigger {
  border: none;
}

.external-dropdown-wrapper .custom-select:focus .custom-select-trigger,
.external-dropdown-wrapper .custom-select.open .custom-select-trigger {
  border: none;
  box-shadow: none;
}

/* 외장 부품 정보 섹션 */
.external-info-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-background);
  min-height: 125px;
  transition: all 0.2s ease;
}

.external-info-section:hover {
  border-color: var(--primary-color);
  background: var(--hover-background);
}

.external-info-section.empty {
  border-style: dashed;
  background: var(--empty-slot-background);
  justify-content: center;
  cursor: pointer;
}

.external-image {
  flex: 0 0 35%;
  max-width: 120px;
  aspect-ratio: 1.26;
  border-radius: 4px;
  background: var(--tier-common);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.external-image.empty {
  background: var(--empty-slot-background);
}

.external-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.external-details {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 세트 이름 스타일 */
.external-set-name {
  font-size: 14px;
  font-weight: 600;
  color: #007bff;
  color: var(--accent-color, #007bff);
  text-align: center;
  padding: 8px;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 4px;
}

/* 기본 능력치 스타일 */
.external-base-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.external-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  font-size: 12px;
}

.external-stat-name {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1 1;
}

.external-stat-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
}

/* 랜덤 옵션 컨테이너 */
.external-random-options {
  /* RandomOptionsPanel이 자체 스타일을 가지고 있음 */
}

/* 코어 슬롯 컨테이너 */
.external-core-slots {
  /* 코어 슬롯 전용 컨테이너 */
}

.external-type {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.external-stats-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.external-stat-item {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-color-darker);
  padding: 2px 6px;
  border-radius: 3px;
}

/* 통합된 카드 구조 */
.external-unified-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.external-unified-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background: var(--card-background);
}

.unified-card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.unified-card-image-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
  border-radius: 6px;
  background: var(--tier-common);
  overflow: hidden;
}

.unified-card-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.unified-card-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unified-dropdown {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-background);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.unified-dropdown:hover {
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  background: var(--hover-background);
}

.unified-dropdown:focus {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.unified-dropdown option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 4px;
}

.unified-dropdown option:checked,
.unified-dropdown option:hover {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color, #42A5F5) !important;
  color: #ffffff !important;
}

.unified-card-section {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 12px;
}

.unified-card-section-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.unified-card-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unified-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.unified-card-stat:last-child {
  border-bottom: none;
}

.unified-card-stat-name {
  font-size: 13px;
  color: var(--text-secondary);
}

.unified-card-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
}

.unified-card-set {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unified-card-set-name {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.unified-card-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: var(--empty-slot-background);
  color: var(--text-secondary);
}

.unified-card-empty-image {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.unified-card-empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

/* 외장 부품 빈 컨텐츠 */
.external-empty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-secondary);
}

.external-empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

/* 코어 슬롯 스타일 */
.unified-card-core-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-card-core-slot {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-background);
  padding: 8px;
  transition: all 0.2s ease;
}

.unified-card-core-slot:hover {
  border-color: var(--primary-color);
  background: var(--hover-background);
}

.core-slot-header {
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.core-slot-type {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.core-slot-content {
  padding: 12px;
}

/* 코어가 장착된 경우 */
.core-equipped-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.core-option-info {
  flex: 1 1;
}

.core-selection-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.core-type-name {
  font-size: 11px;
  font-weight: 600;
  color: #007bff;
  color: var(--accent-color, #007bff);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.core-option-name {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  line-height: 1.3;
}

.core-option-value {
  font-size: 14px;
  font-weight: 700;
  color: #007bff;
  color: var(--accent-color, #007bff);
}

.core-slot-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.core-edit-button,
.core-remove-button,
.core-select-button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.core-edit-button {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.core-edit-button:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4);
}

.core-remove-button {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  font-weight: bold;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.core-remove-button:hover {
  background: linear-gradient(135deg, #c82333, #b21e2f);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
}

/* 코어가 장착되지 않은 경우 */
.core-empty-slot {
  display: flex;
  justify-content: center;
}

.core-select-button {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  border: 1px solid rgba(108, 117, 125, 0.3);
  width: 100%;
}

.core-select-button:hover {
  background: linear-gradient(135deg, #5a6268, #495057);
  border-color: rgba(108, 117, 125, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3);
}

/* 기존 코어 뱃지 스타일 (호환성 유지) */
.unified-card-core-badge {
  display: inline-block;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  font-size: 11px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 6px;
}

.unified-card-core-badge:hover {
  background-color: rgba(0, 123, 255, 0.1);
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.unified-card-core-badge.core-equipped {
  background-color: rgba(0, 123, 255, 0.2);
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  cursor: pointer;
  min-width: 160px;
}

.set-dropdown:focus {
  outline: none;
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.external-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

/* 로딩 상태 */
.external-loading {
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: var(--text-secondary);
}

/* 통합된 외장 부품 그리드 - 1×4 세로 배치 */
.external-unified-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 통합 카드 스타일 - 세로형 박스 */
.external-unified-card {
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border: 2px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
  min-height: 200px;
}

.external-unified-card:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* 드롭다운 스타일 - 상단에 위치 */
.unified-dropdown {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  background-color: #1a1a1a;
  background-color: var(--bg-color, #1a1a1a);
  color: var(--text-primary);
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
}

.unified-dropdown:focus {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.unified-dropdown option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 4px;
}

.unified-dropdown option:checked,
.unified-dropdown option:hover {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color, #42A5F5) !important;
  color: #ffffff !important;
}

/* 상세 정보 영역 */
.unified-card-content {
  flex: 1 1;
  display: flex;
  flex-direction: row;
  gap: 16px;
}

/* 이미지 섹션 - 정사각형 */
.unified-card-image-section {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  border-radius: 8px;
  padding: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.unified-card-image {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  border-radius: 6px;
}

/* 정보 영역 */
.unified-card-info {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.unified-card-header {
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.unified-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-card-type {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* 섹션 스타일 */
.unified-card-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.unified-card-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.unified-card-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-align: left;
}

/* 코어 슬롯 */
.unified-card-core-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
}

.unified-card-core-badge {
  padding: 4px 8px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.unified-card-core-badge:hover {
  background-color: #0056b3;
  background-color: var(--accent-color-hover, #0056b3);
  transform: translateY(-1px);
}

/* 능력치 */
.unified-card-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.unified-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
}

.unified-card-stat-name {
  color: var(--text-secondary);
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.unified-card-stat-info {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.unified-card-stat-level {
  font-size: 9px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
}

.unified-card-stat-value {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 600;
}

/* 세트 정보 */
.unified-card-set {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 6px 12px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 6px;
}

.unified-card-set-name {
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

/* 빈 카드 상태 */
.unified-card-empty {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 12px;
}

/* 하단 슬롯별 상세 정보 박스 */
.external-detail-boxes {
  margin-top: 24px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.3);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.3));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.detail-boxes-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.detail-boxes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

/* 개별 상세 정보 박스 */
.detail-info-box {
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border: 2px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.detail-info-box:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.detail-box-header {
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.detail-box-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.detail-box-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

/* 섹션 스타일 */
.detail-box-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-box-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

/* 부품 정보 */
.detail-box-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-box-info p {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.detail-box-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 코어 슬롯 리스트 */
.detail-box-core-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-box-core-item {
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
}

.detail-box-core-name {
  font-size: 11px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-box-core-name:hover {
  color: #0056b3;
  color: var(--accent-color-hover, #0056b3);
  text-decoration: underline;
}

/* 능력치 리스트 */
.detail-box-stats-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-box-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
  font-size: 10px;
}

.detail-box-stat-name {
  color: var(--text-secondary);
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.detail-box-stat-info {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.detail-box-stat-level {
  font-size: 8px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
}

.detail-box-stat-value {
  font-size: 10px;
  color: var(--text-primary);
  font-weight: 600;
}

/* 빈 박스 상태 */
.detail-box-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.detail-box-empty p {
  margin: 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 12px;
}

.unified-card-empty-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 10px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border: 2px dashed var(--panel-border-color, rgba(255, 255, 255, 0.1));
  flex-shrink: 0;
}

.unified-card-empty-text {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  font-size: 11px;
  flex: 1 1;
}

/* 개별 외장 부품 슬롯 */
.external-slot {
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border: 2px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  min-height: 140px;
  flex: 1 1;
}

/* 우측 상세 정보 영역 */
.external-detail-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 16px;
  gap: 16px;
  overflow-y: auto;
  max-height: 600px;
}

/* 개별 부품 상세 카드 */
.external-detail-card {
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border: 2px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-height: 160px;
  transition: all 0.3s ease;
}

.external-detail-card:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.external-detail-card.empty {
  border-style: dashed;
  opacity: 0.6;
  justify-content: center;
  align-items: center;
}

/* 카드 내 이미지 영역 */
.detail-card-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
}

.detail-card-image-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 10px;
  text-align: center;
  flex-shrink: 0;
}

/* 카드 내 정보 영역 */
.detail-card-info {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.detail-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.detail-card-type {
  font-size: 10px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

/* 카드 내 섹션들 */
.detail-card-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-card-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
}

/* 카드 내 코어 슬롯 */
.detail-card-core-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
}

.detail-card-core-badge {
  padding: 2px 6px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.detail-card-core-badge:hover {
  background-color: #0056b3;
  background-color: var(--accent-color-hover, #0056b3);
  transform: translateY(-1px);
}

/* 카드 내 능력치 */
.detail-card-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  padding: 1px 4px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 3px;
}

.detail-card-stat-name {
  color: var(--text-secondary);
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.detail-card-stat-info {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.detail-card-stat-level {
  font-size: 7px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
}

.detail-card-stat-value {
  font-size: 9px;
  color: var(--text-primary);
  font-weight: 600;
}

/* 카드 내 세트 정보 */
.detail-card-set {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 6px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
}

.detail-card-set-name {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

/* 빈 카드 플레이스홀더 */
.detail-card-empty-text {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  font-size: 14px;
}

.external-detail-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding-bottom: 12px;
}

.external-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.external-detail-type {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.external-detail-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  margin: 0 auto;
  display: block;
}

.external-detail-placeholder {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 40px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border: 2px dashed var(--panel-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
}

/* 상세 정보 섹션들 */
.detail-section {
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
}

.detail-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 확장된 코어 슬롯 스타일 */
.detail-core-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-core-slot-badge {
  padding: 6px 12px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.detail-core-slot-badge:hover {
  background-color: #0056b3;
  background-color: var(--accent-color-hover, #0056b3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* 확장된 능력치 스타일 */
.detail-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.detail-stat-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-stat-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-stat-level {
  font-size: 12px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.1);
  background-color: var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding: 2px 6px;
  border-radius: 3px;
}

.detail-stat-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.external-slot:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}


/* 슬롯 내부 컨테이너 */
.external-slot-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px;
  box-sizing: border-box;
  gap: 8px;
}

/* 외장 부품 선택 드롭박스 */
.external-selector {
  flex-shrink: 0;
}

.component-dropdown {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.2));
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.3);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.3));
  color: var(--text-primary);
  cursor: pointer;
  box-sizing: border-box;
}

.component-dropdown:focus {
  outline: none;
  border-color: #42A5F5;
  border-color: var(--accent-color, #42A5F5);
  box-shadow: 0 0 0 1px rgba(66, 165, 245, 0.2);
}

.component-dropdown option {
  background-color: #000000 !important;
  color: #ffffff !important;
  padding: 4px;
}

.component-dropdown option:checked,
.component-dropdown option:hover {
  background-color: #42A5F5 !important;
  background-color: var(--accent-color, #42A5F5) !important;
  color: #ffffff !important;
}

/* 이미지 컨테이너 */
.external-image-container {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--skill-card-bg, rgba(0, 0, 0, 0.2));
  border-radius: 6px;
  min-height: 80px;
  max-height: 100px;
}

.external-image {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 4px;
}

.external-image-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  font-weight: 500;
}

/* 외장 부품 능력치 및 옵션 */
.external-stats {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: left;
  max-height: 80px;
  overflow-y: auto;
}

/* 코어 슬롯 섹션 */
.core-slots {
  margin-bottom: 6px;
}

.core-slots-title {
  font-size: 9px;
  font-weight: 600;
  color: #007bff;
  color: var(--accent-color, #007bff);
  margin-bottom: 3px;
  text-align: center;
}

.core-slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
}

.core-slot-badge {
  padding: 1px 4px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.core-slot-badge.clickable {
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
}

.core-slot-badge.clickable:hover {
  background-color: #0056b3;
  background-color: var(--accent-color-hover, #0056b3);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* 기본 능력치 섹션 */
.base-stats {
  margin-bottom: 4px;
}

.base-stats-title {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  text-align: center;
}

.stat-level-group {
  margin-bottom: 3px;
  padding: 2px;
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 3px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
}

.stat-name {
  flex: 1 1;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 4px;
  font-size: 9px;
}

.stat-level {
  flex-shrink: 0;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  font-size: 8px;
}

.stat-value {
  flex-shrink: 0;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  font-size: 9px;
  background-color: rgba(0, 0, 0, 0.2);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.2));
  padding: 1px 3px;
  border-radius: 2px;
}

.set-options {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding-top: 4px;
  margin-top: 4px;
}

.set-name {
  font-size: 9px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-component {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 4px;
  font-size: 10px;
}

/* 세트 효과 정리 창 - 장비 박스 스타일 */
.external-effects-panel {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  background: var(--card-background);
  flex: 1 1;
}

/* 세트 효과 패널 헤더 */
.effects-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.effects-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

/* 세트 개수 배지 컨테이너 */
.set-count-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 세트 개수 배지 */
.set-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  background: var(--primary-color);
  color: white;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}

/* 효과 컨텐츠 레이아웃 */
.effects-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 현재 활성화된 세트 효과 섹션 */
.active-effects-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding-bottom: 20px;
}

.active-effects-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 세트 보유 개수 요약 */
.set-count-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.set-count-badge {
  padding: 4px 12px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* 활성화된 효과 리스트 */
.active-effects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-effect-item.active {
  background-color: rgba(0, 255, 0, 0.1);
  background-color: var(--skill-card-bg, rgba(0, 255, 0, 0.1));
  border: 1px solid rgba(0, 255, 0, 0.3);
  border: 1px solid var(--accent-color, rgba(0, 255, 0, 0.3));
}

.set-effect-count.active {
  background-color: #00ff00;
  background-color: var(--accent-color, #00ff00);
  color: black;
  font-weight: 700;
}

/* 세트 효과 그룹 */
.set-effects-group {
  margin-bottom: 20px;
}

.set-name-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.08);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.08));
  border-radius: 6px;
  border-left: 4px solid #007bff;
  border-left: 4px solid var(--accent-color, #007bff);
}

.set-name-header.inactive {
  opacity: 0.5;
  color: var(--text-secondary);
}

.set-name-text {
  font-size: 15px;
  font-weight: 600;
}

.set-count-text {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.set-effect-item.inactive {
  background-color: rgba(255, 255, 255, 0.03);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  opacity: 0.6;
}

.set-effect-count.inactive {
  background-color: #666;
  background-color: var(--text-secondary, #666);
  color: #333;
  color: var(--bg-color, #333);
}

.external-effects-panel h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* 세트 효과 리스트 */
.set-effects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.set-effect-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
}

/* 세트 효과 테이블 스타일 */
.effects-stats-section {
  background-color: var(--panel-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
}

.effects-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.effects-stats-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color-light);
  text-align: left;
  vertical-align: top;
}

.effects-stats-table tr:last-child td {
  border-bottom: none;
}

.effects-stats-table .effect-operator {
  text-align: center;
  width: 15%;
  padding: 8px 4px;
  color: var(--text-color-light);
}

.effects-stats-table .effect-count-cell {
  display: none;
}

/* 세트 이름 셀 (왼쪽 열) */
.effects-stats-table .effect-set-name-cell {
  width: 120px;
  padding: 8px 12px;
  vertical-align: top;
  text-align: center;
}

/* 효과 설명 셀 (오른쪽 열) */
.effects-stats-table .effect-description {
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  padding: 8px 12px;
  vertical-align: top;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 세트 이름 박스 */
.set-name-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: black;
  background-color: #9ca3af;
  text-shadow: none;
  white-space: nowrap;
}

.set-name-box.inactive {
  opacity: 0.5;
  filter: grayscale(0.5);
}

.effect-count-badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 24px;
}

/* 연산자 박스 (반응로와 동일) */
.operator-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: none;
  margin-right: 6px;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

.operator-box.operator-+ {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.operator-box.operator-x {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 효과 설명 색상 - 모두 흰색으로 통일 */
.effects-stats-table .stat-positive {
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.effects-stats-table .stat-negative {
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

/* 비활성화된 효과 스타일 */
.effects-stats-table tr.effect-inactive {
  opacity: 0.5;
}

.effects-stats-table .effect-description.inactive {
  color: #666 !important;
  text-shadow: none;
}

.operator-box.inactive {
  opacity: 0.6;
  background: linear-gradient(135deg, #666, #888) !important;
  color: #ccc !important;
}

/* 조건 그룹 스타일 */
.effects-stats-table tr.effect-condition-group {
  border-top: 1px solid var(--border-color-light);
  background-color: rgba(0, 0, 0, 0.1);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.1));
}

.effects-stats-table .effect-condition-group-content {
  text-align: left;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.effects-stats-table .effect-condition-group-content.inactive {
  opacity: 0.5;
}

.condition-text {
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin-bottom: 8px;
  line-height: 1.4;
  white-space: pre-line;
  text-align: left;
  padding: 4px 0;
}

.condition-effect-row {
  display: flex;
  align-items: flex-start;
  margin-left: 16px;
  margin-bottom: 4px;
  gap: 8px;
}

.condition-effect-row:last-child {
  margin-bottom: 0;
}

.condition-effect-text {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  flex: 1 1;
  line-height: 1.4;
}

/* 비활성화 상태 */
.effects-stats-table .effect-condition-group-content.inactive .condition-text {
  color: #666 !important;
}

.effects-stats-table .effect-condition-group-content.inactive .condition-effect-text {
  color: #666 !important;
}

/* 들여쓰기된 효과 스타일 (더 이상 사용하지 않음 - 조건 그룹으로 대체) */

.set-effect-count {
  flex-shrink: 0;
  padding: 4px 12px;
  background-color: #007bff;
  background-color: var(--accent-color, #007bff);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-width: 50px;
}

.set-effect-description {
  flex: 1 1;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* 효과 없음 상태 */
.no-effects {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-style: italic;
}

/* 일반 정보 (세트 미선택 시) */

/* 모바일 스타일 기본값 (420px 컨테이너 대응) */

/* 외장 시뮬레이터 - 모바일 스타일 기본 적용 */
.external-simulator {
  padding: 12px;
}

.external-title-section {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.external-set-selector {
  justify-content: center;
}

.set-dropdown {
  min-width: 120px;
  font-size: 13px;
}

.external-unified-card {
  min-height: 140px;
}

.unified-card-selector {
  width: 140px;
  padding: 4px;
}

.unified-dropdown {
  font-size: 9px;
  padding: 3px 4px;
}

.unified-card-content {
  padding: 4px;
  gap: 6px;
}

.unified-card-image-section {
  width: 50px;
}

.unified-card-image {
  max-width: 35px;
  max-height: 35px;
}

.unified-card-title {
  font-size: 11px;
}

.unified-card-type {
  font-size: 8px;
}

.unified-card-section-title {
  font-size: 9px;
}

.unified-card-core-badge {
  font-size: 7px;
  padding: 1px 3px;
}

.unified-card-stat {
  font-size: 8px;
  padding: 2px 3px;
}

.unified-card-stat-level {
  font-size: 6px;
}

.unified-card-stat-value {
  font-size: 8px;
}

.unified-card-set-name {
  font-size: 9px;
}

.unified-card-empty-image {
  width: 50px;
  height: 50px;
  font-size: 8px;
}

.unified-card-empty-text {
  font-size: 9px;
}

.detail-boxes-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.detail-box-content {
  min-height: 140px;
  padding: 8px;
}

.detail-box-section-title {
  font-size: 10px;
}

.detail-box-info p {
  font-size: 9px;
}

.detail-box-core-name {
  font-size: 9px;
}

.detail-box-stat-item {
  font-size: 8px;
  padding: 3px 6px;
}

.detail-box-stat-level {
  font-size: 6px;
}

.detail-box-stat-value {
  font-size: 8px;
}

.detail-box-empty p {
  font-size: 10px;
}

.external-detail-boxes {
  padding: 12px;
  margin-top: 16px;
}

.detail-boxes-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.external-header h2 {
  font-size: 18px;
}

.external-detail-panel {
  grid-template-columns: 1fr;
  padding: 12px;
  max-height: 400px;
  gap: 8px;
}

.external-detail-card {
  min-height: 120px;
  padding: 8px;
  gap: 6px;
}

.detail-card-image {
  width: 50px;
  height: 50px;
}

.detail-card-image-placeholder {
  width: 50px;
  height: 50px;
  font-size: 9px;
}

.detail-card-title {
  font-size: 12px;
}

.detail-card-type {
  font-size: 10px;
}

.detail-card-section-title {
  font-size: 11px;
}

.detail-card-core-badge {
  font-size: 8px;
  padding: 1px 4px;
}

.detail-card-stat-name {
  font-size: 9px;
}

.detail-card-stat-level {
  font-size: 7px;
}

.detail-card-stat-value {
  font-size: 9px;
}

.detail-card-set-name {
  font-size: 10px;
}

.detail-card-empty-text {
  font-size: 11px;
}

.external-effects-panel {
  padding: 12px;
}

/* 세트 효과 테이블 모바일 스타일 */
.effects-stats-section {
  padding: 10px;
  margin-top: 4px;
}

.effects-stats-table {
  font-size: 13px;
}

.effects-stats-table td {
  padding: 6px 6px;
}

.effects-stats-table .effect-operator {
  width: 20%;
  padding: 6px 4px;
}

.effects-stats-table .effect-count-cell {
  width: 20%;
  padding: 6px 4px;
}

.effects-stats-table .effect-description {
  width: 60%;
  font-size: 13px;
}

.operator-box {
  font-size: 10px;
  padding: 2px 3px;
  min-width: 32px;
}

.effect-count-badge {
  font-size: 9px;
  padding: 2px 4px;
  min-width: 18px;
}

.external-effects-panel h3 {
  font-size: 16px;
}

.effects-content {
  gap: 16px;
}

.set-name-header {
  font-size: 12px;
  padding: 4px 8px;
}

.set-count-badge {
  font-size: 10px;
  padding: 2px 8px;
}

.set-effect-item {
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
}

.set-effect-count {
  align-self: flex-start;
  min-width: auto;
}

.set-effect-description {
  font-size: 12px;
}

.equipment-types {
  gap: 6px;
}

.equipment-type-tag {
  font-size: 11px;
  padding: 3px 8px;
}

.general-info {
  gap: 16px;
}

.external-slot-inner {
  padding: 6px;
  gap: 6px;
}

.component-dropdown {
  font-size: 11px;
  padding: 4px 6px;
}

.external-image-container {
  min-height: 60px;
  max-height: 80px;
}

.external-stats {
  font-size: 10px;
  max-height: 60px;
}

.core-slots-title,
.base-stats-title {
  font-size: 8px;
}

.core-slot-badge {
  font-size: 7px;
  padding: 1px 3px;
}

.stat-name {
  font-size: 8px;
}

.stat-level {
  font-size: 7px;
}

.stat-value {
  font-size: 8px;
}

.set-name {
  font-size: 8px;
}

.no-component {
  font-size: 9px;
  padding: 6px 2px;
}

.external-detail-image {
  width: 80px;
  height: 80px;
}

/* 가로형 코어 슬롯 레이아웃 */
.core-slot-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  min-height: 60px;
}

.core-slot-horizontal:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  background: rgba(0, 123, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.core-type-badge {
  flex-shrink: 0;
  background: #007bff;
  background: var(--accent-color, #007bff);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

.core-option-display {
  flex: 1 1;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 150px;
}

.core-inline-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 200px;
}

/* 인라인 슬라이더 래퍼 */
.inline-slider-wrapper {
  position: relative;
  flex: 1 1;
}

/* 인라인 마커 컨테이너 */
.inline-slider-markers {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
}

/* 개별 인라인 마커 */
.inline-marker {
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 인라인 마커 눈금 (작고 눈에 띄지 않게) */
.inline-marker-tick {
  width: 1px;
  height: 6px;
  background: rgba(156, 163, 175, 0.3);
  border-radius: 0;
}

/* 호버 시에만 조금 더 보이게 */
.inline-slider-wrapper:hover .inline-marker-tick {
  background: rgba(156, 163, 175, 0.5);
  height: 8px;
}

.core-inline-slider input[type="range"] {
  flex: 1 1;
  height: 4px;
  background: rgba(128, 128, 128, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.core-inline-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-inline-slider input[type="range"]::-webkit-slider-thumb:hover {
  width: 20px;
  height: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.core-inline-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-value-display {
  font-size: 13px;
  font-weight: 600;
  color: #007bff;
  color: var(--accent-color, #007bff);
  min-width: 60px;
  text-align: right;
}

.core-slot-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.core-edit-btn,
.core-remove-btn {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.core-edit-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.core-edit-btn:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.core-remove-btn {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.core-remove-btn:hover {
  background: linear-gradient(135deg, #c82333, #b21e2f);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* 코어 액션 버튼 컨테이너 */
.core-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* JS에서 실제로 사용하는 소형 버튼 클래스들 */
.core-edit-btn-small,
.core-remove-btn-small,
.core-select-btn-inline {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: none;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.core-edit-btn-small {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.core-edit-btn-small:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.core-remove-btn-small {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 14px;
  font-weight: bold;
}

.core-remove-btn-small:hover {
  background: linear-gradient(135deg, #c82333, #b21e2f);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.core-select-btn-inline {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  border: 1px solid rgba(108, 117, 125, 0.3);
  padding: 4px 8px;
  font-size: 10px;
}

.core-select-btn-inline:hover {
  background: linear-gradient(135deg, #5a6268, #495057);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* 빈 코어 슬롯 표시 */
.core-slot-horizontal.empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(100, 100, 100, 0.2);
  cursor: pointer;
}

.core-slot-horizontal.empty:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  background: rgba(0, 123, 255, 0.1);
}

.core-slot-empty-text {
  flex: 1 1;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-style: italic;
}

/* 00효과 박스 스타일 */
.effect-box {
  display: inline-block;
  background-color: rgba(100, 150, 255, 0.15);
  color: #4a90e2;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: inherit;
  font-weight: 500;
  border: 1px solid rgba(100, 150, 255, 0.3);
  margin: 0 1px;
  white-space: nowrap;
  cursor: help;
  position: relative;
}

/* 효과 설명 툴팁 스타일 */
.effect-box.effect-tooltip:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  width: -webkit-max-content;
  width: max-content;
  max-width: 300px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.4;
}

/* 툴팁 화살표 */
.effect-box.effect-tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  z-index: 1001;
}

/* 터치 툴팁 지원 - 모든 디바이스에 적용 */
.effect-box.effect-tooltip:active::after,
.effect-box.effect-tooltip:focus::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  white-space: normal;
  width: -webkit-max-content;
  width: max-content;
  max-width: 280px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.5;
}

.effect-box.effect-tooltip:active::before,
.effect-box.effect-tooltip:focus::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.95);
  z-index: 1001;
}

/* 비활성화된 효과의 박스 */
.effect-inactive .effect-box,
.inactive .effect-box {
  background-color: rgba(120, 120, 120, 0.1);
  color: #888;
  border-color: rgba(120, 120, 120, 0.2);
}

/* 모바일 스타일 - 기본 적용 */
.effect-box {
  padding: 0px 2px;
  border-radius: 2px;
}

/* 외장 부품 상세 정보 모달 */
.detail-viewer-modal {
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  background: #1a1a1a;
  background: var(--panel-bg-color, #1a1a1a);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 추가 옵션 전용 드롭다운 스타일 */
.additional-option-dropdown {
  /* 드롭다운 자체는 기본 스타일 유지 */
}

/* External Slots - 모바일 레이아웃 기본 적용 */
.external-slots-horizontal {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  overflow: visible;
}

.external-slot-section {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Hide category header - 탭으로 대체 */
.external-category-header {
  display: none;
}

/* Set Effects Toggle Styles */
.set-effects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.mobile-toggle-icon {
  display: block;
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.mobile-toggle-icon.open {
  transform: rotate(180deg);
}

.set-effects-content {
  display: none;
  margin-top: 8px;
}

.set-effects-content.open {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wrapper for mobile tabs and slots */
.external-mobile-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

/* Mobile External Tabs - 항상 표시 */
.mobile-external-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: -1px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 2;
  position: relative;
  align-items: flex-end;
  height: 40px;
}

.mobile-external-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-external-tab {
  flex: 1 1;
  padding: 4px 4px 10px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-align: center;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.mobile-external-tab.active {
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  padding: 8px 4px;
  border: 1px solid var(--border-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  height: 38px;
  opacity: 1;
  z-index: 3;
  position: relative;
}

/* Hide inactive slots */
.external-slot-section.mobile-hidden {
  display: none !important;
}

/* Remove top-left radius if first tab is active */
.external-slot-section.first-tab-active {
  border-top-left-radius: 0;
}

/* Remove top-right radius if last tab is active */
.external-slot-section.last-tab-active {
  border-top-right-radius: 0;
}
/* 코어 슬롯 모달 오버레이 */
.core-slot-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

/* 모달 메인 컨테이너 */
.core-slot-modal {
  background-color: #1a1a1a;
  background-color: var(--bg-color, #1a1a1a);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.2));
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  max-height: 80vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 모달 헤더 */
.core-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
}

.core-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.core-modal-close {
  background: linear-gradient(135deg, #dc3545, #c82333);
  border: 1px solid rgba(220, 53, 69, 0.3);
  font-size: 16px;
  color: white;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 600;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.core-modal-close:hover {
  background: linear-gradient(135deg, #c82333, #b21e2f);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
}

/* 모달 컨텐츠 */
.core-modal-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 0;
}

/* 코어 옵션 리스트 */
.core-options-list {
  padding: 20px 24px;
}

.core-options-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding-bottom: 8px;
}

/* 코어 옵션 그룹 */
.core-option-group {
  margin-bottom: 24px;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
}

.core-option-id {
  font-size: 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 12px;
  font-family: monospace;
}

/* 코어 옵션 상세 */
.core-option-detail {
  margin-bottom: 16px;
}

.core-grade-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.core-grade-label {
  font-size: 14px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-weight: 500;
}

.core-grade-value {
  font-size: 14px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* 사용 가능한 옵션들 */
.available-options {
  margin-top: 12px;
}

.available-options-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin-bottom: 8px;
}

/* 개별 아이템 옵션 */
.item-option {
  background-color: rgba(0, 0, 0, 0.3);
  background-color: var(--bg-color-darker, rgba(0, 0, 0, 0.3));
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.item-option-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.item-option-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.item-option-type {
  font-size: 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  background-color: rgba(255, 255, 255, 0.1);
  background-color: var(--panel-border-color, rgba(255, 255, 255, 0.1));
  padding: 2px 6px;
  border-radius: 3px;
}

.item-option-grade {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* 옵션 효과 */
.option-effect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  font-size: 13px;
}

.effect-stat,
.effect-operator,
.effect-range,
.effect-rate {
  display: flex;
  align-items: center;
  gap: 6px;
}

.effect-label {
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-weight: 500;
  min-width: 60px;
}

.effect-value {
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  font-weight: 600;
}

.effect-range {
  grid-column: 1 / -1;
}

.effect-rate {
  grid-column: 1 / -1;
  color: #007bff;
  color: var(--accent-color, #007bff);
}

/* 옵션 없음 상태 */
.no-options {
  padding: 40px 24px;
  text-align: center;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-style: italic;
}

/* 현재 장착된 코어 섹션 */
.current-core-section {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
}

.current-core-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
}

.current-core-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-core-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

/* 코어 타입 선택 섹션 */
.core-type-selection {
  padding: 20px 24px;
}

.core-type-selection h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.core-type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.core-type-button {
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.core-type-button:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
}

.core-type-button.selected {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  background-color: rgba(0, 123, 255, 0.2);
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.3);
}

.core-type-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

.core-type-description {
  font-size: 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  margin: 0;
  line-height: 1.4;
}

.universal-core-badge {
  font-size: 11px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  background: rgba(0, 123, 255, 0.2);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.3);
  align-self: flex-start;
}

/* 코어 옵션 선택 섹션 */
.core-options-selection {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selected-core-type-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0.05));
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.3);
}

.selected-core-type-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

.core-options-selection h4 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin: 0;
  text-align: center;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.option-card {
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option-card:hover {
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
  background: rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
}

.option-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin: 0 0 8px 0;
}

.option-range {
  font-size: 14px;
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 600;
  margin-bottom: 8px;
}

.option-description {
  font-size: 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  margin: 0;
}

/* 슬라이더 섹션 */
.core-slider-section {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.selected-option-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
}

.back-btn {
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border: 1px solid var(--skill-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 8px 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(0, 123, 255, 0.1);
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  border-color: #007bff;
  border-color: var(--accent-color, #007bff);
}

.selected-option-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

/* 슬라이더 컨테이너 */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-wrapper {
  position: relative;
  padding: 20px 0;
}

/* 슬라이더 스타일 */
.core-value-slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.core-value-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #007bff;
  background: var(--accent-color, #007bff);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-value-slider::-webkit-slider-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.6);
}

.core-value-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #007bff;
  background: var(--accent-color, #007bff);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
  -moz-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.core-value-slider::-moz-range-thumb:hover {
  width: 24px;
  height: 24px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.6);
}

/* 슬라이더 마커 */
.slider-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.slider-marker {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.marker-dot {
  width: 2px;
  height: 12px;
  background: #9ca3af;
  background: var(--text-secondary, #9ca3af);
  border-radius: 0;
  border: none;
  box-shadow: 0 0 3px rgba(156, 163, 175, 0.5);
}

.marker-label {
  font-size: 10px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-weight: 600;
  background: #1a1a1a;
  background: var(--bg-color, #1a1a1a);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* 선택된 값 정보 */
.selected-value-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-value {
  font-size: 16px;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.current-value strong {
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 700;
}

.required-grade {
  font-size: 14px;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  text-align: right;
}

.required-grade strong {
  color: #10b981;
  font-weight: 700;
}

.grade-range {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  margin-top: 2px;
}

/* 코어 설정 요약 */
.core-config-summary {
  background: rgba(0, 123, 255, 0.1);
  border: 1px solid rgba(0, 123, 255, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.core-config-summary h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #007bff;
  color: var(--accent-color, #007bff);
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}

.summary-core-type {
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  font-weight: 600;
  min-width: 100px;
}

.summary-option {
  color: #ffffff;
  color: var(--text-primary, #ffffff);
  font-weight: 500;
  min-width: 120px;
}

.summary-value {
  color: #007bff;
  color: var(--accent-color, #007bff);
  font-weight: 700;
}

.summary-grade {
  color: #10b981;
  font-size: 12px;
  font-weight: 600;
}

/* 옵션이 없을 때 메시지 */
.no-options-message {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  background: var(--skill-card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
}

.no-options-message p {
  margin: 8px 0;
  color: #ffffff;
  color: var(--text-primary, #ffffff);
}

.no-options-message small {
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  font-family: monospace;
}

/* 모달 액션 버튼 */
.modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid var(--panel-border-color, rgba(255, 255, 255, 0.1));
  background-color: rgba(255, 255, 255, 0.05);
  background-color: var(--panel-bg-color, rgba(255, 255, 255, 0.05));
}

.equip-button,
.unequip-button,
.cancel-button {
  flex: 1 1;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.equip-button {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 1px solid rgba(40, 167, 69, 0.3);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.equip-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.equip-button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  color: var(--text-secondary, #9ca3af);
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.unequip-button {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: 1px solid rgba(220, 53, 69, 0.3);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.unequip-button:hover {
  background: linear-gradient(135deg, #c82333, #b21e2f);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cancel-button {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  border: 1px solid rgba(108, 117, 125, 0.3);
  box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.cancel-button:hover {
  background: linear-gradient(135deg, #5a6268, #495057);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* 반응형 디자인 - 모바일 기본 */
.core-slot-modal-overlay {
  padding: 12px;
}

.core-slot-modal {
  max-width: 100%;
  max-height: 90vh;
}

.core-modal-header {
  padding: 12px 16px;
}

.core-modal-title {
  font-size: 16px;
}

.core-options-list {
  padding: 12px 16px;
}

.core-option-group {
  padding: 8px;
}

.option-effect {
  grid-template-columns: 1fr;
}

.effect-range,
.effect-rate {
  grid-column: 1;
}

.item-option {
  padding: 8px;
}

.item-option-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
/* 아르케 조율 시뮬레이터 스타일 */
.arche-tuning-container {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

/* 로드아웃 전환 탭 */
.arche-loadout-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px 0;
  padding: 0;
  background-color: transparent;
  align-items: stretch;
  justify-content: center;
}

.arche-loadout-tabs .arche-edit-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.arche-loadout-tabs .arche-edit-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  filter: none;
  transform: none;
}

.arche-loadout-tabs .arche-edit-button:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.06);
  cursor: default;
}


/* 세그먼트처럼 이어진 토글 — 수정 버튼과 세로 높이 맞춤 */
.loadout-tab-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
  align-items: stretch;
  align-self: stretch;
  box-sizing: border-box;
}

.loadout-tab {
  flex: 0 0 auto;
  padding: 0 18px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-color-light);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  min-width: 40px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loadout-tab:hover:not(.active) {
  color: var(--text-color);
}

.loadout-tab.active {
  background-color: #3b82f6;
  background-color: var(--accent-color, #3b82f6);
  color: #fff;
  font-weight: 700;
}

/* 아르케 편집 버튼 (PC 전용) */
.arche-edit-button {
  padding: 10px 20px;
  background-color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.arche-edit-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.arche-edit-button:active {
  transform: translateY(0);
}

.arche-edit-button:disabled {
  background-color: var(--background-color-deep);
  border-color: var(--border-color-heavy);
  color: var(--text-color-secondary);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* 모바일에서는 편집 버튼 숨기기 */
@media (max-width: 1023px) {
  .arche-edit-button {
    display: none;
  }
}

/* 헤더 영역 */
.arche-header {
  margin-bottom: 20px;
}

.arche-title {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 24px;
}

/* 스킬 위력 강화 누적 수치 표시 */
.skill-power-summary {
  margin: 15px 0 10px 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1a4c96, #2d5aa0);
  border-radius: 8px;
  border: 2px solid #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
  width: 100%;
  text-align: center;
}

.skill-power-total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.skill-power-label {
  color: #ffffff;
  font-size: 14px;
}

.skill-power-value {
  color: #4CAF50;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.skill-power-count {
  color: #b3d9ff;
  font-size: 12px;
  opacity: 0.9;
}

.arche-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding: 15px;
  background: var(--bg-color-dark);
  border-radius: 8px;
  border: 1px solid var(--border-color-light);
}

/* 로드아웃 선택기 */
.loadout-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.loadout-selector label {
  color: var(--text-color);
  font-weight: 500;
  margin-right: 8px;
}

.loadout-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color-light);
  background: var(--bg-color);
  color: var(--text-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 32px;
}

.loadout-btn:hover {
  background: var(--bg-color-dark);
}

.loadout-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* 아르케 팩터 레벨 */
.arche-factor-level {
  display: flex;
  gap: 8px;
  align-items: center;
}

.arche-factor-level label {
  color: var(--text-color);
  font-weight: 500;
}

.arche-factor-level input {
  padding: 6px 8px;
  border: 1px solid var(--border-color-light);
  background: var(--bg-color);
  color: var(--text-color);
  border-radius: 4px;
  width: 80px;
}

/* 사용 가능한 포인트 */
.available-points {
  color: var(--text-color);
  font-weight: 600;
  background: var(--bg-color);
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color-light);
}

/* 저장 버튼 섹션 */
.arche-save-section {
  display: flex;
  align-items: center;
}

.arche-save-button {
  padding: 8px 16px;
  border: 1px solid #4CAF50;
  background: #4CAF50;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.arche-save-button:hover {
  background: #45a049;
  border-color: #45a049;
  transform: translateY(-1px);
}

.arche-save-button:active {
  transform: translateY(0);
}

/* 경로 상태 표시 */
.path-status.valid {
  color: #4CAF50;
  font-weight: 600;
}

.path-status.invalid {
  color: #f44336;
  font-weight: 600;
}

.invalid-nodes-count {
  display: block;
  color: #ff9800;
  font-size: 11px;
  margin-top: 2px;
  font-weight: normal;
}

/* 메인 레이아웃 - 모바일 세로 배치 */
.arche-main-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  position: relative;
}

/* 로드아웃 선택 전: 전체 메인 레이아웃 블러 처리 */
.arche-main-layout.no-loadout > *:not(.loadout-selection-overlay) {
  filter: blur(3px);
  opacity: 0.5;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
}

/* 그리드 컨테이너 - 컴팩트한 관상용 디스플레이 */
.arche-grid-container {
  background: transparent;
  border-radius: 8px;
  padding: 0;
  border: none;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
  position: relative;
  transition: filter 0.3s ease;
  pointer-events: none;
  opacity: 0.8;
}

/* -1 상태일 때 블러 효과 */
.arche-grid-container.blurred .arche-grid {
  filter: blur(3px);
  opacity: 0.5;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
}

/* 로드아웃 선택 오버레이 */
.loadout-selection-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  text-align: center;
  pointer-events: none;
}

.overlay-message {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 16px 24px;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
}

.overlay-message h3 {
  color: white;
  font-size: 14px;
  font-weight: bold;
  margin: 0;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.overlay-message p {
  color: white;
  font-size: 14px;
  font-weight: bold;
  margin: 0;
  line-height: 1.5;
}

.arche-grid {
  position: relative;
  width: 504px; /* 21 * 24 — 노드 배치 원본 크기 */
  height: 504px;
  background-color: transparent;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  /* zoom은 transform과 달리 레이아웃 박스까지 축소해서, 부모 컨테이너 크기와 일치시킬 수 있음 */
  zoom: 0.476; /* 240 / 504 */
}

/* 아르케 정보 박스 */
.arche-info-box {
  background: var(--bg-color-dark);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid var(--border-color-light);
  height: -webkit-fit-content !important;
  height: fit-content !important;
}

.arche-grid .loading-message {
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
}

/* 아르케 노드 (격자 위에 배치되는 클릭 가능한 요소) */
/* 아르케 연결선 — 더 이상 필요하지 않아 숨김 */
.arche-connections {
  display: none;
}

.arche-connection-line {
  stroke: rgba(100, 200, 255, 0.3);
  stroke-width: 2;
  stroke-linecap: round;
}

/* 다크/라이트 테마 연결선 */
[data-theme="dark"] .arche-connection-line {
  stroke: rgba(100, 200, 255, 0.3);
}

[data-theme="light"] .arche-connection-line {
  stroke: rgba(50, 150, 200, 0.3);
}

.arche-node {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  cursor: pointer;
  /* 셀 중심 기준 배치 */
  transform: translate(-50%, -50%) !important;
  scale: none !important;
  z-index: 10;
  border: 1px solid transparent;
  filter: brightness(0.45);
}

.arche-node.active {
  filter: brightness(1.0);
}

/* 노드 호버 효과 - translate 유지하여 위치 고정 */
.arche-node:hover {
  transform: translate(-50%, -50%) !important;
  scale: none !important;
  transition: none !important;
  z-index: 20;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* 노드 Tier별 색상 (모듈 시뮬레이터와 동일한 색상 체계) */
.arche-node.tier-0 {
  background: linear-gradient(135deg, var(--tier-0-color), rgba(var(--tier-0-color), 0.8));
  color: white;
  border-color: var(--tier-0-color);
  box-shadow: 0 0 8px rgba(128, 128, 128, 0.4);
}

.arche-node.tier-1 {
  background: transparent;
  color: #26A69A;
  border-color: #26A69A;
  box-shadow: 0 0 8px rgba(38, 166, 154, 0.4);
}

.arche-node.tier-2 {
  background: transparent;
  color: #8E24AA;
  border-color: #8E24AA;
  box-shadow: 0 0 8px rgba(142, 36, 170, 0.4);
}

.arche-node.tier-3 {
  background: transparent;
  color: #C79121;
  border-color: #C79121;
  box-shadow: 0 0 8px rgba(199, 145, 33, 0.4);
}

/* 기존 타입별 색상 (폴백용) */
.arche-node.start {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  border-color: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.arche-node.skill {
  background: linear-gradient(135deg, #2196F3, #42A5F5);
  color: white;
  border-color: #2196F3;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
}

.arche-node.attr {
  background: linear-gradient(135deg, #FF9800, #FFA726);
  color: white;
  border-color: #FF9800;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.arche-node.special {
  background: linear-gradient(135deg, #9C27B0, #AB47BC);
  color: white;
  border-color: #9C27B0;
  box-shadow: 0 0 8px rgba(156, 39, 176, 0.4);
}

.arche-node.corner {
  background: linear-gradient(135deg, #F44336, #EF5350);
  color: white;
  border-color: #F44336;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
}

/* 활성 노드: 색을 채우지 않고 밝기만 원래대로 (.arche-node.active 룰에서 처리) */
/* 티어별 색상은 비활성 시에도 유지되며, 밝기만 다름 */

/* 선택된 노드 - 모든 변화 효과 제거 */
.arche-node.selected {
  transform: none !important;
  scale: none !important;
  transition: none !important;
  z-index: 30;
  border-color: #FFD700;
  border-width: 3px;
  box-shadow:
    0 0 20px #FFD700,
    inset 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 비활성화된 노드 (기본수치 선택 시) */
.arche-node.disabled {
  opacity: 0.3 !important;
  background: #666666 !important;
  background-image: none !important;
  color: #999999 !important;
  border-color: #666666 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.arche-node.disabled:hover {
  transform: none !important;
  z-index: auto !important;
  box-shadow: none !important;
}

.arche-node.disabled .node-image {
  filter: grayscale(100%) opacity(0.3) !important;
}

/* 노드 이미지 (API에서 로드) */
.node-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 2px;
  filter: brightness(1.0);
  transition: filter 0.2s ease;
}

.arche-node.active .node-image {
  width: 30px;
  height: 30px;
}

[data-theme="light"] .node-image {
  filter: brightness(1.0) invert(1);
}

[data-theme="light"] .arche-node:hover .node-image {
  filter: brightness(1.2) invert(1);
}

/* 노드 아이콘 (폴백용) */
.node-icon {
  width: 12px;
  height: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 시작점 - 별 모양 */
.node-icon.start::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid white;
  position: absolute;
  top: 2px;
}

.node-icon.start::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid white;
  position: absolute;
  bottom: 2px;
}

/* 스킬 위력 - 번개 모양 */
.node-icon.skill::before {
  content: '⚡';
  font-size: 10px;
  color: white;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* 속성 위력 - 원 모양 */
.node-icon.attr::before {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

/* 특수 효과 - 다이아몬드 */
.node-icon.special::before {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  transform: rotate(45deg);
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

/* 모서리 - 육각형 */
.node-icon.corner::before {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
          clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* 하단 섹션 (노드 상세 정보 + 활성 효과) */
.arche-bottom-section {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* 노드 상세 정보 */
.arche-node-details {
  flex: 1 1;
  min-width: 300px;
}

/* 활성 효과 */
.arche-active-effects {
  flex: 1 1;
  min-width: 350px;
}

/* 기존 사이드바 스타일 (제거 예정) */
.arche-sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 노드 상세 정보 */
.node-details {
  background: var(--bg-color-dark);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid var(--border-color-light);
}

.node-details h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.node-details p {
  color: var(--text-secondary);
  margin: 5px 0;
  font-size: 14px;
}

.node-effect {
  background: rgba(70, 130, 180, 0.1);
  border: 1px solid rgba(70, 130, 180, 0.3);
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
}

.node-effect p {
  color: var(--text-color);
  margin: 0;
  font-weight: 500;
}

.toggle-node-btn {
  width: 100%;
  padding: 10px;
  margin-top: 15px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.toggle-node-btn:hover:not(:disabled) {
  background: var(--accent-color-dark);
  transform: translateY(-1px);
}

.toggle-node-btn:disabled {
  background: var(--border-color-light);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* 사이드 섹션 - 활성 효과 */
.arche-side-section {
  flex: 1 1; /* 남는 가로 너비 다 차지 */
  min-width: 0;
}

.arche-active-effects {
  height: -webkit-fit-content;
  height: fit-content;
  position: -webkit-sticky;
  position: sticky;
  top: 20px;
}

.active-effects {
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
}

.active-effects-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}

.active-effects-header > .sidebar-view-toggle {
  flex: 1 1;
}

/* 사이드바 뷰 전환 토글 (활성 효과 / 변이 세포) */
.sidebar-view-toggle {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.sidebar-view-btn {
  flex: 1 1;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-color-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  text-align: center;
}

.sidebar-view-btn:hover:not(.active) {
  color: var(--text-color);
}

.sidebar-view-btn.active {
  background: var(--accent-color);
  color: #fff;
}

.sidebar-cells-empty {
  padding: 16px 6px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

/* 사이드바 변이 세포 뷰 — 모달 collapsed 스타일 재사용 */
.mutation-cells-scroll.sidebar-mode {
  flex: none;
  max-height: none;
  overflow: visible;
  gap: 14px;
}

.mutation-slot-header.sidebar-header {
  cursor: default;
  pointer-events: none;
}

.active-effects h3 {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 모달처럼 header 래퍼 없이 h3이 직접 놓인 경우에도 동일한 간격 적용 */
.active-effects > h3 {
  margin-bottom: 18px;
}

/* 활성 효과 제목 + 코스트 배지 */
.active-effects-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 10px;
}

.active-effects-title-row h3 {
  margin: 0 !important;
}

.cost-badge {
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--panel-border-color);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'D2Coding', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.active-effects-header .arche-edit-button {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background-color: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.active-effects-header .arche-edit-button:hover {
  background-color: var(--accent-color);
  color: #fff;
  filter: none;
  transform: none;
}

.active-effects-header .arche-edit-button:disabled {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.effect-list {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-column-gap: 12px;
  column-gap: 12px;
  grid-row-gap: 0;
  row-gap: 0;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.effect-item {
  display: contents;
}

.effect-item > span {
  padding: 4px 0;
  line-height: 1.3;
  align-self: center;
}

.effect-item > span:first-child {
  color: rgba(255, 255, 255, 0.65);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.effect-item > span:last-child {
  text-align: right;
  color: rgba(255, 255, 255, 1);
  font-weight: 700;
  font-family: 'D2Coding', monospace;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

/* 세팅 저장 버튼 */
.save-loadout-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.save-loadout-btn:hover:not(:disabled) {
  background: #0056b3;
  background: var(--accent-hover, #0056b3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.save-loadout-btn:disabled {
  background: var(--background-color-deep);
  color: var(--text-color-secondary);
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}


/* 반응형 디자인 - 모바일 기본 */
.arche-bottom-section {
  flex-direction: column;
}

.arche-node-details,
.arche-active-effects {
  min-width: auto;
  width: 100%;
}

.arche-tuning-container {
  padding: 10px;
}

.arche-controls {
  flex-direction: column;
  gap: 15px;
  align-items: stretch;
}

/* .arche-grid 크기는 JS에서 동적으로 설정됨 */

.arche-node {
  width: 22px;
  height: 22px;
  font-size: 7px;
}

.node-image {
  width: 22px;
  height: 22px;
}

.arche-node.active .node-image {
  width: 30px;
  height: 30px;
}

/* Hole 타입(변이 세포 슬롯) — 소켓 아이콘으로 표시, 크기 축소 */
.arche-node.hole .node-image {
  width: 14px;
  height: 14px;
}

.arche-node.hole.active .node-image {
  width: 16px;
  height: 16px;
}

.node-icon {
  width: 10px;
  height: 10px;
}

.node-icon.skill::before {
  font-size: 8px;
}

.node-icon.attr::before,
.node-icon.special::before,
.node-icon.corner::before {
  width: 6px;
  height: 6px;
}

.node-icon.start::before,
.node-icon.start::after {
  border-left-width: 3px;
  border-right-width: 3px;
  border-bottom-width: 4px;
  border-top-width: 4px;
}

.arche-bottom-section {
  flex-direction: column;
  gap: 15px;
}

/* 로딩 및 에러 스타일 */
.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--bg-color-dark);
  border-radius: 8px;
  padding: 40px;
  border: 1px solid var(--border-color-light);
}

.loading-message,
.error-message {
  color: var(--text-color);
  font-size: 18px;
  margin-bottom: 20px;
  text-align: center;
}

.error-container button {
  padding: 10px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.error-container button:hover {
  background: var(--accent-color-dark);
  transform: translateY(-1px);
}

/* 보드 정보 */
.board-info {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.board-info span {
  margin-right: 10px;
}

/* 노드 툴팁 스타일 (무채색) */
.arche-node-tooltip {
  position: fixed; /* 모달 내부에서도 작동하도록 fixed */
  background: rgba(30, 30, 35, 0.98);
  border: 1px solid rgba(150, 150, 150, 0.4);
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 180px;
  max-width: 300px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  color: #e0e0e0;
  z-index: 10001; /* 모달(z-index: 9999)보다 위 */
  pointer-events: none; /* 툴팁은 클릭 이벤트 무시 */
}

.arche-node-tooltip .tooltip-header {
  font-weight: 700;
  font-size: 14px;
  color: #f5f5f5;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(100, 100, 100, 0.5);
}

.arche-node-tooltip .tooltip-effects {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.arche-node-tooltip .tooltip-effect-item {
  color: #d0d0d0;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

.arche-node-tooltip .tooltip-cost {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(100, 100, 100, 0.5);
  color: #b0b0b0;
  font-size: 11px;
  font-weight: 600;
}

/* ===== Mobile Layout ===== */

/* Hide desktop layout - show mobile layout */
.arche-desktop-layout {
  display: none;
}

/* Show mobile layout container */
.arche-mobile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px;
}

/* 1. Arche Grid Container (Top) */
.arche-mobile-container .arche-grid-container {
  width: 100%;
  height: 290px;
  /* Visual height of scaled grid (630 * 0.45 = ~284px) */
  margin-bottom: 0;
  display: block;
  /* Use block to allow manual margin positioning */
  padding: 0;
  overflow: hidden;
  /* Hide overflow from the large grid element */
  transform: none;
  /* Reset scale on container */
  pointer-events: none;
  /* Disable interaction on mobile */
  position: relative;
}

.arche-mobile-container .arche-grid {
  width: 630px !important;
  /* Force original size to override other media queries */
  height: 630px !important;
  transform: scale(0.45);
  transform-origin: top center;
  margin-left: calc(50% - 315px) !important;
  /* Explicitly center: 50% - half width */
  margin-right: auto;
  position: relative;
}

/* 2. Loadout Tabs (Middle) */
.arche-mobile-container .arche-loadout-tabs {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  justify-content: center;
  margin-top: 0;
  z-index: 10;
}

.arche-mobile-container .loadout-tab {
  flex: 1 1;
  padding: 12px 0;
  font-size: 14px;
  text-align: center;
}

/* 3. Active Effects (Bottom) */
.arche-mobile-container .arche-active-effects {
  width: 100%;
}

.arche-mobile-container .active-effects {
  padding: 12px;
}

.arche-mobile-container .active-effects h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.arche-mobile-container .effect-item > span {
  padding: 5px 2px;
  font-size: 12px;
}

/* ===== Arche Edit Modal ===== */
.arche-edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arche-edit-modal {
  background-color: #141414;
  width: auto;
  min-width: 1280px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  border: none;
  box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.5);
}

.arche-edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.arche-edit-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  color: var(--text-color-primary, #fff);
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.arche-slot-counter {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.arche-edit-modal-close {
  background: none;
  border: none;
  color: #fff;
  color: var(--text-color-primary, #fff);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.arche-edit-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.arche-edit-modal-content {
  flex: 1 1;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.arche-edit-modal-body {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  flex: 1 1;
}

/* 모달 내부 그리드는 상호작용 가능 - 100% 크기로 표시 */
.arche-edit-modal .arche-grid-container {
  pointer-events: auto;
  opacity: 1;
  width: 504px;
  height: 504px;
  max-width: none;
  flex-shrink: 0;
}

.arche-edit-modal .arche-grid {
  width: 504px;
  height: 504px;
  max-width: none;
  transform: none !important;
  zoom: 1 !important; /* 사이드바용 zoom 축소 상속 방지 */
}

/* 작은 화면에서 모달 그리드 스케일 조정 */
@media (max-width: 1100px) {
  .arche-edit-modal .arche-grid-container {
    width: calc(504px * 0.75);
    height: calc(504px * 0.75);
  }
  .arche-edit-modal .arche-grid {
    transform: scale(0.75) !important;
    transform-origin: top left;
  }
}

@media (max-width: 900px) {
  .arche-edit-modal .arche-grid-container {
    width: calc(504px * 0.6);
    height: calc(504px * 0.6);
  }
  .arche-edit-modal .arche-grid {
    transform: scale(0.6) !important;
    transform-origin: top left;
  }
}

.arche-edit-modal .arche-node {
  pointer-events: auto; /* 모달에서는 클릭 가능 */
  cursor: pointer;
}

/* 모달 내부 활성 효과 섹션 */
.arche-edit-modal .arche-active-effects {
  position: static;
  width: 280px;
  flex-shrink: 0;
}

/* 모달 안 활성 효과는 테두리 제거, 배경도 톤다운. 최대 높이 + 내부 스크롤. */
.arche-edit-modal .arche-active-effects {
  max-height: 630px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.arche-edit-modal .active-effects {
  background: transparent;
  border: none;
  padding: 4px 2px 0;
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
}

.arche-edit-modal .active-effects .effect-list {
  flex: 1 1;
  overflow-y: auto;
  min-height: 0;
}

.arche-edit-modal .active-effects .effect-list::-webkit-scrollbar {
  width: 6px;
}

.arche-edit-modal .active-effects .effect-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* 변이 세포 섹션 (모달 우측) - 격자 높이에 맞춰 고정, 모달 크기 변하지 않도록 */
.arche-edit-modal .arche-mutation-cells {
  flex: 0 0 360px;
  min-width: 360px;
  width: 360px;
  height: 630px;
  display: flex;
  flex-direction: column;
}

.mutation-cells-section {
  padding: 4px 2px 0;
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
}

.mutation-cells-section h3 {
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 18px 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mutation-cells-help-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.mutation-cells-help-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.7);
}

.mutation-cells-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 0;
}

.mutation-cells-scroll {
  flex: 1 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mutation-cells-scroll::-webkit-scrollbar {
  width: 8px;
}

.mutation-cells-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.mutation-cells-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.mutation-cells-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mutation-slot-block {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}


.mutation-slot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-radius: 0;
  width: 100%;
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.mutation-slot-header:hover {
  background: rgba(255, 255, 255, 0.07);
}

.mutation-slot-block.expanded .mutation-slot-header {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mutation-slot-header .chevron {
  font-size: 11px;
  color: var(--text-color-light);
  width: 12px;
  text-align: center;
}

.mutation-slot-header img {
  width: 18px;
  height: 18px;
  filter: var(--socket-icon-filter);
}

.mutation-slot-header .slot-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-color);
}

.mutation-slot-header .slot-selected-name {
  flex-grow: 1;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.mutation-slot-header .slot-selected-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.mutation-slot-header .slot-selected-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--panel-border-color);
  background: var(--input-bg);
  padding: 1px;
}

.mutation-slot-header .slot-clear-btn {
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--panel-border-color);
  background: transparent;
  color: var(--text-color-light);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.mutation-slot-header .slot-clear-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.mutation-cell-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
  max-height: 460px;
  overflow-y: auto;
}

.mutation-slot-summary {
  padding: 8px 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.mutation-cell-cards::-webkit-scrollbar {
  width: 6px;
}

.mutation-cell-cards::-webkit-scrollbar-track {
  background: transparent;
}

.mutation-cell-cards::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.mutation-cell-cards::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 모달 하단 버튼 컨테이너 */
.arche-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 취소 버튼 */
.arche-modal-cancel-button {
  padding: 10px 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.arche-modal-cancel-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* 저장 버튼 */
.arche-modal-save-button {
  padding: 10px 24px;
  background-color: #3b82f6;
  background-color: var(--accent-color, #3b82f6);
  border: 1px solid #3b82f6;
  border: 1px solid var(--accent-color, #3b82f6);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
}

.arche-modal-save-button:hover {
  background-color: #2563eb;
  background-color: var(--accent-hover, #2563eb);
  border-color: #2563eb;
  border-color: var(--accent-hover, #2563eb);
}
/* 추가 피해 패널 (모바일: 떠있는 카드 형태) */
.bonus-damage-panel {
  width: 300px;
  max-width: 300px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

/* PC: tfd-box 안에 표시되므로 자체 박스 스타일(고정폭/테두리/그림자) 없이 내용만 채움 */
.bonus-damage-panel-embedded .bonus-damage-panel {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
  margin-bottom: 0;
}

/* 헤더 */
.bonus-damage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bonus-damage-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.bonus-damage-close {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  transition: color 0.2s;
}

.bonus-damage-close:hover {
  color: #fff;
}

/* 모듈 리스트 */
.bonus-damage-list {
  padding: 8px;
}

/* 개별 모듈 아이템 */
.bonus-damage-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 6px;
}

.bonus-damage-item:last-child {
  margin-bottom: 0;
}

.bonus-damage-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.bonus-damage-item.expanded {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

/* 메인 행 */
.bonus-damage-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 아이콘 래퍼 */
.bonus-damage-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
}

.bonus-damage-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bonus-damage-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* 모듈 이름 */
.bonus-damage-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  flex: 1 1;
}

/* 데미지 값 (우측) */
.bonus-damage-value {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 4px;
}

.bonus-damage-number {
  font-weight: 700;
  font-family: "Pretendard", sans-serif;
}

/* 펼침 아이콘 행 (하단 중앙) */
.bonus-damage-expand-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 0 0;
}

/* 펼침 아이콘 */
.bonus-damage-expand-icon {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

.bonus-damage-expand-icon.open {
  transform: rotate(180deg);
}

.bonus-damage-item:hover .bonus-damage-expand-icon {
  color: rgba(255, 255, 255, 0.7);
}

/* 상세 정보 (펼쳐진 상태) */
.bonus-damage-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 계산식 */
.bonus-damage-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 8px;
}

.formula-label {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 4px;
}

.formula-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.formula-part {
  color: rgba(255, 255, 255, 0.8);
}

.formula-value {
  font-weight: 600;
}

.formula-operator {
  color: rgba(255, 255, 255, 0.5);
  padding: 0 2px;
}

.formula-result {
  font-weight: 700;
  font-family: "Pretendard", sans-serif;
}

/* 슬라이더 섹션 */
.formula-slider-section {
  width: 100%;
  margin-bottom: 6px;
}

.formula-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}

.formula-slider-section input[type="range"] {
  margin: 0;
  height: 18px;
}

/* 추가 설명 */
.bonus-damage-note {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* 반응형 */
@media (max-width: 480px) {
  .bonus-damage-main-row {
    flex-wrap: wrap;
  }

  .bonus-damage-condition {
    order: 4;
    margin-top: 4px;
  }

  .bonus-damage-value {
    margin-left: 0;
  }

  .formula-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 계승자 기본 정보 패널 */
.descendant-basic-info {
  width: 100%;
  padding: 12px 12px 8px 12px;
}

/* 스탯 가로 4개 배치 - minmax(0, 1fr)로 강제해야 방어력처럼 자릿수가 긴 값이 있어도
   컨텐츠 크기 때문에 그 칸만 넓어지지 않고 네 칸이 항상 동일한 너비를 유지함 */
.basic-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

/* 개별 스탯 아이템 - 다시 세로 배치(라벨줄 위, 값 아래). 아이콘은 라벨 텍스트 바로 옆(같은 줄)에 붙음 */
.basic-stats-grid .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.basic-stats-grid .stat-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 아이콘 + 라벨을 한 줄에 나란히 */
.basic-stats-grid .stat-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.basic-stats-grid .stat-item-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: contain;
}

/* 스탯 라벨 - 상단 */
.basic-stats-grid .stat-label {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
  font-weight: 500;
  text-align: center;
}

/* 스탯 값 - 하단 */
.basic-stats-grid .stat-value {
  font-size: 13px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 700;
  font-family: 'D2Coding', monospace, sans-serif;
  text-align: center;
}

/* 스탯 상한(statCapScaling) 정보 목록 - 체력/정신력/실드/방어력 그리드 바로 아래 */
.stat-cap-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* 그리드로 열을 고정해서 항목이 여러 개일 때 체정방실/상한값/필요값 열이 행마다 서로 정렬되도록 함
   (flex만 쓰면 항목이름 길이에 따라 뒤 열들이 행마다 밀려서 정렬이 안 맞았음). 상한값/필요값도 각자
   고정폭 열로 분리해서(예전엔 한 칸을 flex로 나눠 써서 자릿수에 따라 서로 안 맞았음) 행끼리 정렬됨 */
.stat-cap-info-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 54px 68px 56px;
  align-items: center;
  grid-gap: 6px;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-cap-info-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 3px;
  object-fit: contain;
  background-color: rgba(255, 255, 255, 0.05);
}

.stat-cap-info-name {
  min-width: 0;
  font-size: 11px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 배지(테두리/배경) 없이 텍스트로만 표시하되, 상한값과 동일하게 잘 보이도록 밝은 색+굵게.
   폭을 grid-template-columns에서 고정해서 여러 행일 때 다음 열(상한값/필요값)이 정렬됨 */
.stat-cap-info-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 700;
}

.stat-cap-info-stat-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: contain;
}

/* 상한값이 존재하는 스탯(체력/정신력/실드/방어력)의 상단 박스는 강조색 테두리로 표시 */
.basic-stats-grid .stat-item.has-stat-cap {
  border-color: #3b82f6;
  border-color: var(--accent-color, #3b82f6);
}

/* 상한을 이미 달성했으면 강조색 대신 "달성" 색(초록)으로 테두리 표시 */
.basic-stats-grid .stat-item.has-stat-cap-done {
  border-color: #4ade80;
}

/* 상한값/필요값이 각자 고정폭 그리드 열이라 행끼리 자연히 정렬됨 - 괄호 없이 값만 표시.
   상한값은 일반색, 필요값(진짜 신경 써야 할 수치)이 강조색 */
.stat-cap-info-cap {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: 'D2Coding', monospace, sans-serif;
  text-align: right;
}

.stat-cap-info-required {
  font-size: 11px;
  color: #3b82f6;
  color: var(--accent-color, #3b82f6);
  font-weight: 700;
  font-family: 'D2Coding', monospace, sans-serif;
  text-align: right;
}

/* 상한에 이미 도달한 경우(체크 표시) - 초록색으로 강조, "달성 ✓" 텍스트라 숫자보다 작게 */
.stat-cap-info-required-done {
  color: #4ade80;
  font-weight: 700;
  font-size: 9px;
}

/* 스탯 상세 모달 오버레이 */
.stat-detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  background-color: rgba(0, 0, 0, 0.4);
}

/* 스탯 상세 모달 */
.stat-detail-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1a1a1a;
  background-color: var(--panel-bg-color, #1a1a1a);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 100000;
}

/* 모달 헤더 */
.stat-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-shrink: 0;
}

.stat-detail-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  color: var(--text-color-primary, #fff);
}

.stat-detail-close {
  background: none;
  border: none;
  color: #fff;
  color: var(--text-color-primary, #fff);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-detail-close:hover {
  opacity: 0.7;
}

/* 모달 컨텐츠 - 배경 없이 컨테이너만 */
.stat-detail-content {
  padding: 0 10px 10px 10px;
  overflow-y: auto;
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 섹션 박스 (합연산, 곱연산, 최종값) - 개별 박스 */
.stat-section-box {
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

/* 최종값 박스 강조 */
.stat-final-box {
  background: #3b82f6;
  background: var(--accent-color, #3b82f6);
}

/* 스탯 상세 리스트 */
.stat-detail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 개별 스탯 아이템 */
.stat-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 18px;
}

/* 스탯 출처 */
.stat-item-source {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* 스탯 값 */
.stat-item-value {
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: 'D2Coding', monospace;
  font-size: 13px;
  font-weight: 600;
}

/* 빈 상태 */
.stat-detail-empty {
  text-align: center;
  padding: 24px 12px;
  color: #888;
  color: var(--text-color-light, #888);
  font-size: 12px;
}

/* 기본값 항목 */
.stat-base-item {
  padding-top: 6px;
}

.stat-base-item .stat-item-source {
  font-weight: 700;
}

/* 합연산 합계 항목 */
.stat-subtotal-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid var(--border-color-light, rgba(255, 255, 255, 0.1));
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 600;
}

.stat-subtotal-item .stat-item-source {
  color: #fff;
  color: var(--text-primary, #fff);
  font-weight: 700;
}

.stat-subtotal-item .stat-item-value {
  font-weight: 700;
}

/* 최종값 항목 */
.stat-final-item {
  font-weight: bold;
}

.stat-final-item .stat-item-source {
  font-weight: 700;
}

.stat-final-item .stat-item-value {
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* 계산값 항목 (압도적 모듈 적용 시) */
.stat-calculated-item {
  padding-bottom: 6px;
}

.stat-calculated-item .stat-item-source {
  font-weight: 700;
}

.stat-calculated-item .stat-item-value {
  text-decoration: line-through;
  opacity: 0.6;
}

/* 고정값 항목 (압도적 모듈) */
.stat-fixed-item {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 4px;
  padding-top: 6px;
}

.stat-fixed-item .stat-item-source {
  color: #fbbf24;
  font-size: 12px;
  font-weight: 600;
}

.stat-fixed-item .stat-item-value {
  color: #fbbf24;
  font-size: 14px;
  font-weight: bold;
}

.build-setting-switcher {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 5px;
}

/* 세팅 탭 영역 */
.setting-tabs {
  display: flex;
  gap: 2px;
}

/* wrapper 크기 고정 */
.setting-tabs .tfd-inner-box-wrapper {
  width: 100px;
  flex-shrink: 0;
}

/* 버튼 내부 데미지 표시 */
.setting-damage-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 9px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  white-space: nowrap;
  margin-top: 2px;
}

.setting-damage-info .damage-normal {
  color: rgba(255, 255, 255, 0.7);
}

.setting-damage-info .damage-separator {
  color: rgba(255, 255, 255, 0.3);
}

.setting-damage-info .damage-expected {
  color: var(--setting-color);
}

/* 개별 세팅 탭 버튼 */
.setting-tab {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background-color: transparent;
  border: none;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
  min-height: 40px;
}

/* 라벨 줄 (인디케이터 + 텍스트) */
.setting-tab > .setting-indicator,
.setting-tab > .setting-label {
  display: inline;
}

.setting-tab .setting-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* .tfd-inner-box의 기본 패딩 오버라이드 */
.setting-tab.tfd-inner-box {
  padding: 6px 6px;
}

.setting-tab:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* 활성화된 탭 */
.setting-tab.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-weight: 700;
}

/* 활성화된 탭의 점 색상 */
.setting-tab.active .setting-indicator {
  background-color: var(--setting-color);
  box-shadow: 0 0 8px var(--setting-color);
}

/* 데이터가 없는 탭 */
.setting-tab.empty {
  opacity: 0.6;
}

/* 비활성화된 탭 (인게임 데이터가 없을 때 세팅1~4) */
.setting-tab.disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  color: #999999 !important;
}

.setting-tab.disabled:hover {
  background-color: transparent !important;
}

.setting-tab.disabled .setting-indicator {
  background-color: #666666 !important;
  box-shadow: none !important;
}

/* 세팅 라벨 */
.setting-label {
  white-space: nowrap;
}

/* 데이터 존재 인디케이터 */
.setting-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--setting-color);
  box-shadow: 0 0 6px var(--setting-color);
}

/* 개별 세팅 통계 카드 */
.setting-stat-card {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.setting-stat-card.active {
  border-color: var(--setting-color);
  background-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 6px var(--setting-color);
}

/* 데미지 섹션 */
.stat-damage-section {
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-damage-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2px;
}

.stat-damage-values {
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.normal-damage {
  color: #ffffff;
}

.damage-separator {
  color: rgba(255, 255, 255, 0.3);
}

.expected-damage {
  color: var(--setting-color);
}

/* 치명타 섹션 */
.stat-crit-section {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.stat-crit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.crit-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.crit-multiplier {
  font-size: 16px;
  font-weight: bold;
  line-height: 32px;
}

/* 반응형 - 작은 화면 */
@media (max-width: 768px) {
  .build-setting-switcher {
    padding: 8px;
    gap: 8px;
  }

  .setting-tabs {
    gap: 6px;
  }

  .setting-tab {
    padding: 8px 12px;
    font-size: 13px;
  }

  .setting-indicator {
    width: 6px;
    height: 6px;
  }

  .settings-stats-container {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stat-damage-values {
    font-size: 12px;
  }

  .crit-multiplier {
    font-size: 16px;
  }
}

/* 조건부 보너스 바 - 하단 가로 배치 */
.conditional-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 데스크톱에서만 wrap 적용 */
@media (min-width: 641px) {
  .conditional-bar {
    flex-wrap: wrap;
  }
}

/* 개별 조건부 아이템 */
.conditional-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.conditional-bar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.conditional-bar-item.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.5);
}

/* 트리거 모듈 강조 */
.conditional-bar-item.trigger-module {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.conditional-bar-item.trigger-module:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.4);
}

.conditional-bar-item.trigger-module.active {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.5);
}

/* 트리거 연동 tier3 모듈 - 직선으로 연결 */
.conditional-bar-item.trigger-linked {
  position: relative;
  margin-left: 0;
  padding-left: 12px;
}

/* 트리거 모듈과 연동 모듈 사이의 연결선 (데스크톱) */
.conditional-bar-item.trigger-module + .conditional-bar-item.trigger-linked::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%);
}

.conditional-bar-item.trigger-module.active + .conditional-bar-item.trigger-linked::before {
  background: rgba(251, 191, 36, 0.8);
}

.conditional-bar-item.trigger-linked.active::before {
  background: rgba(251, 191, 36, 0.8);
}

/* 체크박스 */
.conditional-bar-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #fbbf24;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

/* 모듈 이미지 래퍼 */
.conditional-bar-image-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 모듈 이미지 */
.conditional-bar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 활성화 시 tier3 (궁극) 색상 테두리 */
.conditional-bar-image-wrapper.active {
  border-color: #C79121;
  border-color: var(--tier-3-color, #C79121);
}

/* 모듈 이름 */
.conditional-bar-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.conditional-bar-item.active .conditional-bar-name {
  color: rgba(255, 255, 255, 0.95);
}

/* 조건 (구분자 포함) */
.conditional-bar-condition {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  white-space: nowrap;
}

.conditional-bar-item.active .conditional-bar-condition {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* 튜닝 세포 sub-effect 체크박스 묶음 */
.conditional-bar-sub-checks {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.conditional-bar-sub-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: background 0.15s, color 0.15s;
}

.conditional-bar-sub-check .sub-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  font-size: 10px;
  line-height: 1;
  color: inherit;
}

.conditional-bar-sub-check .sub-check-stat {
  color: rgba(255, 255, 255, 0.55);
}

.conditional-bar-sub-check.active {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.conditional-bar-sub-check.active .sub-check-box {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.conditional-bar-sub-check.active .sub-check-stat {
  color: rgba(255, 255, 255, 0.75);
}

/* 효과 목록 */
.conditional-bar-effects {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* 데스크톱에서는 줄바꿈 숨김 */
@media (min-width: 641px) {
  .effect-break {
    display: none;
  }
}

.conditional-bar-effect .effect-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.conditional-bar-item.active .conditional-bar-effect {
  color: rgba(255, 255, 255, 0.75);
}

.conditional-bar-item.active .conditional-bar-effect .effect-value {
  color: rgba(255, 255, 255, 0.95);
}

/* 비활성 상태 */
.conditional-bar-item:not(.active) {
  opacity: 0.7;
}

.conditional-bar-item:not(.active):hover {
  opacity: 1;
}

/* 드롭다운 래퍼 */
.conditional-bar-dropdown-wrapper {
  position: relative;
  flex-shrink: 0;
}

/* 드롭다운 트리거 버튼 */
.conditional-bar-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.15s ease;
}

.conditional-bar-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.conditional-bar-dropdown-trigger.open {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
}

.dropdown-selected {
  font-weight: 500;
}

.dropdown-arrow {
  font-size: 8px;
  transition: transform 0.15s ease;
}

.conditional-bar-dropdown-trigger.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* 드롭다운 메뉴 - 위로 솟아나게 */
.conditional-bar-dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  min-width: 100px;
  background: rgba(30, 30, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
  overflow: hidden;
}

/* 드롭다운 옵션 */
.dropdown-option {
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.1s ease;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-option.selected {
  background: rgba(251, 191, 36, 0.2);
  color: rgba(251, 191, 36, 1);
  font-weight: 500;
}

/* 스택 가능한 모듈 래퍼 */
.conditional-bar-stack-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conditional-bar-condition-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.conditional-bar-item.active .conditional-bar-condition-text {
  color: rgba(255, 255, 255, 0.7);
}

/* 스택 입력 래퍼 */
.stack-input-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px;
}

/* 스택 버튼 */
.stack-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s ease;
}

.stack-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.stack-btn:active {
  background: rgba(251, 191, 36, 0.3);
}

/* 스택 입력 필드 */
.stack-input {
  width: 32px;
  height: 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 2px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.stack-input::-webkit-outer-spin-button,
.stack-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stack-input:focus {
  outline: 1px solid rgba(251, 191, 36, 0.5);
}

/* 스택 최대값 표시 */
.stack-max {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  padding-right: 4px;
}

/* 트리거 모듈 정보 */
.trigger-module-info {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

.trigger-module-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.trigger-icon {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.8));
}

.trigger-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(139, 92, 246, 0.9);
}

.trigger-module-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trigger-stat {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.trigger-stat strong {
  color: rgba(139, 92, 246, 0.95);
  font-weight: 700;
}

.trigger-stat-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
}

/* 슬라이더 래퍼 (순환식 증폭 장치 등) */
.conditional-bar-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 투 페이스 전용 래퍼 (확률 슬라이더 + 면 선택 + 효과 슬라이더) */
.conditional-bar-twoface-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.slider-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-input-wrapper input[type="range"] {
  width: 80px;
  height: 4px;
  accent-color: #fbbf24;
  margin: 0;
}

.slider-value {
  font-size: 12px;
  font-weight: 700;
  color: rgba(251, 191, 36, 1);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* 조건부 바 토글 버튼 (모바일 전용) */
.conditional-bar-toggle {
  display: none;
}

/* 조건부 바 래퍼 (모바일용) */
.conditional-bar-wrapper {
  display: contents;
  margin: 0;
  padding: 0;
}

/* 반응형 - 모바일에서는 2줄 레이아웃 */
@media (max-width: 640px) {
  /* 조건부 바 래퍼 - 일반 플로우에 배치 */
  .conditional-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin: 0 0 12px 0;
    padding: 0;
    overscroll-behavior: contain;
  }

  /* 조건부 바 토글 버튼 표시 */
  .conditional-bar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .conditional-bar-toggle:active {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
  }

  .conditional-bar-toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
  }

  .conditional-bar-toggle-icon.open {
    transform: rotate(180deg);
  }

  /* 조건부 바 컨테이너 - 좌우 스크롤로 변경 */
  .conditional-bar {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 8px 14px 8px;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    margin-bottom: 0;
    position: relative;
    touch-action: pan-x;
    isolation: isolate;
  }

  /* 스크롤바 스타일링 (모바일 - 가로 스크롤 하단 띄우기) */
  .conditional-bar::-webkit-scrollbar {
    height: 8px;
  }

  .conditional-bar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: 0 8px;
  }

  .conditional-bar::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.6);
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.4);
  }

  .conditional-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.8);
  }

  .conditional-bar.collapsed {
    display: none !important;
  }

  .conditional-bar-item {
    min-width: 85%;
    max-width: 85%;
    flex-wrap: wrap;
    padding: 10px 12px;
    row-gap: 8px;
    flex-shrink: 0;
  }

  /* 트리거 연동 모듈 모바일 - 옆에서 연결선 */
  .conditional-bar-item.trigger-linked::before {
    right: 100%;
    left: auto;
    top: 50%;
    bottom: auto;
    width: 8px;
    height: 2px;
    transform: translateY(-50%);
  }

  .conditional-bar-item.trigger-module.active + .conditional-bar-item.trigger-linked::before {
    background: rgba(251, 191, 36, 0.8);
  }

  .conditional-bar-item.trigger-linked.active::before {
    background: rgba(251, 191, 36, 0.8);
  }

  /* 1행: 체크박스 + 이미지 + 모듈명 */
  .conditional-bar-item input[type="checkbox"] {
    order: 1;
  }

  .conditional-bar-image-wrapper {
    order: 2;
  }

  .conditional-bar-name {
    order: 3;
    flex: 1 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
  }

  /* 2행으로 강제 줄바꿈 */
  .conditional-bar-item::after {
    content: '';
    order: 3;
    flex-basis: 100%;
    height: 0;
  }

  /* 2행: 조건/드롭다운/스택 + 효과 - 좌측 정렬 */
  .conditional-bar-condition {
    order: 4;
  }

  .conditional-bar-dropdown-wrapper {
    order: 4;
  }

  .conditional-bar-stack-wrapper {
    order: 4;
    flex-wrap: wrap;
    gap: 6px;
  }

  .conditional-bar-slider-wrapper {
    order: 4;
    flex-wrap: wrap;
    gap: 6px;
  }

  .slider-input-wrapper input[type="range"] {
    width: 100px;
  }

  .conditional-bar-effects {
    order: 5;
    font-size: 12px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
  }

  /* 효과 줄바꿈 - 모바일에서만 */
  .effect-break {
    display: inline;
  }

  /* 트리거 모듈 정보 */
  .trigger-module-info {
    order: 6;
  }

  .trigger-module-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .trigger-stat-separator {
    display: none;
  }

  /* 스택 조건 텍스트 줄바꿈 허용 */
  .conditional-bar-condition-text {
    white-space: normal;
    line-height: 1.3;
  }

  /* 드롭다운 메뉴가 모바일에서 잘리지 않도록 */
  .conditional-bar-dropdown-menu {
    min-width: 140px;
    max-width: calc(100vw - 80px);
  }
}

/* Computer Modern 웹폰트 (LaTeX 스타일) */

.math-variable {
  font-family: "Computer Modern Serif", serif;
  font-style: italic;
  color: #fff;
}

/* === 메인 컨테이너 === */
.math-page {
  min-height: 100vh;
  background: var(--background-color);
  color: var(--text-primary);
  padding: 20px;
  padding-top: 68px; /* 상단 헤더(48px) + 여백(20px) */
}

/* === 상단 헤더 바 === */
.math-top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.math-header-left {
  display: flex;
  align-items: center;
}

.math-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.math-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 언어 토글 스위치 */
.math-lang-toggle {
  position: relative;
  width: 72px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.math-lang-slider {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: rgba(200, 155, 60, 0.9);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.math-lang-slider.ko {
  left: 0;
}

.math-lang-slider.en {
  left: 50%;
}

.math-lang-label {
  position: relative;
  z-index: 1;
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s, font-weight 0.2s;
}

.math-lang-label.active {
  font-weight: 700;
  color: #fff;
}

/* 홈 버튼 */
.math-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: color 0.2s;
}

.math-home-btn:hover {
  color: #c89b3c;
}

.math-page-header {
  text-align: center;
  margin-bottom: 30px;
}

.math-page-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.math-page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

/* === 계산기 컨테이너 === */
.math-calculator {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 50px; /* 고정 헤더 높이만큼 여백 */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === 고정 헤더 (결과 표시) === */
.math-sticky-header {
  position: fixed;
  top: 48px; /* 상단 헤더 높이만큼 아래로 */
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 6px 20px;
  background: rgba(20, 20, 20, 0.98);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

/* 헤더 내부 컨테이너 - 컨텐츠 영역과 정렬 */
.math-sticky-header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 라벨 영역과 맞추기 위한 왼쪽 여백 */
.math-sticky-header-inner::before {
  content: '';
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
}

/* 컬럼 헤더들 - 테이블 컬럼과 정렬 */
.math-sticky-columns {
  flex: 1 1;
  display: flex;
  gap: 20px;
}

.math-sticky-column {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.math-sticky-column .column-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.math-sticky-column .column-value {
  font-size: 16px;
  font-weight: bold;
  color: #00c853;
  font-family: 'D2Coding', monospace;
}

.math-sticky-column .column-value.blue {
  color: #42A5F5;
}

/* 우측 하단 플로팅 드롭다운 */
.math-floating-dropdown {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 8px;
  background: rgba(20, 20, 20, 0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.math-floating-dropdown .custom-dropdown {
  min-width: 100px;
}

.math-floating-dropdown .dropdown-selected {
  white-space: nowrap;
  padding: 8px 12px;
}

.math-floating-dropdown .dropdown-label {
  white-space: nowrap;
}

.math-floating-dropdown .dropdown-options {
  min-height: 250px !important;
  max-height: 250px !important;
}

/* === 공통 설정 영역 (구버전 - 제거 예정) === */
.math-common-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.math-common-settings .math-section-compact {
  width: 100%;
}

.math-section-compact .math-section-title {
  font-size: 14px;
  margin-bottom: 12px;
}

.math-section-compact .math-input-row {
  gap: 8px;
}

.math-section-compact .math-label {
  min-width: 80px;
  font-size: 12px;
}

/* === 3단 구조 컨테이너 === */
.math-3col-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === 컬럼 헤더 === */
.math-column-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.15), rgba(0, 123, 255, 0.05));
  border-radius: 8px;
  border: 1px solid rgba(0, 123, 255, 0.3);
  text-align: center;
}

.math-column-header h2 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0;
}

.math-column-sum {
  font-size: 16px;
  font-weight: bold;
  color: #ffd700;
}

/* === 3단 구조 행 === */
.math-content-row {
  display: flex;
  gap: 16px;
}

.math-row-label {
  width: 100px;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-bg-color);
  border: 1px solid var(--panel-border-color);
  border-radius: 8px;
  padding: 16px 12px;
  writing-mode: horizontal-tb;
}

.math-row-label span {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-primary);
}

.math-row-content {
  flex: 1 1;
  display: flex;
  gap: 20px;
}

.math-row-content .math-section {
  flex: 1 1;
  border-radius: 8px;
}

/* 라벨 없는 행 (헤더용) */
.math-header-row {
  display: flex;
  gap: 20px;
  padding-left: 116px; /* 라벨 너비 100px + gap 16px */
}

.math-header-row .math-column-header {
  flex: 1 1;
}

.math-header-row {
  margin-bottom: 16px;
}

/* === 서브섹션 제목 (부가 옵션 등에서만 사용) === */
.math-subsection-title {
  display: none;
}

.math-reactor-options .math-module-subtitle {
  display: block;
}

/* === 플레이스홀더 섹션 === */
.math-section-placeholder {
  opacity: 0.6;
}

.math-placeholder-content {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 빈 섹션 (좌측에 해당 항목이 없을 때) */
.math-section-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  opacity: 0.5;
}

/* 전체 너비 섹션 (C + M 합침) */
.math-section.math-section-full {
  flex: 1 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.math-common-modules {
  display: flex;
  gap: 20px;
}

.math-common-group {
  flex: 1 1;
}

.math-reactor-common {
  flex: 1 1;
  width: 100%;
}

/* 세로 배치 row-content */
.math-row-content-vertical {
  flex-direction: column;
  gap: 12px;
}

/* 서브섹션 (일반, 타입, 속성 등) */
.math-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.math-subsection-title {
  display: block;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-primary);
  text-align: center;
}

.math-subsection-content {
  display: flex;
  gap: 20px;
}

.math-subsection-content .math-section {
  flex: 1 1;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .math-content-row {
    flex-direction: column;
  }

  .math-row-label {
    width: 100%;
    border-radius: 8px 8px 0 0;
    border-right: 1px solid var(--panel-border-color);
    border-bottom: none;
    padding: 10px;
  }

  .math-row-content {
    flex-direction: column;
  }

  .math-row-content .math-section {
    border-radius: 0;
  }

  .math-row-content .math-section:last-child {
    border-radius: 0 0 8px 8px;
  }

  .math-header-row {
    padding-left: 0;
    flex-direction: column;
  }
}

/* === 배율 분해 표시 === */
.math-multiplier-breakdown {
  margin-top: 12px;
  padding: 10px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 6px;
  font-size: 12px;
}

.math-multiplier-breakdown .breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text-secondary);
}

.math-multiplier-breakdown .breakdown-item span:last-child {
  color: #ffb74d;
  font-weight: bold;
}

/* === 섹션 === */
.math-section {
  background: var(--panel-bg-color);
  border: 1px solid var(--panel-border-color);
  border-radius: 8px;
  padding: 20px;
}

.math-section-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.math-section-sum {
  font-size: 13px;
  font-weight: normal;
  color: #ffd700;
}

/* === 속성/타입 드롭다운 === */
.math-dropdown-row {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .math-dropdown-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

.math-dropdown-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.math-dropdown-group label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.math-dropdown-group .custom-dropdown {
  min-width: 180px;
}

/* 속성/타입 섹션 얇게 */
.math-common-settings .math-section-compact:first-child {
  padding: 12px 20px;
}

/* 선각자 추가값 가로 정렬 */
.math-section-compact .math-input-group {
  flex-direction: row;
  align-items: center;
}

.math-section-compact .math-input-row {
  flex: 1 1;
  max-width: 300px;
}

/* === 모듈 그룹 === */
.math-module-group {
  margin-bottom: 16px;
}

.math-module-group:last-child {
  margin-bottom: 0;
}

.math-module-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: normal;
}

.math-module-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 4px;
  gap: 4px;
}

.math-module-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 10px;
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.math-module-btn:hover {
  border-color: var(--accent-color);
  border-color: var(--tier-color, var(--accent-color));
}

.math-module-btn.active {
  /* 배경색과 테두리는 inline style로 티어 색상 적용 */
}

.math-module-btn .module-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.math-module-btn .module-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: 1 1;
  justify-content: flex-start;
}

.math-module-btn .module-name {
  font-weight: 600;
}

.math-module-btn .module-type-tag {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.math-module-btn .module-value {
  color: #00c853;
  font-size: 13px;
  margin-left: auto;
  text-align: right;
  font-family: 'D2Coding', monospace;
}

.math-module-btn .module-value.blue {
  color: #42A5F5;
}

.math-module-btn .module-penalty {
  color: #ff9800;
  font-size: 10px;
  margin-top: 2px;
}

/* 같은 타입이 이미 활성화되어 있을 때 */
.math-module-btn.blocked {
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.1);
}

.math-module-btn.blocked:hover {
  opacity: 0.7;
  border-color: var(--primary-color);
}

/* === 현재 스탯 === */
.math-current-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .math-current-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-item.highlight {
  border-color: var(--accent-color);
  background: rgba(0, 123, 255, 0.1);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}

/* === 입력 그룹 === */
.math-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.math-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .math-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.math-label {
  flex: 1 1;
  min-width: 180px;
  font-size: 14px;
  color: var(--text-secondary);
}

.math-input {
  width: 100px;
  padding: 8px 12px;
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  text-align: right;
}

.math-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.math-select {
  padding: 8px 12px;
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.math-select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.math-select option {
  background: var(--panel-bg-color);
}

.math-unit {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 30px;
}

/* === 결과 섹션 === */
.math-result-section {
  background: var(--panel-bg-color);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.math-result-title {
  font-size: 20px;
  font-weight: bold;
  padding: 12px 20px;
  margin: 0;
  color: #fff;
  text-align: center;
  background: rgba(50, 50, 50, 0.9);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.math-result-section > *:not(.math-result-title) {
  padding: 0 20px;
}

.math-result-section > *:not(.math-result-title):first-of-type {
  margin-top: 16px;
}

.math-result-section > *:last-child {
  padding-bottom: 20px;
}

/* === 비교 테이블 === */
.math-comparison-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .math-comparison-table {
    grid-template-columns: 1fr;
  }
}

.math-comparison-card {
  background: var(--input-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.math-comparison-card.winner {
  background: rgba(0, 200, 100, 0.1);
  border-color: #00c853;
}

.math-card-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.math-card-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
}

.math-card-value.winner {
  color: #00c853;
}

.math-card-subtext {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.math-winner-badge {
  display: inline-block;
  background: #00c853;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  margin-top: 8px;
}

/* === 공식 박스 === */
.math-formula-box {
  background: var(--input-background);
  border-radius: 8px;
  padding: 16px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.math-formula-box .highlight {
  color: var(--accent-color);
}

.math-formula-box .value {
  color: #ffd700;
}

.math-formula-box .result {
  color: #00c853;
}

/* === 구분선 === */
.math-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

/* === 분기점 정보 === */
.math-breakpoint-info {
  background: rgba(255, 200, 0, 0.05);
  border: 1px solid rgba(255, 200, 0, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.math-breakpoint-info .title {
  font-size: 14px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 8px;
}

.math-breakpoint-info .content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.math-breakpoint-info .content p {
  margin: 4px 0;
}

/* === 뒤로가기 링크 === */
.math-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.math-back-link:hover {
  text-decoration: underline;
}

/* === 반응로 섹션 === */
.math-reactor-section {
  margin-top: 0;
}

.math-reactor-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.math-reactor-image .reactor-image,
.math-reactor-image .reactor-placeholder {
  width: 95px;
  height: 95px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.math-reactor-image .reactor-placeholder {
  background: var(--input-background);
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.math-reactor-image .reactor-name {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.math-reactor-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 140px;
}

.reactor-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--input-background);
  border-radius: 4px;
  font-size: 12px;
}

.reactor-stat-label {
  color: #ffffff;
  font-size: 14px;
}

.reactor-stat-value {
  color: #00c853;
  font-weight: bold;
  font-family: 'D2Coding', monospace;
}

.reactor-stat-value.blue {
  color: #42A5F5;
  font-size: 14px;
}

/* === 외장부품 섹션 === */
.math-external-content {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.math-external-dropdowns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.math-external-dropdown {
  width: 200px;
}

.math-set-effects-wrapper {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.math-set-effects-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
}

.math-set-effect-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.set-effect-count {
  background: rgba(66, 165, 245, 0.2);
  color: #42A5F5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.set-effect-text {
  color: var(--text-primary);
  font-size: 13px;
}

.math-reactor-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.math-reactor-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.math-reactor-option-row .reactor-option-select {
  width: 200px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.reactor-option-value {
  min-width: 60px;
  text-align: right;
  color: #42A5F5;
  font-weight: bold;
  font-family: 'D2Coding', monospace;
  font-size: 13px;
}

.reactor-option-select {
  width: 100%;
  margin-bottom: 8px;
}

.reactor-option-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reactor-option-slider input[type="range"] {
  flex: 1 1;
  height: 6px;
  background: rgba(80, 80, 80, 0.5);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.reactor-option-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
}

.reactor-option-slider .option-value {
  min-width: 60px;
  text-align: right;
  font-size: 13px;
  color: #00c853;
  font-weight: bold;
}

/* === 총합 breakdown 개선 === */
.breakdown-total {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.breakdown-total span:last-child {
  color: #00c853;
  font-size: 14px;
}

@media (max-width: 600px) {
  .math-reactor-content {
    flex-direction: column;
  }

  .math-reactor-image {
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
  }

  .math-reactor-stats {
    width: 100%;
  }

  .math-reactor-options {
    width: 100%;
  }
}

/* === 장착된 모듈 섹션 (공통창) === */
.math-equipped-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.math-equipped-section .math-subsection-title {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 0;
}

.math-equipped-modules {
  padding: 12px;
}

.math-equipped-grid {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  grid-gap: 4px;
  gap: 4px;
  justify-content: center;
}

.math-equipped-slot {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.math-equipped-slot.empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.math-equipped-slot.filled {
  cursor: pointer;
  border-color: rgba(0, 123, 255, 0.5);
  background: rgba(0, 123, 255, 0.1);
}

.math-equipped-slot.filled:hover {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.2);
  transform: scale(0.95);
}

.math-equipped-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.math-equipped-slot.transcendence {
  border-color: #c62828;
  border-color: var(--tier-4-color, #c62828);
  background: rgba(198, 40, 40, 0.1);
}

.math-equipped-slot.sub {
  border-color: #C79121;
  border-color: var(--tier-3-color, #C79121);
  background: rgba(199, 145, 33, 0.2);
}

.math-equipped-slot .slot-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
}

/* === 선각자 입력 섹션 === */
.math-pioneer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.math-pioneer-section .math-result-title {
  font-size: 16px;
  padding: 10px 40px;
  background: rgba(40, 40, 40, 0.9);
  border-bottom: none;
  border-radius: 6px;
  width: auto;
}

.math-pioneer-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.math-pioneer-label {
  font-size: 14px;
  color: #fff;
  color: var(--text-primary, #fff);
}

/* 선각자 인포그래픽 전체 박스 (원본 PioneerPage 스타일) */
.math-pioneer-infographic-wrapper {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.math-pioneer-infographic-heading {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 16px 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* 비교 카드 제목 내 P 값 서브라인 */
.math-card-p-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 1px;
  line-height: 1.1;
}

/* 비교 카드 위의 선각자 모듈 row (3개 박스가 개별적으로 배치) */
.math-pioneer-images-row {
  display: flex;
  gap: 0;
  padding: 0 8px;
  margin-bottom: 10px;
}

.math-pioneer-image-cell {
  flex: 1 1;
  display: flex;
  padding: 0 4px;
}

.math-pioneer-image-box {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  min-width: 0;
}

.math-pioneer-image-box-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.math-pioneer-image-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border: 2px solid #000;
  border-radius: 3px;
  background: color-mix(in srgb, #c62828 55%, #2a2a2a);
  background: color-mix(in srgb, var(--tier-4-color, #c62828) 55%, #2a2a2a);
  flex-shrink: 0;
}

.math-pioneer-image-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.math-pioneer-image-box-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.math-pioneer-effect-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 3px;
}

.math-pioneer-effect-row.placeholder .math-pioneer-effect-label,
.math-pioneer-effect-row.placeholder .math-pioneer-effect-value {
  color: rgba(255, 255, 255, 0.35);
}

.effect-marker {
  display: inline-block;
  margin-right: 6px;
  font-size: 10px;
  vertical-align: middle;
}

.effect-marker.advantage {
  color: #4caf50;
}

.effect-marker.penalty {
  color: #e53935;
}

.math-pioneer-effect-label {
  font-size: 13px;
  color: #ffffff;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.math-pioneer-effect-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'EliceDigitalBaeum-Bd', sans-serif;
  flex-shrink: 0;
}

/* 선각자 모듈 타입 선택 - 인포그래픽 STEP 2 스타일 */
.math-pioneer-infographic-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.math-pioneer-infographic-operator {
  font-size: 24px;
  color: rgba(255, 200, 100, 0.7);
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-weight: 700;
  align-self: center;
  padding: 0 4px;
}

.math-pioneer-infographic-operator.equal {
  color: rgba(255, 255, 255, 0.6);
}

/* STEP 3 - 계승자 드롭다운 */
.math-pioneer-sync-select-wrap {
  position: relative;
  width: 100%;
  margin-top: 6px;
}

.math-pioneer-sync-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 5px 26px 5px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: "'EliceDigitalBaeum-Rg', sans-serif";
}

.math-pioneer-sync-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.math-pioneer-sync-select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  pointer-events: none;
}

/* 패치 후 행 강조 색 (item-value) */
.math-pioneer-infographic-item.patch .item-value {
  color: rgba(255, 220, 160, 0.6);
}

.math-pioneer-infographic-item.patch.selected .item-value {
  color: rgba(255, 220, 160, 1);
}

.math-pioneer-infographic-card.result {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.math-pioneer-result-values {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-size: 11px;
}

.math-pioneer-result-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.math-pioneer-result-row .result-label {
  font-family: "'EliceDigitalBaeum-Rg', sans-serif";
  font-weight: 600;
}

.math-pioneer-result-row .result-value {
  color: #ffffff;
  font-weight: 700;
}

.math-pioneer-infographic-card {
  min-width: 260px;
  flex: 1 1;
  max-width: 360px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Roll 슬라이더 (카드 내부) */
.math-pioneer-slider-wrap {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.math-pioneer-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.math-pioneer-slider-labels .endpoint {
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-family: "'EliceDigitalBaeum-Rg', sans-serif";
}

.math-pioneer-slider-labels .endpoint.rare {
  background: #26A69A;
  color: #fff;
}

.math-pioneer-slider-labels .endpoint.transcendent {
  background: #C62828;
  color: #fff;
}

.math-pioneer-infographic-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.math-pioneer-infographic-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.3;
}

.math-pioneer-infographic-list {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-size: 11px;
}

.math-pioneer-infographic-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.math-pioneer-infographic-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.math-pioneer-infographic-item.selected {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.math-pioneer-infographic-item .item-label {
  color: rgba(255, 255, 255, 0.6);
}

.math-pioneer-infographic-item.selected .item-label {
  color: #ffffff;
}

.math-pioneer-infographic-item .item-value {
  color: rgba(255, 220, 160, 0.55);
  font-weight: 700;
}

.math-pioneer-infographic-item.selected .item-value {
  color: rgba(255, 220, 160, 1);
}

/* 그라디언트 트랙을 가진 래퍼 */
.math-pioneer-slider-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: linear-gradient(
    to right,
    var(--tier-1-color) 0%, var(--tier-1-color) 40%,
    var(--tier-2-color) 40%, var(--tier-2-color) 80%,
    var(--tier-3-color) 80%, var(--tier-3-color) 95%,
    var(--tier-4-color) 95%, var(--tier-4-color) 100%
  );
  border: none;
  box-sizing: border-box;
  overflow: hidden;
}

/* 커스텀 thumb (input과 분리) */
.math-pioneer-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 22px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 2;
}

/* 투명 range input — 클릭/드래그 핸들링만 담당, 시각적 요소는 전부 숨김 */
.math-pioneer-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  padding: 0;
  z-index: 3;
}

/* 티어 범례 */
.math-pioneer-slider-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-family: "'EliceDigitalBaeum-Rg', sans-serif";
}

.math-pioneer-slider-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.math-pioneer-slider-legend .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.math-pioneer-slider-value {
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-weight: bold;
  font-size: 12px;
  color: #fff;
}

/* 3요소 min/max 표 */
.math-pioneer-stat-table {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-size: 11px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.math-pioneer-stat-header {
  display: grid;
  grid-template-columns: 1fr 60px 60px;
  grid-gap: 6px;
  gap: 6px;
  padding: 2px 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.math-pioneer-stat-header span:nth-child(2),
.math-pioneer-stat-header span:nth-child(3) {
  text-align: right;
}

.math-pioneer-stat-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px;
  grid-gap: 6px;
  gap: 6px;
  padding: 3px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.math-pioneer-stat-row .stat-label {
  font-family: "'EliceDigitalBaeum-Rg', sans-serif";
  font-weight: 600;
  font-size: 11px;
}

.math-pioneer-stat-row .stat-min {
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
}

.math-pioneer-stat-row .stat-max {
  color: #ffffff;
  font-weight: 700;
  text-align: right;
}

/* 화살표 연결 */
.math-pioneer-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 8px 0;
}

.math-pioneer-arrows .arrow-line {
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.4);
}

.math-pioneer-arrows .arrow-branches {
  display: flex;
  width: 100%;
  position: relative;
  height: 24px;
}

.math-pioneer-arrows .arrow-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16.67%;
  right: 16.67%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
}

.math-pioneer-arrows .arrow-branch {
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.4);
  position: absolute;
  top: 0;
}

.math-pioneer-arrows .arrow-branch.left {
  left: 16.67%;
  transform: translateX(-50%);
}

.math-pioneer-arrows .arrow-branch.center {
  left: 50%;
  transform: translateX(-50%);
}

.math-pioneer-arrows .arrow-branch.right {
  right: 16.67%;
  transform: translateX(50%);
}

.math-pioneer-arrows .arrow-branch::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.4);
}

.math-pioneer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* 기존 legacy 규칙 제거됨 - 새 규칙은 1375줄 참고 */

.math-pioneer-type-label {
  padding: 4px 10px;
  background: linear-gradient(135deg, #ffffff, #e0e0e0);
  color: #333333;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.math-pioneer-stat-label {
  flex: 1 1;
  font-size: 13px;
  color: #ffffff;
  color: var(--text-color, #ffffff);
  font-weight: 500;
}

.math-pioneer-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.math-pioneer-prefix {
  color: #a0a0a0;
  color: var(--text-color-light, #a0a0a0);
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  font-weight: 600;
}

.math-pioneer-input {
  flex: 1 1;
  max-width: 120px;
  background: rgba(30, 30, 30, 0.8);
  background: var(--card-bg-color, rgba(30, 30, 30, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  border-radius: 4px;
  padding: 8px 12px;
  color: #ffffff;
  color: var(--text-color, #ffffff);
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
  text-align: right;
  transition: all 0.2s ease;
}

.math-pioneer-input:hover {
  border-color: #c62828;
  border-color: var(--tier-4-color, #c62828);
}

.math-pioneer-input:focus {
  outline: none;
  border-color: #c62828;
  border-color: var(--tier-4-color, #c62828);
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.1);
}

.math-pioneer-input::-webkit-inner-spin-button,
.math-pioneer-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.math-pioneer-input[type=number] {
  -moz-appearance: textfield;
}

.math-pioneer-unit {
  color: #a0a0a0;
  color: var(--text-color-light, #a0a0a0);
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', 'Pretendard', monospace;
}

/* === 무기 섹션 스타일 === */
.math-weapon-content {
  width: 100%;
}

/* 가로 레이아웃 */
.math-weapon-list-horizontal {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.math-weapon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 160px;
}

.math-weapon-card:hover:not(.disabled) {
  background: rgba(50, 50, 50, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.math-weapon-card.active {
  background: rgba(66, 165, 245, 0.15);
  border-color: #42a5f5;
}

.math-weapon-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.math-weapon-card .weapon-card-image {
  width: 140px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 6px;
}

.math-weapon-card .weapon-card-image-placeholder {
  width: 140px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(50, 50, 50, 0.5);
  border-radius: 4px;
  font-size: 20px;
  color: #888;
  color: var(--text-secondary, #888);
  margin-bottom: 6px;
}

.math-weapon-card .weapon-card-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.math-weapon-card .weapon-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
  text-align: center;
}

.math-weapon-card .weapon-card-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.math-weapon-card .weapon-type-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.math-weapon-card .weapon-attr-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.math-weapon-card .weapon-card-value {
  font-size: 13px;
  font-weight: 600;
  font-family: 'D2Coding', monospace;
  color: #42a5f5;
}

/* === 결과 섹션 리뉴얼 === */
.math-user-inputs {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.math-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.math-input-label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.math-input-hint {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
}

/* 계산 섹션 */
.math-calc-section {
  margin-bottom: 16px;
}

.math-calc-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.math-calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
}

.math-calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-family: 'D2Coding', 'Consolas', monospace;
}

.math-calc-row .calc-label {
  min-width: 150px;
  color: #aaa;
  color: var(--text-secondary, #aaa);
}

.math-calc-row .calc-value {
  min-width: 80px;
  text-align: right;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-calc-row .calc-detail {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
}

.math-calc-row.total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.math-calc-row.total .calc-label {
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-calc-row .calc-value.highlight {
  font-weight: 700;
  font-size: 15px;
  color: #4caf50;
}

.math-calc-row .calc-value.highlight.blue {
  color: #42a5f5;
}

/* 데미지 공식 섹션 */
.math-formula-section {
  position: relative;
  margin: 16px 0;
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  grid-row-gap: 4px;
  row-gap: 4px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-formula-section .formula-row {
  display: contents;
}

.math-formula-section .formula-left {
  text-align: right;
  padding-right: 8px;
}

.math-formula-section .formula-eq {
  text-align: center;
  padding: 0 4px;
}

.math-formula-section .formula-right {
  text-align: left;
  padding-left: 8px;
}

.math-formula-section .formula-note {
  position: absolute;
  right: 20px;
  bottom: 0;
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
  font-weight: 400;
}

/* 데미지 결과 박스 */
.math-damage-result {
  margin: 16px 0;
}

.math-damage-result .math-formula-box {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.math-damage-result .formula {
  font-size: 14px;
  color: #aaa;
  color: var(--text-secondary, #aaa);
  margin-bottom: 4px;
}

.math-damage-result .formula-note {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
  margin-bottom: 8px;
}

.math-damage-result .current {
  font-size: 15px;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-damage-result .current-box,
.math-current-damage .current-box {
  display: inline-block;
  background: #000;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-family: 'D2Coding', 'Consolas', monospace;
}

.math-variable.yellow {
  color: #ffc107;
}

/* 현재 데미지 값 */
.math-current-damage {
  margin: 16px 0;
  text-align: center;
}

.math-current-damage .current {
  font-size: 15px;
  color: #fff;
  color: var(--text-primary, #fff);
}

/* 선각자 비교 섹션 */
.math-pioneer-comparison {
  margin-top: 0;
  width: 100%;
}

.math-pioneer-comparison .math-comparison-table {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0 8px;
}

.math-pioneer-comparison .math-comparison-card {
  flex: 1 1;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0;
  margin: 0 8px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
}

.math-comparison-card.winner {
  background: rgba(76, 175, 80, 0.15);
  border-color: #4caf50;
}

.math-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
}

.math-pioneer-comparison .math-card-title {
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  margin: 0;
  border-bottom: none;
  line-height: 1.2;
}

.math-pioneer-comparison .math-comparison-card > *:not(.math-card-title) {
  padding: 8px;
}


.math-pioneer-comparison .math-card-formula {
  font-size: 15px;
  margin-top: 0;
  padding: 10px 12px;
}

.math-pioneer-comparison .math-card-detail {
  padding: 6px 12px;
}

.math-pioneer-comparison .math-card-linear {
  margin: 12px 0 0 0;
  padding: 12px 16px;
}

.math-var-bold {
  font-weight: 700;
}

.math-card-detail {
  font-size: 13px;
  color: #888;
  color: var(--text-secondary, #888);
  font-family: 'D2Coding', 'Consolas', monospace;
  margin-bottom: 8px;
}

.math-card-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'D2Coding', 'Consolas', monospace;
  color: #fff;
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
}

.math-card-value.winner {
  color: #4caf50;
}

.math-card-gain {
  font-size: 12px;
  color: #42a5f5;
  font-family: 'D2Coding', 'Consolas', monospace;
}

.math-card-formula {
  font-size: 12px;
  color: #888;
  color: var(--text-secondary, #888);
  margin-bottom: 8px;
}

.math-card-linear {
  font-size: 16px;
  font-weight: 600;
  font-family: 'D2Coding', 'Consolas', monospace;
  color: #fff;
  color: var(--text-primary, #fff);
  margin: 12px 0 0 0;
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.math-card-slope {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
  font-family: 'D2Coding', 'Consolas', monospace;
}

/* 교점 분석 섹션 */
.math-crossover-analysis {
  margin-top: 16px;
  padding: 12px;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.crossover-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.crossover-item:last-child {
  margin-bottom: 0;
}

.crossover-label {
  color: #888;
  color: var(--text-secondary, #888);
}

.crossover-value {
  font-weight: 600;
  font-family: 'D2Coding', 'Consolas', monospace;
  color: #ff5722;
}

.crossover-note {
  font-size: 11px;
  color: #888;
  color: var(--text-secondary, #888);
}

.crossover-item.no-crossover {
  color: #888;
  color: var(--text-secondary, #888);
  font-style: italic;
}

.math-winner-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #4caf50;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.math-conclusion {
  text-align: center;
  font-size: 14px;
  color: #fff;
  color: var(--text-primary, #fff);
  padding: 12px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.math-conclusion strong {
  color: #4caf50;
}

.math-conclusion .gain-highlight {
  margin-left: 8px;
  color: #42a5f5;
  font-family: 'D2Coding', 'Consolas', monospace;
}

/* 요약 그룹 (두 덩어리) */
.math-summary-groups {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.math-summary-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.math-summary-group.coef-group {
  border-color: rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.05);
}

.math-summary-group.coef-group .math-summary-item {
  border: 2px solid #fff;
}

.math-summary-group.mult-group {
  border-color: rgba(66, 165, 245, 0.3);
  background: rgba(66, 165, 245, 0.05);
}

.math-summary-group .group-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.math-summary-mult-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.math-multiply-sign {
  font-size: 24px;
  font-weight: 700;
  color: #888;
  color: var(--text-secondary, #888);
}

.mult-sign {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

/* 요약 행 (기존 호환성) */
.math-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.math-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  min-width: 70px;
  height: 70px;
  justify-content: center;
}

.math-summary-item .summary-label {
  font-size: 14px;
  color: #888;
  color: var(--text-secondary, #888);
}

.math-summary-item .summary-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'D2Coding', 'Consolas', monospace;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-summary-item .summary-value.blue {
  color: #42a5f5;
}

.math-summary-item .summary-value.green {
  color: #4caf50;
  font-size: 20px;
}

/* mult-group의 subscript 스타일 */
.math-summary-mult-items .summary-label sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
}

.math-summary-item .summary-value.highlight {
  color: #ffc107;
}

.math-summary-item.m-total {
  border: 2px solid #fff;
}

.math-summary-item.m-total .summary-label {
  color: #fff;
  font-weight: 700;
}

/* 차트 섹션 */
.math-chart-section {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.math-chart-description {
  font-size: 12px;
  color: #888;
  color: var(--text-secondary, #888);
  margin-bottom: 12px;
}

.math-chart-container {
  flex: 1 1;
  min-width: 0;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
}

.math-region-table {
  flex: 0 0 500px;
  max-width: 500px;
  padding: 10px;
  background: rgba(30, 30, 30, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.math-region-table .region-table-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
}

.math-region-table table {
  width: 100%;
  border-collapse: collapse;
}

.math-region-table th,
.math-region-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.math-region-table th {
  font-size: 10px;
  font-weight: 600;
  color: #888;
  color: var(--text-secondary, #888);
  background: rgba(255, 255, 255, 0.05);
}

.math-region-table td {
  font-size: 11px;
  color: #fff;
  color: var(--text-primary, #fff);
}

.math-region-table tbody tr:last-child td {
  border-bottom: none;
}

.math-region-table .region-rank {
  font-weight: 600;
  font-size: 11px;
}

.math-region-table th:first-child,
.math-region-table td:first-child {
  min-width: 70px;
}

.math-region-table th:not(:first-child),
.math-region-table td:not(:first-child) {
  text-align: center;
  min-width: auto;
}

/* 비교 카드 수식 */
.math-card-formula {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'D2Coding', 'Consolas', monospace;
  margin-bottom: 6px;
  padding: 4px 8px;
}

.math-card-formula sub {
  font-size: 9px;
}

/* 교점 정보 */
.math-intersections-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.math-intersections-info .intersection-label {
  color: #ff5722;
  font-weight: 600;
}

.math-intersections-info .intersection-value {
  color: #ffab91;
  font-family: 'D2Coding', 'Consolas', monospace;
}

.math-intersections-info.no-intersection {
  background: rgba(100, 100, 100, 0.1);
  border-color: rgba(100, 100, 100, 0.3);
  color: #888;
  color: var(--text-secondary, #888);
}

/* === 좌측 하단 고정 버튼 === */
.math-fixed-buttons {
  position: fixed;
  left: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.math-fixed-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.math-fixed-btn.home-btn {
  background: #424242;
  color: #fff;
}

.math-fixed-btn.home-btn:hover {
  background: #616161;
  transform: scale(1.05);
}

.math-fixed-btn.lang-btn {
  background: #424242;
  color: #fff;
  width: auto;
  padding: 0 12px;
  border-radius: 22px;
  gap: 2px;
}

.math-fixed-btn.lang-btn:hover {
  background: #616161;
  transform: scale(1.05);
}

.math-fixed-btn.lang-btn .lang-active {
  font-size: 18px;
  font-weight: 700;
  color: #64b5f6;
}

.math-fixed-btn.lang-btn .lang-inactive {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

.math-fixed-btn.lang-btn .lang-separator {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 1px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  .math-top-header {
    padding: 0 12px;
  }

  .math-header-title {
    font-size: 14px;
  }

  .math-lang-toggle {
    width: 64px;
    height: 26px;
  }

  .math-lang-label {
    font-size: 10px;
  }

  .math-home-btn {
    width: 32px;
    height: 32px;
  }

  .math-home-btn svg {
    width: 18px;
    height: 18px;
  }
}


/* 언어 변경 로딩 오버레이 */
.math-lang-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  animation: math-lang-fadeIn 0.2s ease-out;
}

.math-lang-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.math-lang-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #64b5f6;
  border-radius: 50%;
  animation: math-lang-spin 0.8s linear infinite;
}

.math-lang-loading-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

@keyframes math-lang-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes math-lang-spin {
  to {
    transform: rotate(360deg);
  }
}

.pwa-install-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: 90%;
  max-width: 400px;
  animation: slideUp 0.3s ease-out;
}

@media (min-width: 768px) {
  .pwa-install-prompt {
    bottom: 20px;
    right: 20px;
    left: auto;
    transform: none;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (min-width: 768px) {
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.pwa-install-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
}

.pwa-install-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 데스크톱에서는 가로 배치 */
@media (min-width: 768px) {
  .pwa-install-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pwa-install-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-install-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
}

.pwa-install-text h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.pwa-install-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.pwa-install-action {
  flex-shrink: 0;
  width: 100%;
}

/* 데스크톱에서는 우측 정렬 */
@media (min-width: 768px) {
  .pwa-install-action {
    width: auto;
    margin-left: auto;
  }
}

.pwa-install-instructions-inline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  white-space: normal;
  text-align: center;
}

/* 데스크톱에서는 한 줄로 */
@media (min-width: 768px) {
  .pwa-install-instructions-inline {
    white-space: nowrap;
    text-align: left;
  }
}

.pwa-install-button-inline {
  padding: 8px 20px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
  white-space: nowrap;
}

.pwa-install-button-inline:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.pwa-install-button-inline:active {
  transform: translateY(0);
}

.pwa-install-instructions {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 8px;
}

.pwa-install-instructions p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.pwa-install-instructions strong {
  color: #fbbf24;
  font-weight: 600;
}

.ios-share-icon {
  display: inline-block;
  font-size: 18px;
  vertical-align: middle;
  color: #007aff;
  font-weight: bold;
}

.pwa-install-button {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  border-radius: 8px;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.pwa-install-button:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.pwa-install-button:active {
  transform: translateY(0);
}

.pwa-dismiss-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pwa-dismiss-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

