.printer-test-page {
  min-height: 100vh;
}

.printer-test-header .header-inner {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.printer-test-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.printer-test-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.printer-test-main {
  padding: 1rem 1rem 2rem;
  max-width: 72rem;
}

.printer-test-toolbar {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.printer-test-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  color: var(--foreground-diminished, #aaa);
}

.printer-test-badge--ok {
  background: rgba(80, 200, 120, 0.2);
  color: #7ddea0;
}

.printer-test-badge--warn {
  background: rgba(255, 200, 80, 0.2);
  color: #ffd166;
}

.printer-test-badge--error {
  background: rgba(255, 100, 100, 0.2);
  color: #ff8a8a;
}

.printer-test-section-label {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--foreground-diminished, #999);
}

.printer-test-section-label:first-of-type {
  margin-top: 0;
}

.printer-test-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.printer-test-btn-grid--manual {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.printer-test-btn {
  width: 100%;
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  border-radius: 14px;
  text-align: center;
  white-space: normal;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.printer-test-btn:active {
  transform: scale(0.98);
}

.printer-test-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.printer-test-input {
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 1.1rem;
}

.printer-test-status--compact {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.printer-test-status-item strong {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.3;
  word-break: break-word;
}

.printer-test-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground-diminished, #999);
  margin-bottom: 0.35rem;
}

.printer-test-details {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.printer-test-details summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  touch-action: manipulation;
}

.printer-test-hint {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--foreground-diminished, #999);
}

.printer-test-env {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.printer-test-env dt {
  margin: 0;
  color: var(--foreground-diminished, #999);
}

.printer-test-env dd {
  margin: 0;
  word-break: break-all;
}

.printer-test-log-section {
  margin-bottom: 2rem;
}

.printer-test-log {
  margin: 0;
  padding: 1rem;
  max-height: min(28rem, 35vh);
  overflow: auto;
  border-radius: 12px;
  background: #050508;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.printer-test-log .log-out {
  color: #e0e0e0;
}

.printer-test-log .log-in {
  color: #a8e6a3;
}

.printer-test-log .log-warn {
  color: #ffd166;
}

.printer-test-log .log-err {
  color: #ff8a8a;
}

.printer-test-log .log-info {
  color: #c9c9d4;
}

@media (max-width: 900px) {
  .printer-test-btn-grid,
  .printer-test-btn-grid--manual {
    grid-template-columns: 1fr;
  }

  .printer-test-status--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .printer-test-btn-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .printer-test-btn {
    min-height: 5rem;
    font-size: 1.15rem;
  }
}
