/* RuiTalk Visual Color Packet — shared public tokens */
:root {
  color-scheme: dark;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-outer: #030712;
  --bg-deep: #0f172a;
  --bg-main: #101a30;
  --bg-panel: rgba(12, 20, 36, 0.62);
  --bg-panel-strong: rgba(14, 24, 40, 0.78);
  --bg-input: rgba(15, 23, 42, 0.78);
  --bg-input-solid: #0e1728;
  --brand: #4f83bd;
  --brand-soft: #5a8bc3;
  --brand-strong: #4478b8;
  --glow: #1e3a8a;
  --text: #f8fafc;
  --text-muted: #8fa6c6;
  --text-tertiary: #667a98;
  --line: rgba(120, 145, 185, 0.22);
  --line-strong: #314766;
  --focus: #5a8bc3;
  --focus-glow: rgba(90, 139, 195, 0.22);
  --link: #8db0d9;
  --link-hover: #a4c0e3;
  --status-error: #d98b96;
  --status-error-line: #b86573;
  --status-error-surface: rgba(184, 101, 115, 0.1);
  --status-success: #7fb39a;
  --status-success-surface: rgba(127, 179, 154, 0.1);
  --status-warning: #c9a86a;
  --status-warning-surface: rgba(201, 168, 106, 0.1);
  --loading-text: #7ea3d1;
  --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.26);
  --shadow-tight: 0 10px 24px rgba(0, 0, 0, 0.22);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.preview-shell.is-product {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-deep) 58%, var(--bg-outer) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
textarea,
select {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px var(--focus-glow);
}

::selection {
  background: rgba(90, 139, 195, 0.32);
  color: var(--text);
}

.app-frame {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.app-root,
.preview-shell {
  height: 100%;
  min-height: 0;
}

.app-root {
  overflow: hidden;
  isolation: isolate;
}

.is-hidden {
  display: none !important;
}

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