html {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-text-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-text-primary);
  font-size: var(--text-body);
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body::before,
body::after {
  content: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button,
input,
textarea,
select {
  color: inherit;
}

button,
a,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

[hidden] {
  display: none !important;
}

#app {
  position: relative;
  width: min(100%, var(--frame-max));
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: calc(var(--dock-space) + var(--safe-b));
  overflow: clip;
  background: var(--color-canvas);
}

.wrap {
  width: 100%;
  max-width: var(--frame-max);
  min-height: 45dvh;
  margin-inline: auto;
  padding: var(--space-4) var(--page-gutter) var(--space-12);
}

#view {
  padding-bottom: var(--space-12);
}

#tabsWrap {
  display: none;
}

.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;
}

.icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.sm {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.icon.lg {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}

.foot {
  width: calc(100% - (var(--page-gutter) * 2));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-12) var(--page-gutter) 0;
  padding: var(--space-6) 0 calc(var(--dock-space) + var(--safe-b));
  border-top: var(--stroke-thin) solid var(--color-border-subtle);
  border-radius: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  text-align: center;
}

.foot .footer-action {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  border: var(--stroke-strong) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-primary);
  box-shadow: 3px 3px 0 var(--color-border-strong);
  color: var(--color-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.foot .footer-action--update {
  background: var(--color-surface-yellow);
}

.foot .footer-action--exit {
  background: var(--color-surface-primary);
}

.footer-action .icon {
  width: 23px;
  height: 23px;
  flex: none;
}

.footer-action > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.footer-action b,
.footer-action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-action b {
  font-size: var(--text-body);
  line-height: 1;
}

.footer-action small {
  color: var(--color-text-secondary);
  font-size: var(--text-label);
  line-height: 1.1;
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.section-stack {
  display: grid;
  gap: var(--space-10);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(108px, 32%);
  gap: var(--space-3);
  margin-inline: calc(var(--page-gutter) * -1);
  padding: var(--space-1) var(--page-gutter) var(--space-2);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

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

.scroll-row > * {
  scroll-snap-align: start;
}
