:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f5f7;
    color: #1f2933;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f5f7;
}

.app-shell {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
}

.app-header {
    padding: 24px 8px 18px;
}

.app-eyebrow {
    margin: 0 0 4px;
    color: #8b1e2d;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

h1,
h2 {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: 1.8rem;
}

h2 {
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.card {
    margin-bottom: 16px;
    padding: 18px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
}

input,
textarea,
button {
    width: 100%;
    font: inherit;
}

input,
textarea {
    padding: 12px;
    border: 1px solid #aab3bc;
    border-radius: 8px;
    background: #ffffff;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: 3px solid rgb(139 30 45 / 20%);
    border-color: #8b1e2d;
}

.help-text,
.connection-status,
.form-message {
    margin: 8px 0 0;
    color: #52606d;
    font-size: 0.9rem;
}

.connection-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e6edf3;
}

.connection-status.is-online {
    color: #146c43;
    background: #d1e7dd;
}

.connection-status.is-offline {
    color: #8a4b08;
    background: #fff3cd;
}

.button-row {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.button {
    min-height: 48px;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    color: #ffffff;
    background: #8b1e2d;
}

.button-secondary {
    color: #243b53;
    background: #d9e2ec;
}

.button-danger {
    width: auto;
    min-height: auto;
    padding: 7px 10px;
    color: #842029;
    background: #f8d7da;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.photo-preview figure {
    margin: 0;
}

.photo-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    margin-bottom: 0;
}

.count-badge {
    min-width: 30px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: #8b1e2d;
    font-weight: 700;
    text-align: center;
}

.finding-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.finding-item {
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.finding-item p {
    margin: 7px 0;
    white-space: pre-wrap;
}

.finding-meta {
    color: #52606d;
    font-size: 0.85rem;
}

.finding-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-message.is-error {
    color: #842029;
}

.form-message.is-success {
    color: #146c43;
}

@media (min-width: 520px) {
    .button-row {
        grid-template-columns: 1fr 1fr;
    }
}

.photo-slots {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}

.photo-slots legend {
    padding: 0;
    font-weight: 700;
}

.photo-slot {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #f8fafc;
}

.photo-slot h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.photo-slot-preview:empty {
    display: none;
}

.photo-slot-preview img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-slot-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.photo-slot-actions .button-danger {
    grid-column: 1 / -1;
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.is-hidden {
    display: none !important;
}


.audio-recorder {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    background: #f8fafc;
}

.audio-recorder h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.audio-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.audio-preview {
    width: 100%;
    margin-top: 12px;
}

.button-recording {
    color: #ffffff;
    background: #b42318;
}
.mobile-brand-logo {
  display: block;
  width: min(46vw, 220px);
  height: auto;
  max-height: 112px;
  object-fit: contain;
  margin: 0;
}
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 124px;
  padding: 12px 16px;
}
.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid #dce6ed;
  background: #f8fafc;
  color: #607080;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}
.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.9rem 0;
}

.sync-settings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dce6ed;
}

.sync-settings .button {
  flex: 1 1 11rem;
}
