/* Quick look: phone first. Tokens only. Large targets, safe areas, 16px+ inputs (no zoom on focus). */

.ql { max-width: 560px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.ql button, .ql .btn, .ql label[role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ql button:active, .ql label[role="button"]:active { transform: scale(0.985); transition: transform 0.06s; }
.ql input, .ql select, .ql textarea { font-size: 16px; }
.ql-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Capture */
.ql-camera {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: min(56vh, 460px); margin: 0 0 24px; cursor: pointer; user-select: none;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius);
  font-size: 15px; text-align: center;
}
.ql-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.ql-doors .ql-camera, .ql-upload { min-height: 340px; margin: 0; }
.ql-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.ql-upload:hover { border-color: var(--orange-line); }
.ql-arrow { display: flex; }
.ql-camera:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 3px; }
.ql-camera-ring { width: 104px; height: 104px; border-radius: 50%; border: 3px solid currentColor; display: flex; align-items: center; justify-content: center; opacity: 0.95; }
.ql-camera-dot { width: 78px; height: 78px; border-radius: 50%; background: currentColor; transition: transform 0.08s; }
.ql-camera:active .ql-camera-dot { transform: scale(0.88); }
.ql-camera-label { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.ql-camera-sub { font-size: 14px; opacity: 0.7; }
.ql-offline { background: var(--warn-soft); color: var(--warn); padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }

/* Shots */
.ql-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ql-hero img { width: 100%; max-height: 58vh; object-fit: contain; margin: 0 auto; }
.ql-hero.small img { max-height: 34vh; }
.ql-more { display: flex; gap: 10px; margin-top: 10px; }
.ql-mini { position: relative; width: 88px; height: 88px; border: 1px solid var(--line); background: var(--surface); }
.ql-mini img { width: 100%; height: 100%; object-fit: cover; }
.ql-x { position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; font-size: 18px; line-height: 1; }

.ql-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ql-big { width: 100%; justify-content: center; min-height: 56px; font-size: 17px; }
.ql-secondary {
  display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-size: 16px; cursor: pointer;
}
.ql-text { justify-content: center; min-height: 48px; font-size: 15px; color: var(--muted); }
.ql-center { text-align: center; margin: 0; }
.ql-note { text-align: center; margin: 4px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.ql-note.ok { color: var(--ok); border-color: var(--ok-soft); background: var(--ok-soft); }

/* Result */
.ql-review > * + * { margin-top: 16px; }
.ql-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; background: var(--bg); }
.ql-what { font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 12px; }
.ql-flags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 16px; }
.ql-title { font-size: 14px; color: var(--ink-60); width: 100%; margin-bottom: 4px; }
.ql-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.ql-sec h3 { margin: 0 0 6px; }
.ql-sec p { margin: 0 0 6px; font-size: 16px; }
.ql-sec ul { margin: 0 0 6px; padding-left: 18px; font-size: 16px; }
.ql-sec li + li { margin-top: 3px; }
.ql-ref { font-size: 14px; padding: 1px 4px; background: var(--accent-soft); border-radius: var(--radius); text-decoration: none; white-space: nowrap; }
.ql-mock { display: inline-block; margin: 0 0 10px; }
.ql-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0; font-size: 16px; }
.ql-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: ql-pulse 1.1s var(--ease) infinite; }
@keyframes ql-pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
.ql-streaming { display: flex; gap: 5px; margin: 14px 0 0; }
.ql-streaming span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-40); animation: ql-pulse 1.1s var(--ease) infinite; }
.ql-streaming span:nth-child(2) { animation-delay: 0.15s; }
.ql-streaming span:nth-child(3) { animation-delay: 0.3s; }
.ql-queued .ql-what, .ql-err .ql-what { font-size: 19px; }

/* Recent */
.ql-recent { margin-top: 8px; }
.ql-recent h2 { margin: 0 0 10px; }
.ql-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ql-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 2px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  text-align: left; text-decoration: none; color: inherit; font-weight: 400;
}
.ql-row img, .ql-noimg { width: 48px; height: 48px; object-fit: cover; flex: none; background: var(--surface-2); border-radius: var(--radius); }
.ql-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ql-row-title { font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 720px) {
  .ql { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .ql-camera { min-height: 52vh; }
}
@media (prefers-reduced-motion: reduce) {
  .ql-pulse, .ql-streaming span { animation: none; }
}

/* Back: each step after the camera carries its own way back (the home-screen app has no browser Back). */
.ql-top { position: sticky; top: 0; z-index: 5; display: flex; margin: -8px 0 12px; padding: 8px 0; background: var(--paper, var(--bg)); }
.ql-back { min-height: 44px; padding: 0 12px 0 4px; font-size: 16px; color: var(--ink); gap: 6px; }

/* Notes */
.ql-notebox { margin-top: 16px; }
.ql-notebox label { display: block; font-weight: 500; margin-bottom: 6px; }
.ql-notebox textarea { width: 100%; min-height: 84px; resize: vertical; }
.ql-notebox p { margin: 6px 0 0; }

/* Revise */
.ql-revise { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--card, var(--bg)); }
.ql-revise h3 { margin: 0; }
.ql-revise-row { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ql-revise-row .primary { min-height: 52px; justify-content: center; font-size: 16px; }
.ql-shoot { list-style: none; padding: 0; margin: 0; }
.ql-shoot li + li { margin-top: 6px; }
.ql-shoot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 16px; }
.ql-shoot-go { flex: none; font-size: 14px; color: var(--ink); background: var(--accent-soft); padding: 4px 10px; border-radius: var(--radius); }
.ql-changed { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); font-size: 15px; }
.ql-changed-head { margin: 0 0 6px; font-weight: 500; }
.ql-changed ul { margin: 0; padding: 0; list-style: none; }
.ql-changed li + li { margin-top: 4px; }
.ql-changed li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.ql-changed-label { color: var(--muted); }
.ql-earlier { margin-top: 8px; }
.ql-earlier summary { cursor: pointer; font-size: 14px; color: var(--muted); }
