/* foobs.net: the 2010 look (cream page, foobs purple, serif banners, reflected picture), rebuilt responsive. */
:root {
  --purple: #461B7E;
  --purple-soft: #efe8f8;
  --purple-line: #d9cdea;
  --ink: #3b2c54;
  --muted: #7a6f8c;
  --page: #fffffc;
  --card: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 18px 16px 40px;
  background: var(--page); color: var(--ink);
  font: 15px/1.5 Verdana, Arial, Helvetica, sans-serif;
}
a { color: var(--purple); }
img { max-width: 100%; height: auto; }

/* masthead: arrow | logo | arrow */
.masthead {
  max-width: 780px; margin: 0 auto 12px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.masthead > :first-child { justify-self: center; }
.masthead > :last-child { justify-self: center; }
.logo img { display: block; height: 64px; width: auto; }
.arrow img { display: block; border-radius: 50%; transition: transform .15s; }
.arrow:hover img { transform: scale(1.12); }
.end { color: var(--purple); font-weight: bold; }

.notice {
  max-width: 560px; margin: 0 auto 16px; padding: 10px 14px; text-align: center;
  background: var(--purple-soft); border: 1px solid var(--purple-line); border-radius: 8px; color: var(--purple);
}

/* three columns: tags | picture | random */
.layout {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 180px; gap: 24px; align-items: start;
}
.banner {
  margin: 0 0 8px; text-align: center; color: var(--purple);
  font: 600 1.9rem/1.1 Garamond, "EB Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  letter-spacing: .01em;
}
.banner.small { font-size: 1.45rem; white-space: nowrap; }
.when, .filter { text-align: center; margin: -2px 0 10px; color: var(--muted); font-size: .9rem; }

.feature { text-align: center; }
.feature figure { margin: 6px 0 0; }
.zoom { padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img {
  width: 410px; display: block; border-radius: 4px;
  box-shadow: 0 6px 24px rgba(70, 27, 126, .18);
}
.reflect { -webkit-box-reflect: below 3px linear-gradient(transparent 80%, rgba(255, 255, 255, .34)); }
/* the reflection is drawn outside the layout box, so leave room for it where browsers draw it */
@supports (-webkit-box-reflect: below) { .feature figure { padding-bottom: clamp(60px, 22vw, 118px); } }

/* tags */
.tags h3 {
  margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--purple);
  border-bottom: 1px solid var(--purple-line); padding-bottom: 4px;
}
.chips { margin: 0 0 22px; line-height: 2; }
@media (min-width: 861px) { .cloud { max-height: 560px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--purple-line) transparent; } }
.chip {
  display: inline-block; padding: 0 9px; margin: 0 2px 2px 0; border-radius: 999px;
  background: var(--purple-soft); color: var(--purple); text-decoration: none; font-size: .82rem; line-height: 1.7;
  border: 1px solid transparent;
}
.chip small { color: var(--muted); font-size: .72rem; }
.chip:hover, .chip.on { background: var(--purple); color: #fff; }
.chip:hover small, .chip.on small { color: #e6dcf5; }
.muted { color: var(--muted); }

/* random foobs and tag results */
.random { display: grid; gap: 14px; justify-items: center; }
.tile { display: block; border-radius: 6px; overflow: hidden; background: var(--card); box-shadow: 0 2px 10px rgba(70, 27, 126, .14); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(70, 27, 126, .22); }
.tile img { display: block; width: 100%; }
.random .tile { width: 150px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; text-align: left; }

/* last updated | e-mail | upload */
.footer-row {
  max-width: 900px; margin: 34px auto 0; padding-top: 18px; border-top: 1px solid var(--purple-line);
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center;
}
.updated { text-align: center; color: var(--purple); font: 600 1.15rem Garamond, "EB Garamond", Georgia, serif; }
.updated strong { white-space: nowrap; }
.mail img { display: block; transition: transform .15s; }
.mail:hover img { transform: rotate(-6deg) scale(1.05); }
.upload { display: grid; gap: 6px; justify-items: center; text-align: center; }
.upload .pick { font-size: .85rem; color: var(--purple); }
.upload input[type=file] { display: block; margin-top: 4px; max-width: 230px; font-size: .8rem; }
.upload button, .copy, dialog .close {
  font: bold .85rem Verdana, Arial, sans-serif; color: #fff; background: var(--purple);
  border: 0; border-radius: 6px; padding: 6px 18px; cursor: pointer;
}
.upload button:hover, .copy:hover, dialog .close:hover { background: #5b2a9e; }
.copy { padding: 3px 10px; font-size: .75rem; margin-left: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.share { text-align: center; color: var(--purple); font-size: .85rem; margin-top: 26px; }

/* enlarged picture */
dialog#zoombox {
  border: 0; padding: 14px; border-radius: 10px; max-width: 96vw; max-height: 96vh; background: var(--page);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); text-align: center;
}
dialog#zoombox::backdrop { background: rgba(35, 12, 66, .72); }
dialog#zoombox img { display: block; max-width: 92vw; max-height: 84vh; width: auto; margin: 0 auto; border-radius: 4px; }
dialog#zoombox p { margin: 10px 0 0; font-size: .85rem; overflow-wrap: anywhere; }

/* phones and narrow windows: picture first, then random foobs, then tags */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .feature { order: 1; }
  .random { order: 2; grid-template-columns: repeat(2, minmax(0, 150px)); justify-content: center; }
  .random .banner { grid-column: 1 / -1; }
  .random .tile { width: auto; }
  .tags { order: 3; }
  .zoom img { width: 100%; max-width: 410px; }
  .footer-row { grid-template-columns: minmax(0, 1fr); justify-items: center; }
}
@media (max-width: 420px) {
  .logo img { height: 48px; }
  .masthead { gap: 6px; }
  .banner { font-size: 1.6rem; }
}
