/* homepage (Nov 7, mockup D6): main column + side rail, fewer boxes */
.hlay { display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-start; }
.hlay, .hlay > *, .hmain > * { min-width: 0; max-width: 100%; }
.hmain { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.hmain > section { display: flex; flex-direction: column; gap: 16px; }
.hmain h2 { margin: 0; font-size: 26px; }

.hello { display: flex; align-items: center; gap: 18px; }
.hface { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; flex: 0 0 auto; border: 2px solid var(--line); box-shadow: 0 0 24px #b9a2ff33; }
.hello h1 { margin: 0; font-size: 38px; line-height: 1.05; }
.hello p { margin: 4px 0 0; font-size: 16px; }

.hdailies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 24px; }
.hday { display: flex; gap: 14px; align-items: center; color: var(--text); text-decoration: none; border-radius: 12px; padding: 4px; margin: -4px; transition: background 0.2s; }
.hday:hover { background: #ffffff08; }
.hcov { width: 84px; flex: 0 0 auto; }
.hcov .cover { box-shadow: 0 8px 18px #0008; border-radius: 10px; }
.hdt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hdt b { font: 700 20px/1.15 var(--f-display); }
.hdt .muted { font-size: 13px; line-height: 1.35; }
.hdt .dstat { position: static; align-self: flex-start; margin-top: 2px; }

.htrend { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; }
.htrend .tr { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.htrend .tr > a { color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.htrend .ctitle { font: 700 13px/1.25 var(--f-display); text-transform: lowercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }

.hrail { flex: 1 1 270px; display: flex; flex-direction: column; gap: 28px; border-left: 1px solid #ffffff14; padding-left: 28px; }
.rb { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rb[hidden] { display: none; }
.rb a:not(.btn) { color: var(--soft); text-decoration: none; }
.rb a:not(.btn):hover { color: var(--pink); }
.rk { font: 800 12px var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); }
.rt { font: 700 19px/1.2 var(--f-display); text-transform: lowercase; }
.rbig { font: 700 30px/1.1 var(--f-display); color: var(--moon); }
.rb .cd { color: var(--moon); }
.rb .btn { margin-top: 4px; }
.linkbtn { background: none; border: 0; padding: 6px 0; cursor: pointer; font: inherit; color: var(--dim); }
.linkbtn:hover { color: var(--soft); }
.hmoons { display: flex; gap: 6px; margin: 2px 0; }
.hmoons i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--moon); opacity: 0.55; }
.hmoons i.f { background: var(--moon); opacity: 1; box-shadow: 0 0 10px #fff1c999; }

.hnow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; }
.hnc .cover { border-radius: 6px; }
.hnt { display: flex; flex-direction: column; min-width: 0; }
.hnt b { font: 700 14px/1.2 var(--f-display); text-transform: lowercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hnow .nplus { min-width: 44px; min-height: 44px; border-radius: 99px; border: 1.5px solid var(--line); background: none; color: var(--pink); font: 700 14px var(--f-display); cursor: pointer; }
.hnow .nplus.new { background: var(--pink); color: #2a1030; border-color: var(--pink); }
.hnow .nplus:disabled { opacity: 0.5; }

.habout { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; border-top: 1px solid #ffffff14; padding-top: 32px; }
.habout-t { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.habout-t h2 { margin: 0; }
#tipBox[hidden] { display: none; }

@media (max-width: 900px) {
  .hrail { border-left: 0; padding-left: 0; border-top: 1px solid #ffffff14; padding-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 22px; }
}
@media (max-width: 560px) {
  .hlay { gap: 34px; }
  .hello { gap: 14px; }
  .hface { width: 60px; height: 60px; }
  .hello h1 { font-size: 27px; }
  .hello p { font-size: 15px; }
  .hdailies { grid-template-columns: 1fr; gap: 18px; }
  .hcov { width: 64px; }
  .hdt b { font-size: 18px; }
  .htrend { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .htrend .tr { flex: 0 0 104px; scroll-snap-align: start; }
  .hrail { grid-template-columns: 1fr; }
  .habout .pfp { width: 96px; height: 96px; }
}
/* phones: tonight's rail sits between the dailies and trending */
@media (max-width: 560px) {
  .hlay { flex-direction: column; align-items: stretch; }
  .hmain { display: contents; }
  .hello { order: 1; }
  .hmain > section:first-of-type { order: 2; }
  .hrail { order: 3; }
  .hmain > section:last-of-type { order: 4; }
}
