/* Homepage-only layout. Keep shared about/device grids independent. */
.c-home-hero {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  height: calc(100svh - 124px);
  min-height: 0;
  max-height: none;
}

.c-home-heading {
  width: min(1400px, 100%);
  padding: 32px 40px 16px;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr) auto;
  gap: 32px;
  pointer-events: auto;
}

.c-home-heading > * { min-width: 0; }
.c-home-heading h1 { font-size: 44px; line-height: 1.3; }
.c-home-intro { max-width: none; padding-left: 28px; }
.c-home-intro strong { font-size: 22px; margin-bottom: 8px; line-height: 1.5; }
.c-home-intro p { font-size: 14px; line-height: 1.8; }
.c-home-heading > .button { justify-self: end; white-space: nowrap; }

/* The canvas never shares a row with copy, even while the camera rotates. */
.c-home-scene {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.c-scene-fallback {
  inset: auto;
  left: 50%;
  top: 53%;
  width: min(560px, 54vw);
  height: auto;
  padding: 0;
  aspect-ratio: 1.28;
  transform: translate(-50%, -50%) rotateX(58deg) rotateZ(-9deg);
}

.c-home-stage-footer {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 8px 40px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.c-home-stage-footer .c-scene-caption,
.c-home-stage-footer .c-scene-toolbar { position: static; margin: 0; }
.c-home-stage-footer .c-scene-caption { min-width: 0; }
.c-home-stage-footer .c-scene-toolbar { flex: none; }
.c-home-stage-footer .c-scene-toolbar button { width: 44px; height: 44px; }
.c-home-hero + .c-entry-strip .c-entry { padding-block: 24px; }

.c-daily-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: end;
  gap: 40px;
  margin-bottom: 36px;
}

.c-daily-heading .eyebrow { margin: 0 0 10px; }
.c-daily-heading h2 { margin: 0; font: 400 34px/1.4 var(--serif); }
.c-daily-heading > p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--ink-soft); }

.c-daily-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.c-daily-item {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  padding: 28px 32px 32px;
  border-left: 1px solid var(--line);
}

.c-daily-item:first-child { border-left: 0; }
.c-daily-index { font: 12px/1.5 var(--sans); color: var(--jade); }
.c-daily-item h3 { margin: 22px 0 12px; font: 400 24px/1.5 var(--serif); }
.c-daily-item p { margin: 0 0 26px; font-size: 14px; line-height: 1.9; max-width: 30em; color: var(--ink-soft); }
.c-daily-item .button-secondary { min-height: 46px; gap: 12px; }

@media (max-width: 1100px) {
  .c-home-heading { grid-template-columns: minmax(200px, 1fr) minmax(260px, 1fr) auto; gap: 20px; padding-inline: 28px; }
  .c-home-heading h1 { font-size: 38px; }
  .c-home-intro { padding-left: 20px; }
  .c-home-intro strong { font-size: 20px; }
  .c-home-stage-footer { padding-inline: 28px; }
  .c-daily-item { padding-inline: 24px; }
}

@media (max-width: 899px) {
  .c-daily-heading { grid-template-columns: 1fr; gap: 18px; margin-bottom: 26px; }
  .c-daily-grid { grid-template-columns: 1fr; }
  .c-daily-item { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 28px; }
  .c-daily-item:first-child { border-top: 0; }
  .c-daily-item h3 { margin-top: 12px; }
  .c-daily-item p { margin-bottom: 20px; }
}

@media (max-width: 820px) {
  .c-home-hero { height: calc(100svh - 112px); }
  .c-home-heading { padding: 24px 24px 8px; grid-template-columns: 1fr auto; gap: 16px 24px; }
  .c-home-heading h1 { font-size: 36px; }
  .c-home-intro { grid-column: 1 / -1; grid-row: 2; padding: 0; border: 0; }
  .c-home-stage-footer { padding: 8px 24px 12px; }
  .c-home-stage-footer .c-scene-caption { font-size: 10px; }
  .c-home-stage-footer .c-scene-caption::before { width: 20px; }
}

@media (max-width: 480px) {
  .c-home-heading { grid-template-columns: 1fr; gap: 12px; padding: 20px 24px 8px; }
  .c-home-heading .eyebrow { margin-bottom: 6px; }
  .c-home-heading h1 { font-size: 32px; }
  .c-home-intro { grid-column: auto; grid-row: auto; }
  .c-home-intro strong { font-size: 18px; margin-bottom: 6px; }
  .c-home-intro p { font-size: 12px; line-height: 1.8; }
  .c-home-heading > .button { justify-self: start; min-height: 42px; padding: 10px 18px; }
  .c-home-stage-footer { padding-inline: 20px; gap: 8px; }
  .c-home-stage-footer .c-scene-caption { gap: 0; }
  .c-home-stage-footer .c-scene-caption::before { display: none; }
  .c-home-stage-footer .c-scene-toolbar { gap: 4px; }
  .c-daily-heading h2 { font-size: 28px; }
  .c-daily-heading > p { font-size: 13px; }
  .c-daily-heading > p br { display: none; }
}

@media (max-height: 740px) and (max-width: 480px) {
  .c-home-heading { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-top: 16px; }
  .c-home-heading .eyebrow { display: none; }
  .c-home-heading h1 { font-size: 26px; }
  .c-home-heading > .button { justify-self: end; padding-inline: 14px; }
  .c-home-intro { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-height: 540px) and (min-width: 600px) {
  .c-home-hero { grid-template-rows: auto minmax(130px, 1fr) auto; }
  .c-home-heading { grid-template-columns: 1fr auto; padding: 8px 24px; }
  .c-home-heading .eyebrow, .c-home-intro { display: none; }
  .c-home-heading h1 { font-size: 28px; }
  .c-home-heading > .button { min-height: 40px; padding: 10px 18px; }
  .c-home-stage-footer { padding-block: 6px; }
}

/* Concept layers are an optional homepage presentation, not analysis controls. */
.c-home-stage-footer {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(190px, 1fr);
  gap: 18px;
  padding-top: 12px;
}
.c-home-stage-footer .c-scene-caption { display: grid; gap: 5px; font-size: 11px; }
.c-home-stage-footer .c-scene-caption::before { display: none; }
.c-scene-caption > span { font-size: 10px; color: #65777b; }
.c-home-stage-footer .c-scene-toolbar { justify-self: end; }
.c-concept-selector { display: flex; align-items: center; gap: 4px; }
.c-concept-selector[hidden], .c-scene-toolbar[hidden], .c-concept-note[hidden] { display: none !important; }
.c-concept-selector button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 44px; padding: 9px 14px; background: transparent;
  color: var(--ink-soft); border: 1px solid transparent; border-radius: 4px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s;
}
.c-concept-selector button:hover { background: #e7edee; color: var(--ink); }
.c-concept-selector button[aria-pressed=true] { background: white; border-color: var(--line-strong); color: var(--ink); }
.c-concept-selector svg { width: 15px; height: 15px; }
.c-layer-swatch { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.c-layer-qi { background: var(--scene-qi-ramp, #265ecc); width: 18px; height: 6px; border-radius: 2px; }
.c-layer-sun { background: var(--scene-sun, #e4ae36); }
.c-layer-wind { background: var(--scene-wind, #009fbd); }.c-layer-sound { background: var(--scene-sound, #8863bb); }
.c-concept-note {
  position: absolute; z-index: 2; top: 44px; left: max(40px, calc((100% - 1320px) / 2));
  pointer-events: none; width: 225px; color: var(--ink);
}
.c-concept-note > span { font: 11px/1.5 var(--sans); color: var(--jade); }
.c-concept-note h2 { font: 400 27px/1.6 var(--serif); margin: 16px 0; white-space: pre-line; }
.c-concept-note p { font: 12px/1.9 var(--sans); color: var(--ink-soft); margin: 0; white-space: pre-line; }
[data-concept=qi] .c-concept-note > span { color: var(--scene-qi, #265ecc); }
[data-concept=sun] .c-concept-note > span { color: #987020; }
[data-concept=wind] .c-concept-note > span { color: #297b9b; }
[data-concept=sound] .c-concept-note > span { color: var(--scene-sound, #8863bb); }
@media (max-width: 1100px) {
  .c-concept-note { display: none; }
  .c-concept-selector button { padding-inline: 10px; }
  .c-home-stage-footer { grid-template-columns: minmax(90px,1fr) auto auto; gap: 12px; }
}
@media (max-width: 820px) {
  .c-home-stage-footer { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .c-concept-selector { grid-row: 1; grid-column: 1 / -1; justify-content: center; }
  .c-home-stage-footer .c-scene-caption { grid-row: 2; line-height: 1.6; }
  .c-home-stage-footer .c-scene-toolbar { grid-row: 2; }
  .c-home-heading { padding-top: 16px; }
  .c-concept-selector button { padding-inline: 13px; }
}
@media (max-width: 480px) {
  .c-home-heading { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .c-home-heading h1 { font-size: 28px; }
  .c-home-intro { grid-column: 1 / -1; grid-row: 2; }
  .c-home-heading > .button { justify-self: end; padding: 10px 12px; font-size: 12px; }
  .c-home-heading .eyebrow { font-size: 10px; }
  .c-concept-selector { width: 100%; gap: 0; }
  .c-concept-selector button { padding-inline: 8px; flex: 1; gap: 5px; font-size: 11px; }
  .c-home-stage-footer { padding-inline: 16px; }
  .c-home-stage-footer .c-scene-caption { font-size: 10px; }
  .c-scene-caption > span { max-width: 92px; line-height: 1.4; }
}
@media (max-height: 540px) and (min-width: 600px) {
  .c-home-stage-footer { grid-template-columns: minmax(90px,1fr) auto auto; gap: 8px; padding: 4px 24px; }
  .c-concept-selector, .c-home-stage-footer .c-scene-caption, .c-home-stage-footer .c-scene-toolbar { grid-column: auto; grid-row: auto; }
  .c-concept-selector button { padding-inline: 7px; min-height: 38px; }
  .c-concept-note { display: none; }
  .c-home-stage-footer .c-scene-toolbar button { width: 38px; height: 38px; }
}
