/* iPhone and compact-screen layout overrides for the DEWELL launcher. */

html {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.launcher {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-right: max(clamp(22px, 5vw, 80px), env(safe-area-inset-right));
  padding-bottom: max(42px, env(safe-area-inset-bottom));
  padding-left: max(clamp(22px, 5vw, 80px), env(safe-area-inset-left));
}

.service-status {
  min-width: 0;
  max-width: min(52vw, 290px);
}

.service-status b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card,
.text-button,
.stream-action {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.card-footer {
  gap: 10px;
}

.card-action,
.card-badge {
  min-width: 0;
}

.card-action {
  overflow-wrap: anywhere;
}

.card-badge {
  flex: 0 0 auto;
  white-space: nowrap;
}

.launch-view {
  min-height: calc(100vh - 110px);
  min-height: calc(100dvh - 110px);
  padding-bottom: env(safe-area-inset-bottom);
}

.stream-view {
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* The in-player dock owns exit and fullscreen controls now. */
.stream-view > .stream-action {
  display: none !important;
}

@media (max-width: 600px) {
  .launcher {
    overflow: hidden;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(26px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .topbar {
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
  }

  .service-status {
    min-height: 34px;
    max-width: min(55vw, calc(100% - 142px));
    padding: 8px 11px;
  }

  .service-status b {
    display: block;
    font-size: 10px;
  }

  .catalog-view {
    margin-top: clamp(30px, 7vh, 48px);
  }

  .eyebrow {
    margin-bottom: 11px;
    font-size: 10px;
    line-height: 1.35;
  }

  .intro h1 {
    max-width: 100%;
    font-size: clamp(34px, 10.2vw, 42px);
    line-height: 1.01;
  }

  .lead {
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.48;
  }

  .project-grid {
    gap: 12px;
    margin-top: 26px;
  }

  .project-card {
    min-height: 0;
    padding: 17px;
    border-radius: 18px;
  }

  .project-art {
    top: 15px;
    right: 16px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .project-art::before {
    inset: 13px;
  }

  .project-art::after {
    inset: 21px;
  }

  .project-card h2 {
    margin: 43px 0 7px;
    padding-right: 54px;
    font-size: 21px;
    line-height: 1.05;
  }

  .project-card p {
    min-height: 0;
    font-size: 12px;
    line-height: 1.45;
  }

  .card-footer {
    align-items: flex-end;
    margin-top: 15px;
  }

  .card-action {
    font-size: 11px;
    line-height: 1.25;
  }

  .card-badge {
    padding: 5px 7px;
    font-size: 8px;
  }

  .catalog-message {
    margin-top: 17px;
    font-size: 12px;
    line-height: 1.45;
  }

  .ambient-one {
    top: 20%;
    right: -135px;
    width: 270px;
    height: 270px;
    filter: blur(68px);
  }

  .ambient-two {
    bottom: -120px;
    left: -120px;
    width: 260px;
    height: 260px;
    filter: blur(68px);
  }

  .launch-view {
    min-height: calc(100dvh - 82px);
    padding: 24px 4px max(22px, env(safe-area-inset-bottom));
  }

  .launch-orbit {
    width: 116px;
    height: 116px;
    margin-bottom: 28px;
  }

  .launch-orbit span {
    inset: 46px;
  }

  .launch-view h2 {
    max-width: 92vw;
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.04;
  }

  .launch-view > p:not(.eyebrow):not(.launch-timer) {
    margin-top: 13px;
    font-size: 14px;
    line-height: 1.45;
  }

  .progress {
    width: min(360px, 84vw);
    margin-top: 26px;
  }

  .text-button {
    min-height: 44px;
    margin-top: 20px;
  }

  .stream-action {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
  }

  .stream-exit {
    right: max(14px, env(safe-area-inset-right));
  }

  .stream-fullscreen {
    right: max(70px, calc(env(safe-area-inset-right) + 70px));
  }
}

@media (max-width: 380px) {
  .brand b {
    font-size: 13px;
  }

  .service-status {
    max-width: 48vw;
  }

  .intro h1 {
    font-size: 34px;
  }

  .project-card h2 {
    padding-right: 44px;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .launcher {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
    overflow: visible;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .service-status {
    min-height: 30px;
    padding: 7px 10px;
  }

  .catalog-view {
    margin-top: 18px;
  }

  .intro {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1.2fr);
    align-items: end;
    column-gap: 24px;
    max-width: none;
  }

  .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: 6px;
    font-size: 9px;
  }

  .intro h1 {
    font-size: clamp(31px, 6vw, 48px);
    line-height: 0.95;
  }

  .lead {
    margin: 0 0 1px;
    font-size: 12px;
    line-height: 1.35;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
  }

  .project-card {
    min-height: 0;
    padding: 13px 15px;
    border-radius: 17px;
  }

  .project-number {
    font-size: 9px;
  }

  .project-art {
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .project-art::before {
    inset: 10px;
  }

  .project-art::after {
    inset: 16px;
  }

  .project-card h2 {
    margin: 28px 0 5px;
    padding-right: 42px;
    font-size: 18px;
  }

  .project-card p {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .card-footer {
    margin-top: 9px;
    font-size: 9px;
  }

  .card-badge {
    padding: 4px 6px;
    font-size: 7px;
  }

  .catalog-message {
    min-height: 0;
    margin-top: 10px;
    font-size: 10px;
  }

  .launch-view {
    min-height: calc(100dvh - 48px);
    padding: 8px 0 max(10px, env(safe-area-inset-bottom));
  }

  .launch-orbit {
    width: 76px;
    height: 76px;
    margin-bottom: 13px;
  }

  .launch-orbit > i:nth-child(2) {
    inset: 10px;
  }

  .launch-orbit > i:nth-child(3) {
    inset: 21px;
  }

  .launch-orbit span {
    inset: 30px;
  }

  .launch-view h2 {
    font-size: clamp(26px, 5vw, 36px);
  }

  .launch-view > p:not(.eyebrow):not(.launch-timer) {
    margin-top: 8px;
    font-size: 12px;
  }

  .progress {
    margin-top: 16px;
  }

  .text-button {
    min-height: 40px;
    margin-top: 8px;
  }
}

/* MOBILE_INVITE_INPUT_LARGE_V1 */
@media (max-width: 760px) {
  .invite-join-row input {
    width: 100%;
    height: 66px;
    padding: 0 20px;
    border-color: rgba(201, 255, 74, 0.38);
    border-radius: 18px;
    background: rgba(4, 7, 10, 0.78);
    font-size: 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  }

  .invite-join-row input:focus {
    border-color: rgba(201, 255, 74, 0.82);
    box-shadow: 0 0 0 4px rgba(201, 255, 74, 0.1);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .invite-join-row input {
    height: 58px;
  }
}
