:root {
  --bg: #f7fbff;
  --card: #ffffff;
  --muted: #64707b;
  --accent: #0b6fa8;
  --pill: #eef6fb;
  font-family: Inter, Roboto, system-ui, -apple-system, "Segoe UI", Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body.fixed-padding {
  margin: 0;
  padding: 20px 0;
  background: linear-gradient(180deg, var(--bg), #ffffff);
  color: #0b1220;
}
.container {
  max-width: 1100px;
  margin: 18px auto;
}
.site-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 18px;
}
.site-header h1 {
  font-size: 20px;
  margin: 0 0 6px;
}
.intro {
  font-size: 14px;
  color: var(--muted);
}
.input-card {
  background: var(--card);
  border: 1px solid #e6edf3;

  /* copy icon button */
  .copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 4px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .copy-btn svg {
    opacity: 0.9;
  }
  .copy-btn:hover {
    background: rgba(11, 17, 32, 0.04);
  }
  .copy-btn.copied {
    background: var(--pill);
    color: green;
  }
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(11, 17, 32, 0.04);
}
textarea {
  width: 100%;
  min-height: 120px;
  font-family: monospace;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e1e7ec;
  resize: vertical;
}
.controls {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
button {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #d1dbe4;
  background: #fff;
  color: #072033;
  cursor: pointer;
  font-size: 14px;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(11, 17, 32, 0.06);
}
.qr-area {
  margin-top: 14px;
  text-align: center;
}
#qrcode {
  display: inline-block;
  padding: 10px;
  background: var(--pill);
  border-radius: 8px;
}
.qr-buttons {
  margin-top: 8px;
  display: none;
  gap: 8px;
}
.qr-buttons button {
  min-width: 120px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}
.col {
  flex: 1;
  min-width: 280px;
}
pre {
  background: #fbfcfd;
  border: 1px solid #eef2f6;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
  max-height: 440px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.tree {
  font-family: monospace;
  font-size: 13px;
}
#video {
  width: 100%;
  max-height: 320px;
  border-radius: 8px;
  border: 1px solid #e1e7ec;
  display: none;
}
.crc {
  margin-top: 8px;
}
.site-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* helper */
.hidden {
  display: none !important;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  /* Controls: show as a horizontal, scrollable row on small screens
     Buttons sized to their text and won't wrap */
  .controls {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 6px 4px;
    white-space: nowrap;
  }
  .controls button {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .row {
    flex-direction: column;
  }
}
