:root { color-scheme: dark; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #061326; color: #e8eef5; }
* { box-sizing: border-box; }
body { margin: 0; }
.sign-page { height: 100vh; height: 100dvh; min-height: 320px; margin: auto; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 12px; }
.eyebrow { color: #d5b879; font-size: 11px; letter-spacing: .18em; }
h1 { font-family: "STSong", "SimSun", serif; font-size: clamp(22px, 2.5vw, 28px); font-weight: 400; letter-spacing: .08em; margin: 4px 0; }
header p { color: #a4bad4; font-size: 13px; margin: 0; line-height: 1.5; }
.writing-area { position: relative; flex: 1; min-height: 180px; background: #0a1c35; border: 1px solid #29415c; overflow: hidden; }
#signature { display: block; width: 100%; height: 100%; position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.corner-label { position: absolute; left: 20px; top: 16px; font-size: 12px; letter-spacing: .18em; color: #91aac4; pointer-events: none; }
#writing-hint { position: absolute; left: 0; right: 0; top: 48%; text-align: center; color: #728aa5; font-family: "STSong", "SimSun", serif; letter-spacing: .2em; font-size: clamp(18px, 3vw, 28px); pointer-events: none; }
.baseline { position: absolute; bottom: 22%; left: 8%; right: 8%; border-bottom: 1px dashed #314863; pointer-events: none; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-right: clamp(48px, 6vw, 96px); padding-bottom: 36px; }
#sign-status { color: #a4bad4; font-size: 13px; line-height: 1.5; margin: 0; }
#sign-status.error { color: #ffb6a6; }
#sign-status.success { color: #dcca9a; }
.actions { display: flex; gap: 14px; flex-shrink: 0; }
button { font: inherit; font-size: 16px; min-height: 48px; padding: 10px 24px; background: transparent; color: #bccde0; border: 1px solid #38516c; border-radius: 3px; cursor: pointer; }
#confirm { background: #dec184; color: #142236; border-color: #dec184; font-weight: 600; padding-inline: 30px; }
#confirm span { margin-left: 18px; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible { outline: 2px solid #f2d798; outline-offset: 4px; }
#submit-loading { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(2, 9, 20, .72); color: #e6c987; outline: none; }
#submit-loading[hidden] { display: none; }
.loading-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; width: min(340px, 100%); min-height: 230px; padding: 32px 24px; background: #0a1c35; border: 1px solid #51617a; border-radius: 8px; box-shadow: 0 18px 60px rgba(0, 7, 18, .5); text-align: center; }
#submit-loading strong { font-size: 22px; font-weight: 500; letter-spacing: .08em; }
.loading-box > span:last-child { color: #a4bad4; font-size: 14px; }
.loading-spinner { width: 38px; height: 38px; border: 3px solid #3d4650; border-top-color: #e6c987; border-radius: 50%; animation: loading-spin .85s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation: none; } }
@media (max-width: 650px) { footer { flex-direction: column; align-items: stretch; gap: 8px; } .actions button { flex: 1; min-width: 0; padding-inline: 12px; } #confirm span { margin-left: 8px; } }
@media (max-height: 600px) and (min-width: 651px) { .sign-page { gap: 8px; } footer { padding-bottom: 28px; } h1 { font-size: 22px; margin: 2px 0; } header p { font-size: 12px; } }
