/* Ember Terrarium — orders: center spine with blooming cards
   Cormorant Garamond + Be Vietnam Pro — distinct from cart/shop */

body.tl-bloom *,
body.tl-bloom *::before,
body.tl-bloom *::after { box-sizing: border-box; }

body.tl-bloom {
  --void: #1C110D;
  --soil: #2A1A14;
  --glass: rgba(48, 28, 20, 0.58);
  --mist: #F6EDE4;
  --mute: #C4A992;
  --clay: #E07A5F;
  --moss: #7BAF7B;
  --honey: #F0C27A;
  --line: rgba(255, 214, 170, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0;
  min-height: 100vh;
  color: var(--mist);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 34% 70% at 50% 35%, rgba(123, 175, 123, 0.12), transparent 55%),
    radial-gradient(ellipse 48% 38% at 0% 8%, rgba(224, 122, 95, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 28% at 100% 85%, rgba(240, 194, 122, 0.08), transparent 48%);
  -webkit-font-smoothing: antialiased;
}

.tl-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tl-root .page-main {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.tl-bloom [hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.tl-shell {
  flex: 1;
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
  padding: 1rem 0 2.4rem;
}

/* —— Crown mast —— */
.tl-crown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.tl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--mist);
  text-decoration: none;
  min-width: 0;
}

.tl-brand em {
  flex: 0 0 auto;
  font-style: normal;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 6px rgba(123, 175, 123, 0.18);
  font-size: 0;
}

.tl-brand span {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-crown-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.tl-crown-links a {
  color: #EADFD4;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.tl-crown-links a.is-on,
.tl-crown-links a:hover {
  color: var(--void);
  background: var(--moss);
}

.tl-bag {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
}

.tl-bag.has-items {
  background: rgba(123, 175, 123, 0.22);
}

.tl-bag em {
  font-style: normal;
  min-width: 1.15rem;
  text-align: center;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: var(--void);
  color: var(--honey);
  font-size: 0.7rem;
  font-weight: 800;
}

.tl-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 700;
}

.tl-intro {
  text-align: center;
  margin-bottom: 1.6rem;
  padding: 1.2rem 1.25rem;
  border-radius: 1.6rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.tl-intro h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.tl-intro h1 em {
  font-style: italic;
  color: var(--clay);
}

.tl-dek {
  margin: 0.65rem auto 0;
  max-width: 40ch;
  color: var(--mute);
  font-size: 1rem;
  line-height: 1.55;
}

/* Loading */
.tl-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 3rem 0;
  color: var(--mute);
}

.tl-loader {
  width: 48px;
  height: 48px;
  border-radius: 60% 40% 55% 45%;
  border: 2px solid rgba(123, 175, 123, 0.25);
  border-top-color: var(--moss);
  animation: tl-bloom-spin 1.1s linear infinite;
}

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

/* Gate */
.tl-gate {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 2rem;
}

.tl-gate-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 1.7rem 1.4rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  border-radius: 1.75rem;
}

.tl-gate-card h2 {
  margin: 0.2rem 0 0.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 500;
}

.tl-gate-card > p { color: var(--mute); margin: 0; line-height: 1.5; }

.tl-gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

/* Stats */
.tl-board,
.fx-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.tl-stat,
.fx-board .fx-stat {
  padding: 0.8rem 0.9rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 1.25rem 1rem 1.4rem 1.1rem;
  animation: tl-rise 0.45s var(--ease) both;
  animation-delay: calc(var(--si, 0) * 0.05s);
}

.tl-stat span,
.fx-stat span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

.tl-stat strong,
.fx-stat strong {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--honey);
}

@keyframes tl-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Filters */
.tl-filters,
.fx-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(28, 17, 13, 0.35);
  border: 1px solid rgba(255, 214, 170, 0.1);
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.tl-filters button,
.fx-filters button {
  border: 0;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tl-filters button:hover,
.fx-filters button:hover {
  color: var(--mist);
}

.tl-filters button.is-active,
.fx-filters button.is-active {
  background: var(--moss);
  color: var(--void);
}

/* Spine timeline */
.tl-spine,
.tl-bloom .fx-matrix {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 0.35rem 0 1rem;
}

.tl-spine::before,
.tl-bloom .fx-matrix::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(var(--moss), var(--honey) 50%, var(--clay));
  border-radius: 99px;
  opacity: 0.65;
}

.tl-bloom .fx-plate,
.tl-bloom .fx-plate--wide,
.tl-bloom .fx-plate--tall,
.tl-bloom .fx-plate--cell {
  position: relative;
  width: min(46%, 420px);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.6rem;
  padding: 1rem 1.05rem 1.05rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  border-radius: 1.5rem 1.15rem 1.65rem 1.25rem;
  box-shadow: 0 14px 32px rgba(10, 5, 3, 0.26);
  animation: tl-rise 0.5s var(--ease) both;
  animation-delay: calc(var(--pi, 0) * 0.04s);
  transition: border-color 0.2s, transform 0.2s;
}

.tl-bloom .fx-plate:hover {
  border-color: rgba(123, 175, 123, 0.4);
  transform: translateY(-2px);
}

.tl-bloom .fx-plate:nth-child(odd) {
  align-self: flex-start;
  margin-right: auto;
  border-radius: 1.15rem 1.5rem 1.25rem 1.65rem;
}

.tl-bloom .fx-plate:nth-child(even) {
  align-self: flex-end;
  margin-left: auto;
}

.tl-bloom .fx-plate::after {
  content: "";
  position: absolute;
  top: 1.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 5px rgba(123, 175, 123, 0.18);
  z-index: 2;
}

.tl-bloom .fx-plate:nth-child(odd)::after { right: -8%; }
.tl-bloom .fx-plate:nth-child(even)::after { left: -8%; }

.tl-bloom .fx-plate.tone-delivered { border-color: rgba(123, 175, 123, 0.4); }
.tl-bloom .fx-plate.tone-shipped { border-color: rgba(240, 194, 122, 0.4); }
.tl-bloom .fx-plate.tone-cancelled { border-color: rgba(224, 122, 95, 0.45); }

.tl-bloom .fx-plate-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem 0.2rem;
  background: rgba(28, 17, 13, 0.42);
  border-radius: 50%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 214, 170, 0.1);
}

.tl-bloom .fx-day {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
}

.tl-bloom .fx-mon,
.tl-bloom .fx-yr {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

.tl-bloom .fx-plate-head {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
}

.tl-bloom .fx-beacon {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--honey);
  font-weight: 700;
}

.tl-bloom .fx-plate.tone-delivered .fx-beacon { color: var(--moss); }
.tl-bloom .fx-plate.tone-cancelled .fx-beacon { color: var(--clay); }

.tl-bloom .fx-seq {
  font-size: 0.68rem;
  color: var(--mute);
  font-weight: 600;
}

.tl-bloom .fx-id {
  margin: 0.3rem 0 0.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
  word-break: break-word;
}

.tl-bloom .fx-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.tl-bloom .fx-meta span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

.tl-bloom .fx-meta strong {
  font-size: 0.88rem;
  font-weight: 700;
}

.tl-bloom .fx-items {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--mute);
  line-height: 1.4;
}

.tl-bloom .fx-plate-foot { margin-top: 0.25rem; }

.tl-empty {
  text-align: center;
  padding: 2rem 1.2rem;
  border-radius: 1.6rem;
  background: var(--glass);
  border: 1px solid var(--line);
}

.tl-empty h2 {
  margin: 0.2rem 0 0.45rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 500;
}

.tl-empty p { color: var(--mute); margin: 0; }

.tl-empty .tl-btn { margin-top: 1.1rem; }

.tl-filter-empty,
.fx-filter-empty {
  text-align: center;
  color: var(--mute);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}

.tl-btn-fill {
  background: linear-gradient(135deg, var(--clay), #c46248);
  color: var(--void);
}
.tl-btn-fill:hover {
  filter: brightness(1.06);
  color: var(--void);
}

.tl-btn-line {
  background: transparent;
  color: var(--mist);
  border-color: rgba(255, 214, 170, 0.28);
}
.tl-btn-line:hover {
  border-color: var(--honey);
  color: var(--honey);
}

.tl-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  width: min(100% - 2rem, 980px);
  margin: 0 auto 1.3rem;
  padding: 0.95rem 1.15rem;
  color: var(--mute);
  font-size: 0.86rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
}

.tl-foot a {
  color: var(--honey);
  text-decoration: none;
  font-weight: 700;
}
.tl-foot a:hover { color: var(--clay); }

@media (max-width: 860px) {
  .tl-board,
  .fx-board { grid-template-columns: 1fr 1fr; }

  .tl-spine::before,
  .tl-bloom .fx-matrix::before { left: 14px; }

  .tl-bloom .fx-plate,
  .tl-bloom .fx-plate--wide,
  .tl-bloom .fx-plate--tall,
  .tl-bloom .fx-plate--cell {
    width: calc(100% - 36px);
    align-self: flex-end !important;
    margin-left: 36px !important;
    margin-right: 0 !important;
  }

  .tl-bloom .fx-plate::after,
  .tl-bloom .fx-plate:nth-child(odd)::after,
  .tl-bloom .fx-plate:nth-child(even)::after {
    left: -28px;
    right: auto;
  }
}

@media (max-width: 640px) {
  .tl-shell { width: min(100% - 1.4rem, 980px); padding-top: 0.75rem; }

  .tl-crown {
    flex-direction: column;
    align-items: stretch;
  }

  .tl-crown-links {
    border-radius: 1.15rem;
    justify-content: flex-start;
  }

  .tl-intro { padding: 1.05rem 1.1rem; border-radius: 1.35rem; }

  .tl-filters,
  .fx-filters {
    border-radius: 1.15rem;
    justify-content: flex-start;
  }

  .tl-bloom .fx-plate {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-loader,
  .tl-stat,
  .fx-stat,
  .tl-bloom .fx-plate {
    animation: none !important;
  }
  .tl-bloom .fx-plate,
  .tl-btn {
    transition: none !important;
  }
}
