.goah-app {
  --touch-size: 3rem;
  --shell-bg: #f3f5ef;
  --shell-line: #d3ded5;
  --shell-forest: #142c23;
  --shell-active: #deebdf;
  --shell-edge: clamp(.85rem, 3.8vw, 2rem);
  --shell-shadow: 0 2px 6px #1932250c;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--shell-bg);
}

html:has(.goah-app) {
  scroll-padding-block: 1rem calc(5.5rem + env(safe-area-inset-bottom));
}
.goah-app .skip-link {
  position: fixed;
  z-index: 25;
  inset: max(.45rem, env(safe-area-inset-top)) auto auto max(.45rem, env(safe-area-inset-left));
  padding: .6rem .8rem;
  border-radius: .55rem;
  background: var(--surface);
  color: var(--forest);
  font-weight: 720;
  clip-path: inset(50%);
}
.goah-app .skip-link:focus { clip-path: none; }
.goah-app .shell-sidebar { display: none; }
.goah-app .shell-main {
  width: 100%;
  max-width: 90rem;
  min-width: 0;
  margin-inline: auto;
  padding:
    max(.8rem, env(safe-area-inset-top))
    max(var(--shell-edge), env(safe-area-inset-right))
    calc(5.5rem + env(safe-area-inset-bottom))
    max(var(--shell-edge), env(safe-area-inset-left));
}
.goah-app .shell-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.1rem;
}
.shell-heading, .goah-app #page { min-width: 0; overflow-wrap: anywhere; }
.shell-header .shell-menu-toggle {
  grid-column: 1;
  gap: .05rem;
  font-size: .71rem;
  line-height: 1;
}
.shell-header .shell-heading { grid-column: 2; }
.shell-header .connection { grid-column: 3; }
.shell-heading .eyebrow {
  margin-bottom: .28rem;
  font-size: .68rem;
  letter-spacing: .105em;
}
.shell-header h1 {
  font-size: clamp(1.7rem, 6.7vw, 3.2rem);
  letter-spacing: -.055em;
  line-height: 1.06;
}
.shell-menu-toggle, .shell-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: var(--touch-size);
  min-height: var(--touch-size);
  padding: .5rem;
  border: 1px solid var(--shell-line);
  border-radius: .8rem;
  background: var(--surface);
  color: var(--forest);
  box-shadow: var(--shell-shadow);
}
.shell-menu-toggle:hover, .shell-menu-toggle[aria-expanded="true"] { background: var(--shell-active); }
.goah-app .shell-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
}
.shell-header h1:focus { outline: none; }
.goah-app .shell-header .connection {
  gap: .35rem;
  min-height: 1.8rem;
  max-width: min(27vw, 10.75rem);
  padding: .35rem .5rem;
  font-size: clamp(.68rem, 2.5vw, .83rem);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}
.goah-app .connection .light { flex: 0 0 7px; }

.goah-app .bottom-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: .22rem;
  width: 100%;
  margin: 0;
  padding:
    .42rem
    max(.45rem, env(safe-area-inset-right))
    max(.45rem, env(safe-area-inset-bottom))
    max(.45rem, env(safe-area-inset-left));
  overflow: visible;
  background: var(--surface);
  border-top: 1px solid var(--shell-line);
  box-shadow: 0 -.3rem 1rem #122c2311;
}
.goah-app .bottom-nav .shell-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-width: 0;
  min-height: 3.25rem;
  padding: .34rem .1rem;
  border: 0;
  border-radius: .65rem;
  background: transparent;
  color: var(--pine);
  font-weight: 680;
  font-size: clamp(.7rem, 2.55vw, .8rem);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.goah-app .bottom-nav .shell-link:is(:hover, [aria-current="page"]) {
  background: var(--shell-active);
  color: var(--shell-forest);
}
.goah-app .bottom-nav .shell-link[aria-current="page"] { font-weight: 800; }

.goah-app .shell-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(87vw, 22rem);
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding:
    max(1rem, env(safe-area-inset-top))
    1rem
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0 .9rem .9rem 0;
  background: var(--shell-forest);
  color: #eef5eb;
}
.goah-app .shell-drawer[open] {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.goah-app .shell-drawer::backdrop { background: #10251c88; }
.shell-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .8rem;
}
.shell-drawer-head .brand { margin: 0; }
.goah-app .shell-close {
  background: #264339;
  border-color: #47665a;
  color: #f4f8f2;
  box-shadow: none;
}
.goah-app .shell-close:hover { background: #3b5a4f; }
.goah-app :is(.shell-nav, .shell-drawer-nav) {
  display: grid;
  gap: .35rem;
  width: 100%;
  overflow: visible;
}
.goah-app :is(.shell-nav, .shell-drawer-nav) .shell-link {
  display: flex;
  gap: .72rem;
  align-items: center;
  min-height: var(--touch-size);
  padding: .55rem .65rem;
  font-size: .92rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.goah-app :is(.shell-nav, .shell-drawer-nav) .shell-link[aria-current="page"] {
  background: #355749;
  color: #fff;
}
.shell-user {
  min-width: 0;
  color: #d9e8dc;
  overflow-wrap: anywhere;
}

.goah-app .home-view { display: grid; gap: 1.4rem; }
.home-section { min-width: 0; }
.home-section-title {
  margin: 0 0 .65rem;
  font-size: clamp(1.05rem, 3.9vw, 1.38rem);
  line-height: 1.2;
  font-weight: 750;
}
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.6rem, 2.4vw, 1rem);
}
.goah-app .home-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .62rem;
  min-width: 0;
  min-height: 6.8rem;
  padding: clamp(.75rem, 3.5vw, 1.1rem);
  border: 1px solid var(--shell-line);
  border-radius: .95rem;
  background: var(--surface);
  color: var(--forest);
  box-shadow: var(--shell-shadow);
  text-align: left;
  text-decoration: none;
}
.goah-app .home-action:hover { background: #f7fbf6; border-color: #95ae9f; }
.goah-app .home-section:first-child .home-action:first-child {
  background: var(--shell-forest);
  color: #f7faf6;
  border-color: var(--shell-forest);
}
.goah-app .home-section:first-child .home-action:first-child:hover {
  background: #284a3d;
  border-color: #284a3d;
}
.home-action-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: .65rem;
  background: var(--shell-active);
  color: var(--pine);
}
.home-action-text { display: grid; min-width: 0; gap: .18rem; }
.home-action-text strong { font-size: clamp(.93rem, 3.5vw, 1.12rem); line-height: 1.25; }
.home-action-text span { font-size: .81rem; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.home-section:first-child .home-action:first-child .home-action-text span { color: #c9dbc9; }

.goah-app :is(.panel, .stat, .draft-card, .shop-card) { min-width: 0; }
.goah-app .panel { padding: clamp(.88rem, 3.6vw, 1.3rem); }
.goah-app .login-panel {
  width: min(100%, 28rem);
  margin: clamp(0rem, 3vw, 2rem) auto 0;
}
.goah-app .scan-preview {
  display: block;
  width: min(100%, 32rem);
  max-height: 24rem;
  max-height: min(48dvh, 24rem);
  margin-top: .75rem;
  border-radius: .65rem;
  background: var(--shell-forest);
  object-fit: contain;
}
.goah-app #desktop-sign-out { width: 100%; }
.goah-app :is(.split, .subgrid, .stats, .draft-grid, .variant-row, .desk-products) > * { min-width: 0; }
.goah-app :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  max-width: 100%;
  min-width: 0;
  min-height: var(--touch-size);
  font-size: 1rem;
}
.goah-app input[type="checkbox"], .goah-app input[type="radio"] { flex: 0 0 auto; }
.goah-app label.check { min-height: var(--touch-size); }
.goah-app :is(.primary, .secondary, .file-choice) {
  min-height: var(--touch-size);
  max-width: 100%;
  padding: .52rem .75rem;
  border-radius: .58rem;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.goah-app :is(h1,h2,h3,p,label) { max-width: 100%; }
.goah-app .actions { gap: .55rem; }
.goah-app .actions > * { min-width: 0; }
.goah-app .toolbar > :is(.primary, .secondary) { flex-shrink: 0; }
.goah-app .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.goah-app :is(code, dd, dt) { overflow-wrap: anywhere; }
.goah-app .stat strong { overflow-wrap: anywhere; }
.goah-app .media-field { margin-inline: 0; max-width: 100%; min-width: 0; }
.goah-app :is(img, video) { max-width: 100%; }
.goah-app .desk-tabs { overflow: visible; }
.goah-app .desk-tabs > * { flex: 1 1 8rem; }
.goah-app .phone-photo .secondary { min-height: var(--touch-size); }

@media (max-width: 47.99rem) {
  .goah-app .shell-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    white-space: nowrap;
    overflow: hidden;
  }
  .goah-app .shell-table, .goah-app .shell-table tbody { display: grid; }
  .goah-app .shell-table tbody { gap: .6rem; }
  .goah-app .shell-table tr {
    display: grid;
    gap: .45rem;
    padding: .7rem;
    border: 1px solid var(--shell-line);
    border-radius: .55rem;
    background: #fbfcfa;
  }
  .goah-app .shell-table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .goah-app .shell-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-weight: 700;
    font-size: .76rem;
  }
  .goah-app .table-actions { min-width: 0; margin-top: .22rem; }
  .goah-app .table-actions > * {
    display: inline-flex;
    align-items: center;
    min-height: var(--touch-size);
  }
  .goah-app .photo-choices .file-choice { flex: 1 1 8.5rem; min-width: 0; }
  .goah-app form > .primary, .goah-app form > .actions > .primary:only-child { width: 100%; }
  .goah-app :is(input, select, textarea, button, .file-choice) { scroll-margin-block: .7rem; }
  .goah-app .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goah-app .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .goah-app .desk-stats { grid-template-columns: minmax(0, 1fr) minmax(3rem, auto); }
  .goah-app .desk-stats dd { text-align: right; margin-bottom: 0; }
}

@media (min-width: 48rem) {
  .goah-app .home-view { gap: 1.65rem; }
  .home-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-actions:has(> .home-action:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goah-app .home-action { min-height: 7.5rem; }
}
@media (min-width: 60rem) {
  .goah-app { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); align-items: start; }
  .goah-app .shell-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    padding: 2rem 1rem 1.25rem;
    background: var(--shell-forest);
    overflow: auto;
  }
  .goah-app .shell-sidebar .brand { margin: 0 .55rem; }
  .goah-app .shell-sidebar .lab-tag { margin: .45rem .55rem 1.55rem; }
  .goah-app .shell-sidebar .sidebar-footer { margin-left: .55rem; overflow-wrap: anywhere; }
  .goah-app .shell-main {
    padding: 2.15rem clamp(1.6rem, 3.5vw, 3.7rem) 2.8rem;
  }
  .goah-app .shell-header { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; margin-bottom: 1.4rem; }
  .shell-header .shell-heading { grid-column: 1; }
  .shell-header .connection { grid-column: 2; }
  .shell-header h1 { font-size: clamp(2.4rem, 4vw, 3.65rem); }
  .goah-app .shell-header .connection {
    max-width: none;
    padding: .45rem .75rem;
    font-size: .83rem;
  }
  .goah-app :is(.bottom-nav, .shell-menu-toggle) { display: none; }
  .goah-app .desk-tabs > * { flex: 0 0 auto; }
}

@media (min-width: 76rem) {
  .home-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.active-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
}
.active-store > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.till-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 2rem;
  background: #e3efe2;
  color: #254c38;
  font-size: .79rem;
  font-weight: 720;
}
.store-selection .primary { min-height: 3rem; }
