/* v2.9.4: font-loader.js verifies and loads the user-supplied SFProTH.
   A runtime @font-face rule is also copied into the PDF render document. */
:root{--font-en:'SFProTH','Google Sans Flex',system-ui,-apple-system,BlinkMacSystemFont,sans-serif;--font-th:var(--font-en);--app-font-en:var(--font-en);--app-font-th:var(--font-en);--ios-ui-font-en:var(--font-en);--ios-ui-font-th:var(--font-en);--ios-ui-font:var(--font-en)}
body,button,input,textarea,select{font-family:var(--font-en);font-kerning:normal;font-optical-sizing:auto}
body{font-weight:400;letter-spacing:0}
input,textarea,select{letter-spacing:normal!important}
.ios-brand-title{font-size:29px;line-height:1.16;letter-spacing:-.025em;font-weight:680}
.ios-brand-subtitle{font-size:13px;font-weight:400;line-height:1.55;letter-spacing:normal}
.ios-section-head h2{font-size:20px;line-height:1.35;font-weight:650;letter-spacing:-.015em}
.ios-report-card h3{max-width:18ch;font-size:23px;line-height:1.25;letter-spacing:-.02em;font-weight:650}
.ios-report-card p{font-size:13px;line-height:1.55;font-weight:400;max-width:none}
.ios-recent-title{font-size:14px;line-height:1.45;font-weight:600;letter-spacing:-.008em}
.ios-recent-meta{font-size:12px;line-height:1.5;font-weight:400}
.ios-quick-tile{font-size:12px;font-weight:550}
.ios-stat strong{font-size:24px;font-weight:650;line-height:1.2}
.ios-stat span{font-size:12px;line-height:1.45}
.ios-settings-title{font-size:15px;font-weight:550;line-height:1.45}
.ios-settings-sub,.ios-connection-subtitle{font-size:12.5px;line-height:1.55}
.ios-tabbar button{font-size:11px;font-weight:550;line-height:1.25}
#app.ios-report-page .title h1{font-size:18px!important;font-weight:650!important;line-height:1.35!important;letter-spacing:-.015em!important}
#app.ios-report-page label{font-size:13px;line-height:1.5;font-weight:550}
#app.ios-report-page .ios-section-label{font-size:11.5px!important;font-weight:550!important;line-height:1.5}
#app.ios-report-page .help,#app .excursion-typography-help,#app .excursion-auto-help,#app .location-tag-help{font-size:12px;line-height:1.6;font-weight:400;letter-spacing:normal}
#app.ios-report-page #reportNote,#app.ios-report-page .client-report{font-size:16px!important;line-height:1.65!important;font-weight:400!important;padding:14px 16px;letter-spacing:normal!important}
#app.ios-report-page .btn{font-size:14px;line-height:1.45;font-weight:600;letter-spacing:-.004em}
#app.ios-report-page .btn-small{font-size:12px;font-weight:550}
#app.ios-report-page .desktop-actions .btn{min-height:46px;padding:11px 18px}
.tdr-ui-th,.tdr-th-run{letter-spacing:normal!important}
.tdr-th-run{font-family:var(--font-th)!important;font-style:normal;font-weight:inherit}
.client-pdf-title,.excursion-pdf-title,.excursion-long-title{letter-spacing:-.018em}
.client-pdf-card-name{letter-spacing:-.01em}
.client-pdf-card-right,.client-pdf-note-text,.excursion-pdf-item-body,.excursion-pdf-outcome-text,.excursion-long-content{letter-spacing:.004em;overflow-wrap:anywhere}
.client-pdf-card-right,.client-pdf-note-text{line-height:1.48}
.client-pdf-card-right p,.client-pdf-note-text p,.excursion-pdf-item-body p,.excursion-long-paragraph{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.excursion-pdf-outcome-text{white-space:pre-wrap}
.client-pdf-card-right.tdr-has-thai,.client-pdf-note-text.tdr-has-thai,.excursion-pdf-item-body.tdr-has-thai,.excursion-long-paragraph.tdr-has-thai,.excursion-pdf-outcome-text.tdr-has-thai{line-height:1.62}
.client-pdf-note-label,.excursion-pdf-meta-label{letter-spacing:.06em}
.tdr-language-switch{display:inline-flex;flex:0 0 auto;gap:2px;padding:3px;border:1px solid var(--app-line,#ddd);border-radius:13px;background:var(--app-bg,#f5f5f7)}
.tdr-language-switch button{appearance:none;min-width:40px;min-height:34px;margin:0;padding:7px 9px;border:0;border-radius:10px;background:transparent;color:var(--app-secondary,#777);font:600 12px/1.2 var(--font-en);letter-spacing:.02em;cursor:pointer}
.tdr-language-switch button.is-active{background:#fff;color:#32352f;box-shadow:0 1px 4px #00000018}
.tdr-language-switch button:focus-visible{outline:2px solid #8670e1;outline-offset:2px}
.tdr-editor-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:4px 10px 8px;font-size:12px;color:var(--app-secondary)}
.tdr-language-card,.tdr-motion-card{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px;padding:16px;border:.5px solid var(--app-line);border-radius:18px;background:var(--app-surface,#fff)}
.tdr-language-card strong,.tdr-motion-card strong{font-size:14px;font-weight:600;line-height:1.5}
.tdr-language-card p,.tdr-motion-card p{margin:4px 0 0;font-size:12px;font-weight:400;line-height:1.55;color:var(--app-secondary)}
.tdr-motion-card input{width:20px;height:20px;flex:0 0 auto;accent-color:#7657f5}
html[data-theme=dark] .tdr-language-switch{background:#222328;border-color:#ffffff17}
html[data-theme=dark] .tdr-language-switch button.is-active{background:#393b41;color:#fafafc}
html[data-theme=dark] .tdr-language-card,html[data-theme=dark] .tdr-motion-card{background:#1a1b1f}
@media(max-width:640px){.ios-home-header{flex-wrap:wrap;gap:14px;margin-bottom:18px}.ios-home-header .ios-brand-lockup{width:100%}.ios-home-header .ios-header-actions{width:100%;justify-content:flex-end}.ios-home-header .tdr-language-switch{margin-right:auto}.ios-brand-title{font-size:clamp(22px,5.8vw,26px)}.ios-brand-subtitle{font-size:12px}.ios-report-card h3{font-size:20px;line-height:1.3}.ios-report-card p{font-size:12px;line-height:1.6}.ios-section-head h2{font-size:18px}.ios-quick-tile{font-size:11px}.ios-recent-title{font-size:13px}.ios-recent-meta{font-size:11.5px}.tdr-language-switch button{min-height:38px;min-width:44px}.tdr-language-card{flex-wrap:wrap}.tdr-language-card>div:first-child{flex:1 1 180px}.history-actions .btn{white-space:normal;line-height:1.4!important}}
.ios-settings-title,.ios-settings-sub{display:block}
.ios-settings-row>span:nth-child(2){min-width:0}
.ios-settings-title{margin-bottom:3px}
#tdrMotionToggle{appearance:none;-webkit-appearance:none;width:44px;height:26px;min-width:44px;margin:0;padding:3px;border:0;border-radius:16px;background:#72737a;cursor:pointer;transition:background-color 160ms ease}
#tdrMotionToggle::before{content:'';display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transform:translateX(0);transition:transform 180ms ease}
#tdrMotionToggle:checked{background:#7657f5}
#tdrMotionToggle:checked::before{transform:translateX(18px)}
#tdrMotionToggle:focus-visible{outline:2px solid #9e8ae9;outline-offset:3px}
html[data-motion=off] #tdrMotionToggle::before{transition:none}
@media(prefers-reduced-motion:reduce){#tdrMotionToggle::before{transition:none}}

/* SFProTH is limited to Thai code points; existing Latin typography stays intact. */
:lang(th).tdr-ui-th,[lang=th].th{letter-spacing:normal}
#historyBackdrop input,#pdfFileViewer button{font-family:var(--font-en)!important}

/* v2.9.4 font diagnostics: no layout or symbol-font overrides. */
.tdr-ui-th{font-family:var(--font-th)!important}
.tdr-font-card{margin-top:12px;padding:18px;border:1px solid var(--app-line,#ddd);border-radius:18px;background:var(--app-surface,#fff);color:var(--app-label,#222);font-family:var(--font-th);letter-spacing:normal}
.tdr-font-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tdr-font-top strong{font-size:15px;line-height:1.5;font-weight:650}
.tdr-font-card p{margin:8px 0 0;font-size:12px;line-height:1.65;color:var(--app-secondary,#666);overflow-wrap:anywhere}
.tdr-font-badge{padding:4px 9px;border-radius:99px;background:#bd781219;color:#9a6018;font-size:11px;font-weight:600;white-space:nowrap}
.tdr-font-badge[data-ready=true]{color:#477d44;background:#4c95451c}
.tdr-font-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.tdr-font-actions button,.tdr-font-notice button{appearance:none;min-height:42px;padding:9px 14px;border:1px solid var(--app-line,#ddd);border-radius:11px;background:var(--app-bg,#f5f5f7);color:var(--app-label,#222);font:550 12px/1.5 var(--font-th);cursor:pointer}
.tdr-font-actions button:focus-visible,.tdr-font-notice button:focus-visible,.tdr-font-samples summary:focus-visible{outline:2px solid #9174e8;outline-offset:3px}
.tdr-font-actions button:disabled{opacity:.5;cursor:wait}
.tdr-font-card #tdrFontError{color:#b23535}
.tdr-font-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;margin:-2px 0 18px;border:1px solid #b5813530;border-radius:14px;background:#c4922510;font:400 12px/1.6 var(--font-th);color:var(--app-label,#333)}
.tdr-font-notice button{flex-shrink:0}
.tdr-font-notice[hidden],.tdr-font-card [hidden]{display:none!important}
.tdr-font-samples{margin-top:14px;padding-top:12px;border-top:1px solid var(--app-line,#ddd)}
.tdr-font-samples summary{font-size:12px;font-weight:550;cursor:pointer;line-height:1.6}
.tdr-font-card .tdr-font-sample{font-family:'SFProTH',sans-serif;font-size:18px;line-height:1.7;letter-spacing:normal;color:var(--app-label,#222)}
.tdr-font-sample.regular{font-weight:400}.tdr-font-sample.medium{font-weight:600}.tdr-font-sample.bold{font-weight:700}
html[data-theme=dark] .tdr-font-badge{color:#ecc07f;background:#9e6c2022}
html[data-theme=dark] .tdr-font-badge[data-ready=true]{color:#b4d3a7;background:#52844222}
html[data-theme=dark] .tdr-font-card #tdrFontError{color:#ff9c9c}
@media(max-width:360px){.tdr-font-notice{align-items:flex-start;flex-direction:column;gap:8px}.tdr-font-actions button{flex:1 1 auto}}
