:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f2f0ec;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f2f0ec;
}

body {
  min-height: 100dvh;
}

.composer-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f2f0ec;
}

.composer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.shell-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #f2f0ec;
}

.shell-status[hidden] {
  display: none;
}

.shell-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 70px rgba(20, 20, 20, 0.12);
  color: #222222;
  text-align: center;
}

.shell-eyebrow {
  margin: 0 0 8px;
  color: #755b3d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.shell-card h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  line-height: 1.15;
}

.shell-card p:not(.shell-eyebrow) {
  margin: 14px 0 0;
  color: #5b5b5b;
  line-height: 1.55;
}

.shell-spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  border: 3px solid rgba(117, 91, 61, 0.18);
  border-top-color: #755b3d;
  border-radius: 50%;
  animation: shell-spin 0.85s linear infinite;
}

#shell-retry {
  margin-top: 20px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: #755b3d;
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#shell-retry:hover,
#shell-retry:focus-visible {
  filter: brightness(1.08);
}

@keyframes shell-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .shell-spinner { animation-duration: 1.8s; }
}

@media (prefers-color-scheme: dark) {
  :root,
  html,
  body,
  .composer-shell,
  .shell-status {
    background: #171717;
  }

  .shell-card {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(34, 34, 34, 0.97);
    color: #f4f1ec;
  }

  .shell-card p:not(.shell-eyebrow) {
    color: #c9c5bf;
  }
}
