/* Hanayaka Games site: Ivory Paper, as in the game. */
:root {
  color-scheme: light;
  --paper: #E9E4D9;
  --ink: #333333;
  --soft: rgba(51, 51, 51, .7);
  --line: rgba(51, 51, 51, .2);
  --chestnut: #6A4028;
  --card: rgba(255, 255, 255, .45);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}
a { color: var(--chestnut); }
main { max-width: 40em; margin: 0 auto; padding: 32px 16px 24px; }
h1 { font-size: 1.6em; font-weight: normal; margin: 0 0 .2em; }
h2 { font-size: 1.15em; margin: 1.6em 0 .4em; }
p, li { margin: .4em 0; }
.date { color: var(--soft); margin-bottom: 1.5em; }
.back { display: inline-block; margin-bottom: 1.5em; text-decoration: none; }
footer {
  max-width: 40em;
  margin: 0 auto;
  padding: 16px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: .9em;
  text-align: center;
}
footer a { color: inherit; }

/* Home page */
.studio { text-align: center; padding-top: 6vh; }
.studio canvas { display: block; margin: 0 auto; width: 200px; }
.studio .name { color: var(--chestnut); font-size: 1.9em; margin: .5em 0 .1em; font-weight: normal; }
.studio .motto { color: var(--soft); margin: 0 0 2.5em; }
.game {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-radius: 16px;
  background: var(--card);
}
.game h2 { margin: 0; font-size: 1.35em; font-weight: normal; }
.game .tag { color: var(--soft); font-style: italic; margin: 0 0 .5em; }
.game .links { margin: .6em 0 0; font-size: .95em; }
.game .links a { margin-right: 1em; }
.soon { color: var(--soft); }

/* Shokudoku's emblem: nine color tiles */
.tiles {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 26px);
  gap: 4px;
}
.tiles i {
  height: 26px;
  border-radius: 6px;
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, .35), inset -1.5px -1.5px 0 rgba(0, 0, 0, .18);
}
/* Screenshots: thumbnails in a row (sideways scrolling on narrow
   screens); each opens in the pop-up viewer, fitted to the screen. */
.shots {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 16px 32px;
  overflow-x: auto;
}
.shots a { flex: none; }
.shots img {
  display: block;
  height: 220px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(51, 51, 51, .2);
  transition: transform .15s;
}
.shots a:hover img { transform: translateY(-3px); }
@media (max-width: 1040px) {
  .shots { justify-content: flex-start; }
  .shots img { height: 200px; }
}

.viewer {
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.viewer::backdrop { background: rgba(30, 28, 25, .85); }
.viewer img {
  max-width: calc(100vw - 112px);
  max-height: calc(100dvh - 90px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .4);
  touch-action: pan-y;
  user-select: none;
}
.viewer .caption { color: #F0EDE6; margin: 12px 16px 0; text-align: center; font-size: .95em; }
.viewer button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font: 32px/1 Georgia, serif;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.viewer button:hover { background: rgba(255, 255, 255, .3); }
.viewer .close { top: 12px; right: 12px; }
.viewer .prev { left: 12px; top: 50%; translate: 0 -50%; }
.viewer .next { right: 12px; top: 50%; translate: 0 -50%; }
@media (max-width: 600px) {
  .viewer img { max-width: calc(100vw - 24px); max-height: calc(100dvh - 120px); }
  .viewer .caption { min-height: 44px; padding: 0 48px; font-size: .85em; }
  .viewer .prev, .viewer .next { top: auto; bottom: 12px; translate: none; }
}

@media (max-width: 420px) {
  .game { flex-direction: column; text-align: center; }
}
