:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", sans-serif;
  background: #080b14;
  color: #f3f5fa;
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 10% -10%, #213b70 0, transparent 31rem), #080b14; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100% - 32px, 960px); margin: 0 auto; padding: 52px 0 80px; }
header { margin-bottom: 24px; }
.eyebrow { color: #aabefe; font-size: .75rem; letter-spacing: .16em; font-weight: 700; margin: 0 0 9px; }
.header-row { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.12; margin-bottom: 10px; letter-spacing: -.035em; }
h2 { font-size: 1.05rem; margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .92em; }
.lede, .hint { color: #aeb8cc; }
.lede { max-width: 630px; margin-bottom: 0; }
.account { display: grid; gap: 8px; text-align: right; flex: 0 0 auto; color: #c3ccdd; font-size: .85rem; }
.card, .notice { border: 1px solid #273148; border-radius: 16px; background: rgba(18, 25, 42, .86); padding: 20px; margin: 16px 0; box-shadow: 0 14px 40px rgba(0, 0, 0, .16); }
.notice { border-color: #af842f; color: #ffe7ad; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pill { border: 1px solid #3b4967; background: #151e31; color: #bfc9dc; padding: 2px 8px; border-radius: 99px; font-size: .75rem; white-space: nowrap; }
.pill.ios { border-color: #747aca; color: #d2d5ff; }
label { display: grid; gap: 6px; color: #dfe5f2; font-size: .9rem; }
input, select, textarea { width: 100%; color: #eff3fd; background: #0c1220; border: 1px solid #35415b; border-radius: 9px; padding: 10px 11px; outline: none; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .82rem; }
input:focus, select:focus, textarea:focus { border-color: #90aaff; box-shadow: 0 0 0 3px rgba(115, 149, 255, .2); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-row { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 14px; }
.check-row label { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; accent-color: #88a5ff; }
.hint { font-size: .8rem; margin: 8px 0 0; }
.device-list { display: grid; gap: 10px; }
.device-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #2a3650; border-radius: 10px; background: #101827; cursor: pointer; }
.device-option input { width: auto; margin-top: 3px; accent-color: #88a5ff; }
.device-option span { display: grid; gap: 3px; }
.device-option small { color: #9eaac1; font-size: .78rem; }
.required { color: #ffb4ac; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.option-grid.compact { grid-template-columns: 1fr; }
.option-row { min-width: 0; display: grid; grid-template-columns: minmax(150px, .95fr) minmax(0, 1.05fr); gap: 10px; align-items: center; padding: 11px; border: 1px solid #2a3650; border-radius: 10px; background: #101827; }
.option-title, .compound-heading, .title-with-info { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.option-toggle { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; min-width: 0; }
.option-toggle input, .compound-title input { width: auto; margin-top: 3px; accent-color: #88a5ff; }
.option-toggle span { display: grid; gap: 2px; min-width: 0; }
.option-title code { color: #d9e1ff; overflow-wrap: anywhere; }
.option-title small { color: #9eaac1; font-size: .72rem; line-height: 1.35; }
.option-row input, .option-row select, .option-row textarea { min-width: 0; padding: 8px 9px; }
.option-row textarea { min-height: 64px; }
.expiration-control { display: grid; gap: 6px; min-width: 0; }
.expiration-preview { color: #9eaac1; font-size: .72rem; line-height: 1.35; }
.info-button { flex: 0 0 auto; inline-size: 1.45rem; block-size: 1.45rem; display: grid; place-items: center; padding: 0; border: 1px solid #5d75b8; border-radius: 50%; background: #18233e; color: #dce5ff; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .8rem; line-height: 1; }
.info-button:hover { background: #283a65; }
.info-button:focus-visible { outline: 3px solid rgba(115, 149, 255, .35); outline-offset: 2px; }
.flag-value { color: #aeb8cc; font-size: .8rem; }
.flag-value code { color: #d9e1ff; }
.compound-option { margin-top: 16px; padding: 14px; border: 1px solid #2a3650; border-radius: 10px; background: #101827; }
.compound-title { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-weight: 650; }
.compound-content { display: grid; gap: 12px; margin: 14px 0 0 27px; }
.compound-content[hidden] { display: none; }
.preview-card { background: #0d1422; }
#payload-preview { margin: 0; max-height: 520px; overflow: auto; padding: 14px; border-radius: 10px; background: #080d18; color: #cbd6f6; font-size: .78rem; line-height: 1.45; }
.actions { display: flex; align-items: center; gap: 14px; margin: 24px 0 0; }
button { border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 700; background: #8ba6ff; color: #071020; }
button:hover { background: #abc0ff; }
button:disabled { cursor: wait; opacity: .6; }
button.secondary, .text-button { background: transparent; color: #bbcbff; border: 1px solid #44537a; padding: 7px 10px; }
button.text-button { border: 0; padding: 0; font-size: .82rem; }
#send-status { color: #c8d1e3; font-size: .9rem; }
.result { white-space: pre-wrap; overflow-wrap: anywhere; }
.result.success { border-color: #3a856a; }
.result.error { border-color: #ae4d5d; color: #ffd3d8; }
.info-dialog { width: min(calc(100% - 32px), 620px); padding: 0; color: #edf2ff; border: 1px solid #455a88; border-radius: 16px; background: #121a2b; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); }
.info-dialog::backdrop { background: rgba(2, 5, 12, .72); }
.info-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid #2c3955; }
.info-dialog-header h2 { overflow-wrap: anywhere; }
.info-dialog-close { padding: 0; inline-size: 2rem; block-size: 2rem; border: 1px solid #4b5d84; border-radius: 50%; background: transparent; color: #dce5ff; font-size: 1.3rem; line-height: 1; }
.info-dialog-close:hover { background: #263657; }
.info-dialog section { padding: 16px 20px 0; }
.info-dialog h3 { margin: 0 0 6px; color: #aebfff; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.info-dialog p { margin: 0; color: #dfe6f7; }
.info-dialog a { display: inline-block; margin: 20px; color: #b9caff; font-weight: 700; }
@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 960px); padding-top: 28px; }
  .header-row { display: block; }
  .account { margin-top: 18px; text-align: left; justify-items: start; }
  .grid.two, .grid.three, .option-grid { grid-template-columns: 1fr; }
  .option-row { grid-template-columns: 1fr; }
  .compound-content { margin-left: 0; }
}
