:root {
  --page-blue: #eaf1f8;
  --surface: #effaff;
  --surface-strong: #ffffff;
  --ink: #122e64;
  --ink-muted: #7391bb;
  --blue: #0875ef;
  --blue-deep: #0645bc;
  --cyan: #22e8f3;
  --red: #fc525c;
  --green: #06ae7d;
  --orange: #f17024;
  --shell-radius: clamp(2.6rem, 9vw, 4.7rem);
  --card-radius: clamp(1.5rem, 5.5vw, 3.15rem);
  --soft-shadow: 0 1rem 2.1rem rgba(52, 103, 149, 0.18);
  --thin-border: rgba(255, 255, 255, 0.87);
}

@font-face {
  font-family: "Protect Montserrat";
  src: url("../assets/fonts/Montserrat-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Protect Montserrat";
  src: url("../assets/fonts/Montserrat-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Protect Montserrat";
  src: url("../assets/fonts/Montserrat-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Protect Montserrat";
  src: url("../assets/fonts/Montserrat-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Protect Slogan";
  src: url("../assets/fonts/RobotoCondensed-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page-blue);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Protect Montserrat", "Montserrat", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #047cf6;
  outline-offset: 4px;
}

.page-shell {
  min-height: 100svh;
  overflow: clip;
}

.app-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: clamp(0.35rem, 1.3vw, 0.65rem);
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(1.35rem, 4vw, 2rem) clamp(1rem, 5vw, 1.75rem) 1.25rem;
  background:
    radial-gradient(circle at 46% 17%, rgba(255, 255, 255, 0.98) 0 10%, rgba(235, 250, 255, 0.73) 35%, transparent 63%),
    radial-gradient(circle at 50% 68%, #edfdff 0%, #dcf7fc 38%, #e7f3fa 100%);
}

.app-content {
  position: relative;
  display: flex;
  width: 100%;
  height: auto;
  min-height: 0;
  grid-row: 1;
  align-self: stretch;
  flex: none;
  flex-direction: column;
  transform: scale(var(--layout-scale, 1));
  transform-origin: top center;
}

.app-content > .brand-header,
.app-content > .security-controls,
.app-content > .quick-actions {
  flex-shrink: 0;
}

.top-decoration,
.bottom-decoration {
  position: absolute;
  z-index: -1;
  width: 100%;
  pointer-events: none;
}

.top-decoration { top: 0; right: 0; }
.bottom-decoration { bottom: 0; left: 0; }

.brand-header {
  position: relative;
  min-height: clamp(12.9rem, 49vw, 18rem);
  padding: clamp(0.2rem, 0.7vw, 0.75rem) clamp(0.25rem, 2vw, 0.75rem) 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  transform: none;
}

.brand-lockup {
  display: grid;
  width: min(100%, 32rem);
  min-width: 0;
  grid-template-columns: 34% minmax(0, 66%);
  align-items: start;
  color: #0456c5;
  transform: none;
}

.reference-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.wordmark-stack { min-width: 0; }

.protect-logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.logo-wordmark {
  fill: url(#logo-word);
  font-family: "Protect Montserrat", "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 92px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -6px;
  paint-order: stroke fill;
  stroke: rgba(0, 81, 185, 0.36);
  stroke-width: 1.4px;
}

.brand-promise {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: clamp(-1.6rem, calc(-0.35rem - 1.85vw), -1.1rem) 0 0;
  padding: 0;
  color: #174a9f;
  font-family: "Protect Slogan", "Roboto Condensed", Arial, sans-serif;
  font-size: clamp(0.85rem, 3.25vw, 1.28rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.28;
  text-align: center;
}

.brand-promise span { white-space: nowrap; }

.location-selector {
  display: flex;
  width: min(61%, 20rem);
  min-height: clamp(2.2rem, 8.6vw, 3.3rem);
  align-items: center;
  gap: 0.9rem;
  margin: clamp(0.55rem, 2.7vw, 1.1rem) auto 0;
  padding: 0.3rem 0.8rem 0.3rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.8), rgba(209, 243, 255, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0.45rem 1rem rgba(46, 122, 174, 0.1);
  color: #0a2b65;
  font-size: clamp(0.94rem, 3.55vw, 1.35rem);
  font-weight: 700;
}

.location-icon {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  color: #049cd9;
  transform: scale(1.8);
  transform-origin: center;
}
.chevron { width: 1.05rem; margin-left: auto; color: #0c4fa9; }

.brand-header,
.security-controls,
.quick-actions,
.bottom-navigation {
  width: min(100%, 34rem);
  margin-right: auto;
  margin-left: auto;
}

.security-controls { position: relative; margin-top: 0.1rem; }

.security-controls::before,
.security-controls::after {
  position: absolute;
  z-index: 2;
  top: 53.5%;
  width: calc(50% - clamp(2.65rem, 9.5vw, 4.65rem));
  height: clamp(0.18rem, 0.65vw, 0.34rem);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 187, 235, 0.2), #a6d1f2 36%, #a6d1f2 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  content: "";
}

.security-controls::before { left: 10%; }
.security-controls::after { right: 10%; transform: scaleX(-1); }

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(0.58rem, 2.25vw, 1.15rem);
  row-gap: clamp(3.5rem, 15vw, 6.5rem);
}

.security-card {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 0.95;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--thin-border);
  border-radius: var(--card-radius);
  background: radial-gradient(circle at 30% 13%, #ffffff 0, #fbfeff 30%, #e5f4fd 83%, #d5eafa 100%);
  box-shadow: 0 1.15rem 2rem rgba(60, 111, 159, 0.2), inset 0 1px 0 #fff;
  color: #1c426e;
  --lock-keyhole: #eaf6fd;
  transition: color 90ms linear, transform 90ms ease-out;
}

.security-card::after {
  position: absolute;
  right: -20%;
  bottom: -37%;
  width: 122%;
  height: 74%;
  border-radius: 50%;
  background: linear-gradient(142deg, transparent 29%, rgba(179, 220, 246, 0.55) 100%);
  content: "";
  transform: rotate(-14deg);
}

.security-card:hover { transform: translateY(-2px); }

.security-card:nth-child(n + 3) { aspect-ratio: 1.12; }

.security-card.is-active {
  border: 3px solid transparent;
  background:
    linear-gradient(138deg, rgba(215, 255, 255, 0.46) 0%, rgba(67, 210, 255, 0.14) 19%, transparent 42%, rgba(3, 42, 157, 0.18) 100%) padding-box,
    radial-gradient(ellipse at 28% 14%, #61d5ff 0%, #1197f3 25%, #0757cf 59%, #033895 100%) padding-box,
    linear-gradient(135deg, #e6ffff 0%, #43f6ff 9%, #0979ef 24%, #003796 48%, #0757d8 65%, #24ddf1 84%, #d7ffff 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(0, 66, 187, 0.94),
    0 0 0 3px rgba(29, 214, 255, 0.66),
    0 0.14rem 0.8rem 0.12rem rgba(0, 220, 255, 0.8),
    0 1.05rem 2rem 0.15rem rgba(0, 104, 235, 0.48),
    0 2rem 3.1rem rgba(47, 122, 204, 0.24),
    inset 0 1px 0 rgba(233, 255, 255, 0.92),
    inset 0 -1rem 1.35rem rgba(0, 24, 141, 0.32);
  color: #fff;
  --lock-keyhole: #0b55ca;
}

.security-card.is-active::before {
  position: absolute;
  z-index: 0;
  inset: 0.28rem;
  border: 1.4px solid rgba(181, 255, 255, 0.86);
  border-radius: calc(var(--card-radius) - 0.28rem);
  background: linear-gradient(135deg, rgba(232, 255, 255, 0.36), transparent 17%, transparent 74%, rgba(16, 213, 255, 0.32));
  box-shadow:
    inset 0 2px 2px rgba(236, 255, 255, 0.66),
    inset 2px 0 5px rgba(35, 224, 255, 0.33),
    inset -2px -3px 6px rgba(0, 31, 147, 0.46),
    0 0 0.32rem rgba(77, 244, 255, 0.3);
  content: "";
  pointer-events: none;
}

.security-card.is-active::after {
  right: -27%;
  bottom: -44%;
  width: 131%;
  height: 83%;
  border: 1px solid rgba(143, 241, 255, 0.22);
  background:
    radial-gradient(ellipse at 18% 12%, rgba(142, 247, 255, 0.34), transparent 42%),
    linear-gradient(135deg, transparent 26%, rgba(12, 227, 255, 0.32) 100%);
  box-shadow: inset 0 0 1.1rem rgba(3, 48, 172, 0.2);
}

.credit-card.is-active {
  border: 2px solid var(--thin-border);
  background: radial-gradient(circle at 30% 13%, #ffffff 0, #fbfeff 30%, #e5f4fd 83%, #d5eafa 100%);
  box-shadow: 0 1.15rem 2rem rgba(60, 111, 159, 0.2), inset 0 1px 0 #fff;
  color: #1c426e;
}

.credit-card.is-active::before { display: none; }

.credit-card.is-active::after {
  right: -20%;
  bottom: -37%;
  width: 122%;
  height: 74%;
  border: 0;
  background: linear-gradient(142deg, transparent 29%, rgba(179, 220, 246, 0.55) 100%);
  box-shadow: none;
}

.card-rings {
  position: absolute;
  width: 84%;
  height: 84%;
  border: 1px solid rgba(138, 224, 255, 0.2);
  border-radius: 50%;
  transform: translateY(-5%);
}

.card-rings::after,
.card-rings::before {
  position: absolute;
  border: 1px solid rgba(138, 224, 255, 0.16);
  border-radius: inherit;
  content: "";
}

.card-rings::before { inset: 0.72rem; }
.card-rings::after { inset: 1.44rem; }

.card-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 1vw, 0.65rem);
  padding: 0.8rem;
}

.icon { display: block; width: 1em; height: 1em; fill: currentColor; }

.mode-icon {
  width: clamp(3.8rem, 15vw, 6.8rem);
  height: clamp(3.8rem, 15vw, 6.8rem);
}

.icon-lock-open { color: currentColor; }

.credit-icon {
  display: block;
  height: clamp(2.926rem, 11.55vw, 5.236rem);
  color: #123d75;
  font-family: "Protect Montserrat", "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: clamp(3.619rem, 13.86vw, 6.006rem);
  font-weight: 800;
  line-height: 0.93;
  transform: translateY(-8%);
}

.card-title {
  font-size: clamp(1.45rem, 5.1vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
}

.mode-indicator {
  width: clamp(2.6rem, 9vw, 4.35rem);
  height: clamp(0.25rem, 1vw, 0.42rem);
  margin-top: clamp(0.15rem, 0.6vw, 0.45rem);
  border-radius: 999px;
  background: #abcceb;
}

.is-active .mode-indicator { background: #48eaff; box-shadow: 0 0 0.55rem rgba(54, 245, 255, 0.8); }

.sync-button {
  position: absolute;
  z-index: 3;
  top: 53.5%;
  left: 50%;
  display: grid;
  width: clamp(3.5rem, 12.7vw, 6.25rem);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255,255,255,0.98);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff 0 12%, #e8fbff 48%, #c4eaf7 100%);
  box-shadow: 0 0 0 2px rgba(150, 231, 247, 0.66), 0 0.75rem 1.45rem rgba(51, 123, 159, 0.2), inset 0 0 0.9rem rgba(255,255,255,0.96);
  color: #0570e9;
  transform: translate(-50%, -50%);
}

.sync-button .icon {
  width: 61%;
  height: 61%;
  transform: scaleX(-1);
}

.sync-button.is-syncing .icon { animation: spin-counterclockwise 620ms linear infinite; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.25rem, 2vw, 1rem);
  margin-top: clamp(0.9rem, 4vw, 1.45rem);
  margin-bottom: clamp(0.6rem, 2.5vw, 1.25rem);
}

.quick-action {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
  background: transparent;
  color: #102f69;
  font-size: clamp(0.94rem, 3.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.quick-disc {
  position: relative;
  display: grid;
  width: clamp(5rem, 20.5vw, 8.8rem);
  height: clamp(5rem, 20.5vw, 8.8rem);
  max-width: 100%;
  place-items: center;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #f8fcff 42%, #d9eefd 100%);
  box-shadow: 0 0 0 3px rgba(186, 222, 255, 0.68), 0 0.75rem 1.4rem rgba(38, 91, 147, 0.16), inset 0 0 1.2rem rgba(255,255,255,0.95);
}

.quick-disc::before {
  position: absolute;
  inset: 0.35rem;
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: inherit;
  content: "";
}

.quick-icon { position: relative; z-index: 1; width: 48%; height: 48%; }
.alert-action .quick-icon { color: #0879f2; }
.call-alert-action .quick-icon { color: var(--green); }
.call-action .quick-icon { color: #176fe7; }
.alert-action .quick-disc { box-shadow: 0 0 0 3px rgba(144, 195, 255, 0.78), 0 0.75rem 1.4rem rgba(38, 91, 147, 0.16), inset 0 0 1.7rem rgba(132, 194, 255, 0.25); }
.call-alert-action .quick-disc { box-shadow: 0 0 0 3px rgba(91, 242, 241, 0.72), 0 0.75rem 1.4rem rgba(38, 91, 147, 0.16), inset 0 0 1.7rem rgba(109, 255, 213, 0.26); }
.call-action .quick-disc { box-shadow: 0 0 0 3px rgba(161, 204, 255, 0.78), 0 0.75rem 1.4rem rgba(38, 91, 147, 0.16), inset 0 0 1.7rem rgba(131, 196, 255, 0.24); }

.quick-action:active .quick-disc { transform: scale(0.95); }

.outputs-view { display: grid; width: min(100%, 34rem); flex: 0 0 auto; gap: clamp(0.5rem, 1.7vw, 0.85rem); margin: clamp(1.15rem, 4.5vw, 2rem) auto 0; }
.outputs-view[hidden] { display: none; }
.quick-actions[hidden] { display: none; }

.settings-view { display: grid; width: min(100%, 34rem); flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; column-gap: clamp(0.45rem, 3vw, 1.45rem); row-gap: clamp(0.52rem, 3vw, 1.2rem); margin: clamp(0.85rem, 3.4vw, 1.55rem) auto 0; }
.settings-view[hidden] { display: none; }
.settings-option { display: flex; width: min(100%, clamp(4.5rem, 22.5vw, 8rem)); aspect-ratio: 1; justify-self: center; align-items: center; justify-content: center; flex-direction: column; gap: clamp(0.06rem, 0.55vw, 0.3rem); padding: clamp(0.35rem, 1.4vw, 0.8rem); border: 1px solid transparent; border-radius: 50%; background: radial-gradient(circle at 36% 25%, rgba(255, 255, 255, 0.98) 0%, rgba(242, 250, 254, 0.94) 45%, rgba(226, 241, 249, 0.9) 100%) padding-box, linear-gradient(118deg, #e9ffff 0%, #5cf9ff 9%, #00bfff 20%, #0878f2 35%, #033baf 50%, #076de8 64%, #10dff5 82%, #dffeff 100%) border-box; box-shadow: 0 0.38rem 0.9rem rgba(19, 132, 193, 0.14), 0 0 0.42rem rgba(0, 188, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -0.4rem 0.9rem rgba(91, 193, 239, 0.08); color: #1c426e; font-size: clamp(0.78rem, 3.8vw, 1.42rem); font-weight: 600; line-height: 1; text-align: center; transition: transform 100ms ease-out, background-color 100ms linear; }
.settings-option:hover { transform: translateY(-1px); }
.settings-option:active { transform: scale(0.95); }
.settings-option-icon { width: 43%; height: 43%; flex: 0 0 43%; }

.intro-view { display: flex; width: min(100%, 34rem); min-height: 0; flex: 1 1 auto; flex-direction: column; gap: clamp(0.55rem, 1.8vw, 0.9rem); margin: clamp(0.45rem, 1.8vw, 1rem) auto clamp(0.55rem, 1.8vw, 1rem); }
.intro-view[hidden] { display: none; }
.app-content.is-intro-view .location-selector { display: none; }
.app-content.is-intro-view .brand-header { min-height: 0; padding-bottom: clamp(0.15rem, 1vw, 0.45rem); }
.intro-copy { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: clamp(1rem, 4.3vw, 1.85rem) clamp(1rem, 4.8vw, 2rem); border: 1px solid rgba(89, 220, 251, 0.76); border-radius: clamp(1.35rem, 5.2vw, 2.4rem); background: linear-gradient(128deg, rgba(255, 255, 255, 0.94), rgba(226, 247, 255, 0.82)); box-shadow: 0 0.55rem 1.25rem rgba(29, 119, 176, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -0.55rem 1.1rem rgba(76, 184, 230, 0.08); color: #11396f; font-family: Tahoma, Arial, sans-serif; font-size: clamp(0.84rem, 3.3vw, 1.08rem); line-height: 1.85; text-align: right; scrollbar-color: rgba(0, 124, 239, 0.48) transparent; scrollbar-width: thin; }
.intro-copy h1 { margin: 0 0 0.55rem; color: #0649a7; font-size: 1.18em; font-weight: 700; line-height: 1.35; }
.intro-copy p { margin: 0; }
.intro-copy .intro-lead { color: #0b4f9d; font-size: 1.04em; font-weight: 700; }
.intro-copy ul { margin: 0.75rem 0 0; padding: 0 1.25rem 0 0; }
.intro-copy li + li { margin-top: 0.72rem; }
.intro-copy a { color: #006fe5; font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
.intro-acknowledge { position: relative; isolation: isolate; min-height: clamp(2.85rem, 11.5vw, 3.55rem); flex: 0 0 auto; overflow: hidden; padding: 0.45rem 1.5rem; border: 2px solid transparent; border-radius: 999px; background: linear-gradient(135deg, rgba(218, 255, 255, 0.48), rgba(19, 150, 242, 0.12) 32%, rgba(4, 44, 159, 0.22)) padding-box, radial-gradient(ellipse at 28% 14%, #66dcff 0%, #159df3 27%, #0757ce 61%, #043892 100%) padding-box, linear-gradient(135deg, #efffff 0%, #4af4ff 10%, #0876ee 25%, #003897 48%, #0b5dd9 66%, #2be2f0 84%, #e0ffff 100%) border-box; box-shadow: 0 0 0 1px rgba(0, 66, 187, 0.72), 0 0.42rem 0.8rem rgba(0, 104, 235, 0.22), inset 0 1px 0 rgba(233, 255, 255, 0.94), inset 0 -0.45rem 0.75rem rgba(0, 24, 141, 0.22); color: #ffffff; font-family: Tahoma, Arial, sans-serif; font-size: clamp(0.94rem, 3.7vw, 1.18rem); font-weight: 700; text-shadow: 0 1px 2px rgba(0, 37, 126, 0.55); transition: transform 100ms ease-out, filter 100ms ease-out; }
.intro-acknowledge::before { position: absolute; inset: 0.2rem; border: 1px solid rgba(195, 255, 255, 0.74); border-radius: inherit; box-shadow: inset 0 1px 2px rgba(235, 255, 255, 0.65); content: ""; pointer-events: none; }
.intro-acknowledge:active { transform: scale(0.975); filter: brightness(0.96); }
.bottom-navigation[hidden] { display: none; }
.settings-option-app { grid-column: 2; }

.output-row {
  display: grid;
  min-width: 0;
  min-height: clamp(4.25rem, 19.5vw, 6.75rem);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.65rem, 2.6vw, 1.3rem);
  padding: clamp(0.35rem, 1.2vw, 0.65rem) clamp(0.75rem, 3vw, 1.5rem);
  border: 1px solid transparent;
  border-radius: clamp(1.45rem, 5.8vw, 3rem);
  background: linear-gradient(108deg, rgba(250, 254, 255, 0.99), rgba(223, 246, 255, 0.92) 53%, rgba(248, 254, 255, 0.98)) padding-box, linear-gradient(118deg, #e9ffff 0%, #5cf9ff 9%, #00bfff 20%, #0878f2 35%, #033baf 50%, #076de8 64%, #10dff5 82%, #dffeff 100%) border-box;
  box-shadow: 0 0.38rem 0.9rem rgba(19, 132, 193, 0.14), 0 0 0.42rem rgba(0, 188, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -0.4rem 0.9rem rgba(91, 193, 239, 0.08);
}

.output-title { min-width: 0; justify-self: start; margin: 0; color: #071a75; font-family: Tahoma, "Segoe UI", Arial, sans-serif; font-size: clamp(1.15rem, 5.15vw, 2.2rem); font-weight: 700; line-height: 1; text-align: left; white-space: nowrap; }
.output-actions { display: flex; align-items: center; gap: clamp(0.35rem, 1.8vw, 0.85rem); }
.output-action { position: relative; isolation: isolate; display: grid; width: clamp(3rem, 13.5vw, 5.4rem); aspect-ratio: 1; place-items: center; overflow: hidden; padding: 0; border: 2px solid var(--thin-border); border-radius: 50%; background: radial-gradient(circle at 30% 13%, #ffffff 0, #fbfeff 30%, #e5f4fd 83%, #d5eafa 100%); box-shadow: 0 1.15rem 2rem rgba(60, 111, 159, 0.2), inset 0 1px 0 #fff; color: #1c426e; --output-bulb-bolt: #eaf6fd; --output-bulb-cross: #eaf6fd; transition: transform 90ms ease-out; }
.output-action .icon { position: relative; z-index: 1; width: 62%; height: 62%; }
.output-row.is-enabled .output-turn-on, .output-row.is-disabled .output-turn-off { border: 3px solid transparent; background: linear-gradient(138deg, rgba(215, 255, 255, 0.46) 0%, rgba(67, 210, 255, 0.14) 19%, transparent 42%, rgba(3, 42, 157, 0.18) 100%) padding-box, radial-gradient(ellipse at 28% 14%, #61d5ff 0%, #1197f3 25%, #0757cf 59%, #033895 100%) padding-box, linear-gradient(135deg, #e6ffff 0%, #43f6ff 9%, #0979ef 24%, #003796 48%, #0757d8 65%, #24ddf1 84%, #d7ffff 100%) border-box; box-shadow: 0 0 0 1px rgba(0, 66, 187, 0.82), 0 0 0 2px rgba(29, 214, 255, 0.5), 0 0.22rem 0.48rem rgba(0, 104, 235, 0.28), inset 0 1px 0 rgba(233, 255, 255, 0.92), inset 0 -0.55rem 0.8rem rgba(0, 24, 141, 0.26); color: #fff; --output-bulb-bolt: #0b55ca; --output-bulb-cross: #0b55ca; }
.output-row.is-enabled .output-turn-on::before, .output-row.is-disabled .output-turn-off::before { position: absolute; z-index: 0; inset: 0.22rem; border: 1.4px solid rgba(181, 255, 255, 0.86); border-radius: 50%; background: linear-gradient(135deg, rgba(232, 255, 255, 0.36), transparent 17%, transparent 74%, rgba(16, 213, 255, 0.32)); box-shadow: inset 0 2px 2px rgba(236, 255, 255, 0.66), inset 2px 0 5px rgba(35, 224, 255, 0.33), inset -2px -3px 6px rgba(0, 31, 147, 0.46); content: ""; pointer-events: none; }
.output-action:active { transform: scale(0.94); }

.bottom-navigation {
  display: grid;
  height: clamp(4.5rem, 18.5vw, 6.55rem);
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: auto;
  isolation: isolate;
  overflow: hidden;
  padding: 0.35rem 0 0.38rem;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: clamp(1.75rem, 6.5vw, 3.4rem);
  background: linear-gradient(125deg, rgba(255,255,255,0.94), rgba(218,243,255,0.76));
  box-shadow: 0 0.9rem 1.6rem rgba(51, 103, 151, 0.15), inset 0 1px 0 rgba(255,255,255,0.98);
}

.app-shell > .bottom-navigation { width: min(100%, 34rem); grid-row: 2; align-self: end; margin: 0 auto clamp(0.25rem, 1vw, 0.5rem); }

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  padding: 0 0 1.12rem;
  background: transparent;
  color: #6e8bb5;
  font-size: clamp(0.74rem, 2.85vw, 1.2rem);
  font-weight: 700;
  line-height: 1;
}

.nav-icon { width: clamp(2.2rem, 7.8vw, 3.7rem); height: clamp(2.2rem, 7.8vw, 3.7rem); }
.nav-item.is-active { color: var(--blue); }
.nav-item.is-active::after { position: absolute; z-index: 1; bottom: 0.2rem; width: 2.35rem; height: 0.25rem; border-radius: 999px; background: var(--blue); box-shadow: 0 0 0.38rem rgba(0, 115, 247, 0.38); content: ""; }
.logout-item { color: var(--orange); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes spin-counterclockwise {
  from { transform: scaleX(-1) rotate(0deg); }
  to { transform: scaleX(-1) rotate(-360deg); }
}

@media (max-width: 380px) {
  .app-shell { padding-right: 0.8rem; padding-left: 0.8rem; }
  .brand-header { min-height: 9.5rem; }
  .location-selector { margin-right: auto; margin-left: auto; }
  .quick-actions { gap: 0.1rem; }
}

@media (min-width: 720px) {
  .app-shell { padding-top: 2.5rem; padding-bottom: 2rem; }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .brand-header { min-height: 19.25rem; }
}

@media (orientation: landscape) and (max-height: 640px) {
  .app-shell { min-height: 100svh; }
}

@media (max-width: 600px) and (orientation: portrait) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page-shell,
  .app-shell {
    height: 100svh;
    min-height: 0;
  }

  .app-shell {
    padding:
      max(0.35rem, env(safe-area-inset-top))
      0.75rem
      max(0.35rem, env(safe-area-inset-bottom));
  }

  .brand-header {
    min-height: clamp(7.15rem, 16svh, 8.6rem);
    padding-top: 0;
  }

  .brand-lockup { width: 88%; }

  .location-selector { margin-top: 0.3rem; }

  .security-controls {
    width: min(100%, 42svh);
    margin-top: clamp(0.7rem, 2svh, 1.4rem);
  }

  .security-grid { row-gap: clamp(5rem, 20vw, 7rem); }

  .security-controls::before,
  .security-controls::after,
  .sync-button { top: 53.8%; }

  .quick-actions {
    flex: 0 0 auto;
    gap: 0.18rem;
    margin-top: clamp(0.75rem, 2svh, 1.4rem);
    margin-bottom: clamp(0.3rem, 1svh, 0.65rem);
  }

  .quick-action { gap: 0.35rem; }

  .quick-disc {
    width: clamp(3.45rem, 15vw, 4.8rem);
    height: clamp(3.45rem, 15vw, 4.8rem);
  }

  .bottom-navigation {
    height: clamp(3.4rem, 14.5vw, 4.8rem);
    flex: 0 0 auto;
  }

  .nav-item { padding-bottom: 0.85rem; }
  .nav-item.is-active::after { bottom: 0.16rem; }
}

@media (max-width: 600px) and (max-height: 1000px) and (orientation: portrait) {
  .brand-header { min-height: clamp(6.75rem, 14.2svh, 7.7rem); }
  .security-controls {
    width: min(100%, 40svh);
    margin-top: clamp(0.55rem, 1.5svh, 1rem);
  }
  .quick-actions { margin-top: clamp(0.5rem, 1.2svh, 0.75rem); }
  .quick-disc { width: clamp(3.3rem, 14vw, 4.6rem); height: clamp(3.3rem, 14vw, 4.6rem); }
  .bottom-navigation { height: clamp(3.4rem, 14.5vw, 4.6rem); }
  .nav-icon { width: clamp(1.8rem, 6.4vw, 2.3rem); height: clamp(1.8rem, 6.4vw, 2.3rem); }
  .nav-item { gap: 0.14rem; padding-bottom: 0.68rem; font-size: clamp(0.67rem, 2.55vw, 0.9rem); }
}

@media (max-width: 380px) and (max-height: 600px) and (orientation: portrait) {
  .app-shell { padding: 0.25rem 0.65rem; }
  .brand-header { min-height: 6.75rem; }
  .security-controls { width: min(100%, 38svh); margin-top: 0.55rem; }
  .security-grid { row-gap: 5rem; }
  .quick-actions { margin-top: 0.4rem; margin-bottom: 0.25rem; }
  .quick-disc { width: 3.2rem; height: 3.2rem; }
  .quick-action { gap: 0.25rem; font-size: 0.84rem; }
  .bottom-navigation { height: 3.45rem; }
  .card-content { padding: 0.45rem; }
  .card-title { font-size: 1.12rem; letter-spacing: -0.065em; }
  .mode-icon { width: 3.1rem; height: 3.1rem; }
  .nav-item { gap: 0.08rem; padding-bottom: 0.45rem; font-size: 0.64rem; }
}

@media (max-width: 420px) and (max-height: 700px) and (orientation: portrait) {
  .card-content { padding: 0.45rem; }
  .card-title { font-size: clamp(1.1rem, 4.6vw, 1.2rem); letter-spacing: -0.065em; }
  .mode-icon { width: 3.1rem; height: 3.1rem; }
}

@media (orientation: portrait) and (min-aspect-ratio: 9/18) and (max-aspect-ratio: 9/14) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .page-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  .app-shell {
    height: 100%;
    min-height: 100%;
    padding: 6px 12px;
  }

  /* Android's standalone WebView can collapse the grid's trailing auto row
     when the active view is intrinsically taller than the viewport. Pin the
     navigation to the visual viewport in this short 16:9 portrait range. */
  .app-shell > .bottom-navigation {
    position: fixed;
    z-index: 4;
    right: auto;
    bottom: max(6px, env(safe-area-inset-bottom));
    left: 50%;
    width: calc(100% - 24px);
    margin: 0;
    transform: translateX(-50%);
  }

  .brand-header { min-height: clamp(108px, 14svh, 132px); }
  .intro-view { gap: 0.45rem; margin-top: 0.35rem; margin-bottom: 0.4rem; }
  .intro-copy { padding: 0.85rem 1rem; font-size: clamp(0.75rem, 3.05vw, 1rem); line-height: 1.7; }
  .intro-copy ul { margin-top: 0.55rem; }
  .intro-copy li + li { margin-top: 0.48rem; }
  .intro-acknowledge { min-height: 2.7rem; }
  .brand-promise { font-size: clamp(13px, 3vw, 18px); }
  .location-selector {
    min-height: clamp(34px, 8.6vw, 51px);
    font-size: clamp(15px, 3.55vw, 21px);
  }

  .security-controls {
    width: min(100%, 38svh);
    margin-top: clamp(9px, 1.5svh, 16px);
  }

  .security-grid { row-gap: clamp(80px, 20vw, 112px); }

  .security-controls::before,
  .security-controls::after {
    top: 53.8%;
    width: calc(50% - clamp(52px, 12.7vw, 80px));
  }

  .sync-button {
    top: 53.8%;
    width: clamp(52px, 12.7vw, 80px);
  }

  .card-content { padding: 10px; }
  .mode-icon { width: clamp(48px, 12vw, 76px); height: clamp(48px, 12vw, 76px); }
  .card-title { font-size: clamp(18px, 4.7vw, 30px); }
  .credit-icon { height: clamp(44px, 11.55vw, 64px); font-size: clamp(52px, 13.86vw, 80px); }

  .quick-actions {
    margin-top: clamp(8px, 1.2svh, 12px);
    margin-bottom: clamp(4px, 1svh, 8px);
  }
  .quick-action { gap: 6px; font-size: clamp(13px, 3.5vw, 19px); }
  .quick-disc { width: clamp(52px, 14vw, 74px); height: clamp(52px, 14vw, 74px); }

  .bottom-navigation { height: clamp(56px, 14.5vw, 74px); }
  .nav-icon { width: clamp(28px, 6.4vw, 37px); height: clamp(28px, 6.4vw, 37px); }
  .nav-item { gap: 2px; padding-bottom: 9px; font-size: clamp(11px, 2.55vw, 14px); }
  .nav-item.is-active::after { bottom: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
