/* Poor Penny v2.3 — one story, one invitation at a time, open books, tiny jobs, an honest coffee jar.
   Loaded after styles-v2.css, styles-v21.css and styles-v22.css. Identity unchanged: cream, teal, copper,
   Penny's room and robot. Also styles the static Terms / Privacy / Refunds pages (.legal-page). */

:root{--teal-ink:#145c53;--error:#a24f2f}

/* ---------- Header: short labels, no competing chat button ---------- */
.site-header{min-height:72px;gap:24px}
.site-header nav{gap:24px;font-size:14px;margin-left:auto;margin-right:0}
.site-header nav a{padding:12px 0;font-weight:700}
.site-header nav a:hover{color:var(--teal)}

/* ---------- Hero: one headline, one line, two actions ---------- */
.intro{padding-block:28px 26px}
.intro .eyebrow{display:flex;align-items:center;gap:8px;font:600 13px var(--mono)!important;color:#6d7d64;margin:0;letter-spacing:.2px}
.intro h1{font-size:44px;line-height:1.08;letter-spacing:-1.6px;margin:10px 0 12px;max-width:780px}
.intro h1 em{display:block;font-style:normal;color:var(--teal)}
.intro .premise{font-size:17px!important;line-height:1.6!important;color:#5f6b5d!important;max-width:600px}
.hero-ctas{margin-top:18px}
.hero-ctas .button{font-size:16px;min-height:48px;padding:11px 20px}
.hero-chat{min-width:200px}
.today-basis{font-size:12px!important}

/* ---------- Room: an animated status view, not a camera ---------- */
.room-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.fresh-stamp{font:600 11px var(--mono);color:#7d8a72;letter-spacing:.3px}
.fresh-stamp:empty{display:none}
.cam-label>span{animation:none!important;background:#9fc7a8}
.cam-label small{opacity:.7;letter-spacing:.5px;text-transform:none}
.speech-bubble{width:260px}
.speech-bubble p,#penny-line{min-height:0!important;font-size:19px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}

/* Reaction row: one line on desktop, compact grid on phones; hint underneath, not inside. */
.room-controls{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center;gap:8px;padding:12px}
.room-controls button{flex:0 1 auto;min-width:0;min-height:44px;padding:8px 14px;font-size:14px;white-space:nowrap;border-radius:9px}
.controls-hint{margin:0;padding:0 12px 10px;text-align:center;font-size:12px;line-height:1.4;color:#7d8573;background:#f5f5eb;border-bottom:1px solid #d9dfcf}
.room-controls{border-bottom:0}
.screen-feed[hidden]{display:none}

/* ---------- Diary thought + today's little plan ---------- */
.diary-thought{list-style:none;padding:14px 16px;margin-top:6px;border:1px dashed #d6c4a5;border-radius:10px;background:#fbf4e7}
.thought-label{display:block;font:600 12px var(--mono);color:#9e815c;letter-spacing:.2px}
.diary-thought p{font:italic 17px/1.5 Georgia,serif;color:#6b5236;margin-top:4px}
.plan-card .confession-label{font:600 12px var(--mono);letter-spacing:.8px;color:#9e815c}
.plan-card .confession-face{font-size:30px;margin:12px 0 4px}
.plan-line{font-size:17px;line-height:1.5;color:#5d4630;font-weight:600}
.plan-source{font:600 12px var(--mono);color:#9e815c;margin-top:8px!important}
.plan-thought{margin-top:20px;font:italic 21px/1.3 Georgia,serif;color:#775a3d;letter-spacing:-.3px}
.plan-thought small{display:block;margin-top:8px;font:12px var(--mono);font-style:normal;color:#98846b;letter-spacing:0}

/* ---------- Books: open by default, dashes when unreachable ---------- */
.ledger-stats.is-stale strong{color:#8b917f}
.ledger-stats strong{font-variant-numeric:tabular-nums}

/* ---------- Tiny jobs: exactly two request cards + the noticeboard ---------- */
.jobs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;margin-top:25px}
.job-card h3,.support-grid h3{max-width:none}
.job-card>p,.support-grid .service-card p{min-height:0!important;font-size:15px!important;line-height:1.6;color:#5f6b5d;margin:12px 0}
.job-facts{list-style:none;padding:0;margin:0 0 18px;display:grid;gap:6px;font-size:14px;color:#4f5f49}
.job-facts li::before{content:'✓';display:inline-block;width:20px;color:var(--teal);font-weight:800}
.ad-steps{margin:0 0 16px;padding-left:22px;display:grid;gap:4px;font-size:14px;color:#4f5f49}
.ad-card{background:#fbf4e7;border-color:#e4d3b3}
.ad-card .service-price{margin-top:8px}
.service-card>.button{font-size:15px;min-height:46px;margin-top:auto}
.service-card>small{font-size:12px!important;color:#7d8573;margin-top:10px}
.button-full{width:100%}
.noticeboard{margin-top:22px;padding:18px 20px 20px;border:1px solid #d9c7a8;border-radius:12px;background:#efe3cc;box-shadow:inset 0 0 0 4px #f5ead6}
.noticeboard h3{font-size:17px;letter-spacing:-.2px}
.noticeboard-list{list-style:none;padding:0;margin:14px 0 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.notice-ad{display:grid;gap:5px;align-content:start;background:#fffdf5;border:1px solid #e0cfae;border-radius:6px;padding:12px 14px 14px;box-shadow:2px 3px 0 #d9c7a866;transform:rotate(-.5deg);overflow-wrap:anywhere}
.notice-ad:nth-child(even){transform:rotate(.5deg)}
.ad-label{justify-self:start;font:700 11px var(--mono);letter-spacing:.5px;text-transform:uppercase;color:var(--copper-ink);background:#f1dfcb;border-radius:4px;padding:2px 7px}
.ad-business{font-size:16px}
.ad-description{font-size:14px;line-height:1.5;color:#5b6b52;margin:0}
.ad-link{justify-self:start;color:var(--teal);font-weight:700;font-size:14px;text-decoration:underline;text-underline-offset:3px;min-height:32px;display:inline-flex;align-items:center}
.ad-until{font-size:12px;color:var(--muted)}
.noticeboard-empty{margin-top:8px;font-size:15px;line-height:1.5;color:#6b5a40}

/* ---------- Coffee, cheers and word of mouth ---------- */
.support-section{padding-block:10px 55px}
.support-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:17px;margin-top:25px}
.coffee-jar{background:#fbf2e4;border-color:#e4d3b3}
.tip-options{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 12px}
.tip-button{flex:1 1 96px;font-size:16px;min-height:48px;background:#fffdf7;border-color:#e2cdab;color:var(--ink)}
.tip-button:hover{background:#f4e7cd}
.jar-open small,.jar-closed small{display:block;font-size:12px;color:#7d8573;line-height:1.5}
.jar-closed .button{min-height:46px;font-size:15px}
.supporters{margin-top:18px}

/* ---------- Community: starter prompts instead of an empty board ---------- */
.community-grid.is-empty{grid-template-columns:minmax(0,680px);justify-content:center}
.community-copy h2{margin-bottom:10px}
.starter-prompts{margin:18px 0 4px}
.starter-label{font:600 12px var(--mono);color:#62705a;margin:0 0 8px}
.starter-chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;padding:8px 15px;border-radius:22px;border:1px dashed #8fa986;background:#f7f9ef;font-size:14px;color:var(--ink)}
.chip:hover{background:#eef4e2;border-style:solid}

/* ---------- Closing note + footer ---------- */
.last-note p{font-size:15px}
.last-note .text-link{font-size:14px}
.suggestion-bottom .button{font-size:15px}
.site-footer{align-items:center}
.site-footer>p{font-size:14px;color:#6d7867}
.footer-links{margin-left:auto;display:flex;flex-wrap:wrap;align-items:center;gap:0 18px}
.footer-links a,.footer-links button{font-size:14px;color:#4f5f49;text-decoration:underline;text-underline-offset:3px;min-height:44px;display:inline-flex;align-items:center;padding:0}
.footer-links a:hover,.footer-links button:hover{color:var(--teal)}
.site-footer>small{font-size:12px}

/* ---------- Scroll-activated shortcut (hidden while hero/room/forms/nav are in view) ---------- */
.chat-launcher{right:20px;bottom:20px;transform:none;border-radius:24px;padding:0 18px;min-height:48px;gap:8px;background:var(--teal);color:#fff;border:1px solid var(--teal-ink);box-shadow:0 8px 24px #1c2b2733;font-size:15px;font-weight:700;animation:launcher-in .25s ease-out}
.chat-launcher .launcher-heart{font-size:20px;line-height:1}
.chat-launcher:hover{background:#13705f}
body.room-in-view .chat-launcher{opacity:1;pointer-events:auto;transform:none}
@keyframes launcher-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- Chat drawer: sized to its content, starters under the greeting ---------- */
.chat-drawer{height:auto;max-height:min(520px,calc(100dvh - 32px))}
.chat-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column}
.chat-body .chat-messages{flex:0 0 auto;overflow:visible;min-height:0;padding-bottom:8px}
.chat-body .quick-replies{padding-top:0}
.chat-form{flex-shrink:0}
.chat-form .button{flex-shrink:0}
.chat-footnote{flex-shrink:0}

/* ---------- Dialog request forms ---------- */
.request-form{grid-template-columns:1fr!important;gap:12px;margin-top:14px}
.request-form .label{font-size:14px;color:#4f6247}
.optional-fields{border:1px dashed #cfd8c2;border-radius:10px;padding:0 12px;background:#fbfcf4}
.optional-fields summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:700;color:var(--teal);font-size:14px}
.optional-grid{display:grid;gap:12px;padding-bottom:12px}
.char-count{font-size:12px;color:var(--muted);font-weight:400;align-self:flex-end}
.form-status.is-error{color:var(--error)}
.app-dialog [aria-invalid=true]{border-color:#c0603c;box-shadow:0 0 0 2px #c0603c33}
.request-done{display:grid;gap:10px;margin-top:14px}
.request-done .button{justify-self:start}
.done-ref{font-size:17px!important;font-weight:800;color:var(--teal-ink)!important}
.dialog-steps{margin:12px 0 0;padding-left:22px}
.dialog-actions{display:flex;flex-wrap:wrap;gap:10px}
.dialog-links{display:flex;gap:18px;margin-top:14px}
.app-dialog .check-label input{width:20px;height:20px;vertical-align:middle}
.app-dialog .input:disabled{background:#f1f1ea;color:#8b917f}

/* ---------- Mid widths ---------- */
@media(min-width:681px) and (max-width:1023px){
  .room-controls{flex-wrap:wrap}
}
@media(max-width:1100px){
  .intro h1{font-size:38px}
  .speech-bubble{width:220px}
  .speech-bubble p,#penny-line{font-size:17px}
}
@media(min-width:681px) and (max-width:850px){
  .room-controls{display:flex}
  .room-controls button{font-size:14px;min-height:44px;padding:8px 12px}
  .speech-bubble{width:calc(100% - 50px)}
}

/* ---------- Phones ---------- */
@media(max-width:680px){
  .site-header{flex-wrap:nowrap;min-height:0;padding-block:8px;gap:10px;justify-content:space-between;align-items:center}
  .site-header nav{order:0;width:auto;margin:0 0 0 auto;gap:16px;font-size:14px;justify-content:flex-end}
  .site-header nav a{padding:12px 0}
  .brand-logo img{width:84px}
  .nav-extra{display:none}
  .intro{padding-block:12px 6px}
  .intro .eyebrow{font-size:12px!important}
  .intro h1{font-size:24px;letter-spacing:-.6px;line-height:1.18;margin:6px 0 8px}
  .intro h1 em{display:inline}
  .intro .premise{font-size:15px!important;line-height:1.5!important;margin-top:0!important}
  .hero-ctas{margin-top:12px;flex-wrap:nowrap}
  .hero-ctas a.hero-diary{display:inline-flex!important}
  .hero-ctas .button{flex:1 1 0;min-height:46px;font-size:15px;padding:8px 10px;min-width:0}
  .today-card .today-basis{display:block;grid-column:1/-1;margin:2px 0 0!important}
  .room-meta{gap:2px 8px}
  .fresh-stamp{font-size:11px}
  .speech-bubble{width:calc(100% - 40px)}
  .speech-bubble p,#penny-line{font-size:17px;-webkit-line-clamp:3;line-clamp:3}
  .room-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}
  .room-controls button{white-space:normal;font-size:14px;min-height:44px;padding:8px 8px;line-height:1.25}
  .jobs-grid,.support-grid{grid-template-columns:1fr}
  .job-card,.support-grid .service-card{display:flex;flex-direction:column;position:relative;padding:22px 20px}
  .job-card .service-icon,.support-grid .service-icon{position:absolute;top:20px;right:18px;margin:0;font-size:28px}
  .job-card h3,.support-grid h3{padding-right:46px;font-size:23px}
  .service-price{margin-bottom:6px}
  .plan-card{display:block;padding:22px 20px}
  .plan-card .confession-face{float:right;margin:-6px 0 0 10px;font-size:30px}
  .last-note .text-link{font-size:14px}
  .site-footer>p{margin-left:0;font-size:14px}
  .noticeboard{padding:16px 14px}
  .tip-options{gap:8px}
  .tip-button{flex:1 1 30%;padding:8px 6px;font-size:15px}
  .community-grid.is-empty{grid-template-columns:1fr}
  .footer-links{margin-left:0;width:100%;gap:0 16px}
  /* The shortcut is a small tab on the right edge, only after the hero and room are gone. */
  .chat-launcher{width:46px;height:48px;min-height:48px;padding:0;right:0;bottom:calc(88px + env(safe-area-inset-bottom));border-radius:24px 0 0 24px;justify-content:center;border-right:0}
  .chat-launcher .launcher-text{display:none}
  .chat-launcher .launcher-heart{font-size:22px}
  /* Bottom sheet 70–85dvh that stays above the keyboard (visualViewport → --vvh/--kb). */
  .chat-drawer{left:0;right:0;width:100%;max-width:none;border-radius:16px 16px 0 0;bottom:var(--kb,0px);height:auto;min-height:min(70dvh,calc(var(--vvh,100dvh) - 8px));max-height:min(85dvh,calc(var(--vvh,100dvh) - 8px))}
  .chat-footnote{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
}
@media(max-width:370px){
  .site-header{flex-wrap:nowrap;padding-block:8px}
  .site-header nav{gap:11px;font-size:13px}
  .brand-logo img{width:72px}
  .intro h1{font-size:22px}
  .intro .eyebrow{display:flex!important;font-size:11px!important}
  .today-card .today-basis{display:none}
  .today-card{margin-top:6px;padding-top:6px}
  .hero-ctas{margin-top:10px}
  .hero-ctas .button{font-size:13.5px;padding:8px 6px;flex:1 1 auto;white-space:nowrap}
  .room-controls button{font-size:13px;padding:6px}
}
@media(prefers-reduced-motion:reduce){.chat-launcher{animation:none}}
.motion-paused .chat-launcher{animation:none}

/* ---------- Static legal pages ---------- */
.legal-page{background:var(--paper)}
.legal-page .site-header{justify-content:space-between}
.legal-page main{width:calc(100% - 32px);max-width:720px;margin:0 auto;padding:18px 0 60px}
.legal-page h1{font-size:34px;letter-spacing:-1px;line-height:1.1;margin:14px 0 8px}
.legal-page h2{font-size:20px;margin:28px 0 8px}
.legal-page p,.legal-page li{font-size:16px;line-height:1.65;color:#3f4d45}
.legal-page ul{padding-left:22px;margin:8px 0}
.legal-page li{margin:4px 0}
.legal-page .legal-meta{font:600 12px var(--mono);color:var(--muted);margin:0}
.legal-page main a{color:var(--teal);text-decoration:underline;text-underline-offset:3px}
.legal-page .legal-note{margin-top:22px;padding:14px 16px;border:1px dashed #d6c4a5;border-radius:10px;background:#fbf4e7}
.legal-page .site-footer{padding-block:20px 40px}
@media(max-width:680px){.legal-page h1{font-size:28px}}
