.secret-maker { margin-block: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.article .secret-maker h2 { margin-top: 0; font-size: 26px; }
.secret-fields { display: flex; flex-wrap: wrap; gap: 14px; margin-block: 20px; }
.secret-fields label { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; font-weight: 600; }
.secret-maker select, .secret-maker input, .secret-maker textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.secret-maker textarea { resize: vertical; display: block; }
.secret-label { display: block; margin-block: 12px 6px; font-weight: 600; }
.article .secret-note { color: var(--sec); font-size: 15px; }
.secret-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secret-actions .btn { min-height: 44px; white-space: normal; }
.secret-actions .btn:disabled { opacity: .5; cursor: default; }
.secret-message { padding: 16px; border: 1px solid var(--line); border-radius: 8px; font-family: ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.secret-key { padding-top: 12px; border-top: 1px dashed var(--ink); margin-top: 24px; break-inside: avoid; }
.secret-key-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px 16px; }
.secret-key-grid > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-block: 4px; min-width: 0; }
.secret-key-grid dt { font-weight: 700; }
.secret-key-grid dd { margin: 0; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.secret-print-root { display: none; }
@media (max-width: 480px) {
  .secret-maker { padding: 16px; }
  .secret-fields label { flex-basis: 100%; }
  .secret-actions .btn { width: 100%; }
  .secret-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 14px; }
}
@page secret { size: auto; margin: 15mm; }
@media print {
  html.secret-printing body > :not(.secret-print-root) { display: none !important; }
  html.secret-printing, html.secret-printing body { margin: 0; background: white; }
  .secret-print-root { page: secret; --ink: black; --sec: black; --line: #999; display: block; color: black; background: white; font: 12pt/1.4 sans-serif; }
  .secret-print-root h1 { font-size: 20pt; }
  .secret-print-root h3 { font-size: 16pt; margin-block: 10px; }
  .secret-print-root .secret-key-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 10pt; }
  .secret-print-root .secret-message { font-size: 12pt; }
}
