/* Star Stories — the "little compass" poster add-on (on-screen preview).
   The printable A3 document carries its own inline CSS (see poster.js). */

/* the add-on trigger under "Create this book" */
.ss-addon { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(201,162,39,0.22); text-align: center; }
.ss-addon-btn {
  font-family: Georgia, serif; font-size: 14px; cursor: pointer; letter-spacing: 0.02em;
  color: #cdb964; background: transparent; border: 1px solid #cdb964; border-radius: 10px;
  padding: 10px 16px; width: 100%;
}
.ss-addon-btn:hover { background: rgba(205,185,100,0.1); }
.ss-addon-hint { display: block; margin-top: 8px; font-size: 12px; color: #9a9382; line-height: 1.5; }

/* family compass — extra people for a shared poster */
.ss-addon-link {
  background: none; border: none; cursor: pointer; font-family: Georgia, serif;
  font-size: 12.5px; color: #9a8a5a; text-decoration: underline; padding: 6px 0; margin-top: 4px;
}
.ss-addon-link:hover { color: #cdb964; }
.ss-family { margin-top: 6px; text-align: left; }
.ss-family-row { display: grid; grid-template-columns: 1fr 1fr 84px 28px; gap: 6px; margin-bottom: 12px; align-items: center; }
.ss-family-row .ss-input { padding: 7px 8px; font-size: 13px; }
/* each member's own birthplace, on its own line under their name/date/time */
.ss-family-row .ss-family-place { grid-column: 1 / 5; }
.ss-family-row .ss-geo { grid-column: 1 / 5; font-size: 11px; color: #8a8272; line-height: 1.4; }
.ss-family-row .ss-geo.ok { color: #7d9a6a; }
.ss-family-row .ss-geo.warn { color: #c9884a; }
.ss-family-del {
  background: none; border: none; cursor: pointer; color: #8a8272; font-size: 19px; line-height: 1; padding: 0;
}
.ss-family-del:hover { color: #c96a4a; }
.ss-family-note { font-size: 11.5px; color: #8a8272; line-height: 1.5; margin-top: 6px; }
@media (max-width: 560px) { .ss-family-row { grid-template-columns: 1fr 1fr 28px; } .ss-family-row .ss-input[data-f="time"] { grid-column: 1 / 3; } }

/* overlay (mirrors the reader overlay) */
.ss-poster-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(16, 16, 28, 0.78); backdrop-filter: blur(3px);
  overflow-y: auto; padding: 24px 16px 60px;
}
.ss-poster-overlay.is-open { display: block; }
.ss-poster-body { display: flex; justify-content: center; }

/* the poster itself — an A3 sheet scaled to fit the screen */
/* A3 proportions are a MINIMUM, not a cage: with a fixed ratio and
   overflow:hidden the rules were being clipped off the bottom. The sheet now
   grows when the content needs more room, so the preview is always readable —
   the downloaded file is the print-exact one. */
.pc-poster {
  --pw: min(94vw, 540px);
  width: var(--pw); min-height: calc(var(--pw) * var(--par, 1.4141));
  background: #faf6ec; color: #2c2416; position: relative;
  padding: 8% 7.5%; display: flex; flex-direction: column; overflow: visible;
  border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  font-family: Georgia, 'Times New Roman', serif;
}
.pc-frame { position: absolute; inset: 4%; border: 1.5px solid #c9a227; border-radius: 12px; pointer-events: none; }
.pc-frame:before { content: ""; position: absolute; inset: 9px; border: 0.6px solid #d9c98f; border-radius: 9px; }
.pc-kicker { text-align: center; letter-spacing: 0.28em; text-transform: uppercase; font-size: 9.5px; color: #9a7010; margin-bottom: 10px; }
.pc-title { text-align: center; font-size: clamp(19px, 4.6vw, 27px); font-weight: normal; letter-spacing: 0.03em; line-height: 1.14; color: #2c2416; }
.pc-sub { text-align: center; font-size: 11.5px; color: #8a7860; margin-top: 7px; font-style: italic; line-height: 1.4; }
.pc-avatar { display: block; width: 25%; height: auto; margin: 12px auto 4px; filter: drop-shadow(0 8px 18px rgba(44,36,22,0.25)); }
.pc-avatar.pc-vec svg { display: block; width: 100%; height: auto; }
/* family compass — the whole cast, side by side */
.pc-avatars { display: flex; justify-content: center; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 12px auto 4px; }
.pc-avatars img { width: 15%; min-width: 52px; height: auto; filter: drop-shadow(0 6px 14px rgba(44,36,22,0.22)); }
/* fill the sheet: the rules take the leftover height and spread through it,
   instead of clumping at the top with all the slack dumped above the footer */
.pc-rules { margin: 12px auto 0; width: 100%; flex: 1; display: flex; flex-direction: column;
  justify-content: space-evenly; gap: 13px; }
.pc-rule { display: flex; gap: 11px; align-items: flex-start; }
.pc-rule .pc-star { flex: 0 0 auto; color: #c9a227; font-size: 13px; line-height: 1.5; }
.pc-rule p { font-size: 14px; line-height: 1.5; color: #3a3020; }
.pc-rule small { display: block; color: #87764f; font-size: 12px; font-style: italic; margin-top: 3px; }
.pc-foot { margin-top: auto; text-align: center; color: #8a7860; font-style: italic; font-size: 11px; padding-top: 18px; }
@media (max-width: 460px) { .pc-rule p { font-size: 13px; } .pc-rules { gap: 11px; } }
.pc-foot b { color: #9a7010; font-style: normal; letter-spacing: 0.05em; }

/* poster-only inputs live inside the add-on, not in the birth-data form */
.ss-addon-field { margin-top: 10px; text-align: left; }
.ss-addon-field .ss-input { padding: 8px 10px; font-size: 13px; }

/* compact chips for the poster's style choice */
.ss-chips-sm { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-chips-sm .ss-chip { padding: 7px 10px; }
.ss-chips-sm .ss-chip-t { font-size: 12.5px; }
.ss-chips-sm .ss-chip-s { font-size: 10.5px; }

/* inline text button (e.g. "Forget it") */
.ss-linkbtn {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
  color: #9a8a5a; text-decoration: underline;
}
.ss-linkbtn:hover { color: #cdb964; }

/* opt-in remember checkbox */
.ss-remember { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px;
  font-size: 12.5px; color: #b8b0a0; line-height: 1.5; cursor: pointer; }
.ss-remember input { margin-top: 3px; flex: 0 0 auto; }
.ss-remember .ss-hint { display: block; }

/* "their sky": the real chart drawn behind the words, full-bleed and faint */
.pc-poster .pc-sky, .poster .pc-sky {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.pc-poster > *:not(.pc-sky) { position: relative; z-index: 1; }
