/* ---- Journal drawer: Notes from Betsy ---- */
.panel-header.has-hero:has(.journal-poster){ height:auto; aspect-ratio:2 / 1; }
.journal-poster{ position:absolute; inset:0; }
.journal-poster img{ width:100%; height:100%; object-fit:cover; object-position:center 20%; filter:saturate(1.05); }
.panel-body.journal-body{ min-height:60vh; }

.jr-loading, .jr-empty{ padding:28px 0; text-align:center; color:#8a7660; font-family:'Fraunces',serif; font-size:17px; }
.jr-head{ display:flex; align-items:flex-start; gap:14px; margin:0 0 18px; }
.jr-intro{ flex:1; font-family:'Fraunces',serif; font-size:17px; line-height:1.5; color:#2c2015; margin:0; }
.jr-key{
  flex-shrink:0; width:44px; height:44px; border-radius:50%; border:1px solid rgba(122,92,58,.3); background:rgba(255,255,255,.7); cursor:pointer; font-size:20px;
  display:flex; align-items:center; justify-content:center; opacity:.7; transition:transform .2s cubic-bezier(.34,1.56,.64,1), opacity .2s ease, background-color .2s ease;
}
.jr-key:hover{ opacity:1; transform:scale(1.1) rotate(-12deg); background:#fff; }
.jr-toolbar{ flex-basis:100%; display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; background:rgba(255,255,255,.7); border-radius:14px; padding:12px 14px; }
.jr-signed{ font-size:13.5px; color:#5a4735; flex:1; }
.jr-toolbar .cta{ margin:0; padding:10px 16px; font-size:14px; }
.jr-head:has(.jr-toolbar){ flex-wrap:wrap; }
.jr-link{ background:none; border:none; padding:4px 6px; font:inherit; font-size:13.5px; font-weight:700; color:var(--panel-color,#7a5c3a); cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.jr-link.danger{ color:#a83a2a; }

.jr-list{ display:flex; flex-direction:column; gap:12px; }
.jr-card-post{
  display:flex; gap:16px; align-items:stretch; background:rgba(255,255,255,.82); border-radius:18px; overflow:hidden; cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.1); transition:transform .2s ease, box-shadow .2s ease;
}
.jr-card-post:hover{ transform:translateY(-3px); box-shadow:0 14px 30px rgba(0,0,0,.16); }
.jr-thumb{ width:124px; min-height:124px; object-fit:cover; flex-shrink:0; }
.jr-thumb-empty{ display:flex; align-items:center; justify-content:center; font-size:34px; color:#fff; background:linear-gradient(160deg, var(--panel-color,#7a5c3a), rgba(var(--panel-color-rgb,122,92,58),.6)); }
.jr-card-text{ padding:14px 16px 14px 0; display:flex; flex-direction:column; gap:4px; min-width:0; }
.jr-card-text time, .jr-post time, .jr-comment time{ font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8a7660; }
.jr-card-text h3{ font-family:'Fraunces',serif; font-size:20px; font-weight:600; color:#2c2015; margin:0; line-height:1.15; }
.jr-card-text p{ font-size:14px; line-height:1.5; color:#4a3a2c; margin:0; }
.jr-meta{ font-size:12.5px; font-weight:700; color:var(--panel-color,#7a5c3a); margin-top:auto; }

.jr-back{ background:none; border:none; font:inherit; font-size:14px; font-weight:700; color:var(--panel-color,#7a5c3a); cursor:pointer; padding:0; margin:0 0 14px; }
.jr-post .jr-title{ font-family:'Fraunces',serif; font-size:30px; font-weight:600; color:#2c2015; margin:6px 0 10px; line-height:1.1; text-shadow:none; }
.jr-own{ display:flex; gap:6px; margin:-4px 0 12px; }
.jr-body p{ font-family:'Fraunces',serif; font-size:17px; line-height:1.7; color:#2c2015; margin:0 0 14px; }
.jr-body a{ color:var(--panel-color,#7a5c3a); }
.jr-gallery{ display:grid; gap:8px; margin:14px 0; }
.jr-gallery-1{ grid-template-columns:1fr; }
.jr-gallery-2{ grid-template-columns:1fr 1fr; }
.jr-gallery-3{ grid-template-columns:repeat(3, 1fr); }
.jr-gallery img{ width:100%; aspect-ratio:1 / 1; object-fit:cover; border-radius:12px; cursor:zoom-in; box-shadow:0 4px 12px rgba(0,0,0,.18); transition:transform .2s ease; }
.jr-gallery-1 img{ aspect-ratio:auto; max-height:520px; object-fit:contain; background:rgba(0,0,0,.05); }
.jr-gallery img:hover{ transform:scale(1.02); }
.jr-video{ display:block; width:100%; border-radius:14px; background:#000; margin:14px 0; box-shadow:0 10px 26px rgba(0,0,0,.3); }
.jr-embed{ position:relative; margin:14px 0; }
.jr-embed iframe{ display:block; width:100%; aspect-ratio:16 / 9; border:none; border-radius:14px; background:#000; box-shadow:0 10px 26px rgba(0,0,0,.3); }
.jr-embed span{ display:block; font-size:13px; color:#6b5744; margin-top:6px; }
.jr-linkcard{ display:flex; gap:14px; align-items:stretch; background:#fff; border-radius:14px; overflow:hidden; text-decoration:none; color:inherit; margin:12px 0; box-shadow:0 4px 14px rgba(0,0,0,.1); border:1px solid rgba(0,0,0,.06); transition:transform .2s ease; }
.jr-linkcard:hover{ transform:translateY(-2px); }
.jr-linkcard img{ width:120px; object-fit:cover; flex-shrink:0; }
.jr-linkcard span{ display:flex; flex-direction:column; gap:3px; padding:12px 14px 12px 0; min-width:0; }
.jr-linkcard span:first-child{ padding-left:14px; }
.jr-linkcard small{ font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8a7660; }
.jr-linkcard strong{ font-family:'Fraunces',serif; font-size:16px; color:#2c2015; line-height:1.25; }
.jr-linkcard em{ font-style:normal; font-size:13px; color:#5a4735; line-height:1.4; }

.jr-comments{ margin-top:26px; padding-top:18px; border-top:1px solid rgba(122,92,58,.3); }
.jr-comments h3{ font-family:'Fraunces',serif; font-size:19px; font-weight:600; color:#2c2015; margin:0 0 12px; }
.jr-comment{ background:rgba(255,255,255,.72); border-radius:12px; padding:10px 14px; margin-bottom:8px; }
.jr-comment-head{ display:flex; align-items:baseline; gap:10px; }
.jr-comment-head strong{ font-size:14px; color:#2c2015; }
.jr-comment-head .jr-link{ margin-left:auto; font-size:12px; }
.jr-comment p{ font-size:14.5px; line-height:1.5; color:#3a2c1e; margin:4px 0 0; }
.jr-comment-form, .jr-editor{ display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.jr-comment-form input, .jr-comment-form textarea, .jr-editor input, .jr-editor textarea, .jr-card input{
  width:100%; box-sizing:border-box; font:inherit; font-size:15px; color:#2c2015; background:#fff; border:1px solid rgba(122,92,58,.35); border-radius:12px; padding:11px 14px;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.jr-comment-form textarea, .jr-editor textarea{ resize:vertical; line-height:1.5; }
.jr-editor textarea[name=body]{ font-family:'Fraunces',serif; font-size:16.5px; }
.jr-comment-form input:focus, .jr-comment-form textarea:focus, .jr-editor input:focus, .jr-editor textarea:focus, .jr-card input:focus{ outline:none; border-color:var(--panel-color,#7a5c3a); box-shadow:0 0 0 3px rgba(var(--panel-color-rgb,122,92,58),.18); }
.jr-comment-form .cta, .jr-editor .cta-row{ align-self:flex-start; }
.jr-error{ color:#a83a2a; font-size:13.5px; min-height:0; }
.jr-error:empty{ display:none; }

.jr-editor label{ display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8a7660; }
.jr-section{ background:rgba(255,255,255,.6); border-radius:14px; padding:14px; }
.jr-section-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.jr-section-head strong{ font-family:'Fraunces',serif; font-size:16px; color:#2c2015; }
.jr-upload-btn, .jr-editor .cta.secondary{ margin:0; padding:8px 14px; font-size:13.5px; cursor:pointer; }
.jr-media-edit{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px; }
.jr-media-edit:empty{ display:none; }
.jr-media-item{ position:relative; aspect-ratio:1 / 1; border-radius:10px; overflow:hidden; background:#000; }
.jr-media-item img, .jr-media-item video{ width:100%; height:100%; object-fit:cover; display:block; }
.jr-x{ position:absolute; top:6px; right:6px; width:26px; height:26px; border-radius:50%; border:none; background:rgba(20,12,6,.75); color:#fff; font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.jr-progress-row{ position:relative; font-size:12.5px; color:#5a4735; padding:6px 0 10px; }
.jr-progress-row i{ position:absolute; left:0; bottom:4px; height:4px; border-radius:2px; background:var(--panel-color,#7a5c3a); transition:width .2s ease; }
.jr-addlink{ display:flex; gap:8px; }
.jr-addlink input{ flex:1; }
.jr-links-edit{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.jr-links-edit:empty{ display:none; }
.jr-link-item{ display:flex; align-items:center; gap:10px; background:#fff; border-radius:10px; padding:8px 10px; position:relative; }
.jr-link-item img{ width:54px; height:40px; object-fit:cover; border-radius:6px; }
.jr-link-ico{ width:54px; text-align:center; font-size:20px; }
.jr-link-item > span{ display:flex; flex-direction:column; min-width:0; flex:1; }
.jr-link-item strong{ font-size:14px; color:#2c2015; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.jr-link-item small{ font-size:11.5px; color:#8a7660; }
.jr-link-item .jr-x{ position:static; flex-shrink:0; }

/* sign-in modal + image zoom */
.jr-modal{ position:fixed; inset:0; z-index:46; display:flex; align-items:center; justify-content:center; background:rgba(14,10,6,.7); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); opacity:0; transition:opacity .25s ease; }
.jr-modal.open{ opacity:1; }
.jr-card{ position:relative; width:min(92vw, 380px); background:#fdf8ee; border-radius:22px; padding:30px 28px 26px; text-align:center; box-shadow:0 30px 70px rgba(0,0,0,.5); display:flex; flex-direction:column; gap:12px; transform:scale(.94); transition:transform .35s cubic-bezier(.16,1,.3,1); }
.jr-modal.open .jr-card{ transform:none; }
.jr-lock{ font-size:34px; }
.jr-card h3{ font-family:'Fraunces',serif; font-size:24px; margin:0; color:#2c2015; }
.jr-card p{ font-size:14px; color:#6b5744; margin:0 0 6px; }
.jr-card label{ display:flex; flex-direction:column; gap:5px; text-align:left; font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#8a7660; }
.jr-card input[name=pin]{ letter-spacing:.4em; font-size:20px; text-align:center; }
.jr-card .cta{ margin-top:6px; background:#7a5c3a; }
.jr-close{ position:absolute; top:12px; right:12px; width:34px; height:34px; border-radius:50%; border:none; background:rgba(0,0,0,.06); cursor:pointer; font-size:14px; }
.jr-zoom{ position:fixed; inset:0; z-index:47; background:rgba(10,7,4,.92); display:flex; align-items:center; justify-content:center; cursor:zoom-out; }
.jr-zoom img{ max-width:94vw; max-height:92vh; border-radius:10px; box-shadow:0 30px 80px rgba(0,0,0,.6); }

@media (max-width:600px){
  .jr-card-post{ flex-direction:column; }
  .jr-thumb{ width:100%; height:160px; min-height:0; }
  .jr-card-text{ padding:0 14px 14px; }
  .jr-gallery-3{ grid-template-columns:1fr 1fr; }
}
