:root {
  --black: #050505;
  --black-2: #0b0b0d;
  --panel: rgba(21, 21, 25, 0.86);
  --panel-solid: #151519;
  --panel-2: rgba(255, 255, 255, 0.055);
  --red: #e50914;
  --red-2: #9f0710;
  --white: #f7f7f7;
  --soft-white: rgba(255, 255, 255, 0.82);
  --muted: #999ca6;
  --muted-2: #6d717b;
  --gray: #23242a;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

input,
textarea {
  min-width: 0;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(229, 9, 20, 0.28), transparent 28%),
    radial-gradient(circle at 86% 0%, rgba(255, 255, 255, 0.09), transparent 24%),
    linear-gradient(145deg, #050505, #0b0b0d 45%, #050505);
  overflow: hidden;
}

.ambient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.78;
  transform: translate3d(0, 0, 0);
}

.orb-red {
  width: 360px;
  height: 360px;
  left: -180px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.58), transparent 66%);
}

.orb-white {
  width: 320px;
  height: 320px;
  right: -170px;
  top: -80px;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 62%);
}

.device-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: rgba(6, 6, 7, 0.78);
  border-inline: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 80px rgba(0,0,0,0.42);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.app-statusbar {
  min-height: calc(22px + var(--safe-top));
  padding: var(--safe-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.app-header {
  min-height: 76px;
  padding: 12px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12,12,14,0.9), rgba(12,12,14,0.55));
  backdrop-filter: blur(18px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo,
.empty-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  font-weight: 950;
  letter-spacing: -0.06em;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.95), rgba(82, 0, 6, 0.95)),
    #121216;
  box-shadow: 0 15px 30px rgba(229, 9, 20, 0.22);
}

.brand-row p,
.card-title p,
.section-head p,
.editor-top p,
.dialog-head p {
  margin: 0 0 3px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.68rem;
  font-weight: 900;
}

.brand-row h1,
.editor-top h2,
.dialog-head h3 {
  margin: 0;
  max-width: 280px;
  font-size: 1.34rem;
  line-height: 1.03;
  letter-spacing: -0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-content {
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.screen {
  display: none;
  height: 100%;
  padding: 16px 14px calc(96px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
  animation: screenIn 0.22s ease both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-card,
.panel-card,
.editor-card,
.job-card,
.analytics-grid article,
.stat-strip article,
.action-tile,
.daily-item,
.compact-job-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(0,0,0,0.32);
  backdrop-filter: blur(22px);
}

.hero-card {
  position: relative;
  min-height: 238px;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.parallax-card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 18% 24%, rgba(229, 9, 20, 0.34), transparent 28%),
    radial-gradient(circle at 76% 14%, rgba(255, 255, 255, 0.13), transparent 18%);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.12s linear;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.chip,
.status-pill,
.need-tag,
.task-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.chip.red,
.status-pill.active {
  color: #ffb3b7;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.32);
}

.status-pill.ready {
  color: #ffd394;
  background: rgba(255, 171, 53, 0.12);
  border: 1px solid rgba(255, 171, 53, 0.28);
}

.status-pill.passed {
  color: #baffd3;
  background: rgba(38, 196, 111, 0.12);
  border: 1px solid rgba(38, 196, 111, 0.28);
}

.hero-card h2,
.drive-card h2 {
  margin: 16px 0 12px;
  font-size: clamp(2.4rem, 13vw, 4.4rem);
  line-height: 0.88;
  letter-spacing: -0.09em;
}

.hero-card p,
.drive-card p,
.empty-state p,
.action-tile span,
.job-subtext,
.small-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.stat-strip,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 18px;
}

.stat-strip article,
.analytics-grid article {
  min-height: 90px;
  padding: 13px 10px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-strip span,
.analytics-grid span,
.job-meta span,
.progress-label,
.bar-label,
.daily-item span {
  color: var(--muted);
  font-size: 0.72rem;
}

.stat-strip strong,
.analytics-grid strong {
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.08em;
}

.section-head {
  margin: 18px 2px 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-head.flat {
  margin-top: 0;
}

.section-head h3,
.card-title h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.05em;
}

.text-btn,
.round-btn,
.back-btn,
.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.filter-chip,
.quick-btn,
.seg-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 15px;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, border 0.18s ease;
}

.text-btn {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.round-btn {
  width: 44px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
}

.primary-btn {
  padding: 0 16px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 14px 30px rgba(229, 9, 20, 0.28);
}

.secondary-btn,
.ghost-btn,
.back-btn {
  padding: 0 15px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.11);
}

.ghost-btn {
  color: var(--muted);
  background: rgba(255,255,255,0.035);
}

.danger-btn {
  padding: 0 14px;
  color: #ff9ba0;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.32);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.round-btn:active,
.text-btn:active,
.quick-btn:active,
.filter-chip:active,
.seg-btn:active,
.action-tile:active {
  transform: scale(0.975);
}

.mobile-toolbar {
  position: sticky;
  top: -16px;
  z-index: 4;
  margin: -16px -14px 12px;
  padding: 14px 14px 12px;
  background: rgba(8,8,10,0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.search-box,
.date-box,
.input-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.search-box input,
.date-box input,
.input-field input,
.input-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--white);
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,0.12);
  outline: none;
  background: rgba(255,255,255,0.06);
}

.input-field textarea {
  padding: 13px 14px;
  resize: vertical;
}

.search-box input:focus,
.date-box input:focus,
.input-field input:focus,
.input-field textarea:focus {
  border-color: rgba(229, 9, 20, 0.74);
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.14);
}

.filter-scroll {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 38px;
  padding: 0 15px;
  flex: 0 0 auto;
  color: var(--muted);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.filter-chip.active {
  color: var(--white);
  background: rgba(229, 9, 20, 0.22);
  border-color: rgba(229, 9, 20, 0.42);
}

.job-list,
.daily-list,
.bar-list {
  display: grid;
  gap: 12px;
}

.job-list.compact {
  gap: 10px;
}

.job-card,
.compact-job-card {
  border-radius: 26px;
  overflow: hidden;
}

.job-photo {
  position: relative;
  height: 176px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.20), transparent),
    rgba(255,255,255,0.045);
}

.compact-job-card .job-photo {
  height: 118px;
}

.job-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-photo .status-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  backdrop-filter: blur(10px);
}

.job-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.job-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.job-title-row h3 {
  margin: 0 0 5px;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.07em;
}

.progress-badge {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-weight: 950;
  letter-spacing: -0.06em;
  background:
    radial-gradient(circle at center, #131316 57%, transparent 58%),
    conic-gradient(var(--red) var(--progress, 0%), rgba(255,255,255,0.10) 0);
  border: 1px solid rgba(255,255,255,0.08);
}

.need-row,
.task-row,
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.need-tag,
.task-state {
  color: var(--muted);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.task-state.done {
  color: #c4ffd9;
  border-color: rgba(38,196,111,0.26);
  background: rgba(38,196,111,0.10);
}

.task-state.doing {
  color: #ffd394;
  border-color: rgba(255,171,53,0.26);
  background: rgba(255,171,53,0.10);
}

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

.quick-actions.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.quick-btn {
  min-height: 43px;
  padding: 0 9px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.quick-btn.primary {
  background: rgba(229, 9, 20, 0.23);
  border-color: rgba(229, 9, 20, 0.42);
}

.empty-state {
  display: none;
  min-height: 65%;
  place-items: center;
  text-align: center;
  padding: 28px 16px;
}

.empty-state.show {
  display: grid;
}

.empty-logo {
  margin: 0 auto 16px;
  width: 70px;
  height: 70px;
  border-radius: 24px;
  font-size: 1.2rem;
}

.empty-state h3 {
  margin: 0 0 8px;
  letter-spacing: -0.05em;
}

.date-box {
  margin-bottom: 12px;
}

.panel-card,
.editor-card {
  padding: 15px;
  border-radius: var(--radius-lg);
}

.bar-item {
  display: grid;
  gap: 7px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.bar-track i {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff747b);
}

.daily-item {
  padding: 13px;
  border-radius: 18px;
  text-align: left;
  color: var(--white);
}

.daily-item strong {
  display: block;
  margin-bottom: 4px;
}

.drive-card {
  min-height: 300px;
}

.sync-pill {
  margin-top: 16px;
  padding: 13px;
  border-radius: 18px;
  color: var(--soft-white);
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.84rem;
}

.action-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.action-tile {
  width: 100%;
  min-height: 82px;
  padding: 15px;
  border-radius: 22px;
  color: var(--white);
  text-align: left;
  display: grid;
  align-content: center;
  gap: 5px;
}

.action-tile strong {
  font-size: 1rem;
}

.file-tile input,
.upload-btn input {
  display: none;
}

.editor-screen {
  padding-bottom: calc(102px + var(--safe-bottom));
}

.editor-top {
  position: sticky;
  top: -16px;
  z-index: 5;
  margin: -16px -14px 12px;
  min-height: 76px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8,8,10,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
}

.job-form {
  display: grid;
  gap: 12px;
}

.photo-section {
  padding: 10px;
}

.photo-preview {
  min-height: 248px;
  border-radius: 21px;
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.18), transparent),
    rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.choice-pills input,
.qc-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.84rem;
  font-weight: 850;
}

.choice-pills input:checked + span {
  color: var(--white);
  background: rgba(229, 9, 20, 0.24);
  border-color: rgba(229, 9, 20, 0.46);
}

.progress-editor {
  display: grid;
  gap: 13px;
  margin-top: 13px;
}

.progress-line {
  display: grid;
  gap: 9px;
}

.progress-line strong {
  font-size: 0.94rem;
}

.seg-control {
  padding: 4px;
  border-radius: 17px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.seg-btn {
  min-height: 41px;
  color: var(--muted);
  background: transparent;
  font-size: 0.8rem;
}

.seg-btn.active {
  color: var(--white);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.92), rgba(115, 0, 8, 0.92));
  box-shadow: 0 10px 24px rgba(229, 9, 20, 0.20);
}

.qc-list {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.qc-list label {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 17px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.qc-list span {
  color: var(--soft-white);
  font-size: 0.88rem;
}

.qc-list input:checked + span::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 950;
}

.editor-actions {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 35;
  width: min(480px, 100%);
  transform: translateX(-50%);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: auto 1fr 1.1fr;
  gap: 8px;
  background: rgba(8,8,10,0.92);
  border-top: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(480px, 100%);
  transform: translateX(-50%);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(8,8,10,0.92);
  border-top: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
}

.nav-tab {
  min-height: 52px;
  color: var(--muted);
  border-radius: 18px;
  background: transparent;
  font-weight: 900;
}

.nav-tab.active {
  color: var(--white);
  background: linear-gradient(135deg, rgba(229,9,20,0.26), rgba(255,255,255,0.06));
  border: 1px solid rgba(229, 9, 20, 0.32);
}

.fab {
  position: fixed;
  right: max(16px, calc((100vw - 480px) / 2 + 16px));
  bottom: calc(84px + var(--safe-bottom));
  z-index: 32;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 18px 44px rgba(229,9,20,0.36);
  font-weight: 950;
}

.mobile-dialog {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
}

.mobile-dialog::backdrop {
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(8px);
}

.dialog-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(480px, 100%);
  max-height: calc(100dvh - var(--safe-top));
  transform: translateX(-50%);
  padding-bottom: var(--safe-bottom);
  overflow: auto;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(22,22,26,0.98), rgba(8,8,10,0.98));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -24px 70px rgba(0,0,0,0.62);
}

.dialog-head,
.dialog-actions {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#cameraVideo {
  display: block;
  width: calc(100% - 28px);
  height: min(56vh, 440px);
  margin: 0 14px;
  border-radius: 24px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255,255,255,0.12);
}

.report-output {
  width: calc(100% - 28px);
  max-height: 58vh;
  margin: 0 14px;
  padding: 15px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--soft-white);
  background: rgba(0,0,0,0.34);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.48;
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 80;
  width: min(440px, calc(100% - 28px));
  transform: translate(-50%, 18px);
  padding: 13px 15px;
  border-radius: 18px;
  color: var(--white);
  background: rgba(18,18,22,0.94);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  text-align: center;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 700px) {
  body {
    display: grid;
    place-items: center;
    padding: 20px;
  }

  .device-shell {
    height: min(920px, 100dvh - 40px);
    border-radius: 42px;
    border: 1px solid rgba(255,255,255,0.12);
  }

  .bottom-nav,
  .editor-actions {
    border-radius: 0 0 42px 42px;
  }
}

@media (max-width: 380px) {
  .stat-strip,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-buttons {
    grid-template-columns: 1fr;
  }

  .quick-actions.three {
    grid-template-columns: 1fr;
  }

  .hero-card h2 {
    font-size: 2.25rem;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #reportDialog,
  #reportDialog * {
    visibility: visible;
  }

  #reportDialog {
    position: static;
    background: #fff;
  }

  .dialog-sheet {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    border: 0;
    color: #111;
    background: #fff;
  }

  .dialog-head,
  .dialog-actions {
    display: none;
  }

  .report-output {
    color: #111;
    background: #fff;
    border: 0;
    max-height: none;
  }
}
