.deck-util-container { max-width: 900px; margin: 0 auto; }
  .deck-util-container h1 { font-size: 2rem; margin-bottom: 0.5rem; text-align: center; }
  .deck-util-container p.desc { color: #888; text-align: center; margin-bottom: 1.5rem; }

  .deck-header { margin-bottom: 0.75rem; display: flex; align-items: center; }
  #deck-name-input { background: #111111; color: #fff; border: 1px solid #333333; border-radius: 0px; padding: 0.5rem 0.75rem; font-family: 'Russo One', sans-serif; font-size: 1.1rem; width: 250px; outline: none; transition: border-color 0.2s; letter-spacing: 0.5px; }
  #deck-name-input:focus { border-color: #ff5500; }

  #decklist-input { width: 100%; height: 280px; background-color: #111111; color: #f0f0f0; border: 2px solid #333333; border-radius: 0px; padding: 1rem; font-family: monospace; font-size: 1rem; line-height: 1.5; box-sizing: border-box; resize: vertical; outline: none; }
  #decklist-input:focus { border-color: #ff5500; }
  .button-row { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
  .util-btn { padding: 0.65rem 1.25rem; background-color: #ff5500; color: #fff; border: none; border-radius: 0px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
  .util-btn:hover { background-color: #cc4400; }
  .util-btn:disabled { background-color: #3b4252; cursor: not-allowed; }
  .util-btn.secondary { background-color: #1f1f24; border: 1px solid #333; }
  .util-btn.secondary:hover { background-color: #333333; }
  #deck-check-panel { margin-top: 1.5rem; background: #111111; border: 1px solid #333333; border-radius: 0px; padding: 1.25rem; display: none; }
  .check-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 0px; font-size: 0.8rem; font-weight: bold; margin-right: 0.5rem; }
  .badge-pass { background: #065f46; color: #34d399; }
  .badge-fail { background: #7f1d1d; color: #f87171; }
  .check-row { margin: 0.4rem 0; font-size: 0.95rem; }
  #status-output { margin-top: 1rem; font-size: 0.95rem; font-weight: 500; }
  .status-info { color: #38bdf8; }
  .status-warn { color: #facc15; }
  .status-err  { color: #f87171; }
  #print-container { display: none; }

  #visual-deck-panel { display: none; flex-direction: column; gap: 2rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #333333; }
  .visual-group-title { font-size: 1.15rem; color: #fff; margin: 0 0 1rem 0; padding-bottom: 0.4rem; border-bottom: 1px solid #333333; display: flex; justify-content: space-between; }
  .visual-group-title span.count { color: #888; font-size: 0.9rem; font-weight: normal; }
  .visual-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.5rem; }
  .visual-deck-stack { position: relative; width: 100%; aspect-ratio: 5 / 7; }
  .visual-deck-stack .card-item { position: absolute; left: 0; width: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .visual-deck-stack .card-item:hover {
      transform: translate(-4px, -4px);
      box-shadow: 6px 6px 0px #ff5500;
      border-color: #ff5500;
    }

  @media print {
    body > *:not(#print-container) { display: none !important; }
    body { background: white !important; margin: 0 !important; padding: 0 !important; }
    #print-container { display: block !important; width: 100% !important; }
    @page { size: letter portrait; margin: 0.25in; }
    .print-sheet { width: 7.5in; height: 10.5in; display: grid; grid-template-columns: repeat(3, 2.5in); grid-template-rows: repeat(3, 3.5in); page-break-after: always; break-after: page; margin: 0 auto; box-sizing: border-box; }
    .print-card { width: 2.5in; height: 3.5in; box-sizing: border-box; outline: 0.5px dashed #aaa; overflow: hidden; }
    .print-card img { width: 100%; height: 100%; object-fit: cover; }
  }
  
  .deck-search-wrapper {
	  position: relative;
	  margin-bottom: 12px;
	}
	#card-search-input {
	  width: 100%;
	  padding: 12px;
	  background: #0a0a0c;
	  color: #fff;
	  border: 1px solid #2a2a30;
	  font-family: inherit;
	  font-size: 1rem;
	  box-sizing: border-box;
	}
	#card-search-input:focus {
	  border-color: #34d399;
	  outline: none;
	}
	.dropdown-list {
	  position: absolute;
	  top: 100%;
	  left: 0;
	  right: 0;
	  background: #111115;
	  border: 1px solid #34d399;
	  max-height: 250px;
	  overflow-y: auto;
	  z-index: 100;
	  box-shadow: 0 4px 12px rgba(0,0,0,0.8);
	}
	.dropdown-item {
	  padding: 10px 12px;
	  cursor: pointer;
	  border-bottom: 1px solid #222;
	  display: flex;
	  justify-content: space-between;
	  color: #cbd5e1;
	  font-family: 'Courier New', monospace;
	}
	.dropdown-item:hover {
	  background: #16161c;
	  color: #34d399;
	}
	.dropdown-syn {
	  font-size: 0.8rem;
	  color: #888;
	}
	#hover-preview-img {
	  position: absolute;
	  top: 0;
	  left: calc(100% + 20px);
	  width: 220px;
	  border-radius: 6px;
	  z-index: 101;
	  pointer-events: none;
	  box-shadow: 0 6px 20px rgba(0,0,0,0.8);
	  border: 1px solid #333;
	}
	@media (max-width: 900px) {
	  #hover-preview-img { display: none !important; }
	}
	
	.visual-deck-stack {
	  cursor: pointer;
	  user-select: none;
	  -webkit-user-select: none;
	  touch-action: manipulation;
	}
	.visual-deck-hint {
	  font-family: 'Courier New', Courier, monospace;
	  font-size: 0.85rem;
	  color: #888;
	  margin-bottom: 1rem;
	  padding: 6px 12px;
	  background: #0a0a0c;
	  border-left: 3px solid #34d399;
	}

	.sample-hand-container {
	  background: #111115;
	  border: 1px solid #2a2a30;
	  border-top: 3px solid #ff5500;
	  padding: 1.25rem;
	  margin-top: 1.5rem;
	  border-radius: 6px;
	}
	.sample-hand-header {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  flex-wrap: wrap;
	  gap: 10px;
	  margin-bottom: 1rem;
	  border-bottom: 1px dashed #333;
	  padding-bottom: 0.75rem;
	}
	.sample-hand-title {
	  font-family: 'Russo One', sans-serif;
	  color: #fff;
	  font-size: 1.1rem;
	  text-transform: uppercase;
	}
	.income-badge {
	  background: #06110d;
	  border: 1px solid #14382c;
	  color: #34d399;
	  padding: 4px 10px;
	  border-radius: 4px;
	  font-family: 'Courier New', monospace;
	  font-size: 0.85rem;
	}
	.sample-hand-grid {
	  display: flex;
	  gap: 12px;
	  justify-content: center;
	  flex-wrap: wrap;
	}
	.sample-card-item {
	  width: 130px;
	  transition: transform 0.15s;
	}
	.sample-card-item:hover {
	  transform: translateY(-4px);
	}
	.sample-card-item img {
	  width: 100%;
	  border-radius: 6px;
	  border: 1px solid #333;
	  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
	  display: block;
	}
	
	.qty-controls {
	  position: absolute;
	  top: -12px;
	  left: -12px;
	  z-index: 100;
	  display: flex;
	  gap: 4px;
	  background: #111115;
	  padding: 4px;
	  border: 1px solid #34d399;
	  border-radius: 6px;
	  box-shadow: 0 4px 6px rgba(0,0,0,0.6);
	}

	.qty-btn {
	  background: #060608;
	  color: #34d399;
	  border: 1px solid #14382c;
	  width: 24px;
	  height: 24px;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  cursor: pointer;
	  font-family: 'Russo One', sans-serif;
	  font-size: 16px;
	  border-radius: 3px;
	  user-select: none;
	  line-height: 1;
	}

	.qty-btn:hover {
	  background: #34d399;
	  color: #000;
	}

	@media (max-width: 600px) {
	  .qty-btn {
		width: 34px;
		height: 34px;
		font-size: 20px;
	  }
	  .qty-controls {
		top: -16px;
		left: -16px;
	  }
	}