:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #17191d;
  --muted: #6e737c;
  --line: #e3e6eb;
  --accent: #1769e0;
  --accent-hover: #0e5cc9;
  --danger: #c63636;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { width: min(100%, 560px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
.screen { min-height: calc(100dvh - 56px); }
.page-header { margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .07em; }
h1 { margin: 0; font-size: clamp(28px, 7vw, 34px); line-height: 1.15; letter-spacing: -.03em; }
.notice { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

form { display: grid; gap: 20px; }
.field-group { display: grid; gap: 8px; }
label, .field-label { font-size: 15px; font-weight: 600; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.counter { color: var(--muted); font-size: 12px; font-weight: 500; }
input:not([type="file"]), select, textarea { width: 100%; appearance: none; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); color: var(--text); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
input:not([type="file"]), select { height: 52px; padding: 0 15px; }
textarea { min-height: 136px; padding: 14px 15px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder, select:invalid { color: #9298a2; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 105, 224, .12); }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 16px; top: 50%; color: var(--muted); font-size: 20px; transform: translateY(-58%); pointer-events: none; }

.upload-zone { display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 12px 14px; border: 1px dashed #b9c2d0; border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover { border-color: var(--accent); background: #f8fbff; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-zone strong, .upload-zone small { display: block; }
.upload-zone strong { color: var(--accent); font-size: 15px; }
.upload-zone small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.upload-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e9f1ff; color: var(--accent); font-size: 24px; line-height: 1; }
.file-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; background: #edf2f9; color: #3f4857; font-size: 13px; }
.file-list button { padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 600; }
.form-error { margin: -4px 0 0; color: var(--danger); font-size: 14px; }
.primary-button, .secondary-button { width: 100%; min-height: 54px; border-radius: 14px; font-size: 16px; font-weight: 700; transition: transform .1s, background .15s; }
.primary-button { border: 0; background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(23,105,224,.22); }
.primary-button:hover { background: var(--accent-hover); }
.primary-button:active, .secondary-button:active { transform: scale(.985); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }

.success-screen { display: flex; flex-direction: column; justify-content: space-between; text-align: center; padding: 20vh 0 0; }
.success-content { display: grid; justify-items: center; }
.success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 22px; border-radius: 50%; background: #dcf5e6; color: #188144; font-size: 36px; font-weight: 700; }
.appeal-number { margin: 16px 0 12px; color: var(--accent); font-size: 24px; font-weight: 700; }
.success-text { max-width: 330px; margin: 0; color: var(--muted); line-height: 1.45; }

@media (min-width: 600px) {
  .app-shell { padding: 48px 28px; }
  .screen { min-height: calc(100dvh - 96px); }
}
