:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #243347;
  background: #f4f6fa;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 48px max(20px, env(safe-area-inset-right)); }
a { color: #6754b6; text-decoration: none; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #fff;
  color: #394557;
  cursor: pointer;
}
button:hover, .button:hover { border-color: #8978ce; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #8877c9; outline-offset: 4px; }
.account-layout { max-width: 480px; margin: 3vh auto; }
.intro { margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 750; color: #243347; }
.brand img { width: 30px; height: 30px; }
.intro p, .footer-note { color: #758092; font-size: 13px; line-height: 1.8; }
.intro p { margin: 10px 0 0; }
.card { background: #fff; padding: 32px; border: 1px solid #e0e4ee; border-radius: 18px; box-shadow: 0 12px 40px #263c590b; }
h1 { font-size: 24px; line-height: 1.4; margin: 0 0 12px; letter-spacing: -.4px; overflow-wrap: anywhere; }
.card p { font-size: 14px; line-height: 1.8; color: #748092; margin: 0 0 20px; }
.card .device-context { color: #7665b5; font-size: 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
label { display: block; margin: 20px 0; color: #4d5a6c; font-size: 13px; font-weight: 550; }
input, select { display: block; width: 100%; min-height: 46px; padding: 10px 12px; margin-top: 8px; color: #26384c; background: #fff; border: 1px solid #d6dce7; border-radius: 9px; font-size: 16px; }
input:focus, select:focus { outline: 2px solid #c9bff2; outline-offset: 1px; }
input[readonly] { background: #f8f9fc; }
.primary { background: #6b56b9; border-color: #6b56b9; color: #fff; }
.primary:hover { background: #5c48a5; border-color: #5c48a5; }
.full { width: 100%; margin-top: 10px; }
.text-button { min-height: 40px; border: 0; color: #6754b6; background: transparent; padding: 8px 0; margin-top: 10px; justify-content: flex-start; }
.text-button:hover { color: #4f3c96; }
.card .note { font-size: 12px; margin: 14px 0 0; }
.card .error { margin: 18px 0 0; color: #b33f44; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .connection-note { margin: 12px 0 0; font-size: 13px; }
.device { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf0f5; }
.device:last-child { border-bottom: 0; }
.device > button { margin-left: auto; flex-shrink: 0; }
#monitorPanel { margin: 20px 0; }
#monitorPanel h2 { font-size: 16px; }
.device::before { content: ""; width: 7px; height: 7px; background: #a5aeba; border-radius: 50%; flex-shrink: 0; }
.device.online::before { background: #27956b; }
.device strong, .device small { display: block; overflow-wrap: anywhere; }
.device strong { font-size: 14px; font-weight: 600; }
.device small { color: #7b8797; font-size: 12px; margin-top: 4px; }
.card .empty { font-size: 13px; padding: 16px 0; }
details { margin-top: 24px; border-top: 1px solid #edf0f5; padding-top: 18px; }
summary { cursor: pointer; font-size: 13px; color: #748092; }
details button { margin: 12px 8px 0 0; font-size: 13px; }
.text-link { display: block; font-size: 13px; margin-top: 18px; }
.qr-area { display: flex; gap: 18px; align-items: center; margin-top: 18px; }
.qr-area img { border: 1px solid #e3e6ef; border-radius: 10px; background: #fff; padding: 6px; }
.qr-area p { font-size: 12px; margin-bottom: 0; }
#createdKey { font-family: ui-monospace, monospace; font-size: 14px; }
.footer-note { text-align: center; margin: 20px 0 0; }
@media (max-width: 600px) {
  body { padding: 24px 16px max(24px, env(safe-area-inset-bottom)); }
  .account-layout { margin: 0 auto; }
  .intro { margin-bottom: 22px; }
  .card { padding: 24px; border-radius: 16px; }
  h1 { font-size: 22px; }
  .qr-area { align-items: flex-start; gap: 12px; }
  .qr-area img { width: 120px; height: 120px; }
}
