:root { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #18312f; background: #f3f6f4; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 72px 28px 32px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: #367869; }
h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; margin: 18px 0 12px; }
header p, .hint, footer { color: #647672; line-height: 1.6; }
.workspace { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; margin-top: 38px; }
.panel { padding: 28px; border: 1px solid #dce5df; background: white; border-radius: 16px; }
.panel { min-width: 0; }
.input-table { border: 1px solid #dce5df; border-radius: 10px; overflow: hidden; }
.input-table table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.input-table caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.input-table thead { background: #edf3ef; color: #49645b; font-size: 12px; }
.input-table th, .input-table td { padding: 14px 12px; vertical-align: top; }
.input-table th:first-child { width: 32%; }
.input-table tbody th { background: #f8faf8; }
.input-table tbody tr + tr { border-top: 1px solid #dce5df; }
.input-table label { margin: 10px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.input-table label span { display: block; font-size: 11px; margin-top: 5px; }
.input-table input { min-width: 0; padding: 10px; font: inherit; font-size: 13px; }
.input-table input[type="file"] { padding: 8px; font-size: 12px; }
.input-table .hint { margin: 10px 0 0; }
.input-table a { color: #216b58; }
select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #cbd9d1; border-radius: 8px; background: #fbfcfb; color: inherit; font: inherit; font-size: 13px; }
select:focus-visible { outline: 3px solid #8bc6b5; outline-offset: 3px; }
button.secondary { width: auto; margin-top: 12px; padding: 7px 10px; background: #edf3ef; color: #216b58; font-size: 12px; }
h2 { font-size: 19px; margin: 0 0 26px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
label span { color: #647672; font-weight: 400; }
input, textarea { width: 100%; padding: 14px; border: 1px solid #cbd9d1; border-radius: 8px; background: #fbfcfb; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #8bc6b5; outline-offset: 3px; }
textarea { resize: vertical; font: 14px/1.6 monospace; }
.hint { font-size: 12px; margin: 9px 0 24px; }
button { display: flex; justify-content: space-between; width: 100%; padding: 15px 18px; border: 0; border-radius: 8px; background: #216b58; color: white; font-size: 15px; font-weight: 600; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.result-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#badge { border-radius: 20px; background: #eaf3ee; padding: 5px 10px; color: #216b58; font-size: 12px; text-transform: capitalize; }
#status { color: #647672; line-height: 1.6; overflow-wrap: anywhere; }
#result-image { width: 100%; margin-top: 24px; border-radius: 8px; }
.result-stack { display: grid; gap: 24px; align-content: start; min-width: 0; }
#structure-viewer { position: relative; height: 380px; width: 100%; margin-top: 18px; border: 1px solid #dce5df; border-radius: 8px; overflow: hidden; touch-action: none; }
.viewer-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.viewer-controls button.secondary { margin-top: 0; }
.output-image { width: 100%; margin-top: 24px; border-radius: 8px; }
#structure-status { color: #647672; line-height: 1.6; overflow-wrap: anywhere; }
#structure-badge { border-radius: 20px; background: #eaf3ee; padding: 5px 10px; color: #216b58; font-size: 12px; text-transform: capitalize; }
.download { display: inline-block; color: #216b58; font-weight: 600; margin-top: 18px; }
[hidden] { display: none !important; }
footer { font-size: 12px; margin-top: 24px; }
footer a { color: #216b58; }
@media (max-width: 700px) { main { padding: 36px 18px; } .workspace { grid-template-columns: 1fr; } .panel { padding: 22px; } }
