/* Doodle Arcade home page: one card ("cabinet") per game, and a code box.
   The sketchbook look itself comes from shared/style.css. */

.hub {
  min-height: 100vh;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px 48px;
}
.hub .tagline { margin-bottom: 8px; font-size: clamp(22px, 3.4vw, 28px); }

/* ---------- what this is: a sticky note and three steps ---------- */
.about {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px 34px;
  align-items: center;
  margin: 14px 0 26px;
}
.note {
  position: relative;
  background: #fff3a6;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--sketch-2);
  box-shadow: var(--shadow);
  padding: 22px 24px 18px;
  transform: rotate(-1deg);
}
/* a strip of tape holding the note to the page */
.note::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  width: 116px;
  height: 28px;
  background: rgba(183, 156, 255, .6);
  border: 2px solid rgba(31, 29, 43, .18);
  transform: translateX(-50%) rotate(-3deg);
}
.note h2 { font-family: 'Gochi Hand', cursive; font-size: 30px; font-weight: 400; line-height: 1.1; margin: 0 0 8px; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }
.note b { font-weight: 600; background: linear-gradient(transparent 58%, rgba(255, 122, 162, .45) 58%); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.steps li:nth-child(2) .step { background: var(--blue); transform: rotate(5deg); }
.steps li:nth-child(3) .step { background: var(--green); }
.steps .step { flex: none; width: 40px; height: 40px; font-size: 20px; font-weight: 600; color: var(--ink); margin: 0; }
.steps b { color: var(--ink); font-weight: 600; }

.hello {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 18px;
  background: #fff;
  border: var(--stroke) dashed var(--line);
  border-radius: 999px;
  padding: 2px 16px 2px 6px;
}
.hello .avatar { width: 34px; height: 37px; }

.cabinets {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 10px;
}

.cabinet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s, box-shadow .12s;
}
.cabinet:nth-child(odd) { transform: rotate(-.7deg); }
.cabinet:nth-child(even) { transform: rotate(.7deg); }
a.cabinet:hover { transform: translate(-2px, -4px) rotate(-1deg); box-shadow: 6px 7px 0 var(--ink); }
a.cabinet:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
a.cabinet:focus-visible { outline: 3px dashed var(--purple); outline-offset: 5px; }
.cabinet h2 { font-family: 'Gochi Hand', cursive; font-size: 36px; font-weight: 400; line-height: 1; margin: 6px 0 0; }
.cabinet p { margin: 0; color: var(--muted); flex: 1; }

.cabinet-art {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: repeating-linear-gradient(#fff, #fff 23px, #dbe9f6 23px, #dbe9f6 25px);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-2);
}
.cabinet-art svg { position: absolute; inset: 4px 0 0; width: 100%; height: calc(100% - 4px); }
.cabinet-art .avatar-full { position: absolute; }

.cabinet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.cabinet-foot .meta { font-weight: 500; font-size: 15px; }
.cabinet-foot .btn { pointer-events: none; }

/* a sticker on a game's card, like "New!" */
.sticker {
  position: absolute;
  top: -16px;
  right: -12px;
  z-index: 1;
  font-family: 'Gochi Hand', cursive;
  font-size: 22px;
  line-height: 1;
  background: var(--pink);
  border: var(--stroke) solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-tiny);
  padding: 6px 12px 4px;
  transform: rotate(8deg);
  animation: sticker-wiggle 3s ease-in-out infinite;
}
@keyframes sticker-wiggle {
  0%, 80%, 100% { transform: rotate(8deg); }
  86% { transform: rotate(-2deg) scale(1.1); }
  93% { transform: rotate(12deg) scale(1.05); }
}

.cabinet.soon {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: transparent;
  border: var(--stroke) dashed var(--line);
  border-radius: var(--sketch);
  color: var(--muted);
  transition: transform .12s, border-color .12s, background .12s;
}
.cabinet.soon h2 { color: var(--muted); }
a.cabinet.soon:hover { box-shadow: none; border-color: var(--ink); background: rgba(255, 253, 246, .7); }
a.cabinet.soon:hover h2, a.cabinet.soon:hover .soon-mark { color: var(--ink); border-color: var(--ink); }
a.cabinet.soon:active { box-shadow: none; }
.soon-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  font-family: 'Gochi Hand', cursive;
  font-size: 48px;
  border: var(--stroke) dashed var(--line);
  border-radius: 50%;
}

/* ---------- below the games: room code and feedback, next to the news ---------- */
.hub-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 26px;
  align-items: start;
  margin-top: 36px;
}
.hub-side { display: flex; flex-direction: column; gap: 26px; }
.hub-grid .sub { margin: -4px 0 12px; }

.join-box { transform: rotate(-.5deg); }
.join-box .status { margin-top: 10px; }
.join-box .join-row input { flex: 1; min-width: 0; }

.feedback { transform: rotate(.4deg); }
.mail-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.mail-row .btn { color: var(--ink); text-decoration: none; }
.mail-copy {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 4px 10px;
}
.mail-copy:hover { color: var(--ink); border-color: var(--ink); }

/* the update feed */
.news { transform: rotate(-.3deg); }
.news h2 { font-family: 'Gochi Hand', cursive; font-size: 32px; font-weight: 400; line-height: 1; }
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.news-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 2px dashed var(--line); }
#news li:first-child { border-top: 0; padding-top: 2px; }
.news-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 22px;
  background: #fff;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--sketch-2);
}
.news-list li:nth-child(3n + 1) .news-icon { background: #fff7d6; }
.news-list li:nth-child(3n + 2) .news-icon { background: #e3f4fd; }
.news-list li:nth-child(3n) .news-icon { background: #ffe6ee; }
.news-list b { display: block; font-weight: 600; line-height: 1.25; }
.news-list p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.news-meta time { font-weight: 600; }
.news-game { font-weight: 600; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; text-decoration: none; }
a.news-game:hover { background: var(--yellow); }
.news-game.all { border-style: dashed; border-color: var(--line); color: var(--muted); }
.news-new { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; background: var(--pink); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; transform: rotate(-4deg); }

.news-more { border-top: 2px dashed var(--line); }
.news-more > summary { cursor: pointer; padding: 10px 0 2px; font-weight: 600; color: var(--muted); list-style: none; }
.news-more > summary::-webkit-details-marker { display: none; }
.news-more > summary::before { content: '▸ '; display: inline-block; transition: transform .15s; }
.news-more[open] > summary::before { transform: rotate(90deg); }
.news-more > summary:hover { color: var(--ink); }
.news-more > summary:focus-visible { outline: 3px dashed var(--purple); outline-offset: 3px; }
.news-more .news-list li:first-child { border-top: 0; }

.hub-foot { margin-top: 34px; font-family: 'Gochi Hand', cursive; font-size: 21px; color: var(--muted); text-align: center; transform: rotate(-1deg); }
.hub-legal { display: block; margin-top: 6px; font-family: 'Fredoka', system-ui, sans-serif; font-size: 14px; color: var(--muted); }

@media (max-width: 960px) {
  .cabinets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cabinets { grid-template-columns: 1fr; }
  .cabinet.soon { min-height: 180px; }
  .note { padding: 20px 18px 16px; }
}
