/* Planetary hours page. Loads after /styles.css. */
:root {
  --p-sun: #a8730c;
  --p-moon: #5f6f80;
  --p-mars: #a8392c;
  --p-mercury: #b8601a;
  --p-jupiter: #2d5b9a;
  --p-venus: #2f7a46;
  --p-saturn: #3d3656;
}

.ph-main { width: min(calc(100% - 3rem), var(--max)); margin-inline: auto; padding-bottom: 2rem; }
@media (max-width: 560px) { .ph-main, .site-header, footer { width: calc(100% - 2rem); } }

.ph-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 2.5rem; max-width: 900px; }
.ph-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); margin-bottom: 1.2rem; }
.ph-hero .hero-copy { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

.lang-switch { display: flex; gap: .9rem; font-size: .8rem; }
.lang-switch a[aria-current="page"] { font-weight: 700; text-decoration: none; }

.ph-tool {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  box-shadow: 0 20px 45px rgba(31,33,31,.06);
}

.ph-controls { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: end; margin-bottom: 1.8rem; }
.ph-controls label { display: grid; gap: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ph-controls select, .ph-controls input, .ph-controls button {
  font: inherit; font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 400;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: .6rem .7rem; border-radius: 0;
}
.ph-controls select { min-width: min(18rem, 100%); }
.ph-controls button { cursor: pointer; background: transparent; border-color: var(--ink); font-size: .8rem; }
.ph-controls button:hover { background: var(--accent-soft); }
.ph-geo-msg { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--muted); min-height: 0; }
.ph-geo-msg:empty { display: none; }

.ph-place { margin: 0 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ph-statement {
  margin: 0 0 .6rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}
.ph-statement .glyph { margin-right: .35rem; font-size: .85em; }
.ph-now-detail p { margin: 0 0 .3rem; color: var(--muted); }
.note { font-size: .88rem; color: var(--muted); }

.glyph { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", "DejaVu Sans", serif; font-variant-emoji: text; }
.p-sun { color: var(--p-sun); } .p-moon { color: var(--p-moon); } .p-mars { color: var(--p-mars); }
.p-mercury { color: var(--p-mercury); } .p-jupiter { color: var(--p-jupiter); } .p-venus { color: var(--p-venus); } .p-saturn { color: var(--p-saturn); }
.p-bg-sun { background: var(--p-sun); } .p-bg-moon { background: var(--p-moon); } .p-bg-mars { background: var(--p-mars); }
.p-bg-mercury { background: var(--p-mercury); } .p-bg-jupiter { background: var(--p-jupiter); } .p-bg-venus { background: var(--p-venus); } .p-bg-saturn { background: var(--p-saturn); }

.ph-cards { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: .8rem; margin: 1.6rem 0; align-items: stretch; }
.hour-card { border: 1px solid var(--line); padding: 1rem 1.1rem; background: var(--paper); }
.hour-card p { margin: 0; }
.hour-card-label { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem !important; }
.hour-card-planet { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.hour-card-time { font-size: .95rem; margin-top: .3rem !important; }
.hour-card-sub { font-size: .78rem; color: var(--muted); }
.hour-card.is-now { background: var(--white); border-color: var(--ink); box-shadow: 0 10px 25px rgba(31,33,31,.08); }
.hour-card.is-now .hour-card-planet { font-size: 2rem; }
.hour-card.is-now .hour-card-label { color: var(--accent); }

.ph-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.day-chip { border-top: 1px solid var(--line); padding-top: .7rem; }
.day-chip p { margin: 0; }
.day-chip-label { font-size: .72rem; color: var(--muted); }
.day-chip-planet { font-family: var(--serif); font-size: 1.15rem; }
.day-chip-sub { font-size: .78rem; color: var(--muted); }
.day-chip.is-today { border-top: 2px solid var(--ink); }

.ph-table { margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.ph-table-head { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.ph-table-head h3 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.ph-table-head .ph-controls { margin: 0; }

.ph-bar { display: flex; height: 1.1rem; gap: 2px; margin-bottom: 1.4rem; }
.bar-seg { flex-basis: 0; min-width: 2px; opacity: .9; }
.bar-seg.is-night { opacity: .45; }
.bar-seg.is-current { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }

.ph-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.hour-col h4 { font-size: 1.2rem; margin-bottom: .5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hour-col-sub { font-family: var(--sans); font-size: .78rem; color: var(--muted); }
.hour-list { list-style: none; margin: 0; padding: 0; }
.hour-list li { display: grid; grid-template-columns: 1.8rem 1fr auto; gap: .6rem; padding: .32rem .4rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hour-list li.is-current { background: var(--accent-soft); font-weight: 600; }
.hl-n { color: var(--muted); }
.hl-time { color: var(--muted); font-variant-numeric: tabular-nums; }

.ph-about { padding: 4.5rem 0 1rem; }
.ph-about .prose { max-width: 760px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; }
.ph-about h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 1.4rem; }
.ph-about h3 { font-size: 1.4rem; margin: 2.2rem 0 .7rem; }
.gift-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.gift-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.gift-list .glyph { display: inline-block; width: 1.6rem; }

.ph-books { padding: 4.5rem 0; }
.ph-books .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph-books .book-card { grid-template-columns: 1fr; align-items: start; }
.ph-books .book-cover { max-width: 240px; }
.ph-books .book-meta h4 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }

@media (max-width: 860px) {
  .ph-cards { grid-template-columns: 1fr; }
  .ph-list { grid-template-columns: 1fr; }
  .ph-books .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ph-days { grid-template-columns: 1fr; }
  .ph-books .book-grid { grid-template-columns: 1fr; }
  .ph-controls select { min-width: 0; width: 100%; }
  .ph-controls label { width: 100%; }
}
