:root {
  color-scheme: light;
  --ice: #dcf3f7;
  --navy: #103460;
  --gold: #bd9340;
  --ink: #17202b;
  --muted: #596b7d;
  --line: #d6e3ea;
  --white: #fff;
  --soft: #f5fafb;
  --danger: #8c2c2c;
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ice); }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, var(--ice) 0 19rem, #f5fafb 19rem 100%); min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
[hidden] { display: none !important; }

.topbar { min-height: 76px; padding: 12px max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--white); background: var(--navy); box-shadow: 0 4px 18px #10346020; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #ffffff7c; border-radius: 50%; color: #f6da9f; font-size: 22px; font-weight: 800; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy small { color: #ccdae6; font-size: 9px; letter-spacing: .11em; }
.brand-copy strong { font-size: 14px; letter-spacing: .04em; }
.page-label { padding: 8px 13px; border: 1px solid #ffffff4c; border-radius: 999px; color: #f4d68e; font-size: 13px; }
.page-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 30px; }
.line-browser-help { margin: 0 0 18px; padding: clamp(18px, 3vw, 24px); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; border: 2px solid #a86c17; border-radius: 14px; color: var(--ink); background: #fff9e9; box-shadow: 0 8px 22px #10346012; }
.line-browser-help-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #8c5b16; font-size: 25px; font-weight: 900; }
.line-browser-eyebrow { margin: 0 0 5px; color: #704b12; font-size: 13px; font-weight: 900; }
.line-browser-help h2 { margin: 0; color: #183752; font-size: clamp(19px, 2.4vw, 23px); line-height: 1.35; }
.line-browser-help-copy { margin: 8px 0 14px; color: #34495d; font-size: 15px; line-height: 1.7; }
.line-browser-help :focus-visible { outline: 3px solid #c17a15; outline-offset: 3px; }
.line-browser-open { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 16px; text-decoration: none; }
.line-browser-fallback { margin-top: 15px; padding-top: 13px; border-top: 1px solid #e5d8bc; }
.line-browser-fallback-copy { margin: 0 0 8px; color: #34495d; font-size: 14px; font-weight: 700; line-height: 1.6; }
.line-browser-copy { min-height: 48px; font-size: 15px; }
.line-browser-url { width: min(100%, 540px); min-height: 46px; margin: 10px 0 0; padding: 0 12px; border: 2px solid #54778c; border-radius: 8px; color: #183752; background: #fff; font-size: 15px; user-select: all; }
.line-browser-copy-message { min-height: 1.5em; margin: 9px 0 0; color: #246342; font-size: 14px; font-weight: 700; line-height: 1.6; }
.line-browser-copy-message:empty { display: none; }
.line-browser-paste-help { margin: 6px 0 0; color: #465969; font-size: 14px; line-height: 1.7; }
.page-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 4px 12px; }
.eyebrow { margin: 0 0 10px; color: var(--navy); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; color: var(--gold); font-size: clamp(27px, 3.6vw, 36px); line-height: 1.2; letter-spacing: .06em; }
.page-intro h1 { color: #234950 !important; }
.intro-guide-link { margin: 0; font-size: 12px; }
.intro-guide-link a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid #c6d6df; border-radius: 999px; color: var(--navy); background: #ffffffa8; font-weight: 700; text-decoration: none; text-underline-offset: 3px; }
.intro-guide-link a:hover { text-decoration: underline; }
.lookup-panel { margin-top: 0; padding: clamp(17px, 3vw, 25px); }
.lookup-panel .panel-heading { margin-bottom: 14px; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 15px; padding: 9px 12px; border-left: 3px solid var(--gold); border-radius: 0 9px 9px 0; background: #f6fafb; }
.privacy-note p { margin: 0; color: #34495d; font-size: 12px; line-height: 1.55; }
.note-icon { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #e8f4f5; font-size: 10px; font-weight: 800; }
.panel { margin: 18px 0; padding: clamp(20px, 4vw, 32px); border: 1px solid #dbe7eb; border-radius: 16px; background: var(--white); box-shadow: 0 14px 36px #1034600b; }
.panel-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.step-number { color: var(--gold); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 21px; letter-spacing: .04em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.results-heading { align-items: center; }
.results-heading > div { flex: 1 1 auto; }
.requery-button { flex: 0 0 auto; min-height: 38px; padding-inline: 13px; white-space: nowrap; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; color: #34495d; font-size: 13px; font-weight: 700; }
.field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #bdced9; border-radius: 9px; outline: 0; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: #36749b; box-shadow: 0 0 0 3px #36749b20; }
.field input::placeholder { color: #9baab5; }
.captcha-row { margin-top: 18px; display: flex; align-items: flex-end; gap: 14px; }
.captcha-field { width: min(100%, 300px); }
.captcha-image-group { min-height: 64px; display: flex; align-items: center; gap: 9px; }
.captcha-image { display: block; width: 204px; max-width: 100%; height: 64px; border: 1px solid #bdced9; border-radius: 8px; background: #f7fbfc; object-fit: contain; }
.captcha-refresh { min-height: 42px; padding-inline: 13px; white-space: nowrap; }
.captcha-help, .captcha-message { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.captcha-message:empty { display: none; }
.captcha-message.error { color: var(--danger); }
.challenge-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; }
.turnstile-slot { min-height: 56px; display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.button { min-height: 45px; padding: 0 18px; border: 0; border-radius: 8px; font-size: 14px; font-weight: 800; transition: transform .15s, background .15s, box-shadow .15s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--navy); box-shadow: 0 5px 12px #10346020; }
.button-primary:not(:disabled):hover { background: #194879; }
.button-secondary { color: var(--navy); border: 1px solid #b9cad7; background: #f4f9fa; }
.button-muted { color: #52677b; border: 1px solid #d6e0e6; background: #edf2f5; }
.message { min-height: 1.4em; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.message.error { color: var(--danger); }
.message.success { color: #246342; }
.identity-summary { margin: -4px 0 17px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; border-radius: 9px; background: var(--soft); }
.identity-summary span { color: #405569; font-size: 13px; }
.identity-summary strong { margin-left: 6px; color: var(--navy); font-size: 15px; }
.report-choices { display: grid; gap: 10px; }
.report-choice-row { display: grid; gap: 5px; }
.report-choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 66px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.report-choice:has(input:checked) { border-color: #37779a; background: #f2f9fa; box-shadow: 0 0 0 2px #37779a12; }
.report-choice input { width: 18px; height: 18px; accent-color: var(--navy); }
.choice-main { display: grid; gap: 4px; }
.choice-format { color: #8c6724; font-size: 17px; font-weight: 900; letter-spacing: .03em; overflow-wrap: anywhere; word-break: break-word; }
.choice-identity { color: var(--navy); font-size: 14px; font-weight: 700; }
.choice-main small { color: var(--muted); font-size: 12px; }
.choice-main .choice-uploader { color: #405569; }
.status-pill { padding: 6px 9px; border-radius: 999px; color: #266344; background: #e6f3eb; font-size: 11px; white-space: nowrap; }
.status-pill.not_yet { color: #775215; background: #fff4d9; }
.status-pill.expired { color: #7e3333; background: #f8e8e8; }
.report-choice.unavailable { cursor: not-allowed; opacity: .88; }
.window-details-button { justify-self: start; padding: 4px 8px; border: 0; color: #75551d; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.consent-launch { margin-top: 18px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dbe7eb; border-radius: 11px; background: #fbfdfd; }
.consent-launch p { margin: 0; color: #394f63; font-size: 13px; line-height: 1.6; }
.format-switcher { margin: 0 0 17px; padding: 14px; border: 1px solid #dbe7eb; border-radius: 11px; background: #f7fbfc; }
.format-switcher-label { display: block; margin-bottom: 9px; color: #34495d; font-size: 12px; font-weight: 800; }
.action-report-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.format-switch-button { min-height: 40px; padding: 8px 13px; border: 1px solid #b9cad7; border-radius: 8px; color: var(--navy); background: #fff; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; word-break: break-word; text-align: left; }
.format-switch-button[aria-pressed="true"] { border-color: #37779a; color: #fff; background: #37779a; }
.format-switcher p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.modal-dialog { width: min(570px, calc(100% - 24px)); max-height: min(90vh, 760px); overflow: auto; padding: clamp(20px, 5vw, 30px); border: 1px solid #cfdde5; border-radius: 16px; color: var(--ink); background: var(--white); box-shadow: 0 22px 70px #0d27404c; }
.modal-dialog::backdrop { background: #0b233b9c; backdrop-filter: blur(3px); }
.modal-heading { margin-bottom: 18px; }
.modal-heading .eyebrow { margin-bottom: 6px; }
.modal-heading h2 { margin: 0; color: var(--navy); font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.warning-copy { color: #513a19; line-height: 1.8; }
.warning-dialog { border-top: 5px solid var(--gold); }
.legal-copy, .password-note { margin: 0 0 12px; color: #394f63; font-size: 13px; line-height: 1.8; }
.legal-copy strong, .password-note strong { color: var(--navy); }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 18px; color: #34495d; font-size: 13px; line-height: 1.65; }
.check-row input { flex: 0 0 17px; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--navy); }
.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.download-note { margin: 17px 0; }
.session-footer { margin-top: 22px; padding-top: 15px; border-top: 1px solid #e4ecef; text-align: right; }
.text-button { padding: 6px 0; border: 0; color: #596b7d; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 20px 4px 0; color: #607386; font-size: 11px; }
.page-footer a { color: var(--navy); text-decoration: none; }

@media (max-width: 620px) {
  .topbar { min-height: 66px; padding-inline: 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-copy small { font-size: 8px; }
  .brand-copy strong { font-size: 12px; }
  .page-label { padding: 7px 9px; font-size: 11px; }
  .page-shell { width: min(100% - 24px, 920px); padding-top: 18px; }
  .line-browser-help { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .line-browser-help-icon { display: none; }
  .line-browser-open, .line-browser-copy { width: 100%; }
  .page-intro { gap: 8px 10px; margin-bottom: 9px; }
  h1 { font-size: clamp(25px, 7vw, 30px); }
  .intro-guide-link { font-size: 11px; }
  .intro-guide-link a { min-height: 32px; padding-inline: 10px; }
  .lookup-panel { padding: 17px; }
  .privacy-note { margin-bottom: 13px; padding: 8px 10px; }
  .results-heading { gap: 10px; }
  .results-heading > div { min-width: 0; }
  .requery-button { min-height: 36px; padding-inline: 10px; font-size: 12px; }
  .field-grid { grid-template-columns: 1fr; }
  .captcha-row { align-items: stretch; flex-direction: column; }
  .captcha-field { width: 100%; }
  .captcha-image-group { max-width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .challenge-row { align-items: flex-end; flex-direction: column; }
  .challenge-row .button { width: 100%; }
  .turnstile-slot { align-self: flex-start; }
  .report-choice { grid-template-columns: auto 1fr; }
  .status-pill { grid-column: 2; justify-self: start; }
  .consent-launch { align-items: stretch; flex-direction: column; }
  .consent-launch .button { width: 100%; }
  .page-footer { flex-direction: column; }
}
