.tool-intro {
  padding: 56px 0 38px;
}
.tool-intro h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 650;
  letter-spacing: -1px;
  margin: 16px 0;
}
.tool-intro p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 650px;
  margin: 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 42px;
  align-items: start;
}
.input-panel {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
}
.input-panel h2,
.accounts-head h2 {
  font-size: 18px;
  font-weight: 650;
  margin: 0 0 25px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 9px;
}
textarea,
input:not([type="checkbox"], [type="file"]),
select {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}
textarea {
  resize: vertical;
  overflow-wrap: anywhere;
}
.image-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 13px 0 24px;
}
.image-row .button {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
}
.image-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.image-row:focus-within .button {
  outline: 3px solid var(--accent);
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
details {
  margin: 23px 0;
}
.advanced-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.add {
  width: 100%;
  justify-content: space-between;
  margin-top: 5px;
}
#message {
  font-size: 13px;
  line-height: 1.7;
  margin: 15px 0 0;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.accounts-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 12px;
}
.accounts-head h2 {
  margin: 0;
}
.empty {
  text-align: center;
  padding: 70px 10px;
}
.empty-mark {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 28px;
  color: #a6b3a2;
}
.empty h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 23px 0 12px;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.account-card {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.account-card h3 {
  font-size: 16px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.account-name {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
}
.code {
  font:
    600 30px/1.4 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 4px;
  border: none;
  background: none;
  padding: 0;
  white-space: nowrap;
}
.code:hover {
  background: none;
  color: var(--green);
}
.remaining {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  min-width: 65px;
}
.remaining progress {
  display: block;
  width: 65px;
  height: 5px;
  margin-top: 7px;
  accent-color: var(--green);
}
.account-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.quiet {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.quiet:hover {
  background: none;
  color: var(--accent);
  border: none;
}
.account-actions .small {
  font-size: 10px;
}
.cache-settings {
  padding-top: 27px;
  border-top: 1px solid var(--line);
}
.cache-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cache-toggle input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  margin: 0;
}
.cache-settings p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 430px;
}
.help {
  margin: 40px 0 5px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.help p {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: min(92vw, 460px);
  padding: 25px;
  background: #fffefa;
  color: var(--ink);
}
dialog::backdrop {
  background: #17302880;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.dialog-head h2 {
  font-size: 20px;
  margin: 0;
}
.dialog-head button {
  border: none;
  padding: 3px 10px;
  font-size: 24px;
}
.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.qr-actions button {
  font-size: 13px;
}
#qr-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 15px auto;
}
#qr-label {
  overflow-wrap: anywhere;
  font-size: 13px;
}
#qr-message {
  font-size: 12px;
  color: var(--accent);
}
@media (max-width: 950px) {
  .tool-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .input-panel {
    padding: 22px;
  }
  .field-pair {
    grid-template-columns: 1fr;
  }
  .code {
    font-size: 26px;
    letter-spacing: 3px;
  }
}
@media (max-width: 650px) {
  .tool-intro {
    padding: 36px 0 28px;
  }
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .field-pair {
    grid-template-columns: 1fr 1fr;
  }
  .empty {
    padding: 35px 10px;
  }
  .code {
    font-size: 29px;
  }
  .help {
    margin-top: 28px;
  }
}
