:root {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  color: #25221f;
  background: #f7f1df;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: #f7f1df;
  background-image: radial-gradient(#201e1b19 1px, transparent 1px);
  background-size: 18px 18px;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app {
  width: min(100%, 560px);
  margin: auto;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.header { position: relative; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eyebrow, .issue { font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.eyebrow { background: #24211e; color: #fff; padding: 7px 9px; border-radius: 3px; transform: rotate(-2deg); }
.issue { white-space: nowrap; color: #5d5550; }
.title-wrap { position: relative; margin: 14px 0 8px; }
h1 {
  margin: 0;
  font-family: Impact, "Arial Black", -apple-system, sans-serif;
  font-size: clamp(53px, 15vw, 88px);
  line-height: .82;
  letter-spacing: -.04em;
  transform: rotate(-2deg);
  text-shadow: 4px 4px 0 #ef775e;
}
h1 span { color: #7046d7; text-shadow: 4px 4px 0 #24211e; }
.title-sticker {
  position: absolute;
  right: 4px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  background: #ffdb5f;
  border: 3px solid #25221f;
  border-radius: 50%;
  box-shadow: 4px 4px 0 #25221f;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 19px;
  line-height: .85;
  text-align: center;
  transform: rotate(16deg);
}
.intro { margin: 16px 0 0; font-size: 13px; font-weight: 800; }
.intro mark { color: inherit; background: #ffdb5f; padding: 2px 5px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 24px 0 14px;
  padding: 9px 10px;
  min-height: 56px;
  background: #24211e;
  border: 3px solid #24211e;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #b6a7dd;
  color: white;
}
.now-playing { display: flex; align-items: center; gap: 9px; min-width: 0; }
.now-playing > div { display: flex; flex-direction: column; min-width: 0; }
.now-playing small { color: #bda4fc; font-size: 8px; font-weight: 900; letter-spacing: .17em; }
#status { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 800; }
.live-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #ff694f; box-shadow: 0 0 0 3px #ff694f3b; }
.stop { flex: none; border: 2px solid #fff; border-radius: 7px; background: #ffdb5f; color: #24211e; padding: 7px 10px; font-size: 11px; font-weight: 900; box-shadow: 2px 2px 0 #fff; }
.stop:active { transform: translate(2px, 2px); box-shadow: none; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.pad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 155px;
  padding: 12px 13px;
  overflow: hidden;
  border: 3px solid #24211e;
  border-radius: 14px;
  color: #24211e;
  text-align: left;
  box-shadow: 5px 5px 0 #24211e;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s, box-shadow .12s;
}
.pad::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -15px;
  top: 29px;
  border: 2px solid #24211e25;
  border-radius: 50%;
  box-shadow: 0 0 0 12px #24211e0c, 0 0 0 26px #24211e08;
}
.pad:nth-child(6n+1) { background: #ff9d86; }
.pad:nth-child(6n+2) { background: #c4a2f7; }
.pad:nth-child(6n+3) { background: #ffc75c; }
.pad:nth-child(6n+4) { background: #a6d8ec; }
.pad:nth-child(6n+5) { background: #b7df9a; }
.pad:nth-child(6n) { background: #f4aed0; }
.pad:active, .pad.playing { transform: translate(4px, 4px) rotate(-1deg); box-shadow: 1px 1px 0 #24211e; }
.pad.playing::after { content: "♪ ♪"; position: absolute; right: 8px; bottom: 12px; font-size: 19px; font-weight: 900; transform: rotate(12deg); }
.number { position: relative; z-index: 1; font-family: Impact, "Arial Black", sans-serif; font-size: 13px; line-height: 1; }
.emoji { position: absolute; right: 15px; top: 30px; z-index: 1; display: grid; place-items: center; width: 69px; height: 69px; border-radius: 50%; border: 2px solid #24211e; background: #ffffffb8; font-size: 39px; line-height: 1; transform: rotate(10deg); box-shadow: 3px 3px 0 #24211e; }
.pad:nth-child(even) .emoji { transform: rotate(-12deg); }
.kind { position: absolute; left: 11px; top: 40px; z-index: 1; padding: 3px 5px; border: 1.5px solid #24211e; border-radius: 3px; background: #fff; font-size: 8px; font-weight: 900; letter-spacing: .04em; transform: rotate(-5deg); }
.name { position: relative; z-index: 1; margin-top: auto; max-width: 100%; font-family: Impact, "Arial Black", -apple-system, sans-serif; font-size: clamp(19px, 5vw, 26px); line-height: .95; letter-spacing: -.02em; overflow-wrap: anywhere; text-transform: uppercase; text-shadow: 2px 2px 0 #fff8; }
.tap { position: relative; z-index: 1; margin-top: 6px; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
footer { margin: 22px 0 0; text-align: center; font-size: 11px; font-weight: 800; color: #5d5550; }
footer span { color: #e56e54; }
dialog { width: min(calc(100% - 32px), 420px); border: 3px solid #24211e; border-radius: 14px; background: #f7f1df; color: #24211e; padding: 22px; box-shadow: 8px 8px 0 #24211e; }
dialog::backdrop { background: #24211eb5; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-top h2 { margin: 0; font-family: Impact, "Arial Black", sans-serif; font-size: 27px; }
.close { background: none; border: 0; color: inherit; font-size: 28px; }
label { display: block; font-size: 12px; font-weight: 800; margin: 15px 0; }
input { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 2px solid #24211e; border-radius: 7px; background: #fff; color: #24211e; font-size: 16px; }
input[type=file] { font-size: 12px; }
.hint { font-size: 12px; color: #5d5550; min-height: 16px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.dialog-actions button { border: 2px solid #24211e; border-radius: 7px; padding: 10px 14px; font-weight: 900; box-shadow: 3px 3px 0 #24211e; }
.primary { background: #c4a2f7; color: #24211e; }
.secondary { background: #fff; color: #24211e; }
@media (max-width: 360px) {
  .issue { font-size: 8px; }
  .pad { min-height: 145px; }
  .emoji { width: 57px; height: 57px; font-size: 34px; }
  .name { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .pad { transition: none; } }
