:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: #f2f2f7; color: #1c1c1e; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f2f2f7; }
button, input { font: inherit; }
.app-shell { width: min(100%, 560px); margin: 0 auto; padding: max(72px, calc(env(safe-area-inset-top) + 42px)) 20px 24px; flex: 1; }
h1 { margin: 0; text-align: center; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: .02em; }
.card { background: #fff; border-radius: 18px; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.input-card { margin-top: 50px; padding: 8px 16px 16px; }
.input-row { display: flex; align-items: center; min-height: 56px; gap: 10px; color: #8e8e93; font-size: 24px; border-bottom: 1px solid #e5e5ea; }
input { min-width: 0; width: 100%; border: 0; outline: 0; color: #1c1c1e; font-size: 20px; background: transparent; }
input::placeholder { color: #c7c7cc; }
.message { min-height: 17px; margin: 8px 2px 7px; color: #ff3b30; font-size: 12px; line-height: 17px; }
.message:empty { visibility: hidden; }
button { min-height: 48px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 600; -webkit-tap-highlight-color: transparent; transition: opacity .15s ease, transform .15s ease; }
button:active { opacity: .72; transform: scale(.985); }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(0,122,255,.3); outline-offset: 2px; }
.primary { width: 100%; background: #007aff; color: #fff; }
.result-card { margin-top: 18px; padding: 18px 16px 20px; }
h2 { margin: 0 0 14px; color: #8e8e93; font-size: 14px; font-weight: 500; }
output { display: block; min-height: 29px; color: #1c1c1e; font-size: 20px; line-height: 1.5; font-weight: 600; word-break: break-all; }
output.empty { color: #8e8e93; font-weight: 400; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 560px); margin: 0 auto; padding: 12px 20px max(20px, calc(env(safe-area-inset-bottom) + 12px)); background: rgba(242,242,247,.92); }
.actions button { background: #fff; color: #007aff; }
.actions button:disabled { color: #c7c7cc; cursor: default; }
@media (min-width: 640px) { .app-shell { padding-left: 0; padding-right: 0; } .actions { padding-left: 0; padding-right: 0; } }
