/* ============================================
   Minecraft サーバー管理 - 専用スタイル
   ============================================ */

/* --- サーバー一覧（幅を抑えた洗練レイアウト） --- */
.mc-server-shell {
  max-width: none;
  margin: 0;
  width: 100%;
}

.mc-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
  width: 100%;
}

.mc-server-card {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 14px;
  padding: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.mc-server-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0.35;
  transition: opacity 0.25s ease;
}

.mc-server-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 40px rgba(0, 0, 0, 0.25);
}

.mc-server-card:hover::before {
  opacity: 0.95;
}

.mc-server-card--live::before {
  opacity: 1;
  background: linear-gradient(180deg, var(--accent-green), var(--accent-cyan));
}

.mc-server-card--crashed::before {
  opacity: 1;
  background: linear-gradient(180deg, var(--accent-red), var(--accent-orange));
}

.mc-server-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px 16px;
  border-bottom: none;
}

.mc-server-card-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.mc-server-card-titles {
  flex: 1;
  min-width: 0;
}

.mc-server-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(0, 212, 255, 0.06);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-server-card-icon .material-symbols-outlined {
  font-size: 22px;
  color: var(--accent-cyan);
}

.mc-server-card-icon.mc-type-paper {
  background: rgba(0, 212, 255, 0.1);
}

.mc-server-card-icon.mc-type-paper .material-symbols-outlined {
  color: var(--accent-cyan);
}
.mc-server-card-icon.mc-type-paper { color: var(--accent-cyan); }

.mc-server-card-icon.mc-type-purpur {
  background: rgba(196, 114, 255, 0.12);
}

.mc-server-card-icon.mc-type-purpur .material-symbols-outlined {
  color: #c98cff;
}
.mc-server-card-icon.mc-type-purpur { color: #c98cff; }

.mc-server-card-icon.mc-type-vanilla {
  background: rgba(86, 212, 138, 0.12);
}

.mc-server-card-icon.mc-type-vanilla .material-symbols-outlined {
  color: var(--accent-green);
}
.mc-server-card-icon.mc-type-vanilla { color: var(--accent-green); }

.mc-server-card-icon.mc-type-spigot {
  background: rgba(255, 179, 71, 0.12);
}

.mc-server-card-icon.mc-type-spigot .material-symbols-outlined {
  color: #ffb347;
}
.mc-server-card-icon.mc-type-spigot { color: #ffb347; }

.mc-server-card-icon.mc-type-fabric {
  background: rgba(245, 125, 64, 0.12);
}

.mc-server-card-icon.mc-type-fabric { color: #f57d40; }

.mc-server-card-icon.mc-type-forge {
  background: rgba(232, 92, 76, 0.14);
}

.mc-server-card-icon.mc-type-forge { color: #e85c4c; }

.mc-server-card-icon.mc-type-arclight {
  background: rgba(180, 126, 255, 0.14);
}

.mc-server-card-icon.mc-type-arclight { color: #b47eff; }

.mc-server-card-icon.mc-type-geyser {
  background: rgba(53, 214, 232, 0.12);
}

.mc-server-card-icon.mc-type-geyser { color: #35d6e8; }

.mc-server-card-icon.mc-type-velocity {
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
}

.mc-server-card-icon.mc-type-bungee {
  background: rgba(255, 180, 84, 0.12);
  color: #ffb454;
}

.mc-folder-group {
  margin-bottom: 20px;
}

.mc-instance-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mc-folder-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 4px;
}

.mc-folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.mc-folder-chip .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent-cyan);
}

.mc-folder-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.mc-folder-chip--active {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.12);
}

.mc-folder-chip--droppable {
  outline: 1px dashed rgba(0, 212, 255, 0.35);
  outline-offset: 2px;
}

.mc-folder-chip--drop-target {
  border-color: rgba(0, 212, 255, 0.75);
  background: rgba(0, 212, 255, 0.22);
  transform: scale(1.03);
}

.mc-folder-chip-count {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 999px;
}

.mc-folder-chip--add {
  border-style: dashed;
  color: var(--text-muted);
}

.mc-folder-drawer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mc-folder-drawer.is-open {
  max-height: 9999px;
  opacity: 1;
  transform: translateY(0);
  overflow: visible;
}

.mc-folder-drawer-inner {
  padding: 12px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mc-folder-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.mc-folder-drawer-title {
  font-weight: 700;
  font-size: 14px;
}

.mc-folder-drawer-actions {
  display: flex;
  gap: 4px;
}

.mc-folder-drawer-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
  padding: 4px 4px 12px;
  overflow: visible;
}

.mc-folder-drawer-track .mc-server-card {
  min-width: 0;
}

.mc-folder-drawer-track .mc-server-card-row {
  flex-wrap: wrap;
}

.mc-server-grid--drop-target {
  outline: 2px dashed rgba(0, 212, 255, 0.45);
  outline-offset: 4px;
  border-radius: 14px;
}

.mc-server-card--dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.mc-folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mc-folder-header--plain {
  cursor: default;
}

.mc-folder-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
}

.mc-folder-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.mc-folder-icon {
  color: var(--accent-cyan);
  font-size: 20px;
}

.mc-folder-name {
  font-weight: 700;
  font-size: 14px;
}

.mc-folder-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.mc-folder-count {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.mc-folder-actions {
  display: flex;
  gap: 4px;
}

.mc-folder-grid {
  padding-left: 8px;
}

.mc-folder-group--ungrouped .mc-folder-header {
  background: transparent;
  border-style: dashed;
}

.mc-server-card-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mc-detail-soft-icon.mc-type-paper {
  color: var(--accent-cyan);
}

.mc-detail-soft-icon.mc-type-purpur {
  color: #c98cff;
}

.mc-detail-soft-icon.mc-type-vanilla {
  color: var(--accent-green);
}

.mc-detail-soft-icon.mc-type-spigot {
  color: #ffb347;
}

.mc-detail-soft-icon.mc-type-fabric {
  color: #f57d40;
}

.mc-detail-soft-icon.mc-type-forge {
  color: #e85c4c;
}

.mc-detail-soft-icon.mc-type-arclight {
  color: #b47eff;
}

.mc-detail-soft-icon.mc-type-geyser {
  color: #35d6e8;
}

.mc-detail-soft-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mc-server-card-name {
  display: block;
  font-size: 15px;
  font-weight: 750;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mc-server-card-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.9;
}

/* 入りきらないテキストの自動スクロール */
.mc-text-marquee {
  display: block;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.mc-text-marquee-inner {
  display: inline-block;
  white-space: nowrap;
}

.mc-text-marquee.is-overflow .mc-text-marquee-inner {
  display: inline-flex;
  gap: 2.5rem;
  animation: mc-text-marquee var(--mc-marquee-duration, 10s) linear infinite;
}

.mc-text-marquee.is-overflow:hover .mc-text-marquee-inner {
  animation-play-state: paused;
}

.mc-server-card-chip .mc-text-marquee.mc-chip-value {
  display: inline-block;
  max-width: min(160px, 42vw);
  vertical-align: bottom;
}

@keyframes mc-text-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1.25rem)); }
}

.mc-server-card-row {
  padding: 0 14px 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-server-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
}

.mc-server-card-chip .muted {
  color: var(--text-muted);
  font-weight: 600;
}

.mc-server-card-actions {
  display: flex;
  gap: 4px;
  padding: 0 10px 10px;
  justify-content: flex-end;
}

.mc-list-mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.mc-list-mini-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: scale(1.04);
}

.mc-list-mini-btn .material-symbols-outlined {
  font-size: 18px;
}

.mc-list-mini-btn.mc-list-mini-start {
  background: rgba(0, 255, 136, 0.12);
  color: var(--accent-green);
}

.mc-list-mini-btn.mc-list-mini-stop {
  background: rgba(255, 71, 87, 0.12);
  color: var(--accent-red);
}

.mc-server-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.mc-server-actions .btn {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
}

/* --- ステータスバッジ --- */
.mc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mc-status.running {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent-green);
}
.mc-status.running .mc-status-dot {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: mc-pulse 2s ease-in-out infinite;
}

.mc-status.starting {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
}
.mc-status.starting .mc-status-dot {
  background: #ffd700;
  animation: mc-pulse 1s ease-in-out infinite;
}

.mc-status.stopping {
  background: rgba(255, 165, 0, 0.1);
  color: var(--accent-orange);
}
.mc-status.stopping .mc-status-dot {
  background: var(--accent-orange);
  animation: mc-pulse 1s ease-in-out infinite;
}

.mc-status.stopped {
  background: rgba(130, 130, 150, 0.1);
  color: var(--text-muted);
}
.mc-status.stopped .mc-status-dot {
  background: var(--text-muted);
}

.mc-status.crashed {
  background: rgba(255, 69, 69, 0.12);
  color: var(--accent-red);
}
.mc-status.crashed .mc-status-dot {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

@keyframes mc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* --- コンソール --- */
.mc-console-wrapper {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
}

.mc-console-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}

.mc-console-toolbar .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #c9d1d9;
}

.mc-console-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 160px;
}

.mc-console-autoscroll-btn.is-on {
  color: var(--accent-cyan);
}

.mc-console-autoscroll-btn.is-paused {
  color: var(--text-muted);
  opacity: 0.75;
}

.mc-console-filter {
  max-width: 220px;
  min-width: 120px;
  flex: 1;
  padding: 4px 10px !important;
  font-size: 12px !important;
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #c9d1d9 !important;
}

.mc-console-output {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-all;
}

.mc-console-output::-webkit-scrollbar {
  width: 6px;
}
.mc-console-output::-webkit-scrollbar-track {
  background: transparent;
}
.mc-console-output::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 3px;
}

.mc-console-line {
  padding: 1px 0;
}

.mc-console-line.info { color: #58a6ff; }
.mc-console-line.warn { color: #d29922; }
.mc-console-line.error { color: #f85149; }
.mc-console-line.system { color: #8b949e; font-style: italic; }
.mc-console-line.command { color: #79c0ff; }

.mc-console-input-row {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #161b22;
  border-top: 1px solid #21262d;
  gap: 8px;
}

.mc-console-prompt {
  color: var(--accent-green);
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.mc-console-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #c9d1d9;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 13px;
}

.mc-console-input::placeholder {
  color: #484f58;
}

/* --- ファイルマネージャー --- */
.mc-file-manager {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  flex-wrap: wrap;
}

.mc-breadcrumb-item {
  color: var(--accent-cyan);
  cursor: pointer;
  transition: color 0.2s;
  padding: 2px 6px;
  border-radius: 4px;
}

.mc-breadcrumb-item:hover {
  background: var(--bg-hover);
}

.mc-breadcrumb-sep {
  color: var(--text-muted);
  font-size: 11px;
}

.mc-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mc-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}

.mc-file-item:hover {
  background: var(--bg-hover);
}

.mc-file-item .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.mc-file-item.directory .material-symbols-outlined {
  color: var(--accent-cyan);
}

.mc-file-item.file .material-symbols-outlined {
  color: var(--text-muted);
}

.mc-file-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.mc-file-size {
  font-size: 11px;
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
  text-align: right;
}

.mc-file-date {
  font-size: 11px;
  color: var(--text-muted);
  width: 160px;
  flex-shrink: 0;
  text-align: right;
}

.mc-file-actions {
  display: flex;
  gap: 4px;
  width: 40px;
  justify-content: flex-end;
  flex-shrink: 0;
  position: relative;
}

.mc-file-more-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-primary);
  pointer-events: auto;
  z-index: 2;
}
.mc-file-actions .mc-file-more-btn .material-symbols-outlined {
  color: var(--accent-cyan) !important;
  opacity: 1 !important;
}
.mc-file-item.file .mc-file-actions .mc-file-more-btn .material-symbols-outlined,
.mc-file-item.directory .mc-file-actions .mc-file-more-btn .material-symbols-outlined {
  color: var(--accent-cyan) !important;
}
.mc-file-more-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-cyan);
}

.mc-file-context-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
  display: none;
  padding: 4px 0;
}
.mc-file-context-menu.active {
  display: block;
}
.mc-file-context-menu.open-up {
  top: auto;
  bottom: calc(100% + 4px);
}
.mc-file-context-menu-floating {
  position: fixed !important;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 2147483647 !important;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}
.mc-file-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-main);
}
.mc-file-menu-item:hover {
  background: var(--bg-hover);
}
.mc-file-menu-item.danger {
  color: var(--accent-red);
}
.mc-file-menu-item .material-symbols-outlined {
  font-size: 18px;
}

.mc-file-actions-scroll {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mc-file-actions-scroll::-webkit-scrollbar {
  display: none;
}
.mc-file-actions-scroll .btn {
  flex-shrink: 0;
}

/* 権限UI用 */
.perm-matrix { width: 100%; border-collapse: collapse; }
.perm-matrix th, .perm-matrix td { padding: 10px; border-bottom: 1px solid var(--border-subtle); text-align: center; }
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: left; width: 200px; }
.perm-btn-group { display: inline-flex; background: var(--bg-panel); border-radius: 6px; padding: 2px; border: 1px solid var(--border-subtle); }
.perm-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; transition: 0.2s; border: none; background: transparent; color: var(--text-muted); font-weight: bold; }
.perm-btn.active.allow { background: var(--accent-green); color: #fff; }
.perm-btn.active.inherit { background: var(--border-subtle); color: var(--text-main); }
.perm-btn.active.deny { background: var(--accent-red); color: #fff; }

.mc-file-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.mc-file-cb {
  cursor: pointer;
}

/* --- エディタ --- */
.mc-editor-wrapper {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.mc-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
}

.mc-editor-filename {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-editor-textarea {
  flex: 1;
  width: 100%;
  background: #0d1117;
  color: #c9d1d9;
  border: none;
  padding: 16px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  tab-size: 4;
}

/* --- 作成ウィザード --- */
.mc-wizard-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  position: relative;
}

.mc-wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 0 24px;
  z-index: 1;
}

.mc-wizard-step::after {
  content: '';
  position: absolute;
  top: 16px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border-subtle);
  z-index: -1;
}

.mc-wizard-step:last-child::after {
  display: none;
}

.mc-wizard-step.active::after,
.mc-wizard-step.completed::after {
  background: var(--accent-green);
}

.mc-wizard-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-panel);
  border: 2px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.mc-wizard-step.active .mc-wizard-num {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.mc-wizard-step.completed .mc-wizard-num {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}

.mc-wizard-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.mc-wizard-step.active .mc-wizard-label {
  color: var(--accent-cyan);
  font-weight: 600;
}

.mc-wizard-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.mc-wizard-page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* メモリスライダー */
.mc-memory-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mc-memory-preset {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mc-memory-preset:hover {
  border-color: var(--accent-cyan);
}

.mc-memory-preset.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

/* --- 詳細タブ（横スクロールのみ） --- */
.mc-detail-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
}
.mc-detail-tabs::-webkit-scrollbar {
  height: 4px;
}
.mc-detail-tabs::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.mc-detail-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mc-detail-tab.mc-detail-tab--icon-only {
  padding: 12px 16px;
  min-width: 48px;
}

.mc-detail-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.mc-detail-tab.active {
  color: var(--accent-cyan);
}

.mc-detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px 2px 0 0;
}

.mc-detail-tab .material-symbols-outlined {
  font-size: 22px;
}
.mc-tab-label {
  display: none;
  font-size: 12px;
  font-weight: 700;
}

.mc-tab-content {
  display: none;
}

.mc-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* 空状態 */
.mc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.mc-empty-icon {
  font-size: 64px;
  color: var(--text-muted);
  opacity: 0.3;
  margin-bottom: 16px;
}

.mc-empty-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* アニメーション（一覧カードは上で cursor 指定済み） */

/* レスポンシブ */
@media (max-width: 480px) {
  .mc-server-grid,
  .mc-folder-drawer-track { grid-template-columns: 1fr; }
  .mc-console-wrapper { height: 400px; }
  .mc-file-date { display: none; }
  .mc-wizard-step { padding: 0 12px; }
  .mc-stats-grid { grid-template-columns: 1fr !important; }
}

/* トグルスイッチ */
.mc-toggle { position:relative; display:inline-block; width:40px; height:22px; cursor:pointer; }
.mc-toggle input { opacity:0; width:0; height:0; }
.mc-toggle-slider { position:absolute; top:0;left:0;right:0;bottom:0; background:var(--border-subtle); border-radius:11px; transition:0.3s; }
.mc-toggle-slider::before { content:''; position:absolute; height:16px; width:16px; left:3px; bottom:3px; background:#fff; border-radius:50%; transition:0.3s; }
.mc-toggle input:checked + .mc-toggle-slider { background:var(--accent-green); }
.mc-toggle input:checked + .mc-toggle-slider::before { transform:translateX(18px); }

/* server.properties行 */
.mc-prop-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px 16px;
}
.mc-prop-row.mc-prop-row--stack {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.mc-prop-row.mc-prop-row--stack .mc-prop-label {
  font-family: inherit;
}
.mc-prop-label { font-size: 13px; color: var(--text-primary); font-weight: 600; min-width: 0; }
.mc-prop-field { min-width: 0; }
.mc-prop-field .form-control-sm,
.mc-prop-field .form-control {
  width: 100%;
  max-width: none;
  font-size: 13px;
  padding: 8px 12px;
}
.mc-setting-field-block {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

#mc-settings-container .mc-prop-row:not(.mc-prop-row--stack) .mc-prop-field {
  max-width: 620px;
}

#mc-settings-container .mc-prop-row.mc-prop-row--stack .mc-prop-field {
  max-width: none;
}

/* 設定フォーム全体 */
.mc-settings-card-body {
  padding: 12px 18px 18px;
}

/* 統計グリッド */
.mc-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.mc-stat-card { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:12px; padding:20px; text-align:center; }
.mc-stat-header { display:flex; align-items:center; justify-content:center; gap:6px; font-size:13px; font-weight:600; color:var(--text-muted); margin-bottom:12px; }
.mc-stat-header .material-symbols-outlined { font-size:18px; }
.mc-stat-chart { display:flex; justify-content:center; margin-bottom:8px; }
.mc-donut { width:100px; height:100px; transform:rotate(-90deg); }
.mc-donut-text { font-size:7px; font-weight:700; fill:var(--text-primary); transform:rotate(90deg); transform-origin:center; }
.mc-stat-detail { font-size:12px; color:var(--text-muted); }
.mc-stat-value { font-size:28px; font-weight:700; color:var(--text-primary); margin-bottom:8px; }
.mc-stat-players { display:flex; flex-wrap:wrap; gap:4px; justify-content:center; }
.mc-player-tag { background:var(--bg-panel); border:1px solid var(--border-subtle); border-radius:4px; padding:2px 8px; font-size:11px; color:var(--text-primary); }
.mc-stats-hero { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:14px; }
.mc-hero-item { display:flex; gap:10px; align-items:center; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:10px; padding:10px 12px; }
.mc-hero-item .material-symbols-outlined { color:var(--accent-cyan); }
.mc-hero-label { font-size:11px; color:var(--text-muted); }
.mc-hero-value { font-size:13px; font-weight:700; color:var(--text-primary); }
.mc-hero-value.running { color:var(--accent-green); }
.mc-hero-value.stopped { color:var(--accent-orange); }
.mc-progress { height:10px; border-radius:999px; overflow:hidden; background:var(--bg-panel); margin:12px 0 8px; }
.mc-progress-bar { height:100%; transition:width .25s ease; }
.mc-progress-bar.mem { background:linear-gradient(90deg,var(--accent-cyan),#5cc4ff); }
.mc-progress-bar.cpu { background:linear-gradient(90deg,var(--accent-green),#7cd67f); }
.mc-stat-sub { font-size:11px; color:var(--text-muted); margin-top:4px; }
.mc-stat-card-wide { grid-column:span 2; text-align:left; }
.mc-player-list { max-height:220px; overflow:auto; display:grid; gap:8px; margin-top:8px; }
.mc-player-row { display:flex; align-items:center; gap:10px; padding:8px; border:1px solid var(--border-subtle); border-radius:8px; background:rgba(255,255,255,0.02); }
.mc-player-head { width:32px; height:32px; image-rendering:pixelated; border-radius:4px; border:1px solid var(--border-subtle); background:#111; }
.mc-player-meta { min-width:0; }
.mc-player-name { font-size:13px; font-weight:700; color:var(--text-primary); }
.mc-player-sub { font-size:11px; color:var(--text-muted); }
.mc-stat-muted { font-size:12px; color:var(--text-muted); }

/* プラグイン */
.mc-plugin-item { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--border-subtle); }
.mc-plugin-info { display:flex; align-items:center; gap:10px; }
.mc-plugin-name { font-size:13px; font-weight:600; }
.mc-plugin-size { font-size:11px; color:var(--text-muted); }
.mc-plugin-actions { display:flex; gap:6px; }
.mc-plugin-upload-wrap { padding:12px 16px; border-bottom:1px solid var(--border-subtle); background:rgba(255,255,255,0.01); }
.mc-plugin-upload-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.mc-plugin-dropzone { border:1px dashed var(--border-subtle); border-radius:8px; padding:16px; text-align:center; color:var(--text-muted); transition:border-color .2s, background .2s; }
.mc-plugin-dropzone.drag-over { border-color:var(--accent-cyan); background:rgba(0,212,255,0.08); color:var(--text-primary); }
.mc-plugin-dropzone.is-disabled { opacity:.6; cursor:not-allowed; }
.btn-mc-enabled { background:var(--accent-green) !important; color:#fff !important; border:none !important; }
.btn-mc-disabled { background:var(--accent-red) !important; color:#fff !important; border:none !important; }

/* ウィザードプラグイン選択 - ボタン形式 */
.mc-plugin-btn-grid { display:flex; flex-wrap:wrap; gap:8px; }
.mc-plugin-btn { padding:8px 16px; border-radius:6px; font-size:13px; font-weight:700; border:none; cursor:pointer; transition:all 0.15s; background:var(--accent-red); color:#fff; }
.mc-plugin-btn:hover { opacity:0.85; }
.mc-plugin-btn.active { background:var(--accent-green); color:#fff; }

/* 詳細ヘッダー */
.mc-detail-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.mc-detail-header-left { display:flex; align-items:center; gap:12px; }
.mc-back-btn { display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; background:var(--bg-card); border:1px solid var(--border-subtle); color:var(--text-primary); cursor:pointer; transition:all 0.2s; }
.mc-back-btn:hover { background:var(--bg-panel); border-color:var(--accent-cyan); }
.mc-detail-title-text { font-size:24px; font-weight:800; display:flex; align-items:center; gap:12px; }
.mc-delete-btn { display:flex; align-items:center; gap:6px; padding:8px 16px; border-radius:8px; background:transparent; border:1px solid var(--accent-red); color:var(--accent-red); font-size:13px; font-weight:700; cursor:pointer; transition:all 0.2s; }
.mc-delete-btn:hover { background:var(--accent-red); color:#fff; }

.mc-delete-btn.mc-delete-btn--icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
}

/* 詳細ツールバー（ステータス帯） */
.mc-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.mc-detail-join-bar {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.mc-detail-join-bar .mc-join-addr {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.mc-meta-chip.badge-outline {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
}

.mc-meta-chip-text {
  font-weight: 600;
  color: var(--text-primary);
}

.mc-icon-action {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.mc-icon-action .material-symbols-outlined {
  font-size: 20px;
}
.mc-action-label { font-size: 12px; font-weight: 700; }

.mc-icon-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.mc-action-start {
  background: var(--accent-green);
  color: #fff;
}

.mc-action-stop {
  background: var(--accent-red);
  color: #fff;
}

.mc-action-restart {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.mc-action-restart:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.mc-action-backup {
  background: rgba(130, 170, 255, 0.1);
  color: #9ab8ff;
  border: 1px solid rgba(130, 170, 255, 0.28);
}

.mc-action-backup:hover {
  background: rgba(130, 170, 255, 0.18);
}

.mc-action-kill {
  background: rgba(255, 71, 87, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.35);
}

.mc-action-kill:hover {
  background: rgba(255, 71, 87, 0.22);
}

/* 後方互換: HTML で使われていた btn-green */
.btn-green {
  background: var(--accent-green);
  color: #fff;
}
.btn-green:hover {
  filter: brightness(1.06);
}

/* 有効／無効トグル — フリップアニメ用 */
.mc-toggle-flip-host {
  display: inline-block;
  perspective: 720px;
}

.mc-prop-toggle {
  width: 80px;
  text-align: center;
  transform-style: preserve-3d;
}

.mc-flip-toggle-anim {
  animation: mcFlipToggleY 0.42s ease-in-out;
}

@keyframes mcFlipToggleY {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

.mc-spigot-jar-drop--active {
  border-color: var(--accent-orange) !important;
  box-shadow: 0 0 0 2px rgba(255, 170, 90, 0.28), 0 10px 30px rgba(0,0,0,0.22);
  background: rgba(255, 255, 255, 0.05) !important;
}

.mc-perm-editor-table .mc-perm-editor-name {
  font-size: 11px;
  line-height: 1.25;
}

.mc-perm-seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.mc-perm-seg-slider {
  position: absolute;
  left: 0;
  top: 0;
  width: 33.3333%;
  height: 100%;
  background: rgba(0, 212, 255, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .2s ease;
  pointer-events: none;
}

.mc-perm-seg-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.mc-perm-seg-btn.active { color: var(--text-primary); }
.mc-perm-seg.disabled { opacity: .65; }

/* ---- Instance Create Wizard Refresh ---- */
.mc-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.mc-wizard-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
  padding: 0;
}

.mc-wizard-step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 22px);
  width: calc(100% - 8px);
  height: 2px;
  background: var(--border-subtle);
  border-radius: 999px;
}

.mc-wizard-step:last-child::after {
  display: none;
}

.mc-wizard-step.completed::after {
  background: linear-gradient(90deg, var(--accent-green), #84e29a);
}

.mc-wizard-step.progressing::after {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.85) 50%, rgba(0, 212, 255, 0.1) 100%);
  background-size: 220% 100%;
  animation: mcWizardFlow 1.4s linear infinite;
}

@keyframes mcWizardFlow {
  0% { background-position: 220% 0; }
  100% { background-position: -20% 0; }
}

.mc-wizard-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#modal-mc-create .modal-body {
  padding-top: 10px;
}

#modal-mc-create .mc-wizard-page {
  background: linear-gradient(165deg, rgba(0, 212, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 14px;
  padding: 16px 16px 6px;
}

#modal-mc-create .form-row.mcw-grid-2,
#modal-mc-create .form-row.mcw-grid-3,
#modal-mc-create .form-row.mcw-grid-4 {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

#modal-mc-create .form-row.mcw-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#modal-mc-create .form-row.mcw-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#modal-mc-create .form-row.mcw-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

#modal-mc-create .form-group {
  margin-bottom: 14px;
}

#modal-mc-create .mcw-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

#modal-mc-create .mcw-field .form-label {
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

#modal-mc-create .mcw-section {
  margin-bottom: 18px;
}

#modal-mc-create .mcw-section:last-of-type {
  margin-bottom: 0;
}

#modal-mc-create .mcw-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(0, 212, 255, 0.95);
  margin-bottom: 10px;
}

#modal-mc-create .mcw-toggle-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

#modal-mc-create .mcw-toggle-panel--narrow {
  max-width: 560px;
}

#modal-mc-create .mcw-toggle-panel--dim3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
  gap: 10px;
}

#modal-mc-create .mcw-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.12);
}

#modal-mc-create .mcw-toggle-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

/* 記述・テキストエリア（select は background ショートハンドを別定義し ▼ を潰さない） */
#modal-mc-create input.form-control,
#modal-mc-create textarea.form-control {
  width: 100%;
  min-height: 44px;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%) !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#modal-mc-create select.form-control {
  width: 100%;
  min-height: 44px;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  color: var(--text-primary) !important;
  padding: 10px 54px 10px 14px !important;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  /* 本体グラデ + 右ストリップ + ▼（background 一括指定で !important に勝つ） */
  background-color: rgba(12, 18, 28, 0.92) !important;
  background-image:
    linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 212, 255, 0.18) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f4fbff' stroke='%2300d4ff' stroke-width='1.35' stroke-linejoin='round' d='M12 15.2 6 9h12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-size: 100% 100%, 48px 100%, 26px 26px !important;
  background-position: 0 0, right center, center right 10px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modal-mc-create input.form-control::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#modal-mc-create input.form-control:hover,
#modal-mc-create select.form-control:hover,
#modal-mc-create textarea.form-control:hover {
  border-color: rgba(0, 212, 255, 0.38) !important;
}

#modal-mc-create input.form-control:focus,
#modal-mc-create select.form-control:focus,
#modal-mc-create textarea.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* コンパクト赤緑トグル（有効・無効で文字位置がずれないよう固定枠＋中央寄せ） */
#modal-mc-create .mcw-toggle-compact.mc-prop-toggle {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 30px;
  padding: 0 !important;
  border-radius: 8px !important;
  font-weight: 800;
  font-size: 11px !important;
  line-height: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#modal-mc-create .mcw-toggle-compact.btn-mc-enabled {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* よく使うプラグイン — ホバー・選択時のアニメ */
#modal-mc-create .mcw-plugin-preset {
  transition: transform 0.22s ease, box-shadow 0.28s ease, filter 0.22s ease;
}

#modal-mc-create .mcw-plugin-preset:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 8px 22px rgba(0, 212, 255, 0.18);
}

#modal-mc-create .mcw-plugin-preset:active {
  transform: translateY(0) scale(0.96);
}

#modal-mc-create .mcw-plugin-preset.active {
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.35), 0 6px 20px rgba(0, 212, 255, 0.15);
}

@keyframes mcwPluginPresetBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

#modal-mc-create .mcw-plugin-preset-bump {
  animation: mcwPluginPresetBump 0.38s ease;
}

/* 追加JAR — ダークUIに馴染むチップ（クリックでリストから削除） */
#modal-mc-create .mcw-jar-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-height: 0;
  box-sizing: border-box;
}

#modal-mc-create .mcw-jar-dropzone--has-chips .mcw-jar-chip-row {
  margin-top: 8px;
  padding: 6px 14px 14px;
}

#modal-mc-create .mcw-jar-dropzone {
  padding-bottom: 2px;
}

#modal-mc-create .mcw-jar-chip {
  appearance: none;
  cursor: pointer;
  padding: 7px 12px 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

#modal-mc-create .mcw-jar-chip:hover {
  transform: translateY(-1px);
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 212, 255, 0.12);
}

#modal-mc-create .mcw-jar-chip:active {
  transform: scale(0.98);
  background: rgba(255, 71, 87, 0.12);
  border-color: rgba(255, 71, 87, 0.35);
}

/* ウィザード内ドロップゾーン（未選択時は縦並び・中央でバランス調整） */
#modal-mc-create .mcw-dropzone {
  border-radius: 12px !important;
  border: 1px dashed rgba(0, 212, 255, 0.3) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.72) 0%, rgba(12, 18, 28, 0.58) 100%);
}

#modal-mc-create .mcw-dropzone-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 22px 18px;
  min-height: 118px;
}

/* 未追加時は大きな空ダネを避け、説明とボタンを1行近くで並べる */
#modal-mc-create .mcw-zip-dropzone:not(.mcw-dropzone--filled) .mcw-dropzone-main,
#modal-mc-create .mcw-jar-dropzone:not(.mcw-jar-dropzone--has-chips) .mcw-dropzone-main {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  min-height: 0;
  gap: 12px;
  padding: 14px 16px;
}

#modal-mc-create .mcw-zip-dropzone:not(.mcw-dropzone--filled) .mcw-dropzone-hint,
#modal-mc-create .mcw-jar-dropzone:not(.mcw-jar-dropzone--has-chips) .mcw-dropzone-hint {
  flex: 1 1 200px;
  max-width: none;
  margin: 0;
  text-align: left;
}

#modal-mc-create .mcw-jar-dropzone:not(.mcw-jar-dropzone--has-chips) .mcw-jar-add-btn {
  flex-shrink: 0;
}

#modal-mc-create .mcw-dropzone-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 26rem;
}

#modal-mc-create .mcw-dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#modal-mc-create .mcw-dropzone--filled .mcw-dropzone-main,
#modal-mc-create .mcw-jar-dropzone--has-chips .mcw-dropzone-main {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  min-height: 0;
  padding: 12px 14px;
  gap: 10px;
}

#modal-mc-create .mcw-dropzone--filled .mcw-dropzone-hint,
#modal-mc-create .mcw-jar-dropzone--has-chips .mcw-dropzone-hint {
  flex: 1;
  min-width: 160px;
  max-width: none;
  color: var(--text-primary);
}

#modal-mc-create .mcw-dropzone--filled .mcw-dropzone-actions {
  justify-content: flex-end;
}

#modal-mc-create .mcw-jar-dropzone--has-chips .mcw-dropzone-main {
  border-bottom: 1px solid rgba(0, 212, 255, 0.14);
  padding-bottom: 12px;
  margin-bottom: 6px;
}

#modal-mc-create .mcw-jar-dropzone--has-chips .mcw-jar-add-btn {
  flex-shrink: 0;
}

#modal-mc-create .mcw-dropzone-clear {
  color: var(--accent-red) !important;
}

@media (max-width: 980px) {
  #modal-mc-create .form-row.mcw-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #modal-mc-create .form-row.mcw-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  #modal-mc-create .mcw-toggle-panel:not(.mcw-toggle-panel--dim3) {
    grid-template-columns: 1fr;
  }
  #modal-mc-create .mcw-toggle-panel--dim3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #modal-mc-create .form-row.mcw-grid-2,
  #modal-mc-create .form-row.mcw-grid-3,
  #modal-mc-create .form-row.mcw-grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mc-detail-tab { padding: 10px 12px; }
  .mc-detail-tab .material-symbols-outlined { font-size: 20px; }
  .mc-action-label { font-size: 11px; }
  .mc-perm-editor-table th:first-child,
  .mc-perm-editor-table td:first-child {
    width: 32% !important;
    max-width: 32vw;
  }
  .mc-perm-editor-table .mc-perm-editor-name {
    font-size: 10px;
  }
  .mc-perm-seg-btn {
    padding: 3px 0;
    font-size: 10px;
  }
}

@media (min-width: 1024px) {
  .mc-detail-tab.mc-detail-tab--icon-only {
    padding: 10px 14px;
    min-width: 74px;
  }
  .mc-tab-label { display: inline; }
}

/* ============================================
   インスタンス詳細 — 作成ウィザードと統一した UI トーン
   ============================================ */

#page-mc-detail.mc-detail-scope .mc-detail-panel {
  background: linear-gradient(165deg, rgba(0, 212, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
}

#page-mc-detail.mc-detail-scope .mc-detail-stats-panel.mc-detail-muted-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

#page-mc-detail.mc-detail-scope .mc-detail-empty-icon {
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.35;
}

#page-mc-detail.mc-detail-scope .mc-detail-empty-text {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

#page-mc-detail.mc-detail-scope .mc-detail-muted-empty {
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

#page-mc-detail.mc-detail-scope #mc-tab-mc-settings {
  position: relative;
  padding-bottom: 72px;
}

#page-mc-detail.mc-detail-scope .mc-detail-settings-footer {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 12px 0 4px;
  border-top: none;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0) 0%, rgba(10, 14, 22, 0.88) 28%, rgba(10, 14, 22, 0.96) 100%);
  backdrop-filter: blur(6px);
}

#page-mc-detail.mc-detail-scope .card {
  background: linear-gradient(165deg, rgba(0, 212, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0.015) 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.12) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: none !important;
}

#page-mc-detail.mc-detail-scope .card-header {
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(0, 212, 255, 0.14);
  padding: 12px 18px;
  margin-bottom: 0 !important;
}

#page-mc-detail.mc-detail-scope .card-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.95);
  gap: 8px;
}

#page-mc-detail.mc-detail-scope .card-title .material-symbols-outlined.icon {
  color: rgba(0, 212, 255, 0.85);
}

#page-mc-detail.mc-detail-scope #mc-settings-container .mc-settings-card-body {
  padding: 12px 18px 18px;
}

/* input と textarea を分離（textarea は最小高さを確保） */
#page-mc-detail.mc-detail-scope input.form-control:not(.mc-console-filter) {
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%) !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#page-mc-detail.mc-detail-scope textarea.form-control {
  width: 100% !important;
  min-height: 100px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%) !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* main.css の select.form-control（!important あり）より詳細度と順序で上書き */
#page-mc-detail.mc-detail-scope select.form-control {
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  color: var(--text-primary) !important;
  padding: 10px 54px 10px 14px !important;
  font-size: 13px !important;
  font-family: inherit !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: rgba(12, 18, 28, 0.92) !important;
  background-image:
    linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 212, 255, 0.18) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f4fbff' stroke='%2300d4ff' stroke-width='1.35' stroke-linejoin='round' d='M12 15.2 6 9h12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-size: 100% 100%, 48px 100%, 26px 26px !important;
  background-position: 0 0, right center, center right 10px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#page-mc-detail.mc-detail-scope .mc-prop-field input.form-control:not(.mc-console-filter),
#page-mc-detail.mc-detail-scope .mc-prop-field textarea.form-control,
#page-mc-detail.mc-detail-scope .mc-prop-field select.form-control {
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
}

#page-mc-detail.mc-detail-scope input.form-control:not(.mc-console-filter):disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

#page-mc-detail.mc-detail-scope input.form-control:not(.mc-console-filter)::placeholder,
#page-mc-detail.mc-detail-scope textarea.form-control::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#page-mc-detail.mc-detail-scope input.form-control:not(.mc-console-filter):hover,
#page-mc-detail.mc-detail-scope select.form-control:hover,
#page-mc-detail.mc-detail-scope textarea.form-control:hover {
  border-color: rgba(0, 212, 255, 0.38) !important;
}

#page-mc-detail.mc-detail-scope input.form-control:not(.mc-console-filter):focus,
#page-mc-detail.mc-detail-scope select.form-control:focus,
#page-mc-detail.mc-detail-scope textarea.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#page-mc-detail.mc-detail-scope .mc-prop-toggle {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 30px;
  padding: 0 !important;
  border-radius: 8px !important;
  font-weight: 800;
  font-size: 11px !important;
  line-height: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

#page-mc-detail.mc-detail-scope .mc-prop-toggle.btn-mc-enabled {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#page-mc-detail.mc-detail-scope .mc-prop-row {
  border-bottom-color: rgba(0, 212, 255, 0.1);
}

#page-mc-detail.mc-detail-scope .mc-console-wrapper {
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 14px;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(0, 212, 255, 0.06);
}

#page-mc-detail.mc-detail-scope .mc-console-toolbar {
  border-bottom-color: rgba(0, 212, 255, 0.14);
}

#page-mc-detail.mc-detail-scope .mc-console-filter {
  max-width: 280px;
  min-height: 38px;
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.95) 0%, rgba(12, 18, 28, 0.92) 100%) !important;
  color: var(--text-primary) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#page-mc-detail.mc-detail-scope .mc-console-filter:focus {
  outline: none;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#page-mc-detail.mc-detail-scope .mc-plugin-upload-wrap {
  padding: 14px 18px 18px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
}

#page-mc-detail.mc-detail-scope .mc-plugin-upload-head {
  margin-bottom: 12px;
}

#page-mc-detail.mc-detail-scope .mc-plugin-upload-head > div:first-child {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.92);
}

#page-mc-detail.mc-detail-scope .mc-plugin-dropzone {
  border-radius: 12px !important;
  border: 1px dashed rgba(0, 212, 255, 0.32) !important;
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.72) 0%, rgba(12, 18, 28, 0.58) 100%);
  padding: 14px 16px !important;
  text-align: left;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

#page-mc-detail.mc-detail-scope .mc-plugin-dropzone.drag-over {
  border-color: var(--accent-cyan) !important;
  background: rgba(0, 212, 255, 0.1);
  color: var(--text-primary);
}

#page-mc-detail.mc-detail-scope .mc-plugin-item {
  border-bottom-color: rgba(0, 212, 255, 0.1);
}

#page-mc-detail.mc-detail-scope .mc-breadcrumb {
  border-bottom-color: rgba(0, 212, 255, 0.12);
  background: rgba(0, 0, 0, 0.14);
}

#page-mc-detail.mc-detail-scope .mc-file-actions-scroll {
  border-bottom-color: rgba(0, 212, 255, 0.1);
}

#page-mc-detail.mc-detail-scope .mc-stat-card,
#page-mc-detail.mc-detail-scope .mc-hero-item {
  border-color: rgba(0, 212, 255, 0.14);
  background: rgba(0, 0, 0, 0.14);
}

#page-mc-detail.mc-detail-scope .mc-player-row {
  border-color: rgba(0, 212, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
