.daily {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 19px;
  margin-top: 22px;
  padding: 19px 25px;
  border: 1px solid #e7dfc5;
  border-radius: 13px;
  background: #f3eedc;
}

.daily-sun {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #ebdfb7;
  color: #715219;
  font: 24px/1 Georgia, serif;
}

.daily-heading { display: flex; align-items: baseline; gap: 12px; }
.daily-heading h2 { font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: .06em; }
.daily-heading time { color: #746443; font-size: 12px; }
.daily blockquote { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(17px, 2vw, 22px); font-weight: 700; line-height: 1.55; }
.daily-next { color: #624e28; border-color: #d7c8a4; background: #fbf7e9; white-space: nowrap; }
.daily-next:hover { background: #fffdf5; border-color: #aa9461; }

.family-preview {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(22px, 5vw, 64px);
  margin-top: 30px;
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid #e4e0d2;
  border-radius: 18px;
  background: linear-gradient(110deg, #f6f0e1, #f7f6ef 63%, #ebf0e9);
}

.family-preview h2 { letter-spacing: .035em; }
.story-title-part { display: inline-block; white-space: nowrap; }
.family-preview-copy p { max-width: 36em; margin: 13px 0 21px; color: var(--muted); }
.family-preview-portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.portrait-link { display: grid; justify-items: center; min-width: 0; padding: 8px 8px 12px; border: 1px solid #e4ded0; border-radius: 13px; background: var(--card); box-shadow: 0 4px 14px #493f2310; }
.portrait-link:hover { border-color: #9caf91; }
.portrait-link img { width: 100%; max-height: 184px; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #f6f1e5; }
.portrait-link strong { margin-top: 7px; font-size: 16px; }
.portrait-link > span { color: var(--muted); font-size: 12px; }

.family-intro { margin-top: 27px; padding: 38px clamp(22px, 6vw, 82px) 48px; border: 1px solid #e4e0d2; border-radius: 19px; background: linear-gradient(112deg, #f4ead7, #faf7ed 52%, #e9efe8); }
.story-back { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--forest); font-size: 14px; }
.story-back:hover { text-decoration: underline; }
.family-intro h1 { margin: 16px 0 13px; font-family: var(--serif); font-size: clamp(36px, 6vw, 75px); line-height: 1.19; letter-spacing: .035em; }
.family-intro p { max-width: 43em; color: var(--muted); font-size: clamp(15px, 2vw, 18px); }
.family-intro p + p { margin-top: 9px; }
.profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block: 23px 53px; }
.profile { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 15px; border: 1px solid #e6ddcb; border-radius: 15px; scroll-margin-top: 20px; background: #f9f2e4; }
.profile-dolphin { border-color: #dce5dc; background: #eef3ec; }
.profile:target { outline: 2px solid #718952; outline-offset: 3px; }
.profile img { width: 100%; height: auto; border-radius: 10px; }
.profile-copy { padding: 4px; }
.profile h2 { font-size: clamp(24px, 2.6vw, 36px); letter-spacing: .04em; }
.profile-role { margin-top: 3px; color: var(--muted); font-size: 14px; }
.profile dl { margin: 13px 0; font-size: 14px; }
.profile dl > div { margin-top: 5px; }
.profile dt, .profile dd { margin: 0; }
.profile dt { color: var(--muted); font-size: 12px; }
.profile blockquote { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 700; }
.story-section { margin-bottom: 55px; }
.moments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.moment { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.moment-character { margin-bottom: 4px; color: #546747; font-size: 13px; font-weight: 700; }
.moment h3 { margin-bottom: 8px; font-family: var(--serif); font-size: 23px; line-height: 1.3; }
.moment > p:last-child { color: var(--muted); font-size: 15px; }

.playground { margin-top: 54px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.game-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; min-width: 0; min-height: 110px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); text-align: left; transition: background-color .18s, border-color .18s; }
.game-card:hover { background: #fff; border-color: #9caf91; }
.game-card-copy { display: grid; gap: 3px; }
.game-card-copy strong { font-size: 17px; }
.game-card-copy > span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.game-card-arrow { color: #57714f; }
.game-illustration { display: grid; grid-template-columns: repeat(2, 1fr); width: 59px; aspect-ratio: 1; padding: 6px; gap: 3px; border-radius: 9px; background: #f2e7cc; }
.game-illustration span { display: grid; place-items: center; border-radius: 3px; background: #fdf5de; color: #674f25; font: 700 10px/1 system-ui, sans-serif; }
.tiles-illustration span:nth-child(n+3) { background: #dfca8e; }
.memory-illustration { background: #e8eddf; }
.memory-illustration span { background: #cfdcc3; color: #385637; }
.noughts-illustration { grid-template-columns: repeat(3, 1fr); background: #e3eced; }
.noughts-illustration span { background: #f5fbfa; color: #2b545b; font-size: 11px; }

.game { --board-width: 310px; }
.game-hud { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 13px; }
.game-score, .game-status { color: var(--forest); font-size: 14px; }
.game-reset { min-height: 39px; padding: 7px 12px; border-color: #c9d4c2; background: var(--sage); }
.game-reset:hover { background: #dde8d7; }
.game > .game-status { min-height: 23px; margin-top: 10px; text-align: center; }
.tiles-board, .memory-board, .noughts-board { display: grid; width: min(100%, var(--board-width)); margin-inline: auto; gap: 6px; padding: 8px; border-radius: 11px; background: #d8dfd0; }
.tiles-board, .memory-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-board { touch-action: none; user-select: none; }
.tiles-board > span, .memory-board > button, .noughts-board > button {
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #ecf0e7;
  color: var(--forest);
  font: 750 clamp(16px, 5vw, 25px)/1 system-ui, sans-serif;
}
.tiles-board [data-level="1"] { background: #f8f2de; }
.tiles-board [data-level="2"] { background: #eddfb8; }
.tiles-board [data-level="3"] { background: #e4cc8e; }
.tiles-board [data-level="4"] { background: #d8bd73; color: #352908; }
.tiles-board [data-level="5"], .tiles-board [data-level="6"] { background: #afbd8e; color: #202c15; }
.tiles-board [data-level="7"], .tiles-board [data-level="8"] { background: #657b52; color: #fffdf5; }
.tiles-board [data-level="9"], .tiles-board [data-level="10"] { background: #456648; color: #fffdf5; }
.tiles-board [data-level="11"] { background: #234b36; color: #fffdf5; font-size: clamp(13px, 4vw, 20px); }
.move-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.move-buttons button { min-width: 44px; min-height: 44px; border: 1px solid #c9d4c2; border-radius: 7px; background: var(--sage); font-size: 19px; line-height: 1; }
.move-buttons button:hover { background: #dde8d7; }
.memory-board button[data-face="hidden"] { background: #f9f5e8; color: #576d48; }
.memory-board button[data-face="hidden"]:hover:not([aria-disabled="true"]) { background: #fffdf4; }
.memory-board button[data-face="open"] { background: #fffdf7; }
.memory-board button[data-face="matched"] { background: #bfcfb4; }
.noughts-board { --board-width: 267px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.noughts-board > button { background: #fffef7; font-size: clamp(26px, 8vw, 45px); }
.noughts-board button[data-mark="○"] { color: #366371; }
.noughts-board button[data-winner] { background: #c7d8bd; }
.noughts-board button:hover:not([aria-disabled="true"]) { background: #f0f4e9; }
.game [aria-disabled="true"] { cursor: default; }

@media (max-width: 900px) {
  .nav { gap: 14px; }
  .profile { grid-template-columns: 1fr; }
  .profile img { width: min(100%, 230px); margin-inline: auto; }
  .game-card { grid-template-columns: 1fr auto; gap: 7px 11px; }
  .game-illustration { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .nav { gap: 7px; }
  .daily { grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; padding: 13px; margin-top: 15px; }
  .daily-sun { width: 36px; align-self: start; font-size: 19px; }
  .daily-next { grid-column: 2; justify-self: start; min-height: 41px; }
  .family-preview { grid-template-columns: 1fr; margin-top: 20px; }
  .family-preview-copy p { font-size: 15px; }
  .family-intro { margin-top: 15px; padding-block: 16px 27px; }
  .profiles { gap: 9px; margin-block: 17px 39px; }
  .profile { align-content: start; padding: 8px; gap: 8px; }
  .profile-copy { padding: 4px 2px; }
  .profile dl { font-size: 13px; }
  .profile blockquote { font-size: 15px; }
  .moments, .game-grid { grid-template-columns: 1fr; gap: 10px; }
  .moment { padding: 17px; }
  .playground { margin-top: 33px; }
  .game-card { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 80px; padding: 10px 13px; }
  .game-illustration { grid-column: auto; }
}

@media (max-width: 385px) {
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; justify-items: start; }
}
