/* A viewport-sized mobile companion to the native Photophy app.
   All layout overrides are below 760px and only while home is visible. */
.mobile-booth-shell { display: none; }

@media (max-width: 759px) {
  body.photophy-theme.mobile-booth-active {
    overflow: hidden;
    background: #fbf8fa;
  }
  body.mobile-booth-active > .ambient-scene { display: none; }
  body.mobile-booth-active .app {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .photophy-theme.mobile-booth-active .screen-home {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: linear-gradient(145deg, #fdfaf7, #fbf7fa 55%, #f5effb);
    text-align: left;
  }
  .mobile-booth-active .screen-home > :not(.mobile-booth-shell) { display: none !important; }
  .mobile-booth-active .mobile-booth-shell {
    --mb-ink: #2c253b;
    --mb-muted: #6f657a;
    --mb-purple: #8f58b2;
    --mb-line: #e9e0ee;
    --mb-gap: clamp(10px, 1.8dvh, 17px);
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 100%;
    height: var(--mb-viewport-height, 100dvh);
    max-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    color: var(--mb-ink);
    font-family: Inter, system-ui, sans-serif;
    line-height: 1.4;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-booth-shell *, .mobile-booth-shell *::before, .mobile-booth-shell *::after { box-sizing: border-box; }
  .mb-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 69px; padding: 11px max(21px, env(safe-area-inset-right)) 9px max(23px, env(safe-area-inset-left)); z-index: 4; }
  .mb-brand { display: inline-flex; align-items: center; gap: 9px; color: #675877; text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -.7px; }
  .mb-brand img { width: 31px; height: 31px; border-radius: 9px; }
  .mb-more { position: relative; }
  .mb-more summary { display: grid; place-items: center; width: 68px; min-height: 42px; border-radius: 22px; border: 1px solid #e6dcee; background: #ffffffc7; font-size: 14px; font-weight: 650; color: #5e477f; cursor: pointer; list-style: none; }
  .mb-more summary::-webkit-details-marker { display: none; }
  .mb-more nav { position: absolute; top: calc(100% + 8px); right: 0; width: 185px; padding: 6px; border: 1px solid var(--mb-line); border-radius: 18px; background: #fffdfd; box-shadow: 0 16px 45px #45304f26; }
  .mb-more nav a { display: block; padding: 13px 12px; border-radius: 12px; color: #54415f; font-size: 14px; text-decoration: none; }
  .mb-more nav a:hover { background: #f2ebfa; }
  .mb-pages { display: flex; flex: 1 1 auto; min-height: 0; width: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .mb-panel { display: flex; flex-direction: column; gap: var(--mb-gap); width: min(100%, 500px); min-height: 100%; height: 100%; padding: 12px max(24px, env(safe-area-inset-right)) 17px max(24px, env(safe-area-inset-left)); margin: 0 auto; text-align: left; }
  .mb-panel-booth { justify-content: center; }
  .mb-intro { flex: 0 0 auto; }
  .mb-eyebrow { margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: .15em; line-height: 1.3; text-transform: uppercase; color: #8a779d; }
  .mb-panel h1 { margin: 0; font: 750 clamp(34px, 10vw, 42px)/1.07 Inter, system-ui, sans-serif; letter-spacing: -.045em; color: var(--mb-ink); }
  .mb-panel h1 span { color: var(--mb-purple); }
  .mb-description { margin: 13px 0 0; color: var(--mb-muted); font-size: 14px; line-height: 1.55; max-width: 40ch; }
  .mb-picture { flex: 1 1 190px; min-height: 90px; max-height: 240px; width: 100%; margin: 0; border: 1px solid #ffffffd9; border-radius: 22px; overflow: hidden; background: #eee5ea; box-shadow: 0 12px 28px -15px #53405860; }
  .mb-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .mb-picture-booth img { object-position: 50% 52%; }
  .mb-picture-group { flex-basis: 155px; max-height: 190px; min-height: 75px; background: linear-gradient(135deg, #f0e3da, #ede4f0); }
  .mb-picture-group img { object-fit: contain; width: auto; max-width: 100%; margin: auto; border: 5px solid #fffcf8; box-shadow: 0 4px 16px #5d3e452b; }
  .mb-picture-monthly { flex-basis: 155px; max-height: 190px; min-height: 75px; }
  .mb-picture-rental { flex-basis: 195px; min-height: 105px; background: #f1efed; }
  .mb-picture-rental img { object-fit: contain; }
  .mb-steps { display: flex; justify-content: space-between; gap: 9px; list-style: none; flex: 0 0 auto; margin: 0; padding: 0 3px; font-size: 11px; color: #766a84; }
  .mb-steps li { white-space: nowrap; }
  .mb-steps span { margin-right: 4px; color: #a693b8; font-size: 10px; font-weight: 700; }
  .mb-actions { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
  .mb-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; width: 100%; border-radius: 18px; border: 1px solid var(--mb-line); padding: 12px 15px; font: 650 14px/1.4 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none; text-align: center; box-shadow: none; transition: transform .16s ease, background .16s ease; }
  .mb-primary { background: linear-gradient(90deg, #6f4fcc, #9d50aa); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -11px #7b4da882; }
  .mb-primary > [aria-hidden] { font-size: 21px; line-height: 1; font-weight: 400; }
  .mb-secondary { background: #fffdfed9; color: #685278; }
  .mb-button:active { transform: scale(.985); }
  .mb-note { flex: 0 0 auto; margin: 0; text-align: center; font-size: 10.5px; line-height: 1.45; color: #766a84; }
  .mb-features { flex: 0 0 auto; padding: 11px 13px; border: 1px solid var(--mb-line); border-radius: 17px; background: #ffffffa6; }
  .mb-features p { display: flex; flex-direction: column; gap: 3px; margin: 0; }
  .mb-features p + p { margin-top: 9px; padding-top: 9px; border-top: 1px solid #eee5f0; }
  .mb-features strong { font-size: 12px; font-weight: 650; color: #493852; }
  .mb-features span { font-size: 11px; line-height: 1.4; color: var(--mb-muted); }
  .mb-invite { flex: 0 0 auto; padding: 9px 12px; border-radius: 13px; background: #f0e6f7; border: 1px solid #e4d5ed; }
  .mb-invite span { display: block; font-size: 10px; color: #856c94; }
  .mb-invite strong { display: block; font-size: 13px; color: #624570; overflow-wrap: anywhere; }
  .mb-rental-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; margin-bottom: 12px; }
  .mb-rental-heading .mb-eyebrow { margin: 0; font-size: 9px; }
  .mb-soon { display: inline-flex; padding: 5px 8px; border: 1px solid #e3d4ed; border-radius: 12px; background: #f2e8f8; color: #7847a3; font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
  .mb-rental-steps { flex: 0 0 auto; list-style: none; margin: 0; padding: 0; }
  .mb-rental-steps li { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
  .mb-rental-steps li + li { border-top: 1px solid #e8deed; }
  .mb-rental-steps > li > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 11px; background: #efe4f7; color: #9b77b1; font-size: 10px; font-weight: 700; }
  .mb-rental-steps strong { display: block; font-size: 12px; color: #493852; }
  .mb-rental-steps p { margin: 3px 0 0; font-size: 11px; color: var(--mb-muted); }
  .mb-tabs { display: flex; flex: 0 0 auto; gap: 4px; padding: 7px max(12px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); min-height: 66px; border-top: 1px solid #ece3ef; background: #fffdfc; }
  .mb-tabs button { flex: 1 1 0; min-width: 0; min-height: 48px; border: 0; border-radius: 17px; padding: 8px 3px; background: transparent; color: #83778d; font: 500 12px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }
  .mb-tabs button[aria-selected="true"] { background: #f2ebfa; color: #6b42a8; font-weight: 700; }
  .mobile-booth-shell :is(a,button,summary,input):focus-visible { outline: 2px solid #7956c5; outline-offset: 3px; }
  .mb-join-dialog { width: min(420px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 27px 22px 22px; border: 1px solid #e9ddec; border-radius: 25px; background: #fffafc; color: var(--mb-ink); box-shadow: 0 20px 70px #33243d40; text-align: left; }
  .mb-join-dialog::backdrop { background: #291d3a66; backdrop-filter: blur(4px); }
  .mb-dialog-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1e8f6; color: #725882; font-size: 23px; cursor: pointer; }
  .mb-join-dialog .mb-eyebrow { padding-right: 20px; font-size: 8px; }
  .mb-join-dialog h2 { margin: 0; font: 700 25px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.035em; }
  .mb-join-dialog p:not(.mb-eyebrow) { font-size: 13px; line-height: 1.55; color: var(--mb-muted); }
  .mb-join-dialog label { display: block; margin-top: 20px; font-size: 11px; font-weight: 650; color: #685575; }
  .mb-join-dialog input { display: block; width: 100%; height: 48px; padding: 10px 12px; margin: 7px 0 16px; border: 1px solid #d9c9e4; border-radius: 12px; background: #fff; font: 400 16px/1.4 Inter, system-ui, sans-serif; color: var(--mb-ink); }
  .mb-join-dialog input[aria-invalid="true"] { border-color: #b85069; }
  .mb-join-dialog .mb-invite-error { color: #a33b56 !important; font-size: 12px; }
  @media (max-height: 740px) {
    .mobile-booth-active .mobile-booth-shell { --mb-gap: 10px; }
    .mb-header { flex-basis: 60px; }
    .mb-panel { padding-top: 8px; padding-bottom: 11px; }
    .mb-eyebrow { margin-bottom: 8px; font-size: 9px; }
    .mb-panel h1 { font-size: 34px; }
    .mb-description { font-size: 12px; line-height: 1.5; margin-top: 10px; }
    .mb-picture { min-height: 78px; }
    .mb-picture-group, .mb-picture-monthly { min-height: 58px; }
    .mb-button { min-height: 46px; padding: 10px 12px; font-size: 12px; border-radius: 15px; }
    .mb-actions { gap: 8px; }
    .mb-features { padding: 8px 11px; }
    .mb-features p + p { margin-top: 6px; padding-top: 6px; }
    .mb-note { font-size: 9.5px; }
    .mb-tabs { min-height: 60px; padding-top: 5px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
    .mb-tabs button { min-height: 44px; }
    .mb-rental-steps li { padding: 7px 0; }
  }
  /* When text is enlarged, or a device is in landscape, the content pane may
     scroll; the header, navigation and every action stay accessible. */
  @media (max-height: 610px) {
    .mb-panel { height: auto; min-height: 100%; padding-bottom: 14px; }
    .mb-panel-booth { justify-content: flex-start; }
    .mb-picture { flex: 0 0 105px; }
    .mb-picture-group, .mb-picture-monthly { flex-basis: 95px; }
    .mb-header { flex-basis: 56px; }
    .mb-panel h1 { font-size: 30px; }
  }
  @media (prefers-reduced-motion: reduce) { .mobile-booth-shell * { animation: none !important; transition: none !important; } }
  @media (forced-colors: active) { .mb-tabs button[aria-selected="true"] { border: 2px solid Highlight; } .mb-primary { border: 1px solid ButtonText; } }
}
