/* =========================================================================
   SYNCRA — Dusk
   A modern social hub for groups: planning, scrapbook, mini-apps.
   Design system v2 (warm paper / ink, serif display, soft shapes).
   ========================================================================= */

:root {
  color-scheme: light;

  /* Palette */
  --bg: #f6f2e8;
  --bg-deep: #ede6d4;
  --bg-grain: rgba(28, 26, 24, 0.04);
  --surface: #ffffff;
  --surface-2: #fbf8f1;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-glass: rgba(255, 252, 245, 0.72);

  --ink: #14130f;
  --ink-soft: rgba(20, 19, 15, 0.62);
  --ink-mute: rgba(20, 19, 15, 0.42);
  --ink-faint: rgba(20, 19, 15, 0.22);
  --on-accent: #ffffff;

  --line: rgba(20, 19, 15, 0.09);
  --line-strong: rgba(20, 19, 15, 0.18);

  --accent: #ec5a3a;
  --accent-deep: #c8401f;
  --accent-soft: rgba(236, 90, 58, 0.10);
  --accent-haze: rgba(236, 90, 58, 0.18);

  --free: #2f8a5b;
  --free-soft: rgba(47, 138, 91, 0.13);
  --maybe: #b87800;
  --maybe-soft: rgba(184, 120, 0, 0.13);
  --busy: #c43054;
  --busy-soft: rgba(196, 48, 84, 0.12);
  --unknown-soft: rgba(20, 19, 15, 0.06);

  --love: #ec5a3a;
  --yes: #2f8a5b;
  --pass: rgba(20, 19, 15, 0.4);

  /* Aliases for legacy class hooks */
  --card: var(--surface);
  --card-soft: var(--surface-2);
  --card-sunken: rgba(20, 19, 15, 0.04);
  --input: var(--surface);
  --text: var(--ink);
  --text-soft: var(--ink-soft);

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;
  --radius-sm: var(--r-sm);
  --radius-md: var(--r-md);
  --radius-lg: var(--r-lg);
  --radius-xl: var(--r-xl);

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 15, 15, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 15, 15, 0.05), 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow-md: 0 6px 18px rgba(20, 19, 15, 0.07), 0 1px 3px rgba(20, 19, 15, 0.05);
  --shadow-lg: 0 24px 56px rgba(20, 19, 15, 0.13), 0 6px 18px rgba(20, 19, 15, 0.07);
  --shadow-pop: 0 30px 80px rgba(196, 64, 31, 0.18), 0 6px 18px rgba(196, 64, 31, 0.10);
  --shadow: var(--shadow-md);

  /* Type */
  --font-display: "Fraunces", "Source Serif Pro", "Iowan Old Style",
    "Hoefler Text", "Cambria", Georgia, serif;
  --font-body: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Menlo", monospace;

  /* Layout */
  --shell-max: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  --dock-height: 76px;
}

/* =========================================================================
   Reset + base
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%),
    radial-gradient(circle at 110% 0%, color-mix(in srgb, var(--free) 6%, transparent), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

.afterours-boot-shell {
  min-height: 100dvh;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 20px calc(104px + env(safe-area-inset-bottom));
  color: #171813;
  background: #fbfaf6;
}

.afterours-boot-shell header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
}

.afterours-boot-shell header strong {
  font-size: 25px;
  font-weight: 820;
  letter-spacing: -0.055em;
}

.afterours-boot-shell header span,
.afterours-boot-feed b {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e9ebe5;
}

.afterours-boot-copy {
  display: grid;
  gap: 9px;
  padding: 42px 0 24px;
}

.afterours-boot-copy i,
.afterours-boot-feed i {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #ecece7;
}

.afterours-boot-copy i:first-child {
  width: 54%;
  height: 24px;
}

.afterours-boot-copy i:last-child {
  width: 78%;
}

.afterours-boot-feed {
  display: grid;
}

.afterours-boot-feed article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid #e5e5df;
}

.afterours-boot-feed article > span {
  display: grid;
  gap: 9px;
  padding-top: 3px;
}

.afterours-boot-feed article i:first-child {
  width: min(62%, 240px);
}

.afterours-boot-feed article i:last-child {
  width: min(88%, 360px);
  height: 10px;
}

.afterours-boot-shell nav {
  position: fixed;
  right: 14px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 14px;
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-around;
  border: 1px solid #e4e4de;
  border-radius: 24px;
  background: rgb(255 255 253 / 94%);
  box-shadow: 0 12px 34px rgb(27 29 22 / 9%);
}

.afterours-boot-shell nav i {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #e7e8e2;
}

@media (prefers-reduced-motion: no-preference) {
  .afterours-boot-shell i,
  .afterours-boot-shell b,
  .afterours-boot-shell header span {
    animation: afterours-boot-pulse 1.45s ease-in-out infinite alternate;
  }
}

@keyframes afterours-boot-pulse {
  to { opacity: 0.48; }
}

img[data-syncra-defer-src],
img.syncra-deferred-media.is-loading {
  background: #ebece6;
}

img.syncra-deferred-media {
  transition: opacity 160ms ease;
}

img.syncra-deferred-media.is-loaded {
  opacity: 1;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/*
 * iOS Safari magnifies the page when a focused editable control computes below
 * 16px. Keep compact visual chrome around fields, but never make the editable
 * text itself small enough to trigger that viewport jump.
 */
@media (max-width: 719px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

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

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

::selection {
  background: var(--accent-haze);
  color: var(--ink);
}

/* =========================================================================
   App shell
   ========================================================================= */

#app {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) var(--gutter)
    calc(var(--dock-height) + var(--safe-bottom) + 24px);
}

@media (min-width: 900px) {
  #app {
    padding-bottom: clamp(40px, 6vw, 72px);
  }
}

.single-column {
  display: grid;
  gap: 16px;
}

/* =========================================================================
   Typography
   ========================================================================= */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.005em;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

strong {
  font-weight: 600;
  color: var(--ink);
}

small {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.subtle-copy,
.section-intro {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.mono-tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
