
.ui-apptabs { display: block; width: 100%; height: 100%; min-height: 0; container-type: inline-size; background: var(--ui-bg); color: var(--ui-fg); font: 15px/1.5 var(--ui-font); }
.ui-apptabs-in { display: flex; flex-direction: column; width: 100%; height: 100%; }
.ui-apptabs-screens { position: relative; flex: 1; min-width: 0; min-height: 0; }
/* Hidden by visibility, as display: none loses a scroller's place on some engines. */
.ui-apptabs-panel { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; visibility: hidden; outline: none; }
.ui-apptabs-panel-on { visibility: visible; }
/* Literal markup in the branch: with a bare call there, each change to what the test reads would build the screen again. */
.ui-apptabs-built { display: contents; }
.ui-apptabs-bar {
  display: flex; flex: none; justify-content: space-around; box-sizing: border-box; width: 100%;
  padding: 4px max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  border-top: 1px solid var(--ui-border); background: var(--ui-surface);
}
.ui-apptabs-kb .ui-apptabs-bar { display: none; }
.ui-apptabs-tab {
  position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 44px; min-height: 48px; max-width: 140px;
  padding: 4px 2px; border: 0; border-radius: var(--ui-radius-sm); background: transparent; color: var(--ui-muted); font: 500 11px/1.2 var(--ui-font); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ui-apptabs-tab[aria-selected="true"] { color: var(--ui-accent); }
.ui-apptabs-tab:focus-visible { outline: none; box-shadow: var(--ui-focus); }
.ui-apptabs-icon { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: 20px; line-height: 1; }
.ui-apptabs-icon svg { width: 24px; height: 24px; }
.ui-apptabs-badge {
  position: absolute; top: -3px; inset-inline-start: 62%; box-sizing: border-box; min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--ui-danger); color: #fff;
  font: 700 10px/16px var(--ui-font); text-align: center;
}
.ui-apptabs-dot { top: 0; min-width: 9px; height: 9px; padding: 0; }
.ui-apptabs-text { position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .ui-apptabs-tab:hover { color: var(--ui-fg); } .ui-apptabs-tab[aria-selected="true"]:hover { color: var(--ui-accent); } }
@container (min-width: 600px) {
  .ui-apptabs-in { flex-direction: row; }
  .ui-apptabs-bar {
    order: -1; flex-direction: column; justify-content: flex-start; gap: 4px; width: calc(84px + env(safe-area-inset-left)); height: 100%; overflow-y: auto;
    padding: max(12px, env(safe-area-inset-top)) 6px max(12px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); border-top: 0; border-inline-end: 1px solid var(--ui-border);
  }
  .ui-apptabs-tab { flex: none; min-height: 60px; max-width: none; font-size: 12px; }
  /* A rail is beside the keyboard, not on it, and going would move everything sideways. */
  .ui-apptabs-kb .ui-apptabs-bar { display: flex; }
}


.ui-apptabs-demo { padding: 12px 16px; }
.ui-apptabs-demo p { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--ui-border); }
.ui-apptabs-demo input { box-sizing: border-box; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm); background: var(--ui-surface); color: var(--ui-fg); font: 16px var(--ui-font); }


.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--ui-radius-sm);
  font: 500 14px/1 var(--ui-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  --b: var(--ui-accent); --bf: var(--ui-accent-fg); --bs: var(--ui-accent-soft);
}
.ui-btn:focus-visible { outline: none; box-shadow: var(--ui-focus); }
.ui-btn[disabled], .ui-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.ui-btn-neutral { --b: var(--ui-fg); --bf: var(--ui-bg); --bs: var(--ui-subtle); }
.ui-btn-danger { --b: var(--ui-danger); --bf: #fff; --bs: var(--ui-danger-soft); }
.ui-btn-solid { background: var(--b); color: var(--bf); }
.ui-btn-solid:hover { background: color-mix(in srgb, var(--b) 88%, var(--ui-fg)); }
.ui-btn-soft { background: var(--bs); color: var(--b); }
.ui-btn-soft:hover { background: color-mix(in srgb, var(--bs) 80%, var(--b)); }
.ui-btn-outline { background: transparent; color: var(--b); border-color: var(--ui-border); }
.ui-btn-outline:hover { border-color: var(--b); background: var(--bs); }
.ui-btn-ghost { background: transparent; color: var(--b); }
.ui-btn-ghost:hover { background: var(--bs); }
.ui-btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.ui-btn-lg { height: 46px; padding: 0 22px; font-size: 16px; }
.ui-btn-full { display: flex; width: 100%; }
.ui-btn-spin { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ui-btn-spin .7s linear infinite; }
@keyframes ui-btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ui-btn-spin { animation-duration: 2s; } }

