/* ==========================================================================
   HMIF Photobooth - Main Theme & Tokens
   Editorial, human-designed, kiosk-optimized, ultra-lightweight.
   ========================================================================== */

:root {
  /* Core Neutral Palette */
  --bg-color: #FFFFFF;
  --surface-color: #F8F8F8;
  --surface-card: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted: #9E9E9E;
  --border-light: #EAEAEA;
  --border-subtle: #E0E0E0;
  --border-dark: #222222;

  /* Accent & Interactive */
  --accent-color: #111111;
  --primary-color: #111111;
  --accent-contrast: #FFFFFF;
  --accent-hover: #2A2A2A;
  --focus-ring: rgba(17, 17, 17, 0.2);

  /* Status */
  --danger-color: #DC2626;
  --danger-bg: #FEF2F2;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;

  /* Physical Print Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
  --shadow-print: 0 20px 40px -15px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 260ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Border Radii (Restrained & Architectural) */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Safe Area Insets for iOS Safari Notch & Home Indicator */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden; /* Strict Kiosk Mode */
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none; /* Prevent accidental text highlighting during touch */
  touch-action: manipulation;
}

/* Kiosk App Container */
#app {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Screen Switcher Container */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: none;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  background-color: var(--bg-color);
  z-index: 1;
}

.screen.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Typography Presets */
h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Universal Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--accent-contrast);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background-color: #EFEFEF;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Utility Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--surface-color);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* Header bar for internal screens */
.top-nav {
  height: 72px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.top-nav .nav-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
