:root {
  --sg-primary: #ff5b47;
  --sg-primary-dark: #ef4634;
  --sg-primary-soft: #fff1ed;
  --sg-primary-border: #ffd8cf;
  --sg-ink: #231f20;
  --sg-muted: #6f6a6b;
  --sg-surface: #ffffff;
  --sg-surface-alt: #fffaf8;
  --sg-line: #f1d6cf;
  --sg-shadow: 0 16px 40px rgba(255, 91, 71, 0.10);
  --sg-radius-lg: 28px;
  --sg-radius-md: 20px;
  --sg-radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--sg-ink);
  background: linear-gradient(180deg, #fffefe 0%, #fff7f4 100%);
  max-width: 100%;
  overflow-x: clip;
}

*, *::before, *::after {
  min-width: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

table {
  max-width: 100%;
}

.container,
.container-fluid,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  min-width: 0;
}

.modal-dialog {
  max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1.5rem));
}

.modal-content {
  max-height: calc(100dvh - 1.5rem);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.14rem rgba(255, 255, 255, 0.95), 0 0 0 0.32rem rgba(255, 91, 71, 0.28);
}

.pwa-install-prompt {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1200;
  display: grid;
  gap: 0.8rem;
  width: min(23rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid rgba(255, 91, 71, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--sg-ink);
  box-shadow: 0 18px 40px rgba(35, 31, 32, 0.14);
}

.pwa-install-prompt p {
  margin: 0;
  color: var(--sg-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.pwa-install-button,
.pwa-install-dismiss {
  min-height: 2.35rem;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

.pwa-install-button {
  padding: 0.55rem 0.95rem;
  background: var(--sg-primary);
  color: #fff;
}

.pwa-install-dismiss {
  width: 2.35rem;
  padding: 0;
  background: #fff1ed;
  color: var(--sg-primary-dark);
}

@media (max-width: 575.98px) {
  .pwa-install-prompt {
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: calc(100vw - 1.5rem);
  }
}
