:root {
  --app-width: 760px;
  --app-nav-height: 76px;
}

.vitaflow-app {
  background: var(--surface);
  color: var(--primary);
  overscroll-behavior-y: contain;
}

.vitaflow-app [hidden] {
  display: none !important;
}

.vitaflow-app .app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: auto;
  padding-top: env(safe-area-inset-top);
  background: var(--white);
  border-bottom: 1px solid var(--medium);
  box-shadow: none;
}

.app-header-inner {
  max-width: 1120px;
  min-height: 76px;
  margin: auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header img {
  display: block;
}

.app-header a,
.app-nav a,
.app-row,
.app-primary {
  text-decoration: none;
}

.app-header-help {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--surface);
}

.app-main {
  padding-bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom) + 32px);
  min-height: calc(100dvh - 76px);
}

.app-content {
  width: 100%;
  max-width: var(--app-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.app-auth {
  max-width: 460px;
  padding-top: 56px;
}

.app-heading {
  margin-bottom: 28px;
}

.app-heading h1,
.app-product-heading h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 0 0 12px;
}

.app-heading p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.app-search {
  display: block;
  margin-bottom: 24px;
}

.app-search .input {
  background: var(--white);
}

.app-service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-service {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  min-height: 108px;
  border-radius: var(--radius-m);
  background: var(--white);
  border: 1px solid var(--medium);
  text-decoration: none;
  transition: border-color .2s;
}

.app-service:hover,
.app-service:focus-visible {
  border-color: var(--primary-medium);
  text-decoration: none;
}

.app-service .icon-tile {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.app-service-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-service-text strong {
  font-size: 16px;
  line-height: 1.4;
}

.app-service-text > span {
  font-size: 14px;
  color: var(--text);
}

.app-chevron {
  margin-left: auto;
  font-size: 26px;
  color: var(--muted);
}

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  height: calc(var(--app-nav-height) + env(safe-area-inset-bottom));
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--medium);
  background: var(--white);
}

.app-nav a {
  display: flex;
  width: min(33.333%, 180px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.app-nav .icon {
  width: 24px;
  height: 24px;
}

.app-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.app-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.app-form .field {
  width: 100%;
  margin: 0;
}

.app-form .input {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  background: var(--white);
}

.app-form label {
  font-size: 14px;
}

.app-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 16px 24px;
  background: var(--primary);
  color: var(--white);
  border: 0;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.app-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.app-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.app-check input {
  position: static;
  opacity: 1;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.app-check a,
.app-text-link,
.app-auth-footer a,
.app-notice a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.app-auth-footer {
  text-align: center;
  font-size: 14px;
}

.app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px;
  margin: 12px 0;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  background: var(--white);
}

.app-row span {
  font-size: 24px;
  line-height: 1;
}

.app-order,
.app-empty {
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--medium);
  border-radius: var(--radius-m);
  background: var(--white);
}

.app-order h2,
.app-empty h2,
.app-content > h2 {
  font-size: 20px;
  margin: 20px 0 12px;
}

.app-order-top,
.app-order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text);
}

.app-order-meta {
  margin-bottom: 20px;
}

.app-order-meta strong {
  color: var(--primary);
  font-size: 16px;
}

.app-order p {
  font-size: 14px;
  margin-top: 20px;
}

.app-status {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
}

.app-status.done {
  color: var(--success);
  background: var(--success-light);
}

.app-status.cancelled {
  color: var(--text);
  background: var(--surface);
}

.app-status.failed,
.app-notice.error {
  color: var(--error);
  background: var(--error-light);
}

.app-notice {
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--primary-light);
  font-size: 14px;
  line-height: 1.6;
}

.app-network {
  padding: 12px 24px;
  font-size: 14px;
  background: var(--error-light);
  color: var(--error);
}

.app-product-heading {
  padding-top: 28px;
}

.app-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
}

.vitaflow-app .order-module {
  padding: 20px 0 32px;
}

.vitaflow-app .order-steps {
  margin-bottom: 24px;
}

.vitaflow-app .form-card {
  border-radius: var(--radius-m);
  box-shadow: none;
}

.vitaflow-app .day-list,
.vitaflow-app .hour-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.vitaflow-app .day-list::-webkit-scrollbar,
.vitaflow-app .hour-list::-webkit-scrollbar {
  display: none;
}

.vitaflow-app .day-list .day,
.vitaflow-app .hour-list .hour {
  flex: 0 0 clamp(72px, calc((100% - 64px) / 3), 96px);
  width: clamp(72px, calc((100% - 64px) / 3), 96px);
  scroll-snap-align: start;
}

.app-reconfirm {
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius-m);
}

.vitaflow-app :focus-visible {
  outline: 3px solid var(--primary-medium);
  outline-offset: 3px;
}

.app-legal {
  font-size: 15px;
  line-height: 1.8;
}

@media (min-width: 1000px) {
  .vitaflow-app .order-module > .container,
  .app-product-heading > .container {
    max-width: 1120px;
  }
}

@media (max-width: 767px) {
  .app-header-inner {
    min-height: 68px;
    padding: 12px 24px;
  }

  .app-content {
    padding: 28px 24px;
  }

  .app-auth {
    padding-top: 36px;
  }

  .app-heading h1,
  .app-product-heading h1 {
    font-size: 28px;
  }

  .app-service-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-service {
    padding: 18px;
    min-height: 98px;
  }

  .vitaflow-app .order-module > .container,
  .app-product-heading > .container {
    padding-left: 24px;
    padding-right: 24px;
    max-width: 100%;
  }

  .vitaflow-app .order-layout .order-form,
  .vitaflow-app .order-layout .order-aside {
    width: 100%;
    min-width: 0;
  }

  .vitaflow-app .form-card {
    padding: 20px 16px;
  }

  .vitaflow-app .form-card-head h2 {
    font-size: 19px;
  }

  .vitaflow-app .order-steps .step .text {
    display: none;
  }

  .vitaflow-app .pay-bar {
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom));
  }

  .app-checkout .app-main {
    padding-bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom) + 120px);
  }
}
.app-profile-document {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.app-profile-document[hidden] {
  display: none;
}

