:root {
  --bg-primary: #0b1020;
  --bg-secondary: #121b2d;
  --bg-panel: rgba(17, 24, 39, 0.78);
  --bg-card: rgba(28, 39, 57, 0.82);
  --border-soft: rgba(148, 163, 184, 0.2);
  --text-primary: #edf3ff;
  --text-muted: #a5b3c9;
  --brand: #6ee7d2;
  --brand-strong: #55d4ff;
  --success: #7ae4b7;
  --warning: #ffce6d;
  --danger: #ff7a7a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: radial-gradient(circle at top, #101d35 0%, var(--bg-primary) 28%, #070b13 100%);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.text-muted {
  color: var(--text-muted) !important;
}

button, input {
  font: inherit;
}

.navbar-brand.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-decoration: none;
}

.site-header {
  position: relative;
  z-index: 10;
}

.site-header-nav .header-nav-link,
.site-header-nav .header-login-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header-nav .header-nav-link:hover,
.site-header-nav .header-nav-link:focus,
.site-header-nav .header-login-link:hover,
.site-header-nav .header-login-link:focus {
  color: var(--text-primary);
}

.header-login-link {
  padding: 0.375rem 0.75rem;
  text-decoration: none;
}

.header-start-btn {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}

.auth-page {
  background: radial-gradient(circle at top, #101d35 0%, var(--bg-primary) 32%, #070b13 100%);
}

.auth-main {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 90px);
}

.auth-card {
  width: 100%;
}

.contact-card {
  width: 100%;
}

.contact-lead {
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-action {
  display: flex;
  justify-content: flex-start;
}

.contact-note {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  background: rgba(18, 27, 45, 0.72);
}

.contact-note-list {
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-note-list a {
  color: var(--brand);
  text-decoration: none;
}

.contact-note-list a:hover,
.contact-note-list a:focus {
  text-decoration: underline;
}

.auth-form .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding-right: 1rem;
  padding-left: 1rem;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .auth-form .btn,
  .auth-switch {
    white-space: nowrap;
  }
}

.auth-switch a {
  color: var(--brand);
  text-decoration: none;
}

.auth-switch a:hover,
.auth-switch a:focus {
  text-decoration: underline;
}

.plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(110, 231, 210, 0.24);
  border-radius: 1rem;
  background: rgba(110, 231, 210, 0.08);
}

.plan-price {
  color: var(--brand);
  font-size: 1.25rem;
  white-space: nowrap;
}

.plan-price .small {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.pricing-section {
  scroll-margin-top: 1rem;
}

.pricing-card {
  background: linear-gradient(145deg, rgba(28, 39, 57, 0.92), rgba(17, 24, 39, 0.82));
}

.pricing-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(110, 231, 210, 0.28);
  border-radius: 1rem;
  background: rgba(110, 231, 210, 0.08);
}

.pricing-plan-name {
  font-size: 1.2rem;
}

.pricing-amount {
  color: var(--brand);
  font-size: 1.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.pricing-amount span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.pricing-feature {
  height: 100%;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.72);
}

.feature-number {
  margin-bottom: 1.25rem;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.feature-card h3 {
  color: var(--text-primary);
}

.feature-card p {
  line-height: 1.75;
}

.site-footer {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner {
  border-top: 1px solid var(--border-soft);
  padding-top: 1.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-nav {
    margin-right: 3.75rem;
  }
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--text-primary);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(110, 231, 210, 0.45);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(35, 58, 79, 0.94), rgba(11, 16, 32, 0.94));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: var(--brand);
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top span {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  font-size: 0;
  transform: translateY(0.12rem) rotate(45deg);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(145deg, rgba(57, 91, 112, 0.98), rgba(17, 28, 45, 0.98));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  transform: translateY(-0.2rem);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.faq-main {
  flex: 1 0 auto;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.faq-control-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.faq-control-btn:hover {
  border-color: rgba(110, 231, 210, 0.45);
  color: var(--text-primary);
}

.faq-control-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.72);
}

.faq-item summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 3rem 1.15rem 1.25rem;
  color: var(--text-primary);
  font-weight: 600;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  color: var(--brand);
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.faq-answer {
  border-top: 1px solid var(--border-soft);
  padding: 1rem 1.25rem 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.faq-answer a {
  color: var(--brand);
  text-decoration: none;
}

.faq-answer a:hover,
.faq-answer a:focus {
  text-decoration: underline;
}

.privacy-main {
  flex: 1 0 auto;
}

.privacy-content-header {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1.25rem;
}

.privacy-content-lead,
.privacy-section p,
.privacy-section li {
  color: var(--text-muted);
  line-height: 1.85;
}

.privacy-section + .privacy-section {
  margin-top: 2rem;
}

.privacy-section-title {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.privacy-section ol {
  padding-left: 1.5rem;
}

.privacy-section a {
  color: var(--brand);
  text-decoration: none;
}

.privacy-section a:hover,
.privacy-section a:focus {
  text-decoration: underline;
}

.commercial-main {
  flex: 1 0 auto;
}

.commercial-notice,
.commercial-footnote {
  color: var(--warning);
  line-height: 1.8;
}

.commercial-list {
  margin: 0;
}

.commercial-item {
  display: grid;
  grid-template-columns: minmax(10rem, 30%) 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.commercial-item:first-child {
  border-top: 1px solid var(--border-soft);
}

.commercial-item dt {
  color: var(--text-primary);
  font-weight: 700;
}

.commercial-item dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.commercial-item a {
  color: var(--brand);
  text-decoration: none;
}

.commercial-item a:hover,
.commercial-item a:focus {
  text-decoration: underline;
}

.company-main {
  flex: 1 0 auto;
}

.company-content-lead {
  color: var(--text-muted);
  line-height: 1.8;
}

.company-list {
  margin: 0;
}

.company-item {
  display: grid;
  grid-template-columns: minmax(10rem, 30%) 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.company-item:first-child {
  border-top: 1px solid var(--border-soft);
}

.company-item dt {
  color: var(--text-primary);
  font-weight: 700;
}

.company-item dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.company-service-list {
  padding-left: 1.25rem;
}

.company-contact-note {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-soft);
  border-radius: 0.85rem;
  background: rgba(18, 27, 45, 0.72);
}

.company-contact-note a {
  color: var(--brand);
  text-decoration: none;
}

.company-contact-note a:hover,
.company-contact-note a:focus {
  text-decoration: underline;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: inline-block;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(122, 228, 183, 0.25);
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.text-gradient {
  background: linear-gradient(135deg, #7ef0d4 0%, #4ec6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge {
  display: inline-block;
  letter-spacing: 0.12em;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(110, 231, 210, 0.12);
  color: var(--brand);
}

.glass-card,
.card.glass-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.hero-section {
  padding-top: 2rem;
}

.min-vh-75 {
  min-height: 75vh;
}

.mini-stat {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.device-mockup {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(8, 14, 25, 0.9), rgba(20, 28, 41, 0.95));
  border: 1px solid rgba(146, 163, 184, 0.26);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.mock-screen {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 440px;
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(11, 16, 32, 0.7);
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5e57; }
.dot-yellow { background: #ffbd2f; }
.dot-green { background: #28c840; }

.mock-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem;
}

.message {
  max-width: 80%;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.bubble-you {
  align-self: flex-end;
  background: rgba(94, 234, 212, 0.2);
  border: 1px solid rgba(94, 234, 212, 0.3);
}

.bubble-them {
  align-self: flex-start;
  background: rgba(80, 132, 255, 0.1);
  border: 1px solid rgba(80, 132, 255, 0.2);
}

.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--brand);
}

.form-control,
.form-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-primary);
  border-radius: 0.9rem;
}

.form-control::placeholder {
  color: rgba(165, 179, 201, 0.72);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(110, 231, 210, 0.8);
  box-shadow: 0 0 0 0.2rem rgba(110, 231, 210, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
}

.tracking-lg {
  letter-spacing: 0.35rem;
}

.recovery-key {
  font-size: 1.2rem;
  letter-spacing: 0.16rem;
  color: var(--brand);
  word-break: break-all;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  border: none;
  color: #06121f;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-hero {
  min-height: 170px;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, rgba(62, 96, 219, 0.94), rgba(85, 212, 255, 0.7));
  border: none;
  box-shadow: 0 20px 35px rgba(31, 65, 182, 0.35);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(122, 228, 183, 0.1);
  border: 1px solid rgba(122, 228, 183, 0.3);
  color: var(--success);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
}

.pwa-guide-box {
  background: rgba(13, 19, 31, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.guide-list {
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.device-share-guide {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(110, 231, 210, 0.14);
  color: var(--brand);
  font-weight: 700;
}

.share-arrow {
  color: var(--brand);
  font-size: 1.2rem;
}

.notification-panel {
  background: rgba(18, 27, 45, 0.86);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
}

.qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.qr-code {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand);
  background: rgba(110, 231, 210, 0.1);
  border: 1px solid rgba(110, 231, 210, 0.3);
  border-radius: 1.3rem;
}

.toast {
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(6, 14, 26, 0.9);
  color: var(--text-primary);
}

@media (max-width: 767.98px) {
  .container {
    --bs-gutter-x: 1.25rem;
  }

  .navbar-brand.brand-mark {
    gap: 0.5rem;
    letter-spacing: 0.04em;
  }

  .navbar-collapse {
    padding-top: 0.75rem;
  }

  .site-header-nav {
    align-items: stretch !important;
    gap: 0.25rem !important;
  }

  .site-header-nav .nav-link,
  .site-header-nav .header-login-link,
  .site-header-nav .header-start-btn {
    width: 100%;
    text-align: left;
  }

  .site-header-nav .header-login-link,
  .site-header-nav .header-start-btn {
    margin-top: 0.25rem;
  }

  .auth-main {
    min-height: calc(100vh - 76px);
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .plan-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-price {
    font-size: 1.1rem;
  }

  .contact-action .btn {
    width: 100%;
  }

  .pricing-highlight {
    align-items: flex-start;
    flex-direction: column;
  }

  .pricing-amount {
    font-size: 1.55rem;
  }

  .footer-nav {
    gap: 0.65rem 1rem;
  }

  .faq-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }

  .display-4 {
    font-size: 2.5rem;
  }

  .hero-section {
    padding-top: 1rem;
  }

  .hero-section .btn {
    width: 100%;
  }

  .glass-card {
    border-radius: 1.15rem;
  }

  .device-mockup {
    max-width: 100%;
    padding: 0.75rem;
  }

  .mock-screen {
    min-height: 360px;
  }

  .message {
    max-width: 88%;
    font-size: 0.88rem;
  }

  .notification-panel > .d-flex {
    align-items: stretch !important;
    flex-direction: column;
  }

  .notification-panel .btn {
    width: 100%;
  }

  .btn-hero {
    min-height: 120px;
  }

  .btn-hero .fs-4 {
    font-size: 1.25rem !important;
  }

  .modal-dialog {
    margin: 0.75rem;
  }

  .modal-content {
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
  }

  .tracking-lg {
    letter-spacing: 0.2rem;
  }

  .device-mockup {
    margin-top: 1rem;
  }
}
