:root {
  --bg: #e3dfcc;
  --panel: #fbfbfb;
  --card: #dfdbc7;
  --ink: #111111;
  --muted: #585858;
  --line: rgba(57, 54, 45, 0.28);
  --accent: #ff980f;
  --ticker: #4ecb71;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --phone-width: 430px;
  --phone-height: 932px;
  --content-width: 386px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.phone {
  position: relative;
  width: min(100vw, var(--phone-width));
  height: min(100dvh, var(--phone-height));
  overflow: hidden;
  background: var(--bg);
}

.screen {
  position: absolute;
  inset: 0;
  padding: calc(14px + var(--safe-top)) 22px calc(80px + var(--safe-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  transform: translateX(14px);
  overflow-y: auto;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen[data-screen="home"] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen--details {
  z-index: 3;
  background: var(--bg);
  padding-top: calc(2px + var(--safe-top));
  transform: translateY(18px);
}

.screen--details.is-active {
  transform: translateY(0);
}

/* ── Sub-screen (stub pages) ── */
.screen--sub {
  z-index: 2;
  background: var(--bg);
  transform: translateX(100%);
  transition: opacity 200ms ease, transform 200ms ease;
}

.screen--sub.is-active {
  transform: translateX(0);
}

.sub-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 18px;
}

.back-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.back-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--ink);
}

.sub-topbar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.stub-content {
  padding: 24px 0;
}

.stub-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 12px;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.04);
}

.stub-card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.stub-card__text {
  font-size: 15px;
  line-height: 1.25;
  color: var(--muted);
}

.stub-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.3;
}

.stub-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* ── Home top ── */
.home-top {
  display: flex;
  justify-content: flex-end;
  width: min(100%, var(--content-width));
  margin-left: auto;
  margin-right: auto;
  padding-top: 2px;
  margin-bottom: 24px;
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.notice-pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Reserve card ── */
.reserve-card {
  position: relative;
  width: min(100%, var(--content-width));
  margin-left: auto;
  margin-right: auto;
  flex: 1;
  min-height: 0;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px 16px;
  background: rgba(223, 219, 199, 0.45);
}

.reserve-card__header,
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.reserve-card__header h1,
.page-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.trident {
  width: 36px;
  height: 44px;
  flex: 0 0 auto;
}

.trident svg {
  width: 100%;
  height: 100%;
  fill: #000;
}

.reserve-card__body {
  margin-top: 28px;
}

.meta-block {
  display: grid;
  gap: 4px;
}

.meta-block--delay {
  margin-top: 18px;
}

.meta-label {
  font-size: 17px;
  line-height: 1.1;
  color: var(--muted);
  font-weight: 400;
}

.meta-label--role {
  font-size: 17px;
  margin-bottom: 10px;
}

.meta-value {
  font-size: 20px;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.meta-value--bold {
  font-size: 22px;
  font-weight: 600;
}

/* ── Ticker ── */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 130px;
  height: 26px;
  overflow: hidden;
  background: var(--ticker);
  display: flex;
  align-items: center;
}

.ticker--compact {
  position: static;
  margin: 14px -22px 12px;
}

.ticker__track {
  display: inline-flex;
  gap: 18px;
  min-width: max-content;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
}

.ticker__track span::before {
  content: "•";
  margin-right: 8px;
}

/* ── Card footer ── */
.reserve-card__footer {
  position: absolute;
  left: 22px;
  right: 14px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.person__name {
  max-width: 220px;
  font-size: 16px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.person__sub {
  margin-top: 8px;
  max-width: 240px;
  font-size: 15px;
  line-height: 1.08;
  color: rgba(17, 17, 17, 0.72);
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(255, 152, 15, 0.25);
  display: grid;
  place-items: center;
}

.fab svg {
  width: 28px;
  height: 28px;
  fill: #111;
}

.pager-dot {
  position: absolute;
  right: 26px;
  bottom: calc(68px + var(--safe-bottom));
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4f4f;
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, var(--phone-width));
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  padding: 8px 8px calc(6px + max(var(--safe-bottom), 4px));
  background: #f6f6f8;
  box-shadow: 0 -1px 0 rgba(17, 17, 17, 0.06);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #111;
  opacity: 0.96;
}

.nav-item span:last-child {
  font-size: 11px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-item.is-active span:last-child {
  font-weight: 600;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── Details screen ── */
.details-topbar {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.handle {
  width: 40px;
  height: 6px;
  border-radius: 999px;
  background: #111;
}

.details-scroll {
  height: calc(100% - 120px - var(--safe-bottom));
  overflow: auto;
  padding: 8px 1px 18px;
  scrollbar-width: none;
}

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

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 16px 16px 14px;
  margin-bottom: 10px;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.03);
}

.panel--identity {
  padding-top: 14px;
}

.identity-name {
  font-size: 24px;
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.identity-role {
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.1;
}

.field {
  margin-top: 14px;
}

.field--row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.field__label {
  font-size: 18px;
  line-height: 1.1;
  color: #222;
}

.field__value {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 500;
}

.field__value--multi {
  line-height: 1.02;
}

.split-panel {
  padding: 0;
  overflow: hidden;
}

.split-row {
  padding: 14px 16px;
}

.split-divider {
  height: 1px;
  background: rgba(17, 17, 17, 0.1);
}

.grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel--status {
  margin-bottom: 20px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.status-icon {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
}

.status-icon svg {
  width: 100%;
  height: 100%;
  fill: #4e9f44;
}

/* ── Inner pages (Services, Vacancies, Menu) ── */
.statusbar {
  display: none;
}

.page-header--simple,
.page-header--menu,
.page-header--vacancies {
  margin-top: 8px;
}

.page-header--simple h1,
.page-header--menu h1,
.page-header--vacancies h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.page-header--menu {
  display: block;
}

.page-header--vacancies {
  align-items: flex-start;
}

.version {
  margin-top: 6px;
  font-size: 16px;
  color: rgba(17, 17, 17, 0.45);
}

.help-button {
  width: 28px;
  height: 28px;
  border: 2px solid #1d1d1d;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
}

.list-page {
  margin-top: 20px;
}

.list-item {
  width: 100%;
  padding: 14px 0 13px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.list-item span {
  font-size: 28px;
  line-height: 0.8;
}

.vacancies-copy {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.vacancies-copy p {
  margin: 0 0 22px;
}

.checkbox-row {
  position: absolute;
  left: 68px;
  bottom: calc(130px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.checkbox-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(17, 17, 17, 0.65);
  border-radius: 2px;
  background: #f7f7f3;
}

.checkbox-row input:checked + .checkbox-custom {
  background: linear-gradient(#f7f7f3, #f7f7f3), #111;
  background-size: 100% 100%;
  box-shadow: inset 0 0 0 5px #111;
}

.cta-button {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: calc(54px + var(--safe-bottom));
  height: 54px;
  border-radius: 27px;
  background: var(--accent);
  font-size: 20px;
  font-weight: 500;
}

.menu-groups {
  margin-top: 20px;
}

.menu-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.menu-item {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 17px;
  line-height: 1.06;
}

.menu-item + .menu-item {
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.menu-item__icon {
  width: 24px;
  text-align: center;
  font-size: 16px;
  opacity: 0.9;
}

.logout-button {
  display: block;
  width: 90px;
  height: 42px;
  margin: 22px auto 12px;
  border-radius: 21px;
  background: #37312a;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.privacy-link {
  display: block;
  width: 220px;
  margin: 0 auto;
  text-align: center;
  font-size: 14px;
  line-height: 1.06;
  text-decoration: underline;
  color: rgba(17, 17, 17, 0.74);
}

.interactive {
  transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.interactive:active {
  transform: scale(0.97);
  filter: brightness(0.98);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 430px), (max-height: 932px) {
  body {
    place-items: start center;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
  }

  .bottom-nav {
    width: 100vw;
  }

  .reserve-card,
  .home-top {
    width: 100%;
  }
}
