:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #263445; background: #f6f8fb; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 560px; margin: auto; padding: 18px 16px 12px; }
.app-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; background: #1662aa; color: white; font-size: 17px; font-weight: 700; }
h1 { margin: 0; color: #172c43; font-size: 20px; line-height: 1.15; letter-spacing: -.025em; }
.app-purpose { margin: 3px 0 0; color: #647084; font-size: 11px; }
.badge { margin-left: auto; border: 1px solid #dce4ef; border-radius: 20px; padding: 3px 7px; color: #647084; font-size: 10px; }
p { line-height: 1.5; }
h2 { margin: 0; font-size: 15px; font-weight: 650; color: #263445; }
h3 { margin: 0; font-size: 12px; font-weight: 650; }
.note { margin: 7px 0; color: #677489; font-size: 12px; }
.mail-context, .workspace { padding: 15px; border: 1px solid #dfe5ee; border-radius: 10px; background: white; }
.mail-context { margin-bottom: 12px; padding: 12px 14px; }
.mail-context h2 { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #738095; }
#subject { overflow-wrap: anywhere; white-space: pre-wrap; margin: 6px 0 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.section-heading .note { margin: 4px 0 15px; }
form { margin: 0; }
form label { display: block; margin-bottom: 6px; color: #4f5d72; font-size: 11px; font-weight: 600; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px; }
input[type="search"] { min-width: 0; width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #b6c2d2; border-radius: 6px; color: #263445; background: white; font: inherit; font-size: 13px; }
input::placeholder { color: #8b96a6; }
button { min-height: 38px; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; background: #1662aa; color: white; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
button:hover:not(:disabled) { background: #0f5294; }
button.secondary { border-color: #d5deea; background: white; color: #315b87; }
button.secondary:hover:not(:disabled) { background: #f0f5fc; }
button:disabled { border-color: #dce1e9; background: #edf0f5; color: #737e8f; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #3278c8; outline-offset: 2px; }
input:disabled { background: #f1f3f7; color: #737e8f; }
#search-status { min-height: 18px; margin: 9px 0 0; color: #677489; font-size: 12px; line-height: 1.5; }
ul { list-style: none; padding: 0; margin: 0; }
#results { max-height: 300px; overflow-y: auto; margin-top: 9px; }
#results:empty { margin-top: 0; }
#results li { border-top: 1px solid #e9edf3; padding: 10px 0; overflow-wrap: anywhere; }
#results li label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; line-height: 1.45; }
input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin: 1px 0 0; accent-color: #1662aa; }
#more { width: 100%; margin-top: 9px; }
#selection-section { margin-top: 13px; padding: 11px; border: 1px solid #d7e6f7; border-radius: 7px; background: #f2f7fe; }
#selection-count { color: #315b87; }
#selection { margin-top: 4px; }
#selection li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
#selection li span { min-width: 0; }
#selection button { min-height: 30px; padding: 5px 7px; flex-shrink: 0; border-color: #d5e1f0; background: white; color: #526780; font-size: 11px; font-weight: 500; }
.classification { margin: 13px 0 16px; }
#classify { width: 100%; min-height: 42px; font-size: 14px; }
#classification-status { margin: 7px 3px 0; font-size: 11px; line-height: 1.5; }
details { color: #647084; font-size: 12px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "⌄"; color: #7d899a; flex-shrink: 0; }
details[open] > summary::after { transform: rotate(180deg); }
.connection-details { margin-top: 13px; padding-top: 9px; border-top: 1px solid #e9edf3; }
.details-body { padding-top: 10px; }
#connect { width: 100%; }
.diagnostics { padding: 0 2px; }
.diagnostics > summary { color: #65748a; font-size: 11px; }
.diagnostics > .details-body { margin-top: 8px; padding: 13px; border: 1px solid #dfe5ee; border-radius: 8px; background: white; }
.diagnostic-section + .diagnostic-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e4eaf2; }
.diagnostic-section h2 { margin-bottom: 8px; font-size: 12px; }
.diagnostic-section button { width: 100%; }
.diagnostic-section details { margin-top: 10px; }
.button-stack { display: grid; gap: 7px; }
pre { margin: 10px 0 0; padding: 9px; border: 1px solid #e3e8f0; border-radius: 5px; background: #f6f8fb; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
#recovery-receipt-label { display: block; margin-top: 12px; font-size: 11px; }
#recovery-receipt { width: 100%; min-height: 160px; margin-top: 5px; padding: 8px; border: 1px solid #d5deea; border-radius: 5px; color: #526780; background: #f6f8fb; font: 10px ui-monospace, monospace; }
.app-footer { margin-top: 18px; text-align: right; color: #98a2b1; font-size: 10px; }
.preview-card { padding: 14px; margin: 12px 0 16px; border: 1px solid #bdd3ec; border-radius: 10px; background: white; }
.preview-destination { color: #315b87; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
#preview-files { margin: 10px 0 12px; }
#preview-files li { padding: 9px 0; border-top: 1px solid #e9edf3; font-size: 12px; overflow-wrap: anywhere; line-height: 1.5; }
#confirm-classification { width: 100%; }
#preview-details { margin-top: 12px; }
[hidden] { display: none !important; }
@media (max-width: 330px) { main { padding-left: 12px; padding-right: 12px; } .mail-context, .workspace { padding-left: 12px; padding-right: 12px; } .search-row { grid-template-columns: minmax(0, 1fr); } }
