:root {
  --bg: #eee9df;
  --surface: #fffdf8;
  --surface-2: #f7f2e9;
  --ink: #24231f;
  --muted: #777268;
  --line: #ddd3c5;
  --green: #4e6f5d;
  --green-dark: #2f5142;
  --brass: #b88747;
  --danger: #9b4b42;
  --shadow: 0 24px 70px rgba(42, 36, 27, 0.22);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(184, 135, 71, 0.18), transparent 28rem),
    linear-gradient(135deg, #f6f1e8, #e6dfd2);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 14px;
}

.phone-shell {
  width: min(100%, 420px);
  height: min(880px, calc(100vh - 32px));
  min-height: 720px;
  background: #171714;
  border: 10px solid #171714;
  border-radius: 38px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: 28px 1fr 82px;
}

.phone-status {
  color: #f7f4ef;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 22px 0;
  letter-spacing: 0;
}

.status-icons {
  font-size: 11px;
}

.app {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  overflow: hidden auto;
  padding: 16px 16px 24px;
}

.app-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.app-header > div:nth-child(2) {
  min-width: 0;
}

.inventory-shell .app-header,
.inventory-shell .compact-stepper {
  display: none;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  align-items: center;
}

.header-space-nav {
  display: flex;
  gap: 4px;
}

.compact-icon {
  width: 28px;
  height: 32px;
  font-size: 18px;
}

.compact-icon:disabled {
  cursor: default;
  opacity: 0.38;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1,
h2,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

h1 {
  max-width: 100%;
  margin-bottom: 0;
  overflow: hidden;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.compact-stepper {
  gap: 4px;
  margin-bottom: 8px;
}

.step-dot {
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  min-height: 34px;
  padding: 6px 4px;
  font-size: 9px;
  font-weight: 700;
}

.compact-stepper .step-dot {
  min-height: 26px;
  padding: 3px 4px;
}

.step-dot.active {
  background: var(--green);
  color: white;
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brass);
}

.sync-dot.online {
  background: var(--green);
}

.sync-dot.pending {
  background: var(--brass);
}

.sync-dot.offline {
  background: var(--danger);
}

.sync-status-button {
  min-width: 24px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.sync-status-button.actionable {
  border-color: var(--line);
  background: #fffaf2;
  color: var(--green-dark);
}

.sync-status-button[data-sync-visual="pending"] {
  border-color: rgba(180, 126, 55, 0.55);
  background: #fff8ea;
  color: #7c511e;
}

.sync-status-button[data-sync-visual="online"] {
  color: var(--green-dark);
}

.sync-status-button[data-sync-visual="offline"] {
  border-color: rgba(142, 58, 43, 0.35);
  background: #fff3ef;
  color: var(--danger);
}

.sync-status-label {
  display: inline-block;
}

.text-compact-icon {
  width: auto;
  min-width: 42px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#settingsButton.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.field-card,
.note-card,
.density-panel,
.category-card,
.accessory-card,
.calc-card,
.estimate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.field-card {
  padding: 12px;
  margin-bottom: 10px;
}

.admin-shell {
  width: min(100%, 1120px);
  height: min(900px, calc(100vh - 32px));
  border: 0;
  border-radius: 18px;
  grid-template-rows: 1fr 76px;
}

.admin-shell .phone-status {
  display: none;
}

.admin-shell .app {
  border-radius: 18px 18px 0 0;
  padding: 22px;
}

.admin-shell .app-header {
  grid-template-columns: 36px minmax(240px, 1fr) auto;
  max-width: 1080px;
  margin: 0 auto 16px;
}

.admin-shell #adminScreen.active {
  display: grid;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
}

.admin-shell #adminScreen .section-heading {
  margin: 8px 0 -2px;
}

.admin-shell #adminScreen .field-card {
  margin-bottom: 0;
}

.account-settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-shell #adminScreen textarea {
  min-height: 160px;
}

.admin-shell #saveAdminDefaults,
.admin-shell .settings-save-button {
  justify-self: end;
  width: min(280px, 100%);
}

.admin-shell .bottom-bar {
  padding: 14px 22px 18px;
}

.workflow-bar {
  position: sticky;
  top: -16px;
  z-index: 8;
  display: grid;
  gap: 8px;
  margin: -4px 0 10px;
  padding: 10px 0;
  background: var(--surface);
  border-bottom: 1px solid rgba(221, 211, 197, 0.75);
}

.workflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-row strong {
  display: block;
  font-size: 15px;
}

.workflow-title {
  min-width: 0;
}

.workflow-space-name {
  width: 100%;
  height: 24px;
  padding: 0;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.workflow-space-name:focus {
  padding: 0 6px;
  border-color: var(--green);
  background: white;
}

.workflow-space-type {
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fffaf2;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.workflow-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.inventory-shell .workflow-bar {
  top: -16px;
  margin-top: -8px;
  padding-top: 8px;
}

.inventory-shell .workflow-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px auto;
  align-items: center;
  gap: 6px;
}

.workflow-type-field {
  min-width: 0;
}

.workflow-type-field .workflow-space-type {
  width: 100%;
}

.inventory-shell .workflow-actions {
  display: flex;
  align-items: center;
}

.inventory-space-button {
  width: 30px;
  height: 32px;
}

.inventory-menu {
  position: relative;
}

.inventory-menu summary {
  position: relative;
  width: 30px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.inventory-menu summary::-webkit-details-marker {
  display: none;
}

.inventory-menu[open] {
  z-index: 20;
}

.inventory-menu[open] summary {
  z-index: 22;
}

.inventory-menu[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
}

.inventory-menu button {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 21;
  display: block;
  width: 112px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green-dark);
  font-weight: 850;
  text-align: left;
  padding: 0 10px;
  margin-top: 6px;
}

.inventory-menu button + button {
  top: 74px;
}

.inventory-shell .bottom-bar {
  grid-template-columns: 68px 1fr;
}

.inventory-shell .bottom-bar button {
  min-height: 44px;
}

.compact-segmented {
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.inventory-jump {
  position: sticky;
  top: 68px;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 0 0 8px;
  background: var(--surface);
}

.inventory-jump button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 850;
  min-height: 32px;
}

.inventory-jump button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.inventory-jump button.warning:not(.active) {
  background: #fff2cc;
  border-color: #d6a642;
  color: #6d4f2e;
}

.inventory-jump button.warning.active {
  background: #f2c94c;
  border-color: #bf8f24;
  color: #2f2a1c;
}

label,
.form-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 11px;
  outline-color: var(--green);
}

input,
select {
  height: 42px;
}

textarea {
  min-height: 92px;
  padding: 10px 11px;
  resize: vertical;
}

.full-width {
  width: 100%;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.space-row {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
}

.space-type-field {
  margin-top: 10px;
}

.folder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.icon-sized {
  width: auto;
  min-height: 42px;
  padding-inline: 12px;
}

#spaceCountLabel {
  margin: 8px 0 0;
  clear: both;
}

.accessory-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  padding: 10px 12px;
}

.accessory-picker summary {
  color: var(--green-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.compact-picker {
  margin: 8px 0 10px;
  gap: 6px;
}

.scope-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.scope-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 42%);
  align-items: center;
  column-gap: 10px;
  min-height: 36px;
}

.scope-option select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 6px 8px;
  font: inherit;
}

.scope-option label {
  font-weight: 850;
  line-height: 1.2;
}

.scope-option label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.scope-option:not(:has(select))::after {
  content: "";
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
}

.checkbox-grid input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.calc-space-heading {
  margin: 6px 0 2px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.calc-storage-heading {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.three-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dimension-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.measured-items-card {
  display: grid;
  gap: 10px;
}

.measured-items-card[hidden] {
  display: none;
}

.measured-items-fields {
  display: grid;
  gap: 10px;
}

.measured-items-fields .category-list {
  display: grid;
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  margin-bottom: 0;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  padding: 0;
}

.inventory-subsection {
  margin-top: 18px;
}

.review-card {
  border-color: rgba(155, 75, 66, 0.45);
  background: #fff8f5;
}

.hidden-field {
  display: none;
}

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented.wrap {
  display: flex;
  flex-wrap: wrap;
}

#methodDensityControl .segment {
  display: grid;
  min-width: 72px;
  min-height: 42px;
  line-height: 1.1;
}

#methodDensityControl .segment small {
  display: block;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.78;
}

.segment {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  padding: 0 9px;
}

.segment.active {
  background: white;
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(38, 35, 29, 0.08);
}

.custom-density-field {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.segmented.small {
  grid-template-columns: repeat(3, 1fr);
  width: 190px;
}

.note-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.note-card strong {
  color: var(--ink);
}

.handoff-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2eb;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  padding: 10px 12px;
}

.field-error {
  color: #9a3d35;
  font-size: 11px;
  font-weight: 800;
  margin: 6px 0 0;
}

input.invalid {
  border-color: #9a3d35;
  box-shadow: 0 0 0 2px rgba(154, 61, 53, 0.1);
}

.person-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.person-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.person-tab.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.density-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 14px;
}

.density-panel p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 10px;
}

.inventory-types-panel {
  margin-top: 14px;
}

.inventory-types-panel .section-heading {
  cursor: pointer;
  list-style: none;
  margin: 0 0 10px;
}

.inventory-types-panel .section-heading::-webkit-details-marker {
  display: none;
}

.inventory-types-panel .section-heading h2::before {
  content: ">";
  display: inline-block;
  margin-right: 5px;
  color: var(--green);
  font-size: 12px;
  transform: rotate(90deg);
}

.inventory-types-panel:not([open]) .section-heading {
  margin-bottom: 0;
}

.inventory-types-panel:not([open]) .section-heading h2::before {
  transform: rotate(0deg);
}

.section-heading.compact {
  margin-top: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  padding: 4px;
}

.danger-text {
  color: var(--danger);
}

.small-muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.category-list {
  display: grid;
  gap: 10px;
}

.media-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 0;
}

.media-icon-button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 850;
}

.media-icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.media-icon-button .record-icon circle {
  fill: currentColor;
}

.media-icon-button:hover,
.media-icon-button:focus-visible {
  border-color: var(--green);
  background: #edf2eb;
}

.media-icon-button.warning {
  background: #f2c94c;
  border-color: #bf8f24;
  color: #2f2a1c;
}

.media-icon-button.warning:hover,
.media-icon-button.warning:focus-visible {
  background: #ffd966;
}

.media-card > summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: normal;
  margin-bottom: 0;
}

.media-card > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid var(--green-dark);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.media-card:not([open]) > summary::before {
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--green-dark);
  border-right: 0;
}

.media-card[open] > summary {
  margin-bottom: 6px;
}

.media-card-body {
  display: grid;
  gap: 6px;
}

.media-summary-status.missing {
  color: var(--danger);
}

.media-card.missing-video {
  border-color: rgba(155, 75, 66, 0.42);
}

.media-list {
  margin-top: 6px;
}

.compact-media-file {
  padding: 8px;
}

.media-status {
  color: var(--green-dark);
  font-weight: 800;
}

.media-status.missing {
  color: var(--danger);
}

.category-card,
.accessory-card {
  padding: 12px;
}

.file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.file-card > div:first-child {
  min-width: 0;
}

.file-card strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green);
  font-weight: 800;
  min-height: 34px;
  padding: 0 12px;
}

.file-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.file-card-actions [data-delete-local] {
  color: #8f3f2f;
}

.card-top {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: start;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #edf2eb;
  color: var(--green);
  font-weight: 850;
}

.method-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #f1e5d0;
  color: #6d4f2e;
  font-size: 12px;
  font-weight: 850;
}

.method-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.compact-inventory-list,
#categoryList.category-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fffaf4;
}

.compact-inventory-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

#categoryList .compact-inventory-row {
  padding: 5px 12px;
}

.compact-inventory-row:last-child {
  border-bottom: 0;
}

.compact-inventory-row.active-row {
  background: #fffdf8;
}

.compact-row-top {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.compact-row-top input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.compact-category-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.note-toggle {
  min-width: 42px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.compact-row-detail {
  display: grid;
  gap: 8px;
  margin: 9px 0 0 30px;
}

.compact-qty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-method-line {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-method-line .method-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.compact-note-field textarea {
  min-height: 54px;
}

.compact-add-method {
  justify-self: start;
}

.inventory-shell #clothingPickerCard {
  display: none;
}

.collapsed {
  display: none !important;
}

.method-quick-entry {
  display: grid;
  grid-template-columns: minmax(84px, 1fr) minmax(84px, 1fr) minmax(96px, 1.15fr);
  gap: 8px;
  align-items: end;
}

.method-line button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green);
  font-weight: 800;
  min-height: 32px;
  padding: 0 10px;
}

.compact-qty input {
  height: 32px;
  min-width: 8ch;
  text-align: center;
  padding: 0 6px;
}

.method-title {
  font-size: 13px;
  font-weight: 850;
}

.method-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 8px;
  background: #edf2eb;
  color: var(--green-dark);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.accessory-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
  align-items: center;
  margin-top: 9px;
}

.accessory-row input {
  text-align: center;
}

.qty-input {
  margin: 0;
}

.qty-input span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.qty-input small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.aggregate-card {
  margin-bottom: 10px;
}

.aggregate-card .card-top {
  grid-template-columns: 32px 1fr;
  gap: 8px;
}

.aggregate-card .category-icon {
  width: 32px;
  height: 32px;
}

.aggregate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.aggregate-grid input {
  height: 36px;
}

.aggregate-grid .qty-input span {
  margin-bottom: 3px;
}

.aggregate-shoe-box {
  grid-column: 1 / -1;
  padding: 9px;
  border: 1px solid rgba(118, 93, 63, 0.22);
  border-radius: 8px;
  background: rgba(247, 242, 233, 0.72);
}

.aggregate-shoe-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 7px;
}

.aggregate-shoe-heading strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.aggregate-shoe-heading small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

.aggregate-shoe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.disabled-field {
  opacity: 0.58;
}

.review-check-list {
  display: grid;
  gap: 8px;
}

.review-check {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px;
}

.review-check strong,
.review-check span {
  display: block;
}

.review-check span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.review-check.missing {
  border-color: rgba(155, 75, 66, 0.45);
  background: #fff7f4;
}

.review-check.missing strong {
  color: var(--danger);
}

.review-media-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.review-media-actions .media-icon-button {
  min-height: 38px;
}

.shoe-width-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.shoe-width-row .small-muted {
  padding-bottom: 10px;
}

.shoe-card {
  gap: 12px;
}

.shoe-section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.shoe-section-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.shoe-section-top span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.shoe-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shoe-section-delete {
  align-self: start;
  justify-self: end;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.shoe-section .result-pill {
  display: inline-block;
  justify-self: start;
}

.shoe-extra-space {
  margin: -2px 0 0;
  color: #a44435;
  font-size: 11px;
  font-weight: 850;
}

.shoe-extra-space:empty {
  display: none;
}

.accessory-option {
  margin-top: 10px;
}

.estimate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.estimate-card {
  padding: 12px;
}

.estimate-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.estimate-card strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1;
}

.estimate-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.calc-card {
  margin-top: 12px;
  padding: 12px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.calc-row:first-of-type {
  border-top: 0;
}

.calc-row p {
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 850;
}

.calc-row span {
  color: var(--muted);
  font-size: 11px;
}

.space-summary-row {
  grid-template-columns: 1fr;
}

.space-summary-row .result-pill {
  display: block;
  width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.calc-drawer-stack-header {
  margin-top: 6px;
  padding-bottom: 4px;
  grid-template-columns: 1fr;
}

.calc-drawer-stack-header p {
  color: var(--green-dark);
}

.calc-drawer-height-row {
  padding-left: 12px;
  border-top-style: dashed;
}

.bottom-bar {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  background: #fffdf8;
  border-top: 1px solid var(--line);
  padding: 13px 14px 20px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  border: 0;
  padding: 0 14px;
  font-weight: 850;
}

.primary-button {
  background: var(--green);
  color: white;
}

.secondary-button {
  background: var(--surface-2);
  color: var(--green-dark);
  border: 1px solid var(--line);
}

.secondary-button.danger {
  color: var(--danger);
}

dialog {
  width: min(94vw, 390px);
  max-height: 88vh;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(24, 22, 18, 0.46);
}

.dialog-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.dialog-header h2 {
  font-size: 20px;
}

.dialog-result {
  margin-bottom: 0;
  border-radius: 8px;
  background: #edf2eb;
  color: var(--green-dark);
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
}

.input-helper {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.drawer-requirements-card,
.manual-drawer-fields {
  display: grid;
  gap: 10px;
}

.drawer-requirements-card,
.space-notes-card {
  margin-top: 12px;
}

.drawer-requirements-card > summary {
  color: var(--green-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: revert;
}

.drawer-requirements-card[open] > summary {
  margin-bottom: 2px;
}

.drawer-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.manual-drawer-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.manual-drawer-stack-header,
.manual-drawer-height-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.manual-drawer-stack-header {
  position: relative;
  padding-right: 38px;
}

.manual-drawer-stack-header .mini-icon-button {
  position: absolute;
  top: 0;
  right: 0;
}

.drawer-stack-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.drawer-stack-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.height-warning-pill {
  background: #fff2cc;
  color: var(--danger);
}

.drawer-stack-review {
  background: #fff1ee;
  border-color: rgba(155, 75, 66, 0.45);
}

.manual-drawer-height-list {
  display: grid;
  gap: 8px;
}

.manual-drawer-height-row {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.drawer-assumptions-card {
  margin-top: 10px;
}

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

.drawer-assumptions-grid input {
  height: 34px;
  text-align: center;
  padding: 0 6px;
}

.method-actions {
  display: flex;
  gap: 6px;
}

.mini-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green-dark);
  padding: 0;
}

.mini-icon-button svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  overflow: visible;
  pointer-events: none;
}

.mini-icon-button:hover,
.mini-icon-button:focus-visible {
  border-color: var(--green);
  background: #edf2eb;
}

.danger-icon-button {
  color: var(--danger);
}

.section-subhead {
  margin: 12px 0 8px;
  font-weight: 800;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.dialog-actions.share-actions {
  grid-template-columns: 1fr 1fr;
}

.handoff-links {
  display: grid;
  gap: 8px;
}

.handoff-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2eb;
  color: var(--green-dark);
  padding: 10px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  text-align: center;
}

@media (max-width: 440px) {
  .stage {
    padding: 0;
  }

  .phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .app {
    border-radius: 0;
  }
}
.auth-dialog-card {
  max-width: 430px;
}

.auth-summary-card {
  display: grid;
  gap: 4px;
}

#authStatus[data-tone="success"] {
  color: var(--green);
}

#authStatus[data-tone="error"] {
  color: var(--danger);
}

.auth-actions {
  flex-wrap: wrap;
}
