:root { color-scheme: light dark; --bg: var(--tg-theme-bg-color, #0e1625); --text: var(--tg-theme-text-color, #eaf0fa); --hint: var(--tg-theme-hint-color, #9ca9b9); --button: var(--tg-theme-button-color, #417df5); --button-text: var(--tg-theme-button-text-color, #ffffff); --surface: var(--tg-theme-secondary-bg-color, #19263a); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui,-apple-system,Segoe UI,sans-serif; }
.wrap { max-width: 640px; margin: auto; padding: 24px 16px calc(38px + env(safe-area-inset-bottom)); }
.hero { padding: 9px 2px 15px; }
.eyebrow { font-size: 11px; letter-spacing: .17em; color: var(--hint); font-weight: 750; }
h1 { margin: 7px 0 8px; font-size: 30px; letter-spacing: -.035em; }
p { margin: 0; color: var(--hint); }
.section { margin: 13px 0; padding: 18px; background: var(--surface); border-radius: 16px; display: flex; flex-direction: column; gap: 9px; }
label { font-weight: 650; font-size: 14px; margin-top: 8px; }
label:first-child { margin-top: 0; }
label span { color: #f58c8c; }
small { float: right; color: var(--hint); font-weight: 400; }
input:not([type=file]), select, textarea { width: 100%; min-height: 44px; padding: 12px 13px; border-radius: 10px; background: var(--bg); color: var(--text); border: 1px solid color-mix(in srgb,var(--hint),transparent 65%); font: inherit; }
input[type=file] { width: 100%; font-size: 13px; color: var(--hint); padding: 8px 0; }
textarea { resize: vertical; min-height: 78px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--button); outline-offset: 2px; }
.submit, #close-app { width: 100%; background: var(--button); color: var(--button-text); font-size: 16px; line-height: 1.2; font-family: inherit; font-weight: 650; border: 0; border-radius: 12px; padding: 16px; cursor: pointer; margin-top: 9px; }
.submit:disabled { opacity: .6; cursor: wait; }
.hint { text-align: center; margin: 12px; font-size: 12px; }
.status { display: none; padding: 12px; margin: 12px 0; border-radius: 10px; background: var(--surface); font-size: 14px; }
.status:not(:empty) { display: block; }
.status.error { border: 1px solid #de6363; color: #f18b8b; }
.file-preview { margin: 6px 0 2px; display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 10px; font-size: 13px; color: var(--hint); word-break: break-word; }
.file-preview[hidden] { display: none; }
.file-preview-item { min-width: 0; padding: 8px; border: 1px solid color-mix(in srgb,var(--hint),transparent 70%); border-radius: 10px; }
.file-preview img { display: block; max-height: 180px; width: 100%; border-radius: 7px; margin: 8px 0 0; object-fit: contain; }
.success { padding: 36px 15px; text-align: center; }
.success-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #25a77e; font-size: 35px; color: #fff; }
h2 { margin: 16px 0 8px; }
