/* One content scroller: app chrome never paints over a form or its controls. */
html.liff-viewport { height: 100%; overflow: hidden; }
.liff-viewport .liff-body { min-height: 0; height: 100%; overflow: hidden; }
.liff-viewport .liff-shell {
  position: fixed;
  inset: var(--app-viewport-top, 0px) 0 auto;
  display: flex;
  flex-direction: column;
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}
.liff-viewport .app-header {
  position: relative;
  top: auto;
  z-index: auto;
  flex: 0 0 auto;
  background: var(--canvas);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.liff-viewport .liff-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  padding-bottom: 26px;
  scroll-padding-block: 14px 26px;
}
.liff-viewport .bottom-nav {
  position: relative;
  inset: auto;
  z-index: auto;
  flex: 0 0 auto;
  width: 100%;
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.bottom-nav-camera { border: 0; padding: 0; background: none; cursor: pointer; font-family: inherit; color: var(--brand-strong); }
.bottom-nav-camera .camera-circle { display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--brand-strong); border-radius: 50%; background: var(--brand-strong); color: white; }
.bottom-nav-camera .camera-circle svg { width: 26px; height: 26px; }
.bottom-nav-camera:hover .camera-circle { background: var(--brand-deep); }
.bottom-nav-camera:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.navigation-feedback { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; }
.navigation-feedback > span { min-width: 0; overflow-wrap: anywhere; }
.navigation-feedback button { flex-shrink: 0; min-height: 36px; padding: 5px 10px; background: var(--surface); color: var(--brand-strong); border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.camera-status { flex: 0 0 auto; margin: 0; padding: 8px 14px; color: var(--brand-strong); background: var(--brand-soft); font-size: 12px; overflow-wrap: anywhere; }
.navigation-feedback[hidden], .navigation-feedback [hidden], .camera-status[hidden], [data-nav-camera-input][hidden] { display: none !important; }
.liff-viewport .sticky-actions {
  position: static;
  background: var(--canvas);
  backdrop-filter: none;
}
.liff-viewport .capture-selected,
.liff-viewport .capture-result,
.liff-viewport .capture-status,
.liff-viewport .install-platform-tabs { scroll-margin-block: 8px; }
.liff-viewport .login-state .liff-main { min-height: 0; }
.liff-viewport .app-dialog {
  max-height: max(140px, calc(var(--app-viewport-height, 100dvh) - 24px));
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
}
/* Keep focused fields readable without Safari's small-input focus zoom. */
.liff-viewport input:not([type=checkbox]):not([type=radio]):not([type=file]),
.liff-viewport textarea,
.liff-viewport select { font-size: 16px; }
.liff-viewport .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.liff-viewport .field-grid > *, .liff-viewport .edit-form > * { min-width: 0; }
.liff-viewport .liff-main :is(input, select, textarea) { max-width: 100%; }
.liff-viewport .recipe-toggle { height: 44px; padding-block: 9px; }
@media (max-width: 780px) {
  .web-body input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .web-body textarea, .web-body select { font-size: 16px; }
  .web-body .app-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
}
