:root {
  color-scheme: light;
  font-family: "Noto Sans Thai", "Tahoma", system-ui, -apple-system, sans-serif;
  background: #eef7f7;
  color: #173f45;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #eef7f7;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.loading-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(155deg, #effafa 0%, #dceff0 100%);
  text-align: center;
}

.loading-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 6px;
  border-radius: 22%;
  box-shadow: 0 14px 34px rgba(15, 83, 92, 0.2);
}

.loading-panel strong {
  font-size: 19px;
}

.loading-panel span {
  color: #607a7e;
  font-size: 14px;
}

.booting .direct-link,
.booting .install-hint {
  display: none;
}

.direct-link {
  margin-top: 8px;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  background: #0f6f80;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.install-hint {
  max-width: 290px;
  margin-top: 8px;
  color: #607a7e;
  font-size: 12px;
  line-height: 1.6;
}

.install-hint a,
.secondary-link {
  color: #0f6f80;
  font-weight: 700;
}

.install-page {
  min-height: 100%;
  overflow: auto;
}

.install-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(155deg, #effafa 0%, #dceff0 100%);
}

.install-card {
  width: min(100%, 520px);
  padding: 30px 24px;
  border: 1px solid rgba(15, 111, 128, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(15, 83, 92, 0.14);
  text-align: center;
}

.install-eyebrow {
  margin: 8px 0 4px;
  color: #0f6f80;
  font-size: 13px;
  font-weight: 700;
}

.install-card h1 {
  margin: 0;
  font-size: clamp(23px, 7vw, 30px);
}

.install-intro {
  margin: 10px auto 22px;
  color: #607a7e;
  font-size: 14px;
  line-height: 1.7;
}

.install-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
  text-align: left;
}

.install-steps li {
  position: relative;
  min-height: 46px;
  padding-left: 52px;
  counter-increment: install-step;
}

.install-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6f3f3;
  color: #0f6f80;
  content: counter(install-step);
  font-weight: 700;
  place-items: center;
}

.install-steps strong,
.install-steps span,
.security-note strong,
.security-note span {
  display: block;
}

.install-steps strong {
  font-size: 14px;
}

.install-steps span {
  margin-top: 2px;
  color: #607a7e;
  font-size: 12px;
  line-height: 1.55;
}

.install-button {
  display: block;
  width: 100%;
}

.security-note {
  display: grid;
  gap: 7px;
  margin-top: 20px;
  padding: 15px;
  border-radius: 14px;
  background: #f4f8f7;
  color: #607a7e;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.security-note strong {
  color: #173f45;
  font-size: 13px;
}

.secondary-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 24px;
  background: #fff;
  text-align: center;
}
