/* Shared mobile layout: no horizontal input overflow and no focus zoom on iOS. */
:root {
  --floating-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
:root:not(.app-focus) {
  --floating-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
button:disabled,
input:disabled,
select:disabled,
[aria-disabled="true"] {
  cursor: default !important;
}
.field,
.field > *,
.suite-editor,
.editor-form,
.inventory-form,
.suite-filter-row,
.suite-relations,
.sheet-body,
.sheet-actions,
form,
fieldset {
  min-width: 0;
  max-width: 100%;
}
.sheet input,
.sheet textarea,
.sheet select,
.checklist-add input,
.suite-select,
.suite-filter-row select {
  font-size: 16px !important;
}
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
input:is([type="date"], [type="datetime-local"], [type="time"]) {
  min-inline-size: 0;
  max-inline-size: 100%;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
input::-webkit-date-and-time-value {
  text-align: left;
  min-width: 0;
}
.sheet .suite-relations {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.sheet .field {
  overflow-wrap: anywhere;
}
.sheet[open] {
  position: fixed;
  display: flex;
  flex-direction: column;
  inset: auto 0;
  top: calc(var(--visible-top, 0px) + 10px);
  margin: 0 auto;
  transform: none;
  width: min(620px, calc(100% - 20px));
  max-width: calc(100% - 20px);
  max-height: calc(var(--visible-height, 100dvh) - 20px);
  padding: 0;
  overflow: hidden;
}
.sheet .sheet-handle,
.sheet .sheet-heading,
.sheet .sheet-actions {
  flex: 0 0 auto;
}
.sheet .sheet-heading {
  padding: 20px 20px 14px;
  margin: 0;
  min-width: 0;
}
.sheet .sheet-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sheet .sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 8px 20px 24px;
  scroll-padding: 20px;
}
.sheet .sheet-actions {
  position: relative;
  inset: auto;
  margin: 0;
  padding: 14px 20px max(14px, env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 20px #10162418;
}
.sheet .sheet-actions .form-error {
  margin: 0 0 10px;
  max-height: 58px;
  overflow: auto;
}
.editor-more {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.editor-more summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 0.9rem;
  padding: 5px;
}
.editor-more[open] summary {
  margin-bottom: 16px;
}
.sheet .suite-editor,
.sheet .inventory-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
body .app-page .app-heading button[data-new],
body .floating-add {
  position: fixed;
  bottom: var(--floating-bottom);
  right: max(20px, env(safe-area-inset-right));
  z-index: 25;
  width: 58px;
  height: 58px;
  min-height: 58px;
  border-radius: 20px;
  padding: 14px;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: var(--action-ink, white);
  box-shadow: 0 8px 24px #0005;
  font-size: 0;
}
body .floating-add .icon {
  width: 28px;
  height: 28px;
}
.app-back,
.sb-back {
  display: none !important;
}
.global-back {
  position: fixed;
  left: 66px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--ink);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 0.78rem;
}
.global-back .icon {
  width: 20px;
  height: 20px;
}
.imprez-topbar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}
.imprez-topbar .imprez-brand {
  pointer-events: auto;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 8px 12px;
  min-width: 0;
  border-radius: 0;
}
.imprez-brand .brand-short {
  display: none !important;
}
.imprez-brand .brand-full {
  margin-left: 76px;
}
.brand-compact .imprez-brand .brand-full,
.city-focus .imprez-brand .brand-full {
  display: none !important;
}
.brand-compact .imprez-brand img,
.city-focus .imprez-brand img {
  display: block !important;
  width: 28px !important;
  height: 28px !important;
}
.brand-compact .imprez-brand {
  min-height: 44px;
}

/* Public interaction and modal controls. */
.app-soundboard .sb-pad,
.app-soundboard .sb-pad * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.sheet.has-actions .sheet-body {
  padding-bottom: 24px;
}
.sheet .sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  pointer-events: auto;
}
.sheet .sheet-actions .form-error {
  flex-basis: 100%;
}
.sheet .sheet-actions .button {
  flex: 1 1 auto;
}
.global-back {
  z-index: 120;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  font-size: 16px !important;
}
@media (max-width: 600px) {
  .sheet .sheet-heading,
  .sheet .sheet-body,
  .sheet .sheet-actions {
    padding-inline: 14px;
  }
}

/* v9: only the logo and wordmark occupy the transparent top edge. */
body .imprez-topbar {
  position: fixed;
  inset: 0 0 auto;
  height: calc(64px + env(safe-area-inset-top, 0px));
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  z-index: 90;
  pointer-events: none;
}
body .imprez-topbar .imprez-brand {
  position: static;
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}
body .imprez-brand img {
  position: absolute;
  left: max(18px, env(safe-area-inset-left, 0px));
  top: calc(17px + env(safe-area-inset-top, 0px));
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  pointer-events: auto;
}
body .imprez-brand .brand-full {
  position: absolute;
  right: 22px;
  left: auto;
  top: calc(20px + env(safe-area-inset-top, 0px));
  margin: 0 !important;
  font-size: 1rem;
  letter-spacing: 0.02em;
  pointer-events: auto;
}
body .brand-compact .imprez-brand .brand-full,
.brand-compact .imprez-brand .brand-full {
  display: none !important;
}
body .global-back {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: calc(55px + env(safe-area-inset-left, 0px));
  width: 44px;
  height: 44px;
  padding: 11px;
  min-height: 44px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  z-index: 120;
}
body .global-back .icon {
  width: 22px;
  height: 22px;
}
body .global-back > span:not(.icon) {
  display: none;
}
body .sheet .sheet-actions {
  padding: 8px 14px max(6px, env(safe-area-inset-bottom));
  box-shadow: none;
  gap: 8px;
  max-height: 130px;
}
body .sheet .sheet-actions .button {
  min-height: 42px;
  margin: 0;
  padding: 9px 14px;
}
body .sheet.has-actions .sheet-body {
  padding-bottom: 12px;
}
@media (max-width: 600px) {
  body .sheet .sheet-actions {
    padding: 7px 12px max(4px, env(safe-area-inset-bottom));
  }
  body .sheet .sheet-body {
    padding: 8px 14px 12px;
  }
  body .sheet.has-actions .sheet-body {
    padding-bottom: 8px;
  }
  body .imprez-brand .brand-full {
    right: 17px;
    font-size: 0.95rem;
  }
}
