:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; color: #222; background: #fff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 640px; margin: 48px auto; padding: 0 24px; }
header { margin-bottom: 24px; }
h1 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
header p, .hint { color: #666; font-size: 14px; line-height: 1.7; }
header p { margin: 0; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.card { min-width: 0; padding: 24px; border: 1px solid #ddd; border-radius: 6px; }
nav { display: flex; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; color: #888; font-size: 13px; }
nav .active { color: #222; font-weight: 600; }
.hint { margin: 0 0 18px; }
label { display: block; margin: 16px 0 8px; font-size: 14px; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font: inherit; font-size: 16px; color: #222; background: #fff; }
input:focus, select:focus { outline: 2px solid #777; outline-offset: 2px; }
input::placeholder { color: #999; }
button { min-height: 42px; padding: 10px 14px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font: inherit; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #555; outline-offset: 3px; }
.primary, .secondary { width: 100%; margin-top: 20px; }
.primary { background: #292929; color: #fff; }
.primary:hover { background: #444; }
.secondary { background: #fff; color: #333; border-color: #ccc; }
.secondary:hover { background: #f5f5f5; }
.actions, .dialog-actions { display: flex; gap: 10px; }
.actions > button { flex: 1; }
.links { display: flex; justify-content: space-between; margin-top: 12px; }
.links button { padding: 6px 0; min-height: 36px; color: #555; background: none; }
.fine { margin: 14px 0 0; font-size: 12px; line-height: 1.7; color: #777; }
.password-box { padding: 16px; border: 1px solid #ddd; border-radius: 4px; background: #f7f7f7; }
#generated-password { font: 600 20px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
#result:focus { outline: none; }
#status { margin-top: 20px; padding: 12px; border: 1px solid #ddd; border-radius: 4px; background: #f6f6f6; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
#status.error { color: #8c3228; border-color: #e6c4c0; background: #fff8f7; }
details { margin-top: 16px; color: #555; font-size: 13px; }
summary { cursor: pointer; line-height: 1.7; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; }
.guide { margin-top: 32px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 380px; border-collapse: collapse; font-size: 13px; }
caption { text-align: left; font-size: 12px; color: #777; margin-bottom: 8px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #e5e5e5; white-space: nowrap; }
th { font-weight: 500; }
thead { color: #777; }
.tutorial { padding: 15px 0; margin: 0; border-bottom: 1px solid #e5e5e5; font-size: 14px; }
.tutorial summary { color: #222; font-weight: 500; }
ol { margin: 14px 0 0; padding-left: 22px; }
li { margin: 10px 0; line-height: 1.8; }
.help-link { display: inline-block; margin-top: 12px; font-size: 12px; color: #555; text-underline-offset: 3px; }
footer { margin-top: 32px; font-size: 12px; color: #888; }
dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid #ccc; border-radius: 6px; color: #222; }
dialog::backdrop { background: #0006; }
dialog p { font-size: 14px; line-height: 1.7; }
.dialog-actions { justify-content: flex-end; }
.dialog-actions button { width: auto; }
#captcha-frame { width: 100%; height: 510px; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  main { margin: 24px auto; padding: 0 16px; }
  h1 { font-size: 22px; }
  .card { padding: 20px 16px; }
  .actions { flex-direction: column; gap: 0; }
  .actions .secondary { margin-top: 10px; }
}
