:root {
  color-scheme: light;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #34344d;
  background: #f7f6ff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(#8883dd22 1px, transparent 1.3px) 0 0 / 24px 24px; mask-image: linear-gradient(#0008, transparent 75%); }
body { background: radial-gradient(1000px 680px at 12% -10%, #7c3aed2e, transparent 62%), radial-gradient(900px 640px at 102% 2%, #38bdf826, transparent 58%), radial-gradient(760px 520px at 50% 112%, #a855f71c, transparent 62%), linear-gradient(#faf9ff, #f5f6fc 48%, #eef2ff); background-attachment: fixed; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, .code-value:focus-visible { outline: 3px solid #6d5efc; outline-offset: 4px; }
button, input { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: #6d5efc35; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page { position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 52px 20px 40px; }
.shell { width: 100%; max-width: 800px; }
.hero { margin-bottom: 26px; text-align: center; }
.eyebrow { display: inline-flex; padding: 8px 17px; border: 1px solid #8b5cf638; border-radius: 99px; color: #5b21b6; background: #ffffffb8; font-size: .875rem; font-weight: 600; letter-spacing: .1em; }
.logo { display: grid; place-items: center; width: 68px; height: 68px; margin: 20px auto; border-radius: 21px; color: white; background: linear-gradient(135deg, #6d5efc, #a855f7 60%, #38bdf8 120%); box-shadow: 0 16px 32px #6d5efc42, inset 0 1px 0 #ffffff66; }
.logo .icon { width: 34px; height: 34px; stroke-width: 1.9; }
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.35rem); line-height: 1.3; font-weight: 800; letter-spacing: .01em; color: #5d45cf; background: linear-gradient(110deg, #40328b 5%, #6d5efc 48%, #a855f7 78%, #0ea5e9 115%); background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { margin: 12px 0 0; color: #676d82; font-size: 1rem; line-height: 1.7; }
.usage-note { display: inline-block; max-width: 100%; margin: 13px 0 0; padding: 7px 14px; border: 1px solid #ddd7f8; border-radius: 10px; color: #6f5a9a; background: #ffffff8c; font-size: .875rem; line-height: 1.7; text-wrap: balance; }
.card { padding: 30px; border: 1px solid #fffffff2; border-radius: 24px; background: #ffffffd9; box-shadow: 0 24px 60px -24px #402e8e59, 0 2px 8px #1f23330a; backdrop-filter: blur(18px); }
.search-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.field { min-width: 0; }
.field label { display: block; margin: 0 2px 8px; color: #565770; font-size: .875rem; font-weight: 600; }
.input-wrap { display: flex; align-items: center; gap: 9px; height: 52px; padding: 0 12px; border: 1px solid #e1deef; border-radius: 13px; background: #f8f8fd; transition: border-color .18s, background .18s, box-shadow .18s; }
.input-wrap > .icon { width: 18px; height: 18px; color: #9293aa; }
.input-wrap:hover { border-color: #bcb3eb; }
.input-wrap:focus-within { border-color: #8b7cfc; background: #fff; box-shadow: 0 0 0 4px #6d5efc1e; }
.input-wrap:has([aria-invalid="true"]) { border-color: #c84c65; box-shadow: 0 0 0 3px #c84c6514; }
input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; color: #34344d; background: transparent; font-size: 1rem; }
input::placeholder { color: #9292a7; font-size: .875rem; }
.icon-button { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 44px; margin-right: -7px; padding: 0; border: 0; border-radius: 8px; color: #88859e; background: transparent; }
.icon-button:hover, .icon-button[aria-pressed="true"] { color: #6d5efc; background: #6d5efc0d; }
.icon-button:active { background: #6d5efc1a; }
.fetch-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 152px; height: 52px; padding: 0 18px; border: 0; border-radius: 13px; color: white; font-size: 1rem; font-weight: 600; white-space: nowrap; background: linear-gradient(135deg, #6d5efc, #8b5cf6 52%, #a855f7); box-shadow: 0 10px 22px #6d5efc40; transition: transform .18s, box-shadow .18s; }
.fetch-button:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 14px 26px #6d5efc55; }
.fetch-button:not(:disabled):active { transform: translateY(1px); }
.hint { margin: 13px 2px 0; color: #7c8097; font-size: .875rem; line-height: 1.7; }
.result-area { margin-top: 25px; overflow-wrap: anywhere; }
.placeholder { display: grid; justify-items: center; align-content: center; gap: 9px; min-height: 164px; padding: 28px 18px; border: 1.5px dashed #dedbf0; border-radius: 17px; text-align: center; background: #f9f9ffb3; }
.placeholder > .icon { width: 29px; height: 29px; margin-bottom: 4px; color: #a9a1e2; }
.placeholder h2 { margin: 0; color: #60647d; font-size: 1rem; font-weight: 600; line-height: 1.6; }
.placeholder p { margin: 0; color: #85899f; font-size: .875rem; line-height: 1.7; }
.placeholder.error { border-style: solid; border-color: #f0d5dc; background: #fff8fa; }
.placeholder.error > .icon, .placeholder.error h2 { color: #b74760; }
.placeholder.pending { border-style: solid; border-color: #ebdebe; background: #fffcf5; }
.placeholder.pending > .icon { color: #ab8537; }
.spinner { width: 27px; height: 27px; margin: 6px 0 8px; border: 3px solid #e2dcfc; border-top-color: #7c5cf5; border-radius: 50%; animation: spin .8s linear infinite; }
.code-panel { padding: 22px; border: 1px solid #ddd7fb; border-radius: 18px; background: linear-gradient(150deg, #f6f3ff, #eef4ff 65%, #f5f0ff); animation: rise .25s ease-out; }
.code-badge { display: flex; align-items: center; gap: 6px; margin: 0; color: #15803d; font-size: .875rem; font-weight: 600; }
.code-badge .icon { width: 18px; height: 18px; }
.code-value { margin: 18px 0; padding-left: .15em; text-align: center; color: #4c1d95; font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(1.35rem, 6.3vw, 3.25rem); font-weight: 800; letter-spacing: .15em; line-height: 1.3; user-select: all; overflow-wrap: anywhere; }
.code-actions { display: flex; justify-content: center; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1px solid #dcd6fb; border-radius: 10px; color: #5a32a3; background: #ffffffd9; font-size: .875rem; }
.copy-button:hover { border-color: #a99af3; background: #fff; }
.copy-button:active { background: #eee8ff; }
.copy-button .icon { width: 17px; height: 17px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 22px 0 0; padding-top: 17px; border-top: 1px dashed #d8d2f2; }
.meta-grid div { min-width: 0; }
.meta-grid dt { margin-bottom: 4px; color: #7d7e96; font-size: .875rem; }
.meta-grid dd { margin: 0; color: #43435e; font-size: .875rem; line-height: 1.7; }
.recent-mails { margin-top: 14px; padding: 15px 17px; border: 1px solid #eceaf7; border-radius: 14px; }
.recent-mails summary { color: #78768e; cursor: pointer; font-size: .875rem; }
.recent-mails ul { margin: 12px 0 0; padding-left: 20px; font-size: .875rem; line-height: 1.8; color: #5d5a73; }
.footer { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 21px 0 0; text-align: center; color: #82869d; font-size: .875rem; line-height: 1.7; }
.footer .icon { width: 14px; height: 14px; }
.toast { position: fixed; z-index: 2; left: 50%; bottom: 28px; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 12px 20px; transform: translateX(-50%); border: 1px solid #e1dafa; border-radius: 12px; color: #5a32a3; background: #fff; box-shadow: 0 8px 28px #40328b26; font-size: .875rem; }
.noscript { color: #b74760; font-size: .875rem; }
.password-settings { margin-top: 22px; border-top: 1px solid #ece8f7; }
.password-settings > summary { display: flex; align-items: center; justify-content: flex-end; width: max-content; min-height: 44px; margin-left: auto; padding-left: 12px; color: #6c4bc0; cursor: pointer; font-size: .875rem; font-weight: 600; list-style: none; border-radius: 6px; }
.password-settings > summary::-webkit-details-marker { display: none; }
.password-settings > summary:hover { color: #4c1d95; }
.password-settings > summary:focus-visible { outline: 3px solid #8b7cfc; outline-offset: 3px; }
.settings-body { padding: 0 0 3px; }
.change-target { margin: 3px 0 18px; padding: 11px 13px; border-radius: 10px; color: #63527e; background: #f5f2ff; font-size: .875rem; line-height: 1.7; overflow-wrap: anywhere; }
.password-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.password-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.password-actions .fetch-button { min-height: 44px; height: 44px; font-size: .875rem; }
.password-feedback { margin: 14px 0 0; padding: 11px 13px; border: 1px solid #f0d5dc; border-radius: 10px; color: #aa3a55; background: #fff8fa; font-size: .875rem; line-height: 1.7; }
.password-feedback.success { border-color: #cae8d4; color: #16743d; background: #f2fbf5; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) {
  .page { padding: 32px 16px; }
  .card { padding: 24px; }
  .search-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 17px 12px; }
  .password-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .fetch-button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 460px) {
  .page { align-items: start; padding: 27px 14px 30px; }
  .hero { margin-bottom: 22px; }
  .eyebrow { font-size: .8125rem; }
  .logo { width: 59px; height: 59px; margin: 17px auto; border-radius: 18px; }
  .logo .icon { width: 30px; height: 30px; }
  .subtitle { max-width: 280px; margin: 10px auto 0; font-size: .875rem; text-wrap: balance; }
  .card { padding: 20px; border-radius: 21px; }
  .search-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .input-wrap, .fetch-button { height: 52px; }
  .result-area { margin-top: 20px; }
  .placeholder { min-height: 170px; padding: 24px 14px; }
  .code-panel { padding: 18px; }
  .meta-grid { grid-template-columns: minmax(0, 1fr); }
  .footer { font-size: .8125rem; }
  .password-actions .fetch-button { grid-column: auto; width: auto; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
