/* Keep the original Storees identity; remove the old application's fixed layout constraints. */
html { min-height: 100%; height: auto; }
body { min-height: 100vh; height: auto; }
body.dark { background: linear-gradient(#666, #333) fixed; }
#container { width: 1000px; max-width: 100%; min-height: 100vh; position: relative; }
#menu { top: 0; bottom: 0; width: 140px; }
#menucontent { display: block; padding-top: 80px; }
#menu a:link, #menu a:visited { color: #d4d4d4; }
#menu a.active { color: #fff; background-color: #444; }
#pages { position: relative; margin-left: 140px; display: flex; min-height: 100vh; background: #fff; }
#page1 { box-sizing: border-box; width: 596px; min-width: 0; flex: 1; padding: 48px 32px 48px 64px; float: none; }
#youbar { box-sizing: border-box; width: 264px; flex-shrink: 0; padding: 64px 32px; float: none; background: linear-gradient(#dcdcdc, #fff); }
#userinfo { position: static; width: auto; text-align: right; font-size: 11px; margin: 0; z-index: auto; }
.brand { display: inline-block; margin-top: -25px; margin-bottom: 16px; }
.brand img { max-width: 100%; height: auto; }
#content { font-size: 15px; line-height: 1.5; min-height: 260px; overflow-wrap: anywhere; }
#content h2 { line-height: 1.2; }
#content img { max-width: 100%; height: auto; }
.archive-banner { border-left: 3px solid #8e957b; background: #f6f5f1; padding: 12px 14px; margin: 4px 0 28px; font: 14px/1.5 Georgia, serif; color: #54584c; }
.archive-banner a { color: inherit; text-decoration: none; }
.archive-banner small { display: block; font: 11px/1.7 Arial, sans-serif; }
.sunset { padding: 8px 0 24px; }
.sunset .eyebrow { font: 11px Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #79816a; }
.sunset h1 { font-size: 31px; line-height: 1.25; font-weight: normal; }
.sunset .last-line { font: italic 19px/1.6 Georgia, serif; color: #59634b; margin: 28px 0; }
.sunset p { max-width: 44ch; }
.sidebar-sunset { border-top: 1px solid #ccc; margin-top: 32px; font: 14px/1.6 Georgia, serif; }
.archive-counts, .small-note { font: 12px/1.6 Arial, sans-serif; color: #777; }
#search-form label { display: block; font: bold 17px Georgia, serif; }
#searchbox { box-sizing: border-box; width: 100%; margin: 12px 0 8px; padding: 7px; border: 1px solid #aaa; border-radius: 5px; }
button { font: inherit; cursor: pointer; }
#search-form button { border: 1px solid #aaa; border-radius: 3px; background: #fff; padding: 4px 12px; }
#recentstoreeslist a, #recentinspirationlist a { display: block; font-size: 13px; margin-bottom: 7px; text-decoration: none; }
#youbar h4 { margin-top: 28px; margin-bottom: 12px; }
#youbar h4:first-child { margin-top: 0; }
.cover-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 20px 0; }
.cover-grid a.storee { position: relative; display: flex; padding: 0; margin: 0; height: 200px; border: 1px solid #aaa; background: linear-gradient(130deg, #ddd, #858585); text-decoration: none; color: #fff; box-shadow: 2px 2px 5px #0003; overflow: hidden; }
.book-cover { width: 100%; display: flex; flex-direction: column; justify-content: space-between; background-repeat: repeat; }
.book-author { padding: 8px; font: 11px/1.3 Arial, sans-serif; color: #222; background: #ffffffb0; overflow-wrap: anywhere; }
.book-title { padding: 12px 8px; font: bold 19px/1.25 Georgia, serif; background: #0005; border-bottom: 4px solid var(--accent); text-shadow: 0 1px 2px #000; overflow-wrap: anywhere; }
.cover-grid a:hover, .cover-grid a:focus-visible { transform: translateY(-3px); outline: 2px solid #667651; outline-offset: 2px; }
.reading-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; clear: both; }
.reading-links a { border: 1px solid #ccc; border-bottom: 3px solid #8b9a7d; text-decoration: none; padding: 8px 10px; background: #fff; font: 13px Arial, sans-serif; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.filters a { border: 1px solid #ddd; padding: 5px 8px; background: #fafafa; text-decoration: none; }
.filters a.active { background: #59634b; color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0; font: 13px Arial, sans-serif; }
.pager a { padding: 8px 12px; border: 1px solid #ccc; text-decoration: none; }
.story-byline { font: 15px/1.5 Georgia, serif; color: #555; margin-bottom: 24px; }
.story-byline img { width: 48px; height: 48px !important; border-radius: 2px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.story-body { font: 17px/1.7 Georgia, serif; color: #333; clear: both; }
.story-body p { margin: 0 0 1em; }
.poem-plain { white-space: pre-wrap; }
.story-meta { color: #777; font: 12px/1.6 Arial, sans-serif; border-top: 1px solid #ddd; padding-top: 12px; margin-top: 28px; }
.story-actions { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 10px 0; margin: 18px 0 30px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.comment { padding: 15px 0; border-bottom: 1px solid #e5e5e5; font-size: 14px; }
.comment-body { line-height: 1.6; }
.comment footer { font-size: 11px; color: #777; margin-top: 8px; }
.author-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.author-card { border: 1px solid #ddd; padding: 8px; display: flex; gap: 10px; text-decoration: none; align-items: center; }
.author-card img { width: 48px; height: 48px !important; object-fit: cover; }
.author-card small { display: block; color: #888; }
.author-heading { display: flex; gap: 20px; align-items: center; margin: 12px 0 24px; }
.author-heading img { width: 100px; height: 100px !important; object-fit: cover; }
.loading { color: #777; font-style: italic; }
#footer { line-height: 1.8; clear: both; border-top: 1px solid #ddd; margin-top: 48px; padding-top: 16px; font-size: 11px; }
@media (max-width: 1000px) {
  #container { width: 100%; }
  #menu { width: 120px; }
  #pages { margin-left: 120px; }
  #page1 { padding-left: 32px; }
  #youbar { width: 220px; padding: 64px 22px; }
}
@media (max-width: 760px) {
  #menu { position: relative; width: 100%; height: auto; }
  #menucontent { padding: 0; display: flex; overflow-x: auto; }
  #menu a:link, #menu a:visited { box-sizing: border-box; width: auto; height: auto; padding: 16px 12px; margin: 0; background: none; white-space: nowrap; font-size: 14px; }
  #pages { margin: 0; display: block; }
  #page1 { width: 100%; padding: 30px 22px; }
  #youbar { width: 100%; padding: 24px 22px; }
  .brand { margin-top: 0; }
  .cover-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .cover-grid a.storee { height: 180px; }
  .book-title { font-size: 16px; }
  .story-body { font-size: 17px; }
  .author-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 380px) {
  .cover-grid, .author-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media print {
  body.dark { background: #fff; }
  #menu, #youbar, #userinfo, .brand, .archive-banner, #footer, .story-actions, .reading-links, #comments { display: none !important; }
  #container, #pages, #page1 { margin: 0; padding: 0; width: auto; display: block; }
  .story-body { font-size: 12pt; }
}
