/* あそびば トップページの見た目。時間帯（朝・昼・夕方・夜）は html[data-time] で変わる。 */
*, *::before, *::after { box-sizing: border-box; }

html[data-time="morning"] { --bg: #fcf1dc; --ink: #2a2f45; --sub: #6b5a3e; --box: rgba(255, 255, 255, .75); --edge: #74bb62; }
html[data-time="day"]     { --bg: #e9f6e3; --ink: #1f2a3a; --sub: #44664a; --box: rgba(255, 255, 255, .8);  --edge: #6bba55; }
html[data-time="evening"] { --bg: #fbe4d8; --ink: #3a2438; --sub: #87475a; --box: rgba(255, 255, 255, .75); --edge: #5a844a; }
html[data-time="night"]   { --bg: #10182f; --ink: #eef2ff; --sub: #b4bfdf; --box: rgba(255, 255, 255, .09); --edge: #18302a; }

html, body { margin: 0; padding: 0; }
html { background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

/* ---------- 上の景色と名前 ---------- */
.hero {
  position: relative;
  border-bottom: 4px solid var(--edge);
}

.scene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #3fa9f5;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.title {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 4%);
  margin: 0;
  padding-left: .1em; /* 字の間のぶん、まん中にそろえる */
  text-align: center;
  font-size: clamp(40px, 12.5vw, 60px);
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1.15;
  color: #fff;
  text-shadow:
    0 3px 0 #23304f, 3px 0 0 #23304f, -3px 0 0 #23304f, 0 -3px 0 #23304f,
    2px 2px 0 #23304f, -2px 2px 0 #23304f, 2px -2px 0 #23304f, -2px -2px 0 #23304f,
    0 7px 0 rgba(10, 20, 40, .35);
  pointer-events: none;
}

.lead {
  margin: 16px 20px 4px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--sub);
}

/* ---------- 部屋の札 ---------- */
.rooms {
  display: grid;
  gap: 16px;
  padding: 14px 16px 10px;
}

.room {
  --accent: #ff8a3d;
  --accent-soft: #fff0e2;
  --accent-dark: #c4501a;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 14px 16px 14px 14px;
  border: 3px solid var(--accent);
  border-radius: 22px;
  background: #fff;
  color: #1f2533;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--accent-dark), 0 10px 20px rgba(0, 0, 0, .12);
  transition: transform .08s ease, box-shadow .08s ease;
}
.room:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--accent-dark), 0 4px 10px rgba(0, 0, 0, .12);
}
.room:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.room.fish { --accent: #3a9bea; --accent-soft: #e4f3ff; --accent-dark: #1d5fa8; }

.room-icon {
  flex: none;
  width: 60px;
  height: 60px;
  padding: 6px;
  border-radius: 16px;
  background: var(--accent-soft);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.room-text { flex: 1; min-width: 0; }

.room-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .04em;
}

.room-note {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #5a6478;
}

.tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.room-go {
  flex: none;
  width: 14px;
  height: 22px;
  color: var(--accent);
}

/* ---------- ホーム画面に置くには ---------- */
.howto {
  margin: 14px 16px 0;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--box);
}
.howto summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.howto[open] summary::before { transform: rotate(45deg); }
.howto ul { margin: 0 0 14px; padding-left: 1.2em; }
.howto li { margin: 0 0 8px; font-size: 14px; line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
  .room, .howto summary::before { transition: none; }
}
