/* Shared styles for the pages around the directory (what-is-banana-dog,
   submit, tool-notes, random-weird-website, memorial).
   The directory itself (index.html) keeps its own inline styles. */
@font-face {
  font-family: 'Luckiest Guy';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/luckiest-guy-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/vt323-latin.woff2') format('woff2');
}
body {
  background: #f6e8cd;
  color: #222;
  font-family: 'VT323', monospace;
  margin: 0;
  padding: 2rem;
}
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.site-name {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.6rem;
  margin: 0 0 1.5rem;
}
.site-name a {
  color: #222;
  text-decoration: none;
}
.site-name a:hover {
  color: #9e4f00;
}
h1 {
  font-family: 'Luckiest Guy', cursive;
  font-weight: 400;
  font-size: 3rem;
  margin: 0 0 0.5rem;
}
/* Second half of a long heading, shown small under the big word. It stays
   inside the h1 so the heading still reads as one sentence to search engines. */
h1 .h1-sub {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  margin-top: 0.5rem;
}
.tagline {
  font-size: 1.5rem;
  margin: 0.5rem auto 0;
  max-width: 700px;
}
.content {
  max-width: 800px;
  margin: 0 auto;
}
.card {
  background: white;
  border: 3px dashed #f39c12;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.card h2 {
  font-family: 'Luckiest Guy', cursive;
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0.3rem 0 0.8rem;
  overflow-wrap: break-word;
}
.card h2 a {
  color: #222;
  text-decoration: none;
}
.card h2 a:hover {
  color: #9e4f00;
}
.card p,
.card li {
  font-size: 1.3rem;
  line-height: 1.4;
  color: #444;
}
.card p {
  margin: 0 0 1rem;
}
.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}
.card ul,
.card ol {
  margin: 0 0 1rem;
  padding-left: 1.6rem;
}
.card li {
  margin-bottom: 0.3rem;
}
/* Lists whose items start with their own emoji instead of a bullet. */
.card ul.emoji-list {
  list-style: none;
  padding-left: 0.3rem;
}
.card a {
  color: #9e4f00;
}
.tool-category {
  display: inline-block;
  background: #f39c12;
  color: #222;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 1rem;
  text-transform: uppercase;
}
code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75em;
  background: #fdf3df;
  border-radius: 4px;
  padding: 0.1em 0.3em;
}
pre {
  background: #fdf3df;
  border: 2px dashed #f39c12;
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre code {
  font-size: 0.9rem;
  line-height: 1.5;
  background: none;
  padding: 0;
}
/* Randomizer page: one big button and the tool it picked. */
.roll-card {
  text-align: center;
}
.big-button {
  display: inline-block;
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.6rem;
  line-height: 1.2;
  color: #222;
  background: #f39c12;
  border: 3px solid #222;
  border-radius: 12px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  /* A tool name is often one long word (a domain); let it wrap inside the
     button instead of pushing the button out of its card. */
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.card a.big-button {
  color: #222;
}
.big-button:hover:not(:disabled) {
  background: #ffb53e;
}
.big-button:disabled {
  opacity: 0.5;
  cursor: default;
}
.big-button:focus-visible {
  outline: 3px solid #9e4f00;
  outline-offset: 3px;
}
.roll-result {
  border-top: 3px dashed #f39c12;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.card .roll-note {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #666;
}
/* Memorial page: the emoji archive as a grid of tiles. */
.content-wide {
  max-width: 1100px;
}
.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 1.2rem 0.6rem;
}
.img-box {
  text-align: center;
}
.img-box img {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.3rem;
  object-fit: contain;
}
.img-box .label {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
  color: #444;
  /* A name too long for its tile splits into two even lines, so the closing
     colon is never left alone on the second one. Balancing needs break
     points between letters, which break-all gives and overflow-wrap does not. */
  word-break: break-all;
  text-wrap: balance;
}
footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 1.2rem;
}
footer a {
  color: #9e4f00;
  text-decoration: none;
}
/* Footer links sit in three groups. A wide screen shows them on one line with
   a separator dot between the groups; a narrow one stacks the groups and drops
   those dots, so a dot is never left hanging at the end of a line. */
footer .grp {
  display: inline-block;
  white-space: nowrap;
}
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .card {
    padding: 1.2rem 1.2rem;
  }
  .img-gallery {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem 0.5rem;
  }
}
/* The seven footer links need about 900px to sit on one line. */
@media (max-width: 960px) {
  footer .grp {
    display: block;
    /* Stacked groups may wrap: before the web font loads the fallback font is
       wider, and a group forced onto one line would push the page sideways. */
    white-space: normal;
  }
  footer .sep-wide {
    display: none;
  }
}
